diff --git a/bi/base.css b/bi/base.css index 1e6e4b8f4..8428d8058 100644 --- a/bi/base.css +++ b/bi/base.css @@ -866,6 +866,13 @@ li.CodeMirror-hint-active { border: none; color: #e85050 !important; } +.bi-label { + text-overflow: ellipsis; + overflow-x: hidden; + overflow-y: hidden; + white-space: nowrap; + word-break: break-all; +} /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ .bi-text { @@ -881,6 +888,7 @@ li.CodeMirror-hint-active { /*IE8*/ box-sizing: border-box; /*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ + word-wrap: break-word; word-break: break-word; } .bi-bubble { diff --git a/bi/core.js b/bi/core.js index 634c58b26..fcab9ac0c 100644 --- a/bi/core.js +++ b/bi/core.js @@ -6161,6 +6161,14 @@ Date.prototype.getMonthDays = function (month) { } }; +/** + * 获取每月的最后一天 + * @returns {Date} + */ +Date.prototype.getLastDateOfMonth = function () { + return new Date(this.getFullYear(), this.getMonth(), this.getMonthDays()); +}; + /** Returns the number of day in the year. */ Date.prototype.getDayOfYear = function () { var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0); diff --git a/bi/slider.js b/bi/slider.js index bc751db5a..d28871148 100644 --- a/bi/slider.js +++ b/bi/slider.js @@ -137,7 +137,9 @@ BI.SingleSlider = BI.inherit(BI.Widget, { } }); this.label.on(BI.SignEditor.EVENT_CONFIRM, function () { - var percent = self._getPercentByValue(this.getValue()); + var v = BI.parseFloat(this.getValue()); + self.value = v; + var percent = self._getPercentByValue(v); var significantPercent = BI.parseFloat(percent.toFixed(1)); self._setAllPosition(significantPercent); self.fireEvent(BI.SingleSlider.EVENT_CHANGE); diff --git a/bi/widget.css b/bi/widget.css index 08bf6b8b8..401e34c4d 100644 --- a/bi/widget.css +++ b/bi/widget.css @@ -433,7 +433,7 @@ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ .bi-single-slider-slider .slider-button { - cursor: url('${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/cursor/cursor_drag_slider.cur'), auto; + cursor: url('images/1x/cursor/cursor_drag_slider.cur'), auto; -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); diff --git a/bi/widget.js b/bi/widget.js index e4baf5195..f4ae0f3c5 100644 --- a/bi/widget.js +++ b/bi/widget.js @@ -5496,7 +5496,8 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, { validationChecker: function () {return true;}, valueFormatter: function (v) {return v;}, value: 0, - errorText: "" + errorText: "", + step: 1 }) }, @@ -5523,7 +5524,7 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, { cls: "column-pre-page-h-font top-button bi-border-left bi-border-bottom" }); this.topBtn.on(BI.IconButton.EVENT_CHANGE, function(){ - self._finetuning(1); + self._finetuning(o.step); self.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE); self.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM); }); @@ -5533,7 +5534,7 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, { cls: "column-next-page-h-font bottom-button bi-border-left bi-border-top" }); this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function(){ - self._finetuning(-1); + self._finetuning(-o.step); self.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE); self.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM); }); @@ -6569,39 +6570,39 @@ BI.MultiDateCard = BI.inherit(BI.Widget, { var valueObject = this.getValue(); var type = valueObject.type, value = valueObject.value; switch (type) { - case BICst.DATE_TYPE.MULTI_DATE_DAY_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV: return new Date().getOffsetDate(-1 * value); - case BICst.DATE_TYPE.MULTI_DATE_DAY_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER: return new Date().getOffsetDate(value); - case BICst.DATE_TYPE.MULTI_DATE_DAY_TODAY: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY: return new Date(); - case BICst.DATE_TYPE.MULTI_DATE_MONTH_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV: return new Date().getBeforeMultiMonth(value); - case BICst.DATE_TYPE.MULTI_DATE_MONTH_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER: return new Date().getAfterMultiMonth(value); - case BICst.DATE_TYPE.MULTI_DATE_MONTH_BEGIN: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN: return new Date(new Date().getFullYear(), new Date().getMonth(), 1); - case BICst.DATE_TYPE.MULTI_DATE_MONTH_END: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END: return new Date(new Date().getFullYear(), new Date().getMonth(), (new Date().getLastDateOfMonth()).getDate()); - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV: return new Date().getBeforeMulQuarter(value); - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER: return new Date().getAfterMulQuarter(value); - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN: return new Date().getQuarterStartDate(); - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_END: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END: return new Date().getQuarterEndDate(); - case BICst.DATE_TYPE.MULTI_DATE_WEEK_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV: return new Date().getOffsetDate(-7 * value); - case BICst.DATE_TYPE.MULTI_DATE_WEEK_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER: return new Date().getOffsetDate(7 * value); - case BICst.DATE_TYPE.MULTI_DATE_YEAR_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV: return new Date((new Date().getFullYear() - 1 * value), new Date().getMonth(), new Date().getDate()); - case BICst.DATE_TYPE.MULTI_DATE_YEAR_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER: return new Date((new Date().getFullYear() + 1 * value), new Date().getMonth(), new Date().getDate()); - case BICst.DATE_TYPE.MULTI_DATE_YEAR_BEGIN: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN: return new Date(new Date().getFullYear(), 0, 1); - case BICst.DATE_TYPE.MULTI_DATE_YEAR_END: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END: return new Date(new Date().getFullYear(), 11, 31); } } @@ -6792,23 +6793,23 @@ BI.MultiDateCombo = BI.inherit(BI.Single, { type = v.type } switch (type) { - case BICst.DATE_TYPE.MULTI_DATE_YEAR_PREV: - case BICst.DATE_TYPE.MULTI_DATE_YEAR_AFTER: - case BICst.DATE_TYPE.MULTI_DATE_YEAR_BEGIN: - case BICst.DATE_TYPE.MULTI_DATE_YEAR_END: - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_PREV: - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_AFTER: - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN: - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_END: - case BICst.DATE_TYPE.MULTI_DATE_MONTH_PREV: - case BICst.DATE_TYPE.MULTI_DATE_MONTH_AFTER: - case BICst.DATE_TYPE.MULTI_DATE_MONTH_BEGIN: - case BICst.DATE_TYPE.MULTI_DATE_MONTH_END: - case BICst.DATE_TYPE.MULTI_DATE_WEEK_PREV: - case BICst.DATE_TYPE.MULTI_DATE_WEEK_AFTER: - case BICst.DATE_TYPE.MULTI_DATE_DAY_PREV: - case BICst.DATE_TYPE.MULTI_DATE_DAY_AFTER: - case BICst.DATE_TYPE.MULTI_DATE_DAY_TODAY: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY: this.changeIcon.setVisible(true); this.comboWrapper.attr("items")[1].width = 30; this.comboWrapper.resize(); @@ -6854,6 +6855,39 @@ BI.extend(BI.MultiDateCombo, { MULTI_DATE_WEEK_CARD: 5, MULTI_DATE_DAY_CARD: 6 }); + +BI.extend(BI.MultiDateCombo, { + DATE_TYPE: { + MULTI_DATE_YEAR_PREV: 1, + MULTI_DATE_YEAR_AFTER: 2, + MULTI_DATE_YEAR_BEGIN: 3, + MULTI_DATE_YEAR_END: 4, + MULTI_DATE_MONTH_PREV: 5, + MULTI_DATE_MONTH_AFTER: 6, + MULTI_DATE_MONTH_BEGIN: 7, + MULTI_DATE_MONTH_END: 8, + MULTI_DATE_QUARTER_PREV: 9, + MULTI_DATE_QUARTER_AFTER: 10, + MULTI_DATE_QUARTER_BEGIN: 11, + MULTI_DATE_QUARTER_END: 12, + MULTI_DATE_WEEK_PREV: 13, + MULTI_DATE_WEEK_AFTER: 14, + MULTI_DATE_DAY_PREV: 15, + MULTI_DATE_DAY_AFTER: 16, + MULTI_DATE_DAY_TODAY: 17, + MULTI_DATE_PARAM: 18, + MULTI_DATE_CALENDAR: 19, + YEAR_QUARTER: 20, + YEAR_MONTH: 21, + YEAR_WEEK: 22, + YEAR_DAY: 23, + MONTH_WEEK: 24, + MONTH_DAY: 25, + YEAR: 26, + SAME_PERIOD: 27, + LAST_SAME_PERIOD: 28 + } +}); /** * 普通控件 * @@ -6877,22 +6911,22 @@ BI.DayCard = BI.inherit(BI.MultiDateCard, { isEditorExist: true, selected: true, text: BI.i18nText("BI-Multi_Date_Day_Prev"), - value: BICst.DATE_TYPE.MULTI_DATE_DAY_PREV + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV }, { isEditorExist: true, text: BI.i18nText("BI-Multi_Date_Day_Next"), - value: BICst.DATE_TYPE.MULTI_DATE_DAY_AFTER + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER }, { isEditorExist: false, - value: BICst.DATE_TYPE.MULTI_DATE_DAY_TODAY, + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY, text: BI.i18nText("BI-Multi_Date_Today") }]; }, defaultSelectedItem: function () { - return BICst.DATE_TYPE.MULTI_DATE_DAY_PREV + return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV } }); BI.DayCard.EVENT_CHANGE = "EVENT_CHANGE"; @@ -6918,28 +6952,28 @@ BI.MonthCard = BI.inherit(BI.MultiDateCard, { return [{ selected: true, isEditorExist: true, - value: BICst.DATE_TYPE.MULTI_DATE_MONTH_PREV, + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV, text: BI.i18nText("BI-Multi_Date_Month_Prev") }, { isEditorExist: true, - value: BICst.DATE_TYPE.MULTI_DATE_MONTH_AFTER, + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER, text: BI.i18nText("BI-Multi_Date_Month_Next") }, { - value: BICst.DATE_TYPE.MULTI_DATE_MONTH_BEGIN, + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN, isEditorExist: false, text: BI.i18nText("BI-Multi_Date_Month_Begin") }, { - value: BICst.DATE_TYPE.MULTI_DATE_MONTH_END, + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END, isEditorExist: false, text: BI.i18nText("BI-Multi_Date_Month_End") }]; }, defaultSelectedItem: function () { - return BICst.DATE_TYPE.MULTI_DATE_MONTH_PREV; + return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV; } }); BI.MonthCard.EVENT_CHANGE = "EVENT_CHANGE"; @@ -7165,52 +7199,52 @@ BI.MultiDatePopup = BI.inherit(BI.Widget, { var self = this, date; var type, value; if (BI.isNotNull(v)) { - type = v.type || BICst.DATE_TYPE.MULTI_DATE_CALENDAR; + type = v.type || BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_CALENDAR; value = v.value; if (BI.isNull(value)) { value = v; } } switch (type) { - case BICst.DATE_TYPE.MULTI_DATE_YEAR_PREV: - case BICst.DATE_TYPE.MULTI_DATE_YEAR_AFTER: - case BICst.DATE_TYPE.MULTI_DATE_YEAR_BEGIN: - case BICst.DATE_TYPE.MULTI_DATE_YEAR_END: - this.dateTab.setSelect(BICst.MULTI_DATE_YEAR_CARD); + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END: + this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YEAR_CARD); this.year.setValue({type: type, value: value}); - this.cur = BICst.MULTI_DATE_YEAR_CARD; + this.cur = BI.MultiDateCombo.MULTI_DATE_YEAR_CARD; self._setInnerValue(this.year); break; - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_PREV: - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_AFTER: - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN: - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_END: - this.dateTab.setSelect(BICst.MULTI_DATE_QUARTER_CARD); - this.cur = BICst.MULTI_DATE_QUARTER_CARD; + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END: + this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD); + this.cur = BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD; this.quarter.setValue({type: type, value: value}); self._setInnerValue(this.quarter); break; - case BICst.DATE_TYPE.MULTI_DATE_MONTH_PREV: - case BICst.DATE_TYPE.MULTI_DATE_MONTH_AFTER: - case BICst.DATE_TYPE.MULTI_DATE_MONTH_BEGIN: - case BICst.DATE_TYPE.MULTI_DATE_MONTH_END: - this.dateTab.setSelect(BICst.MULTI_DATE_MONTH_CARD); - this.cur = BICst.MULTI_DATE_MONTH_CARD; + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END: + this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_MONTH_CARD); + this.cur = BI.MultiDateCombo.MULTI_DATE_MONTH_CARD; this.month.setValue({type: type, value: value}); self._setInnerValue(this.month); break; - case BICst.DATE_TYPE.MULTI_DATE_WEEK_PREV: - case BICst.DATE_TYPE.MULTI_DATE_WEEK_AFTER: - this.dateTab.setSelect(BICst.MULTI_DATE_WEEK_CARD); - this.cur = BICst.MULTI_DATE_WEEK_CARD; + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER: + this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_WEEK_CARD); + this.cur = BI.MultiDateCombo.MULTI_DATE_WEEK_CARD; this.week.setValue({type: type, value: value}); self._setInnerValue(this.week); break; - case BICst.DATE_TYPE.MULTI_DATE_DAY_PREV: - case BICst.DATE_TYPE.MULTI_DATE_DAY_AFTER: - case BICst.DATE_TYPE.MULTI_DATE_DAY_TODAY: - this.dateTab.setSelect(BICst.MULTI_DATE_DAY_CARD); - this.cur = BICst.MULTI_DATE_DAY_CARD; + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY: + this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_DAY_CARD); + this.cur = BI.MultiDateCombo.MULTI_DATE_DAY_CARD; this.day.setValue({type: type, value: value}); self._setInnerValue(this.day); break; @@ -7277,29 +7311,29 @@ BI.QuarterCard = BI.inherit(BI.MultiDateCard, { dateConfig: function () { return [{ selected: true, - value: BICst.DATE_TYPE.MULTI_DATE_QUARTER_PREV, + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV, isEditorExist: true, text: BI.i18nText("BI-Multi_Date_Quarter_Prev") }, { - value: BICst.DATE_TYPE.MULTI_DATE_QUARTER_AFTER, + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER, isEditorExist: true, text: BI.i18nText("BI-Multi_Date_Quarter_Next") }, { - value: BICst.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN, + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN, isEditorExist: false, text: BI.i18nText("BI-Multi_Date_Quarter_Begin") }, { - value: BICst.DATE_TYPE.MULTI_DATE_QUARTER_END, + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END, isEditorExist: false, text: BI.i18nText("BI-Multi_Date_Quarter_End") }] }, defaultSelectedItem: function () { - return BICst.DATE_TYPE.MULTI_DATE_QUARTER_PREV; + return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV; } }); BI.QuarterCard.EVENT_CHANGE = "EVENT_CHANGE"; @@ -7452,17 +7486,17 @@ BI.WeekCard = BI.inherit(BI.MultiDateCard, { selected: true, isEditorExist: true, text: BI.i18nText("BI-Multi_Date_Week_Prev"), - value: BICst.DATE_TYPE.MULTI_DATE_WEEK_PREV + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV }, { isEditorExist: true, text: BI.i18nText("BI-Multi_Date_Week_Next"), - value: BICst.DATE_TYPE.MULTI_DATE_WEEK_AFTER + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER }]; }, defaultSelectedItem: function () { - return BICst.DATE_TYPE.MULTI_DATE_WEEK_PREV; + return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV; } }); BI.WeekCard.EVENT_CHANGE = "EVENT_CHANGE"; @@ -7489,27 +7523,27 @@ BI.YearCard = BI.inherit(BI.MultiDateCard, { selected: true, isEditorExist: true, text: BI.i18nText("BI-Multi_Date_Year_Prev"), - value: BICst.DATE_TYPE.MULTI_DATE_YEAR_PREV + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV }, { isEditorExist: true, text: BI.i18nText("BI-Multi_Date_Year_Next"), - value: BICst.DATE_TYPE.MULTI_DATE_YEAR_AFTER + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER }, { isEditorExist: false, - value: BICst.DATE_TYPE.MULTI_DATE_YEAR_BEGIN, + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN, text: BI.i18nText("BI-Multi_Date_Year_Begin") }, { isEditorExist: false, - value: BICst.DATE_TYPE.MULTI_DATE_YEAR_END, + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END, text: BI.i18nText("BI-Multi_Date_Year_End") }] }, defaultSelectedItem: function () { - return BICst.DATE_TYPE.MULTI_DATE_YEAR_PREV; + return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV; } }); BI.YearCard.EVENT_CHANGE = "EVENT_CHANGE"; diff --git a/dist/base.css b/dist/base.css index 1e6e4b8f4..8428d8058 100644 --- a/dist/base.css +++ b/dist/base.css @@ -866,6 +866,13 @@ li.CodeMirror-hint-active { border: none; color: #e85050 !important; } +.bi-label { + text-overflow: ellipsis; + overflow-x: hidden; + overflow-y: hidden; + white-space: nowrap; + word-break: break-all; +} /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ .bi-text { @@ -881,6 +888,7 @@ li.CodeMirror-hint-active { /*IE8*/ box-sizing: border-box; /*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ + word-wrap: break-word; word-break: break-word; } .bi-bubble { diff --git a/dist/biconst.js b/dist/biconst.js deleted file mode 100644 index 411442bcb..000000000 --- a/dist/biconst.js +++ /dev/null @@ -1,668 +0,0 @@ -BICst.DATE_TYPE = {}; -BICst.DATE_TYPE.MULTI_DATE_YEAR_PREV = 1; -BICst.DATE_TYPE.MULTI_DATE_YEAR_AFTER = 2; -BICst.DATE_TYPE.MULTI_DATE_YEAR_BEGIN = 3; -BICst.DATE_TYPE.MULTI_DATE_YEAR_END = 4; -BICst.DATE_TYPE.MULTI_DATE_MONTH_PREV = 5; -BICst.DATE_TYPE.MULTI_DATE_MONTH_AFTER = 6; -BICst.DATE_TYPE.MULTI_DATE_MONTH_BEGIN = 7; -BICst.DATE_TYPE.MULTI_DATE_MONTH_END = 8; -BICst.DATE_TYPE.MULTI_DATE_QUARTER_PREV = 9; -BICst.DATE_TYPE.MULTI_DATE_QUARTER_AFTER = 10; -BICst.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN = 11; -BICst.DATE_TYPE.MULTI_DATE_QUARTER_END = 12; -BICst.DATE_TYPE.MULTI_DATE_WEEK_PREV = 13; -BICst.DATE_TYPE.MULTI_DATE_WEEK_AFTER = 14; -BICst.DATE_TYPE.MULTI_DATE_DAY_PREV = 15; -BICst.DATE_TYPE.MULTI_DATE_DAY_AFTER = 16; -BICst.DATE_TYPE.MULTI_DATE_DAY_TODAY = 17; -BICst.DATE_TYPE.MULTI_DATE_PARAM = 18; -BICst.DATE_TYPE.MULTI_DATE_CALENDAR = 19; -BICst.DATE_TYPE.YEAR_QUARTER = 20; -BICst.DATE_TYPE.YEAR_MONTH = 21; -BICst.DATE_TYPE.YEAR_WEEK = 22; -BICst.DATE_TYPE.YEAR_DAY = 23; -BICst.DATE_TYPE.MONTH_WEEK = 24; -BICst.DATE_TYPE.MONTH_DAY = 25; -BICst.DATE_TYPE.YEAR = 26; -BICst.DATE_TYPE.SAME_PERIOD = 27; -BICst.DATE_TYPE.LAST_SAME_PERIOD = 28; -BICst.DATE_FORMAT = {}; -BICst.DATE_FORMAT.SPLIT = 1; -BICst.DATE_FORMAT.CHINESE = 2; -BICst.RES_STATUS = {}; -BICst.RES_STATUS.NORMAL = 1; -BICst.RES_STATUS.ERROR = 2; -BICst.RES_STATUS.DATA_MISS = 3; -BICst.RES_STATUS.NO_AUTHORITY = 4; -BICst.RES_STATUS.NO_DATA = 5; -BICst.REPORT_AUTH = {}; -BICst.REPORT_AUTH.NONE = 0; -BICst.REPORT_AUTH.EDIT = 1; -BICst.REPORT_AUTH.VIEW = 2; -BICst.TARGET_STYLE = {}; -BICst.TARGET_STYLE.ICON_STYLE = {}; -BICst.TARGET_STYLE.ICON_STYLE.NONE = 1; -BICst.TARGET_STYLE.ICON_STYLE.POINT = 2; -BICst.TARGET_STYLE.ICON_STYLE.ARROW = 3; -BICst.TARGET_STYLE.NUM_LEVEL = {}; -BICst.TARGET_STYLE.NUM_LEVEL.NORMAL = 1; -BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND = 2; -BICst.TARGET_STYLE.NUM_LEVEL.MILLION = 3; -BICst.TARGET_STYLE.NUM_LEVEL.YI = 4; -BICst.TARGET_STYLE.NUM_LEVEL.PERCENT = 5; -BICst.TARGET_STYLE.FORMAT = {}; -BICst.TARGET_STYLE.FORMAT.NORMAL = -1; -BICst.TARGET_STYLE.FORMAT.ZERO2POINT = 0; -BICst.TARGET_STYLE.FORMAT.ONE2POINT = 1; -BICst.TARGET_STYLE.FORMAT.TWO2POINT = 2; -BICst.MULTI_PATH_STATUS = {}; -BICst.MULTI_PATH_STATUS.NEED_GENERATE_CUBE = 0; -BICst.MULTI_PATH_STATUS.NOT_NEED_GENERATE_CUBE = 1; -BICst.CUSTOM_GROUP = {}; -BICst.CUSTOM_GROUP.UNGROUP2OTHER = {}; -BICst.CUSTOM_GROUP.UNGROUP2OTHER.NOTSELECTED = 0; -BICst.CUSTOM_GROUP.UNGROUP2OTHER.SELECTED = 1; -BICst.REPORT_STATUS = {}; -BICst.REPORT_STATUS.APPLYING = 1; -BICst.REPORT_STATUS.HANGOUT = 2; -BICst.REPORT_STATUS.NORMAL = 3; -BICst.FIELD_ID = {}; -BICst.FIELD_ID.HEAD = "81c48028-1401-11e6-a148-3e1d05defe78"; -BICst.TREE_LABEL = {}; -BICst.TREE_LABEL.TREE_LABEL_ITEM_COUNT_NUM = 40; -BICst.TREE = {}; -BICst.TREE.TREE_REQ_TYPE = {}; -BICst.TREE.TREE_REQ_TYPE.DEFAULT_DATA = 0; -BICst.TREE.TREE_REQ_TYPE.INIT_DATA = 1; -BICst.TREE.TREE_REQ_TYPE.SELECT_DATA = 3; -BICst.TREE.TREE_REQ_TYPE.ADJUST_DATA = 2; -BICst.TREE.TREE_REQ_TYPE.GET_SELECTED_DATA = 4; -BICst.TREE.TREE_REQ_TYPE.UNSELECT_DATA = 5; -BICst.TREE.TREE_ITEM_COUNT_PER_PAGE = 100; -BICst.BUSINESS_TABLE_TYPE = {}; -BICst.BUSINESS_TABLE_TYPE.NORMAL = 0; -BICst.EXPANDER_TYPE = {}; -BICst.EXPANDER_TYPE.NONE = false; -BICst.EXPANDER_TYPE.ALL = true; -BICst.SORT = {}; -BICst.SORT.ASC = 0; -BICst.SORT.DESC = 1; -BICst.SORT.CUSTOM = 2; -BICst.SORT.NONE = 3; -BICst.SORT.NUMBER_ASC = 4; -BICst.SORT.NUMBER_DESC = 5; -BICst.TABLE_PAGE_OPERATOR = {}; -BICst.TABLE_PAGE_OPERATOR.ALL_PAGE = -1; -BICst.TABLE_PAGE_OPERATOR.REFRESH = 0; -BICst.TABLE_PAGE_OPERATOR.COLUMN_PRE = 1; -BICst.TABLE_PAGE_OPERATOR.COLUMN_NEXT = 2; -BICst.TABLE_PAGE_OPERATOR.ROW_PRE = 3; -BICst.TABLE_PAGE_OPERATOR.ROW_NEXT = 4; -BICst.TABLE_PAGE_OPERATOR.EXPAND = 5; -BICst.TABLE_PAGE = {}; -BICst.TABLE_PAGE.VERTICAL_PRE = 0; -BICst.TABLE_PAGE.VERTICAL_NEXT = 1; -BICst.TABLE_PAGE.HORIZON_PRE = 2; -BICst.TABLE_PAGE.HORIZON_NEXT = 3; -BICst.TABLE_PAGE.TOTAL_PAGE = 4; -BICst.TABLE_WIDGET = {}; -BICst.TABLE_WIDGET.GROUP_TYPE = 1; -BICst.TABLE_WIDGET.CROSS_TYPE = 2; -BICst.TABLE_WIDGET.COMPLEX_TYPE = 3; -BICst.REGION = {}; -BICst.REGION.DIMENSION1 = "10000"; -BICst.REGION.DIMENSION2 = "20000"; -BICst.REGION.TARGET1 = "30000"; -BICst.REGION.TARGET2 = "40000"; -BICst.REGION.TARGET3 = "50000"; -BICst.EXPORT = {}; -BICst.EXPORT.EXCEL = 1; -BICst.EXPORT.PDF = 2; -BICst.WIDGET = {}; -BICst.WIDGET.TABLE = 1; -BICst.WIDGET.CROSS_TABLE = 2; -BICst.WIDGET.COMPLEX_TABLE = 3; -BICst.WIDGET.DETAIL = 4; -BICst.WIDGET.AXIS = 5; -BICst.WIDGET.ACCUMULATE_AXIS = 6; -BICst.WIDGET.PERCENT_ACCUMULATE_AXIS = 7; -BICst.WIDGET.COMPARE_AXIS = 8; -BICst.WIDGET.FALL_AXIS = 9; -BICst.WIDGET.BAR = 10; -BICst.WIDGET.ACCUMULATE_BAR = 11; -BICst.WIDGET.COMPARE_BAR = 12; -BICst.WIDGET.LINE = 13; -BICst.WIDGET.AREA = 14; -BICst.WIDGET.ACCUMULATE_AREA = 15; -BICst.WIDGET.PERCENT_ACCUMULATE_AREA = 16; -BICst.WIDGET.COMPARE_AREA = 17; -BICst.WIDGET.RANGE_AREA = 18; -BICst.WIDGET.COMBINE_CHART = 19; -BICst.WIDGET.MULTI_AXIS_COMBINE_CHART = 20; -BICst.WIDGET.PIE = 21; -BICst.WIDGET.DONUT = 22; -BICst.WIDGET.MAP = 23; -BICst.WIDGET.GIS_MAP = 24; -BICst.WIDGET.DASHBOARD = 25; -BICst.WIDGET.BUBBLE = 26; -BICst.WIDGET.SCATTER = 28; -BICst.WIDGET.FORCE_BUBBLE = 27; -BICst.WIDGET.RADAR = 29; -BICst.WIDGET.ACCUMULATE_RADAR = 30; -BICst.WIDGET.FUNNEL = 31; -BICst.WIDGET.RECT_TREE = 39; -BICst.WIDGET.MULTI_PIE = 40; -BICst.WIDGET.HEAT_MAP = 65; -BICst.WIDGET.PARETO = 66; -BICst.WIDGET.DOT = 67; -BICst.WIDGET.STRING = 32; -BICst.WIDGET.NUMBER = 33; -BICst.WIDGET.TREE = 34; -BICst.WIDGET.SINGLE_SLIDER = 35; -BICst.WIDGET.INTERVAL_SLIDER = 36; -BICst.WIDGET.LIST_LABEL = 37; -BICst.WIDGET.TREE_LABEL = 38; -BICst.WIDGET.STRING_LIST = 59; -BICst.WIDGET.TREE_LIST = 60; -BICst.WIDGET.DATE_PANE = 61; -BICst.WIDGET.DATE = 48; -BICst.WIDGET.YEAR = 49; -BICst.WIDGET.QUARTER = 50; -BICst.WIDGET.MONTH = 51; -BICst.WIDGET.YMD = 52; -BICst.WIDGET.QUERY = 53; -BICst.WIDGET.RESET = 54; -BICst.WIDGET.CONTENT = 55; -BICst.WIDGET.IMAGE = 56; -BICst.WIDGET.WEB = 57; -BICst.WIDGET.GENERAL_QUERY = 58; -BICst.WIDGET.TABLE_SHOW = 64; -BICst.WIDGET.NONE = -1; -BICst.TARGET_TYPE = {}; -BICst.TARGET_TYPE.CAL_POSITION = {}; -BICst.TARGET_TYPE.CAL_POSITION.ALL = 0; -BICst.TARGET_TYPE.CAL_POSITION.INGROUP = 1; -BICst.TARGET_TYPE.CAL_VALUE = {}; -BICst.TARGET_TYPE.CAL_VALUE.PERIOD_TYPE = {}; -BICst.TARGET_TYPE.CAL_VALUE.PERIOD_TYPE.VALUE = 0; -BICst.TARGET_TYPE.CAL_VALUE.PERIOD_TYPE.RATE = 1; -BICst.TARGET_TYPE.CAL_VALUE.SUMMARY_TYPE = {}; -BICst.TARGET_TYPE.CAL_VALUE.SUMMARY_TYPE.SUM = 0; -BICst.TARGET_TYPE.CAL_VALUE.SUMMARY_TYPE.MAX = 1; -BICst.TARGET_TYPE.CAL_VALUE.SUMMARY_TYPE.MIN = 2; -BICst.TARGET_TYPE.CAL_VALUE.SUMMARY_TYPE.AVG = 3; -BICst.TARGET_TYPE.CAL_VALUE.RANK_TPYE = {}; -BICst.TARGET_TYPE.CAL_VALUE.RANK_TPYE.ASC = 0; -BICst.TARGET_TYPE.CAL_VALUE.RANK_TPYE.DESC = 1; -BICst.TARGET_TYPE.CAL_VALUE.SUM_OF_ALL = 0; -BICst.TARGET_TYPE.CAL_VALUE.PERIOD = 1; -BICst.TARGET_TYPE.CAL_VALUE.SUM_OF_ABOVE = 2; -BICst.TARGET_TYPE.CAL_VALUE.RANK = 3; -BICst.TARGET_TYPE.CAL = {}; -BICst.TARGET_TYPE.CAL.FORMULA = 0; -BICst.TARGET_TYPE.CAL.CONFIGURATION = 1; -BICst.TARGET_TYPE.STRING = 1; -BICst.TARGET_TYPE.NUMBER = 2; -BICst.TARGET_TYPE.DATE = 3; -BICst.TARGET_TYPE.COUNTER = 4; -BICst.TARGET_TYPE.FORMULA = 5; -BICst.TARGET_TYPE.YEAR_ON_YEAR_RATE = 6; -BICst.TARGET_TYPE.MONTH_ON_MONTH_RATE = 7; -BICst.TARGET_TYPE.YEAR_ON_YEAR_VALUE = 8; -BICst.TARGET_TYPE.MONTH_ON_MONTH_VALUE = 9; -BICst.TARGET_TYPE.SUM_OF_ABOVE = 10; -BICst.TARGET_TYPE.SUM_OF_ABOVE_IN_GROUP = 11; -BICst.TARGET_TYPE.SUM_OF_ALL = 12; -BICst.TARGET_TYPE.SUM_OF_ALL_IN_GROUP = 13; -BICst.TARGET_TYPE.RANK = 14; -BICst.TARGET_TYPE.RANK_IN_GROUP = 15; -BICst.DIMENSION_FILTER_DATE = {}; -BICst.DIMENSION_FILTER_DATE.BELONG_VALUE = 98; -BICst.DIMENSION_FILTER_DATE.NOT_BELONG_VALUE = 99; -BICst.DIMENSION_FILTER_DATE.IS_NULL = 100; -BICst.DIMENSION_FILTER_DATE.NOT_NULL = 101; -BICst.DIMENSION_FILTER_DATE.TOP_N = 102; -BICst.DIMENSION_FILTER_DATE.BOTTOM_N = 103; -BICst.DIMENSION_FILTER_DATE.CONTAIN = 104; -BICst.DIMENSION_FILTER_DATE.NOT_CONTAIN = 105; -BICst.DIMENSION_FILTER_DATE.BEGIN_WITH = 106; -BICst.DIMENSION_FILTER_DATE.END_WITH = 107; -BICst.FILTER_TYPE = {}; -BICst.FILTER_TYPE.AND = 80; -BICst.FILTER_TYPE.OR = 81; -BICst.FILTER_TYPE.FORMULA = 82; -BICst.FILTER_TYPE.EMPTY_FORMULA = 90; -BICst.FILTER_TYPE.EMPTY_CONDITION = 91; -BICst.FILTER_TYPE.NUMBER_SUM = 83; -BICst.FILTER_TYPE.NUMBER_AVG = 84; -BICst.FILTER_TYPE.NUMBER_MAX = 85; -BICst.FILTER_TYPE.NUMBER_MIN = 86; -BICst.FILTER_TYPE.NUMBER_COUNT = 87; -BICst.FILTER_TYPE.TREE_FILTER = 88; -BICst.FILTER_TYPE.COLUMNFILTER = 89; -BICst.FILTER_TYPE.DIMENSION_TARGET_VALUE_FILTER = 96; -BICst.FILTER_TYPE.DIMENSION_SELF_FILTER = 97; -BICst.FILTER_DATE = {}; -BICst.FILTER_DATE.BELONG_DATE_RANGE = 64; -BICst.FILTER_DATE.BELONG_WIDGET_VALUE = 65; -BICst.FILTER_DATE.NOT_BELONG_DATE_RANGE = 66; -BICst.FILTER_DATE.NOT_BELONG_WIDGET_VALUE = 67; -BICst.FILTER_DATE.MORE_THAN = 68; -BICst.FILTER_DATE.LESS_THAN = 69; -BICst.FILTER_DATE.EQUAL_TO = 70; -BICst.FILTER_DATE.NOT_EQUAL_TO = 71; -BICst.FILTER_DATE.IS_NULL = 72; -BICst.FILTER_DATE.NOT_NULL = 73; -BICst.FILTER_DATE.EARLY_THAN = 74; -BICst.FILTER_DATE.LATER_THAN = 75; -BICst.FILTER_DATE.CONTAINS = 76; -BICst.FILTER_DATE.CONTAINS_DAY = 77; -BICst.FILTER_DATE.DAY_EQUAL_TO = 78; -BICst.FILTER_DATE.DAY_NOT_EQUAL_TO = 79; -BICst.TARGET_FILTER_NUMBER = {}; -BICst.TARGET_FILTER_NUMBER.EQUAL_TO = 48; -BICst.TARGET_FILTER_NUMBER.NOT_EQUAL_TO = 49; -BICst.TARGET_FILTER_NUMBER.BELONG_VALUE = 50; -BICst.TARGET_FILTER_NUMBER.BELONG_USER = 51; -BICst.TARGET_FILTER_NUMBER.NOT_BELONG_VALUE = 52; -BICst.TARGET_FILTER_NUMBER.NOT_BELONG_USER = 53; -BICst.TARGET_FILTER_NUMBER.IS_NULL = 54; -BICst.TARGET_FILTER_NUMBER.NOT_NULL = 55; -BICst.TARGET_FILTER_NUMBER.CONTAINS = 56; -BICst.TARGET_FILTER_NUMBER.NOT_CONTAINS = 57; -BICst.TARGET_FILTER_NUMBER.LARGE_THAN_CAL_LINE = 58; -BICst.TARGET_FILTER_NUMBER.LARGE_OR_EQUAL_CAL_LINE = 59; -BICst.TARGET_FILTER_NUMBER.SMALL_THAN_CAL_LINE = 60; -BICst.TARGET_FILTER_NUMBER.SMALL_OR_EQUAL_CAL_LINE = 61; -BICst.TARGET_FILTER_NUMBER.TOP_N = 62; -BICst.TARGET_FILTER_NUMBER.BOTTOM_N = 63; -BICst.TARGET_FILTER_STRING = {}; -BICst.TARGET_FILTER_STRING.BELONG_VALUE = 32; -BICst.TARGET_FILTER_STRING.BELONG_USER = 33; -BICst.TARGET_FILTER_STRING.NOT_BELONG_VALUE = 34; -BICst.TARGET_FILTER_STRING.NOT_BELONG_USER = 35; -BICst.TARGET_FILTER_STRING.CONTAIN = 36; -BICst.TARGET_FILTER_STRING.NOT_CONTAIN = 37; -BICst.TARGET_FILTER_STRING.IS_NULL = 38; -BICst.TARGET_FILTER_STRING.NOT_NULL = 39; -BICst.TARGET_FILTER_STRING.BEGIN_WITH = 40; -BICst.TARGET_FILTER_STRING.END_WITH = 41; -BICst.TARGET_FILTER_STRING.NOT_BEGIN_WITH = 42; -BICst.TARGET_FILTER_STRING.NOT_END_WITH = 43; -BICst.TARGET_FILTER_STRING.VAGUE_CONTAIN = 46; -BICst.TARGET_FILTER_STRING.NOT_VAGUE_CONTAIN = 47; -BICst.DIMENSION_FILTER_NUMBER = {}; -BICst.DIMENSION_FILTER_NUMBER.BELONG_VALUE = 16; -BICst.DIMENSION_FILTER_NUMBER.BELONG_USER = 17; -BICst.DIMENSION_FILTER_NUMBER.NOT_BELONG_VALUE = 18; -BICst.DIMENSION_FILTER_NUMBER.NOT_BELONG_USER = 19; -BICst.DIMENSION_FILTER_NUMBER.MORE_THAN_AVG = 20; -BICst.DIMENSION_FILTER_NUMBER.LESS_THAN_AVG = 21; -BICst.DIMENSION_FILTER_NUMBER.IS_NULL = 22; -BICst.DIMENSION_FILTER_NUMBER.NOT_NULL = 23; -BICst.DIMENSION_FILTER_NUMBER.TOP_N = 24; -BICst.DIMENSION_FILTER_NUMBER.BOTTOM_N = 25; -BICst.DIMENSION_FILTER_STRING = {}; -BICst.DIMENSION_FILTER_STRING.BELONG_VALUE = 0; -BICst.DIMENSION_FILTER_STRING.BELONG_USER = 1; -BICst.DIMENSION_FILTER_STRING.NOT_BELONG_VALUE = 2; -BICst.DIMENSION_FILTER_STRING.NOT_BELONG_USER = 3; -BICst.DIMENSION_FILTER_STRING.CONTAIN = 4; -BICst.DIMENSION_FILTER_STRING.NOT_CONTAIN = 5; -BICst.DIMENSION_FILTER_STRING.IS_NULL = 6; -BICst.DIMENSION_FILTER_STRING.NOT_NULL = 7; -BICst.DIMENSION_FILTER_STRING.BEGIN_WITH = 8; -BICst.DIMENSION_FILTER_STRING.END_WITH = 9; -BICst.DIMENSION_FILTER_STRING.TOP_N = 10; -BICst.DIMENSION_FILTER_STRING.BOTTOM_N = 11; -BICst.DIMENSION_FILTER_STRING.NOT_BEGIN_WITH = 12; -BICst.DIMENSION_FILTER_STRING.NOT_END_WITH = 13; -BICst.DIMENSION_FILTER_STRING.VAGUE_CONTAIN = 14; -BICst.DIMENSION_FILTER_STRING.NOT_VAGUE_CONTAIN = 15; -BICst.GROUP = {}; -BICst.GROUP.NO_GROUP = 0; -BICst.GROUP.AUTO_GROUP = 3; -BICst.GROUP.CUSTOM_GROUP = 4; -BICst.GROUP.CUSTOM_NUMBER_GROUP = 5; -BICst.GROUP.Y = 6; -BICst.GROUP.S = 7; -BICst.GROUP.M = 8; -BICst.GROUP.W = 9; -BICst.GROUP.YMD = 10; -BICst.GROUP.YD = 11; -BICst.GROUP.MD = 12; -BICst.GROUP.YMDHMS = 13; -BICst.GROUP.ID_GROUP = 14; -BICst.GROUP.HOUR = 15; -BICst.GROUP.MINUTE = 16; -BICst.GROUP.SECOND = 17; -BICst.GROUP.WEEK_COUNT = 18; -BICst.GROUP.D = 19; -BICst.GROUP.YM = 20; -BICst.GROUP.YW = 21; -BICst.GROUP.YMDH = 22; -BICst.GROUP.YMDHM = 23; -BICst.GROUP.YS = 24; -BICst.SUMMARY_TYPE = {}; -BICst.SUMMARY_TYPE.SUM = 0; -BICst.SUMMARY_TYPE.MAX = 1; -BICst.SUMMARY_TYPE.MIN = 2; -BICst.SUMMARY_TYPE.AVG = 3; -BICst.SUMMARY_TYPE.COUNT = 4; -BICst.SUMMARY_TYPE.APPEND = 5; -BICst.SUMMARY_TYPE.RECORD_COUNT = 6; -BICst.BI_REPORT = {}; -BICst.BI_REPORT.NULL = 0; -BICst.BI_REPORT.SUBMITED = 1; -BICst.BI_REPORT.PUBLISHED = 2; -BICst.VERSION = "4.0.2"; -BICst.SYSTEM_TIME = "__system_time-3e1d05defe78__"; - -BICst.ETL_ADD_COLUMN_TYPE = {}; -BICst.ETL_ADD_COLUMN_TYPE.FORMULA = "formula"; -BICst.ETL_ADD_COLUMN_TYPE.DATE_DIFF = "date_diff"; -BICst.ETL_ADD_COLUMN_TYPE.DATE_YEAR = "date_year"; -BICst.ETL_ADD_COLUMN_TYPE.DATE_SEASON = "date_season"; -BICst.ETL_ADD_COLUMN_TYPE.DATE_MONTH = "date_month"; -BICst.ETL_ADD_COLUMN_TYPE.EXPR_CPP = "expr_same_period"; -BICst.ETL_ADD_COLUMN_TYPE.EXPR_LP = "expr_last_period"; -BICst.ETL_ADD_COLUMN_TYPE.EXPR_CPP_PERCENT = "expr_same_period_percent"; -BICst.ETL_ADD_COLUMN_TYPE.EXPR_LP_PERCENT = "expr_last_period_percent"; -BICst.ETL_ADD_COLUMN_TYPE.EXPR_SUM = "expr_sum"; -BICst.ETL_ADD_COLUMN_TYPE.EXPR_ACC = "expr_acc"; -BICst.ETL_ADD_COLUMN_TYPE.EXPR_RANK = "expr_rank"; -BICst.ETL_ADD_COLUMN_TYPE.GROUP = "group_value"; -BICst.ETL_ADD_COLUMN_TYPE.SINGLE_VALUE = "single_value"; -BICst.ETL_ADD_COLUMN_TYPE.VALUE_CONVERT = "value_convert"; -BICst.JSON_KEYS = {}; -BICst.JSON_KEYS.STATISTIC_ELEMENT = "_src"; -BICst.JSON_KEYS.FILED_MAX_VALUE = "max"; -BICst.JSON_KEYS.FIELD_MIN_VALUE = "min"; -BICst.JSON_KEYS.FILTER_VALUE = "filterValue"; -BICst.JSON_KEYS.FILTER_CONDITION = "condition"; -BICst.JSON_KEYS.FILTER_AND_OR = "andor"; -BICst.JSON_KEYS.FILTER_TYPE = "filterType"; -BICst.JSON_KEYS.FIELD_ID = "fieldId"; -BICst.JSON_KEYS.FIELD_TYPE = "fieldType"; -BICst.JSON_KEYS.FIELD_VALUE = "field_value"; -BICst.JSON_KEYS.FIELD_NAME = "fieldName"; -BICst.JSON_KEYS.TYPE = "type"; -BICst.JSON_KEYS.VALUE = "value"; -BICst.JSON_KEYS.EXPANDER = "expander"; -BICst.JSON_KEYS.EXPANDER_X = "x"; -BICst.JSON_KEYS.EXPANDER_Y = "y"; -BICst.JSON_KEYS.CLICKEDVALUE = "clickedvalue"; -BICst.JSON_KEYS.SETTTINGS = "settings"; -BICst.JSON_KEYS.ID = "id"; -BICst.JSON_KEYS.TABLES = "tables"; -BICst.JSON_KEYS.TABLE = "table"; -BICst.JSON_KEYS.FIELDS = "fields"; -BICst.JSON_KEYS.FIELD = "field"; -BICst.JSON_KEYS.ETL_TYPE = "etlType"; -BICst.JSON_KEYS.ETL_VALUE = "etlValue"; -BICst.JSON_KEYS.TABLE_TYPE = "table_type"; -BICst.JSON_KEYS.HAS_NEXT = "hasNext"; -BICst.JSON_KEYS.CONNECTION_SET = "connectionSet"; -BICst.JSON_KEYS.PRIMARY_KEY_MAP = "primKeyMap"; -BICst.JSON_KEYS.FOREIGN_KEY_MAP = "foreignKeyMap"; - -BICst.CUSTOM_FORMAT = {}; -BICst.CUSTOM_FORMAT.VALUEFORMAT = "(window.BH ? BH.contentFormat(this.value, '#.##;-#.##') : this.value)"; -BICst.CUSTOM_FORMAT.PERCENTVALUEFORMAT = "(window.BH ? BH.contentFormat(this.value, '#0.00%') : this.value)"; -BICst.CUSTOM_FORMAT.THISPERCENTVALUEFORMAT = "(window.BH ? BH.contentFormat(this, '#0.00%') : this)"; -BICst.CUSTOM_FORMAT.NUMSEPARATORS = "(window.BH ? BH.contentFormat(this.value, '#,###.##') : this.value)"; -BICst.CUSTOM_FORMAT.PERCENTNUMSEPARATORS = "(window.BH ? BH.contentFormat(this.value, '#,##0%') : this.value)"; -BICst.CUSTOM_FORMAT.THISPERCENTNUMSEPARATORS = "(window.BH ? BH.contentFormat(this, '#,##0%') : this)"; -BICst.DEFAULT_FORMAT_FUNCTIONS = {}; -BICst.DEFAULT_FORMAT_FUNCTIONS.CONTENTFORMAT = "function(){return window.BH ? BH.contentFormat(arguments[0], '') : arguments[0]}"; -BICst.DEFAULT_FORMAT_FUNCTIONS.CONTENTFORMAT2DECIMAL = "function () {return window.BH ? BH.contentFormat(arguments[0], '#.##') : arguments[0]}"; -BICst.DEFAULT_FORMAT_FUNCTIONS.CONTENTFORMATPERCENTAGE = "function(){return window.BH ? BH.contentFormat(arguments[0], '#.##%') : arguments[0]}"; -BICst.LENEGD_DEFAULT_COLOR = {}; -BICst.LENEGD_DEFAULT_COLOR.COLOR_A = "#65B3EE"; -BICst.LENEGD_DEFAULT_COLOR.COLOR_B = "#95E1AA"; -BICst.LENEGD_DEFAULT_COLOR.COLOR_C = "#F8D08E"; -BICst.LENEGD_DEFAULT_COLOR.COLOR_D = "#e697c8"; -BICst.LENEGD_DEFAULT_COLOR.COLOR_E = "#a484b9"; -BICst.CHART_COLOR = {}; -BICst.CHART_COLOR.COLOR_A = "#5caae4"; -BICst.CHART_COLOR.COLOR_B = "#70cc7f"; -BICst.CHART_COLOR.COLOR_C = "#ebbb67"; -BICst.CHART_COLOR.COLOR_D = "#e97e7b"; -BICst.CHART_COLOR.COLOR_E = "#6ed3c9"; -BICst.DISPLAY_RULES = {}; -BICst.DISPLAY_RULES.DIMENSION = 1; -BICst.DISPLAY_RULES.FIXED = 2; -BICst.DISPLAY_RULES.GRADIENT = 3; -BICst.LINE_WIDTH = {}; -BICst.LINE_WIDTH.ZERO = 0; -BICst.LINE_WIDTH.ONE = 1; -BICst.POINTER = {}; -BICst.POINTER.ONE = 1; -BICst.POINTER.SOME = 2; -BICst.CHART_TARGET_STYLE = {}; -BICst.CHART_TARGET_STYLE.NUM_LEVEL = {}; -BICst.CHART_TARGET_STYLE.NUM_LEVEL.NORMAL = 1; -BICst.CHART_TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND = 2; -BICst.CHART_TARGET_STYLE.NUM_LEVEL.MILLION = 3; -BICst.CHART_TARGET_STYLE.NUM_LEVEL.YI = 4; -BICst.CHART_TARGET_STYLE.NUM_LEVEL.PERCENT = 5; -BICst.CHART_TARGET_STYLE.FORMAT = {}; -BICst.CHART_TARGET_STYLE.FORMAT.NORMAL = 1; -BICst.CHART_TARGET_STYLE.FORMAT.ZERO2POINT = 2; -BICst.CHART_TARGET_STYLE.FORMAT.ONE2POINT = 3; -BICst.CHART_TARGET_STYLE.FORMAT.TWO2POINT = 4; -BICst.DOT_VALUE_TYPE = {}; -BICst.DOT_VALUE_TYPE.SIZE = 1; -BICst.DOT_VALUE_TYPE.COLOR = 2; -BICst.ACCUMULATE_TYPE = {}; -BICst.ACCUMULATE_TYPE.COLUMN = 1; -BICst.ACCUMULATE_TYPE.STACKED_COLUMN = 2; -BICst.ACCUMULATE_TYPE.AREA_NORMAL = 3; -BICst.ACCUMULATE_TYPE.AREA_CURVE = 4; -BICst.ACCUMULATE_TYPE.AREA_RIGHT_ANGLE = 5; -BICst.ACCUMULATE_TYPE.STACKED_AREA_NORMAL = 6; -BICst.ACCUMULATE_TYPE.STACKED_AREA_CURVE = 7; -BICst.ACCUMULATE_TYPE.STACKED_AREA_RIGHT_ANGLE = 8; -BICst.ACCUMULATE_TYPE.LINE_NORMAL = 9; -BICst.ACCUMULATE_TYPE.LINE_CURVE = 10; -BICst.ACCUMULATE_TYPE.LINE_RIGHT_ANGLE = 11; -BICst.DATA_LABEL = {}; -BICst.DATA_LABEL.POSITION_INNER = 1; -BICst.DATA_LABEL.POSITION_OUTER = 2; -BICst.DATA_LABEL.POSITION_CENTER = 2; -BICst.DOT_STYLE = {}; -BICst.DOT_STYLE.SQUARE = 1; -BICst.DOT_STYLE.TRIANGLE = 2; -BICst.CHART_SHAPE = {}; -BICst.CHART_SHAPE.NORMAL = 1; -BICst.CHART_SHAPE.RIGHT_ANGLE = 2; -BICst.CHART_SHAPE.CURVE = 3; -BICst.CHART_SHAPE.EQUAL_ARC_ROSE = 4; -BICst.CHART_SHAPE.NOT_EQUAL_ARC_ROSE = 5; -BICst.CHART_SHAPE.CIRCLE = 6; -BICst.CHART_SHAPE.POLYGON = 7; -BICst.CHART_SHAPE.HALF_DASHBOARD = 9; -BICst.CHART_SHAPE.PERCENT_DASHBOARD = 10; -BICst.CHART_SHAPE.PERCENT_SCALE_SLOT = 11; -BICst.CHART_SHAPE.VERTICAL_TUBE = 12; -BICst.CHART_SHAPE.HORIZONTAL_TUBE = 13; -BICst.CHART_SHAPE.NO_PROJECTOR = 16; -BICst.CHART_SHAPE.PROJECTOR = 17; -BICst.DASHBOARD_CHART_STYLE_AUTO = {}; -BICst.DASHBOARD_CHART_STYLE_AUTO.THIRD = {}; -BICst.DASHBOARD_CHART_STYLE_AUTO.THIRD.FROM = 2; -BICst.DASHBOARD_CHART_STYLE_AUTO.THIRD.TO = 2; -BICst.DASHBOARD_CHART_STYLE_AUTO.THIRD.COLOR = ""; -BICst.DASHBOARD_CHART_STYLE_AUTO.SECOND = {}; -BICst.DASHBOARD_CHART_STYLE_AUTO.SECOND.FROM = 2; -BICst.DASHBOARD_CHART_STYLE_AUTO.SECOND.TO = 2; -BICst.DASHBOARD_CHART_STYLE_AUTO.SECOND.COLOR = ""; -BICst.DASHBOARD_CHART_STYLE_AUTO.FIRST = {}; -BICst.DASHBOARD_CHART_STYLE_AUTO.FIRST.FROM = 2; -BICst.DASHBOARD_CHART_STYLE_AUTO.FIRST.TO = 2; -BICst.DASHBOARD_CHART_STYLE_AUTO.FIRST.COLOR = ""; -BICst.PERCENTAGE = {}; -BICst.PERCENTAGE.SHOW = 1; -BICst.PERCENTAGE.NOT_SHOW = 2; -BICst.CHART_LEGENDS = {}; -BICst.CHART_LEGENDS.NOT_SHOW = 1; -BICst.CHART_LEGENDS.TOP = 2; -BICst.CHART_LEGENDS.RIGHT = 3; -BICst.CHART_LEGENDS.BOTTOM = 4; -BICst.CHART_LEGENDS.LEFT = 5; -BICst.FUNNEL_SLANT_STYLE = {}; -BICst.FUNNEL_SLANT_STYLE.SAME = 1; -BICst.FUNNEL_SLANT_STYLE.DIFF = 2; -BICst.MULTI_PIE_GRADIENT_STYLE = {}; -BICst.MULTI_PIE_GRADIENT_STYLE.LIGHTER = 1; -BICst.MULTI_PIE_GRADIENT_STYLE.DARKER = 2; -BICst.PIE_ANGLES = {}; -BICst.PIE_ANGLES.THREE_FOURTHS = 270; -BICst.PIE_ANGLES.HALF = 180; -BICst.PIE_ANGLES.TOTAL = 360; -BICst.GIS_POSITION_TYPE = {}; -BICst.GIS_POSITION_TYPE.ADDRESS = 1; -BICst.GIS_POSITION_TYPE.LNG_LAT = 2; -BICst.GIS_POSITION_TYPE.LNG_FIRST = 3; -BICst.GIS_POSITION_TYPE.LAT_FIRST = 4; -BICst.DATACOLUMN = {}; -BICst.DATACOLUMN.X = 96; -BICst.DATACOLUMN.Y = 112; -BICst.DATACOLUMN.Z = 128; -BICst.DATACOLUMN.XANDY = 144; -BICst.DATACOLUMN.XANDYANDSIZE = 160; -BICst.DATA_LABEL_STYLE_TYPE = {}; -BICst.DATA_LABEL_STYLE_TYPE.TEXT = 143; -BICst.DATA_LABEL_STYLE_TYPE.IMG = 144; -BICst.DATA_LABEL_RANGE = {}; -BICst.DATA_LABEL_RANGE.ALL = 140; -BICst.DATA_LABEL_RANGE.Classification = 141; -BICst.DATA_LABEL_RANGE.Series = 142; -BICst.SCALE_SETTING = {}; -BICst.SCALE_SETTING.AUTO = 1; -BICst.SCALE_SETTING.CUSTOM = 2; -BICst.CHART_STYLE = {}; -BICst.CHART_STYLE.STYLE_NORMAL = 1; -BICst.CHART_STYLE.STYLE_GRADUAL = 2; -BICst.FONT_STYLE = {}; -BICst.FONT_STYLE.FONTFAMILY = "inherit"; -BICst.FONT_STYLE.COLOR = "#808080"; -BICst.FONT_STYLE.FONTSIZE = "12px"; -BICst.AUTO = 1; -BICst.X_AXIS = 3; -BICst.NORMAL = 1; -BICst.POLYGON = 7; -BICst.NOT_SHOW = 2; -BICst.ONE2POINT = 3; -BICst.TWO2POINT = 4; -BICst.LEFT_AXIS = 0; -BICst.LNG_FIRST = 3; -BICst.LAT_FIRST = 4; -BICst.FIX_COUNT = 6; -BICst.ROTATION = -90; -BICst.RIGHT_AXIS = 1; -BICst.ZERO2POINT = 2; -BICst.NO_PROJECT = 16; -BICst.MINLIMIT = 1.0E-5; -BICst.ONE_POINTER = 1; -BICst.MULTI_POINTER = 2; -BICst.LEGEND_BOTTOM = 4; -BICst.STYLE_NORMAL = 21; -BICst.LEGEND_HEIGHT = 80; -BICst.LEGEND_WIDTH = "30.0%"; -BICst.HALF_DASHBOARD = 9; -BICst.VERTICAL_TUBE = 12; -BICst.DASHBOARD_AXIS = 4; -BICst.HORIZONTAL_TUBE = 13; -BICst.RIGHT_AXIS_SECOND = 2; -BICst.PERCENT_DASHBOARD = 10; -BICst.PERCENT_SCALE_SLOT = 11; -BICst.INTERVAL = 100; -BICst.GIS_MAP_PATH = "http://webrd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}"; -BICst.KNOWLEDGE_RIGHT = "© 2016 AutoNavi"; -BICst.NUM_SEPARATORS = false; -BICst.WMS_SERVER = "wms"; - -BICst.DATA_CONFIG_DESIGN = {}; -BICst.DATA_CONFIG_DESIGN.NO = 0; -BICst.DATA_CONFIG_DESIGN.YES = 1; -BICst.DATA_CONFIG_AUTHORITY = {}; -BICst.DATA_CONFIG_AUTHORITY.PACKAGE_MANAGER = {}; -BICst.DATA_CONFIG_AUTHORITY.PACKAGE_MANAGER.NODE = "__package_manager_node__"; -BICst.DATA_CONFIG_AUTHORITY.PACKAGE_MANAGER.PAGE = "__package_manager_page__"; -BICst.DATA_CONFIG_AUTHORITY.PACKAGE_MANAGER.SERVER_CONNECTION = "__package_server_connection__"; -BICst.DATA_CONFIG_AUTHORITY.PACKAGE_MANAGER.DATA_CONNECTION = "__package_data_connection__"; -BICst.DATA_CONFIG_AUTHORITY.DATA_CONNECTION = {}; -BICst.DATA_CONFIG_AUTHORITY.DATA_CONNECTION.NODE = "__data_connection_node__"; -BICst.DATA_CONFIG_AUTHORITY.DATA_CONNECTION.PAGE = "__data_connection_page__"; -BICst.DATA_CONFIG_AUTHORITY.MULTI_PATH_SETTING = "__multi_path_setting__"; -BICst.DATA_CONFIG_AUTHORITY.PACKAGE_AUTHORITY = "__package_authority__"; -BICst.DATA_CONFIG_AUTHORITY.FINE_INDEX_UPDATE = "__fine_index_update__"; -BICst.GLOBAL_UPDATE_TYPE = {}; -BICst.GLOBAL_UPDATE_TYPE.PART_UPDATE = "_part_update_"; -BICst.GLOBAL_UPDATE_TYPE.COMPLETE_UPDATE = "_complete_update_"; -BICst.GLOBAL_UPDATE_TYPE.META_UPDATE = "_meta_update_"; -BICst.CUBE_UPDATE_TYPE = {}; -BICst.CUBE_UPDATE_TYPE.GLOBAL_UPDATE = "__global_update__"; -BICst.CUBE_UPDATE_TYPE.SINGLETABLE_UPDATE = "__singleTable_update__"; -BICst.SINGLE_TABLE_UPDATE = {}; -BICst.SINGLE_TABLE_UPDATE.TOGETHER = 0; -BICst.SINGLE_TABLE_UPDATE.NEVER = 1; -BICst.SINGLE_TABLE_UPDATE_TYPE = {}; -BICst.SINGLE_TABLE_UPDATE_TYPE.ALL = 0; -BICst.SINGLE_TABLE_UPDATE_TYPE.PART = 1; -BICst.SINGLE_TABLE_UPDATE_TYPE.NEVER = 2; -BICst.UPDATE_FREQUENCY = {}; -BICst.UPDATE_FREQUENCY.EVER_DAY = 0; -BICst.UPDATE_FREQUENCY.EVER_SUNDAY = 1; -BICst.UPDATE_FREQUENCY.EVER_MONDAY = 2; -BICst.UPDATE_FREQUENCY.EVER_TUESDAY = 3; -BICst.UPDATE_FREQUENCY.EVER_WEDNESDAY = 4; -BICst.UPDATE_FREQUENCY.EVER_THURSDAY = 5; -BICst.UPDATE_FREQUENCY.EVER_FRIDAY = 6; -BICst.UPDATE_FREQUENCY.EVER_SATURDAY = 7; -BICst.UPDATE_FREQUENCY.EVER_MONTH = 10; -BICst.REQ_DATA_TYPE = {}; -BICst.REQ_DATA_TYPE.REQ_GET_ALL_DATA = -1; -BICst.REQ_DATA_TYPE.REQ_GET_DATA_LENGTH = 0; -BICst.TRANS_TYPE = {}; -BICst.TRANS_TYPE.READ_FROM_DB = "db"; -BICst.TRANS_TYPE.READ_FROM_TABLEDATA = "tabledata"; -BICst.TRANS_TYPE.CHOOSE = "choose"; -BICst.CONNECTION = {}; -BICst.CONNECTION.ETL_CONNECTION = "__FR_BI_ETL__"; -BICst.CONNECTION.SERVER_CONNECTION = "__FR_BI_SERVER__"; -BICst.CONNECTION.SQL_CONNECTION = "__FR_BI_SQL__"; -BICst.CONNECTION.EXCEL_CONNECTION = "__FR_BI_EXCEL__"; -BICst.COLUMN = {}; -BICst.COLUMN.NUMBER = 32; -BICst.COLUMN.STRING = 16; -BICst.COLUMN.DATE = 48; -BICst.COLUMN.COUNTER = 64; -BICst.COLUMN.ROW = 80; -BICst.CLASS = {}; -BICst.CLASS.INTEGER = 0; -BICst.CLASS.LONG = 1; -BICst.CLASS.DOUBLE = 2; -BICst.CLASS.FLOAT = 3; -BICst.CLASS.DATE = 4; -BICst.CLASS.STRING = 5; -BICst.CLASS.BOOLEAN = 6; -BICst.CLASS.TIMESTAMP = 7; -BICst.CLASS.DECIMAL = 8; -BICst.CLASS.TIME = 9; -BICst.CLASS.BYTE = 10; -BICst.CLASS.ROW = 16; -BICst.SYSTEM_USER_NAME = "__system_user_name__"; -BICst.LAST_UPDATE_TIME = "__last_update_time__"; -BICst.CURRENT_UPDATE_TIME = "__current_update_time__"; - -BICst.FUNCTION = {}; -BICst.FUNCTION.TEXT = 1; -BICst.FUNCTION.MATH = 2; -BICst.FUNCTION.DATE = 3; -BICst.FUNCTION.ARRAY = 4; -BICst.FUNCTION.LOGIC = 5; -BICst.FUNCTION.OTHER = 6; - diff --git a/dist/bundle.css b/dist/bundle.css index 29483fb23..93d69e840 100644 --- a/dist/bundle.css +++ b/dist/bundle.css @@ -2387,6 +2387,13 @@ li.CodeMirror-hint-active { border: none; color: #e85050 !important; } +.bi-label { + text-overflow: ellipsis; + overflow-x: hidden; + overflow-y: hidden; + white-space: nowrap; + word-break: break-all; +} /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ .bi-text { @@ -2402,6 +2409,7 @@ li.CodeMirror-hint-active { /*IE8*/ box-sizing: border-box; /*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ + word-wrap: break-word; word-break: break-word; } .bi-bubble { @@ -3202,7 +3210,7 @@ li.CodeMirror-hint-active { /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ .bi-single-slider-slider .slider-button { - cursor: url('${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/cursor/cursor_drag_slider.cur'), auto; + cursor: url('images/1x/cursor/cursor_drag_slider.cur'), auto; -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); diff --git a/dist/bundle.js b/dist/bundle.js index e05c32243..2823e14c5 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -23744,6 +23744,14 @@ Date.prototype.getMonthDays = function (month) { } }; +/** + * 获取每月的最后一天 + * @returns {Date} + */ +Date.prototype.getLastDateOfMonth = function () { + return new Date(this.getFullYear(), this.getMonth(), this.getMonthDays()); +}; + /** Returns the number of day in the year. */ Date.prototype.getDayOfYear = function () { var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0); @@ -76852,6 +76860,81 @@ BI.IconTrigger = BI.inherit(BI.Trigger, { } }); BI.shortcut('bi.icon_trigger', BI.IconTrigger);/** + * 文字trigger + * + * Created by GUY on 2015/9/15. + * @class BI.IconTextTrigger + * @extends BI.Trigger + */ +BI.IconTextTrigger = BI.inherit(BI.Trigger, { + _const: { + hgap: 4, + triggerWidth: 30 + }, + + _defaultConfig: function () { + var conf = BI.IconTextTrigger.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-text-trigger", + height: 30 + }); + }, + + _init: function () { + BI.IconTextTrigger.superclass._init.apply(this, arguments); + var self = this, o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + textAlign: "left", + height: o.height, + text: o.text, + hgap: c.hgap + }); + this.trigerButton = BI.createWidget({ + type: "bi.trigger_icon_button", + cls: "bi-border-left", + width: c.triggerWidth + }); + + BI.createWidget({ + element: this, + type: 'bi.htape', + items: [{ + el: { + type: "bi.icon_change_button", + cls: "icon-combo-trigger-icon " + o.iconClass, + ref: function (_ref) { + self.icon = _ref; + }, + disableSelected: true + }, + width: 24 + }, + { + el: this.text + }, { + el: this.trigerButton, + width: c.triggerWidth + } + ] + }); + }, + + setValue: function (value) { + this.text.setValue(value); + this.text.setTitle(value); + }, + + setIcon: function (iconCls) { + this.icon.setIcon(iconCls); + }, + + setText: function (text) { + this.text.setText(text); + this.text.setTitle(text); + } +}); +BI.shortcut("bi.icon_text_trigger", BI.IconTextTrigger);/** * 文字trigger * * Created by GUY on 2015/9/15. @@ -82572,7 +82655,8 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, { validationChecker: function () {return true;}, valueFormatter: function (v) {return v;}, value: 0, - errorText: "" + errorText: "", + step: 1 }) }, @@ -82599,7 +82683,7 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, { cls: "column-pre-page-h-font top-button bi-border-left bi-border-bottom" }); this.topBtn.on(BI.IconButton.EVENT_CHANGE, function(){ - self._finetuning(1); + self._finetuning(o.step); self.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE); self.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM); }); @@ -82609,7 +82693,7 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, { cls: "column-next-page-h-font bottom-button bi-border-left bi-border-top" }); this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function(){ - self._finetuning(-1); + self._finetuning(-o.step); self.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE); self.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM); }); @@ -83645,39 +83729,39 @@ BI.MultiDateCard = BI.inherit(BI.Widget, { var valueObject = this.getValue(); var type = valueObject.type, value = valueObject.value; switch (type) { - case BICst.DATE_TYPE.MULTI_DATE_DAY_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV: return new Date().getOffsetDate(-1 * value); - case BICst.DATE_TYPE.MULTI_DATE_DAY_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER: return new Date().getOffsetDate(value); - case BICst.DATE_TYPE.MULTI_DATE_DAY_TODAY: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY: return new Date(); - case BICst.DATE_TYPE.MULTI_DATE_MONTH_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV: return new Date().getBeforeMultiMonth(value); - case BICst.DATE_TYPE.MULTI_DATE_MONTH_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER: return new Date().getAfterMultiMonth(value); - case BICst.DATE_TYPE.MULTI_DATE_MONTH_BEGIN: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN: return new Date(new Date().getFullYear(), new Date().getMonth(), 1); - case BICst.DATE_TYPE.MULTI_DATE_MONTH_END: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END: return new Date(new Date().getFullYear(), new Date().getMonth(), (new Date().getLastDateOfMonth()).getDate()); - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV: return new Date().getBeforeMulQuarter(value); - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER: return new Date().getAfterMulQuarter(value); - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN: return new Date().getQuarterStartDate(); - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_END: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END: return new Date().getQuarterEndDate(); - case BICst.DATE_TYPE.MULTI_DATE_WEEK_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV: return new Date().getOffsetDate(-7 * value); - case BICst.DATE_TYPE.MULTI_DATE_WEEK_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER: return new Date().getOffsetDate(7 * value); - case BICst.DATE_TYPE.MULTI_DATE_YEAR_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV: return new Date((new Date().getFullYear() - 1 * value), new Date().getMonth(), new Date().getDate()); - case BICst.DATE_TYPE.MULTI_DATE_YEAR_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER: return new Date((new Date().getFullYear() + 1 * value), new Date().getMonth(), new Date().getDate()); - case BICst.DATE_TYPE.MULTI_DATE_YEAR_BEGIN: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN: return new Date(new Date().getFullYear(), 0, 1); - case BICst.DATE_TYPE.MULTI_DATE_YEAR_END: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END: return new Date(new Date().getFullYear(), 11, 31); } } @@ -83868,23 +83952,23 @@ BI.MultiDateCombo = BI.inherit(BI.Single, { type = v.type } switch (type) { - case BICst.DATE_TYPE.MULTI_DATE_YEAR_PREV: - case BICst.DATE_TYPE.MULTI_DATE_YEAR_AFTER: - case BICst.DATE_TYPE.MULTI_DATE_YEAR_BEGIN: - case BICst.DATE_TYPE.MULTI_DATE_YEAR_END: - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_PREV: - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_AFTER: - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN: - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_END: - case BICst.DATE_TYPE.MULTI_DATE_MONTH_PREV: - case BICst.DATE_TYPE.MULTI_DATE_MONTH_AFTER: - case BICst.DATE_TYPE.MULTI_DATE_MONTH_BEGIN: - case BICst.DATE_TYPE.MULTI_DATE_MONTH_END: - case BICst.DATE_TYPE.MULTI_DATE_WEEK_PREV: - case BICst.DATE_TYPE.MULTI_DATE_WEEK_AFTER: - case BICst.DATE_TYPE.MULTI_DATE_DAY_PREV: - case BICst.DATE_TYPE.MULTI_DATE_DAY_AFTER: - case BICst.DATE_TYPE.MULTI_DATE_DAY_TODAY: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY: this.changeIcon.setVisible(true); this.comboWrapper.attr("items")[1].width = 30; this.comboWrapper.resize(); @@ -83930,6 +84014,39 @@ BI.extend(BI.MultiDateCombo, { MULTI_DATE_WEEK_CARD: 5, MULTI_DATE_DAY_CARD: 6 }); + +BI.extend(BI.MultiDateCombo, { + DATE_TYPE: { + MULTI_DATE_YEAR_PREV: 1, + MULTI_DATE_YEAR_AFTER: 2, + MULTI_DATE_YEAR_BEGIN: 3, + MULTI_DATE_YEAR_END: 4, + MULTI_DATE_MONTH_PREV: 5, + MULTI_DATE_MONTH_AFTER: 6, + MULTI_DATE_MONTH_BEGIN: 7, + MULTI_DATE_MONTH_END: 8, + MULTI_DATE_QUARTER_PREV: 9, + MULTI_DATE_QUARTER_AFTER: 10, + MULTI_DATE_QUARTER_BEGIN: 11, + MULTI_DATE_QUARTER_END: 12, + MULTI_DATE_WEEK_PREV: 13, + MULTI_DATE_WEEK_AFTER: 14, + MULTI_DATE_DAY_PREV: 15, + MULTI_DATE_DAY_AFTER: 16, + MULTI_DATE_DAY_TODAY: 17, + MULTI_DATE_PARAM: 18, + MULTI_DATE_CALENDAR: 19, + YEAR_QUARTER: 20, + YEAR_MONTH: 21, + YEAR_WEEK: 22, + YEAR_DAY: 23, + MONTH_WEEK: 24, + MONTH_DAY: 25, + YEAR: 26, + SAME_PERIOD: 27, + LAST_SAME_PERIOD: 28 + } +}); /** * 普通控件 * @@ -83953,22 +84070,22 @@ BI.DayCard = BI.inherit(BI.MultiDateCard, { isEditorExist: true, selected: true, text: BI.i18nText("BI-Multi_Date_Day_Prev"), - value: BICst.DATE_TYPE.MULTI_DATE_DAY_PREV + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV }, { isEditorExist: true, text: BI.i18nText("BI-Multi_Date_Day_Next"), - value: BICst.DATE_TYPE.MULTI_DATE_DAY_AFTER + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER }, { isEditorExist: false, - value: BICst.DATE_TYPE.MULTI_DATE_DAY_TODAY, + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY, text: BI.i18nText("BI-Multi_Date_Today") }]; }, defaultSelectedItem: function () { - return BICst.DATE_TYPE.MULTI_DATE_DAY_PREV + return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV } }); BI.DayCard.EVENT_CHANGE = "EVENT_CHANGE"; @@ -83994,28 +84111,28 @@ BI.MonthCard = BI.inherit(BI.MultiDateCard, { return [{ selected: true, isEditorExist: true, - value: BICst.DATE_TYPE.MULTI_DATE_MONTH_PREV, + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV, text: BI.i18nText("BI-Multi_Date_Month_Prev") }, { isEditorExist: true, - value: BICst.DATE_TYPE.MULTI_DATE_MONTH_AFTER, + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER, text: BI.i18nText("BI-Multi_Date_Month_Next") }, { - value: BICst.DATE_TYPE.MULTI_DATE_MONTH_BEGIN, + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN, isEditorExist: false, text: BI.i18nText("BI-Multi_Date_Month_Begin") }, { - value: BICst.DATE_TYPE.MULTI_DATE_MONTH_END, + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END, isEditorExist: false, text: BI.i18nText("BI-Multi_Date_Month_End") }]; }, defaultSelectedItem: function () { - return BICst.DATE_TYPE.MULTI_DATE_MONTH_PREV; + return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV; } }); BI.MonthCard.EVENT_CHANGE = "EVENT_CHANGE"; @@ -84241,52 +84358,52 @@ BI.MultiDatePopup = BI.inherit(BI.Widget, { var self = this, date; var type, value; if (BI.isNotNull(v)) { - type = v.type || BICst.DATE_TYPE.MULTI_DATE_CALENDAR; + type = v.type || BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_CALENDAR; value = v.value; if (BI.isNull(value)) { value = v; } } switch (type) { - case BICst.DATE_TYPE.MULTI_DATE_YEAR_PREV: - case BICst.DATE_TYPE.MULTI_DATE_YEAR_AFTER: - case BICst.DATE_TYPE.MULTI_DATE_YEAR_BEGIN: - case BICst.DATE_TYPE.MULTI_DATE_YEAR_END: - this.dateTab.setSelect(BICst.MULTI_DATE_YEAR_CARD); + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END: + this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YEAR_CARD); this.year.setValue({type: type, value: value}); - this.cur = BICst.MULTI_DATE_YEAR_CARD; + this.cur = BI.MultiDateCombo.MULTI_DATE_YEAR_CARD; self._setInnerValue(this.year); break; - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_PREV: - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_AFTER: - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN: - case BICst.DATE_TYPE.MULTI_DATE_QUARTER_END: - this.dateTab.setSelect(BICst.MULTI_DATE_QUARTER_CARD); - this.cur = BICst.MULTI_DATE_QUARTER_CARD; + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END: + this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD); + this.cur = BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD; this.quarter.setValue({type: type, value: value}); self._setInnerValue(this.quarter); break; - case BICst.DATE_TYPE.MULTI_DATE_MONTH_PREV: - case BICst.DATE_TYPE.MULTI_DATE_MONTH_AFTER: - case BICst.DATE_TYPE.MULTI_DATE_MONTH_BEGIN: - case BICst.DATE_TYPE.MULTI_DATE_MONTH_END: - this.dateTab.setSelect(BICst.MULTI_DATE_MONTH_CARD); - this.cur = BICst.MULTI_DATE_MONTH_CARD; + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END: + this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_MONTH_CARD); + this.cur = BI.MultiDateCombo.MULTI_DATE_MONTH_CARD; this.month.setValue({type: type, value: value}); self._setInnerValue(this.month); break; - case BICst.DATE_TYPE.MULTI_DATE_WEEK_PREV: - case BICst.DATE_TYPE.MULTI_DATE_WEEK_AFTER: - this.dateTab.setSelect(BICst.MULTI_DATE_WEEK_CARD); - this.cur = BICst.MULTI_DATE_WEEK_CARD; + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER: + this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_WEEK_CARD); + this.cur = BI.MultiDateCombo.MULTI_DATE_WEEK_CARD; this.week.setValue({type: type, value: value}); self._setInnerValue(this.week); break; - case BICst.DATE_TYPE.MULTI_DATE_DAY_PREV: - case BICst.DATE_TYPE.MULTI_DATE_DAY_AFTER: - case BICst.DATE_TYPE.MULTI_DATE_DAY_TODAY: - this.dateTab.setSelect(BICst.MULTI_DATE_DAY_CARD); - this.cur = BICst.MULTI_DATE_DAY_CARD; + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER: + case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY: + this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_DAY_CARD); + this.cur = BI.MultiDateCombo.MULTI_DATE_DAY_CARD; this.day.setValue({type: type, value: value}); self._setInnerValue(this.day); break; @@ -84353,29 +84470,29 @@ BI.QuarterCard = BI.inherit(BI.MultiDateCard, { dateConfig: function () { return [{ selected: true, - value: BICst.DATE_TYPE.MULTI_DATE_QUARTER_PREV, + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV, isEditorExist: true, text: BI.i18nText("BI-Multi_Date_Quarter_Prev") }, { - value: BICst.DATE_TYPE.MULTI_DATE_QUARTER_AFTER, + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER, isEditorExist: true, text: BI.i18nText("BI-Multi_Date_Quarter_Next") }, { - value: BICst.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN, + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN, isEditorExist: false, text: BI.i18nText("BI-Multi_Date_Quarter_Begin") }, { - value: BICst.DATE_TYPE.MULTI_DATE_QUARTER_END, + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END, isEditorExist: false, text: BI.i18nText("BI-Multi_Date_Quarter_End") }] }, defaultSelectedItem: function () { - return BICst.DATE_TYPE.MULTI_DATE_QUARTER_PREV; + return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV; } }); BI.QuarterCard.EVENT_CHANGE = "EVENT_CHANGE"; @@ -84528,17 +84645,17 @@ BI.WeekCard = BI.inherit(BI.MultiDateCard, { selected: true, isEditorExist: true, text: BI.i18nText("BI-Multi_Date_Week_Prev"), - value: BICst.DATE_TYPE.MULTI_DATE_WEEK_PREV + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV }, { isEditorExist: true, text: BI.i18nText("BI-Multi_Date_Week_Next"), - value: BICst.DATE_TYPE.MULTI_DATE_WEEK_AFTER + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER }]; }, defaultSelectedItem: function () { - return BICst.DATE_TYPE.MULTI_DATE_WEEK_PREV; + return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV; } }); BI.WeekCard.EVENT_CHANGE = "EVENT_CHANGE"; @@ -84565,27 +84682,27 @@ BI.YearCard = BI.inherit(BI.MultiDateCard, { selected: true, isEditorExist: true, text: BI.i18nText("BI-Multi_Date_Year_Prev"), - value: BICst.DATE_TYPE.MULTI_DATE_YEAR_PREV + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV }, { isEditorExist: true, text: BI.i18nText("BI-Multi_Date_Year_Next"), - value: BICst.DATE_TYPE.MULTI_DATE_YEAR_AFTER + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER }, { isEditorExist: false, - value: BICst.DATE_TYPE.MULTI_DATE_YEAR_BEGIN, + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN, text: BI.i18nText("BI-Multi_Date_Year_Begin") }, { isEditorExist: false, - value: BICst.DATE_TYPE.MULTI_DATE_YEAR_END, + value: BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END, text: BI.i18nText("BI-Multi_Date_Year_End") }] }, defaultSelectedItem: function () { - return BICst.DATE_TYPE.MULTI_DATE_YEAR_PREV; + return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV; } }); BI.YearCard.EVENT_CHANGE = "EVENT_CHANGE"; diff --git a/dist/bundle.min.css b/dist/bundle.min.css index 6e3bf8c62..7a397accf 100644 --- a/dist/bundle.min.css +++ b/dist/bundle.min.css @@ -1 +1 @@ -/*! normalize.css v1.0.0 | MIT License | git.io/normalize */dl,h3,menu,ol,p,pre,ul{margin:1em 0}.b-font,i{-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.bi-button,.horizon-center{text-align:center}.bi-text,.overflow-dot{text-overflow:ellipsis}.bi-excel-table-header-cell,.bi-preview-table-header-cell,.cm-header,.cm-strong,b,strong{font-weight:700}.b-font,body,i{-moz-osx-font-smoothing:grayscale}.CodeMirror-code,.CodeMirror-scroll,.bi-input,a,a:active,a:focus,a:hover,input,textarea{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.75em;margin:2.33em 0}abbr[title]{border-bottom:1px dotted}blockquote{margin:1em 40px}dfn{font-style:italic}mark{background:#ff0;color:#000}.base-disabled,.base-disabled .b-font:before,.base-disabled .bi-input,.base-disabled .bi-textarea{color:#ccc!important}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}small,sub,sup{font-size:75%}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:after,q:before{content:'';content:none}sub,sup{line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ol,nav ul{list-style:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure,form{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline}button,input{line-height:normal}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],input[disabled]{cursor:default}.base-disabled,.base-invalid{cursor:default!important}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.bi-collection-table-cell,.bi-text,.border-sizing{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}*,a,body,div,html,img,li,ol,p,span,ul{margin:0;padding:0}a{text-decoration:none}input,textarea{margin:0;padding:0;border:1px solid #d4dadd}.bi-theme-dark input,.bi-theme-dark textarea{border:1px solid #525466}ul{list-style:disc}li{list-style-type:none}i{font-style:normal;-webkit-font-smoothing:antialiased}.bi-theme-dark .base-disabled,.bi-theme-dark .base-disabled .b-font:before,.bi-theme-dark .base-disabled .bi-input,.bi-theme-dark .base-disabled .bi-textarea{color:#666!important}.clearfix:after,.clearfix:before{content:" ";display:table;line-height:0}.clearfix:after{clear:both}.bi-background{background-color:#eff1f4;color:#666}.bi-background .bi-input,.bi-background .bi-textarea{color:#666}.bi-theme-dark .bi-background{background-color:#191b2b;color:#ccc}.bi-theme-dark .bi-background .bi-input,.bi-theme-dark .bi-background .bi-textarea{color:#ccc}.bi-card,.bi-card .bi-input,.bi-card .bi-textarea{color:#666}.bi-card{background-color:#fff}.bi-theme-dark .bi-card{background-color:#242640;color:#ccc}.bi-disabled,.bi-disabled .bi-input,.bi-disabled .bi-textarea,.bi-theme-dark .bi-card .bi-input,.bi-theme-dark .bi-card .bi-textarea{color:#ccc}.bi-theme-dark .bi-disabled,.bi-theme-dark .bi-disabled .bi-input,.bi-theme-dark .bi-disabled .bi-textarea{color:#666}.bi-tips,.bi-tips .bi-input,.bi-tips .bi-textarea{color:#999}.bi-border{border:1px solid #d4dadd}.bi-theme-dark .bi-border{border:1px solid #525466}.bi-border-left{border-left:1px solid #d4dadd}.bi-theme-dark .bi-border-left{border-left:1px solid #525466}.bi-border-right{border-right:1px solid #d4dadd}.bi-theme-dark .bi-border-right{border-right:1px solid #525466}.bi-border-top{border-top:1px solid #d4dadd}.bi-theme-dark .bi-border-top{border-top:1px solid #525466}.bi-border-bottom{border-bottom:1px solid #d4dadd}.bi-theme-dark .bi-border-bottom{border-bottom:1px solid #525466}.bi-keyword-red-mark,.bi-keyword-red-mark .bi-input,.bi-keyword-red-mark .bi-textarea{color:#f07d0a}.bi-high-light,.bi-high-light .bi-input,.bi-high-light .bi-textarea{color:#3f8ce8}.bi-high-light-background{background-color:#3f8ce8;color:#fff}.bi-high-light-background .bi-input,.bi-high-light-background .bi-textarea{color:#fff}.bi-high-light-border{border-color:#178cdf}.bi-water-mark{color:#ccc;cursor:text}.bi-water-mark .bi-input,.bi-water-mark .bi-textarea{color:#ccc}.bi-theme-dark .bi-water-mark,.bi-theme-dark .bi-water-mark .bi-input,.bi-theme-dark .bi-water-mark .bi-textarea{color:#666}.bi-mask,.bi-mask .bi-input,.bi-mask .bi-textarea{color:#fff}.bi-resizer{background:#1a1a1a;opacity:.2;filter:alpha(opacity=20);z-index:1000000000!important}.bi-theme-dark .bi-resizer{background:#fff}.bi-mask{background-color:rgba(26,26,26,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#331a1a1a, endColorstr=#331a1a1a)}.bi-theme-dark .bi-mask{color:#242640;background-color:rgba(255,255,255,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#33ffffff, endColorstr=#33ffffff)}.bi-theme-dark .bi-mask .bi-input,.bi-theme-dark .bi-mask .bi-textarea{color:#242640}.bi-z-index-mask{color:#fff;background-color:rgba(26,26,26,.5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#801a1a1a, endColorstr=#801a1a1a)}.bi-z-index-mask .bi-input,.bi-z-index-mask .bi-textarea{color:#fff}.bi-list-item.hover,.bi-list-item:hover{color:#1a1a1a;background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-list-item.hover .bi-input,.bi-list-item.hover .bi-textarea,.bi-list-item:hover .bi-input,.bi-list-item:hover .bi-textarea{color:#1a1a1a}.bi-list-item.disabled,.bi-list-item.disabled:active,.bi-list-item.disabled:hover{background-color:transparent!important;color:#ccc!important}.bi-list-item.disabled .bi-high-light,.bi-list-item.disabled .bi-input,.bi-list-item.disabled .bi-textarea,.bi-list-item.disabled:active .bi-high-light,.bi-list-item.disabled:active .bi-input,.bi-list-item.disabled:active .bi-textarea,.bi-list-item.disabled:hover .bi-high-light,.bi-list-item.disabled:hover .bi-input,.bi-list-item.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item.hover,.bi-theme-dark .bi-list-item:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item.hover .bi-input,.bi-theme-dark .bi-list-item.hover .bi-textarea,.bi-theme-dark .bi-list-item:hover .bi-input,.bi-theme-dark .bi-list-item:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item.disabled,.bi-theme-dark .bi-list-item.disabled:active,.bi-theme-dark .bi-list-item.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item.disabled .bi-high-light,.bi-theme-dark .bi-list-item.disabled .bi-input,.bi-theme-dark .bi-list-item.disabled .bi-textarea,.bi-theme-dark .bi-list-item.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item.disabled:active .bi-input,.bi-theme-dark .bi-list-item.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item.disabled:hover .bi-input,.bi-theme-dark .bi-list-item.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-border.active,.bi-list-item-border:active{border:1px solid #178cdf}.bi-list-item-simple,.bi-list-item-simple .bi-input,.bi-list-item-simple .bi-textarea{color:#999}.bi-list-item-simple.hover,.bi-list-item-simple.hover .bi-input,.bi-list-item-simple.hover .bi-textarea,.bi-list-item-simple:hover,.bi-list-item-simple:hover .bi-input,.bi-list-item-simple:hover .bi-textarea{color:#3f8ce8}.bi-list-item-simple.disabled,.bi-list-item-simple.disabled .bi-high-light,.bi-list-item-simple.disabled .bi-input,.bi-list-item-simple.disabled .bi-textarea,.bi-list-item-simple.disabled:active,.bi-list-item-simple.disabled:active .bi-high-light,.bi-list-item-simple.disabled:active .bi-input,.bi-list-item-simple.disabled:active .bi-textarea,.bi-list-item-simple.disabled:hover,.bi-list-item-simple.disabled:hover .bi-high-light,.bi-list-item-simple.disabled:hover .bi-input,.bi-list-item-simple.disabled:hover .bi-textarea{color:#ccc!important}.bi-list-item-effect:hover,.bi-list-item-effect:hover .bi-input,.bi-list-item-effect:hover .bi-textarea{color:#1a1a1a}.bi-list-item-effect.active,.bi-list-item-effect.active .bi-input,.bi-list-item-effect.active .bi-textarea,.bi-list-item-effect:active,.bi-list-item-effect:active .bi-input,.bi-list-item-effect:active .bi-textarea{color:#3f8ce8}.bi-list-item-effect.disabled,.bi-list-item-effect.disabled .bi-high-light,.bi-list-item-effect.disabled .bi-input,.bi-list-item-effect.disabled .bi-textarea,.bi-list-item-effect.disabled:active,.bi-list-item-effect.disabled:active .bi-high-light,.bi-list-item-effect.disabled:active .bi-input,.bi-list-item-effect.disabled:active .bi-textarea,.bi-list-item-effect.disabled:hover,.bi-list-item-effect.disabled:hover .bi-high-light,.bi-list-item-effect.disabled:hover .bi-input,.bi-list-item-effect.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-effect:hover,.bi-theme-dark .bi-list-item-effect:hover .bi-input,.bi-theme-dark .bi-list-item-effect:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-effect.active,.bi-theme-dark .bi-list-item-effect.active .bi-input,.bi-theme-dark .bi-list-item-effect.active .bi-textarea,.bi-theme-dark .bi-list-item-effect:active,.bi-theme-dark .bi-list-item-effect:active .bi-input,.bi-theme-dark .bi-list-item-effect:active .bi-textarea{color:#3f8ce8}.bi-theme-dark .bi-list-item-effect.disabled,.bi-theme-dark .bi-list-item-effect.disabled:active,.bi-theme-dark .bi-list-item-effect.disabled:hover{background-color:transparent!important;color:#666!important}.bi-list-item-active.active,.bi-list-item-active.hover,.bi-list-item-active:active,.bi-list-item-active:hover{background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-theme-dark .bi-list-item-effect.disabled .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled .bi-input,.bi-theme-dark .bi-list-item-effect.disabled .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active.hover,.bi-list-item-active.hover .bi-input,.bi-list-item-active.hover .bi-textarea,.bi-list-item-active:hover,.bi-list-item-active:hover .bi-input,.bi-list-item-active:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active.active,.bi-list-item-active.active .bi-input,.bi-list-item-active.active .bi-textarea,.bi-list-item-active:active,.bi-list-item-active:active .bi-input,.bi-list-item-active:active .bi-textarea{color:#3f8ce8}.bi-list-item-active.disabled,.bi-list-item-active.disabled:active,.bi-list-item-active.disabled:hover{background-color:transparent!important;color:#ccc!important}.bi-list-item-active.disabled .bi-high-light,.bi-list-item-active.disabled .bi-input,.bi-list-item-active.disabled .bi-textarea,.bi-list-item-active.disabled:active .bi-high-light,.bi-list-item-active.disabled:active .bi-input,.bi-list-item-active.disabled:active .bi-textarea,.bi-list-item-active.disabled:hover .bi-high-light,.bi-list-item-active.disabled:hover .bi-input,.bi-list-item-active.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-active.hover,.bi-theme-dark .bi-list-item-active:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.hover .bi-input,.bi-theme-dark .bi-list-item-active.hover .bi-textarea,.bi-theme-dark .bi-list-item-active:hover .bi-input,.bi-theme-dark .bi-list-item-active:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active.active,.bi-theme-dark .bi-list-item-active:active{color:#3f8ce8;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.active .bi-input,.bi-theme-dark .bi-list-item-active.active .bi-textarea,.bi-theme-dark .bi-list-item-active:active .bi-input,.bi-theme-dark .bi-list-item-active:active .bi-textarea{color:#3f8ce8}.bi-theme-dark .bi-list-item-active.disabled,.bi-theme-dark .bi-list-item-active.disabled:active,.bi-theme-dark .bi-list-item-active.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled .bi-input,.bi-theme-dark .bi-list-item-active.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active2.hover,.bi-list-item-active2:hover{color:#1a1a1a;background-color:#fff}.bi-list-item-active2.hover .bi-input,.bi-list-item-active2.hover .bi-textarea,.bi-list-item-active2:hover .bi-input,.bi-list-item-active2:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active2.active,.bi-list-item-active2:active{color:#3f8ce8;background-color:#fff}.bi-list-item-active2.active .bi-input,.bi-list-item-active2.active .bi-textarea,.bi-list-item-active2:active .bi-input,.bi-list-item-active2:active .bi-textarea{color:#3f8ce8}.bi-list-item-active2.disabled,.bi-list-item-active2.disabled:active,.bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#ccc!important}.bi-list-item-active2.disabled .bi-high-light,.bi-list-item-active2.disabled .bi-input,.bi-list-item-active2.disabled .bi-textarea,.bi-list-item-active2.disabled:active .bi-high-light,.bi-list-item-active2.disabled:active .bi-input,.bi-list-item-active2.disabled:active .bi-textarea,.bi-list-item-active2.disabled:hover .bi-high-light,.bi-list-item-active2.disabled:hover .bi-input,.bi-list-item-active2.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-active2.hover,.bi-theme-dark .bi-list-item-active2:hover{color:#fff;background-color:#242640}.bi-theme-dark .bi-list-item-active2.hover .bi-input,.bi-theme-dark .bi-list-item-active2.hover .bi-textarea,.bi-theme-dark .bi-list-item-active2:hover .bi-input,.bi-theme-dark .bi-list-item-active2:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active2.active,.bi-theme-dark .bi-list-item-active2:active{color:#3f8ce8;background-color:#242640}.bi-theme-dark .bi-list-item-active2.active .bi-input,.bi-theme-dark .bi-list-item-active2.active .bi-textarea,.bi-theme-dark .bi-list-item-active2:active .bi-input,.bi-theme-dark .bi-list-item-active2:active .bi-textarea{color:#3f8ce8}.bi-theme-dark .bi-list-item-active2.disabled,.bi-theme-dark .bi-list-item-active2.disabled:active,.bi-theme-dark .bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active2.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled .bi-input,.bi-theme-dark .bi-list-item-active2.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-select.hover,.bi-list-item-select:hover{color:#1a1a1a;background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-list-item-select.hover .bi-input,.bi-list-item-select.hover .bi-textarea,.bi-list-item-select:hover .bi-input,.bi-list-item-select:hover .bi-textarea{color:#1a1a1a}.bi-list-item-select.active,.bi-list-item-select:active{color:#fff;background-color:#3f8ce8}.bi-list-item-select.active .bi-high-light,.bi-list-item-select.active .bi-input,.bi-list-item-select.active .bi-textarea,.bi-list-item-select:active .bi-high-light,.bi-list-item-select:active .bi-input,.bi-list-item-select:active .bi-textarea{color:#fff}.bi-list-item-select.disabled,.bi-list-item-select.disabled:active,.bi-list-item-select.disabled:hover{color:#ccc!important;background-color:transparent!important}.bi-list-item-select.disabled .bi-high-light,.bi-list-item-select.disabled .bi-input,.bi-list-item-select.disabled .bi-textarea,.bi-list-item-select.disabled:active .bi-high-light,.bi-list-item-select.disabled:active .bi-input,.bi-list-item-select.disabled:active .bi-textarea,.bi-list-item-select.disabled:hover .bi-high-light,.bi-list-item-select.disabled:hover .bi-input,.bi-list-item-select.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-select.hover,.bi-theme-dark .bi-list-item-select:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-select.hover .bi-input,.bi-theme-dark .bi-list-item-select.hover .bi-textarea,.bi-theme-dark .bi-list-item-select:hover .bi-input,.bi-theme-dark .bi-list-item-select:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.active,.bi-theme-dark .bi-list-item-select:active{color:#fff;background-color:#3f8ce8}.bi-theme-dark .bi-list-item-select.active .bi-high-light,.bi-theme-dark .bi-list-item-select.active .bi-input,.bi-theme-dark .bi-list-item-select.active .bi-textarea,.bi-theme-dark .bi-list-item-select:active .bi-high-light,.bi-theme-dark .bi-list-item-select:active .bi-input,.bi-theme-dark .bi-list-item-select:active .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.disabled,.bi-theme-dark .bi-list-item-select.disabled:active,.bi-theme-dark .bi-list-item-select.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-select.disabled .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled .bi-input,.bi-theme-dark .bi-list-item-select.disabled .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:active .bi-input,.bi-theme-dark .bi-list-item-select.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-none.hover,.bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-list-item-none.hover .bi-input,.bi-list-item-none.hover .bi-textarea,.bi-list-item-none:hover .bi-input,.bi-list-item-none:hover .bi-textarea{color:inherit}.bi-list-item-none.active,.bi-list-item-none:active{color:inherit;background-color:transparent}.bi-list-item-none.active .bi-high-light,.bi-list-item-none.active .bi-input,.bi-list-item-none.active .bi-textarea,.bi-list-item-none:active .bi-high-light,.bi-list-item-none:active .bi-input,.bi-list-item-none:active .bi-textarea{color:inherit}.bi-list-item-none.disabled,.bi-list-item-none.disabled:active,.bi-list-item-none.disabled:hover{color:#ccc!important;background-color:transparent!important}.bi-list-item-none.disabled .bi-high-light,.bi-list-item-none.disabled .bi-input,.bi-list-item-none.disabled .bi-textarea,.bi-list-item-none.disabled:active .bi-high-light,.bi-list-item-none.disabled:active .bi-input,.bi-list-item-none.disabled:active .bi-textarea,.bi-list-item-none.disabled:hover .bi-high-light,.bi-list-item-none.disabled:hover .bi-input,.bi-list-item-none.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-none.hover,.bi-theme-dark .bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.hover .bi-input,.bi-theme-dark .bi-list-item-none.hover .bi-textarea,.bi-theme-dark .bi-list-item-none:hover .bi-input,.bi-theme-dark .bi-list-item-none:hover .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.active,.bi-theme-dark .bi-list-item-none:active{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.active .bi-high-light,.bi-theme-dark .bi-list-item-none.active .bi-input,.bi-theme-dark .bi-list-item-none.active .bi-textarea,.bi-theme-dark .bi-list-item-none:active .bi-high-light,.bi-theme-dark .bi-list-item-none:active .bi-input,.bi-theme-dark .bi-list-item-none:active .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.disabled,.bi-theme-dark .bi-list-item-none.disabled:active,.bi-theme-dark .bi-list-item-none.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-none.disabled .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled .bi-input,.bi-theme-dark .bi-list-item-none.disabled .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:active .bi-input,.bi-theme-dark .bi-list-item-none.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-textarea{color:#666!important}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.cursor-move{cursor:move}.y-overflow-auto{overflow-y:auto;overflow-x:hidden}.x-overflow-auto{overflow-y:hidden;overflow-x:auto}.y-overflow-scroll{overflow-y:scroll;overflow-x:hidden}.x-overflow-scroll{overflow-y:hidden;overflow-x:scroll}.overflow-auto{overflow-x:auto;overflow-y:auto}.overflow-scroll{overflow-x:scroll;overflow-y:scroll}.overflow-dot,.overflow-hidden{overflow-x:hidden;overflow-y:hidden}.td-overflow{white-space:normal;word-break:break-all}.overflow-dot{white-space:nowrap}.display-block{display:block}.display-inline{display:inline-block}.vertical-super{vertical-align:super}.vertical-top{vertical-align:top}.horizon-left{text-align:left}.border-sizing{-ms-box-sizing:border-box;box-sizing:border-box}.content-sizing{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;-ms-box-sizing:content-box;box-sizing:content-box}.bi-flex-center-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:flex-start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-horizontal-layout.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-vertical-center{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;min-width:100%;min-height:100%;float:left}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:flex-start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%;float:left}.bi-inline-center-adapt-layout:after,.bi-inline-vertical-adapt-layout:after{display:inline-block;width:0;min-height:100%;vertical-align:middle;content:' '}.cm-tab-wrap-hack:after,.scrollbar-layout-face:after{content:''}.bi-theme-dark{background-color:#191b2b;color:#ccc}.bi-theme-dark .bi-input{color:#fff}.bi-color-chooser-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.bi-color-picker-button .color-picker-button-mask{border:1px solid #1a1a1a}.bi-theme-dark .bi-color-picker-button .color-picker-button-mask{border:1px solid #fff}.bi-bubble-combo .bubble-combo-triangle-left,.bi-bubble-combo .bubble-combo-triangle-right{z-index:1;width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent}.bi-color-picker-editor .color-picker-editor-display{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.bi-bubble-combo .button-combo-triangle-wrapper{position:fixed!important}.bi-bubble-combo .bubble-combo-triangle-left{border-left:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-right{border-right:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-bottom,.bi-bubble-combo .bubble-combo-triangle-top{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;z-index:1}.bi-bubble-combo .bubble-combo-triangle-top{border-top:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-bottom{border-bottom:6px solid #3f8ce8}.bi-bubble-popup-view{-webkit-box-shadow:0 0 10px rgba(0,0,0,.2);-moz-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2)}.CodeMirror{font-family:monospace;cursor:text;width:100%;height:100%}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #1a1a1a}.bi-theme-dark .CodeMirror div.CodeMirror-cursor{border-left:1px solid #fff}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}@-moz-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@-webkit-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default span[class*=fieldName]{color:#fff;padding:1px;margin:1px 0;background:#3f8ce8}.cm-s-default span[class*=start]{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;margin-left:3px}.cm-s-default span[class*=end]{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;margin-right:3px}.cm-s-default span[class*="start end"]{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.cm-s-default span[class*="#"]{color:#3f8ce8}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}.bi-message-text,.bi-page-table-cell{-webkit-user-select:text;-ms-user-select:text;-o-user-select:text;-khtml-user-select:text}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}.codemirror-high-line-height{line-height:2}.codemirror-low-line-height{line-height:1.4}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;border-right:none;width:0}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}span.CodeMirror-selectedtext{background:0 0}.CodeMirror-hints{position:absolute;z-index:10000;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.bi-segment>.center-element,.bi-text,.bi-textarea-editor{overflow-x:hidden;overflow-y:hidden}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:#000;cursor:pointer}.bi-input,body{margin:0;padding:0}.bi-text,.ztree li{white-space:nowrap}li.CodeMirror-hint-active{background:#08f;color:#fff}.bi-message-title{font-size:16px;cursor:pointer}.bi-message-text{font-size:16px;-moz-user-select:text;user-select:text}.bi-message-content{font-size:16px}.bi-message-close{font-size:25px}.bi-multi-list-view .bi-button-mask{opacity:.1;filter:alpha(opacity=10)}.bi-panel{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-panel .panel-title .panel-title-text{cursor:text;font-size:14px}.bi-all-count-pager .all-pager-next,.bi-all-count-pager .all-pager-prev,.bi-direction-pager .direction-pager-next,.bi-direction-pager .direction-pager-prev{font-size:16px}.bi-pager .page-item{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-segment>.center-element{overflow:hidden;background:#fff;border-right:1px solid #d4dadd;border-top:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-segment>.first-element{border-left:1px solid #d4dadd;-webkit-border-radius:6px 0 0 6px;-moz-border-radius:6px 0 0 6px;border-radius:6px 0 0 6px}.bi-segment>.last-element{-webkit-border-radius:0 6px 6px 0;-moz-border-radius:0 6px 6px 0;border-radius:0 6px 6px 0}.bi-theme-dark .bi-segment>.center-element{overflow:hidden;overflow-x:hidden;overflow-y:hidden;background:#242640;border-right:1px solid #525466;border-top:1px solid #525466;border-bottom:1px solid #525466}.bi-theme-dark .bi-segment>.first-element{border-left:1px solid #242640}.bi-button{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:1px solid #178cdf;background-color:#3f8ce8;vertical-align:middle;cursor:pointer;font-size:14px}.bi-button.block{font-size:inherit;border-width:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.bi-button.clear{font-size:inherit;border-width:0;background-color:transparent}.bi-button.clear:active,.bi-button.clear:hover{opacity:.75;filter:alpha(opacity=75)}.bi-button.button-common,.bi-button.button-common .b-font:before{color:#fff}.bi-button.button-common.clear,.bi-button.button-common.clear .b-font:before{color:#3f8ce8}.bi-button.button-ignore{background-color:#fff;border-color:#d4dadd}.bi-button.button-ignore,.bi-button.button-ignore .b-font:before{color:#1a1a1a}.bi-button.button-ignore.clear{background-color:transparent;border-width:0}.bi-button.button-success{background-color:#58cc7d;border-color:#58cc7d}.bi-button.button-success,.bi-button.button-success .b-font:before{color:#fff}.bi-button.button-success.clear{background-color:transparent;border-width:0}.bi-button.button-success.clear,.bi-button.button-success.clear .b-font:before{color:#0c6d23}.bi-button.button-warning{background-color:#e85050;border-color:#e85050}.bi-button.button-warning,.bi-button.button-warning .b-font:before{color:#fff}.bi-button.button-warning.clear{background-color:transparent;border-width:0}.bi-button.button-warning.clear,.bi-button.button-warning.clear .b-font:before{color:#e85050}.bi-button.button-common.disabled,.bi-button.button-common.disabled.base-disabled,.bi-button.button-success.disabled,.bi-button.button-success.disabled.base-disabled,.bi-button.button-warning.disabled,.bi-button.button-warning.disabled.base-disabled{background:#ccc!important;border-color:#ccc!important}.bi-button.button-common.disabled,.bi-button.button-common.disabled .b-font:before,.bi-button.button-common.disabled.base-disabled,.bi-button.button-common.disabled.base-disabled .b-font:before,.bi-button.button-success.disabled,.bi-button.button-success.disabled .b-font:before,.bi-button.button-success.disabled.base-disabled,.bi-button.button-success.disabled.base-disabled .b-font:before,.bi-button.button-warning.disabled,.bi-button.button-warning.disabled .b-font:before,.bi-button.button-warning.disabled.base-disabled,.bi-button.button-warning.disabled.base-disabled .b-font:before{color:#fff!important}.bi-button.button-common.disabled.clear,.bi-button.button-common.disabled.clear .b-font:before,.bi-button.button-ignore.disabled,.bi-button.button-ignore.disabled .b-font:before,.bi-button.button-ignore.disabled.clear,.bi-button.button-ignore.disabled.clear .b-font:before,.bi-button.button-success.disabled.clear,.bi-button.button-success.disabled.clear .b-font:before,.bi-button.button-warning.disabled.clear,.bi-button.button-warning.disabled.clear .b-font:before{color:#ccc!important}.bi-button.button-ignore.disabled{background:#fff!important;border-color:#d4dadd!important}.bi-button.button-common.disabled.clear,.bi-button.button-ignore.disabled.clear,.bi-button.button-success.disabled.clear,.bi-button.button-warning.disabled.clear{background:0 0!important;border-width:0!important}.bi-button.button-common.disabled.clear:active,.bi-button.button-common.disabled.clear:hover,.bi-button.button-ignore.disabled.clear:active,.bi-button.button-ignore.disabled.clear:hover,.bi-button.button-success.disabled.clear:active,.bi-button.button-success.disabled.clear:hover,.bi-button.button-warning.disabled.clear:active,.bi-button.button-warning.disabled.clear:hover{opacity:1;filter:alpha(opacity=100)}.bi-basic-button.button-common .bi-button-mask,.bi-basic-button.button-success .bi-button-mask,.bi-basic-button.button-warning .bi-button-mask{opacity:.2;filter:alpha(opacity=20);background-color:#fff}.bi-basic-button .bi-button-mask{opacity:.2;filter:alpha(opacity=20);background-color:#1a1a1a}.bi-single-select-icon-text-item.active .b-font:before,.bi-single-select-icon-text-item:active .b-font:before{color:#3f8ce8}.bi-editor{font-size:12px}.bi-multifile-editor .multifile-editor{text-align:right;cursor:pointer;font-size:100px;z-index:2}.bi-resizable-table .resizable-table-region-resizer,.bi-resizable-table-cell .resizable-table-cell-resizer-container{cursor:ew-resize;z-index:1}.bi-shelter-editor .shelter-editor-text,.bi-sign-editor .sign-editor-text{font-size:12px}.bi-textarea-editor{overflow:hidden}.bi-textarea-editor .textarea-editor-content{font-size:12px;border:none}.bi-bubble,.bi-toast{font-size:14px}.bi-file{opacity:0;filter:alpha(opacity=0);z-index:2}.bi-input{border:none;background-color:transparent;width:100%;height:100%}.bi-input.bi-input-focus{border:none}.bi-input.bi-input-error{border:none;color:#e85050!important}.bi-bubble .bubble-text,.bi-toast{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-text{-ms-box-sizing:border-box;box-sizing:border-box;word-break:break-word}.bi-bubble .bubble-text{border-radius:2px;background:#fddddd;color:#e85050}.bi-tip{position:fixed!important}.bi-toast{border-radius:2px}.bi-toast.toast-success{background:#e1f4e7;color:#0c6d23}.bi-toast.toast-warning{background:#fddddd;color:#e85050}.bi-tooltip{max-width:250px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;font-size:12px}.bi-tooltip.tooltip-success{background:#fff5c1;border:1px solid #fff5c1;color:#1a1a1a}.bi-tooltip.tooltip-warning{background:#fddddd;color:#e85050;border:1px solid #f4cbcb}.bi-table>div.bottom-left>div>div>table,.bi-table>div.bottom-right>div>div>table,.bi-table>div.top-left>div>div>table,.bi-table>div.top-right>div>div>table,.bi-table>div>div>table{border-right:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-collection-table-cell{-ms-box-sizing:border-box;box-sizing:border-box}.bi-grid-table-cell,.bi-sequence-table-dynamic-number .sequence-table-title-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box}.bi-collection-table-cell.first-row{border-top:1px solid #d4dadd}.bi-collection-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-collection-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-collection-table-cell.first-col{border-left:1px solid #525466}.bi-quick-collection-table>div>.bi-collection{overflow:hidden!important;overflow-x:hidden!important;overflow-y:hidden!important}.bi-table>.first-col{border-left:none}.bi-table>.first-row{border-top:none}.bi-theme-dark .bi-table>div.bottom-left>div>div>table,.bi-theme-dark .bi-table>div.bottom-right>div>div>table,.bi-theme-dark .bi-table>div.top-left>div>div>table,.bi-theme-dark .bi-table>div.top-right>div>div>table,.bi-theme-dark .bi-table>div>div>table{border-right:1px solid #525466;border-bottom:1px solid #525466}.bi-table>div>div>div>table,.bi-table>div>div>table{min-width:100%;clear:both;border-spacing:0;border-collapse:separate}.bi-table>div>div>div>table,.bi-table>div>div>div>table>*>*>td,.bi-table>div>div>div>table>*>*>th,.bi-table>div>div>table,.bi-table>div>div>table>*>*>td,.bi-table>div>div>table>*>*>th{vertical-align:middle;margin:0;padding:0}.bi-table>div>div>div>table>tbody>tr>td,.bi-table>div>div>div>table>thead>tr>td,.bi-table>div>div>table>tbody>tr>td,.bi-table>div>div>table>thead>tr>td{border-top:1px solid #d4dadd;border-left:1px solid #d4dadd}.bi-theme-dark .bi-table>div>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>div>table>thead>tr>td,.bi-theme-dark .bi-table>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>table>thead>tr>td{border-top:1px solid #525466;border-left:1px solid #525466}.bi-grid-table-cell{box-sizing:border-box}.bi-grid-table-cell.first-row{border-top:1px solid #d4dadd}.bi-grid-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-grid-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-grid-table-cell.first-col{border-left:1px solid #525466}.scrollbar-layout-main{box-sizing:border-box;outline:0;overflow:hidden;position:absolute;transition-duration:250ms;transition-timing-function:ease;user-select:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);border-radius:5px}.bi-theme-dark .scrollbar-layout-main{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-vertical{bottom:0;right:0;top:0;transition-property:background-color;width:10px}.scrollbar-layout-main-vertical.public-scrollbar-main-active,.scrollbar-layout-main-vertical:hover{width:10px}.scrollbar-layout-main-horizontal{bottom:0;height:10px;left:0;transition-property:background-color;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666)}.bi-theme-dark .scrollbar-layout-main-horizontal{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-horizontal.public-scrollbar-main-active,.scrollbar-layout-main-horizontal:hover{height:10px}body,html{height:100%}.scrollbar-layout-face{left:0;overflow:hidden;position:absolute;z-index:1}.scrollbar-layout-face:after{border-radius:6px;display:block;position:absolute;transition:background-color 250ms ease}.scrollbar-layout-face-horizontal{bottom:0;left:0;top:0}.scrollbar-layout-face-horizontal:after{bottom:2px;left:0;top:2px;width:100%}.scrollbar-layout-face-vertical{left:0;right:0;top:0}.scrollbar-layout-face-vertical:after{height:100%;left:2px;right:2px;top:0}.public-scrollbar-face:after{background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}.bi-theme-dark .public-scrollbar-face:after{background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.public-scrollbar-face-active:after,.public-scrollbar-main-active .public-scrollbar-face:after,.public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark .public-scrollbar-face-active:after,.bi-theme-dark .public-scrollbar-main-active .public-scrollbar-face:after,.bi-theme-dark .public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.horizontal-scrollbar{bottom:0;position:absolute}.bi-resizable-table-cell .resizable-table-cell-resizer-container.dragging .resizable-table-cell-resizer-knob,.bi-resizable-table-cell .resizable-table-cell-resizer-container:hover .resizable-table-cell-resizer-knob{background-color:#3f8ce8}.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob{background-color:#58cc7d}.bi-resizable-table .resizable-table-resizer{cursor:ew-resize;z-index:1;background-color:#3f8ce8}.bi-resizable-table .resizable-table-resizer.suitable{background-color:#58cc7d}.bi-resizable-table .resizable-table-region-resizer.dragging .resizable-table-region-resizer-knob,.bi-resizable-table .resizable-table-region-resizer:hover .resizable-table-region-resizer-knob{background-color:#3f8ce8}.bi-branch-tree .bi-branch-tree-view{min-width:300px}.bi-trigger .bi-trigger-icon-button{font-size:16px}.bi-select-text-trigger,.bi-small-select-text-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-popup-view{position:fixed!important;overflow-y:visible!important;overflow-x:visible!important;overflow:visible!important;cursor:default}.bi-popup-view .list-view-outer{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-popup-view .list-view-toolbar{line-height:30px}.bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #d4dadd}.bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-theme-dark .bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-search-editor,.bi-text-editor{border:1px solid #d4dadd}.bi-arrangement .arrangement-helper{background:#3f8ce8;z-index:1000000000}.bi-arrangement .arrangement-block,.bi-arrangement .arrangement-drop-container{z-index:1000000000}.bi-arrangement .arrangement-drop-container .arrangement-drop-region{overflow:hidden}.bi-arrangement .arrangement-drop-container .bottom-center,.bi-arrangement .arrangement-drop-container .bottom-center-second,.bi-arrangement .arrangement-drop-container .bottom-left,.bi-arrangement .arrangement-drop-container .bottom-left-second,.bi-arrangement .arrangement-drop-container .bottom-right,.bi-arrangement .arrangement-drop-container .bottom-right-second,.bi-arrangement .arrangement-drop-container .drop-devider,.bi-arrangement .arrangement-drop-container .left-center,.bi-arrangement .arrangement-drop-container .left-center-second,.bi-arrangement .arrangement-drop-container .right-center,.bi-arrangement .arrangement-drop-container .right-center-second,.bi-arrangement .arrangement-drop-container .top-center,.bi-arrangement .arrangement-drop-container .top-center-second,.bi-arrangement .arrangement-drop-container .top-left,.bi-arrangement .arrangement-drop-container .top-left-second,.bi-arrangement .arrangement-drop-container .top-right,.bi-arrangement .arrangement-drop-container .top-right-second{z-index:1000000001;background:#3f8ce8}.bi-arrangement-droppable{z-index:100000}.bi-adapt-editor .adapt-editor-text{font-size:14px}.bi-search-editor .close-font,.bi-search-editor .search-font{font-size:20px}.bi-small-search-editor .bi-editor,.bi-small-search-editor .bi-editor .bi-input,.bi-small-search-editor .bi-editor .bi-label{font-size:12px}.bi-small-search-editor .close-font,.bi-small-search-editor .search-font{font-size:18px}.bi-sign-initial-editor .sign-initial-editor-text{font-size:14px}.bi-sign-style-editor .sign-style-editor-text{max-width:100%;font-size:12px}.bi-sign-style-editor .sign-style-editor-tip{max-width:100%;font-size:12px;color:grey}.bi-date-trigger,.bi-fine-tuning-number-editor{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-date-trigger{border-radius:2px}.bi-down-list-popup .bi-down-list-item .list-item-text{max-width:203px}.bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #d4dadd}.bi-theme-dark .bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #525466}.bi-file-manager-nav-button .file-manager-nav-button-text{max-width:200px}.bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#eff1f4;color:#999}.bi-file-manager-nav-button .file-manager-nav-button-triangle{z-index:1}.bi-theme-dark .bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#191b2b;color:#999}.bi-fine-tuning-number-editor{border-radius:2px}.bi-interactive-arrangement .interactive-arrangement-dragtag-line{z-index:1000000000;background-color:#f07d0a}.bi-interactive-arrangement .interactive-arrangement-dragtag-icon{z-index:1000000000}.bi-month-trigger,.bi-multidate-combo{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-multidate-popup .bi-multidate-popup-label{color:#3f8ce8;font-size:14px}.bi-multidate-popup .bi-multidate-popup-item.active,.bi-multidate-popup .bi-multidate-popup-item:active{background-color:#3f8ce8;color:#fff;-webkit-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}.bi-multidate-popup .bi-multidate-popup-button{color:#3f8ce8;font-size:14px}.bi-multidate-segment .bi-multidate-editor{font-size:14px}.bi-multi-select-combo .multi-select-trigger-icon-button,.bi-multi-tree-combo .multi-select-trigger-icon-button{font-size:16px}.bi-multi-select-check-pane .multi-select-check-selected{text-decoration:underline}.bi-display-tree .ztree li a:hover,.ztree li a,body{text-decoration:none}.bi-multi-select-trigger{-webkit-border-radius:2px 2px 2px 2px;-moz-border-radius:2px;border-radius:2px}.bi-multi-select-search-pane .multi-select-toolbar{color:#e85050}.bi-multi-select-check-selected-button{z-index:1}.bi-multi-tree-check-pane .multi-tree-check-selected{color:#3f8ce8}.bi-numerical-interval .numerical-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon,.bi-numerical-interval .numerical-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon{font-size:14px}.bi-multi-tree-popup .popup-view-tree{min-height:170px}.bi-preview-table-cell,.bi-preview-table-header-cell{min-height:25px;min-width:80px;max-width:220px}.bi-multi-tree-check-selected-button .trigger-check-selected{color:#3f8ce8;z-index:1}.bi-numerical-interval.number-error .bi-input,.bi-param-time-interval.time-error .bi-input,.bi-param-time-interval.time-error .sign-editor-text{color:#e85050}.bi-numerical-interval .numerical-interval-small-editor{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-numerical-interval .numerical-interval-big-editor{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-numerical-interval .numerical-interval-big-combo{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-numerical-interval .numerical-interval-small-combo{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-page-table-cell{-moz-user-select:text;user-select:text}.bi-path-chooser .path-chooser-radio,.bi-path-region .path-region-label{z-index:1}.bi-preview-table{-webkit-user-select:text;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;-o-user-select:text;user-select:text}.bi-preview-table>div>div>div>table>thead>tr.odd,.bi-preview-table>div>table>thead>tr.odd{background-color:#eff1f4}.bi-theme-dark .bi-preview-table>div>div>div>table>thead>tr.odd,.bi-theme-dark .bi-preview-table>div>table>thead>tr.odd{background-color:#191b2b}.bi-slider .bi-slider-track,.bi-slider-track .gray-track{background-color:rgba(153,153,153,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d999999, endColorstr=#4d999999)}.bi-quarter-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-relation-view-region .relation-view-region-container{z-index:1;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-relation-view-region .relation-view-region-container.other-package{border-style:dashed}.bi-sequence-table-dynamic-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;box-sizing:border-box}.bi-sequence-table-dynamic-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-single-slider-slider .slider-button{cursor:url(${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/cursor/cursor_drag_slider.cur),auto;-webkit-box-shadow:0 0 10px rgba(0,0,0,.2);-moz-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2);-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.bi-slider .bi-slider-track,.bi-slider-track .blue-track,.bi-slider-track .gray-track{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-year-popup .year-popup-navigation{line-height:30px}.bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #d4dadd}.bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-theme-dark .bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-year-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}*,button,html,input,select,textarea{font-family:"Microsoft YaHei","Hiragino Sans GB W3"}html{overflow:hidden}body{position:absolute;width:100%;top:0;left:0;background-repeat:repeat;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;color:#666;font:400 12px "Microsoft YaHei","Hiragino Sans GB W3";-webkit-font-smoothing:antialiased;-kthml-user-focus:normal;-moz-user-focus:normal;-moz-outline:0 none;outline:0}div::-webkit-scrollbar,textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);width:6px;height:6px}div::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}div::-webkit-scrollbar-thumb:hover,textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark div::-webkit-scrollbar,.bi-theme-dark textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc);width:6px;height:6px}.bi-theme-dark div::-webkit-scrollbar-thumb,.bi-theme-dark textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.bi-theme-dark div::-webkit-scrollbar-thumb:hover,.bi-theme-dark textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.base-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-1.png) repeat-y}.bi-theme-dark .base-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-1.png) repeat-y}.first-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png) center center no-repeat}.bi-theme-dark .first-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png) center center no-repeat}.mid-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png) center center no-repeat}.bi-theme-dark .mid-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png) center center no-repeat}.last-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png) center center no-repeat}.bi-theme-dark .last-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png) center center no-repeat}.loading-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/loading.gif) center center no-repeat}.auto-color-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/auto-color.png) center center no-repeat}.trans-color-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/trans-color.png) center center no-repeat}@font-face{font-family:bi;src:url(https://fanruan.coding.me/fineui/dist/font/iconfont.eot),url(https://fanruan.coding.me/fineui/dist/font/iconfont.woff) format('woff'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.ttf) format('truetype'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.svg#svgFontName) format('svg')}.b-font{font-family:bi;font-style:normal;-webkit-font-smoothing:antialiased}.close-font .b-font:before,.close-font.disabled .b-font:before,.close-font.native .b-font:before,.close-h-font .b-font:before,.close-h-font.disabled .b-font:before,.close-h-font.hover .b-font:before,.close-h-font.native .b-font:before,.close-h-font:focus .b-font:before,.close-h-font:hover .b-font:before,.close-ha-font .b-font:before,.close-ha-font.hover .b-font:before,.close-ha-font:focus .b-font:before,.close-ha-font:hover .b-font:before{content:"\e600";color:inherit}.close-ha-font.active .b-font:before,.close-ha-font:active .b-font:before{content:"\e600";color:#3f8ce8}.close-ha-font.disabled .b-font:before,.close-ha-font.native .b-font:before,.search-close-h-font .b-font:before{content:"\e600";color:inherit}.search-close-h-font.hover .b-font:before,.search-close-h-font:focus .b-font:before,.search-close-h-font:hover .b-font:before{content:"\e600";color:#e85050}.search-close-h-font.disabled .b-font:before,.search-close-h-font.native .b-font:before{content:"\e600";color:inherit}.pre-page-h-font .b-font:before,.pre-page-h-font.disabled .b-font:before,.pre-page-h-font.hover .b-font:before,.pre-page-h-font.native .b-font:before,.pre-page-h-font:focus .b-font:before,.pre-page-h-font:hover .b-font:before{content:"\e601";color:inherit}.next-page-h-font .b-font:before,.next-page-h-font.disabled .b-font:before,.next-page-h-font.hover .b-font:before,.next-page-h-font.native .b-font:before,.next-page-h-font:focus .b-font:before,.next-page-h-font:hover .b-font:before{content:"\e602";color:inherit}.search-font .b-font:before,.search-font.disabled .b-font:before,.search-font.native .b-font:before{content:"\e604";color:inherit}.dot-font .b-font:before,.dot-font.disabled .b-font:before,.dot-font.native .b-font:before,.dot-h-font .b-font:before{content:"\e606";color:#1a1a1a}.dot-h-font.hover .b-font:before,.dot-h-font:focus .b-font:before,.dot-h-font:hover .b-font:before{content:"\e606";color:inherit}.dot-h-font.disabled .b-font:before,.dot-h-font.native .b-font:before{content:"\e606";color:#1a1a1a}.dot-ha-font .b-font:before{content:"\e606";color:#fff}.dot-ha-font.hover .b-font:before,.dot-ha-font:focus .b-font:before,.dot-ha-font:hover .b-font:before{content:"\e606";color:#999}.dot-ha-font.active .b-font:before,.dot-ha-font:active .b-font:before{content:"\e606";color:#1a1a1a}.dot-e-font .b-font:before,.dot-ha-font.disabled .b-font:before,.dot-ha-font.native .b-font:before{content:"\e606";color:#fff}.dot-e-font.hover .b-font:before,.dot-e-font:focus .b-font:before,.dot-e-font:hover .b-font:before{content:"\e606";color:#999}.dot-e-font.active .b-font:before{content:"\e606";color:#1a1a1a}.dot-e-font:active .b-font:before{content:"\e606";color:#3f8ce8}.dot-e-font.disabled .b-font:before,.dot-e-font.native .b-font:before{content:"\e606";color:#fff}.pull-right-font .b-font:before,.pull-right-font.disabled .b-font:before,.pull-right-font.native .b-font:before,.pull-right-h-font .b-font:before,.pull-right-h-font.disabled .b-font:before,.pull-right-h-font.hover .b-font:before,.pull-right-h-font.native .b-font:before,.pull-right-h-font:focus .b-font:before,.pull-right-h-font:hover .b-font:before,.pull-right-ha-font .b-font:before,.pull-right-ha-font.hover .b-font:before,.pull-right-ha-font:focus .b-font:before,.pull-right-ha-font:hover .b-font:before{content:"\e607";color:inherit}.pull-right-ha-font.active .b-font:before,.pull-right-ha-font:active .b-font:before{content:"\e607";color:#3f8ce8}.pull-right-e-font .b-font:before,.pull-right-e-font.hover .b-font:before,.pull-right-e-font:focus .b-font:before,.pull-right-e-font:hover .b-font:before,.pull-right-ha-font.disabled .b-font:before,.pull-right-ha-font.native .b-font:before{content:"\e607";color:inherit}.pull-right-e-font.active .b-font:before,.pull-right-e-font:active .b-font:before{content:"\e607";color:#3f8ce8}.pull-right-e-font.disabled .b-font:before,.pull-right-e-font.native .b-font:before{content:"\e607";color:inherit}.copy-font .b-font:before,.copy-font.disabled .b-font:before,.copy-font.native .b-font:before{content:"\e610";color:inherit}.copy-h-font .b-font:before{content:"\e610";color:#1a1a1a}.copy-h-font.hover .b-font:before,.copy-h-font:focus .b-font:before,.copy-h-font:hover .b-font:before{content:"\e610";color:inherit}.copy-h-font.disabled .b-font:before,.copy-h-font.native .b-font:before{content:"\e610";color:#1a1a1a}.copy-ha-font .b-font:before,.copy-ha-font.hover .b-font:before,.copy-ha-font:focus .b-font:before,.copy-ha-font:hover .b-font:before{content:"\e610";color:inherit}.copy-ha-font.active .b-font:before,.copy-ha-font:active .b-font:before{content:"\e610";color:#3f8ce8}.copy-e-font .b-font:before,.copy-e-font.hover .b-font:before,.copy-e-font:focus .b-font:before,.copy-e-font:hover .b-font:before,.copy-ha-font.disabled .b-font:before,.copy-ha-font.native .b-font:before{content:"\e610";color:inherit}.copy-e-font.active .b-font:before,.copy-e-font:active .b-font:before{content:"\e610";color:#3f8ce8}.copy-e-font.disabled .b-font:before,.copy-e-font.native .b-font:before{content:"\e610";color:inherit}.check-mark-font .b-font:before,.check-mark-font.disabled .b-font:before,.check-mark-font.native .b-font:before,.check-mark-h-font .b-font:before,.check-mark-h-font.disabled .b-font:before,.check-mark-h-font.hover .b-font:before,.check-mark-h-font.native .b-font:before,.check-mark-h-font:focus .b-font:before,.check-mark-h-font:hover .b-font:before,.check-mark-ha-font .b-font:before,.check-mark-ha-font.hover .b-font:before,.check-mark-ha-font:focus .b-font:before,.check-mark-ha-font:hover .b-font:before{content:"\e611";color:inherit}.check-mark-ha-font.active .b-font:before,.check-mark-ha-font:active .b-font:before{content:"\e611";color:#3f8ce8}.check-mark-e-font .b-font:before,.check-mark-e-font.hover .b-font:before,.check-mark-e-font:focus .b-font:before,.check-mark-e-font:hover .b-font:before,.check-mark-ha-font.disabled .b-font:before,.check-mark-ha-font.native .b-font:before{content:"\e611";color:inherit}.check-mark-e-font.active .b-font:before,.check-mark-e-font:active .b-font:before{content:"\e611";color:#3f8ce8}.check-mark-e-font.disabled .b-font:before,.check-mark-e-font.native .b-font:before{content:"\e611";color:inherit}.tree-node-triangle-expand-font .b-font:before,.tree-node-triangle-expand-font.disabled .b-font:before,.tree-node-triangle-expand-font.native .b-font:before{content:"\e608";color:inherit}.tree-node-triangle-collapse-font .b-font:before,.tree-node-triangle-collapse-font.disabled .b-font:before,.tree-node-triangle-collapse-font.native .b-font:before{content:"\e607";color:inherit}.row-pre-page-h-font .b-font:before,.row-pre-page-h-font.disabled .b-font:before,.row-pre-page-h-font.hover .b-font:before,.row-pre-page-h-font.native .b-font:before,.row-pre-page-h-font:focus .b-font:before,.row-pre-page-h-font:hover .b-font:before{content:"\e6be";color:inherit}.row-next-page-h-font .b-font:before,.row-next-page-h-font.disabled .b-font:before,.row-next-page-h-font.hover .b-font:before,.row-next-page-h-font.native .b-font:before,.row-next-page-h-font:focus .b-font:before,.row-next-page-h-font:hover .b-font:before{content:"\e6bd";color:inherit}.column-pre-page-h-font .b-font:before,.column-pre-page-h-font.disabled .b-font:before,.column-pre-page-h-font.hover .b-font:before,.column-pre-page-h-font.native .b-font:before,.column-pre-page-h-font:focus .b-font:before,.column-pre-page-h-font:hover .b-font:before{content:"\e6bc";color:inherit}.column-next-page-h-font .b-font:before,.column-next-page-h-font.disabled .b-font:before,.column-next-page-h-font.hover .b-font:before,.column-next-page-h-font.native .b-font:before,.column-next-page-h-font:focus .b-font:before,.column-next-page-h-font:hover .b-font:before{content:"\e6bb";color:inherit}.trigger-triangle-font .b-font:before,.trigger-triangle-font.hover .b-font:before,.trigger-triangle-font:focus .b-font:before,.trigger-triangle-font:hover .b-font:before{content:"\e66a";color:#999}.trigger-triangle-font.active .b-font:before,.trigger-triangle-font:active .b-font:before{content:"\e66a";color:#3f8ce8}.trigger-triangle-font.disabled .b-font:before,.trigger-triangle-font.native .b-font:before{content:"\e66a";color:#999}.pull-down-font .b-font:before,.pull-down-font.disabled .b-font:before,.pull-down-font.native .b-font:before,.pull-down-h-font .b-font:before,.pull-down-h-font.disabled .b-font:before,.pull-down-h-font.hover .b-font:before,.pull-down-h-font.native .b-font:before,.pull-down-h-font:focus .b-font:before,.pull-down-h-font:hover .b-font:before,.pull-down-ha-font .b-font:before,.pull-down-ha-font.hover .b-font:before,.pull-down-ha-font:focus .b-font:before,.pull-down-ha-font:hover .b-font:before{content:"\e608";color:inherit}.pull-down-ha-font.active .b-font:before,.pull-down-ha-font:active .b-font:before{content:"\e608";color:#3f8ce8}.pull-down-ha-font.disabled .b-font:before,.pull-down-ha-font.native .b-font:before{content:"\e608";color:inherit}.check-font .b-font:before,.check-font.disabled .b-font:before,.check-font.native .b-font:before{content:"\e611";color:#3f8ce8}.item-check-font .b-font:before{content:"\e611";color:#fff}.item-check-font.hover .b-font:before,.item-check-font:focus .b-font:before,.item-check-font:hover .b-font:before{content:"\e611";color:#999}.item-check-font.active .b-font:before,.item-check-font:active .b-font:before{content:"\e611";color:#3f8ce8}.item-check-font.disabled .b-font:before,.item-check-font.native .b-font:before{content:"\e611";color:#fff}.primary-key-font .b-font:before,.primary-key-font.disabled .b-font:before,.primary-key-font.hover .b-font:before,.primary-key-font.native .b-font:before,.primary-key-font:focus .b-font:before,.primary-key-font:hover .b-font:before{content:"\e67d;";color:inherit}.drag-tag-font .b-font:before,.drag-tag-font.disabled .b-font:before,.drag-tag-font.native .b-font:before{content:"\e600";color:#f07d0a}.less-font .b-font:before,.less-font.hover .b-font:before,.less-font:focus .b-font:before,.less-font:hover .b-font:before{content:"\e633";color:inherit}.less-font.active .b-font:before,.less-font:active .b-font:before{content:"\e633";color:#3f8ce8}.less-font.disabled .b-font:before,.less-font.native .b-font:before{content:"\e633";color:inherit}.less-equal-font .b-font:before,.less-equal-font.hover .b-font:before,.less-equal-font:focus .b-font:before,.less-equal-font:hover .b-font:before{content:"\e636";color:inherit}.less-equal-font.active .b-font:before,.less-equal-font:active .b-font:before{content:"\e636";color:#3f8ce8}.less-equal-font.disabled .b-font:before,.less-equal-font.native .b-font:before{content:"\e636";color:inherit}.tree-collapse-icon-type1 .x-icon,.tree-collapse-icon-type1:active .x-icon,.tree-collapse-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-1.png) no-repeat;background-size:contain}.tree-collapse-icon-type1 .x-icon.hack,.tree-collapse-icon-type1:active .x-icon.hack,.tree-collapse-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-1.png) no-repeat}.tree-collapse-icon-type1.disabled .x-icon,.tree-collapse-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-1.png) no-repeat;background-size:contain}.tree-collapse-icon-type1.disabled .x-icon.hack,.tree-collapse-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-1.png) no-repeat}.tree-collapse-icon-type2 .x-icon,.tree-collapse-icon-type2:active .x-icon,.tree-collapse-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-2.png) no-repeat;background-size:contain}.tree-collapse-icon-type2 .x-icon.hack,.tree-collapse-icon-type2:active .x-icon.hack,.tree-collapse-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-2.png) no-repeat}.tree-collapse-icon-type2.disabled .x-icon,.tree-collapse-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-2.png) no-repeat;background-size:contain}.tree-collapse-icon-type2.disabled .x-icon.hack,.tree-collapse-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-2.png) no-repeat}.tree-collapse-icon-type3 .x-icon,.tree-collapse-icon-type3:active .x-icon,.tree-collapse-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-3.png) no-repeat;background-size:contain}.tree-collapse-icon-type3 .x-icon.hack,.tree-collapse-icon-type3:active .x-icon.hack,.tree-collapse-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-3.png) no-repeat}.tree-collapse-icon-type3.disabled .x-icon,.tree-collapse-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-3.png) no-repeat;background-size:contain}.tree-collapse-icon-type3.disabled .x-icon.hack,.tree-collapse-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-3.png) no-repeat}.tree-collapse-icon-type4 .x-icon,.tree-collapse-icon-type4:active .x-icon,.tree-collapse-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-4.png) no-repeat;background-size:contain}.tree-collapse-icon-type4 .x-icon.hack,.tree-collapse-icon-type4:active .x-icon.hack,.tree-collapse-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-4.png) no-repeat}.tree-collapse-icon-type4.disabled .x-icon,.tree-collapse-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-4.png) no-repeat;background-size:contain}.tree-collapse-icon-type4.disabled .x-icon.hack,.tree-collapse-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-4.png) no-repeat}.tree-expand-icon-type1 .x-icon,.tree-expand-icon-type1:active .x-icon,.tree-expand-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-1.png) no-repeat;background-size:contain}.tree-expand-icon-type1 .x-icon.hack,.tree-expand-icon-type1:active .x-icon.hack,.tree-expand-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-1.png) no-repeat}.tree-expand-icon-type1.disabled .x-icon,.tree-expand-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-1.png) no-repeat;background-size:contain}.tree-expand-icon-type1.disabled .x-icon.hack,.tree-expand-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-1.png) no-repeat}.tree-expand-icon-type2 .x-icon,.tree-expand-icon-type2:active .x-icon,.tree-expand-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-2.png) no-repeat;background-size:contain}.tree-expand-icon-type2 .x-icon.hack,.tree-expand-icon-type2:active .x-icon.hack,.tree-expand-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-2.png) no-repeat}.tree-expand-icon-type2.disabled .x-icon,.tree-expand-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-2.png) no-repeat;background-size:contain}.tree-expand-icon-type2.disabled .x-icon.hack,.tree-expand-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-2.png) no-repeat}.tree-expand-icon-type3 .x-icon,.tree-expand-icon-type3:active .x-icon,.tree-expand-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-3.png) no-repeat;background-size:contain}.tree-expand-icon-type3 .x-icon.hack,.tree-expand-icon-type3:active .x-icon.hack,.tree-expand-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-3.png) no-repeat}.tree-expand-icon-type3.disabled .x-icon,.tree-expand-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-3.png) no-repeat;background-size:contain}.tree-expand-icon-type3.disabled .x-icon.hack,.tree-expand-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-3.png) no-repeat}.tree-expand-icon-type4 .x-icon,.tree-expand-icon-type4:active .x-icon,.tree-expand-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-4.png) no-repeat;background-size:contain}.tree-expand-icon-type4 .x-icon.hack,.tree-expand-icon-type4:active .x-icon.hack,.tree-expand-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-4.png) no-repeat}.tree-expand-icon-type4.disabled .x-icon,.tree-expand-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-4.png) no-repeat;background-size:contain}.tree-expand-icon-type4.disabled .x-icon.hack,.tree-expand-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-4.png) no-repeat}.tree-vertical-line-type2 .x-icon,.tree-vertical-line-type2:active .x-icon,.tree-vertical-line-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-2.png) no-repeat;background-size:contain}.tree-vertical-line-type2 .x-icon.hack,.tree-vertical-line-type2:active .x-icon.hack,.tree-vertical-line-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png) no-repeat}.tree-vertical-line-type2.disabled .x-icon,.tree-vertical-line-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-2.png) no-repeat;background-size:contain}.tree-vertical-line-type2.disabled .x-icon.hack,.tree-vertical-line-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png) no-repeat}.tree-vertical-line-type3 .x-icon,.tree-vertical-line-type3:active .x-icon,.tree-vertical-line-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-3.png) no-repeat;background-size:contain}.tree-vertical-line-type3 .x-icon.hack,.tree-vertical-line-type3:active .x-icon.hack,.tree-vertical-line-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png) no-repeat}.tree-vertical-line-type3.disabled .x-icon,.tree-vertical-line-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-3.png) no-repeat;background-size:contain}.tree-vertical-line-type3.disabled .x-icon.hack,.tree-vertical-line-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png) no-repeat}.tree-vertical-line-type4 .x-icon,.tree-vertical-line-type4:active .x-icon,.tree-vertical-line-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-4.png) no-repeat;background-size:contain}.tree-vertical-line-type4 .x-icon.hack,.tree-vertical-line-type4:active .x-icon.hack,.tree-vertical-line-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png) no-repeat}.tree-vertical-line-type4.disabled .x-icon,.tree-vertical-line-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-4.png) no-repeat;background-size:contain}.tree-vertical-line-type4.disabled .x-icon.hack,.tree-vertical-line-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type1 .x-icon,.bi-theme-dark .tree-collapse-icon-type1:active .x-icon,.bi-theme-dark .tree-collapse-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type1 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type1:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-1.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type1.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type1.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-1.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type2 .x-icon,.bi-theme-dark .tree-collapse-icon-type2:active .x-icon,.bi-theme-dark .tree-collapse-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type2 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type2:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-2.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type2.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type2.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-2.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type3 .x-icon,.bi-theme-dark .tree-collapse-icon-type3:active .x-icon,.bi-theme-dark .tree-collapse-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type3 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type3:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-3.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type3.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type3.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-3.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type4 .x-icon,.bi-theme-dark .tree-collapse-icon-type4:active .x-icon,.bi-theme-dark .tree-collapse-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type4 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type4:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-4.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type4.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type4.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-4.png) no-repeat}.bi-theme-dark .tree-expand-icon-type1 .x-icon,.bi-theme-dark .tree-expand-icon-type1:active .x-icon,.bi-theme-dark .tree-expand-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type1 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type1:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-1.png) no-repeat}.bi-theme-dark .tree-expand-icon-type1.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type1.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-1.png) no-repeat}.bi-theme-dark .tree-expand-icon-type2 .x-icon,.bi-theme-dark .tree-expand-icon-type2:active .x-icon,.bi-theme-dark .tree-expand-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type2 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type2:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-2.png) no-repeat}.bi-theme-dark .tree-expand-icon-type2.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type2.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-2.png) no-repeat}.bi-theme-dark .tree-expand-icon-type3 .x-icon,.bi-theme-dark .tree-expand-icon-type3:active .x-icon,.bi-theme-dark .tree-expand-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type3 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type3:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-3.png) no-repeat}.bi-theme-dark .tree-expand-icon-type3.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type3.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-3.png) no-repeat}.bi-theme-dark .tree-expand-icon-type4 .x-icon,.bi-theme-dark .tree-expand-icon-type4:active .x-icon,.bi-theme-dark .tree-expand-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type4 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type4:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-4.png) no-repeat}.bi-theme-dark .tree-expand-icon-type4.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type4.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-4.png) no-repeat}.bi-theme-dark .tree-vertical-line-type2 .x-icon,.bi-theme-dark .tree-vertical-line-type2:active .x-icon,.bi-theme-dark .tree-vertical-line-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type2 .x-icon.hack,.bi-theme-dark .tree-vertical-line-type2:active .x-icon.hack,.bi-theme-dark .tree-vertical-line-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png) no-repeat}.bi-theme-dark .tree-vertical-line-type2.disabled .x-icon,.bi-theme-dark .tree-vertical-line-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type2.disabled .x-icon.hack,.bi-theme-dark .tree-vertical-line-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png) no-repeat}.bi-theme-dark .tree-vertical-line-type3 .x-icon,.bi-theme-dark .tree-vertical-line-type3:active .x-icon,.bi-theme-dark .tree-vertical-line-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type3 .x-icon.hack,.bi-theme-dark .tree-vertical-line-type3:active .x-icon.hack,.bi-theme-dark .tree-vertical-line-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png) no-repeat}.bi-theme-dark .tree-vertical-line-type3.disabled .x-icon,.bi-theme-dark .tree-vertical-line-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type3.disabled .x-icon.hack,.bi-theme-dark .tree-vertical-line-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png) no-repeat}.bi-theme-dark .tree-vertical-line-type4 .x-icon,.bi-theme-dark .tree-vertical-line-type4:active .x-icon,.bi-theme-dark .tree-vertical-line-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type4 .x-icon.hack,.bi-theme-dark .tree-vertical-line-type4:active .x-icon.hack,.bi-theme-dark .tree-vertical-line-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png) no-repeat}.bi-theme-dark .tree-vertical-line-type4.disabled .x-icon,.bi-theme-dark .tree-vertical-line-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type4.disabled .x-icon.hack,.bi-theme-dark .tree-vertical-line-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png) no-repeat}.check-box-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-normal.png) no-repeat;background-size:contain}.check-box-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-normal.png) no-repeat}.check-box-icon.hover .x-icon,.check-box-icon:focus .x-icon,.check-box-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-normal.png) no-repeat;background-size:contain}.check-box-icon.hover .x-icon.hack,.check-box-icon:focus .x-icon.hack,.check-box-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-normal.png) no-repeat}.check-box-icon.active .x-icon,.check-box-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-active.png) no-repeat;background-size:contain}.check-box-icon.active .x-icon.hack,.check-box-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-active.png) no-repeat}.check-box-icon.disabled .x-icon,.check-box-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-disable.png) no-repeat;background-size:contain}.check-box-icon.disabled .x-icon.hack,.check-box-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-disable.png) no-repeat}.check-box-icon.disabled.active .x-icon,.check-box-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-disable2.png) no-repeat;background-size:contain}.check-box-icon.disabled.active .x-icon.hack,.check-box-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-disable2.png) no-repeat}.radio-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-normal.png) no-repeat;background-size:contain}.radio-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-normal.png) no-repeat}.radio-icon.hover .x-icon,.radio-icon:focus .x-icon,.radio-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-normal.png) no-repeat;background-size:contain}.radio-icon.hover .x-icon.hack,.radio-icon:focus .x-icon.hack,.radio-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-normal.png) no-repeat}.radio-icon.active .x-icon,.radio-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-active.png) no-repeat;background-size:contain}.radio-icon.active .x-icon.hack,.radio-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-active.png) no-repeat}.radio-icon.disabled .x-icon,.radio-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-disable.png) no-repeat;background-size:contain}.radio-icon.disabled .x-icon.hack,.radio-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-disable.png) no-repeat}.radio-icon.disabled.active .x-icon,.radio-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-disable2.png) no-repeat;background-size:contain}.radio-icon.disabled.active .x-icon.hack,.radio-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-disable2.png) no-repeat}.check-half-select-icon .x-icon,.check-half-select-icon:active .x-icon,.check-half-select-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/half_selected.png) no-repeat;background-size:contain}.check-half-select-icon .x-icon.hack,.check-half-select-icon:active .x-icon.hack,.check-half-select-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) no-repeat}.check-half-select-icon.disabled .x-icon,.check-half-select-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/half_selected.png) no-repeat;background-size:contain}.check-half-select-icon.disabled .x-icon.hack,.check-half-select-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) no-repeat}.farbtastic{position:relative}.farbtastic *{position:absolute;cursor:crosshair}.farbtastic,.farbtastic .wheel{width:195px;height:195px}.farbtastic .color,.farbtastic .overlay{top:47px;left:47px;width:101px;height:101px}.farbtastic .wheel{background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/farbtastic/wheel.png) no-repeat;width:195px;height:195px}.farbtastic .overlay{background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/farbtastic/mask.png) no-repeat}.farbtastic .marker{width:17px;height:17px;margin:-8px 0 0 -8px;overflow:hidden;background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/farbtastic/marker.png) no-repeat}.bi-display-tree .ztree *{color:#999}.bi-display-tree .ztree li span.button.switch.center_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x//icon/tree-vertical-line-3.png)}.bi-display-tree .ztree li span.button.switch.roots_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x//icon/tree-vertical-line-2.png)}.bi-display-tree .ztree li span.button.switch.bottom_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x//icon/tree-vertical-line-4.png)}.bi-display-tree .ztree li a,.bi-display-tree .ztree li span{cursor:default!important}.ztree li a,.ztree li span.button{cursor:pointer;display:inline-block}.bi-display-tree .ztree li a.curSelectedNode{padding-top:1px;border:none;background-color:inherit;opacity:1;filter:alpha(opacity=100)}.ztree li a.tmpTargetNode_inner,ul.tmpTargetzTree,ul.ztree.zTreeDragUL{opacity:.8;filter:alpha(opacity=80)}.ztree *{padding:0;margin:0}.ztree{margin:0;padding:5px}.ztree li{padding:0;margin:0;list-style:none;line-height:14px;text-align:left;outline:0}.ztree li ul{margin:0;padding:0 0 0 18px}.ztree li ul.line{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-1.png) repeat-y}.bi-theme-dark .ztree li ul.line{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-1.png) repeat-y}.ztree li a{padding:1px 3px 0 0;margin:0;height:24px;background-color:transparent;vertical-align:top}.ztree li a.curSelectedNode_Edit{padding-top:0;background-color:#FFE6B0;color:#000;height:16px;border:1px solid #FFB951;opacity:.8}.ztree li a.tmpTargetNode_inner{padding-top:0;background-color:#316AC5;color:#fff;height:16px;border:1px solid #316AC5}.ztree li a input.rename{height:14px;width:80px;padding:0;margin:0;font-size:12px;border:1px solid #7EC4CC}.ztree li span{line-height:24px;margin-right:2px}.ztree li span.button{line-height:0;margin:0;width:16px;height:16px;vertical-align:middle;border:0;outline:0;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/third/ztree/img/zTreeStandard.png)}.ztree li span.button.chk{width:16px;height:16px;margin:0 3px 0 0;cursor:auto}.ztree li span.button.chk.checkbox_false_full,.ztree li span.button.chk.checkbox_false_full_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-normal.png)}.ztree li span.button.chk.checkbox_false_part,.ztree li span.button.chk.checkbox_false_part_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png)}.ztree li span.button.chk.checkbox_false_disable{background-position:0 -56px}.ztree li span.button.chk.checkbox_true_full,.ztree li span.button.chk.checkbox_true_full_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-active.png)}.ztree li span.button.chk.checkbox_true_part,.ztree li span.button.chk.checkbox_true_part_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png)}.ztree li span.button.chk.checkbox_true_disable{background-position:-14px -56px}.ztree li span.button.chk.radio_false_full{background-position:-28px 0}.ztree li span.button.chk.radio_false_full_focus{background-position:-28px -14px}.ztree li span.button.chk.radio_false_part{background-position:-28px -28px}.ztree li span.button.chk.radio_false_part_focus{background-position:-28px -42px}.ztree li span.button.chk.radio_false_disable{background-position:-28px -56px}.ztree li span.button.chk.radio_true_full{background-position:-42px 0}.ztree li span.button.chk.radio_true_full_focus{background-position:-42px -14px}.ztree li span.button.chk.radio_true_part{background-position:-42px -28px}.ztree li span.button.chk.radio_true_part_focus{background-position:-42px -42px}.ztree li span.button.chk.radio_true_disable{background-position:-42px -56px}.ztree li span.button.switch{width:25px;height:25px}.ztree li span.button.root_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-1.png)}.bi-theme-dark .ztree li span.button.root_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-1.png)}.ztree li span.button.root_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-1.png)}.bi-theme-dark .ztree li span.button.root_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-1.png)}.ztree li span.button.roots_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-2.png)}.bi-theme-dark .ztree li span.button.roots_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-2.png)}.ztree li span.button.roots_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-2.png)}.bi-theme-dark .ztree li span.button.roots_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-2.png)}.ztree li span.button.center_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-3.png)}.bi-theme-dark .ztree li span.button.center_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-3.png)}.ztree li span.button.center_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-3.png)}.bi-theme-dark .ztree li span.button.center_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-3.png)}.ztree li span.button.bottom_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-4.png)}.bi-theme-dark .ztree li span.button.bottom_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-4.png)}.ztree li span.button.bottom_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-4.png)}.bi-theme-dark .ztree li span.button.bottom_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-4.png)}.ztree li span.button.noline_open{background-position:-92px -72px}.ztree li span.button.noline_close{background-position:-74px -72px}.ztree li span.button.root_docu{background:0 0}.ztree li span.button.roots_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png)}.bi-theme-dark .ztree li span.button.roots_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png)}.ztree li span.button.center_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png)}.bi-theme-dark .ztree li span.button.center_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png)}.ztree li span.button.bottom_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png)}.bi-theme-dark .ztree li span.button.bottom_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png)}.ztree li span.button.noline_docu{background:0 0}.ztree li span.button.ico_open{margin-right:2px;background-position:-110px -16px;vertical-align:top}.ztree li span.button.ico_close{margin-right:2px;background-position:-110px 0;vertical-align:top}.ztree li span.button.ico_docu{margin-right:2px;background-position:-110px -32px;vertical-align:top}.ztree li span.button.edit{margin-right:2px;background-position:-110px -48px;vertical-align:top}.ztree li span.button.remove{margin-right:2px;background-position:-110px -64px;vertical-align:top}.ztree li span.button.ico_loading{width:0;margin-right:2px;background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/ztree/img/loading.gif) no-repeat;vertical-align:top}ul.tmpTargetzTree{background-color:#FFE6B0}span.tmpzTreeMove_arrow{width:16px;height:16px;display:inline-block;padding:0;margin:2px 0 0 1px;border:0;position:absolute;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-110px -80px;background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/third/ztree/img/zTreeStandard.png)}.zTreeMask,ul.ztree.zTreeDragUL{background-color:#cfcfcf;position:absolute}ul.ztree.zTreeDragUL{margin:0;padding:0;width:auto;height:auto;overflow:hidden;border:1px dotted #00B83F}.zTreeMask{z-index:10000;opacity:0;filter:alpha(opacity=0)} \ No newline at end of file +/*! normalize.css v1.0.0 | MIT License | git.io/normalize */dl,h3,menu,ol,p,pre,ul{margin:1em 0}.b-font,i{-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.bi-button,.horizon-center{text-align:center}.bi-label,.bi-text,.overflow-dot{text-overflow:ellipsis}.bi-excel-table-header-cell,.bi-preview-table-header-cell,.cm-header,.cm-strong,b,strong{font-weight:700}.b-font,body,i{-moz-osx-font-smoothing:grayscale}.CodeMirror-code,.CodeMirror-scroll,.bi-input,a,a:active,a:focus,a:hover,input,textarea{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.75em;margin:2.33em 0}abbr[title]{border-bottom:1px dotted}blockquote{margin:1em 40px}dfn{font-style:italic}mark{background:#ff0;color:#000}.base-disabled,.base-disabled .b-font:before,.base-disabled .bi-input,.base-disabled .bi-textarea{color:#ccc!important}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}small,sub,sup{font-size:75%}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:after,q:before{content:'';content:none}sub,sup{line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ol,nav ul{list-style:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure,form{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline}button,input{line-height:normal}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],input[disabled]{cursor:default}.base-disabled,.base-invalid{cursor:default!important}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.bi-collection-table-cell,.bi-text,.border-sizing{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}*,a,body,div,html,img,li,ol,p,span,ul{margin:0;padding:0}a{text-decoration:none}input,textarea{margin:0;padding:0;border:1px solid #d4dadd}.bi-theme-dark input,.bi-theme-dark textarea{border:1px solid #525466}ul{list-style:disc}li{list-style-type:none}i{font-style:normal;-webkit-font-smoothing:antialiased}.bi-theme-dark .base-disabled,.bi-theme-dark .base-disabled .b-font:before,.bi-theme-dark .base-disabled .bi-input,.bi-theme-dark .base-disabled .bi-textarea{color:#666!important}.clearfix:after,.clearfix:before{content:" ";display:table;line-height:0}.clearfix:after{clear:both}.bi-background{background-color:#eff1f4;color:#666}.bi-background .bi-input,.bi-background .bi-textarea{color:#666}.bi-theme-dark .bi-background{background-color:#191b2b;color:#ccc}.bi-theme-dark .bi-background .bi-input,.bi-theme-dark .bi-background .bi-textarea{color:#ccc}.bi-card,.bi-card .bi-input,.bi-card .bi-textarea{color:#666}.bi-card{background-color:#fff}.bi-theme-dark .bi-card{background-color:#242640;color:#ccc}.bi-disabled,.bi-disabled .bi-input,.bi-disabled .bi-textarea,.bi-theme-dark .bi-card .bi-input,.bi-theme-dark .bi-card .bi-textarea{color:#ccc}.bi-theme-dark .bi-disabled,.bi-theme-dark .bi-disabled .bi-input,.bi-theme-dark .bi-disabled .bi-textarea{color:#666}.bi-tips,.bi-tips .bi-input,.bi-tips .bi-textarea{color:#999}.bi-border{border:1px solid #d4dadd}.bi-theme-dark .bi-border{border:1px solid #525466}.bi-border-left{border-left:1px solid #d4dadd}.bi-theme-dark .bi-border-left{border-left:1px solid #525466}.bi-border-right{border-right:1px solid #d4dadd}.bi-theme-dark .bi-border-right{border-right:1px solid #525466}.bi-border-top{border-top:1px solid #d4dadd}.bi-theme-dark .bi-border-top{border-top:1px solid #525466}.bi-border-bottom{border-bottom:1px solid #d4dadd}.bi-theme-dark .bi-border-bottom{border-bottom:1px solid #525466}.bi-keyword-red-mark,.bi-keyword-red-mark .bi-input,.bi-keyword-red-mark .bi-textarea{color:#f07d0a}.bi-high-light,.bi-high-light .bi-input,.bi-high-light .bi-textarea{color:#3f8ce8}.bi-high-light-background{background-color:#3f8ce8;color:#fff}.bi-high-light-background .bi-input,.bi-high-light-background .bi-textarea{color:#fff}.bi-high-light-border{border-color:#178cdf}.bi-water-mark{color:#ccc;cursor:text}.bi-water-mark .bi-input,.bi-water-mark .bi-textarea{color:#ccc}.bi-theme-dark .bi-water-mark,.bi-theme-dark .bi-water-mark .bi-input,.bi-theme-dark .bi-water-mark .bi-textarea{color:#666}.bi-mask,.bi-mask .bi-input,.bi-mask .bi-textarea{color:#fff}.bi-resizer{background:#1a1a1a;opacity:.2;filter:alpha(opacity=20);z-index:1000000000!important}.bi-theme-dark .bi-resizer{background:#fff}.bi-mask{background-color:rgba(26,26,26,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#331a1a1a, endColorstr=#331a1a1a)}.bi-theme-dark .bi-mask{color:#242640;background-color:rgba(255,255,255,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#33ffffff, endColorstr=#33ffffff)}.bi-theme-dark .bi-mask .bi-input,.bi-theme-dark .bi-mask .bi-textarea{color:#242640}.bi-z-index-mask{color:#fff;background-color:rgba(26,26,26,.5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#801a1a1a, endColorstr=#801a1a1a)}.bi-z-index-mask .bi-input,.bi-z-index-mask .bi-textarea{color:#fff}.bi-list-item.hover,.bi-list-item:hover{color:#1a1a1a;background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-list-item.hover .bi-input,.bi-list-item.hover .bi-textarea,.bi-list-item:hover .bi-input,.bi-list-item:hover .bi-textarea{color:#1a1a1a}.bi-list-item.disabled,.bi-list-item.disabled:active,.bi-list-item.disabled:hover{background-color:transparent!important;color:#ccc!important}.bi-list-item.disabled .bi-high-light,.bi-list-item.disabled .bi-input,.bi-list-item.disabled .bi-textarea,.bi-list-item.disabled:active .bi-high-light,.bi-list-item.disabled:active .bi-input,.bi-list-item.disabled:active .bi-textarea,.bi-list-item.disabled:hover .bi-high-light,.bi-list-item.disabled:hover .bi-input,.bi-list-item.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item.hover,.bi-theme-dark .bi-list-item:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item.hover .bi-input,.bi-theme-dark .bi-list-item.hover .bi-textarea,.bi-theme-dark .bi-list-item:hover .bi-input,.bi-theme-dark .bi-list-item:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item.disabled,.bi-theme-dark .bi-list-item.disabled:active,.bi-theme-dark .bi-list-item.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item.disabled .bi-high-light,.bi-theme-dark .bi-list-item.disabled .bi-input,.bi-theme-dark .bi-list-item.disabled .bi-textarea,.bi-theme-dark .bi-list-item.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item.disabled:active .bi-input,.bi-theme-dark .bi-list-item.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item.disabled:hover .bi-input,.bi-theme-dark .bi-list-item.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-border.active,.bi-list-item-border:active{border:1px solid #178cdf}.bi-list-item-simple,.bi-list-item-simple .bi-input,.bi-list-item-simple .bi-textarea{color:#999}.bi-list-item-simple.hover,.bi-list-item-simple.hover .bi-input,.bi-list-item-simple.hover .bi-textarea,.bi-list-item-simple:hover,.bi-list-item-simple:hover .bi-input,.bi-list-item-simple:hover .bi-textarea{color:#3f8ce8}.bi-list-item-simple.disabled,.bi-list-item-simple.disabled .bi-high-light,.bi-list-item-simple.disabled .bi-input,.bi-list-item-simple.disabled .bi-textarea,.bi-list-item-simple.disabled:active,.bi-list-item-simple.disabled:active .bi-high-light,.bi-list-item-simple.disabled:active .bi-input,.bi-list-item-simple.disabled:active .bi-textarea,.bi-list-item-simple.disabled:hover,.bi-list-item-simple.disabled:hover .bi-high-light,.bi-list-item-simple.disabled:hover .bi-input,.bi-list-item-simple.disabled:hover .bi-textarea{color:#ccc!important}.bi-list-item-effect:hover,.bi-list-item-effect:hover .bi-input,.bi-list-item-effect:hover .bi-textarea{color:#1a1a1a}.bi-list-item-effect.active,.bi-list-item-effect.active .bi-input,.bi-list-item-effect.active .bi-textarea,.bi-list-item-effect:active,.bi-list-item-effect:active .bi-input,.bi-list-item-effect:active .bi-textarea{color:#3f8ce8}.bi-list-item-effect.disabled,.bi-list-item-effect.disabled .bi-high-light,.bi-list-item-effect.disabled .bi-input,.bi-list-item-effect.disabled .bi-textarea,.bi-list-item-effect.disabled:active,.bi-list-item-effect.disabled:active .bi-high-light,.bi-list-item-effect.disabled:active .bi-input,.bi-list-item-effect.disabled:active .bi-textarea,.bi-list-item-effect.disabled:hover,.bi-list-item-effect.disabled:hover .bi-high-light,.bi-list-item-effect.disabled:hover .bi-input,.bi-list-item-effect.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-effect:hover,.bi-theme-dark .bi-list-item-effect:hover .bi-input,.bi-theme-dark .bi-list-item-effect:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-effect.active,.bi-theme-dark .bi-list-item-effect.active .bi-input,.bi-theme-dark .bi-list-item-effect.active .bi-textarea,.bi-theme-dark .bi-list-item-effect:active,.bi-theme-dark .bi-list-item-effect:active .bi-input,.bi-theme-dark .bi-list-item-effect:active .bi-textarea{color:#3f8ce8}.bi-theme-dark .bi-list-item-effect.disabled,.bi-theme-dark .bi-list-item-effect.disabled:active,.bi-theme-dark .bi-list-item-effect.disabled:hover{background-color:transparent!important;color:#666!important}.bi-list-item-active.active,.bi-list-item-active.hover,.bi-list-item-active:active,.bi-list-item-active:hover{background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-theme-dark .bi-list-item-effect.disabled .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled .bi-input,.bi-theme-dark .bi-list-item-effect.disabled .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active.hover,.bi-list-item-active.hover .bi-input,.bi-list-item-active.hover .bi-textarea,.bi-list-item-active:hover,.bi-list-item-active:hover .bi-input,.bi-list-item-active:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active.active,.bi-list-item-active.active .bi-input,.bi-list-item-active.active .bi-textarea,.bi-list-item-active:active,.bi-list-item-active:active .bi-input,.bi-list-item-active:active .bi-textarea{color:#3f8ce8}.bi-list-item-active.disabled,.bi-list-item-active.disabled:active,.bi-list-item-active.disabled:hover{background-color:transparent!important;color:#ccc!important}.bi-list-item-active.disabled .bi-high-light,.bi-list-item-active.disabled .bi-input,.bi-list-item-active.disabled .bi-textarea,.bi-list-item-active.disabled:active .bi-high-light,.bi-list-item-active.disabled:active .bi-input,.bi-list-item-active.disabled:active .bi-textarea,.bi-list-item-active.disabled:hover .bi-high-light,.bi-list-item-active.disabled:hover .bi-input,.bi-list-item-active.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-active.hover,.bi-theme-dark .bi-list-item-active:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.hover .bi-input,.bi-theme-dark .bi-list-item-active.hover .bi-textarea,.bi-theme-dark .bi-list-item-active:hover .bi-input,.bi-theme-dark .bi-list-item-active:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active.active,.bi-theme-dark .bi-list-item-active:active{color:#3f8ce8;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.active .bi-input,.bi-theme-dark .bi-list-item-active.active .bi-textarea,.bi-theme-dark .bi-list-item-active:active .bi-input,.bi-theme-dark .bi-list-item-active:active .bi-textarea{color:#3f8ce8}.bi-theme-dark .bi-list-item-active.disabled,.bi-theme-dark .bi-list-item-active.disabled:active,.bi-theme-dark .bi-list-item-active.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled .bi-input,.bi-theme-dark .bi-list-item-active.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active2.hover,.bi-list-item-active2:hover{color:#1a1a1a;background-color:#fff}.bi-list-item-active2.hover .bi-input,.bi-list-item-active2.hover .bi-textarea,.bi-list-item-active2:hover .bi-input,.bi-list-item-active2:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active2.active,.bi-list-item-active2:active{color:#3f8ce8;background-color:#fff}.bi-list-item-active2.active .bi-input,.bi-list-item-active2.active .bi-textarea,.bi-list-item-active2:active .bi-input,.bi-list-item-active2:active .bi-textarea{color:#3f8ce8}.bi-list-item-active2.disabled,.bi-list-item-active2.disabled:active,.bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#ccc!important}.bi-list-item-active2.disabled .bi-high-light,.bi-list-item-active2.disabled .bi-input,.bi-list-item-active2.disabled .bi-textarea,.bi-list-item-active2.disabled:active .bi-high-light,.bi-list-item-active2.disabled:active .bi-input,.bi-list-item-active2.disabled:active .bi-textarea,.bi-list-item-active2.disabled:hover .bi-high-light,.bi-list-item-active2.disabled:hover .bi-input,.bi-list-item-active2.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-active2.hover,.bi-theme-dark .bi-list-item-active2:hover{color:#fff;background-color:#242640}.bi-theme-dark .bi-list-item-active2.hover .bi-input,.bi-theme-dark .bi-list-item-active2.hover .bi-textarea,.bi-theme-dark .bi-list-item-active2:hover .bi-input,.bi-theme-dark .bi-list-item-active2:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active2.active,.bi-theme-dark .bi-list-item-active2:active{color:#3f8ce8;background-color:#242640}.bi-theme-dark .bi-list-item-active2.active .bi-input,.bi-theme-dark .bi-list-item-active2.active .bi-textarea,.bi-theme-dark .bi-list-item-active2:active .bi-input,.bi-theme-dark .bi-list-item-active2:active .bi-textarea{color:#3f8ce8}.bi-theme-dark .bi-list-item-active2.disabled,.bi-theme-dark .bi-list-item-active2.disabled:active,.bi-theme-dark .bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active2.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled .bi-input,.bi-theme-dark .bi-list-item-active2.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-select.hover,.bi-list-item-select:hover{color:#1a1a1a;background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-list-item-select.hover .bi-input,.bi-list-item-select.hover .bi-textarea,.bi-list-item-select:hover .bi-input,.bi-list-item-select:hover .bi-textarea{color:#1a1a1a}.bi-list-item-select.active,.bi-list-item-select:active{color:#fff;background-color:#3f8ce8}.bi-list-item-select.active .bi-high-light,.bi-list-item-select.active .bi-input,.bi-list-item-select.active .bi-textarea,.bi-list-item-select:active .bi-high-light,.bi-list-item-select:active .bi-input,.bi-list-item-select:active .bi-textarea{color:#fff}.bi-list-item-select.disabled,.bi-list-item-select.disabled:active,.bi-list-item-select.disabled:hover{color:#ccc!important;background-color:transparent!important}.bi-list-item-select.disabled .bi-high-light,.bi-list-item-select.disabled .bi-input,.bi-list-item-select.disabled .bi-textarea,.bi-list-item-select.disabled:active .bi-high-light,.bi-list-item-select.disabled:active .bi-input,.bi-list-item-select.disabled:active .bi-textarea,.bi-list-item-select.disabled:hover .bi-high-light,.bi-list-item-select.disabled:hover .bi-input,.bi-list-item-select.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-select.hover,.bi-theme-dark .bi-list-item-select:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-select.hover .bi-input,.bi-theme-dark .bi-list-item-select.hover .bi-textarea,.bi-theme-dark .bi-list-item-select:hover .bi-input,.bi-theme-dark .bi-list-item-select:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.active,.bi-theme-dark .bi-list-item-select:active{color:#fff;background-color:#3f8ce8}.bi-theme-dark .bi-list-item-select.active .bi-high-light,.bi-theme-dark .bi-list-item-select.active .bi-input,.bi-theme-dark .bi-list-item-select.active .bi-textarea,.bi-theme-dark .bi-list-item-select:active .bi-high-light,.bi-theme-dark .bi-list-item-select:active .bi-input,.bi-theme-dark .bi-list-item-select:active .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.disabled,.bi-theme-dark .bi-list-item-select.disabled:active,.bi-theme-dark .bi-list-item-select.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-select.disabled .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled .bi-input,.bi-theme-dark .bi-list-item-select.disabled .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:active .bi-input,.bi-theme-dark .bi-list-item-select.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-none.hover,.bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-list-item-none.hover .bi-input,.bi-list-item-none.hover .bi-textarea,.bi-list-item-none:hover .bi-input,.bi-list-item-none:hover .bi-textarea{color:inherit}.bi-list-item-none.active,.bi-list-item-none:active{color:inherit;background-color:transparent}.bi-list-item-none.active .bi-high-light,.bi-list-item-none.active .bi-input,.bi-list-item-none.active .bi-textarea,.bi-list-item-none:active .bi-high-light,.bi-list-item-none:active .bi-input,.bi-list-item-none:active .bi-textarea{color:inherit}.bi-list-item-none.disabled,.bi-list-item-none.disabled:active,.bi-list-item-none.disabled:hover{color:#ccc!important;background-color:transparent!important}.bi-list-item-none.disabled .bi-high-light,.bi-list-item-none.disabled .bi-input,.bi-list-item-none.disabled .bi-textarea,.bi-list-item-none.disabled:active .bi-high-light,.bi-list-item-none.disabled:active .bi-input,.bi-list-item-none.disabled:active .bi-textarea,.bi-list-item-none.disabled:hover .bi-high-light,.bi-list-item-none.disabled:hover .bi-input,.bi-list-item-none.disabled:hover .bi-textarea{color:#ccc!important}.bi-theme-dark .bi-list-item-none.hover,.bi-theme-dark .bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.hover .bi-input,.bi-theme-dark .bi-list-item-none.hover .bi-textarea,.bi-theme-dark .bi-list-item-none:hover .bi-input,.bi-theme-dark .bi-list-item-none:hover .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.active,.bi-theme-dark .bi-list-item-none:active{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.active .bi-high-light,.bi-theme-dark .bi-list-item-none.active .bi-input,.bi-theme-dark .bi-list-item-none.active .bi-textarea,.bi-theme-dark .bi-list-item-none:active .bi-high-light,.bi-theme-dark .bi-list-item-none:active .bi-input,.bi-theme-dark .bi-list-item-none:active .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.disabled,.bi-theme-dark .bi-list-item-none.disabled:active,.bi-theme-dark .bi-list-item-none.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-none.disabled .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled .bi-input,.bi-theme-dark .bi-list-item-none.disabled .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:active .bi-input,.bi-theme-dark .bi-list-item-none.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-textarea{color:#666!important}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.cursor-move{cursor:move}.y-overflow-auto{overflow-y:auto;overflow-x:hidden}.x-overflow-auto{overflow-y:hidden;overflow-x:auto}.y-overflow-scroll{overflow-y:scroll;overflow-x:hidden}.x-overflow-scroll{overflow-y:hidden;overflow-x:scroll}.overflow-auto{overflow-x:auto;overflow-y:auto}.overflow-scroll{overflow-x:scroll;overflow-y:scroll}.overflow-dot,.overflow-hidden{overflow-x:hidden;overflow-y:hidden}.td-overflow{white-space:normal;word-break:break-all}.overflow-dot{white-space:nowrap}.display-block{display:block}.display-inline{display:inline-block}.vertical-super{vertical-align:super}.vertical-top{vertical-align:top}.horizon-left{text-align:left}.border-sizing{-ms-box-sizing:border-box;box-sizing:border-box}.content-sizing{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;-ms-box-sizing:content-box;box-sizing:content-box}.bi-flex-center-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:flex-start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-horizontal-layout.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-vertical-center{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;min-width:100%;min-height:100%;float:left}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:flex-start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%;float:left}.bi-inline-center-adapt-layout:after,.bi-inline-vertical-adapt-layout:after{display:inline-block;width:0;min-height:100%;vertical-align:middle;content:' '}.cm-tab-wrap-hack:after,.scrollbar-layout-face:after{content:''}.bi-theme-dark{background-color:#191b2b;color:#ccc}.bi-theme-dark .bi-input{color:#fff}.bi-color-chooser-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.bi-color-picker-button .color-picker-button-mask{border:1px solid #1a1a1a}.bi-theme-dark .bi-color-picker-button .color-picker-button-mask{border:1px solid #fff}.bi-bubble-combo .bubble-combo-triangle-left,.bi-bubble-combo .bubble-combo-triangle-right{z-index:1;width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent}.bi-color-picker-editor .color-picker-editor-display{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.bi-bubble-combo .button-combo-triangle-wrapper{position:fixed!important}.bi-bubble-combo .bubble-combo-triangle-left{border-left:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-right{border-right:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-bottom,.bi-bubble-combo .bubble-combo-triangle-top{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;z-index:1}.bi-bubble-combo .bubble-combo-triangle-top{border-top:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-bottom{border-bottom:6px solid #3f8ce8}.bi-bubble-popup-view{-webkit-box-shadow:0 0 10px rgba(0,0,0,.2);-moz-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2)}.CodeMirror{font-family:monospace;cursor:text;width:100%;height:100%}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #1a1a1a}.bi-theme-dark .CodeMirror div.CodeMirror-cursor{border-left:1px solid #fff}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}@-moz-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@-webkit-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default span[class*=fieldName]{color:#fff;padding:1px;margin:1px 0;background:#3f8ce8}.cm-s-default span[class*=start]{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;margin-left:3px}.cm-s-default span[class*=end]{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;margin-right:3px}.cm-s-default span[class*="start end"]{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.cm-s-default span[class*="#"]{color:#3f8ce8}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}.bi-message-text,.bi-page-table-cell{-webkit-user-select:text;-ms-user-select:text;-o-user-select:text;-khtml-user-select:text}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}.codemirror-high-line-height{line-height:2}.codemirror-low-line-height{line-height:1.4}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;border-right:none;width:0}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}span.CodeMirror-selectedtext{background:0 0}.CodeMirror-hints{position:absolute;z-index:10000;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.bi-label,.bi-segment>.center-element,.bi-text,.bi-textarea-editor{overflow-x:hidden;overflow-y:hidden}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:#000;cursor:pointer}.bi-input,body{margin:0;padding:0}.bi-label,.bi-text,.ztree li{white-space:nowrap}li.CodeMirror-hint-active{background:#08f;color:#fff}.bi-message-title{font-size:16px;cursor:pointer}.bi-message-text{font-size:16px;-moz-user-select:text;user-select:text}.bi-message-content{font-size:16px}.bi-message-close{font-size:25px}.bi-multi-list-view .bi-button-mask{opacity:.1;filter:alpha(opacity=10)}.bi-panel{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-panel .panel-title .panel-title-text{cursor:text;font-size:14px}.bi-all-count-pager .all-pager-next,.bi-all-count-pager .all-pager-prev,.bi-direction-pager .direction-pager-next,.bi-direction-pager .direction-pager-prev{font-size:16px}.bi-pager .page-item{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-segment>.center-element{overflow:hidden;background:#fff;border-right:1px solid #d4dadd;border-top:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-segment>.first-element{border-left:1px solid #d4dadd;-webkit-border-radius:6px 0 0 6px;-moz-border-radius:6px 0 0 6px;border-radius:6px 0 0 6px}.bi-segment>.last-element{-webkit-border-radius:0 6px 6px 0;-moz-border-radius:0 6px 6px 0;border-radius:0 6px 6px 0}.bi-theme-dark .bi-segment>.center-element{overflow:hidden;overflow-x:hidden;overflow-y:hidden;background:#242640;border-right:1px solid #525466;border-top:1px solid #525466;border-bottom:1px solid #525466}.bi-theme-dark .bi-segment>.first-element{border-left:1px solid #242640}.bi-button{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:1px solid #178cdf;background-color:#3f8ce8;vertical-align:middle;cursor:pointer;font-size:14px}.bi-button.block{font-size:inherit;border-width:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.bi-button.clear{font-size:inherit;border-width:0;background-color:transparent}.bi-button.clear:active,.bi-button.clear:hover{opacity:.75;filter:alpha(opacity=75)}.bi-button.button-common,.bi-button.button-common .b-font:before{color:#fff}.bi-button.button-common.clear,.bi-button.button-common.clear .b-font:before{color:#3f8ce8}.bi-button.button-ignore{background-color:#fff;border-color:#d4dadd}.bi-button.button-ignore,.bi-button.button-ignore .b-font:before{color:#1a1a1a}.bi-button.button-ignore.clear{background-color:transparent;border-width:0}.bi-button.button-success{background-color:#58cc7d;border-color:#58cc7d}.bi-button.button-success,.bi-button.button-success .b-font:before{color:#fff}.bi-button.button-success.clear{background-color:transparent;border-width:0}.bi-button.button-success.clear,.bi-button.button-success.clear .b-font:before{color:#0c6d23}.bi-button.button-warning{background-color:#e85050;border-color:#e85050}.bi-button.button-warning,.bi-button.button-warning .b-font:before{color:#fff}.bi-button.button-warning.clear{background-color:transparent;border-width:0}.bi-button.button-warning.clear,.bi-button.button-warning.clear .b-font:before{color:#e85050}.bi-button.button-common.disabled,.bi-button.button-common.disabled.base-disabled,.bi-button.button-success.disabled,.bi-button.button-success.disabled.base-disabled,.bi-button.button-warning.disabled,.bi-button.button-warning.disabled.base-disabled{background:#ccc!important;border-color:#ccc!important}.bi-button.button-common.disabled,.bi-button.button-common.disabled .b-font:before,.bi-button.button-common.disabled.base-disabled,.bi-button.button-common.disabled.base-disabled .b-font:before,.bi-button.button-success.disabled,.bi-button.button-success.disabled .b-font:before,.bi-button.button-success.disabled.base-disabled,.bi-button.button-success.disabled.base-disabled .b-font:before,.bi-button.button-warning.disabled,.bi-button.button-warning.disabled .b-font:before,.bi-button.button-warning.disabled.base-disabled,.bi-button.button-warning.disabled.base-disabled .b-font:before{color:#fff!important}.bi-button.button-common.disabled.clear,.bi-button.button-common.disabled.clear .b-font:before,.bi-button.button-ignore.disabled,.bi-button.button-ignore.disabled .b-font:before,.bi-button.button-ignore.disabled.clear,.bi-button.button-ignore.disabled.clear .b-font:before,.bi-button.button-success.disabled.clear,.bi-button.button-success.disabled.clear .b-font:before,.bi-button.button-warning.disabled.clear,.bi-button.button-warning.disabled.clear .b-font:before{color:#ccc!important}.bi-button.button-ignore.disabled{background:#fff!important;border-color:#d4dadd!important}.bi-button.button-common.disabled.clear,.bi-button.button-ignore.disabled.clear,.bi-button.button-success.disabled.clear,.bi-button.button-warning.disabled.clear{background:0 0!important;border-width:0!important}.bi-button.button-common.disabled.clear:active,.bi-button.button-common.disabled.clear:hover,.bi-button.button-ignore.disabled.clear:active,.bi-button.button-ignore.disabled.clear:hover,.bi-button.button-success.disabled.clear:active,.bi-button.button-success.disabled.clear:hover,.bi-button.button-warning.disabled.clear:active,.bi-button.button-warning.disabled.clear:hover{opacity:1;filter:alpha(opacity=100)}.bi-basic-button.button-common .bi-button-mask,.bi-basic-button.button-success .bi-button-mask,.bi-basic-button.button-warning .bi-button-mask{opacity:.2;filter:alpha(opacity=20);background-color:#fff}.bi-basic-button .bi-button-mask{opacity:.2;filter:alpha(opacity=20);background-color:#1a1a1a}.bi-single-select-icon-text-item.active .b-font:before,.bi-single-select-icon-text-item:active .b-font:before{color:#3f8ce8}.bi-editor{font-size:12px}.bi-multifile-editor .multifile-editor{text-align:right;cursor:pointer;font-size:100px;z-index:2}.bi-resizable-table .resizable-table-region-resizer,.bi-resizable-table-cell .resizable-table-cell-resizer-container{cursor:ew-resize;z-index:1}.bi-shelter-editor .shelter-editor-text,.bi-sign-editor .sign-editor-text{font-size:12px}.bi-textarea-editor{overflow:hidden}.bi-textarea-editor .textarea-editor-content{font-size:12px;border:none}.bi-bubble,.bi-toast{font-size:14px}.bi-file{opacity:0;filter:alpha(opacity=0);z-index:2}.bi-input{border:none;background-color:transparent;width:100%;height:100%}.bi-input.bi-input-focus{border:none}.bi-input.bi-input-error{border:none;color:#e85050!important}.bi-bubble .bubble-text,.bi-toast{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-label{word-break:break-all}.bi-text{-ms-box-sizing:border-box;box-sizing:border-box;word-wrap:break-word;word-break:break-word}.bi-bubble .bubble-text{border-radius:2px;background:#fddddd;color:#e85050}.bi-tip{position:fixed!important}.bi-toast{border-radius:2px}.bi-toast.toast-success{background:#e1f4e7;color:#0c6d23}.bi-toast.toast-warning{background:#fddddd;color:#e85050}.bi-tooltip{max-width:250px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;font-size:12px}.bi-tooltip.tooltip-success{background:#fff5c1;border:1px solid #fff5c1;color:#1a1a1a}.bi-tooltip.tooltip-warning{background:#fddddd;color:#e85050;border:1px solid #f4cbcb}.bi-table>div.bottom-left>div>div>table,.bi-table>div.bottom-right>div>div>table,.bi-table>div.top-left>div>div>table,.bi-table>div.top-right>div>div>table,.bi-table>div>div>table{border-right:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-collection-table-cell{-ms-box-sizing:border-box;box-sizing:border-box}.bi-grid-table-cell,.bi-sequence-table-dynamic-number .sequence-table-title-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box}.bi-collection-table-cell.first-row{border-top:1px solid #d4dadd}.bi-collection-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-collection-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-collection-table-cell.first-col{border-left:1px solid #525466}.bi-quick-collection-table>div>.bi-collection{overflow:hidden!important;overflow-x:hidden!important;overflow-y:hidden!important}.bi-table>.first-col{border-left:none}.bi-table>.first-row{border-top:none}.bi-theme-dark .bi-table>div.bottom-left>div>div>table,.bi-theme-dark .bi-table>div.bottom-right>div>div>table,.bi-theme-dark .bi-table>div.top-left>div>div>table,.bi-theme-dark .bi-table>div.top-right>div>div>table,.bi-theme-dark .bi-table>div>div>table{border-right:1px solid #525466;border-bottom:1px solid #525466}.bi-table>div>div>div>table,.bi-table>div>div>table{min-width:100%;clear:both;border-spacing:0;border-collapse:separate}.bi-table>div>div>div>table,.bi-table>div>div>div>table>*>*>td,.bi-table>div>div>div>table>*>*>th,.bi-table>div>div>table,.bi-table>div>div>table>*>*>td,.bi-table>div>div>table>*>*>th{vertical-align:middle;margin:0;padding:0}.bi-table>div>div>div>table>tbody>tr>td,.bi-table>div>div>div>table>thead>tr>td,.bi-table>div>div>table>tbody>tr>td,.bi-table>div>div>table>thead>tr>td{border-top:1px solid #d4dadd;border-left:1px solid #d4dadd}.bi-theme-dark .bi-table>div>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>div>table>thead>tr>td,.bi-theme-dark .bi-table>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>table>thead>tr>td{border-top:1px solid #525466;border-left:1px solid #525466}.bi-grid-table-cell{box-sizing:border-box}.bi-grid-table-cell.first-row{border-top:1px solid #d4dadd}.bi-grid-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-grid-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-grid-table-cell.first-col{border-left:1px solid #525466}.scrollbar-layout-main{box-sizing:border-box;outline:0;overflow:hidden;position:absolute;transition-duration:250ms;transition-timing-function:ease;user-select:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);border-radius:5px}.bi-theme-dark .scrollbar-layout-main{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-vertical{bottom:0;right:0;top:0;transition-property:background-color;width:10px}.scrollbar-layout-main-vertical.public-scrollbar-main-active,.scrollbar-layout-main-vertical:hover{width:10px}.scrollbar-layout-main-horizontal{bottom:0;height:10px;left:0;transition-property:background-color;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666)}.bi-theme-dark .scrollbar-layout-main-horizontal{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-horizontal.public-scrollbar-main-active,.scrollbar-layout-main-horizontal:hover{height:10px}body,html{height:100%}.scrollbar-layout-face{left:0;overflow:hidden;position:absolute;z-index:1}.scrollbar-layout-face:after{border-radius:6px;display:block;position:absolute;transition:background-color 250ms ease}.scrollbar-layout-face-horizontal{bottom:0;left:0;top:0}.scrollbar-layout-face-horizontal:after{bottom:2px;left:0;top:2px;width:100%}.scrollbar-layout-face-vertical{left:0;right:0;top:0}.scrollbar-layout-face-vertical:after{height:100%;left:2px;right:2px;top:0}.public-scrollbar-face:after{background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}.bi-theme-dark .public-scrollbar-face:after{background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.public-scrollbar-face-active:after,.public-scrollbar-main-active .public-scrollbar-face:after,.public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark .public-scrollbar-face-active:after,.bi-theme-dark .public-scrollbar-main-active .public-scrollbar-face:after,.bi-theme-dark .public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.horizontal-scrollbar{bottom:0;position:absolute}.bi-resizable-table-cell .resizable-table-cell-resizer-container.dragging .resizable-table-cell-resizer-knob,.bi-resizable-table-cell .resizable-table-cell-resizer-container:hover .resizable-table-cell-resizer-knob{background-color:#3f8ce8}.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob{background-color:#58cc7d}.bi-resizable-table .resizable-table-resizer{cursor:ew-resize;z-index:1;background-color:#3f8ce8}.bi-resizable-table .resizable-table-resizer.suitable{background-color:#58cc7d}.bi-resizable-table .resizable-table-region-resizer.dragging .resizable-table-region-resizer-knob,.bi-resizable-table .resizable-table-region-resizer:hover .resizable-table-region-resizer-knob{background-color:#3f8ce8}.bi-branch-tree .bi-branch-tree-view{min-width:300px}.bi-trigger .bi-trigger-icon-button{font-size:16px}.bi-select-text-trigger,.bi-small-select-text-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-popup-view{position:fixed!important;overflow-y:visible!important;overflow-x:visible!important;overflow:visible!important;cursor:default}.bi-popup-view .list-view-outer{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-popup-view .list-view-toolbar{line-height:30px}.bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #d4dadd}.bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-theme-dark .bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-search-editor,.bi-text-editor{border:1px solid #d4dadd}.bi-arrangement .arrangement-helper{background:#3f8ce8;z-index:1000000000}.bi-arrangement .arrangement-block,.bi-arrangement .arrangement-drop-container{z-index:1000000000}.bi-arrangement .arrangement-drop-container .arrangement-drop-region{overflow:hidden}.bi-arrangement .arrangement-drop-container .bottom-center,.bi-arrangement .arrangement-drop-container .bottom-center-second,.bi-arrangement .arrangement-drop-container .bottom-left,.bi-arrangement .arrangement-drop-container .bottom-left-second,.bi-arrangement .arrangement-drop-container .bottom-right,.bi-arrangement .arrangement-drop-container .bottom-right-second,.bi-arrangement .arrangement-drop-container .drop-devider,.bi-arrangement .arrangement-drop-container .left-center,.bi-arrangement .arrangement-drop-container .left-center-second,.bi-arrangement .arrangement-drop-container .right-center,.bi-arrangement .arrangement-drop-container .right-center-second,.bi-arrangement .arrangement-drop-container .top-center,.bi-arrangement .arrangement-drop-container .top-center-second,.bi-arrangement .arrangement-drop-container .top-left,.bi-arrangement .arrangement-drop-container .top-left-second,.bi-arrangement .arrangement-drop-container .top-right,.bi-arrangement .arrangement-drop-container .top-right-second{z-index:1000000001;background:#3f8ce8}.bi-arrangement-droppable{z-index:100000}.bi-adapt-editor .adapt-editor-text{font-size:14px}.bi-search-editor .close-font,.bi-search-editor .search-font{font-size:20px}.bi-small-search-editor .bi-editor,.bi-small-search-editor .bi-editor .bi-input,.bi-small-search-editor .bi-editor .bi-label{font-size:12px}.bi-small-search-editor .close-font,.bi-small-search-editor .search-font{font-size:18px}.bi-sign-initial-editor .sign-initial-editor-text{font-size:14px}.bi-sign-style-editor .sign-style-editor-text{max-width:100%;font-size:12px}.bi-sign-style-editor .sign-style-editor-tip{max-width:100%;font-size:12px;color:grey}.bi-date-trigger,.bi-fine-tuning-number-editor{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-date-trigger{border-radius:2px}.bi-down-list-popup .bi-down-list-item .list-item-text{max-width:203px}.bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #d4dadd}.bi-theme-dark .bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #525466}.bi-file-manager-nav-button .file-manager-nav-button-text{max-width:200px}.bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#eff1f4;color:#999}.bi-file-manager-nav-button .file-manager-nav-button-triangle{z-index:1}.bi-theme-dark .bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#191b2b;color:#999}.bi-fine-tuning-number-editor{border-radius:2px}.bi-interactive-arrangement .interactive-arrangement-dragtag-line{z-index:1000000000;background-color:#f07d0a}.bi-interactive-arrangement .interactive-arrangement-dragtag-icon{z-index:1000000000}.bi-month-trigger,.bi-multidate-combo{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-multidate-popup .bi-multidate-popup-label{color:#3f8ce8;font-size:14px}.bi-multidate-popup .bi-multidate-popup-item.active,.bi-multidate-popup .bi-multidate-popup-item:active{background-color:#3f8ce8;color:#fff;-webkit-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}.bi-multidate-popup .bi-multidate-popup-button{color:#3f8ce8;font-size:14px}.bi-multidate-segment .bi-multidate-editor{font-size:14px}.bi-multi-select-combo .multi-select-trigger-icon-button,.bi-multi-tree-combo .multi-select-trigger-icon-button{font-size:16px}.bi-multi-select-check-pane .multi-select-check-selected{text-decoration:underline}.bi-display-tree .ztree li a:hover,.ztree li a,body{text-decoration:none}.bi-multi-select-trigger{-webkit-border-radius:2px 2px 2px 2px;-moz-border-radius:2px;border-radius:2px}.bi-multi-select-search-pane .multi-select-toolbar{color:#e85050}.bi-multi-select-check-selected-button{z-index:1}.bi-multi-tree-check-pane .multi-tree-check-selected{color:#3f8ce8}.bi-numerical-interval .numerical-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon,.bi-numerical-interval .numerical-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon{font-size:14px}.bi-multi-tree-popup .popup-view-tree{min-height:170px}.bi-preview-table-cell,.bi-preview-table-header-cell{min-height:25px;min-width:80px;max-width:220px}.bi-multi-tree-check-selected-button .trigger-check-selected{color:#3f8ce8;z-index:1}.bi-numerical-interval.number-error .bi-input,.bi-param-time-interval.time-error .bi-input,.bi-param-time-interval.time-error .sign-editor-text{color:#e85050}.bi-numerical-interval .numerical-interval-small-editor{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-numerical-interval .numerical-interval-big-editor{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-numerical-interval .numerical-interval-big-combo{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-numerical-interval .numerical-interval-small-combo{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-page-table-cell{-moz-user-select:text;user-select:text}.bi-path-chooser .path-chooser-radio,.bi-path-region .path-region-label{z-index:1}.bi-preview-table{-webkit-user-select:text;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;-o-user-select:text;user-select:text}.bi-preview-table>div>div>div>table>thead>tr.odd,.bi-preview-table>div>table>thead>tr.odd{background-color:#eff1f4}.bi-theme-dark .bi-preview-table>div>div>div>table>thead>tr.odd,.bi-theme-dark .bi-preview-table>div>table>thead>tr.odd{background-color:#191b2b}.bi-slider .bi-slider-track,.bi-slider-track .gray-track{background-color:rgba(153,153,153,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d999999, endColorstr=#4d999999)}.bi-quarter-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-relation-view-region .relation-view-region-container{z-index:1;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-relation-view-region .relation-view-region-container.other-package{border-style:dashed}.bi-sequence-table-dynamic-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;box-sizing:border-box}.bi-sequence-table-dynamic-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-single-slider-slider .slider-button{cursor:url(images/1x/cursor/cursor_drag_slider.cur),auto;-webkit-box-shadow:0 0 10px rgba(0,0,0,.2);-moz-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2);-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.bi-slider .bi-slider-track,.bi-slider-track .blue-track,.bi-slider-track .gray-track{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-year-popup .year-popup-navigation{line-height:30px}.bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #d4dadd}.bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-theme-dark .bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-year-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}*,button,html,input,select,textarea{font-family:"Microsoft YaHei","Hiragino Sans GB W3"}html{overflow:hidden}body{position:absolute;width:100%;top:0;left:0;background-repeat:repeat;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;color:#666;font:400 12px "Microsoft YaHei","Hiragino Sans GB W3";-webkit-font-smoothing:antialiased;-kthml-user-focus:normal;-moz-user-focus:normal;-moz-outline:0 none;outline:0}div::-webkit-scrollbar,textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);width:6px;height:6px}div::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}div::-webkit-scrollbar-thumb:hover,textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark div::-webkit-scrollbar,.bi-theme-dark textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc);width:6px;height:6px}.bi-theme-dark div::-webkit-scrollbar-thumb,.bi-theme-dark textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.bi-theme-dark div::-webkit-scrollbar-thumb:hover,.bi-theme-dark textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.base-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-1.png) repeat-y}.bi-theme-dark .base-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-1.png) repeat-y}.first-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png) center center no-repeat}.bi-theme-dark .first-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png) center center no-repeat}.mid-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png) center center no-repeat}.bi-theme-dark .mid-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png) center center no-repeat}.last-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png) center center no-repeat}.bi-theme-dark .last-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png) center center no-repeat}.loading-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/loading.gif) center center no-repeat}.auto-color-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/auto-color.png) center center no-repeat}.trans-color-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/trans-color.png) center center no-repeat}@font-face{font-family:bi;src:url(https://fanruan.coding.me/fineui/dist/font/iconfont.eot),url(https://fanruan.coding.me/fineui/dist/font/iconfont.woff) format('woff'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.ttf) format('truetype'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.svg#svgFontName) format('svg')}.b-font{font-family:bi;font-style:normal;-webkit-font-smoothing:antialiased}.close-font .b-font:before,.close-font.disabled .b-font:before,.close-font.native .b-font:before,.close-h-font .b-font:before,.close-h-font.disabled .b-font:before,.close-h-font.hover .b-font:before,.close-h-font.native .b-font:before,.close-h-font:focus .b-font:before,.close-h-font:hover .b-font:before,.close-ha-font .b-font:before,.close-ha-font.hover .b-font:before,.close-ha-font:focus .b-font:before,.close-ha-font:hover .b-font:before{content:"\e600";color:inherit}.close-ha-font.active .b-font:before,.close-ha-font:active .b-font:before{content:"\e600";color:#3f8ce8}.close-ha-font.disabled .b-font:before,.close-ha-font.native .b-font:before,.search-close-h-font .b-font:before{content:"\e600";color:inherit}.search-close-h-font.hover .b-font:before,.search-close-h-font:focus .b-font:before,.search-close-h-font:hover .b-font:before{content:"\e600";color:#e85050}.search-close-h-font.disabled .b-font:before,.search-close-h-font.native .b-font:before{content:"\e600";color:inherit}.pre-page-h-font .b-font:before,.pre-page-h-font.disabled .b-font:before,.pre-page-h-font.hover .b-font:before,.pre-page-h-font.native .b-font:before,.pre-page-h-font:focus .b-font:before,.pre-page-h-font:hover .b-font:before{content:"\e601";color:inherit}.next-page-h-font .b-font:before,.next-page-h-font.disabled .b-font:before,.next-page-h-font.hover .b-font:before,.next-page-h-font.native .b-font:before,.next-page-h-font:focus .b-font:before,.next-page-h-font:hover .b-font:before{content:"\e602";color:inherit}.search-font .b-font:before,.search-font.disabled .b-font:before,.search-font.native .b-font:before{content:"\e604";color:inherit}.dot-font .b-font:before,.dot-font.disabled .b-font:before,.dot-font.native .b-font:before,.dot-h-font .b-font:before{content:"\e606";color:#1a1a1a}.dot-h-font.hover .b-font:before,.dot-h-font:focus .b-font:before,.dot-h-font:hover .b-font:before{content:"\e606";color:inherit}.dot-h-font.disabled .b-font:before,.dot-h-font.native .b-font:before{content:"\e606";color:#1a1a1a}.dot-ha-font .b-font:before{content:"\e606";color:#fff}.dot-ha-font.hover .b-font:before,.dot-ha-font:focus .b-font:before,.dot-ha-font:hover .b-font:before{content:"\e606";color:#999}.dot-ha-font.active .b-font:before,.dot-ha-font:active .b-font:before{content:"\e606";color:#1a1a1a}.dot-e-font .b-font:before,.dot-ha-font.disabled .b-font:before,.dot-ha-font.native .b-font:before{content:"\e606";color:#fff}.dot-e-font.hover .b-font:before,.dot-e-font:focus .b-font:before,.dot-e-font:hover .b-font:before{content:"\e606";color:#999}.dot-e-font.active .b-font:before{content:"\e606";color:#1a1a1a}.dot-e-font:active .b-font:before{content:"\e606";color:#3f8ce8}.dot-e-font.disabled .b-font:before,.dot-e-font.native .b-font:before{content:"\e606";color:#fff}.pull-right-font .b-font:before,.pull-right-font.disabled .b-font:before,.pull-right-font.native .b-font:before,.pull-right-h-font .b-font:before,.pull-right-h-font.disabled .b-font:before,.pull-right-h-font.hover .b-font:before,.pull-right-h-font.native .b-font:before,.pull-right-h-font:focus .b-font:before,.pull-right-h-font:hover .b-font:before,.pull-right-ha-font .b-font:before,.pull-right-ha-font.hover .b-font:before,.pull-right-ha-font:focus .b-font:before,.pull-right-ha-font:hover .b-font:before{content:"\e607";color:inherit}.pull-right-ha-font.active .b-font:before,.pull-right-ha-font:active .b-font:before{content:"\e607";color:#3f8ce8}.pull-right-e-font .b-font:before,.pull-right-e-font.hover .b-font:before,.pull-right-e-font:focus .b-font:before,.pull-right-e-font:hover .b-font:before,.pull-right-ha-font.disabled .b-font:before,.pull-right-ha-font.native .b-font:before{content:"\e607";color:inherit}.pull-right-e-font.active .b-font:before,.pull-right-e-font:active .b-font:before{content:"\e607";color:#3f8ce8}.pull-right-e-font.disabled .b-font:before,.pull-right-e-font.native .b-font:before{content:"\e607";color:inherit}.copy-font .b-font:before,.copy-font.disabled .b-font:before,.copy-font.native .b-font:before{content:"\e610";color:inherit}.copy-h-font .b-font:before{content:"\e610";color:#1a1a1a}.copy-h-font.hover .b-font:before,.copy-h-font:focus .b-font:before,.copy-h-font:hover .b-font:before{content:"\e610";color:inherit}.copy-h-font.disabled .b-font:before,.copy-h-font.native .b-font:before{content:"\e610";color:#1a1a1a}.copy-ha-font .b-font:before,.copy-ha-font.hover .b-font:before,.copy-ha-font:focus .b-font:before,.copy-ha-font:hover .b-font:before{content:"\e610";color:inherit}.copy-ha-font.active .b-font:before,.copy-ha-font:active .b-font:before{content:"\e610";color:#3f8ce8}.copy-e-font .b-font:before,.copy-e-font.hover .b-font:before,.copy-e-font:focus .b-font:before,.copy-e-font:hover .b-font:before,.copy-ha-font.disabled .b-font:before,.copy-ha-font.native .b-font:before{content:"\e610";color:inherit}.copy-e-font.active .b-font:before,.copy-e-font:active .b-font:before{content:"\e610";color:#3f8ce8}.copy-e-font.disabled .b-font:before,.copy-e-font.native .b-font:before{content:"\e610";color:inherit}.check-mark-font .b-font:before,.check-mark-font.disabled .b-font:before,.check-mark-font.native .b-font:before,.check-mark-h-font .b-font:before,.check-mark-h-font.disabled .b-font:before,.check-mark-h-font.hover .b-font:before,.check-mark-h-font.native .b-font:before,.check-mark-h-font:focus .b-font:before,.check-mark-h-font:hover .b-font:before,.check-mark-ha-font .b-font:before,.check-mark-ha-font.hover .b-font:before,.check-mark-ha-font:focus .b-font:before,.check-mark-ha-font:hover .b-font:before{content:"\e611";color:inherit}.check-mark-ha-font.active .b-font:before,.check-mark-ha-font:active .b-font:before{content:"\e611";color:#3f8ce8}.check-mark-e-font .b-font:before,.check-mark-e-font.hover .b-font:before,.check-mark-e-font:focus .b-font:before,.check-mark-e-font:hover .b-font:before,.check-mark-ha-font.disabled .b-font:before,.check-mark-ha-font.native .b-font:before{content:"\e611";color:inherit}.check-mark-e-font.active .b-font:before,.check-mark-e-font:active .b-font:before{content:"\e611";color:#3f8ce8}.check-mark-e-font.disabled .b-font:before,.check-mark-e-font.native .b-font:before{content:"\e611";color:inherit}.tree-node-triangle-expand-font .b-font:before,.tree-node-triangle-expand-font.disabled .b-font:before,.tree-node-triangle-expand-font.native .b-font:before{content:"\e608";color:inherit}.tree-node-triangle-collapse-font .b-font:before,.tree-node-triangle-collapse-font.disabled .b-font:before,.tree-node-triangle-collapse-font.native .b-font:before{content:"\e607";color:inherit}.row-pre-page-h-font .b-font:before,.row-pre-page-h-font.disabled .b-font:before,.row-pre-page-h-font.hover .b-font:before,.row-pre-page-h-font.native .b-font:before,.row-pre-page-h-font:focus .b-font:before,.row-pre-page-h-font:hover .b-font:before{content:"\e6be";color:inherit}.row-next-page-h-font .b-font:before,.row-next-page-h-font.disabled .b-font:before,.row-next-page-h-font.hover .b-font:before,.row-next-page-h-font.native .b-font:before,.row-next-page-h-font:focus .b-font:before,.row-next-page-h-font:hover .b-font:before{content:"\e6bd";color:inherit}.column-pre-page-h-font .b-font:before,.column-pre-page-h-font.disabled .b-font:before,.column-pre-page-h-font.hover .b-font:before,.column-pre-page-h-font.native .b-font:before,.column-pre-page-h-font:focus .b-font:before,.column-pre-page-h-font:hover .b-font:before{content:"\e6bc";color:inherit}.column-next-page-h-font .b-font:before,.column-next-page-h-font.disabled .b-font:before,.column-next-page-h-font.hover .b-font:before,.column-next-page-h-font.native .b-font:before,.column-next-page-h-font:focus .b-font:before,.column-next-page-h-font:hover .b-font:before{content:"\e6bb";color:inherit}.trigger-triangle-font .b-font:before,.trigger-triangle-font.hover .b-font:before,.trigger-triangle-font:focus .b-font:before,.trigger-triangle-font:hover .b-font:before{content:"\e66a";color:#999}.trigger-triangle-font.active .b-font:before,.trigger-triangle-font:active .b-font:before{content:"\e66a";color:#3f8ce8}.trigger-triangle-font.disabled .b-font:before,.trigger-triangle-font.native .b-font:before{content:"\e66a";color:#999}.pull-down-font .b-font:before,.pull-down-font.disabled .b-font:before,.pull-down-font.native .b-font:before,.pull-down-h-font .b-font:before,.pull-down-h-font.disabled .b-font:before,.pull-down-h-font.hover .b-font:before,.pull-down-h-font.native .b-font:before,.pull-down-h-font:focus .b-font:before,.pull-down-h-font:hover .b-font:before,.pull-down-ha-font .b-font:before,.pull-down-ha-font.hover .b-font:before,.pull-down-ha-font:focus .b-font:before,.pull-down-ha-font:hover .b-font:before{content:"\e608";color:inherit}.pull-down-ha-font.active .b-font:before,.pull-down-ha-font:active .b-font:before{content:"\e608";color:#3f8ce8}.pull-down-ha-font.disabled .b-font:before,.pull-down-ha-font.native .b-font:before{content:"\e608";color:inherit}.check-font .b-font:before,.check-font.disabled .b-font:before,.check-font.native .b-font:before{content:"\e611";color:#3f8ce8}.item-check-font .b-font:before{content:"\e611";color:#fff}.item-check-font.hover .b-font:before,.item-check-font:focus .b-font:before,.item-check-font:hover .b-font:before{content:"\e611";color:#999}.item-check-font.active .b-font:before,.item-check-font:active .b-font:before{content:"\e611";color:#3f8ce8}.item-check-font.disabled .b-font:before,.item-check-font.native .b-font:before{content:"\e611";color:#fff}.primary-key-font .b-font:before,.primary-key-font.disabled .b-font:before,.primary-key-font.hover .b-font:before,.primary-key-font.native .b-font:before,.primary-key-font:focus .b-font:before,.primary-key-font:hover .b-font:before{content:"\e67d;";color:inherit}.drag-tag-font .b-font:before,.drag-tag-font.disabled .b-font:before,.drag-tag-font.native .b-font:before{content:"\e600";color:#f07d0a}.less-font .b-font:before,.less-font.hover .b-font:before,.less-font:focus .b-font:before,.less-font:hover .b-font:before{content:"\e633";color:inherit}.less-font.active .b-font:before,.less-font:active .b-font:before{content:"\e633";color:#3f8ce8}.less-font.disabled .b-font:before,.less-font.native .b-font:before{content:"\e633";color:inherit}.less-equal-font .b-font:before,.less-equal-font.hover .b-font:before,.less-equal-font:focus .b-font:before,.less-equal-font:hover .b-font:before{content:"\e636";color:inherit}.less-equal-font.active .b-font:before,.less-equal-font:active .b-font:before{content:"\e636";color:#3f8ce8}.less-equal-font.disabled .b-font:before,.less-equal-font.native .b-font:before{content:"\e636";color:inherit}.tree-collapse-icon-type1 .x-icon,.tree-collapse-icon-type1:active .x-icon,.tree-collapse-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-1.png) no-repeat;background-size:contain}.tree-collapse-icon-type1 .x-icon.hack,.tree-collapse-icon-type1:active .x-icon.hack,.tree-collapse-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-1.png) no-repeat}.tree-collapse-icon-type1.disabled .x-icon,.tree-collapse-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-1.png) no-repeat;background-size:contain}.tree-collapse-icon-type1.disabled .x-icon.hack,.tree-collapse-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-1.png) no-repeat}.tree-collapse-icon-type2 .x-icon,.tree-collapse-icon-type2:active .x-icon,.tree-collapse-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-2.png) no-repeat;background-size:contain}.tree-collapse-icon-type2 .x-icon.hack,.tree-collapse-icon-type2:active .x-icon.hack,.tree-collapse-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-2.png) no-repeat}.tree-collapse-icon-type2.disabled .x-icon,.tree-collapse-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-2.png) no-repeat;background-size:contain}.tree-collapse-icon-type2.disabled .x-icon.hack,.tree-collapse-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-2.png) no-repeat}.tree-collapse-icon-type3 .x-icon,.tree-collapse-icon-type3:active .x-icon,.tree-collapse-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-3.png) no-repeat;background-size:contain}.tree-collapse-icon-type3 .x-icon.hack,.tree-collapse-icon-type3:active .x-icon.hack,.tree-collapse-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-3.png) no-repeat}.tree-collapse-icon-type3.disabled .x-icon,.tree-collapse-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-3.png) no-repeat;background-size:contain}.tree-collapse-icon-type3.disabled .x-icon.hack,.tree-collapse-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-3.png) no-repeat}.tree-collapse-icon-type4 .x-icon,.tree-collapse-icon-type4:active .x-icon,.tree-collapse-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-4.png) no-repeat;background-size:contain}.tree-collapse-icon-type4 .x-icon.hack,.tree-collapse-icon-type4:active .x-icon.hack,.tree-collapse-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-4.png) no-repeat}.tree-collapse-icon-type4.disabled .x-icon,.tree-collapse-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-collapse-4.png) no-repeat;background-size:contain}.tree-collapse-icon-type4.disabled .x-icon.hack,.tree-collapse-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-4.png) no-repeat}.tree-expand-icon-type1 .x-icon,.tree-expand-icon-type1:active .x-icon,.tree-expand-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-1.png) no-repeat;background-size:contain}.tree-expand-icon-type1 .x-icon.hack,.tree-expand-icon-type1:active .x-icon.hack,.tree-expand-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-1.png) no-repeat}.tree-expand-icon-type1.disabled .x-icon,.tree-expand-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-1.png) no-repeat;background-size:contain}.tree-expand-icon-type1.disabled .x-icon.hack,.tree-expand-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-1.png) no-repeat}.tree-expand-icon-type2 .x-icon,.tree-expand-icon-type2:active .x-icon,.tree-expand-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-2.png) no-repeat;background-size:contain}.tree-expand-icon-type2 .x-icon.hack,.tree-expand-icon-type2:active .x-icon.hack,.tree-expand-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-2.png) no-repeat}.tree-expand-icon-type2.disabled .x-icon,.tree-expand-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-2.png) no-repeat;background-size:contain}.tree-expand-icon-type2.disabled .x-icon.hack,.tree-expand-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-2.png) no-repeat}.tree-expand-icon-type3 .x-icon,.tree-expand-icon-type3:active .x-icon,.tree-expand-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-3.png) no-repeat;background-size:contain}.tree-expand-icon-type3 .x-icon.hack,.tree-expand-icon-type3:active .x-icon.hack,.tree-expand-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-3.png) no-repeat}.tree-expand-icon-type3.disabled .x-icon,.tree-expand-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-3.png) no-repeat;background-size:contain}.tree-expand-icon-type3.disabled .x-icon.hack,.tree-expand-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-3.png) no-repeat}.tree-expand-icon-type4 .x-icon,.tree-expand-icon-type4:active .x-icon,.tree-expand-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-4.png) no-repeat;background-size:contain}.tree-expand-icon-type4 .x-icon.hack,.tree-expand-icon-type4:active .x-icon.hack,.tree-expand-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-4.png) no-repeat}.tree-expand-icon-type4.disabled .x-icon,.tree-expand-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-expand-4.png) no-repeat;background-size:contain}.tree-expand-icon-type4.disabled .x-icon.hack,.tree-expand-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-4.png) no-repeat}.tree-vertical-line-type2 .x-icon,.tree-vertical-line-type2:active .x-icon,.tree-vertical-line-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-2.png) no-repeat;background-size:contain}.tree-vertical-line-type2 .x-icon.hack,.tree-vertical-line-type2:active .x-icon.hack,.tree-vertical-line-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png) no-repeat}.tree-vertical-line-type2.disabled .x-icon,.tree-vertical-line-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-2.png) no-repeat;background-size:contain}.tree-vertical-line-type2.disabled .x-icon.hack,.tree-vertical-line-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png) no-repeat}.tree-vertical-line-type3 .x-icon,.tree-vertical-line-type3:active .x-icon,.tree-vertical-line-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-3.png) no-repeat;background-size:contain}.tree-vertical-line-type3 .x-icon.hack,.tree-vertical-line-type3:active .x-icon.hack,.tree-vertical-line-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png) no-repeat}.tree-vertical-line-type3.disabled .x-icon,.tree-vertical-line-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-3.png) no-repeat;background-size:contain}.tree-vertical-line-type3.disabled .x-icon.hack,.tree-vertical-line-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png) no-repeat}.tree-vertical-line-type4 .x-icon,.tree-vertical-line-type4:active .x-icon,.tree-vertical-line-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-4.png) no-repeat;background-size:contain}.tree-vertical-line-type4 .x-icon.hack,.tree-vertical-line-type4:active .x-icon.hack,.tree-vertical-line-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png) no-repeat}.tree-vertical-line-type4.disabled .x-icon,.tree-vertical-line-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree-vertical-line-4.png) no-repeat;background-size:contain}.tree-vertical-line-type4.disabled .x-icon.hack,.tree-vertical-line-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type1 .x-icon,.bi-theme-dark .tree-collapse-icon-type1:active .x-icon,.bi-theme-dark .tree-collapse-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type1 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type1:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-1.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type1.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type1.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-1.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type2 .x-icon,.bi-theme-dark .tree-collapse-icon-type2:active .x-icon,.bi-theme-dark .tree-collapse-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type2 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type2:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-2.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type2.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type2.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-2.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type3 .x-icon,.bi-theme-dark .tree-collapse-icon-type3:active .x-icon,.bi-theme-dark .tree-collapse-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type3 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type3:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-3.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type3.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type3.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-3.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type4 .x-icon,.bi-theme-dark .tree-collapse-icon-type4:active .x-icon,.bi-theme-dark .tree-collapse-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type4 .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type4:active .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-4.png) no-repeat}.bi-theme-dark .tree-collapse-icon-type4.disabled .x-icon,.bi-theme-dark .tree-collapse-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-collapse-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type4.disabled .x-icon.hack,.bi-theme-dark .tree-collapse-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-4.png) no-repeat}.bi-theme-dark .tree-expand-icon-type1 .x-icon,.bi-theme-dark .tree-expand-icon-type1:active .x-icon,.bi-theme-dark .tree-expand-icon-type1:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type1 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type1:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type1:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-1.png) no-repeat}.bi-theme-dark .tree-expand-icon-type1.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type1.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-1.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type1.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type1.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-1.png) no-repeat}.bi-theme-dark .tree-expand-icon-type2 .x-icon,.bi-theme-dark .tree-expand-icon-type2:active .x-icon,.bi-theme-dark .tree-expand-icon-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type2 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type2:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-2.png) no-repeat}.bi-theme-dark .tree-expand-icon-type2.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type2.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-2.png) no-repeat}.bi-theme-dark .tree-expand-icon-type3 .x-icon,.bi-theme-dark .tree-expand-icon-type3:active .x-icon,.bi-theme-dark .tree-expand-icon-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type3 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type3:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-3.png) no-repeat}.bi-theme-dark .tree-expand-icon-type3.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type3.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-3.png) no-repeat}.bi-theme-dark .tree-expand-icon-type4 .x-icon,.bi-theme-dark .tree-expand-icon-type4:active .x-icon,.bi-theme-dark .tree-expand-icon-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type4 .x-icon.hack,.bi-theme-dark .tree-expand-icon-type4:active .x-icon.hack,.bi-theme-dark .tree-expand-icon-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-4.png) no-repeat}.bi-theme-dark .tree-expand-icon-type4.disabled .x-icon,.bi-theme-dark .tree-expand-icon-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-expand-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type4.disabled .x-icon.hack,.bi-theme-dark .tree-expand-icon-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-4.png) no-repeat}.bi-theme-dark .tree-vertical-line-type2 .x-icon,.bi-theme-dark .tree-vertical-line-type2:active .x-icon,.bi-theme-dark .tree-vertical-line-type2:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type2 .x-icon.hack,.bi-theme-dark .tree-vertical-line-type2:active .x-icon.hack,.bi-theme-dark .tree-vertical-line-type2:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png) no-repeat}.bi-theme-dark .tree-vertical-line-type2.disabled .x-icon,.bi-theme-dark .tree-vertical-line-type2.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-2.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type2.disabled .x-icon.hack,.bi-theme-dark .tree-vertical-line-type2.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png) no-repeat}.bi-theme-dark .tree-vertical-line-type3 .x-icon,.bi-theme-dark .tree-vertical-line-type3:active .x-icon,.bi-theme-dark .tree-vertical-line-type3:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type3 .x-icon.hack,.bi-theme-dark .tree-vertical-line-type3:active .x-icon.hack,.bi-theme-dark .tree-vertical-line-type3:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png) no-repeat}.bi-theme-dark .tree-vertical-line-type3.disabled .x-icon,.bi-theme-dark .tree-vertical-line-type3.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-3.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type3.disabled .x-icon.hack,.bi-theme-dark .tree-vertical-line-type3.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png) no-repeat}.bi-theme-dark .tree-vertical-line-type4 .x-icon,.bi-theme-dark .tree-vertical-line-type4:active .x-icon,.bi-theme-dark .tree-vertical-line-type4:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type4 .x-icon.hack,.bi-theme-dark .tree-vertical-line-type4:active .x-icon.hack,.bi-theme-dark .tree-vertical-line-type4:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png) no-repeat}.bi-theme-dark .tree-vertical-line-type4.disabled .x-icon,.bi-theme-dark .tree-vertical-line-type4.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree-vertical-line-4.png) no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type4.disabled .x-icon.hack,.bi-theme-dark .tree-vertical-line-type4.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png) no-repeat}.check-box-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-normal.png) no-repeat;background-size:contain}.check-box-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-normal.png) no-repeat}.check-box-icon.hover .x-icon,.check-box-icon:focus .x-icon,.check-box-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-normal.png) no-repeat;background-size:contain}.check-box-icon.hover .x-icon.hack,.check-box-icon:focus .x-icon.hack,.check-box-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-normal.png) no-repeat}.check-box-icon.active .x-icon,.check-box-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-active.png) no-repeat;background-size:contain}.check-box-icon.active .x-icon.hack,.check-box-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-active.png) no-repeat}.check-box-icon.disabled .x-icon,.check-box-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-disable.png) no-repeat;background-size:contain}.check-box-icon.disabled .x-icon.hack,.check-box-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-disable.png) no-repeat}.check-box-icon.disabled.active .x-icon,.check-box-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check-box-disable2.png) no-repeat;background-size:contain}.check-box-icon.disabled.active .x-icon.hack,.check-box-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-disable2.png) no-repeat}.radio-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-normal.png) no-repeat;background-size:contain}.radio-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-normal.png) no-repeat}.radio-icon.hover .x-icon,.radio-icon:focus .x-icon,.radio-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-normal.png) no-repeat;background-size:contain}.radio-icon.hover .x-icon.hack,.radio-icon:focus .x-icon.hack,.radio-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-normal.png) no-repeat}.radio-icon.active .x-icon,.radio-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-active.png) no-repeat;background-size:contain}.radio-icon.active .x-icon.hack,.radio-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-active.png) no-repeat}.radio-icon.disabled .x-icon,.radio-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-disable.png) no-repeat;background-size:contain}.radio-icon.disabled .x-icon.hack,.radio-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-disable.png) no-repeat}.radio-icon.disabled.active .x-icon,.radio-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio-disable2.png) no-repeat;background-size:contain}.radio-icon.disabled.active .x-icon.hack,.radio-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio-disable2.png) no-repeat}.check-half-select-icon .x-icon,.check-half-select-icon:active .x-icon,.check-half-select-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/half_selected.png) no-repeat;background-size:contain}.check-half-select-icon .x-icon.hack,.check-half-select-icon:active .x-icon.hack,.check-half-select-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) no-repeat}.check-half-select-icon.disabled .x-icon,.check-half-select-icon.native .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/half_selected.png) no-repeat;background-size:contain}.check-half-select-icon.disabled .x-icon.hack,.check-half-select-icon.native .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) no-repeat}.farbtastic{position:relative}.farbtastic *{position:absolute;cursor:crosshair}.farbtastic,.farbtastic .wheel{width:195px;height:195px}.farbtastic .color,.farbtastic .overlay{top:47px;left:47px;width:101px;height:101px}.farbtastic .wheel{background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/farbtastic/wheel.png) no-repeat;width:195px;height:195px}.farbtastic .overlay{background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/farbtastic/mask.png) no-repeat}.farbtastic .marker{width:17px;height:17px;margin:-8px 0 0 -8px;overflow:hidden;background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/farbtastic/marker.png) no-repeat}.bi-display-tree .ztree *{color:#999}.bi-display-tree .ztree li span.button.switch.center_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x//icon/tree-vertical-line-3.png)}.bi-display-tree .ztree li span.button.switch.roots_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x//icon/tree-vertical-line-2.png)}.bi-display-tree .ztree li span.button.switch.bottom_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x//icon/tree-vertical-line-4.png)}.bi-display-tree .ztree li a,.bi-display-tree .ztree li span{cursor:default!important}.ztree li a,.ztree li span.button{cursor:pointer;display:inline-block}.bi-display-tree .ztree li a.curSelectedNode{padding-top:1px;border:none;background-color:inherit;opacity:1;filter:alpha(opacity=100)}.ztree li a.tmpTargetNode_inner,ul.tmpTargetzTree,ul.ztree.zTreeDragUL{opacity:.8;filter:alpha(opacity=80)}.ztree *{padding:0;margin:0}.ztree{margin:0;padding:5px}.ztree li{padding:0;margin:0;list-style:none;line-height:14px;text-align:left;outline:0}.ztree li ul{margin:0;padding:0 0 0 18px}.ztree li ul.line{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-1.png) repeat-y}.bi-theme-dark .ztree li ul.line{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-1.png) repeat-y}.ztree li a{padding:1px 3px 0 0;margin:0;height:24px;background-color:transparent;vertical-align:top}.ztree li a.curSelectedNode_Edit{padding-top:0;background-color:#FFE6B0;color:#000;height:16px;border:1px solid #FFB951;opacity:.8}.ztree li a.tmpTargetNode_inner{padding-top:0;background-color:#316AC5;color:#fff;height:16px;border:1px solid #316AC5}.ztree li a input.rename{height:14px;width:80px;padding:0;margin:0;font-size:12px;border:1px solid #7EC4CC}.ztree li span{line-height:24px;margin-right:2px}.ztree li span.button{line-height:0;margin:0;width:16px;height:16px;vertical-align:middle;border:0;outline:0;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/third/ztree/img/zTreeStandard.png)}.ztree li span.button.chk{width:16px;height:16px;margin:0 3px 0 0;cursor:auto}.ztree li span.button.chk.checkbox_false_full,.ztree li span.button.chk.checkbox_false_full_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-normal.png)}.ztree li span.button.chk.checkbox_false_part,.ztree li span.button.chk.checkbox_false_part_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png)}.ztree li span.button.chk.checkbox_false_disable{background-position:0 -56px}.ztree li span.button.chk.checkbox_true_full,.ztree li span.button.chk.checkbox_true_full_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check-box-active.png)}.ztree li span.button.chk.checkbox_true_part,.ztree li span.button.chk.checkbox_true_part_focus{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png)}.ztree li span.button.chk.checkbox_true_disable{background-position:-14px -56px}.ztree li span.button.chk.radio_false_full{background-position:-28px 0}.ztree li span.button.chk.radio_false_full_focus{background-position:-28px -14px}.ztree li span.button.chk.radio_false_part{background-position:-28px -28px}.ztree li span.button.chk.radio_false_part_focus{background-position:-28px -42px}.ztree li span.button.chk.radio_false_disable{background-position:-28px -56px}.ztree li span.button.chk.radio_true_full{background-position:-42px 0}.ztree li span.button.chk.radio_true_full_focus{background-position:-42px -14px}.ztree li span.button.chk.radio_true_part{background-position:-42px -28px}.ztree li span.button.chk.radio_true_part_focus{background-position:-42px -42px}.ztree li span.button.chk.radio_true_disable{background-position:-42px -56px}.ztree li span.button.switch{width:25px;height:25px}.ztree li span.button.root_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-1.png)}.bi-theme-dark .ztree li span.button.root_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-1.png)}.ztree li span.button.root_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-1.png)}.bi-theme-dark .ztree li span.button.root_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-1.png)}.ztree li span.button.roots_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-2.png)}.bi-theme-dark .ztree li span.button.roots_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-2.png)}.ztree li span.button.roots_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-2.png)}.bi-theme-dark .ztree li span.button.roots_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-2.png)}.ztree li span.button.center_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-3.png)}.bi-theme-dark .ztree li span.button.center_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-3.png)}.ztree li span.button.center_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-3.png)}.bi-theme-dark .ztree li span.button.center_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-3.png)}.ztree li span.button.bottom_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-expand-4.png)}.bi-theme-dark .ztree li span.button.bottom_open{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-expand-4.png)}.ztree li span.button.bottom_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-collapse-4.png)}.bi-theme-dark .ztree li span.button.bottom_close{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-collapse-4.png)}.ztree li span.button.noline_open{background-position:-92px -72px}.ztree li span.button.noline_close{background-position:-74px -72px}.ztree li span.button.root_docu{background:0 0}.ztree li span.button.roots_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-2.png)}.bi-theme-dark .ztree li span.button.roots_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-2.png)}.ztree li span.button.center_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-3.png)}.bi-theme-dark .ztree li span.button.center_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-3.png)}.ztree li span.button.bottom_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree-vertical-line-4.png)}.bi-theme-dark .ztree li span.button.bottom_docu{background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree-vertical-line-4.png)}.ztree li span.button.noline_docu{background:0 0}.ztree li span.button.ico_open{margin-right:2px;background-position:-110px -16px;vertical-align:top}.ztree li span.button.ico_close{margin-right:2px;background-position:-110px 0;vertical-align:top}.ztree li span.button.ico_docu{margin-right:2px;background-position:-110px -32px;vertical-align:top}.ztree li span.button.edit{margin-right:2px;background-position:-110px -48px;vertical-align:top}.ztree li span.button.remove{margin-right:2px;background-position:-110px -64px;vertical-align:top}.ztree li span.button.ico_loading{width:0;margin-right:2px;background:url(https://fanruan.coding.me/fineui/dist/images/1x/third/ztree/img/loading.gif) no-repeat;vertical-align:top}ul.tmpTargetzTree{background-color:#FFE6B0}span.tmpzTreeMove_arrow{width:16px;height:16px;display:inline-block;padding:0;margin:2px 0 0 1px;border:0;position:absolute;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-110px -80px;background-image:url(https://fanruan.coding.me/fineui/dist/images/1x/third/ztree/img/zTreeStandard.png)}.zTreeMask,ul.ztree.zTreeDragUL{background-color:#cfcfcf;position:absolute}ul.ztree.zTreeDragUL{margin:0;padding:0;width:auto;height:auto;overflow:hidden;border:1px dotted #00B83F}.zTreeMask{z-index:10000;opacity:0;filter:alpha(opacity=0)} \ No newline at end of file diff --git a/dist/bundle.min.js b/dist/bundle.min.js index 8cc061345..c4fa335f5 100644 --- a/dist/bundle.min.js +++ b/dist/bundle.min.js @@ -1,4 +1,4 @@ -/*! fineui 08-09-2017 */ +/*! fineui 12-09-2017 */ function accAdd(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}if(f=Math.abs(c-d),e=Math.pow(10,Math.max(c,d)),f>0){var h=Math.pow(10,f);c>d?(a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""))*h):(a=Number(a.toString().replace(".",""))*h,b=Number(b.toString().replace(".","")))}else a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""));return(a+b)/e}function accSub(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}return e=Math.pow(10,Math.max(c,d)),f=c>=d?c:d,((a*e-b*e)/e).toFixed(f)}function accMul(a,b){var c=0,d=a.toString(),e=b.toString();try{c+=d.split(".")[1].length}catch(f){}try{c+=e.split(".")[1].length}catch(f){}return Number(d.replace(".",""))*Number(e.replace(".",""))/Math.pow(10,c)}function accDiv(arg1,arg2){var t1=0,t2=0,r1,r2;try{t1=arg1.toString().split(".")[1].length}catch(e){}try{t2=arg2.toString().split(".")[1].length}catch(e){}with(Math)return r1=Number(arg1.toString().replace(".","")),r2=Number(arg2.toString().replace(".","")),t2>t1?r1/r2*pow(10,t2-t1):r1/r2/pow(10,t1-t2)}window.BI||(window.BI={}),BI.servletURL="https://fanruan.coding.me/fineui/dist/",BI.resourceURL="https://fanruan.coding.me/fineui/dist/resource/",BI.i18n={"BI-Basic_OK":"确定","BI-Basic_Sure":"确定","BI-Basic_Clears":"清空","BI-Basic_Cancel":"取消","BI-Basic_Time":"时间","BI-Basic_Simple_Sunday":"日","BI-Basic_Simple_Monday":"一","BI-Basic_Simple_Tuesday":"二","BI-Basic_Simple_Wednesday":"三","BI-Basic_Simple_Thursday":"四","BI-Basic_Simple_Friday":"五","BI-Basic_Simple_Saturday":"六","BI-Multi_Date_Year":"年","BI-Multi_Date_Month":"月","BI-Multi_Date_Quarter":"季度","BI-Basic_Unrestricted":"无限制","BI-Quarter_1":"第1季度","BI-Quarter_2":"第2季度","BI-Quarter_3":"第3季度","BI-Quarter_4":"第4季度","BI-Basic_Value":"值","BI-Load_More":"加载更多","BI-Select_All":"全选","BI-Basic_Auto":"自动","BI-No_More_Data":"无更多数据","BI-No_Selected_Value":"没有可选项","BI-Basic_Clear":"清除","BI-Multi_Date_Relative_Current_Time":"相对当前时间","BI-Multi_Date_Year_Prev":"年前","BI-Multi_Date_Year_Next":"年后","BI-Multi_Date_Year_Begin":"年初","BI-Multi_Date_Year_End":"年末","BI-Multi_Date_Quarter_Prev":"个季度前","BI-Multi_Date_Quarter_Next":"个季度后","BI-Multi_Date_Quarter_Begin":"季度初","BI-Multi_Date_Quarter_End":"季度末","BI-Multi_Date_Month_Prev":"个月前","BI-Multi_Date_Month_Next":"个月后","BI-Multi_Date_Month_Begin":"月初","BI-Multi_Date_Month_End":"月末","BI-Multi_Date_Week_Prev":"周前","BI-Multi_Date_Week_Next":"周后","BI-Multi_Date_Day_Prev":"天前","BI-Multi_Date_Day_Next":"天后","BI-Multi_Date_Today":"今天"},function(a,b){function c(a){var b=a.length,c=ia.type(a);return!ia.isWindow(a)&&(!(1!==a.nodeType||!b)||("array"===c||"function"!==c&&(0===b||"number"==typeof b&&b>0&&b-1 in a)))}function d(a){var b=xa[a]={};return ia.each(a.match(ka)||[],function(a,c){b[c]=!0}),b}function e(a,c,d,e){if(ia.acceptData(a)){var f,g,h=ia.expando,i="string"==typeof c,j=a.nodeType,k=j?ia.cache:a,l=j?a[h]:a[h]&&h;if(l&&k[l]&&(e||k[l].data)||!i||d!==b)return l||(j?a[h]=l=_.pop()||ia.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=ia.noop)),"object"!=typeof c&&"function"!=typeof c||(e?k[l]=ia.extend(k[l],c):k[l].data=ia.extend(k[l].data,c)),f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[ia.camelCase(c)]=d),i?(g=f[c],null==g&&(g=f[ia.camelCase(c)])):g=f,g}}function f(a,b,c){if(ia.acceptData(a)){var d,e,f,g=a.nodeType,i=g?ia.cache:a,j=g?a[ia.expando]:ia.expando;if(i[j]){if(b&&(f=c?i[j]:i[j].data)){ia.isArray(b)?b=b.concat(ia.map(b,ia.camelCase)):b in f?b=[b]:(b=ia.camelCase(b),b=b in f?[b]:b.split(" "));for(d=0,e=b.length;d=0===c})}function m(a){var b=Ua.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function n(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function o(a){var b=a.getAttributeNode("type");return a.type=(b&&b.specified)+"/"+a.type,a}function p(a){var b=eb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function q(a,b){for(var c,d=0;null!=(c=a[d]);d++)ia._data(c,"globalEval",!b||ia._data(b[d],"globalEval"))}function r(a,b){if(1===b.nodeType&&ia.hasData(a)){var c,d,e,f=ia._data(a),g=ia._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").css("cssText","display:block !important")).appendTo(b.documentElement),b=(jb[0].contentWindow||jb[0].contentDocument).document,b.write(""),b.close(),c=C(a,b),jb.detach()),ub[a]=c),c}function C(a,b){var c=ia(b.createElement(a)).appendTo(b.body),d=ia.css(c[0],"display");return c.remove(),d}function D(a,b,c,d){var e;if(ia.isArray(b))ia.each(b,function(b,e){c||Ab.test(a)?d(a,e):D(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==ia.type(b))d(a,b);else for(e in b)D(a+"["+e+"]",b[e],c,d)}function E(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(ka)||[];if(ia.isFunction(c))for(;d=f[e++];)"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function F(a,b,c,d){function e(h){var i;return f[h]=!0,ia.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||g||f[j]?g?!(i=j):void 0:(b.dataTypes.unshift(j),e(j),!1)}),i}var f={},g=a===Rb;return e(b.dataTypes[0])||!f["*"]&&e("*")}function G(a,c){var d,e,f=ia.ajaxSettings.flatOptions||{};for(e in c)c[e]!==b&&((f[e]?a:d||(d={}))[e]=c[e]);return d&&ia.extend(!0,a,d),a}function H(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(h in k)h in d&&(c[k[h]]=d[h]);for(;"*"===j[0];)j.shift(),f===b&&(f=a.mimeType||c.getResponseHeader("Content-Type"));if(f)for(h in i)if(i[h]&&i[h].test(f)){j.unshift(h);break}if(j[0]in d)g=j[0];else{for(h in d){if(!j[0]||a.converters[h+" "+j[0]]){g=h;break}e||(e=h)}g=g||e}if(g)return g!==j[0]&&j.unshift(g),d[g]}function I(a,b){var c,d,e,f,g={},h=0,i=a.dataTypes.slice(),j=i[0];if(a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i[1])for(e in a.converters)g[e.toLowerCase()]=a.converters[e];for(;d=i[++h];)if("*"!==d){if("*"!==j&&j!==d){if(e=g[j+" "+d]||g["* "+d],!e)for(c in g)if(f=c.split(" "),f[1]===d&&(e=g[j+" "+f[0]]||g["* "+f[0]])){e===!0?e=g[c]:g[c]!==!0&&(d=f[0],i.splice(h--,0,d));break}if(e!==!0)if(e&&a["throws"])b=e(b);else try{b=e(b)}catch(k){return{state:"parsererror",error:e?k:"No conversion from "+j+" to "+d}}}j=d}return{state:"success",data:b}}function J(){try{return new a.XMLHttpRequest}catch(b){}}function K(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function L(){return setTimeout(function(){$b=b}),$b=ia.now()}function M(a,b){ia.each(b,function(b,c){for(var d=(ec[b]||[]).concat(ec["*"]),e=0,f=d.length;e)[^>]*|#([\w-]*))$/,na=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,oa=/^[\],:{}\s]*$/,pa=/(?:^|:|,)(?:\s*\[)+/g,qa=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,ra=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,sa=/^-ms-/,ta=/-([\da-z])/gi,ua=function(a,b){return b.toUpperCase()},va=function(a){(W.addEventListener||"load"===a.type||"complete"===W.readyState)&&(wa(),ia.ready())},wa=function(){W.addEventListener?(W.removeEventListener("DOMContentLoaded",va,!1),a.removeEventListener("load",va,!1)):(W.detachEvent("onreadystatechange",va),a.detachEvent("onload",va))};ia.fn=ia.prototype={jquery:aa,constructor:ia,init:function(a,c,d){var e,f;if(!a)return this;if("string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:ma.exec(a),!e||!e[1]&&c)return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a);if(e[1]){if(c=c instanceof ia?c[0]:c,ia.merge(this,ia.parseHTML(e[1],c&&c.nodeType?c.ownerDocument||c:W,!0)),na.test(e[1])&&ia.isPlainObject(c))for(e in c)ia.isFunction(this[e])?this[e](c[e]):this.attr(e,c[e]);return this}if(f=W.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return d.find(a);this.length=1,this[0]=f}return this.context=W,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):ia.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),ia.makeArray(a,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return da.call(this)},get:function(a){return null==a?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a){var b=ia.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return ia.each(this,a,b)},ready:function(a){return ia.ready.promise().done(a),this},slice:function(){return this.pushStack(da.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0||(T.resolveWith(W,[ia]),ia.fn.trigger&&ia(W).trigger("ready").off("ready"))}},isFunction:function(a){return"function"===ia.type(a)},isArray:Array.isArray||function(a){return"array"===ia.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==a?String(a):"object"==typeof a||"function"==typeof a?$[fa.call(a)]||"object":typeof a},isPlainObject:function(a){if(!a||"object"!==ia.type(a)||a.nodeType||ia.isWindow(a))return!1;try{if(a.constructor&&!ga.call(a,"constructor")&&!ga.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||ga.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||W;var d=na.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=ia.buildFragment([a],b,e),e&&ia(e).remove(),ia.merge([],d.childNodes))},parseJSON:function(b){return a.JSON&&a.JSON.parse?a.JSON.parse(b):null===b?b:"string"==typeof b&&(b=ia.trim(b),b&&oa.test(b.replace(qa,"@").replace(ra,"]").replace(pa,"")))?new Function("return "+b)():void ia.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||"string"!=typeof c)return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return d&&d.documentElement&&!d.getElementsByTagName("parsererror").length||ia.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&ia.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(sa,"ms-").replace(ta,ua)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,d){var e,f=0,g=a.length,h=c(a);if(d){if(h)for(;f-1;)j.splice(d,1),c&&(d<=g&&g--,d<=h&&h--)}),this},has:function(a){return a?ia.inArray(a,j)>-1:!(!j||!j.length)},empty:function(){return j=[],this},disable:function(){return j=k=e=b,this},disabled:function(){return!j},lock:function(){return k=b,e||m.disable(),this},locked:function(){return!k},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],!j||f&&!k||(c?k.push(b):l(b)),this},fire:function(){return m.fireWith(this,arguments),this},fired:function(){return!!f}};return m},ia.extend({Deferred:function(a){var b=[["resolve","done",ia.Callbacks("once memory"),"resolved"],["reject","fail",ia.Callbacks("once memory"),"rejected"],["notify","progress",ia.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return ia.Deferred(function(c){ia.each(b,function(b,f){var g=f[0],h=ia.isFunction(a[b])&&a[b];e[f[1]](function(){var a=h&&h.apply(this,arguments);a&&ia.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[g+"With"](this===d?c.promise():this,h?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?ia.extend(a,d):d}},e={};return d.pipe=d.then,ia.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b,c,d,e=0,f=da.call(arguments),g=f.length,h=1!==g||a&&ia.isFunction(a.promise)?g:0,i=1===h?a:ia.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?da.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);e
a",c=l.getElementsByTagName("*"),d=l.getElementsByTagName("a")[0],!c||!d||!c.length)return{};f=W.createElement("select"),h=f.appendChild(W.createElement("option")),e=l.getElementsByTagName("input")[0],d.style.cssText="top:1px;float:left;opacity:.5",b={getSetAttribute:"t"!==l.className,leadingWhitespace:3===l.firstChild.nodeType,tbody:!l.getElementsByTagName("tbody").length,htmlSerialize:!!l.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:"/a"===d.getAttribute("href"),opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:!!e.value,optSelected:h.selected,enctype:!!W.createElement("form").enctype,html5Clone:"<:nav>"!==W.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===W.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},e.checked=!0,b.noCloneChecked=e.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!h.disabled;try{delete l.test}catch(m){b.deleteExpando=!1}e=W.createElement("input"),e.setAttribute("value",""),b.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),b.radioValue="t"===e.value,e.setAttribute("checked","t"),e.setAttribute("name","t"),g=W.createDocumentFragment(),g.appendChild(e),b.appendChecked=e.checked,b.checkClone=g.cloneNode(!0).cloneNode(!0).lastChild.checked,l.attachEvent&&(l.attachEvent("onclick",function(){b.noCloneEvent=!1}),l.cloneNode(!0).click());for(k in{submit:!0,change:!0,focusin:!0})l.setAttribute(i="on"+k,"t"),b[k+"Bubbles"]=i in a||l.attributes[i].expando===!1;return l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",b.clearCloneStyle="content-box"===l.style.backgroundClip,ia(function(){var c,d,e,f="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",g=W.getElementsByTagName("body")[0];g&&(c=W.createElement("div"),c.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",g.appendChild(c).appendChild(l),l.innerHTML="
t
",e=l.getElementsByTagName("td"),e[0].style.cssText="padding:0;margin:0;border:0;display:none",j=0===e[0].offsetHeight,e[0].style.display="",e[1].style.display="none",b.reliableHiddenOffsets=j&&0===e[0].offsetHeight,l.innerHTML="",l.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=4===l.offsetWidth,b.doesNotIncludeMarginInBodyOffset=1!==g.offsetTop,a.getComputedStyle&&(b.pixelPosition="1%"!==(a.getComputedStyle(l,null)||{}).top,b.boxSizingReliable="4px"===(a.getComputedStyle(l,null)||{width:"4px"}).width,d=l.appendChild(W.createElement("div")),d.style.cssText=l.style.cssText=f,d.style.marginRight=d.style.width="0",l.style.width="1px",b.reliableMarginRight=!parseFloat((a.getComputedStyle(d,null)||{}).marginRight)),typeof l.style.zoom!==V&&(l.innerHTML="",l.style.cssText=f+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=3===l.offsetWidth,l.style.display="block",l.innerHTML="
",l.firstChild.style.width="5px",b.shrinkWrapBlocks=3!==l.offsetWidth,b.inlineBlockNeedsLayout&&(g.style.zoom=1)),g.removeChild(c),c=l=e=d=null)}),c=f=g=h=d=e=null,b}();var ya=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,za=/([A-Z])/g;ia.extend({cache:{},expando:"jQuery"+(aa+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?ia.cache[a[ia.expando]]:a[ia.expando],!!a&&!h(a)},data:function(a,b,c){return e(a,b,c)},removeData:function(a,b){return f(a,b)},_data:function(a,b,c){return e(a,b,c,!0)},_removeData:function(a,b){return f(a,b,!0)},acceptData:function(a){if(a.nodeType&&1!==a.nodeType&&9!==a.nodeType)return!1;var b=a.nodeName&&ia.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),ia.fn.extend({data:function(a,c){var d,e,f=this[0],h=0,i=null;if(a===b){if(this.length&&(i=ia.data(f),1===f.nodeType&&!ia._data(f,"parsedAttrs"))){for(d=f.attributes;h1,null,!0)},removeData:function(a){return this.each(function(){ia.removeData(this,a)})}}),ia.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=ia._data(a,b),c&&(!d||ia.isArray(c)?d=ia._data(a,b,ia.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=ia.queue(a,b),d=c.length,e=c.shift(),f=ia._queueHooks(a,b),g=function(){ia.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),f.cur=e,e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return ia._data(a,c)||ia._data(a,c,{empty:ia.Callbacks("once memory").add(function(){ia._removeData(a,b+"queue"),ia._removeData(a,c)})})}}),ia.fn.extend({queue:function(a,c){var d=2;return"string"!=typeof a&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){ia.removeAttr(this,a)})},prop:function(a,b){return ia.access(this,ia.prop,a,b,arguments.length>1)},removeProp:function(a){return a=ia.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g=0,h=this.length,i="string"==typeof a&&a;if(ia.isFunction(a))return this.each(function(b){ia(this).addClass(a.call(this,b,this.className))});if(i)for(b=(a||"").match(ka)||[];g=0;)d=d.replace(" "+e+" "," ");c.className=a?ia.trim(d):""}return this},toggleClass:function(a,b){var c=typeof a,d="boolean"==typeof b;return ia.isFunction(a)?this.each(function(c){ia(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var e,f=0,g=ia(this),h=b,i=a.match(ka)||[];e=i[f++];)h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e);else c!==V&&"boolean"!==c||(this.className&&ia._data(this,"__className__",this.className),this.className=this.className||a===!1?"":ia._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;c=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];{if(arguments.length)return e=ia.isFunction(a),this.each(function(c){var f,g=ia(this);1===this.nodeType&&(f=e?a.call(this,c,g.val()):a,null==f?f="":"number"==typeof f?f+="":ia.isArray(f)&&(f=ia.map(f,function(a){return null==a?"":a+""; })),d=ia.valHooks[this.type]||ia.valHooks[this.nodeName.toLowerCase()],d&&"set"in d&&d.set(this,f,"value")!==b||(this.value=f))});if(f)return d=ia.valHooks[f.type]||ia.valHooks[f.nodeName.toLowerCase()],d&&"get"in d&&(c=d.get(f,"value"))!==b?c:(c=f.value,"string"==typeof c?c.replace(Da,""):null==c?"":c)}}}),ia.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||e<0,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;i=0}),c.length||(a.selectedIndex=-1),c}}},attr:function(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return typeof a.getAttribute===V?ia.prop(a,c,d):(f=1!==h||!ia.isXMLDoc(a),f&&(c=c.toLowerCase(),e=ia.attrHooks[c]||(Ga.test(c)?Ba:Aa)),d===b?e&&f&&"get"in e&&null!==(g=e.get(a,c))?g:(typeof a.getAttribute!==V&&(g=a.getAttribute(c)),null==g?b:g):null!==d?e&&f&&"set"in e&&(g=e.set(a,d,c))!==b?g:(a.setAttribute(c,d+""),d):void ia.removeAttr(a,c))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(ka);if(f&&1===a.nodeType)for(;c=f[e++];)d=ia.propFix[c]||c,Ga.test(c)?!Ia&&Ha.test(c)?a[ia.camelCase("default-"+c)]=a[d]=!1:a[d]=!1:ia.attr(a,c,""),a.removeAttribute(Ia?c:d)},attrHooks:{type:{set:function(a,b){if(!ia.support.radioValue&&"radio"===b&&ia.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},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(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return g=1!==h||!ia.isXMLDoc(a),g&&(c=ia.propFix[c]||c,f=ia.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&null!==(e=f.get(a,c))?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):Ea.test(a.nodeName)||Fa.test(a.nodeName)&&a.href?0:b}}}}),Ba={get:function(a,c){var d=ia.prop(a,c),e="boolean"==typeof d&&a.getAttribute(c),f="boolean"==typeof d?Ja&&Ia?null!=e:Ha.test(c)?a[ia.camelCase("default-"+c)]:!!e:a.getAttributeNode(c);return f&&f.value!==!1?c.toLowerCase():b},set:function(a,b,c){return b===!1?ia.removeAttr(a,c):Ja&&Ia||!Ha.test(c)?a.setAttribute(!Ia&&ia.propFix[c]||c,c):a[ia.camelCase("default-"+c)]=a[c]=!0,c}},Ja&&Ia||(ia.attrHooks.value={get:function(a,c){var d=a.getAttributeNode(c);return ia.nodeName(a,"input")?a.defaultValue:d&&d.specified?d.value:b},set:function(a,b,c){return ia.nodeName(a,"input")?void(a.defaultValue=b):Aa&&Aa.set(a,b,c)}}),Ia||(Aa=ia.valHooks.button={get:function(a,c){var d=a.getAttributeNode(c);return d&&("id"===c||"name"===c||"coords"===c?""!==d.value:d.specified)?d.value:b},set:function(a,c,d){var e=a.getAttributeNode(d);return e||a.setAttributeNode(e=a.ownerDocument.createAttribute(d)),e.value=c+="","value"===d||c===a.getAttribute(d)?c:b}},ia.attrHooks.contenteditable={get:Aa.get,set:function(a,b,c){Aa.set(a,""!==b&&b,c)}},ia.each(["width","height"],function(a,b){ia.attrHooks[b]=ia.extend(ia.attrHooks[b],{set:function(a,c){if(""===c)return a.setAttribute(b,"auto"),c}})})),ia.support.hrefNormalized||(ia.each(["href","src","width","height"],function(a,c){ia.attrHooks[c]=ia.extend(ia.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return null==d?b:d}})}),ia.each(["href","src"],function(a,b){ia.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}})),ia.support.style||(ia.attrHooks.style={get:function(a){return a.style.cssText||b},set:function(a,b){return a.style.cssText=b+""}}),ia.support.optSelected||(ia.propHooks.selected=ia.extend(ia.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),ia.support.enctype||(ia.propFix.enctype="encoding"),ia.support.checkOn||ia.each(["radio","checkbox"],function(){ia.valHooks[this]={get:function(a){return null===a.getAttribute("value")?"on":a.value}}}),ia.each(["radio","checkbox"],function(){ia.valHooks[this]=ia.extend(ia.valHooks[this],{set:function(a,b){if(ia.isArray(b))return a.checked=ia.inArray(ia(a).val(),b)>=0}})});var Ka=/^(?:input|select|textarea)$/i,La=/^key/,Ma=/^(?:mouse|contextmenu)|click/,Na=/^(?:focusinfocus|focusoutblur)$/,Oa=/^([^.]*)(?:\.(.+)|)$/;ia.event={global:{},add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r=ia._data(a);if(r){for(d.handler&&(j=d,d=j.handler,f=j.selector),d.guid||(d.guid=ia.guid++),(h=r.events)||(h=r.events={}),(l=r.handle)||(l=r.handle=function(a){return typeof ia===V||a&&ia.event.triggered===a.type?b:ia.event.dispatch.apply(l.elem,arguments)},l.elem=a),c=(c||"").match(ka)||[""],i=c.length;i--;)g=Oa.exec(c[i])||[],o=q=g[1],p=(g[2]||"").split(".").sort(),k=ia.event.special[o]||{},o=(f?k.delegateType:k.bindType)||o,k=ia.event.special[o]||{},m=ia.extend({type:o,origType:q,data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&ia.expr.match.needsContext.test(f),namespace:p.join(".")},j),(n=h[o])||(n=h[o]=[],n.delegateCount=0,k.setup&&k.setup.call(a,e,p,l)!==!1||(a.addEventListener?a.addEventListener(o,l,!1):a.attachEvent&&a.attachEvent("on"+o,l))),k.add&&(k.add.call(a,m),m.handler.guid||(m.handler.guid=d.guid)),f?n.splice(n.delegateCount++,0,m):n.push(m),ia.event.global[o]=!0;a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=ia.hasData(a)&&ia._data(a);if(q&&(k=q.events)){for(b=(b||"").match(ka)||[""],j=b.length;j--;)if(h=Oa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=ia.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=k[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;f--;)g=m[f],!e&&p!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||ia.removeEvent(a,n,q.handle),delete k[n])}else for(n in k)ia.event.remove(a,n+b[j],c,d,!0);ia.isEmptyObject(k)&&(delete q.handle,ia._removeData(a,"events"))}},trigger:function(c,d,e,f){var g,h,i,j,k,l,m,n=[e||W],o=ga.call(c,"type")?c.type:c,p=ga.call(c,"namespace")?c.namespace.split("."):[];if(i=l=e=e||W,3!==e.nodeType&&8!==e.nodeType&&!Na.test(o+ia.event.triggered)&&(o.indexOf(".")>=0&&(p=o.split("."),o=p.shift(),p.sort()),h=o.indexOf(":")<0&&"on"+o,c=c[ia.expando]?c:new ia.Event(o,"object"==typeof c&&c),c.isTrigger=!0,c.namespace=p.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c.result=b,c.target||(c.target=e),d=null==d?[c]:ia.makeArray(d,[c]),k=ia.event.special[o]||{},f||!k.trigger||k.trigger.apply(e,d)!==!1)){if(!f&&!k.noBubble&&!ia.isWindow(e)){for(j=k.delegateType||o,Na.test(j+o)||(i=i.parentNode);i;i=i.parentNode)n.push(i),l=i;l===(e.ownerDocument||W)&&n.push(l.defaultView||l.parentWindow||a)}for(m=0;(i=n[m++])&&!c.isPropagationStopped();)c.type=m>1?j:k.bindType||o,g=(ia._data(i,"events")||{})[c.type]&&ia._data(i,"handle"),g&&g.apply(i,d),g=h&&i[h],g&&ia.acceptData(i)&&g.apply&&g.apply(i,d)===!1&&c.preventDefault();if(c.type=o,!f&&!c.isDefaultPrevented()&&(!k._default||k._default.apply(e.ownerDocument,d)===!1)&&("click"!==o||!ia.nodeName(e,"a"))&&ia.acceptData(e)&&h&&e[o]&&!ia.isWindow(e)){l=e[h],l&&(e[h]=null),ia.event.triggered=o;try{e[o]()}catch(q){}ia.event.triggered=b,l&&(e[h]=l)}return c.result}},dispatch:function(a){a=ia.event.fix(a);var c,d,e,f,g,h=[],i=da.call(arguments),j=(ia._data(this,"events")||{})[a.type]||[],k=ia.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){for(h=ia.event.handlers.call(this,a,j),c=0;(f=h[c++])&&!a.isPropagationStopped();)for(a.currentTarget=f.elem,g=0;(e=f.handlers[g++])&&!a.isImmediatePropagationStopped();)if(!a.namespace_re||a.namespace_re.test(e.namespace)){a.handleObj=e,a.data=e.data;var l=(ia.event.special[e.origType]||{}).handle||e.handler;l.apply&&(d=l.apply(f.elem,i)),d!==b&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation())}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,c){var d,e,f,g,h=[],i=c.delegateCount,j=a.target;if(i&&j.nodeType&&(!a.button||"click"!==a.type))for(;j!=this;j=j.parentNode||this)if(1===j.nodeType&&(j.disabled!==!0||"click"!==a.type)){for(f=[],g=0;g=0:ia.find(d,this,null,[j]).length),f[d]&&f.push(e);f.length&&h.push({elem:j,handlers:f})}return iy.cacheLength&&delete a[b.shift()],a[c]=d}}function e(a){return a[N]=!0,a}function f(a){var b=F.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}}function g(a,b,c,d){var e,f,g,h,i,j,k,n,o,p;if((b?b.ownerDocument||b:O)!==F&&E(b),b=b||F,c=c||[],!a||"string"!=typeof a)return c;if(1!==(h=b.nodeType)&&9!==h)return[];if(!H&&!d){if(e=pa.exec(a))if(g=e[1]){if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&L(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return Z.apply(c,$.call(b.getElementsByTagName(a),0)),c;if((g=e[3])&&P.getByClassName&&b.getElementsByClassName)return Z.apply(c,$.call(b.getElementsByClassName(g),0)),c}if(P.qsa&&!I.test(a)){if(k=!0,n=N,o=b,p=9===h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){for(j=l(a),(k=b.getAttribute("id"))?n=k.replace(sa,"\\$&"):b.setAttribute("id",n),n="[id='"+n+"'] ",i=j.length;i--;)j[i]=n+m(j[i]);o=na.test(a)&&b.parentNode||b,p=j.join(",")}if(p)try{return Z.apply(c,$.call(o.querySelectorAll(p),0)),c}catch(q){}finally{k||b.removeAttribute("id")}}}return u(a.replace(ga,"$1"),b,c,d)}function h(a,b){var c=b&&a,d=c&&(~b.sourceIndex||W)-(~a.sourceIndex||W);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function i(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function j(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function k(a){return e(function(b){return b=+b,e(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function l(a,b){var c,d,e,f,h,i,j,k=T[a+" "];if(k)return b?0:k.slice(0);for(h=a,i=[],j=y.preFilter;h;){c&&!(d=ha.exec(h))||(d&&(h=h.slice(d[0].length)||h),i.push(e=[])),c=!1,(d=ja.exec(h))&&(c=d.shift(),e.push({value:c,type:d[0].replace(ga," ")}),h=h.slice(c.length));for(f in y.filter)!(d=ma[f].exec(h))||j[f]&&!(d=j[f](d))||(c=d.shift(),e.push({value:c,type:f,matches:d}),h=h.slice(c.length));if(!c)break}return b?h.length:h?g.error(a):T(a,i).slice(0)}function m(a){for(var b=0,c=a.length,d="";b1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function p(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h-1&&(e[j]=!(g[j]=l))}}else s=p(s===g?s.splice(o,s.length):s),f?f(null,g,s,i):Z.apply(g,s)})}function r(a){for(var b,c,d,e=a.length,f=y.relative[a[0].type],g=f||y.relative[" "],h=f?1:0,i=n(function(a){return a===b},g,!0),j=n(function(a){return _.call(b,a)>-1},g,!0),k=[function(a,c,d){return!f&&(d||c!==D)||((b=c).nodeType?i(a,c,d):j(a,c,d))}];h1&&o(k),h>1&&m(a.slice(0,h-1)).replace(ga,"$1"),c,h0,f=a.length>0,h=function(e,h,i,j,k){var l,m,n,o=[],q=0,r="0",s=e&&[],t=null!=k,u=D,v=e||f&&y.find.TAG("*",k&&h.parentNode||h),w=Q+=null==u?1:Math.random()||.1;for(t&&(D=h!==F&&h,x=c);null!=(l=v[r]);r++){if(f&&l){for(m=0;n=a[m++];)if(n(l,h,i)){j.push(l);break}t&&(Q=w,x=++c)}d&&((l=!n&&l)&&q--,e&&s.push(l))}if(q+=r,d&&r!==q){for(m=0;n=b[m++];)n(s,o,h,i);if(e){if(q>0)for(;r--;)s[r]||o[r]||(o[r]=Y.call(j));o=p(o)}Z.apply(j,o),t&&!e&&o.length>0&&q+b.length>1&&g.uniqueSort(j)}return t&&(Q=w,D=u),s};return d?e(h):h}function t(a,b,c){for(var d=0,e=b.length;d2&&"ID"===(g=f[0]).type&&9===b.nodeType&&!H&&y.relative[f[1].type]){if(b=y.find.ID(g.matches[0].replace(ua,va),b)[0],!b)return c;a=a.slice(f.shift().value.length)}for(e=ma.needsContext.test(a)?0:f.length;e--&&(g=f[e],!y.relative[h=g.type]);)if((i=y.find[h])&&(d=i(g.matches[0].replace(ua,va),na.test(f[0].type)&&b.parentNode||b))){if(f.splice(e,1),a=d.length&&m(f),!a)return Z.apply(c,$.call(d,0)),c;break}}return B(a,j)(d,b,H,c,na.test(a)),c}function v(){}var w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N="sizzle"+-new Date,O=a.document,P={},Q=0,R=0,S=d(),T=d(),U=d(),V=typeof b,W=1<<31,X=[],Y=X.pop,Z=X.push,$=X.slice,_=X.indexOf||function(a){for(var b=0,c=this.length;b+~])"+aa+"*"),ka=new RegExp(fa),la=new RegExp("^"+ca+"$"),ma={ID:new RegExp("^#("+ba+")"),CLASS:new RegExp("^\\.("+ba+")"),NAME:new RegExp("^\\[name=['\"]?("+ba+")['\"]?\\]"),TAG:new RegExp("^("+ba.replace("w","w*")+")"),ATTR:new RegExp("^"+ea),PSEUDO:new RegExp("^"+fa),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+aa+"*(even|odd|(([+-]|)(\\d*)n|)"+aa+"*(?:([+-]|)"+aa+"*(\\d+)|))"+aa+"*\\)|)","i"),needsContext:new RegExp("^"+aa+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+aa+"*((?:-\\d)?\\d*)"+aa+"*\\)|)(?=[^-]|$)","i")},na=/[\x20\t\r\n\f]*[+~]/,oa=/^[^{]+\{\s*\[native code/,pa=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,qa=/^(?:input|select|textarea|button)$/i,ra=/^h\d$/i,sa=/'|\\/g,ta=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,ua=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,va=function(a,b){var c="0x"+b-65536;return c!==c?b:c<0?String.fromCharCode(c+65536):String.fromCharCode(c>>10|55296,1023&c|56320)};try{$.call(O.documentElement.childNodes,0)[0].nodeType}catch(wa){$=function(a){for(var b,c=[];b=this[a++];)c.push(b);return c}}A=g.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},E=g.setDocument=function(a){var d=a?a.ownerDocument||a:O;return d!==F&&9===d.nodeType&&d.documentElement?(F=d,G=d.documentElement,H=A(d),P.tagNameNoComments=f(function(a){return a.appendChild(d.createComment("")),!a.getElementsByTagName("*").length}),P.attributes=f(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return"boolean"!==b&&"string"!==b}),P.getByClassName=f(function(a){return a.innerHTML="",!(!a.getElementsByClassName||!a.getElementsByClassName("e").length)&&(a.lastChild.className="e",2===a.getElementsByClassName("e").length)}),P.getByName=f(function(a){a.id=N+0,a.innerHTML="
",G.insertBefore(a,G.firstChild);var b=d.getElementsByName&&d.getElementsByName(N).length===2+d.getElementsByName(N+0).length;return P.getIdNotName=!d.getElementById(N),G.removeChild(a),b}),y.attrHandle=f(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==V&&"#"===a.firstChild.getAttribute("href")})?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},P.getIdNotName?(y.find.ID=function(a,b){if(typeof b.getElementById!==V&&!H){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},y.filter.ID=function(a){var b=a.replace(ua,va);return function(a){return a.getAttribute("id")===b}}):(y.find.ID=function(a,c){if(typeof c.getElementById!==V&&!H){var d=c.getElementById(a);return d?d.id===a||typeof d.getAttributeNode!==V&&d.getAttributeNode("id").value===a?[d]:b:[]}},y.filter.ID=function(a){var b=a.replace(ua,va);return function(a){var c=typeof a.getAttributeNode!==V&&a.getAttributeNode("id");return c&&c.value===b}}),y.find.TAG=P.tagNameNoComments?function(a,b){if(typeof b.getElementsByTagName!==V)return b.getElementsByTagName(a)}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},y.find.NAME=P.getByName&&function(a,b){if(typeof b.getElementsByName!==V)return b.getElementsByName(name)},y.find.CLASS=P.getByClassName&&function(a,b){if(typeof b.getElementsByClassName!==V&&!H)return b.getElementsByClassName(a)},J=[],I=[":focus"],(P.qsa=c(d.querySelectorAll))&&(f(function(a){a.innerHTML="",a.querySelectorAll("[selected]").length||I.push("\\["+aa+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||I.push(":checked")}),f(function(a){a.innerHTML="",a.querySelectorAll("[i^='']").length&&I.push("[*^$]="+aa+"*(?:\"\"|'')"),a.querySelectorAll(":enabled").length||I.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),I.push(",.*:")})),(P.matchesSelector=c(K=G.matchesSelector||G.mozMatchesSelector||G.webkitMatchesSelector||G.oMatchesSelector||G.msMatchesSelector))&&f(function(a){P.disconnectedMatch=K.call(a,"div"),K.call(a,"[s!='']:x"),J.push("!=",fa)}),I=new RegExp(I.join("|")),J=new RegExp(J.join("|")),L=c(G.contains)||G.compareDocumentPosition?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},M=G.compareDocumentPosition?function(a,b){var c;return a===b?(C=!0,0):(c=b.compareDocumentPosition&&a.compareDocumentPosition&&a.compareDocumentPosition(b))?1&c||a.parentNode&&11===a.parentNode.nodeType?a===d||L(O,a)?-1:b===d||L(O,b)?1:0:4&c?-1:1:a.compareDocumentPosition?-1:1}:function(a,b){var c,e=0,f=a.parentNode,g=b.parentNode,i=[a],j=[b];if(a===b)return C=!0,0;if(!f||!g)return a===d?-1:b===d?1:f?-1:g?1:0;if(f===g)return h(a,b);for(c=a;c=c.parentNode;)i.unshift(c);for(c=b;c=c.parentNode;)j.unshift(c);for(;i[e]===j[e];)e++;return e?h(i[e],j[e]):i[e]===O?-1:j[e]===O?1:0},C=!1,[0,0].sort(M),P.detectDuplicates=C,F):F},g.matches=function(a,b){return g(a,null,null,b)},g.matchesSelector=function(a,b){if((a.ownerDocument||a)!==F&&E(a),b=b.replace(ta,"='$1']"),P.matchesSelector&&!H&&(!J||!J.test(b))&&!I.test(b))try{var c=K.call(a,b);if(c||P.disconnectedMatch||a.document&&11!==a.document.nodeType)return c}catch(d){}return g(b,F,null,[a]).length>0},g.contains=function(a,b){return(a.ownerDocument||a)!==F&&E(a),L(a,b)},g.attr=function(a,b){var c;return(a.ownerDocument||a)!==F&&E(a),H||(b=b.toLowerCase()),(c=y.attrHandle[b])?c(a):H||P.attributes?a.getAttribute(b):((c=a.getAttributeNode(b))||a.getAttribute(b))&&a[b]===!0?b:c&&c.specified?c.value:null},g.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},g.uniqueSort=function(a){var b,c=[],d=1,e=0;if(C=!P.detectDuplicates,a.sort(M),C){for(;b=a[d];d++)b===a[d-1]&&(e=c.push(d));for(;e--;)a.splice(c[e],1)}return a},z=g.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=z(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d];d++)c+=z(b);return c},y=g.selectors={cacheLength:50,createPseudo:e,match:ma,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ua,va),a[3]=(a[4]||a[5]||"").replace(ua,va),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||g.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&g.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return ma.CHILD.test(a[0])?null:(a[4]?a[2]=a[4]:c&&ka.test(c)&&(b=l(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){return"*"===a?function(){return!0}:(a=a.replace(ua,va).toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=S[a+" "];return b||(b=new RegExp("(^|"+aa+")"+a+"("+aa+"|$)"))&&S(a,function(a){return b.test(a.className||typeof a.getAttribute!==V&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=g.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){for(;p;){for(l=b;l=l[p];)if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(k=q[N]||(q[N]={}),j=k[a]||[],n=j[0]===Q&&j[1],m=j[0]===Q&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[Q,n,m];break}}else if(s&&(j=(b[N]||(b[N]={}))[a])&&j[0]===Q)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[N]||(l[N]={}))[a]=[Q,m]),l!==b)););return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,d=y.pseudos[a]||y.setFilters[a.toLowerCase()]||g.error("unsupported pseudo: "+a);return d[N]?d(b):d.length>1?(c=[a,a,"",b],y.setFilters.hasOwnProperty(a.toLowerCase())?e(function(a,c){for(var e,f=d(a,b),g=f.length;g--;)e=_.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:e(function(a){var b=[],c=[],d=B(a.replace(ga,"$1"));return d[N]?e(function(a,b,c,e){for(var f,g=d(a,null,e,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:e(function(a){return function(b){return g(a,b).length>0}}),contains:e(function(a){return function(b){return(b.textContent||b.innerText||z(b)).indexOf(a)>-1}}),lang:e(function(a){return la.test(a||"")||g.error("unsupported lang: "+a),a=a.replace(ua,va).toLowerCase(),function(b){var c;do if(c=H?b.getAttribute("xml:lang")||b.getAttribute("lang"):b.lang)return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===G},focus:function(a){return a===F.activeElement&&(!F.hasFocus||F.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeName>"@"||3===a.nodeType||4===a.nodeType)return!1;return!0},parent:function(a){return!y.pseudos.empty(a)},header:function(a){return ra.test(a.nodeName)},input:function(a){return qa.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||b.toLowerCase()===a.type)},first:k(function(){return[0]}),last:k(function(a,b){return[b-1]}),eq:k(function(a,b,c){ return[c<0?c+b:c]}),even:k(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:k(function(a,b,c){for(var d=c<0?c+b:c;++d1?ia.unique(c):c),c.selector=(this.selector?this.selector+" ":"")+a,c},has:function(a){var b,c=ia(a,this),d=c.length;return this.filter(function(){for(b=0;b=0:ia.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=Sa.test(a)||"string"!=typeof a?ia(a,b||this.context):0;d-1:ia.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}return this.pushStack(f.length>1?ia.unique(f):f)},index:function(a){return a?"string"==typeof a?ia.inArray(this[0],ia(a)):ia.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){var c="string"==typeof a?ia(a,b):ia.makeArray(a&&a.nodeType?[a]:a),d=ia.merge(this.get(),c);return this.pushStack(ia.unique(d))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),ia.fn.andSelf=ia.fn.addBack,ia.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return ia.dir(a,"parentNode")},parentsUntil:function(a,b,c){return ia.dir(a,"parentNode",c)},next:function(a){return k(a,"nextSibling")},prev:function(a){return k(a,"previousSibling")},nextAll:function(a){return ia.dir(a,"nextSibling")},prevAll:function(a){return ia.dir(a,"previousSibling")},nextUntil:function(a,b,c){return ia.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return ia.dir(a,"previousSibling",c)},siblings:function(a){return ia.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return ia.sibling(a.firstChild)},contents:function(a){return ia.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:ia.merge([],a.childNodes)}},function(a,b){ia.fn[a]=function(c,d){var e=ia.map(this,b,c);return Pa.test(a)||(d=c),d&&"string"==typeof d&&(e=ia.filter(d,e)),e=this.length>1&&!Ta[a]?ia.unique(e):e,this.length>1&&Qa.test(a)&&(e=e.reverse()),this.pushStack(e)}}),ia.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),1===b.length?ia.find.matchesSelector(b[0],a)?[b[0]]:[]:ia.find.matches(a,b)},dir:function(a,c,d){for(var e=[],f=a[c];f&&9!==f.nodeType&&(d===b||1!==f.nodeType||!ia(f).is(d));)1===f.nodeType&&e.push(f),f=f[c];return e},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var Ua="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Va=/ jQuery\d+="(?:null|\d+)"/g,Wa=new RegExp("<(?:"+Ua+")[\\s/>]","i"),Xa=/^\s+/,Ya=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Za=/<([\w:]+)/,$a=/\s*$/g,gb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:ia.support.htmlSerialize?[0,"",""]:[1,"X
","
"]},hb=m(W),ib=hb.appendChild(W.createElement("div"));gb.optgroup=gb.option,gb.tbody=gb.tfoot=gb.colgroup=gb.caption=gb.thead,gb.th=gb.td,ia.fn.extend({text:function(a){return ia.access(this,function(a){return a===b?ia.text(this):this.empty().append((this[0]&&this[0].ownerDocument||W).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(ia.isFunction(a))return this.each(function(b){ia(this).wrapAll(a.call(this,b))});if(this[0]){var b=ia(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return ia.isFunction(a)?this.each(function(b){ia(this).wrapInner(a.call(this,b))}):this.each(function(){var b=ia(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=ia.isFunction(a);return this.each(function(c){ia(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){ia.nodeName(this,"body")||ia(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.insertBefore(a,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=0;null!=(c=this[d]);d++)(!a||ia.filter(a,[c]).length>0)&&(b||1!==c.nodeType||ia.cleanData(t(c)),c.parentNode&&(b&&ia.contains(c.ownerDocument,c)&&q(t(c,"script")),c.parentNode.removeChild(c)));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&ia.cleanData(t(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&ia.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return ia.clone(this,a,b)})},html:function(a){return ia.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return 1===c.nodeType?c.innerHTML.replace(Va,""):b;if("string"==typeof a&&!ab.test(a)&&(ia.support.htmlSerialize||!Wa.test(a))&&(ia.support.leadingWhitespace||!Xa.test(a))&&!gb[(Za.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ya,"<$1>");try{for(;d")?f=a.cloneNode(!0):(ib.innerHTML=a.outerHTML,ib.removeChild(f=ib.firstChild)),!(ia.support.noCloneEvent&&ia.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||ia.isXMLDoc(a)))for(d=t(f),h=t(a),g=0;null!=(e=h[g]);++g)d[g]&&s(e,d[g]);if(b)if(c)for(h=h||t(a),d=d||t(f),g=0;null!=(e=h[g]);g++)r(e,d[g]);else r(a,f);return d=t(f,"script"),d.length>0&&q(d,!i&&t(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,l=a.length,n=m(b),o=[],p=0;p")+k[2],e=k[0];e--;)h=h.lastChild;if(!ia.support.leadingWhitespace&&Xa.test(f)&&o.push(b.createTextNode(Xa.exec(f)[0])),!ia.support.tbody)for(f="table"!==i||$a.test(f)?""!==k[1]||$a.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;e--;)ia.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j);for(ia.merge(o,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=n.lastChild}else o.push(b.createTextNode(f));for(h&&n.removeChild(h),ia.support.appendChecked||ia.grep(t(o,"input"),u),p=0;f=o[p++];)if((!d||ia.inArray(f,d)===-1)&&(g=ia.contains(f.ownerDocument,f),h=t(n.appendChild(f),"script"),g&&q(h),c))for(e=0;f=h[e++];)db.test(f.type||"")&&c.push(f);return h=null,n},cleanData:function(a,b){for(var c,d,e,f,g=0,h=ia.expando,i=ia.cache,j=ia.support.deleteExpando,k=ia.event.special;null!=(c=a[g]);g++)if((b||ia.acceptData(c))&&(e=c[h],f=e&&i[e])){if(f.events)for(d in f.events)k[d]?ia.event.remove(c,d):ia.removeEvent(c,d,f.handle);i[e]&&(delete i[e],j?delete c[h]:typeof c.removeAttribute!==V?c.removeAttribute(h):c[h]=null,_.push(e))}}});var jb,kb,lb,mb=/alpha\([^)]*\)/i,nb=/opacity\s*=\s*([^)]*)/,ob=/^(top|right|bottom|left)$/,pb=/^(none|table(?!-c[ea]).+)/,qb=/^margin/,rb=new RegExp("^("+ja+")(.*)$","i"),sb=new RegExp("^("+ja+")(?!px)[a-z%]+$","i"),tb=new RegExp("^([+-])=("+ja+")","i"),ub={BODY:"block"},vb={position:"absolute",visibility:"hidden",display:"block"},wb={letterSpacing:0,fontWeight:400},xb=["Top","Right","Bottom","Left"],yb=["Webkit","O","Moz","ms"];ia.fn.extend({css:function(a,c){return ia.access(this,function(a,c,d){var e,f,g={},h=0;if(ia.isArray(c)){for(f=kb(a),e=c.length;h1)},show:function(){return x(this,!0)},hide:function(){return x(this)},toggle:function(a){var b="boolean"==typeof a;return this.each(function(){(b?a:w(this))?ia(this).show():ia(this).hide()})}}),ia.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=lb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ia.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,g,h,i=ia.camelCase(c),j=a.style;if(c=ia.cssProps[i]||(ia.cssProps[i]=v(j,i)),h=ia.cssHooks[c]||ia.cssHooks[i],d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];if(g=typeof d,"string"===g&&(f=tb.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(ia.css(a,c)),g="number"),!(null==d||"number"===g&&isNaN(d)||("number"!==g||ia.cssNumber[i]||(d+="px"),ia.support.clearCloneStyle||""!==d||0!==c.indexOf("background")||(j[c]="inherit"),h&&"set"in h&&(d=h.set(a,d,e))===b)))try{j[c]=d}catch(k){}}},css:function(a,c,d,e){var f,g,h,i=ia.camelCase(c);return c=ia.cssProps[i]||(ia.cssProps[i]=v(a.style,i)),h=ia.cssHooks[c]||ia.cssHooks[i],h&&"get"in h&&(g=h.get(a,!0,d)),g===b&&(g=lb(a,c,e)),"normal"===g&&c in wb&&(g=wb[c]),""===d||d?(f=parseFloat(g),d===!0||ia.isNumeric(f)?f||0:g):g},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e}}),a.getComputedStyle?(kb=function(b){return a.getComputedStyle(b,null)},lb=function(a,c,d){var e,f,g,h=d||kb(a),i=h?h.getPropertyValue(c)||h[c]:b,j=a.style;return h&&(""!==i||ia.contains(a.ownerDocument,a)||(i=ia.style(a,c)),sb.test(i)&&qb.test(c)&&(e=j.width,f=j.minWidth,g=j.maxWidth,j.minWidth=j.maxWidth=j.width=i,i=h.width,j.width=e,j.minWidth=f,j.maxWidth=g)),i}):W.documentElement.currentStyle&&(kb=function(a){return a.currentStyle},lb=function(a,c,d){var e,f,g,h=d||kb(a),i=h?h[c]:b,j=a.style;return null==i&&j&&j[c]&&(i=j[c]),sb.test(i)&&!ob.test(c)&&(e=j.left,f=a.runtimeStyle,g=f&&f.left,g&&(f.left=a.currentStyle.left),j.left="fontSize"===c?"1em":i,i=j.pixelLeft+"px",j.left=e,g&&(f.left=g)),""===i?"auto":i}),ia.each(["height","width"],function(a,b){ia.cssHooks[b]={get:function(a,c,d){if(c)return 0===a.offsetWidth&&pb.test(ia.css(a,"display"))?ia.swap(a,vb,function(){return A(a,b,d)}):A(a,b,d)},set:function(a,c,d){var e=d&&kb(a);return y(a,c,d?z(a,b,d,ia.support.boxSizing&&"border-box"===ia.css(a,"boxSizing",!1,e),e):0)}}}),ia.support.opacity||(ia.cssHooks.opacity={get:function(a,b){return nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=ia.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===ia.trim(f.replace(mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=mb.test(f)?f.replace(mb,e):f+" "+e)}}),ia(function(){ia.support.reliableMarginRight||(ia.cssHooks.marginRight={get:function(a,b){if(b)return ia.swap(a,{display:"inline-block"},lb,[a,"marginRight"])}}),!ia.support.pixelPosition&&ia.fn.position&&ia.each(["top","left"],function(a,b){ia.cssHooks[b]={get:function(a,c){if(c)return c=lb(a,b),sb.test(c)?ia(a).position()[b]+"px":c}}})}),ia.expr&&ia.expr.filters&&(ia.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!ia.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||ia.css(a,"display"))},ia.expr.filters.visible=function(a){return!ia.expr.filters.hidden(a)}),ia.each({margin:"",padding:"",border:"Width"},function(a,b){ia.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+xb[d]+b]=f[d]||f[d-2]||f[0];return e}},qb.test(a)||(ia.cssHooks[a+b].set=y)});var zb=/%20/g,Ab=/\[\]$/,Bb=/\r?\n/g,Cb=/^(?:submit|button|image|reset|file)$/i,Db=/^(?:input|select|textarea|keygen)/i;ia.fn.extend({serialize:function(){return ia.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=ia.prop(this,"elements");return a?ia.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!ia(this).is(":disabled")&&Db.test(this.nodeName)&&!Cb.test(a)&&(this.checked||!bb.test(a))}).map(function(a,b){var c=ia(this).val();return null==c?null:ia.isArray(c)?ia.map(c,function(a){return{name:b.name,value:a.replace(Bb,"\r\n")}}):{name:b.name,value:c.replace(Bb,"\r\n")}}).get()}}),ia.param=function(a,c){var d,e=[],f=function(a,b){b=ia.isFunction(b)?b():null==b?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(c===b&&(c=ia.ajaxSettings&&ia.ajaxSettings.traditional),ia.isArray(a)||a.jquery&&!ia.isPlainObject(a))ia.each(a,function(){f(this.name,this.value)});else for(d in a)D(d,a[d],c,f);return e.join("&").replace(zb,"+")},ia.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(a,b){ia.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),ia.fn.hover=function(a,b){return this.mouseenter(a).mouseleave(b||a)};var Eb,Fb,Gb=ia.now(),Hb=/\?/,Ib=/#.*$/,Jb=/([?&])_=[^&]*/,Kb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Lb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mb=/^(?:GET|HEAD)$/,Nb=/^\/\//,Ob=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Pb=ia.fn.load,Qb={},Rb={},Sb="*/".concat("*");try{Fb=X.href}catch(Tb){Fb=W.createElement("a"),Fb.href="",Fb=Fb.href}Eb=Ob.exec(Fb.toLowerCase())||[],ia.fn.load=function(a,c,d){if("string"!=typeof a&&Pb)return Pb.apply(this,arguments);var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),ia.isFunction(c)?(d=c,c=b):c&&"object"==typeof c&&(g="POST"),h.length>0&&ia.ajax({url:a,type:g,dataType:"html",data:c}).done(function(a){f=arguments,h.html(e?ia("
").append(ia.parseHTML(a)).find(e):a)}).complete(d&&function(a,b){h.each(d,f||[a.responseText,b,a])}),this},ia.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){ia.fn[b]=function(a){return this.on(b,a)}}),ia.each(["get","post"],function(a,c){ia[c]=function(a,d,e,f){return ia.isFunction(d)&&(f=f||e,e=d,d=b),ia.ajax({url:a,type:c,dataType:f,data:d,success:e})}}),ia.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Fb,type:"GET",isLocal:Lb.test(Eb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Sb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":ia.parseJSON,"text xml":ia.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?G(G(a,ia.ajaxSettings),b):G(ia.ajaxSettings,a)},ajaxPrefilter:E(Qb),ajaxTransport:E(Rb),ajax:function(a,c){function d(a,c,d,e){var f,l,s,t,v,x=c;2!==u&&(u=2,i&&clearTimeout(i),k=b,h=e||"",w.readyState=a>0?4:0,d&&(t=H(m,w,d)),a>=200&&a<300||304===a?(m.ifModified&&(v=w.getResponseHeader("Last-Modified"),v&&(ia.lastModified[g]=v),v=w.getResponseHeader("etag"),v&&(ia.etag[g]=v)),204===a?(f=!0,x="nocontent"):304===a?(f=!0,x="notmodified"):(f=I(m,t),x=f.state,l=f.data,s=f.error,f=!s)):(s=x,!a&&x||(x="error",a<0&&(a=0))),w.status=a,w.statusText=(c||x)+"",f?p.resolveWith(n,[l,x,w]):p.rejectWith(n,[w,x,s]),w.statusCode(r),r=b,j&&o.trigger(f?"ajaxSuccess":"ajaxError",[w,m,f?l:s]),q.fireWith(n,[w,x]),j&&(o.trigger("ajaxComplete",[w,m]),--ia.active||ia.event.trigger("ajaxStop")))}"object"==typeof a&&(c=a,a=b),c=c||{};var e,f,g,h,i,j,k,l,m=ia.ajaxSetup({},c),n=m.context||m,o=m.context&&(n.nodeType||n.jquery)?ia(n):ia.event,p=ia.Deferred(),q=ia.Callbacks("once memory"),r=m.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!l)for(l={};b=Kb.exec(h);)l[b[1].toLowerCase()]=b[2];b=l[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?h:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(u<2)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return k&&k.abort(b),d(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,m.url=((a||m.url||Fb)+"").replace(Ib,"").replace(Nb,Eb[1]+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=ia.trim(m.dataType||"*").toLowerCase().match(ka)||[""],null==m.crossDomain&&(e=Ob.exec(m.url.toLowerCase()),m.crossDomain=!(!e||e[1]===Eb[1]&&e[2]===Eb[2]&&(e[3]||("http:"===e[1]?80:443))==(Eb[3]||("http:"===Eb[1]?80:443)))),m.data&&m.processData&&"string"!=typeof m.data&&(m.data=ia.param(m.data,m.traditional)),F(Qb,m,c,w),2===u)return w;j=m.global,j&&0===ia.active++&&ia.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!Mb.test(m.type),g=m.url,m.hasContent||(m.data&&(g=m.url+=(Hb.test(g)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=Jb.test(g)?g.replace(Jb,"$1_="+Gb++):g+(Hb.test(g)?"&":"?")+"_="+Gb++)),m.ifModified&&(ia.lastModified[g]&&w.setRequestHeader("If-Modified-Since",ia.lastModified[g]),ia.etag[g]&&w.setRequestHeader("If-None-Match",ia.etag[g])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",m.contentType),w.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+Sb+"; q=0.01":""):m.accepts["*"]);for(f in m.headers)w.setRequestHeader(f,m.headers[f]);if(m.beforeSend&&(m.beforeSend.call(n,w,m)===!1||2===u))return w.abort();v="abort";for(f in{success:1,error:1,complete:1})w[f](m[f]);if(k=F(Rb,m,c,w)){w.readyState=1,j&&o.trigger("ajaxSend",[w,m]),m.async&&m.timeout>0&&(i=setTimeout(function(){w.abort("timeout")},m.timeout));try{u=1,k.send(s,d)}catch(x){if(!(u<2))throw x;d(-1,x)}}else d(-1,"No Transport");return w},getScript:function(a,c){return ia.get(a,b,c,"script")},getJSON:function(a,b,c){return ia.get(a,b,c,"json")}}),ia.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return ia.globalEval(a),a}}}),ia.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),ia.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=W.head||ia("head")[0]||W.documentElement;return{send:function(b,e){c=W.createElement("script"),c.async=!0,a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,b){(b||!c.readyState||/loaded|complete/.test(c.readyState))&&(c.onload=c.onreadystatechange=null,c.parentNode&&c.parentNode.removeChild(c),c=null,b||e(200,"success"))},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(b,!0)}}}});var Ub=[],Vb=/(=)\?(?=&|$)|\?\?/;ia.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Ub.pop()||ia.expando+"_"+Gb++;return this[a]=!0,a}}),ia.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.jsonp!==!1&&(Vb.test(c.url)?"url":"string"==typeof c.data&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vb.test(c.data)&&"data");if(i||"jsonp"===c.dataTypes[0])return f=c.jsonpCallback=ia.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,i?c[i]=c[i].replace(Vb,"$1"+f):c.jsonp!==!1&&(c.url+=(Hb.test(c.url)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||ia.error(f+" was not called"),h[0]},c.dataTypes[0]="json",g=a[f],a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,Ub.push(f)),h&&ia.isFunction(g)&&g(h[0]),h=g=b}),"script"});var Wb,Xb,Yb=0,Zb=a.ActiveXObject&&function(){var a;for(a in Wb)Wb[a](b,!0)};ia.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&J()||K()}:J,Xb=ia.ajaxSettings.xhr(),ia.support.cors=!!Xb&&"withCredentials"in Xb,Xb=ia.support.ajax=!!Xb,Xb&&ia.ajaxTransport(function(c){if(!c.crossDomain||ia.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();if(c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async),c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),c.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l;try{if(d&&(e||4===i.readyState))if(d=b,g&&(i.onreadystatechange=ia.noop,Zb&&delete Wb[g]),e)4!==i.readyState&&i.abort();else{l={},h=i.status,j=i.getAllResponseHeaders(),"string"==typeof i.responseText&&(l.text=i.responseText);try{k=i.statusText}catch(m){k=""}h||!c.isLocal||c.crossDomain?1223===h&&(h=204):h=l.text?200:404}}catch(n){e||f(-1,n)}l&&f(h,k,l,j)},c.async?4===i.readyState?setTimeout(d):(g=++Yb,Zb&&(Wb||(Wb={},ia(a).unload(Zb)),Wb[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(b,!0)}}}});var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+ja+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[P],ec={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=bc.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){if(c=+f[2],d=f[3]||(ia.cssNumber[a]?"":"px"),"px"!==d&&h){h=ia.css(e.elem,a,!0)||c||1;do i=i||".5",h/=i,ia.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&1!==i&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};ia.Animation=ia.extend(N,{tweener:function(a,b){ia.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;d-1,l={},m={};k?(m=g.position(),e=m.top,f=m.left):(e=parseFloat(i)||0,f=parseFloat(j)||0),ia.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(l.top=b.top-h.top+e),null!=b.left&&(l.left=b.left-h.left+f),"using"in b?b.using.call(a,l):g.css(l)}},ia.fn.extend({position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===ia.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),ia.nodeName(a[0],"html")||(c=a.offset()),c.top+=ia.css(a[0],"borderTopWidth",!0),c.left+=ia.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-ia.css(d,"marginTop",!0),left:b.left-c.left-ia.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||W.documentElement;a&&!ia.nodeName(a,"html")&&"static"===ia.css(a,"position");)a=a.offsetParent;return a||W.documentElement})}}),ia.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);ia.fn[a]=function(e){return ia.access(this,function(a,e,f){var g=S(a);return f===b?g?c in g?g[c]:g.document.documentElement[e]:a[e]:void(g?g.scrollTo(d?ia(g).scrollLeft():f,d?f:ia(g).scrollTop()):a[e]=f)},a,e,arguments.length,null)}}),ia.each({Height:"height",Width:"width"},function(a,c){ia.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){ia.fn[e]=function(e,f){var g=arguments.length&&(d||"boolean"!=typeof e),h=d||(e===!0||f===!0?"margin":"border");return ia.access(this,function(c,d,e){var f;return ia.isWindow(c)?c.document.documentElement["client"+a]:9===c.nodeType?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?ia.css(c,d,h):ia.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=ia,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return ia})}(window),function(){function a(a){function b(b,c,d,e,f,g){for(;f>=0&&f1?i.unshift(BI.deepClone(b[e[e.length-1]])):i.unshift(BI.deepClone(f));var j=c.similar.apply(c,i);BI.isKey(j.id)&&(h=j.id,delete j.id),e.length>1?(b[h]=j,c[g](e[0],f,{silent:!0})):c[g](h,j,{silent:!0}),e.unshift(h),!BI.has(c._tmp,e[0])&&c.parent&&c.parent._change(c),c.duplicate.apply(c,e),c.trigger("duplicate",e)})},removeChild:function(a,b){return BI.isArray(this._childs[a])?(BI.remove(this._childs[a],b),void(BI.isEmpty(this._childs[a])&&delete this._childs[a])):void delete this._childs[a]},has:function(a,b){return b===!0?_.has(this.tmp,a):(this._start===!0&&this._changing_===!1&&(this._hass[a]=!0),BI.Model.superclass.has.apply(this,arguments))},cat:function(a){if(_.has(this._tmp,a))return this._tmp[a];if(this._start===!0&&this._hass[a])switch(delete this._hass[a],a){case"default":break;case"current":break;default:this._gets.push(a)}if(_.has(this.attributes,a))return this.attributes[a];var b=_.result(this,"_static");return BI.isFunction(b[a])?b[a].apply(this,BI.values(arguments).slice(1)):b[a]},get:function(){return BI.deepClone(this.cat.apply(this,arguments))},set:function(a,b,c){return this._start===!0||this._changing_===!0?(this._F.push({f:this.set,arg:arguments}),this):BI.Model.superclass.set.apply(this,arguments)},unset:function(a,b){var c=this;return BI.each(this._childs,function(b,d){b+="";var e=b.split(".");_.isEqual(a,e[0])&&(delete c._childs[a],BI.isArray(d)||(d=[d]),BI.each(d,function(a,b){b.trigger("unset")}))}),BI.Model.superclass.unset.apply(this,arguments)},tmp:function(a,b,c){if(this._start===!0||this._changing_===!0)return this._F.push({f:this.tmp,arg:arguments}),this;var d,e,f,g,h,i,j,k,l;if(null==a)return this;"object"==typeof a?(e=a,c=b):(e={})[a]=b,c||(c={}),f=c.unset,h=c.silent,g=[],i=this._changingTmp,this._changingTmp=!0,i||(this._previousTmp=_.clone(this._tmp),this.changedTmp={}),this._previousTmp||(this._previousTmp=_.clone(this._tmp)),l=this._tmp,k=this._previousTmp;for(d in e)b=e[d],_.isEqual(l[d],b)||g.push(d),_.isEqual(k[d],b)?delete this.changedTmp[d]:this.changedTmp[d]=b,f?delete l[d]:l[d]=b;if(!h){g.length&&(this._pendingTmp=c);for(var m=0,n=g.length;m0&&this.refresh(b)}).listenTo(this.model,"change",function(a){this.delegateEvents()}).listenTo(this.model,"changed",function(a,b,c,d){if(BI.has(a,"current")&&BI.size(a)>1)throw new Error("refresh操作不能调用set操作");var e=!BI.has(a,"current")&&!this.local()&&this.notifyParent().notify();this.model.actionEnd()&&this.actionEnd(),this.model._changing_=!0,e&&!BI.isEmpty(a)&&this.change(a,b,c,d),this.model._changing_=!1,this.model.actionEnd()&&this.actionEnd()}).listenTo(this.model,"destroy",function(){this._destroy()}).listenTo(this.model,"unset",function(){this._destroy()}).listenTo(this.model,"splice",function(a){this.splice.apply(this,a)}).listenTo(this.model,"duplicate",function(a){this.duplicate.apply(this,a)}),this._F=[];var b=["_init","_defaultConfig","_vessel","_render","getName","listenEnd","local","refresh","load","change"];b=BI.makeObject(b,!0),BI.each(this.constructor.caller.caller.prototype,function(c){if(!b[c]){var d=a[c];BI.isFunction(d)&&(a[c]=BI.bind(function(){return this.model._start===!0?void this._F.push({f:d,arg:arguments}):d.apply(this,arguments)},a))}}),this.created&&this.created()},change:function(a,b){},actionEnd:function(){var a=this,b=this._F.slice(0);return this._F=[],BI.each(b,function(b,c){c.f.apply(a,c.arg)}),this},delegateEvents:function(a){if(!a&&!(a=BI.deepClone(_.result(this,"events"))))return this;var b=/^(\S+)\s*(.*)$/;for(var c in a){var d=a[c];if(_.isFunction(d)||(d=this[a[c]]),d){var e=c.match(b),f=!0;switch(e[1]){case"draggable":break;case"droppable":break;case"sortable":break;case"resizable":break;case"hover":break;default:f=!1}var g=new BI.OffList({event:e[1]+".delegateEvents"+this.cid}),h=e[2].split("."),i=h[1],j=f?new BI.EventList({event:e[1],handle:i,callback:BI.bind(d,this)}):new BI.ListenerList({event:e[1]+".delegateEvents"+this.cid,handle:i,callback:BI.bind(d,this),context:this}),k=[];this[h[0]]&&(this[h[0]]instanceof $||this[h[0]].element instanceof $)?(k=[this[h[0]]],delete a[c]):(BI.isArray(this[h[0]])||BI.isPlainObject(this[h[0]]))&&(k=this[h[0]],delete a[c]),g.populate(k),j.populate(k)}}return BI.View.superclass.delegateEvents.apply(this,[a])},_vessel:function(){this._cardLayouts={},this._cardLayouts[this.getName()]=new BI.CardLayout({element:this});var a=BI.createWidget();return this._cardLayouts[this.getName()].addCardByName(this.getName(),a),a},render:function(a){return this},addSubVessel:function(a,b,c){c||(c={}),this._cardLayouts||(this._cardLayouts={});var d=a+this.cid;return c.isLayer&&(b=BI.Layers.has(d)?BI.Layers.get(d):BI.Layers.create(d,b)),this._cardLayouts[a]?(c.defaultShowName&&this._cardLayouts[a].setDefaultShowName(c.defaultShowName),this):(this._cardLayouts[a]=BI.createWidget({type:"bi.card",element:b,defaultShowName:c.defaultShowName}),this)},removeSubVessel:function(a){var b=this,c=a+this.cid;BI.Layers.remove(c);var d=this._cardLayouts[a]&&this._cardLayouts[a].getAllCardNames();return BI.each(d,function(a,c){delete b._cards[c]}),this._cardLayouts[a]&&this._cardLayouts[a]._destroy(),this},createView:function(a,b,c){return BI.Factory.createView(a,this.get(a),b,c)},skipTo:function(a,b,c,d,e){if(this.model._start===!0||this._changing_===!0)return this._F.push({f:this.skipTo,arg:arguments}),this;var f=this,g=BI.isKey(c),h=void 0;if(BI.isKey(b)&&(b+=""),b=b||this.getName(),e||(e={}),g){c+="";var i=c.split(".");BI.each(i,function(a,b){h=0===a?f.model.get(b)||{}:h[b]||{}}),h.id=e.id||i[i.length-1]}else h=c;BI.extend(h,e.data);var j=e.action||new BI.ShowAction,k=this._cardLayouts[b];if(!k)return this;if(k.setVisible(!0),BI.isKey(a)&&!k.isCardExisted(a)){var l=this.createView(this.rootURL+"/"+a,h,d);g&&this.model.addChild(c,l.model),l.listenTo(l.model,"destroy",function(){delete f._cards[a],k.deleteCardByName(a),k.isAllCardHide()&&(k.setVisible(!1),BI.Layers.hide(b+f.cid))}).listenTo(l.model,"unset",function(){delete f._cards[a],k.deleteCardByName(a)}),k.addCardByName(a,l),this._cards||(this._cards={}),this._cards[a]=l,h={},this.on("end:"+l.cid,function(){var d,e,h=!1;g&&(e=c.split("."),BI.each(e,function(a,b){d=0===a?f.model.get(b)||(h=!0):d[b]||(h=!0)})),h&&(delete f._cards[a],f.model.removeChild(c,l.model),k.deleteCardByName(a),l._destroy(),k.setVisible(!1)),j.actionBack(l,null,function(){k.isAllCardHide()&&(k.setVisible(!1),BI.Layers.hide(b+f.cid)),!h&&f.listenEnd.apply(f,g?e:[c])!==!1&&f.populate()})}).on("change:"+l.cid,_.bind(this.notifyParent,this))}return BI.isKey(a)&&BI.Layers.show(b+this.cid),k.showCardByName(a,j,function(){BI.isKey(a)&&f._cards[a].populate(h,e)}),!BI.isKey(a)&&BI.Layers.hide(b+this.cid),this._cards[a]},listenEnd:function(a,b,c){return this},notifyParentEnd:function(a){return this.parent&&this.parent.trigger("end:"+this.cid),this.trigger("end"),!a&&this.notify(),this},notifyParent:function(){return this.parent&&this.parent.notify().trigger("change:"+this.cid),this},notify:function(){return this.model.unset("current",{silent:!0}),this},getName:function(){return"VIEW"},refresh:function(a){},local:function(){return!1},load:function(a){},readData:function(a,b){function c(a){d.model.load(a),d.load(a),BI.each(e,function(b,c){BI.isFunction(c)&&c.apply(d,[a])})}b||(b={});var d=this,e=[].slice.call(arguments,2);if(!a&&this._readed===!0)return void c(this.model.toJSON());var f=b.success;this.model.read(BI.extend({silent:!0},b,{success:function(b,e){c(b),!a&&(d._readed=!0),d.delegateEvents(),f&&f(b,e)}}))},cat:function(){return this.model.cat.apply(this.model,arguments)},get:function(){return this.model.get.apply(this.model,arguments)},set:function(){return this.model.set.apply(this.model,arguments)},has:function(){return this.model.has.apply(this.model,arguments)},getEditing:function(){return this.model.getEditing()},reading:function(a){var b=this,c=BI.UUID();this.model.read(BI.extend({},a,{beforeSend:function(){var a=BI.createWidget({type:"bi.vertical",items:[{type:"bi.layout",height:30,cls:"loading-background"}],element:BI.Maskers.make(c,b)});a.setVisible(!0)},complete:function(b){a.complete&&a.complete(b),BI.Maskers.remove(c)}}))},updating:function(a){var b=this,c=BI.UUID();this.model.update(BI.extend({},a,{noset:!0,beforeSend:function(){var a=BI.createWidget({type:"bi.vertical",items:[{type:"bi.layout",height:30,cls:"loading-background"}],element:BI.Maskers.make(c,b)});a.setVisible(!0)},complete:function(b){a.complete&&a.complete(b),BI.Maskers.remove(c)}}))},patching:function(a){var b=this,c=BI.UUID();this.model.patch(BI.extend({},a,{noset:!0,beforeSend:function(){var a=BI.createWidget({type:"bi.vertical",items:[{type:"bi.layout",height:30,cls:"loading-background"}],element:BI.Maskers.make(c,b)});a.setVisible(!0)},complete:function(b){a.complete&&a.complete(b),BI.Maskers.remove(c)}}))},populate:function(a,b){if(b||(b={}),b.force===!0&&this.notify(),this._cardLayouts&&this._cardLayouts[this.getName()]&&this._cardLayouts[this.getName()].showCardByName(this.getName()),this._F.length>0)throw new Error("流程错误");if(b.force===!0)return void this.model.set(a,b).set({current:this.model.get("default")});if(b.force===!1)return void this.model.set(a);var c=BI.clone(a||{});delete c.id;var d=BI.has(this.model.toJSON(),_.keys(c)),e=BI.isEmpty(c)||d&&this.model.matches(a);e===!0?this.model.set({current:this.model.get("default")}):d===!1?this.model.set(a):this.model.set(a,b).set({current:this.model.get("default")})},splice:function(a,b,c,d){},duplicate:function(a,b,c,d){},_unMount:function(){this.beforeDestroy&&this.beforeDestroy(),BI.each(this._cardLayouts,function(a,b){b&&b._unMount()}),delete this._cardLayouts,delete this._cards,this.destroyed&&this.destroyed(),this.trigger(BI.Events.UNMOUNT),this.off()},_destroy:function(){var a=this;BI.each(this._cardLayouts,function(b,c){c&&c._unMount(),BI.Layers.remove(b+a.cid)}),delete this._cardLayouts,delete this._cards,this.destroyed&&this.destroyed(),this.remove(),this.trigger(BI.Events.DESTROY),this.off()}}),function(){var a={};BI.shortcut=function(b,c){if(null!=a[b])throw"shortcut:["+b+"] has been registed";a[b]=c};var b=function(b){if(b.classType)return new(new Function("return "+b.classType+";")())(b);var c=b.type.toLowerCase(),d=a[c];return new d(b)};BI.createWidget=function(a,c){var d;if(c||(c={}),BI.isEmpty(a)&&BI.isEmpty(c))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(a))return a;if(a&&(a.type||c.type))return d=BI.extend({},c,a),BI.Plugin.getObject(d.type,b(BI.Plugin.getWidget(d.type,d)));if(a&&a.el&&(a.el.type||c.type))return d=BI.extend({},c,a.el),BI.Plugin.getObject(d.type,b(BI.Plugin.getWidget(d.type,d)));if(a&&BI.isWidget(a.el))return a.el;throw new Error("无法根据item创建组件")}}(),function(a,b){function c(a){return function(b,c,d){var e,f=b[c];f&&f.target==b||(e=b[c]=function(){for(var a,b=e.before,c=arguments,d=b.length;d--;){if(a=b[d].advice.apply(this,c),a===!1)return!1;c=a||c}for(var f=e.method.apply(this,c),g=e.after,h=0,i=g.length;h127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},c=function(a){for(var b="",c=0,d=0,e=0,f=0;c191&&d<224?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),e=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&e),c+=3);return b};_.extend(BI,{encode:function(c){var d,e,f,g,h,i,j,k="",l=0;for(c=b(c);l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+a.charAt(g)+a.charAt(h)+a.charAt(i)+a.charAt(j);return k},decode:function(b){var d,e,f,g,h,i,j,k="",l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=c(k)}})}(),BI.CellSizeAndPositionManager=function(a,b,c){this._cellSizeGetter=b,this._cellCount=a,this._estimatedCellSize=c,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(a,b){this._cellCount=a,this._estimatedCellSize=b},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(a){if(!(a<0||a>=this._cellCount)){if(a>this._lastMeasuredIndex){for(var b=this.getSizeAndPositionOfLastMeasuredCell(),c=b.offset+b.size,d=this._lastMeasuredIndex+1;d<=a;d++){var e=this._cellSizeGetter(d);null==e||isNaN(e)||(this._cellSizeAndPositionData[d]={offset:c,size:e},c+=e)}this._lastMeasuredIndex=a}return this._cellSizeAndPositionData[a]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var a=this.getSizeAndPositionOfLastMeasuredCell();return a.offset+a.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(a,b,c,d){var e,f=this.getSizeAndPositionOfCell(d),g=f.offset,h=g-b+f.size;switch(a){case"start":e=g;break;case"end":e=h;break;case"center":e=g-(b-f.size)/2;break;default:e=Math.max(h,Math.min(g,c))}var i=this.getTotalSize();return Math.max(0,Math.min(i-b,e))},getVisibleCellRange:function(a,b){var c=this.getTotalSize();if(0===c)return{};var d=b+a,e=this._findNearestCell(b),f=this.getSizeAndPositionOfCell(e);b=f.offset+f.size;for(var g=e;bc&&(a=d-1)}if(b>0)return b-1},_exponentialSearch:function(a,b){for(var c=1;a=a?this._binarySearch(c,0,a):this._exponentialSearch(c,a)}}},BI.ScalingCellSizeAndPositionManager=function(a,b,c,d){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(a,b,c),this._maxScrollSize=d||1e7},BI.ScalingCellSizeAndPositionManager.prototype={constructor:BI.ScalingCellSizeAndPositionManager,configure:function(){this._cellSizeAndPositionManager.configure.apply(this._cellSizeAndPositionManager,arguments)},getCellCount:function(){return this._cellSizeAndPositionManager.getCellCount()},getEstimatedCellSize:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()},getLastMeasuredIndex:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()},getOffsetAdjustment:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(),e=this._getOffsetPercentage(a,b,d);return Math.round(e*(d-c))},getSizeAndPositionOfCell:function(a){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(a)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(a,b,c,d){c=this._safeOffsetToOffset(b,c);var e=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(a,b,c,d);return this._offsetToSafeOffset(b,e)},getVisibleCellRange:function(a,b){return b=this._safeOffsetToOffset(a,b),this._cellSizeAndPositionManager.getVisibleCellRange(a,b)},resetCell:function(a){this._cellSizeAndPositionManager.resetCell(a)},_getOffsetPercentage:function(a,b,c){return c<=a?0:b/(c-a)},_offsetToSafeOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,c);return Math.round(e*(d-a))},_safeOffsetToOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,d);return Math.round(e*(c-a))}},!function(){var a="YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCSKDZCTBZHYZZYYJXZCFFZZMJYXXSDZZOTTBZLQWFCKSZSXFYRLNYJMBDTHJXSQQCCSBXYYTSYFBXDZTGBCNSLCYZZPSAZYZZSCJCSHZQYDXLBPJLLMQXTYDZXSQJTZPXLCGLQTZWJBHCTSYJSFXYEJJTLBGXSXJMYJQQPFZASYJNTYDJXKJCDJSZCBARTDCLYJQMWNQNCLLLKBYBZZSYHQQLTWLCCXTXLLZNTYLNEWYZYXCZXXGRKRMTCNDNJTSYYSSDQDGHSDBJGHRWRQLYBGLXHLGTGXBQJDZPYJSJYJCTMRNYMGRZJCZGJMZMGXMPRYXKJNYMSGMZJYMKMFXMLDTGFBHCJHKYLPFMDXLQJJSMTQGZSJLQDLDGJYCALCMZCSDJLLNXDJFFFFJCZFMZFFPFKHKGDPSXKTACJDHHZDDCRRCFQYJKQCCWJDXHWJLYLLZGCFCQDSMLZPBJJPLSBCJGGDCKKDEZSQCCKJGCGKDJTJDLZYCXKLQSCGJCLTFPCQCZGWPJDQYZJJBYJHSJDZWGFSJGZKQCCZLLPSPKJGQJHZZLJPLGJGJJTHJJYJZCZMLZLYQBGJWMLJKXZDZNJQSYZMLJLLJKYWXMKJLHSKJGBMCLYYMKXJQLBMLLKMDXXKWYXYSLMLPSJQQJQXYXFJTJDXMXXLLCXQBSYJBGWYMBGGBCYXPJYGPEPFGDJGBHBNSQJYZJKJKHXQFGQZKFHYGKHDKLLSDJQXPQYKYBNQSXQNSZSWHBSXWHXWBZZXDMNSJBSBKBBZKLYLXGWXDRWYQZMYWSJQLCJXXJXKJEQXSCYETLZHLYYYSDZPAQYZCMTLSHTZCFYZYXYLJSDCJQAGYSLCQLYYYSHMRQQKLDXZSCSSSYDYCJYSFSJBFRSSZQSBXXPXJYSDRCKGJLGDKZJZBDKTCSYQPYHSTCLDJDHMXMCGXYZHJDDTMHLTXZXYLYMOHYJCLTYFBQQXPFBDFHHTKSQHZYYWCNXXCRWHOWGYJLEGWDQCWGFJYCSNTMYTOLBYGWQWESJPWNMLRYDZSZTXYQPZGCWXHNGPYXSHMYQJXZTDPPBFYHZHTJYFDZWKGKZBLDNTSXHQEEGZZYLZMMZYJZGXZXKHKSTXNXXWYLYAPSTHXDWHZYMPXAGKYDXBHNHXKDPJNMYHYLPMGOCSLNZHKXXLPZZLBMLSFBHHGYGYYGGBHSCYAQTYWLXTZQCEZYDQDQMMHTKLLSZHLSJZWFYHQSWSCWLQAZYNYTLSXTHAZNKZZSZZLAXXZWWCTGQQTDDYZTCCHYQZFLXPSLZYGPZSZNGLNDQTBDLXGTCTAJDKYWNSYZLJHHZZCWNYYZYWMHYCHHYXHJKZWSXHZYXLYSKQYSPSLYZWMYPPKBYGLKZHTYXAXQSYSHXASMCHKDSCRSWJPWXSGZJLWWSCHSJHSQNHCSEGNDAQTBAALZZMSSTDQJCJKTSCJAXPLGGXHHGXXZCXPDMMHLDGTYBYSJMXHMRCPXXJZCKZXSHMLQXXTTHXWZFKHCCZDYTCJYXQHLXDHYPJQXYLSYYDZOZJNYXQEZYSQYAYXWYPDGXDDXSPPYZNDLTWRHXYDXZZJHTCXMCZLHPYYYYMHZLLHNXMYLLLMDCPPXHMXDKYCYRDLTXJCHHZZXZLCCLYLNZSHZJZZLNNRLWHYQSNJHXYNTTTKYJPYCHHYEGKCTTWLGQRLGGTGTYGYHPYHYLQYQGCWYQKPYYYTTTTLHYHLLTYTTSPLKYZXGZWGPYDSSZZDQXSKCQNMJJZZBXYQMJRTFFBTKHZKBXLJJKDXJTLBWFZPPTKQTZTGPDGNTPJYFALQMKGXBDCLZFHZCLLLLADPMXDJHLCCLGYHDZFGYDDGCYYFGYDXKSSEBDHYKDKDKHNAXXYBPBYYHXZQGAFFQYJXDMLJCSQZLLPCHBSXGJYNDYBYQSPZWJLZKSDDTACTBXZDYZYPJZQSJNKKTKNJDJGYYPGTLFYQKASDNTCYHBLWDZHBBYDWJRYGKZYHEYYFJMSDTYFZJJHGCXPLXHLDWXXJKYTCYKSSSMTWCTTQZLPBSZDZWZXGZAGYKTYWXLHLSPBCLLOQMMZSSLCMBJCSZZKYDCZJGQQDSMCYTZQQLWZQZXSSFPTTFQMDDZDSHDTDWFHTDYZJYQJQKYPBDJYYXTLJHDRQXXXHAYDHRJLKLYTWHLLRLLRCXYLBWSRSZZSYMKZZHHKYHXKSMDSYDYCJPBZBSQLFCXXXNXKXWYWSDZYQOGGQMMYHCDZTTFJYYBGSTTTYBYKJDHKYXBELHTYPJQNFXFDYKZHQKZBYJTZBXHFDXKDASWTAWAJLDYJSFHBLDNNTNQJTJNCHXFJSRFWHZFMDRYJYJWZPDJKZYJYMPCYZNYNXFBYTFYFWYGDBNZZZDNYTXZEMMQBSQEHXFZMBMFLZZSRXYMJGSXWZJSPRYDJSJGXHJJGLJJYNZZJXHGXKYMLPYYYCXYTWQZSWHWLYRJLPXSLSXMFSWWKLCTNXNYNPSJSZHDZEPTXMYYWXYYSYWLXJQZQXZDCLEEELMCPJPCLWBXSQHFWWTFFJTNQJHJQDXHWLBYZNFJLALKYYJLDXHHYCSTYYWNRJYXYWTRMDRQHWQCMFJDYZMHMYYXJWMYZQZXTLMRSPWWCHAQBXYGZYPXYYRRCLMPYMGKSJSZYSRMYJSNXTPLNBAPPYPYLXYYZKYNLDZYJZCZNNLMZHHARQMPGWQTZMXXMLLHGDZXYHXKYXYCJMFFYYHJFSBSSQLXXNDYCANNMTCJCYPRRNYTYQNYYMBMSXNDLYLYSLJRLXYSXQMLLYZLZJJJKYZZCSFBZXXMSTBJGNXYZHLXNMCWSCYZYFZLXBRNNNYLBNRTGZQYSATSWRYHYJZMZDHZGZDWYBSSCSKXSYHYTXXGCQGXZZSHYXJSCRHMKKBXCZJYJYMKQHZJFNBHMQHYSNJNZYBKNQMCLGQHWLZNZSWXKHLJHYYBQLBFCDSXDLDSPFZPSKJYZWZXZDDXJSMMEGJSCSSMGCLXXKYYYLNYPWWWGYDKZJGGGZGGSYCKNJWNJPCXBJJTQTJWDSSPJXZXNZXUMELPXFSXTLLXCLJXJJLJZXCTPSWXLYDHLYQRWHSYCSQYYBYAYWJJJQFWQCQQCJQGXALDBZZYJGKGXPLTZYFXJLTPADKYQHPMATLCPDCKBMTXYBHKLENXDLEEGQDYMSAWHZMLJTWYGXLYQZLJEEYYBQQFFNLYXRDSCTGJGXYYNKLLYQKCCTLHJLQMKKZGCYYGLLLJDZGYDHZWXPYSJBZKDZGYZZHYWYFQYTYZSZYEZZLYMHJJHTSMQWYZLKYYWZCSRKQYTLTDXWCTYJKLWSQZWBDCQYNCJSRSZJLKCDCDTLZZZACQQZZDDXYPLXZBQJYLZLLLQDDZQJYJYJZYXNYYYNYJXKXDAZWYRDLJYYYRJLXLLDYXJCYWYWNQCCLDDNYYYNYCKCZHXXCCLGZQJGKWPPCQQJYSBZZXYJSQPXJPZBSBDSFNSFPZXHDWZTDWPPTFLZZBZDMYYPQJRSDZSQZSQXBDGCPZSWDWCSQZGMDHZXMWWFYBPDGPHTMJTHZSMMBGZMBZJCFZWFZBBZMQCFMBDMCJXLGPNJBBXGYHYYJGPTZGZMQBQTCGYXJXLWZKYDPDYMGCFTPFXYZTZXDZXTGKMTYBBCLBJASKYTSSQYYMSZXFJEWLXLLSZBQJJJAKLYLXLYCCTSXMCWFKKKBSXLLLLJYXTYLTJYYTDPJHNHNNKBYQNFQYYZBYYESSESSGDYHFHWTCJBSDZZTFDMXHCNJZYMQWSRYJDZJQPDQBBSTJGGFBKJBXTGQHNGWJXJGDLLTHZHHYYYYYYSXWTYYYCCBDBPYPZYCCZYJPZYWCBDLFWZCWJDXXHYHLHWZZXJTCZLCDPXUJCZZZLYXJJTXPHFXWPYWXZPTDZZBDZCYHJHMLXBQXSBYLRDTGJRRCTTTHYTCZWMXFYTWWZCWJWXJYWCSKYBZSCCTZQNHXNWXXKHKFHTSWOCCJYBCMPZZYKBNNZPBZHHZDLSYDDYTYFJPXYNGFXBYQXCBHXCPSXTYZDMKYSNXSXLHKMZXLYHDHKWHXXSSKQYHHCJYXGLHZXCSNHEKDTGZXQYPKDHEXTYKCNYMYYYPKQYYYKXZLTHJQTBYQHXBMYHSQCKWWYLLHCYYLNNEQXQWMCFBDCCMLJGGXDQKTLXKGNQCDGZJWYJJLYHHQTTTNWCHMXCXWHWSZJYDJCCDBQCDGDNYXZTHCQRXCBHZTQCBXWGQWYYBXHMBYMYQTYEXMQKYAQYRGYZSLFYKKQHYSSQYSHJGJCNXKZYCXSBXYXHYYLSTYCXQTHYSMGSCPMMGCCCCCMTZTASMGQZJHKLOSQYLSWTMXSYQKDZLJQQYPLSYCZTCQQPBBQJZCLPKHQZYYXXDTDDTSJCXFFLLCHQXMJLWCJCXTSPYCXNDTJSHJWXDQQJSKXYAMYLSJHMLALYKXCYYDMNMDQMXMCZNNCYBZKKYFLMCHCMLHXRCJJHSYLNMTJZGZGYWJXSRXCWJGJQHQZDQJDCJJZKJKGDZQGJJYJYLXZXXCDQHHHEYTMHLFSBDJSYYSHFYSTCZQLPBDRFRZTZYKYWHSZYQKWDQZRKMSYNBCRXQBJYFAZPZZEDZCJYWBCJWHYJBQSZYWRYSZPTDKZPFPBNZTKLQYHBBZPNPPTYZZYBQNYDCPJMMCYCQMCYFZZDCMNLFPBPLNGQJTBTTNJZPZBBZNJKLJQYLNBZQHKSJZNGGQSZZKYXSHPZSNBCGZKDDZQANZHJKDRTLZLSWJLJZLYWTJNDJZJHXYAYNCBGTZCSSQMNJPJYTYSWXZFKWJQTKHTZPLBHSNJZSYZBWZZZZLSYLSBJHDWWQPSLMMFBJDWAQYZTCJTBNNWZXQXCDSLQGDSDPDZHJTQQPSWLYYJZLGYXYZLCTCBJTKTYCZJTQKBSJLGMGZDMCSGPYNJZYQYYKNXRPWSZXMTNCSZZYXYBYHYZAXYWQCJTLLCKJJTJHGDXDXYQYZZBYWDLWQCGLZGJGQRQZCZSSBCRPCSKYDZNXJSQGXSSJMYDNSTZTPBDLTKZWXQWQTZEXNQCZGWEZKSSBYBRTSSSLCCGBPSZQSZLCCGLLLZXHZQTHCZMQGYZQZNMCOCSZJMMZSQPJYGQLJYJPPLDXRGZYXCCSXHSHGTZNLZWZKJCXTCFCJXLBMQBCZZWPQDNHXLJCTHYZLGYLNLSZZPCXDSCQQHJQKSXZPBAJYEMSMJTZDXLCJYRYYNWJBNGZZTMJXLTBSLYRZPYLSSCNXPHLLHYLLQQZQLXYMRSYCXZLMMCZLTZSDWTJJLLNZGGQXPFSKYGYGHBFZPDKMWGHCXMSGDXJMCJZDYCABXJDLNBCDQYGSKYDQTXDJJYXMSZQAZDZFSLQXYJSJZYLBTXXWXQQZBJZUFBBLYLWDSLJHXJYZJWTDJCZFQZQZZDZSXZZQLZCDZFJHYSPYMPQZMLPPLFFXJJNZZYLSJEYQZFPFZKSYWJJJHRDJZZXTXXGLGHYDXCSKYSWMMZCWYBAZBJKSHFHJCXMHFQHYXXYZFTSJYZFXYXPZLCHMZMBXHZZSXYFYMNCWDABAZLXKTCSHHXKXJJZJSTHYGXSXYYHHHJWXKZXSSBZZWHHHCWTZZZPJXSNXQQJGZYZYWLLCWXZFXXYXYHXMKYYSWSQMNLNAYCYSPMJKHWCQHYLAJJMZXHMMCNZHBHXCLXTJPLTXYJHDYYLTTXFSZHYXXSJBJYAYRSMXYPLCKDUYHLXRLNLLSTYZYYQYGYHHSCCSMZCTZQXKYQFPYYRPFFLKQUNTSZLLZMWWTCQQYZWTLLMLMPWMBZSSTZRBPDDTLQJJBXZCSRZQQYGWCSXFWZLXCCRSZDZMCYGGDZQSGTJSWLJMYMMZYHFBJDGYXCCPSHXNZCSBSJYJGJMPPWAFFYFNXHYZXZYLREMZGZCYZSSZDLLJCSQFNXZKPTXZGXJJGFMYYYSNBTYLBNLHPFZDCYFBMGQRRSSSZXYSGTZRNYDZZCDGPJAFJFZKNZBLCZSZPSGCYCJSZLMLRSZBZZLDLSLLYSXSQZQLYXZLSKKBRXBRBZCYCXZZZEEYFGKLZLYYHGZSGZLFJHGTGWKRAAJYZKZQTSSHJJXDCYZUYJLZYRZDQQHGJZXSSZBYKJPBFRTJXLLFQWJHYLQTYMBLPZDXTZYGBDHZZRBGXHWNJTJXLKSCFSMWLSDQYSJTXKZSCFWJLBXFTZLLJZLLQBLSQMQQCGCZFPBPHZCZJLPYYGGDTGWDCFCZQYYYQYSSCLXZSKLZZZGFFCQNWGLHQYZJJCZLQZZYJPJZZBPDCCMHJGXDQDGDLZQMFGPSYTSDYFWWDJZJYSXYYCZCYHZWPBYKXRYLYBHKJKSFXTZJMMCKHLLTNYYMSYXYZPYJQYCSYCWMTJJKQYRHLLQXPSGTLYYCLJSCPXJYZFNMLRGJJTYZBXYZMSJYJHHFZQMSYXRSZCWTLRTQZSSTKXGQKGSPTGCZNJSJCQCXHMXGGZTQYDJKZDLBZSXJLHYQGGGTHQSZPYHJHHGYYGKGGCWJZZYLCZLXQSFTGZSLLLMLJSKCTBLLZZSZMMNYTPZSXQHJCJYQXYZXZQZCPSHKZZYSXCDFGMWQRLLQXRFZTLYSTCTMJCXJJXHJNXTNRZTZFQYHQGLLGCXSZSJDJLJCYDSJTLNYXHSZXCGJZYQPYLFHDJSBPCCZHJJJQZJQDYBSSLLCMYTTMQTBHJQNNYGKYRQYQMZGCJKPDCGMYZHQLLSLLCLMHOLZGDYYFZSLJCQZLYLZQJESHNYLLJXGJXLYSYYYXNBZLJSSZCQQCJYLLZLTJYLLZLLBNYLGQCHXYYXOXCXQKYJXXXYKLXSXXYQXCYKQXQCSGYXXYQXYGYTQOHXHXPYXXXULCYEYCHZZCBWQBBWJQZSCSZSSLZYLKDESJZWMYMCYTSDSXXSCJPQQSQYLYYZYCMDJDZYWCBTJSYDJKCYDDJLBDJJSODZYSYXQQYXDHHGQQYQHDYXWGMMMAJDYBBBPPBCMUUPLJZSMTXERXJMHQNUTPJDCBSSMSSSTKJTSSMMTRCPLZSZMLQDSDMJMQPNQDXCFYNBFSDQXYXHYAYKQYDDLQYYYSSZBYDSLNTFQTZQPZMCHDHCZCWFDXTMYQSPHQYYXSRGJCWTJTZZQMGWJJTJHTQJBBHWZPXXHYQFXXQYWYYHYSCDYDHHQMNMTMWCPBSZPPZZGLMZFOLLCFWHMMSJZTTDHZZYFFYTZZGZYSKYJXQYJZQBHMBZZLYGHGFMSHPZFZSNCLPBQSNJXZSLXXFPMTYJYGBXLLDLXPZJYZJYHHZCYWHJYLSJEXFSZZYWXKZJLUYDTMLYMQJPWXYHXSKTQJEZRPXXZHHMHWQPWQLYJJQJJZSZCPHJLCHHNXJLQWZJHBMZYXBDHHYPZLHLHLGFWLCHYYTLHJXCJMSCPXSTKPNHQXSRTYXXTESYJCTLSSLSTDLLLWWYHDHRJZSFGXTSYCZYNYHTDHWJSLHTZDQDJZXXQHGYLTZPHCSQFCLNJTCLZPFSTPDYNYLGMJLLYCQHYSSHCHYLHQYQTMZYPBYWRFQYKQSYSLZDQJMPXYYSSRHZJNYWTQDFZBWWTWWRXCWHGYHXMKMYYYQMSMZHNGCEPMLQQMTCWCTMMPXJPJJHFXYYZSXZHTYBMSTSYJTTQQQYYLHYNPYQZLCYZHZWSMYLKFJXLWGXYPJYTYSYXYMZCKTTWLKSMZSYLMPWLZWXWQZSSAQSYXYRHSSNTSRAPXCPWCMGDXHXZDZYFJHGZTTSBJHGYZSZYSMYCLLLXBTYXHBBZJKSSDMALXHYCFYGMQYPJYCQXJLLLJGSLZGQLYCJCCZOTYXMTMTTLLWTGPXYMZMKLPSZZZXHKQYSXCTYJZYHXSHYXZKXLZWPSQPYHJWPJPWXQQYLXSDHMRSLZZYZWTTCYXYSZZSHBSCCSTPLWSSCJCHNLCGCHSSPHYLHFHHXJSXYLLNYLSZDHZXYLSXLWZYKCLDYAXZCMDDYSPJTQJZLNWQPSSSWCTSTSZLBLNXSMNYYMJQBQHRZWTYYDCHQLXKPZWBGQYBKFCMZWPZLLYYLSZYDWHXPSBCMLJBSCGBHXLQHYRLJXYSWXWXZSLDFHLSLYNJLZYFLYJYCDRJLFSYZFSLLCQYQFGJYHYXZLYLMSTDJCYHBZLLNWLXXYGYYHSMGDHXXHHLZZJZXCZZZCYQZFNGWPYLCPKPYYPMCLQKDGXZGGWQBDXZZKZFBXXLZXJTPJPTTBYTSZZDWSLCHZHSLTYXHQLHYXXXYYZYSWTXZKHLXZXZPYHGCHKCFSYHUTJRLXFJXPTZTWHPLYXFCRHXSHXKYXXYHZQDXQWULHYHMJTBFLKHTXCWHJFWJCFPQRYQXCYYYQYGRPYWSGSUNGWCHKZDXYFLXXHJJBYZWTSXXNCYJJYMSWZJQRMHXZWFQSYLZJZGBHYNSLBGTTCSYBYXXWXYHXYYXNSQYXMQYWRGYQLXBBZLJSYLPSYTJZYHYZAWLRORJMKSCZJXXXYXCHDYXRYXXJDTSQFXLYLTSFFYXLMTYJMJUYYYXLTZCSXQZQHZXLYYXZHDNBRXXXJCTYHLBRLMBRLLAXKYLLLJLYXXLYCRYLCJTGJCMTLZLLCYZZPZPCYAWHJJFYBDYYZSMPCKZDQYQPBPCJPDCYZMDPBCYYDYCNNPLMTMLRMFMMGWYZBSJGYGSMZQQQZTXMKQWGXLLPJGZBQCDJJJFPKJKCXBLJMSWMDTQJXLDLPPBXCWRCQFBFQJCZAHZGMYKPHYYHZYKNDKZMBPJYXPXYHLFPNYYGXJDBKXNXHJMZJXSTRSTLDXSKZYSYBZXJLXYSLBZYSLHXJPFXPQNBYLLJQKYGZMCYZZYMCCSLCLHZFWFWYXZMWSXTYNXJHPYYMCYSPMHYSMYDYSHQYZCHMJJMZCAAGCFJBBHPLYZYLXXSDJGXDHKXXTXXNBHRMLYJSLTXMRHNLXQJXYZLLYSWQGDLBJHDCGJYQYCMHWFMJYBMBYJYJWYMDPWHXQLDYGPDFXXBCGJSPCKRSSYZJMSLBZZJFLJJJLGXZGYXYXLSZQYXBEXYXHGCXBPLDYHWETTWWCJMBTXCHXYQXLLXFLYXLLJLSSFWDPZSMYJCLMWYTCZPCHQEKCQBWLCQYDPLQPPQZQFJQDJHYMMCXTXDRMJWRHXCJZYLQXDYYNHYYHRSLSRSYWWZJYMTLTLLGTQCJZYABTCKZCJYCCQLJZQXALMZYHYWLWDXZXQDLLQSHGPJFJLJHJABCQZDJGTKHSSTCYJLPSWZLXZXRWGLDLZRLZXTGSLLLLZLYXXWGDZYGBDPHZPBRLWSXQBPFDWOFMWHLYPCBJCCLDMBZPBZZLCYQXLDOMZBLZWPDWYYGDSTTHCSQSCCRSSSYSLFYBFNTYJSZDFNDPDHDZZMBBLSLCMYFFGTJJQWFTMTPJWFNLBZCMMJTGBDZLQLPYFHYYMJYLSDCHDZJWJCCTLJCLDTLJJCPDDSQDSSZYBNDBJLGGJZXSXNLYCYBJXQYCBYLZCFZPPGKCXZDZFZTJJFJSJXZBNZYJQTTYJYHTYCZHYMDJXTTMPXSPLZCDWSLSHXYPZGTFMLCJTYCBPMGDKWYCYZCDSZZYHFLYCTYGWHKJYYLSJCXGYWJCBLLCSNDDBTZBSCLYZCZZSSQDLLMQYYHFSLQLLXFTYHABXGWNYWYYPLLSDLDLLBJCYXJZMLHLJDXYYQYTDLLLBUGBFDFBBQJZZMDPJHGCLGMJJPGAEHHBWCQXAXHHHZCHXYPHJAXHLPHJPGPZJQCQZGJJZZUZDMQYYBZZPHYHYBWHAZYJHYKFGDPFQSDLZMLJXKXGALXZDAGLMDGXMWZQYXXDXXPFDMMSSYMPFMDMMKXKSYZYSHDZKXSYSMMZZZMSYDNZZCZXFPLSTMZDNMXCKJMZTYYMZMZZMSXHHDCZJEMXXKLJSTLWLSQLYJZLLZJSSDPPMHNLZJCZYHMXXHGZCJMDHXTKGRMXFWMCGMWKDTKSXQMMMFZZYDKMSCLCMPCGMHSPXQPZDSSLCXKYXTWLWJYAHZJGZQMCSNXYYMMPMLKJXMHLMLQMXCTKZMJQYSZJSYSZHSYJZJCDAJZYBSDQJZGWZQQXFKDMSDJLFWEHKZQKJPEYPZYSZCDWYJFFMZZYLTTDZZEFMZLBNPPLPLPEPSZALLTYLKCKQZKGENQLWAGYXYDPXLHSXQQWQCQXQCLHYXXMLYCCWLYMQYSKGCHLCJNSZKPYZKCQZQLJPDMDZHLASXLBYDWQLWDNBQCRYDDZTJYBKBWSZDXDTNPJDTCTQDFXQQMGNXECLTTBKPWSLCTYQLPWYZZKLPYGZCQQPLLKCCYLPQMZCZQCLJSLQZDJXLDDHPZQDLJJXZQDXYZQKZLJCYQDYJPPYPQYKJYRMPCBYMCXKLLZLLFQPYLLLMBSGLCYSSLRSYSQTMXYXZQZFDZUYSYZTFFMZZSMZQHZSSCCMLYXWTPZGXZJGZGSJSGKDDHTQGGZLLBJDZLCBCHYXYZHZFYWXYZYMSDBZZYJGTSMTFXQYXQSTDGSLNXDLRYZZLRYYLXQHTXSRTZNGZXBNQQZFMYKMZJBZYMKBPNLYZPBLMCNQYZZZSJZHJCTZKHYZZJRDYZHNPXGLFZTLKGJTCTSSYLLGZRZBBQZZKLPKLCZYSSUYXBJFPNJZZXCDWXZYJXZZDJJKGGRSRJKMSMZJLSJYWQSKYHQJSXPJZZZLSNSHRNYPZTWCHKLPSRZLZXYJQXQKYSJYCZTLQZYBBYBWZPQDWWYZCYTJCJXCKCWDKKZXSGKDZXWWYYJQYYTCYTDLLXWKCZKKLCCLZCQQDZLQLCSFQCHQHSFSMQZZLNBJJZBSJHTSZDYSJQJPDLZCDCWJKJZZLPYCGMZWDJJBSJQZSYZYHHXJPBJYDSSXDZNCGLQMBTSFSBPDZDLZNFGFJGFSMPXJQLMBLGQCYYXBQKDJJQYRFKZTJDHCZKLBSDZCFJTPLLJGXHYXZCSSZZXSTJYGKGCKGYOQXJPLZPBPGTGYJZGHZQZZLBJLSQFZGKQQJZGYCZBZQTLDXRJXBSXXPZXHYZYCLWDXJJHXMFDZPFZHQHQMQGKSLYHTYCGFRZGNQXCLPDLBZCSCZQLLJBLHBZCYPZZPPDYMZZSGYHCKCPZJGSLJLNSCDSLDLXBMSTLDDFJMKDJDHZLZXLSZQPQPGJLLYBDSZGQLBZLSLKYYHZTTNTJYQTZZPSZQZTLLJTYYLLQLLQYZQLBDZLSLYYZYMDFSZSNHLXZNCZQZPBWSKRFBSYZMTHBLGJPMCZZLSTLXSHTCSYZLZBLFEQHLXFLCJLYLJQCBZLZJHHSSTBRMHXZHJZCLXFNBGXGTQJCZTMSFZKJMSSNXLJKBHSJXNTNLZDNTLMSJXGZJYJCZXYJYJWRWWQNZTNFJSZPZSHZJFYRDJSFSZJZBJFZQZZHZLXFYSBZQLZSGYFTZDCSZXZJBQMSZKJRHYJZCKMJKHCHGTXKXQGLXPXFXTRTYLXJXHDTSJXHJZJXZWZLCQSBTXWXGXTXXHXFTSDKFJHZYJFJXRZSDLLLTQSQQZQWZXSYQTWGWBZCGZLLYZBCLMQQTZHZXZXLJFRMYZFLXYSQXXJKXRMQDZDMMYYBSQBHGZMWFWXGMXLZPYYTGZYCCDXYZXYWGSYJYZNBHPZJSQSYXSXRTFYZGRHZTXSZZTHCBFCLSYXZLZQMZLMPLMXZJXSFLBYZMYQHXJSXRXSQZZZSSLYFRCZJRCRXHHZXQYDYHXSJJHZCXZBTYNSYSXJBQLPXZQPYMLXZKYXLXCJLCYSXXZZLXDLLLJJYHZXGYJWKJRWYHCPSGNRZLFZWFZZNSXGXFLZSXZZZBFCSYJDBRJKRDHHGXJLJJTGXJXXSTJTJXLYXQFCSGSWMSBCTLQZZWLZZKXJMLTMJYHSDDBXGZHDLBMYJFRZFSGCLYJBPMLYSMSXLSZJQQHJZFXGFQFQBPXZGYYQXGZTCQWYLTLGWSGWHRLFSFGZJMGMGBGTJFSYZZGZYZAFLSSPMLPFLCWBJZCLJJMZLPJJLYMQDMYYYFBGYGYZMLYZDXQYXRQQQHSYYYQXYLJTYXFSFSLLGNQCYHYCWFHCCCFXPYLYPLLZYXXXXXKQHHXSHJZCFZSCZJXCPZWHHHHHAPYLQALPQAFYHXDYLUKMZQGGGDDESRNNZLTZGCHYPPYSQJJHCLLJTOLNJPZLJLHYMHEYDYDSQYCDDHGZUNDZCLZYZLLZNTNYZGSLHSLPJJBDGWXPCDUTJCKLKCLWKLLCASSTKZZDNQNTTLYYZSSYSSZZRYLJQKCQDHHCRXRZYDGRGCWCGZQFFFPPJFZYNAKRGYWYQPQXXFKJTSZZXSWZDDFBBXTBGTZKZNPZZPZXZPJSZBMQHKCYXYLDKLJNYPKYGHGDZJXXEAHPNZKZTZCMXCXMMJXNKSZQNMNLWBWWXJKYHCPSTMCSQTZJYXTPCTPDTNNPGLLLZSJLSPBLPLQHDTNJNLYYRSZFFJFQWDPHZDWMRZCCLODAXNSSNYZRESTYJWJYJDBCFXNMWTTBYLWSTSZGYBLJPXGLBOCLHPCBJLTMXZLJYLZXCLTPNCLCKXTPZJSWCYXSFYSZDKNTLBYJCYJLLSTGQCBXRYZXBXKLYLHZLQZLNZCXWJZLJZJNCJHXMNZZGJZZXTZJXYCYYCXXJYYXJJXSSSJSTSSTTPPGQTCSXWZDCSYFPTFBFHFBBLZJCLZZDBXGCXLQPXKFZFLSYLTUWBMQJHSZBMDDBCYSCCLDXYCDDQLYJJWMQLLCSGLJJSYFPYYCCYLTJANTJJPWYCMMGQYYSXDXQMZHSZXPFTWWZQSWQRFKJLZJQQYFBRXJHHFWJJZYQAZMYFRHCYYBYQWLPEXCCZSTYRLTTDMQLYKMBBGMYYJPRKZNPBSXYXBHYZDJDNGHPMFSGMWFZMFQMMBCMZZCJJLCNUXYQLMLRYGQZCYXZLWJGCJCGGMCJNFYZZJHYCPRRCMTZQZXHFQGTJXCCJEAQCRJYHPLQLSZDJRBCQHQDYRHYLYXJSYMHZYDWLDFRYHBPYDTSSCNWBXGLPZMLZZTQSSCPJMXXYCSJYTYCGHYCJWYRXXLFEMWJNMKLLSWTXHYYYNCMMCWJDQDJZGLLJWJRKHPZGGFLCCSCZMCBLTBHBQJXQDSPDJZZGKGLFQYWBZYZJLTSTDHQHCTCBCHFLQMPWDSHYYTQWCNZZJTLBYMBPDYYYXSQKXWYYFLXXNCWCXYPMAELYKKJMZZZBRXYYQJFLJPFHHHYTZZXSGQQMHSPGDZQWBWPJHZJDYSCQWZKTXXSQLZYYMYSDZGRXCKKUJLWPYSYSCSYZLRMLQSYLJXBCXTLWDQZPCYCYKPPPNSXFYZJJRCEMHSZMSXLXGLRWGCSTLRSXBZGBZGZTCPLUJLSLYLYMTXMTZPALZXPXJTJWTCYYZLBLXBZLQMYLXPGHDSLSSDMXMBDZZSXWHAMLCZCPJMCNHJYSNSYGCHSKQMZZQDLLKABLWJXSFMOCDXJRRLYQZKJMYBYQLYHETFJZFRFKSRYXFJTWDSXXSYSQJYSLYXWJHSNLXYYXHBHAWHHJZXWMYLJCSSLKYDZTXBZSYFDXGXZJKHSXXYBSSXDPYNZWRPTQZCZENYGCXQFJYKJBZMLJCMQQXUOXSLYXXLYLLJDZBTYMHPFSTTQQWLHOKYBLZZALZXQLHZWRRQHLSTMYPYXJJXMQSJFNBXYXYJXXYQYLTHYLQYFMLKLJTMLLHSZWKZHLJMLHLJKLJSTLQXYLMBHHLNLZXQJHXCFXXLHYHJJGBYZZKBXSCQDJQDSUJZYYHZHHMGSXCSYMXFEBCQWWRBPYYJQTYZCYQYQQZYHMWFFHGZFRJFCDPXNTQYZPDYKHJLFRZXPPXZDBBGZQSTLGDGYLCQMLCHHMFYWLZYXKJLYPQHSYWMQQGQZMLZJNSQXJQSYJYCBEHSXFSZPXZWFLLBCYYJDYTDTHWZSFJMQQYJLMQXXLLDTTKHHYBFPWTYYSQQWNQWLGWDEBZWCMYGCULKJXTMXMYJSXHYBRWFYMWFRXYQMXYSZTZZTFYKMLDHQDXWYYNLCRYJBLPSXCXYWLSPRRJWXHQYPHTYDNXHHMMYWYTZCSQMTSSCCDALWZTCPQPYJLLQZYJSWXMZZMMYLMXCLMXCZMXMZSQTZPPQQBLPGXQZHFLJJHYTJSRXWZXSCCDLXTYJDCQJXSLQYCLZXLZZXMXQRJMHRHZJBHMFLJLMLCLQNLDXZLLLPYPSYJYSXCQQDCMQJZZXHNPNXZMEKMXHYKYQLXSXTXJYYHWDCWDZHQYYBGYBCYSCFGPSJNZDYZZJZXRZRQJJYMCANYRJTLDPPYZBSTJKXXZYPFDWFGZZRPYMTNGXZQBYXNBUFNQKRJQZMJEGRZGYCLKXZDSKKNSXKCLJSPJYYZLQQJYBZSSQLLLKJXTBKTYLCCDDBLSPPFYLGYDTZJYQGGKQTTFZXBDKTYYHYBBFYTYYBCLPDYTGDHRYRNJSPTCSNYJQHKLLLZSLYDXXWBCJQSPXBPJZJCJDZFFXXBRMLAZHCSNDLBJDSZBLPRZTSWSBXBCLLXXLZDJZSJPYLYXXYFTFFFBHJJXGBYXJPMMMPSSJZJMTLYZJXSWXTYLEDQPJMYGQZJGDJLQJWJQLLSJGJGYGMSCLJJXDTYGJQJQJCJZCJGDZZSXQGSJGGCXHQXSNQLZZBXHSGZXCXYLJXYXYYDFQQJHJFXDHCTXJYRXYSQTJXYEFYYSSYYJXNCYZXFXMSYSZXYYSCHSHXZZZGZZZGFJDLTYLNPZGYJYZYYQZPBXQBDZTZCZYXXYHHSQXSHDHGQHJHGYWSZTMZMLHYXGEBTYLZKQWYTJZRCLEKYSTDBCYKQQSAYXCJXWWGSBHJYZYDHCSJKQCXSWXFLTYNYZPZCCZJQTZWJQDZZZQZLJJXLSBHPYXXPSXSHHEZTXFPTLQYZZXHYTXNCFZYYHXGNXMYWXTZSJPTHHGYMXMXQZXTSBCZYJYXXTYYZYPCQLMMSZMJZZLLZXGXZAAJZYXJMZXWDXZSXZDZXLEYJJZQBHZWZZZQTZPSXZTDSXJJJZNYAZPHXYYSRNQDTHZHYYKYJHDZXZLSWCLYBZYECWCYCRYLCXNHZYDZYDYJDFRJJHTRSQTXYXJRJHOJYNXELXSFSFJZGHPZSXZSZDZCQZBYYKLSGSJHCZSHDGQGXYZGXCHXZJWYQWGYHKSSEQZZNDZFKWYSSTCLZSTSYMCDHJXXYWEYXCZAYDMPXMDSXYBSQMJMZJMTZQLPJYQZCGQHXJHHLXXHLHDLDJQCLDWBSXFZZYYSCHTYTYYBHECXHYKGJPXHHYZJFXHWHBDZFYZBCAPNPGNYDMSXHMMMMAMYNBYJTMPXYYMCTHJBZYFCGTYHWPHFTWZZEZSBZEGPFMTSKFTYCMHFLLHGPZJXZJGZJYXZSBBQSCZZLZCCSTPGXMJSFTCCZJZDJXCYBZLFCJSYZFGSZLYBCWZZBYZDZYPSWYJZXZBDSYUXLZZBZFYGCZXBZHZFTPBGZGEJBSTGKDMFHYZZJHZLLZZGJQZLSFDJSSCBZGPDLFZFZSZYZYZSYGCXSNXXCHCZXTZZLJFZGQSQYXZJQDCCZTQCDXZJYQJQCHXZTDLGSCXZSYQJQTZWLQDQZTQCHQQJZYEZZZPBWKDJFCJPZTYPQYQTTYNLMBDKTJZPQZQZZFPZSBNJLGYJDXJDZZKZGQKXDLPZJTCJDQBXDJQJSTCKNXBXZMSLYJCQMTJQWWCJQNJNLLLHJCWQTBZQYDZCZPZZDZYDDCYZZZCCJTTJFZDPRRTZTJDCQTQZDTJNPLZBCLLCTZSXKJZQZPZLBZRBTJDCXFCZDBCCJJLTQQPLDCGZDBBZJCQDCJWYNLLZYZCCDWLLXWZLXRXNTQQCZXKQLSGDFQTDDGLRLAJJTKUYMKQLLTZYTDYYCZGJWYXDXFRSKSTQTENQMRKQZHHQKDLDAZFKYPBGGPZREBZZYKZZSPEGJXGYKQZZZSLYSYYYZWFQZYLZZLZHWCHKYPQGNPGBLPLRRJYXCCSYYHSFZFYBZYYTGZXYLXCZWXXZJZBLFFLGSKHYJZEYJHLPLLLLCZGXDRZELRHGKLZZYHZLYQSZZJZQLJZFLNBHGWLCZCFJYSPYXZLZLXGCCPZBLLCYBBBBUBBCBPCRNNZCZYRBFSRLDCGQYYQXYGMQZWTZYTYJXYFWTEHZZJYWLCCNTZYJJZDEDPZDZTSYQJHDYMBJNYJZLXTSSTPHNDJXXBYXQTZQDDTJTDYYTGWSCSZQFLSHLGLBCZPHDLYZJYCKWTYTYLBNYTSDSYCCTYSZYYEBHEXHQDTWNYGYCLXTSZYSTQMYGZAZCCSZZDSLZCLZRQXYYELJSBYMXSXZTEMBBLLYYLLYTDQYSHYMRQWKFKBFXNXSBYCHXBWJYHTQBPBSBWDZYLKGZSKYHXQZJXHXJXGNLJKZLYYCDXLFYFGHLJGJYBXQLYBXQPQGZTZPLNCYPXDJYQYDYMRBESJYYHKXXSTMXRCZZYWXYQYBMCLLYZHQYZWQXDBXBZWZMSLPDMYSKFMZKLZCYQYCZLQXFZZYDQZPZYGYJYZMZXDZFYFYTTQTZHGSPCZMLCCYTZXJCYTJMKSLPZHYSNZLLYTPZCTZZCKTXDHXXTQCYFKSMQCCYYAZHTJPCYLZLYJBJXTPNYLJYYNRXSYLMMNXJSMYBCSYSYLZYLXJJQYLDZLPQBFZZBLFNDXQKCZFYWHGQMRDSXYCYTXNQQJZYYPFZXDYZFPRXEJDGYQBXRCNFYYQPGHYJDYZXGRHTKYLNWDZNTSMPKLBTHBPYSZBZTJZSZZJTYYXZPHSSZZBZCZPTQFZMYFLYPYBBJQXZMXXDJMTSYSKKBJZXHJCKLPSMKYJZCXTMLJYXRZZQSLXXQPYZXMKYXXXJCLJPRMYYGADYSKQLSNDHYZKQXZYZTCGHZTLMLWZYBWSYCTBHJHJFCWZTXWYTKZLXQSHLYJZJXTMPLPYCGLTBZZTLZJCYJGDTCLKLPLLQPJMZPAPXYZLKKTKDZCZZBNZDYDYQZJYJGMCTXLTGXSZLMLHBGLKFWNWZHDXUHLFMKYSLGXDTWWFRJEJZTZHYDXYKSHWFZCQSHKTMQQHTZHYMJDJSKHXZJZBZZXYMPAGQMSTPXLSKLZYNWRTSQLSZBPSPSGZWYHTLKSSSWHZZLYYTNXJGMJSZSUFWNLSOZTXGXLSAMMLBWLDSZYLAKQCQCTMYCFJBSLXCLZZCLXXKSBZQCLHJPSQPLSXXCKSLNHPSFQQYTXYJZLQLDXZQJZDYYDJNZPTUZDSKJFSLJHYLZSQZLBTXYDGTQFDBYAZXDZHZJNHHQBYKNXJJQCZMLLJZKSPLDYCLBBLXKLELXJLBQYCXJXGCNLCQPLZLZYJTZLJGYZDZPLTQCSXFDMNYCXGBTJDCZNBGBQYQJWGKFHTNPYQZQGBKPBBYZMTJDYTBLSQMPSXTBNPDXKLEMYYCJYNZCTLDYKZZXDDXHQSHDGMZSJYCCTAYRZLPYLTLKXSLZCGGEXCLFXLKJRTLQJAQZNCMBYDKKCXGLCZJZXJHPTDJJMZQYKQSECQZDSHHADMLZFMMZBGNTJNNLGBYJBRBTMLBYJDZXLCJLPLDLPCQDHLXZLYCBLCXZZJADJLNZMMSSSMYBHBSQKBHRSXXJMXSDZNZPXLGBRHWGGFCXGMSKLLTSJYYCQLTSKYWYYHYWXBXQYWPYWYKQLSQPTNTKHQCWDQKTWPXXHCPTHTWUMSSYHBWCRWXHJMKMZNGWTMLKFGHKJYLSYYCXWHYECLQHKQHTTQKHFZLDXQWYZYYDESBPKYRZPJFYYZJCEQDZZDLATZBBFJLLCXDLMJSSXEGYGSJQXCWBXSSZPDYZCXDNYXPPZYDLYJCZPLTXLSXYZYRXCYYYDYLWWNZSAHJSYQYHGYWWAXTJZDAXYSRLTDPSSYYFNEJDXYZHLXLLLZQZSJNYQYQQXYJGHZGZCYJCHZLYCDSHWSHJZYJXCLLNXZJJYYXNFXMWFPYLCYLLABWDDHWDXJMCXZTZPMLQZHSFHZYNZTLLDYWLSLXHYMMYLMBWWKYXYADTXYLLDJPYBPWUXJMWMLLSAFDLLYFLBHHHBQQLTZJCQJLDJTFFKMMMBYTHYGDCQRDDWRQJXNBYSNWZDBYYTBJHPYBYTTJXAAHGQDQTMYSTQXKBTZPKJLZRBEQQSSMJJBDJOTGTBXPGBKTLHQXJJJCTHXQDWJLWRFWQGWSHCKRYSWGFTGYGBXSDWDWRFHWYTJJXXXJYZYSLPYYYPAYXHYDQKXSHXYXGSKQHYWFDDDPPLCJLQQEEWXKSYYKDYPLTJTHKJLTCYYHHJTTPLTZZCDLTHQKZXQYSTEEYWYYZYXXYYSTTJKLLPZMCYHQGXYHSRMBXPLLNQYDQHXSXXWGDQBSHYLLPJJJTHYJKYPPTHYYKTYEZYENMDSHLCRPQFDGFXZPSFTLJXXJBSWYYSKSFLXLPPLBBBLBSFXFYZBSJSSYLPBBFFFFSSCJDSTZSXZRYYSYFFSYZYZBJTBCTSBSDHRTJJBYTCXYJEYLXCBNEBJDSYXYKGSJZBXBYTFZWGENYHHTHZHHXFWGCSTBGXKLSXYWMTMBYXJSTZSCDYQRCYTWXZFHMYMCXLZNSDJTTTXRYCFYJSBSDYERXJLJXBBDEYNJGHXGCKGSCYMBLXJMSZNSKGXFBNBPTHFJAAFXYXFPXMYPQDTZCXZZPXRSYWZDLYBBKTYQPQJPZYPZJZNJPZJLZZFYSBTTSLMPTZRTDXQSJEHBZYLZDHLJSQMLHTXTJECXSLZZSPKTLZKQQYFSYGYWPCPQFHQHYTQXZKRSGTTSQCZLPTXCDYYZXSQZSLXLZMYCPCQBZYXHBSXLZDLTCDXTYLZJYYZPZYZLTXJSJXHLPMYTXCQRBLZSSFJZZTNJYTXMYJHLHPPLCYXQJQQKZZSCPZKSWALQSBLCCZJSXGWWWYGYKTJBBZTDKHXHKGTGPBKQYSLPXPJCKBMLLXDZSTBKLGGQKQLSBKKTFXRMDKBFTPZFRTBBRFERQGXYJPZSSTLBZTPSZQZSJDHLJQLZBPMSMMSXLQQNHKNBLRDDNXXDHDDJCYYGYLXGZLXSYGMQQGKHBPMXYXLYTQWLWGCPBMQXCYZYDRJBHTDJYHQSHTMJSBYPLWHLZFFNYPMHXXHPLTBQPFBJWQDBYGPNZTPFZJGSDDTQSHZEAWZZYLLTYYBWJKXXGHLFKXDJTMSZSQYNZGGSWQSPHTLSSKMCLZXYSZQZXNCJDQGZDLFNYKLJCJLLZLMZZNHYDSSHTHZZLZZBBHQZWWYCRZHLYQQJBEYFXXXWHSRXWQHWPSLMSSKZTTYGYQQWRSLALHMJTQJSMXQBJJZJXZYZKXBYQXBJXSHZTSFJLXMXZXFGHKZSZGGYLCLSARJYHSLLLMZXELGLXYDJYTLFBHBPNLYZFBBHPTGJKWETZHKJJXZXXGLLJLSTGSHJJYQLQZFKCGNNDJSSZFDBCTWWSEQFHQJBSAQTGYPQLBXBMMYWXGSLZHGLZGQYFLZBYFZJFRYSFMBYZHQGFWZSYFYJJPHZBYYZFFWODGRLMFTWLBZGYCQXCDJYGZYYYYTYTYDWEGAZYHXJLZYYHLRMGRXXZCLHNELJJTJTPWJYBJJBXJJTJTEEKHWSLJPLPSFYZPQQBDLQJJTYYQLYZKDKSQJYYQZLDQTGJQYZJSUCMRYQTHTEJMFCTYHYPKMHYZWJDQFHYYXWSHCTXRLJHQXHCCYYYJLTKTTYTMXGTCJTZAYYOCZLYLBSZYWJYTSJYHBYSHFJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYLBLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY",b={ 19969:"DZ",19975:"WM",19988:"QJ",20048:"YL",20056:"SC",20060:"NM",20094:"QG",20127:"QJ",20167:"QC",20193:"YG",20250:"KH",20256:"ZC",20282:"SC",20285:"QJG",20291:"TD",20314:"YD",20340:"NE",20375:"TD",20389:"YJ",20391:"CZ",20415:"PB",20446:"YS",20447:"SQ",20504:"TC",20608:"KG",20854:"QJ",20857:"ZC",20911:"PF",20504:"TC",20608:"KG",20854:"QJ",20857:"ZC",20911:"PF",20985:"AW",21032:"PB",21048:"XQ",21049:"SC",21089:"YS",21119:"JC",21242:"SB",21273:"SC",21305:"YP",21306:"QO",21330:"ZC",21333:"SDC",21345:"QK",21378:"CA",21397:"SC",21414:"XS",21442:"SC",21477:"JG",21480:"TD",21484:"ZS",21494:"YX",21505:"YX",21512:"HG",21523:"XH",21537:"PB",21542:"PF",21549:"KH",21571:"E",21574:"DA",21588:"TD",21589:"O",21618:"ZC",21621:"KHA",21632:"ZJ",21654:"KG",21679:"LKG",21683:"KH",21710:"A",21719:"YH",21734:"WOE",21769:"A",21780:"WN",21804:"XH",21834:"A",21899:"ZD",21903:"RN",21908:"WO",21939:"ZC",21956:"SA",21964:"YA",21970:"TD",22003:"A",22031:"JG",22040:"XS",22060:"ZC",22066:"ZC",22079:"MH",22129:"XJ",22179:"XA",22237:"NJ",22244:"TD",22280:"JQ",22300:"YH",22313:"XW",22331:"YQ",22343:"YJ",22351:"PH",22395:"DC",22412:"TD",22484:"PB",22500:"PB",22534:"ZD",22549:"DH",22561:"PB",22612:"TD",22771:"KQ",22831:"HB",22841:"JG",22855:"QJ",22865:"XQ",23013:"ML",23081:"WM",23487:"SX",23558:"QJ",23561:"YW",23586:"YW",23614:"YW",23615:"SN",23631:"PB",23646:"ZS",23663:"ZT",23673:"YG",23762:"TD",23769:"ZS",23780:"QJ",23884:"QK",24055:"XH",24113:"DC",24162:"ZC",24191:"GA",24273:"QJ",24324:"NL",24377:"TD",24378:"QJ",24439:"PF",24554:"ZS",24683:"TD",24694:"WE",24733:"LK",24925:"TN",25094:"ZG",25100:"XQ",25103:"XH",25153:"PB",25170:"PB",25179:"KG",25203:"PB",25240:"ZS",25282:"FB",25303:"NA",25324:"KG",25341:"ZY",25373:"WZ",25375:"XJ",25384:"A",25457:"A",25528:"SD",25530:"SC",25552:"TD",25774:"ZC",25874:"ZC",26044:"YW",26080:"WM",26292:"PB",26333:"PB",26355:"ZY",26366:"CZ",26397:"ZC",26399:"QJ",26415:"ZS",26451:"SB",26526:"ZC",26552:"JG",26561:"TD",26588:"JG",26597:"CZ",26629:"ZS",26638:"YL",26646:"XQ",26653:"KG",26657:"XJ",26727:"HG",26894:"ZC",26937:"ZS",26946:"ZC",26999:"KJ",27099:"KJ",27449:"YQ",27481:"XS",27542:"ZS",27663:"ZS",27748:"TS",27784:"SC",27788:"ZD",27795:"TD",27812:"O",27850:"PB",27852:"MB",27895:"SL",27898:"PL",27973:"QJ",27981:"KH",27986:"HX",27994:"XJ",28044:"YC",28065:"WG",28177:"SM",28267:"QJ",28291:"KH",28337:"ZQ",28463:"TL",28548:"DC",28601:"TD",28689:"PB",28805:"JG",28820:"QG",28846:"PB",28952:"TD",28975:"ZC",29100:"A",29325:"QJ",29575:"SL",29602:"FB",30010:"TD",30044:"CX",30058:"PF",30091:"YSP",30111:"YN",30229:"XJ",30427:"SC",30465:"SX",30631:"YQ",30655:"QJ",30684:"QJG",30707:"SD",30729:"XH",30796:"LG",30917:"PB",31074:"NM",31085:"JZ",31109:"SC",31181:"ZC",31192:"MLB",31293:"JQ",31400:"YX",31584:"YJ",31896:"ZN",31909:"ZY",31995:"XJ",32321:"PF",32327:"ZY",32418:"HG",32420:"XQ",32421:"HG",32438:"LG",32473:"GJ",32488:"TD",32521:"QJ",32527:"PB",32562:"ZSQ",32564:"JZ",32735:"ZD",32793:"PB",33071:"PF",33098:"XL",33100:"YA",33152:"PB",33261:"CX",33324:"BP",33333:"TD",33406:"YA",33426:"WM",33432:"PB",33445:"JG",33486:"ZN",33493:"TS",33507:"QJ",33540:"QJ",33544:"ZC",33564:"XQ",33617:"YT",33632:"QJ",33636:"XH",33637:"YX",33694:"WG",33705:"PF",33728:"YW",33882:"SR",34067:"WM",34074:"YW",34121:"QJ",34255:"ZC",34259:"XL",34425:"JH",34430:"XH",34485:"KH",34503:"YS",34532:"HG",34552:"XS",34558:"YE",34593:"ZL",34660:"YQ",34892:"XH",34928:"SC",34999:"QJ",35048:"PB",35059:"SC",35098:"ZC",35203:"TQ",35265:"JX",35299:"JX",35782:"SZ",35828:"YS",35830:"E",35843:"TD",35895:"YG",35977:"MH",36158:"JG",36228:"QJ",36426:"XQ",36466:"DC",36710:"JC",36711:"ZYG",36767:"PB",36866:"SK",36951:"YW",37034:"YX",37063:"XH",37218:"ZC",37325:"ZC",38063:"PB",38079:"TD",38085:"QY",38107:"DC",38116:"TD",38123:"YD",38224:"HG",38241:"XTC",38271:"ZC",38415:"YE",38426:"KH",38461:"YD",38463:"AE",38466:"PB",38477:"XJ",38518:"YT",38551:"WK",38585:"ZC",38704:"XS",38739:"LJ",38761:"GJ",38808:"SQ",39048:"JG",39049:"XJ",39052:"HG",39076:"CZ",39271:"XT",39534:"TD",39552:"TD",39584:"PB",39647:"SB",39730:"LG",39748:"TPB",40109:"ZQ",40479:"ND",40516:"HG",40536:"HG",40583:"QJ",40765:"YQ",40784:"QJ",40840:"YK",40863:"QJG"},c=function(c){var d=c.charCodeAt(0);return d>40869||d<19968?c:b[d]?b[d]:a.charAt(d-19968)},d=function(a){for(var b,c=[""],d=0,e=a.length;d div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',b=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.type="text/css",d.styleSheet?d.styleSheet.cssText=a:d.appendChild(document.createTextNode(a)),b.appendChild(d),c=!0}},v=function(a,c){b?(a.__resizeTriggers__||("static"===getComputedStyle(a).position&&(a.style.position="relative"),u(),a.__resizeLast__={},a.__resizeListeners__=[],(a.__resizeTriggers__=document.createElement("div")).className="resize-triggers",a.__resizeTriggers__.innerHTML='
',a.appendChild(a.__resizeTriggers__),f(a),a.addEventListener("scroll",h,!0),l&&a.__resizeTriggers__.addEventListener(l,function(b){b.animationName===r&&f(a)})),a.__resizeListeners__.push(c)):a.attachEvent("onresize",c)},w=function(a,c){b?(a.__resizeListeners__.splice(a.__resizeListeners__.indexOf(c),1),a.__resizeListeners__.length||(a.removeEventListener("scroll",h,!0),a.__resizeTriggers__=!a.removeChild(a.__resizeTriggers__))):a.detachEvent("onresize",c)};BI.ResizeDetector={addResizeListener:function(a,b){return v(a.element[0],b),function(){w(a.element[0],b)}},removeResizeListener:function(a,b){w(a.element[0],b)}}}(),function(){function a(a,b){return a0&&(this._items[0]=b,this._sinkDown(0)),a}},push:function(a){this._items[this._size++]=a,this._bubbleUp(this._size-1)},size:function(){return this._size},peek:function(){if(0!==this._size)return this._items[0]},_heapify:function(){for(var a=Math.floor((this._size+1)/2);a>=0;a--)this._sinkDown(a)},_bubbleUp:function(a){for(var b=this._items[a];a>0;){var c=Math.floor((a+1)/2)-1,d=this._items[c];if(this._comparator(d,b))return;this._items[c]=b,this._items[a]=d,a=c}},_sinkDown:function(a){for(var b=this._items[a];;){var c=2*(a+1)-1,d=2*(a+1),e=-1;if(cc?c:b},b=5,c={index:0,offset:0,position:0,contentHeight:0};BI.TableScrollHelper=function(a,b,c,d){this._rowOffsets=BI.PrefixIntervalTree.uniform(a,b),this._storedHeights=new Array(a);for(var e=0;e=0&&c>=a-b;){var d=this._updateRowHeight(c);this._position+=d,c--}},_updateRowHeight:function(a){if(a<0||a>=this._rowCount)return 0;var b=this._rowHeightGetter(a);if(b!==this._storedHeights[a]){var c=b-this._storedHeights[a];return this._rowOffsets.set(a,b),this._storedHeights[a]=b,this._contentHeight+=c,c}return 0},getRowPosition:function(a){return this._updateRowHeight(a),this._rowOffsets.sumUntil(a)},scrollBy:function(b){if(0===this._rowCount)return c;var d=this._rowOffsets.greatestLowerBound(this._position);d=a(d,0,Math.max(this._rowCount-1,0));var e=this._rowOffsets.sumUntil(d),f=d,g=this._position,h=this._updateRowHeight(f);0!==e&&(g+=h);var i=this._storedHeights[f]-(g-e);if(b>=0)for(;b>0&&f0&&f>=0;)if(b=0){var k=this._updateRowHeight(f);j=this._storedHeights[f],g+=k}}var l=this._contentHeight-this._viewportHeight;g=a(g,0,l),this._position=g;var m=this._rowOffsets.greatestLowerBound(g);m=a(m,0,Math.max(this._rowCount-1,0)),e=this._rowOffsets.sumUntil(m);var n=e-g;return this._updateHeightsInViewport(m,n),this._updateHeightsAboveViewport(m),{index:m,offset:n,position:this._position,contentHeight:this._contentHeight}},_getRowAtEndPosition:function(a){this._updateRowHeight(a);for(var b=a,c=this._storedHeights[b];c=0;)b--,b>=0&&(this._updateRowHeight(b),c+=this._storedHeights[b]);var d=this._rowOffsets.sumTo(a)-this._viewportHeight;return d<0&&(d=0),d},scrollTo:function(b){if(0===this._rowCount)return c;if(b<=0)return this._position=0,this._updateHeightsInViewport(0,0),{index:0,offset:0,position:this._position,contentHeight:this._contentHeight};if(b>=this._contentHeight-this._viewportHeight){var d=this._rowCount-1;b=this._getRowAtEndPosition(d)}this._position=b;var e=this._rowOffsets.greatestLowerBound(b);e=a(e,0,Math.max(this._rowCount-1,0));var f=this._rowOffsets.sumUntil(e),g=f-b;return this._updateHeightsInViewport(e,g),this._updateHeightsAboveViewport(e),{index:e,offset:g,position:this._position,contentHeight:this._contentHeight}},scrollToRow:function(b,c){b=a(b,0,Math.max(this._rowCount-1,0)),c=a(c,-this._storedHeights[b],0);var d=this._rowOffsets.sumUntil(b);return this.scrollTo(d-c)},scrollRowIntoView:function(b){b=a(b,0,Math.max(this._rowCount-1,0));var c=this._rowOffsets.sumUntil(b),d=c+this._storedHeights[b];if(c=a&&e<=b)return null;var f;a-d>e-b?(f=d,this._smallValues.pop()):(f=e,this._largeValues.pop());var g=this._valueToPositionMap[f];return delete this._valueToPositionMap[f],this._valueToPositionMap[c]=g,this._pushToHeaps(g,c),g},_pushToHeaps:function(a,b){var c={position:a,value:b};this._smallValues.push(c),this._largeValues.push(c)},_cleanHeaps:function(){this._cleanHeap(this._smallValues),this._cleanHeap(this._largeValues);var a=Math.min(this._smallValues.size(),this._largeValues.size()),b=Math.max(this._smallValues.size(),this._largeValues.size());b>10*a&&this._recreateHeaps()},_recreateHeaps:function(){for(var a=this._smallValues.size()b.value}},!function(){BI.LinkHashMap=function(){this.array=[],this.map={}},BI.LinkHashMap.prototype={constructor:BI.LinkHashMap,has:function(a){return a in this.map},add:function(a,b){"undefined"!=typeof a&&(a in this.map?this.map[a]=b:(this.array.push(a),this.map[a]=b))},remove:function(a){if(a in this.map){delete this.map[a];for(var b=0;b>5]|=128<>>9<<4)+14]=b;for(var c=1732584193,d=-271733879,e=-1732584194,f=271733878,g=0;g16&&(c=this.core_md5(c,a.length*this.chrsz));for(var d=Array(16),e=Array(16),f=0;f<16;f++)d[f]=909522486^c[f],e[f]=1549556828^c[f];var g=this.core_md5(d.concat(this.str2binl(b)),512+b.length*this.chrsz);return this.core_md5(e.concat(g),640)},a.prototype.safe_add=function(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c},a.prototype.bit_rol=function(a,b){return a<>>32-b},a.prototype.str2binl=function(a){for(var b=Array(),c=(1<>5]|=(a.charCodeAt(d/this.chrsz)&c)<>2]>>d%4*8+4&15)+b.charAt(a[d>>2]>>d%4*8&15);return c},a.prototype.binl2b64=function(a){for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c="",d=0;d<4*a.length;d+=3)for(var e=(a[d>>2]>>8*(d%4)&255)<<16|(a[d+1>>2]>>8*((d+1)%4)&255)<<8|a[d+2>>2]>>8*((d+2)%4)&255,f=0;f<4;f++)c+=8*d+6*f>32*a.length?this.b64pad:b.charAt(e>>6*(3-f)&63);return c},BI.MD5=new a}(),function(){var a=function(a){return Math.floor(a/2)},b=window.Int32Array||function(a){for(var b=[],c=a-1;c>=0;--c)b[c]=0;return b},c=function(a){for(var b=1;b0;--d)this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},BI.PrefixIntervalTree.prototype={constructor:BI.PrefixIntervalTree,set:function(b,c){var d=this._half+b;for(this._heap[d]=c,d=a(d);0!==d;d=a(d))this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},get:function(a){var b=this._half+a;return this._heap[b]},getSize:function(){return this._size},sumUntil:function(b){if(0===b)return 0;for(var c=this._half+b-1,d=this._heap[c];1!==c;c=a(c))c%2===1&&(d+=this._heap[c-1]);return d},sumTo:function(a){return this.sumUntil(a+1)},sum:function(a,b){return this.sumUntil(b)-this.sumUntil(a)},greatestLowerBound:function(a){if(a<0)return-1;var b=1;if(this._heap[b]<=a)return this._size;for(;b=0;--d)c[d]=b;return new BI.PrefixIntervalTree(c)},BI.PrefixIntervalTree.empty=function(a){return BI.PrefixIntervalTree.uniform(a,0)}}(),!function(){BI.Queue=function(a){this.capacity=a,this.array=[]},BI.Queue.prototype={constructor:BI.Queue,contains:function(a){return this.array.contains(a)},indexOf:function(a){return this.array.contains(a)},getElementByIndex:function(a){return this.array[a]},push:function(a){this.array.push(a),this.capacity&&this.array.length>this.capacity&&this.array.shift()},pop:function(){this.array.pop()},shift:function(){this.array.shift()},unshift:function(a){this.array.unshift(a),this.capacity&&this.array.length>this.capacity&&this.array.pop()},remove:function(a){this.array.remove(a)},splice:function(){this.array.splice.apply(this.array,arguments)},slice:function(){this.array.slice.apply(this.array,arguments)},size:function(){return this.array.length},each:function(a,b){var b=b||window,a=a||null;if(null!=a&&"function"==typeof a)for(var c=0;cc?c:a},b=6,c=10;BI.TableRowBuffer=function(d,e,f,g){this._bufferSet=new BI.IntegerBufferSet,this._defaultRowHeight=e,this._viewportRowsBegin=0,this._viewportRowsEnd=0,this._maxVisibleRowCount=Math.ceil(f/e)+1,this._bufferRowsCount=a(Math.floor(this._maxVisibleRowCount/2),b,c),this._rowsCount=d,this._rowHeightGetter=g,this._rows=[],this._viewportHeight=f},BI.TableRowBuffer.prototype={constructor:BI.TableRowBuffer,getRowsWithUpdatedBuffer:function(){for(var a=2*this._bufferRowsCount,b=Math.max(this._viewportRowsBegin-this._bufferRowsCount,0);b0;)this._addRowToBuffer(b,this._viewportRowsBegin,this._viewportRowsEnd-1),b++,a--;return this._rows},getRows:function(a,b){var c=b,d=c,e=a,f=Math.min(a+this._maxVisibleRowCount,this._rowsCount);for(this._viewportRowsBegin=a;e=f&&(d=this._bufferSet.replaceFurthestValuePosition(b,c,a)),null===d?(d=this._bufferSet.getNewPositionForValue(a),this._rows[d]=a):this._rows[d]=a}}}(),function(){BI.Tree=function(){this.root=new BI.Node(BI.UUID())},BI.Tree.prototype={constructor:BI.Tree,addNode:function(a,b,c){BI.isNull(b)?this.root.addChild(a,c):BI.isNull(a)?this.root.addChild(b,c):a.addChild(b,c)},isRoot:function(a){return a===this.root},getRoot:function(){return this.root},clear:function(){this.root.clear()},initTree:function(a){var b=this;this.clear();var c=[];for(BI.each(a,function(a,d){var e=new BI.Node(d);e.set("data",d),b.addNode(e),c.push(e)});!BI.isEmpty(c);){var d=c.shift(),e=d.get("data");BI.each(e.children,function(a,e){var f=new BI.Node(e);f.set("data",e),c.push(f),b.addNode(d,f)})}},_toJSON:function(a){var b=this,c=[];return BI.each(a.getChildren(),function(a,d){c.push(b._toJSON(d))}),BI.extend({id:a.id},BI.deepClone(a.get("data")),c.length>0?{children:c}:{})},toJSON:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSON(d))}),c},_toJSONWithNode:function(a){var b=this,c=[];return BI.each(a.getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),BI.extend({id:a.id},BI.deepClone(a.get("data")),{node:a},c.length>0?{children:c}:{})},toJSONWithNode:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),c},search:function(a,b,c){if(!(a instanceof BI.Node))return arguments.callee.apply(this,[this.root,a,b]);var d=this,e=null;return BI.isNull(b)?null:BI.isEqual(a[c||"id"],b)?a:(BI.any(a.getChildren(),function(a,f){if(e=d.search(f,b,c),null!==e)return!0}),e)},_traverse:function(a,b){var c=[];for(c.push(a);!BI.isEmpty(c);){var d=c.shift(),e=b&&b(d);if(e===!1)break;e!==!0&&null!=d&&(c=c.concat(d.getChildren()))}},traverse:function(a){this._traverse(this.root,a)},_recursion:function(a,b,c){var d=this;return BI.every(a.getChildren(),function(a,e){var f=BI.clone(b);f.push(e.id);var g=c&&c(e,f);return g!==!1&&(g===!0||d._recursion(e,f,c))})},recursion:function(a){this._recursion(this.root,[],a)},inOrderTraverse:function(a){this._inOrderTraverse(this.root,a)},_inOrderTraverse:function(a,b){null!=a&&(this._inOrderTraverse(a.getLeft()),b&&b(a),this._inOrderTraverse(a.getRight()))},nrInOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=b.pop(),a&&a(c),c=c.getRight()}},preOrderTraverse:function(a){this._preOrderTraverse(this.root,a)},_preOrderTraverse:function(a,b){null!=a&&(b&&b(a),this._preOrderTraverse(a.getLeft()),this._preOrderTraverse(a.getRight()))},nrPreOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)a&&a(c),b.push(c),c=c.getLeft();c=b.pop(),c=c.getRight()}},postOrderTraverse:function(a){this._postOrderTraverse(this.root,a)},_postOrderTraverse:function(a,b){null!=a&&(this._postOrderTraverse(a.getLeft()),this._postOrderTraverse(a.getRight()),b&&b(a))},nrPostOrderTraverse:function(a){for(var b=[],c=this.root,d=null;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=BI.last(b),null==c.getRight()||c.getRight()==d?(a&&a(c),c=b.pop(),d=c,c=null):c=c.getRight()}}},BI.Node=function(a){BI.isObject(a)?BI.extend(this,a):this.id=a,this.clear.apply(this,arguments)},BI.Node.prototype={constructor:BI.Node,set:function(a,b){return BI.isObject(a)?void BI.extend(this,a):void(this[a]=b)},get:function(a){return this[a]},isLeaf:function(){return BI.isEmpty(this.children)},getChildren:function(){return this.children},getChildrenLength:function(){return this.children.length},getFirstChild:function(){return BI.first(this.children)},getLastChild:function(){return BI.last(this.children)},setLeft:function(a){this.left=a},getLeft:function(){return this.left},setRight:function(a){this.right=a},getRight:function(){return this.right},setParent:function(a){this.parent=a},getParent:function(){return this.parent},getChild:function(a){return this.children[a]},getChildIndex:function(a){return BI.findIndex(this.children,function(b,c){return c.get("id")===a})},removeChild:function(a){this.removeChildByIndex(this.getChildIndex(a))},removeChildByIndex:function(a){var b=this.getChild(a-1),c=this.getChild(a+1);null!=b&&b.setRight(c||null),null!=c&&c.setLeft(b||null),this.children.splice(a,1)},removeAllChilds:function(){ this.children=[]},addChild:function(a,b){var c=null;c=BI.isUndefined(b)?this.children.length-1:b-1,a.setParent(this),c>=0&&(this.getChild(c).setRight(a),a.setLeft(this.getChild(c))),BI.isUndefined(b)?this.children.push(a):this.children.splice(b,0,a)},equals:function(a){return this===a||this.id===a.id},clear:function(){this.parent=null,this.left=null,this.right=null,this.children=[]}},BI.extend(BI.Tree,{transformToArrayFormat:function(a,b){if(!a)return[];var c=[];if(BI.isArray(a))for(var d=0,e=a.length;d=this.x&&a<=this.x+this.w&&b>=this.y&&b<=this.y+this.h)},getPosition:function(){var a=[];return a.push(this.x+this.w/2),a.push(this.y+this.h/2),a}},BI.BehaviorFactory={createBehavior:function(a,b){var c;switch(a){case"highlight":c=BI.HighlightBehavior;break;case"redmark":c=BI.RedMarkBehavior}return new c(b)}},BI.Behavior=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Behavior.superclass._defaultConfig.apply(this,arguments),{rule:function(){return!0}})},_init:function(){BI.Behavior.superclass._init.apply(this,arguments)},doBehavior:function(){}}),BI.Layout=BI.inherit(BI.Widget,{props:function(){return{scrollable:null,scrollx:!1,scrolly:!1,items:[]}},render:function(){this._init4Margin(),this._init4Scroll()},_init4Margin:function(){this.options.top&&this.element.css("top",this.options.top),this.options.left&&this.element.css("left",this.options.left),this.options.bottom&&this.element.css("bottom",this.options.bottom),this.options.right&&this.element.css("right",this.options.right)},_init4Scroll:function(){switch(this.options.scrollable){case!0:this.element.css("overflow","auto");break;case!1:this.element.css("overflow","hidden")}this.options.scrollx&&this.element.css({"overflow-x":"auto","overflow-y":"hidden"}),this.options.scrolly&&this.element.css({"overflow-x":"hidden","overflow-y":"auto"})},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&this.element.append(b)},_getChildName:function(a){return a+""},_addElement:function(a,b){var c,d=this;return this.hasWidget(this._getChildName(a))?c=this.getWidgetByName(this._getChildName(a)):(c=BI.createWidget(b),c.on(BI.Events.DESTROY,function(){BI.each(d._children,function(a,b){b===c&&(BI.remove(d._children,b),d.removeItemAt(0|a))})}),this.addWidget(this._getChildName(a),c)),c},_getOptions:function(a){return a instanceof BI.Widget&&(a=a.options),a=BI.stripEL(a),a instanceof BI.Widget&&(a=a.options),a},_compare:function(a,b){function c(a,b,e,f){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;var g=Object.prototype.toString.call(a);switch(g){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}var h="[object Array]"===g;if(!h){if(BI.isFunction(a)&&BI.isFunction(b))return!0;a=d._getOptions(a),b=d._getOptions(b)}e=e||[],f=f||[];for(var i=e.length;i--;)if(e[i]===a)return f[i]===b;if(e.push(a),f.push(b),h){if(i=a.length,i!==b.length)return!1;for(;i--;)if(!c(a[i],b[i],e,f))return!1}else{var j,k=_.keys(a);if(i=k.length,_.keys(b).length!==i)return!1;for(;i--;)if(j=k[i],!_.has(b,j)||!c(a[j],b[j],e,f))return!1}return e.pop(),f.pop(),!0}var d=this;return c(a,b)},_getWrapper:function(){return this.element},_addItemAt:function(a,b){for(var c=this.options.items.length;c>a;c--)this._children[this._getChildName(c)]=this._children[this._getChildName(c-1)];delete this._children[this._getChildName(a)],this.options.items.splice(a,0,b)},_removeItemAt:function(a){for(var b=a;bthis.options.items.length)){this._addItemAt(a,b);var c=this._addElement(a,b);return a>0?this._children[this._getChildName(a-1)].element.after(c.element):c.element.prependTo(this._getWrapper()),c._mount(),c}},removeItemAt:function(a){a=BI.isArray(a)?a:[a];for(var b=[],c=[],d={},e=0,f=this.options.items.length;ethis.options.items.length-1)){var c,d=this._children[this._getChildName(a)];if(c=d.update(this._getOptions(b)))return c;var e=this._children[this._getChildName(a)];delete this._children[this._getChildName(a)],this.options.items.splice(a,1);var f=this._addElement(a,b);this.options.items.splice(a,0,b),this._children[this._getChildName(a)]=f,a>0?this._children[this._getChildName(a-1)].element.after(f.element):f.element.prependTo(this._getWrapper()),e._destroy(),f._mount()}},addItems:function(a){var b=this,c=this.options,d=document.createDocumentFragment(),e=[];BI.each(a,function(a,f){var g=b._addElement(c.items.length,f);b._children[b._getChildName(c.items.length)]=g,c.items.push(f),e.push(g),d.appendChild(g.element[0])}),this._getWrapper().append(d),BI.each(e,function(a,b){b._mount()})},prependItems:function(a){var b=this;a=a||[];for(var c=document.createDocumentFragment(),d=[],e=a.length-1;e>=0;e--){this._addItemAt(0,a[e]);var f=this._addElement(0,a[e]);b._children[b._getChildName(0)]=f,this.options.items.unshift(a[e]),d.push(f),c.appendChild(f.element[0])}this._getWrapper().prepend(c),BI.each(d,function(a,b){b._mount()})},getValue:function(){var a,b=this,c=[];return BI.each(this.options.items,function(d){if(a=b._children[b._getChildName(d)]){var e=a.getValue();e=BI.isArray(e)?e:[e],c=c.concat(e)}}),c},setValue:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setValue(a)})},setText:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setText(a)})},update:function(a){var b,c,d,e=this.options,f=a.items||[];for(c=0,d=Math.min(e.items.length,f.length);cf.length){var g=[];for(c=f.length;ce.items.length)for(c=e.items.length;c="1")break}var l=h-i-g,m=a.substr(i,g),n=i+g-a.length;if(n>0)for(var o=0;o-1)return a>=0?d(a+"",b.substring(0,c)):d(-a+"",b.substr(c+1));if(+a<0&&"-"!==b.charAt(0))return d(-a+"","-"+b);var g=a.split("."),h=b.split("."),i=g[0]||"",j=h[0]||"",k=g[1]||"",l=h[1]||"";if(/[%‰]$/.test(b)){var m=/[%]$/.test(b)?"00":"000";k+=m,i+=k.substr(0,m.length),i=i.replace(/^0+/gi,""),k=k.substr(m.length).replace(/0+$/gi,"")}var n=e(k,l);n.leftPlus&&(i=parseInt(i)+1+"",i=isNaN(i)?"1":i),n=n.num;var o=f(i,j);return/[0-9]/.test(o)||(o+="0"),/[0-9]/.test(n)?o+"."+n:o+n}function e(b,c){for(var d="",e=0,f=0,g=c.length;f4){k.leftPlus=!0;var l=d.match(/^[0-9]+/);if(l){var m=l[0],n=m.length,o=parseInt(m)+1+"";o.length>n?o=o.substr(1):(o=String.leftPad(o,n,"0"),k.leftPlus=!1),d=d.replace(/^[0-9]+/,o)}}return k.num=d,k}function f(b,c){for(var d="",e=b.length-1,f=-1,g=-1,h=c.length-1;h>=0;h--){var i=c.charAt(h),j=b.charAt(e);switch(i){case"0":a(j)&&(j="0"),g=-1,d=j+d,e--;break;case"#":g=h,d=j+d,e--;break;case",":if(!a(j)){var k=c.match(/,[#0]+/);k&&(f=k[0].length-1),d=","+d}break;default:d=i+d}}if(g>-1){var l=b.substr(0,e+1);d=d.substr(0,g)+l+d.substr(g)}if(f>0){var m=d.match(/[0-9]+,/);if(m){m=m[0];for(var n="",o=m.length-1-f;o>=0;o-=f)n=m.substr(o,f)+","+n;var p=m.substr(0,o+f);a(p)||(n=p+","+n)}d=d.replace(/[0-9]+,/,n)}return d}window.BI||(window.BI={}),BI.cjkEncode=function(a){if("string"!=typeof a)return a;for(var b="",c=0;c=128||91===d||93===d?"["+d.toString(16)+"]":a.charAt(c)}return b},BI.cjkEncodeDO=function(a){if(BI.isPlainObject(a)){var b={};return $.each(a,function(a,c){"string"!=typeof c&&(c=BI.jsonEncode(c)),a=BI.cjkEncode(a),b[a]=BI.cjkEncode(c)}),b}return a},BI.jsonEncode=function(a){var b=!!{}.hasOwnProperty,c={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},d=function(a){return/["\\\x00-\x1f]/.test(a)?'"'+a.replace(/([\x00-\x1f\\"])/g,function(a,b){var d=c[b];return d?d:(d=b.charCodeAt(),"\\u00"+Math.floor(d/16).toString(16)+(d%16).toString(16))})+'"':'"'+a+'"'},e=function(a){var b,c,d,e=["["],f=a.length;for(c=0;c2?Date._MN[b.getMonth()]:d<2?b.getMonth()+1:String.leftPad(b.getMonth()+1+"",2,"0");break;case"d":c=d>1?String.leftPad(b.getDate()+"",2,"0"):b.getDate();break;case"h":var f=b.getHours()%12;0===f&&(f=12),c=d>1?String.leftPad(f+"",2,"0"):f;break;case"H":c=d>1?String.leftPad(b.getHours()+"",2,"0"):b.getHours();break;case"m":c=d>1?String.leftPad(b.getMinutes()+"",2,"0"):b.getMinutes();break;case"s":c=d>1?String.leftPad(b.getSeconds()+"",2,"0"):b.getSeconds();break;case"a":c=b.getHours()<12?"am":"pm";break;case"z":c=b.getTimezone();break;default:c=a.str}return c}if(!a)return"";var d=b.length,e="";if(d>0){for(var f=b.charAt(0),g=0,h=f,i=1;i$("body").outerWidth()&&(l-=k.element.outerWidth()),m+k.element.outerHeight()>$("body").outerHeight()?(m-=k.element.outerHeight()+15,j=h.top-k.element.outerHeight()-5,!f.belowMouse&&(m=Math.min(m,j))):!f.belowMouse&&(m=Math.max(m,j)),k.element.css({left:l<0?0:l+"px",top:m<0?0:m+"px"}),k.element.hover(function(){g.remove(b),e.element.trigger("mouseleave.title"+e.getName())}),this},add:function(a,b){return this.has(a)?this:(this.set(a,b),this)},get:function(a){return this.tooltipsManager[a]},set:function(a,b){this.tooltipsManager[a]=b},has:function(a){return null!=this.tooltipsManager[a]},remove:function(a){return this.has(a)?(this.tooltipsManager[a].destroy(),delete this.tooltipsManager[a],this):this}}),BI.FloatBoxRouter=BI.inherit(BI.WRouter,{routes:{},_init:function(){this.store={},this.views={}},createView:function(a,b,c,d){return BI.Factory.createView(a,this.get(a),b||{},c||{},d)},open:function(a,b,c,d,e){var f=this,g=BI.isKey(b);e||(e={}),a=d.rootURL+"/"+a;var h=void 0;if(g){b+="";var i=b.split(".");BI.each(i,function(a,b){h=0===a?d.model.get(b)||{}:h[b]||{}}),h.id=e.id||i[i.length-1]}else h=b;if(BI.extend(h,e.data),this.controller||(this.controller=new BI.FloatBoxController),!this.store[a]){this.store[a]=BI.createWidget({type:"bi.float_box"},e);var j=this.createView(a,h,c,d);g&&d.model.addChild(b,j.model),j.listenTo(j.model,"destroy",function(){f.remove(a,d)}),d.on(BI.Events.UNMOUNT,function(){f.remove(a,d)}),this.store[a].populate(j),this.views[a]=j,this.controller.add(a,this.store[a]),d&&d.on("end:"+j.cid,function(){BI.nextTick(function(){f.close(a),d.listenEnd.apply(d,g?b.split("."):[b])!==!1&&d.populate()},30)}).on("change:"+j.cid,_.bind(d.notifyParent,d)); -}return this.controller.open(a),this.views[a].populate(h,e.force||!0),this},close:function(a){return this.controller&&this.controller.close(a),this},remove:function(a,b){return a=b.rootURL+"/"+a,this.controller&&(this.controller.remove(a),delete this.store[a],this.views[a]&&this.views[a].model.destroy(),delete this.views[a]),this}}),BI.EventList=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.EventList.superclass._defaultConfig.apply(this,arguments),{event:"click",callback:BI.emptyFn,handle:"",items:[]})},_init:function(){BI.EventList.superclass._init.apply(this,arguments),this.populate(this.options.items)},_getHandle:function(a){var b=this.options.handle?_.result(a,this.options.handle):a;return b.element||b},populate:function(a){var b=this,c=this.options.event,d=this.options.callback;BI.nextTick(function(){BI.each(a,function(a,e){var f=d(e);BI.isFunction(f)&&(f=BI.debounce(f,BI.EVENT_RESPONSE_TIME,!0)),b._getHandle(e)[c](f)})})}}),BI.ListenerList=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.ListenerList.superclass._defaultConfig.apply(this,arguments),{event:"click",callback:BI.emptyFn,items:[]})},_init:function(){BI.ListenerList.superclass._init.apply(this,arguments),this.populate(this.options.items)},_getHandle:function(a){var b=this.options.handle?_.result(a,this.options.handle):a;return b.element||b},populate:function(a){var b=this,c=this.options.event,d=this.options.callback;BI.nextTick(function(){BI.each(a,function(a,e){var f=d(e);BI.isFunction(f)&&(f=BI.debounce(f,BI.EVENT_RESPONSE_TIME,!0)),b._getHandle(e).on(c,f)})})}}),BI.OffList=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.OffList.superclass._defaultConfig.apply(this,arguments),{event:"click",items:[]})},_init:function(){BI.OffList.superclass._init.apply(this,arguments),this.populate(this.options.items)},_getHandle:function(a){var b=this.options.handle?_.result(a,this.options.handle):a;return b.element||b},populate:function(a){var b=this,c=this.options.event;BI.each(a,function(a,d){b._getHandle(d).off(c)})}}),_.extend(BI,{Events:{KEYDOWN:"_KEYDOWN",BACKSPACE:"_BACKSPACE",SPACE:"_SPACE",ENTER:"_ENTER",CONFIRM:"_CONFIRM",ERROR:"_ERROR",PAUSE:"_PAUSE",DESTROY:"_DESTROY",UNMOUNT:"_UNMOUNT",CLEAR:"_CLEAR",ADD:"_ADD",EDITING:"_EDITING",EMPTY:"_EMPTY",VIEW:"_VIEW",RESIZE:"_RESIZE",BEFOREEDIT:"_BEFOREEDIT",AFTEREDIT:"_AFTEREDIT",STARTEDIT:"_STARTEDIT",STOPEDIT:"_STOPEDIT",CHANGE:"_CHANGE",EXPAND:"_EXPAND",COLLAPSE:"_COLLAPSE",CALLBACK:"_CALLBACK",CLICK:"_CLICK",STATECHANGE:"_STATECHANGE",BEFORESTATECHANGE:"_BEFORESTATECHANGE",INIT:"_INIT",AFTERINIT:"_AFTERINIT",SCROLL:"_SCROLL",STARTLOAD:"_STARTLOAD",AFTERLOAD:"_AFTERLOAD",BS:"beforesubmit",AS:"aftersubmit",SC:"submitcomplete",SF:"submitfailure",SS:"submitsuccess",BVW:"beforeverifywrite",AVW:"afterverifywrite",AV:"afterverify",BW:"beforewrite",AW:"afterwrite",WS:"writesuccess",WF:"writefailure",BA:"beforeappend",AA:"afterappend",BD:"beforedelete",AD:"beforedelete",UC:"unloadcheck",BTOPDF:"beforetopdf",ATOPDF:"aftertopdf",BTOEXCEL:"beforetoexcel",ATOEXCEL:"aftertoexcel",BTOWORD:"beforetoword",ATOWORD:"aftertoword",BTOIMAGE:"beforetoimage",ATOIMAGE:"aftertoimage",BTOHTML:"beforetohtml",ATOHTML:"aftertohtml",BIMEXCEL:"beforeimportexcel",AIMEXCEL:"afterimportexcel",BPDFPRINT:"beforepdfprint",APDFPRINT:"afterpdfprint",BFLASHPRINT:"beforeflashprint",AFLASHPRINT:"afterflashprint",BAPPLETPRINT:"beforeappletprint",AAPPLETPRINT:"afterappletprint",BSEVERPRINT:"beforeserverprint",ASERVERPRINT:"afterserverprint",BEMAIL:"beforeemail",AEMAIL:"afteremail"}}),BI.extend(jQuery.fn,{destroy:function(){this.remove(),BI.isIE()===!0&&(this[0].outerHTML="")},__textKeywordMarked__:function(a,b,c){if(!BI.isKey(b)||(a+"").length>100)return this.text((a+"").replaceAll(" "," "));b+="",b=BI.toUpperCase(b);var d=(a||"")+"";for(c=(c||BI.makeFirstPY(a))+"",null!=c&&(c=BI.toUpperCase(c)),this.empty();;){var e=BI.toUpperCase(d).indexOf(b),f=null;if(null!=c&&(f=c.indexOf(b),f>=0&&(f%=a.length)),e>=0)this.append(d.substr(0,e)),this.append($("").addClass("bi-keyword-red-mark").text(d.substr(e,b.length).replaceAll(" "," "))),d=d.substr(e+b.length),null!=c&&(c=c.substr(e+b.length));else{if(!(null!=f&&f>=0&&Math.floor(f/a.length)===Math.floor((f+b.length-1)/a.length))){this.append(d);break}this.append(d.substr(0,f)),this.append($("").addClass("bi-keyword-red-mark").text(d.substr(f,b.length).replaceAll(" "," "))),null!=c&&(c=c.substr(f+b.length)),d=d.substr(f+b.length)}}return this},getDomHeight:function(a){var b=$(this).clone();b.appendTo($(a||"body"));var c=b.height();return b.remove(),c},hasVerticalScroll:function(){return this.height()>0&&this[0].clientWidth0&&this[0].clientHeightb.left+this.outerWidth()||a.pageYb.top+this.outerHeight())},__hasZIndexMask__:function(a){return a&&null!=this.zIndexMask[a]},__buildZIndexMask__:function(a,b){this.zIndexMask=this.zIndexMask||{},this.indexMask=this.indexMask||[];var c=BI.createWidget({type:"bi.center_adapt",cls:"bi-z-index-mask",items:b});return c.element.css({"z-index":a}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:c,left:0,right:0,top:0,bottom:0}]}),this.indexMask.push(c),a&&(this.zIndexMask[a]=c),c.element},__releaseZIndexMask__:function(a){if(a&&this.zIndexMask[a])return this.indexMask.remove(this.zIndexMask[a]),void this.zIndexMask[a].destroy();this.indexMask=this.indexMask||[];var b=this.indexMask.pop();b&&b.destroy()}}),BI.extend(jQuery,{getLeftPosition:function(a,b,c){return{left:a.element.offset().left-b.element.outerWidth()-(c||0)}},getRightPosition:function(a,b,c){var d=a.element;return{left:d.offset().left+d.outerWidth()+(c||0)}},getTopPosition:function(a,b,c){return{top:a.element.offset().top-b.element.outerHeight()-(c||0)}},getBottomPosition:function(a,b,c){var d=a.element;return{top:d.offset().top+d.outerHeight()+(c||0)}},isLeftSpaceEnough:function(a,b,c){return $.getLeftPosition(a,b,c).left>=0},isRightSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=$("body").bounds();return $.getRightPosition(a,b,c).left+d.width<=e.width},isTopSpaceEnough:function(a,b,c){return $.getTopPosition(a,b,c).top>=0},isBottomSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=$("body").bounds();return $.getBottomPosition(a,b,c).top+d.height<=e.height},isRightSpaceLarger:function(a){var b=$("body").bounds();return b.width-a.element.offset().left-a.element.bounds().width>=a.element.offset().left},isBottomSpaceLarger:function(a){var b=$("body").bounds();return b.height-a.element.offset().top-a.element.bounds().height>=a.element.offset().top},getLeftAlignPosition:function(a,b,c){var d=b.element.bounds(),e=$("body").bounds(),f=a.element.offset().left+c;return f+d.width>e.width&&(f=e.width-d.width),f<0&&(f=0),{left:f}},getLeftAdaptPosition:function(a,b,c){return $.isLeftSpaceEnough(a,b,c)?$.getLeftPosition(a,b,c):{left:0}},getRightAlignPosition:function(a,b,c){var d=a.element.bounds(),e=b.element.bounds(),f=a.element.offset().left+d.width-e.width-c;return f<0&&(f=0),{left:f}},getRightAdaptPosition:function(a,b,c){return $.isRightSpaceEnough(a,b,c)?$.getRightPosition(a,b,c):{left:$("body").bounds().width-b.element.bounds().width}},getTopAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=$("body").bounds();return $.isBottomSpaceEnough(a,b,-1*h.height+c)?e=g.top+c:d?(e=g.top+c,f=j.height-e):(e=j.height-i.height,ef.height?{top:0,adaptHeight:f.height-c}:{top:0}},getBottomAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=$("body").bounds();return $.isTopSpaceEnough(a,b,-1*h.height+c)?e=g.top+h.height-i.height-c:d?(e=0,f=g.top+h.height-c):(e=0,i.height+c>j.height&&(f=j.height-c)),e<0&&(e=0),f?{top:e,adaptHeight:f}:{top:e}},getBottomAdaptPosition:function(a,b,c,d){var e=a.element.offset(),f=a.element.bounds(),g=b.element.bounds(),h=$("body").bounds();return $.isBottomSpaceEnough(a,b,c)?$.getBottomPosition(a,b,c):d?{top:e.top+f.height+c,adaptHeight:h.height-e.top-f.height-c}:g.height+c>h.height?{top:c,adaptHeight:h.height-c}:{top:h.height-g.height-c}},getCenterAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=$("body").bounds();return c=d.left+e.width/2+f.width/2>g.width?g.width-f.width:d.left+e.width/2-f.width/2,c<0&&(c=0),{left:c}},getMiddleAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=$("body").bounds();return c=d.top+e.height/2+f.height/2>g.height?g.height-f.height:d.top+e.height/2-f.height/2,c<0&&(c=0),{top:c}},getComboPositionByDirections:function(a,b,c,d,e,f){c||(c=0),d||(d=0);var g,h,i,j,k,l=[],m=[],n=!1,o=!1,p=!1;for(g=0;g-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}),{matched:h,finded:i}}}),BI.DOM={},BI.extend(BI.DOM,{hang:function(a){if(!BI.isEmpty(a)){var b=document.createDocumentFragment();return BI.each(a,function(a,c){c instanceof BI.Widget&&(c=c.element),c instanceof $&&c[0]&&b.appendChild(c[0])}),b}},isExist:function(a){return $("body").find(a.element).length>0},preloadImages:function(a,b){function c(){d++,d>=a.length&&b()}var d=0,e=[];BI.each(a,function(a,b){e[a]=new Image,e[a].src=b,e[a].onload=function(){c()},e[a].onerror=function(){c()}})},isColor:function(a){return a&&(this.isRGBColor(a)||this.isHexColor(a))},isRGBColor:function(a){return!!a&&"rgb"===a.substr(0,3)},isHexColor:function(a){return!!a&&("#"===a[0]&&7===a.length)},isDarkColor:function(a){if(!a||!this.isHexColor(a))return!1;var b=this.rgb2json(this.hex2rgb(a)),c=Math.round(.299*b.r+.587*b.g+.114*b.b);return c<192},getContrastColor:function(a){return a&&this.isColor(a)?this.isDarkColor(a)?"#ffffff":"#1a1a1a":""},rgb2hex:function(a){if(!a||"rgb"!=a.substr(0,3))return"";var b=a.match(/\d+(\.\d+)?/g),c=BI.parseInt(b[0]),d=BI.parseInt(b[1]),e=BI.parseInt(b[2]),f="#"+this.int2hex(c)+this.int2hex(d)+this.int2hex(e);return f},rgb2json:function(a){if(!a)return{};if(!this.isRGBColor(a))return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2])}},rgba2json:function(a){if(!a)return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2]),a:BI.parseFloat(b[3])}},json2rgb:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgb("+a.r+","+a.g+","+a.b+")":""},json2rgba:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgba("+a.r+","+a.g+","+a.b+","+a.a+")":""},int2hex:function(a){var b=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return b[a>>>4]+""+b[15&a]},hex2rgb:function(a){if(!a)return"";if(!this.isHexColor(a))return a;var b,c="rgb(";return 7===a.length?b=[BI.parseInt("0x"+a.substring(1,3)),BI.parseInt("0x"+a.substring(3,5)),BI.parseInt("0x"+a.substring(5,7))]:4===a.length&&(b=[BI.parseInt("0x"+a.substring(1,2)),BI.parseInt("0x"+a.substring(2,3)),BI.parseInt("0x"+a.substring(3,4))]),c+=b[0]+",",c+=b[1]+",",c+=b[2]+")"},rgba2rgb:function(a,b){if(BI.isNull(b)&&(b=1),"rgba"!=a.substr(0,4))return"";var c=a.match(/\d+(\.\d+)?/g);if(c.length<4)return"";var d=BI.parseFloat(c[0]),e=BI.parseFloat(c[1]),f=BI.parseFloat(c[2]),g=BI.parseFloat(c[3]);return"rgb("+Math.floor(255*(b*(1-g))+d*g)+","+Math.floor(255*(b*(1-g))+e*g)+","+Math.floor(255*(b*(1-g))+f*g)+")"},getTextSizeWidth:function(a,b){var c=$("").addClass("text-width-span").appendTo($("body"));null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.width();return c.remove(),d},getScrollWidth:function(){if(null==this._scrollWidth){var a=$("
").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo($("body"));this._scrollWidth=a[0].offsetWidth-a[0].clientWidth,a.destroy()}return this._scrollWidth}}),BI.ShowListener=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.ShowListener.superclass._defaultConfig.apply(this,arguments),{eventObj:BI.createWidget(),cardLayout:null,cardNameCreator:function(a){return a},cardCreator:BI.emptyFn,afterCardCreated:BI.emptyFn,afterCardShow:BI.emptyFn})},_init:function(){BI.ShowListener.superclass._init.apply(this,arguments);var a=this,b=this.options;b.eventObj.on(BI.Controller.EVENT_CHANGE,function(c,d,e){if(c===BI.Events.CLICK){if(d=d||b.eventObj.getValue(),d=BI.isArray(d)?d.length>1?d.toString():d[0]:d,BI.isNull(d))throw new Error("value cannot be null");var f=b.cardNameCreator(d);if(!b.cardLayout.isCardExisted(f)){var g=b.cardCreator(f);b.cardLayout.addCardByName(f,g),b.afterCardCreated(f)}b.cardLayout.showCardByName(f),BI.nextTick(function(){b.afterCardShow(f),a.fireEvent(BI.ShowListener.EVENT_CHANGE,f)})}})}}),BI.ShowListener.EVENT_CHANGE="ShowListener.EVENT_CHANGE",BI.StyleLoaderManager=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.StyleLoaderManager.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.StyleLoaderManager.superclass._init.apply(this,arguments),this.stylesManager={}},loadStyle:function(a,b){var c=document,d=c.createElement("style");return c.getElementsByTagName("head")[0].appendChild(d),d.setAttribute("type","text/css"),d.styleSheet?d.styleSheet.cssText=b:d.appendChild(document.createTextNode(b)),this.stylesManager[a]=d,this},get:function(a){return this.stylesManager[a]},has:function(a){return null!=this.stylesManager[a]},removeStyle:function(a){return this.has(a)?(this.stylesManager[a].parentNode.removeChild(this.stylesManager[a]),delete this.stylesManager[a],this):this}}),BI.Logic=BI.inherit(BI.OB,{createLogic:function(){return this.options||{}}}),BI.LogicFactory={Type:{Vertical:"vertical",Horizontal:"horizontal",Table:"table",HorizontalFill:"horizontal_fill"},createLogic:function(a,b){var c;switch(a){case BI.LogicFactory.Type.Vertical:c=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:c=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:c=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:c=BI.HorizontalFillLayoutLogic;break;default:c=BI.Logic}return new c(b).createLogic()},createLogicTypeByDirection:function(a){switch(a){case BI.Direction.Top:case BI.Direction.Bottom:case BI.Direction.Custom:return BI.LogicFactory.Type.Vertical;case BI.Direction.Left:case BI.Direction.Right:return BI.LogicFactory.Type.Horizontal}},createLogicItemsByDirection:function(a){var b,c=Array.prototype.slice.call(arguments,1);switch(c=BI.map(c,function(a,b){return BI.isWidget(b)?{el:b,width:b.options.width,height:b.options.height}:b}),a){case BI.Direction.Bottom:b=BI.LogicFactory.Type.Vertical,c.reverse();break;case BI.Direction.Right:b=BI.LogicFactory.Type.Horizontal,c.reverse();break;case BI.Direction.Custom:c=c.slice(1)}return c}},BI.VerticalLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.VerticalLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.vertical":"bi.vtape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.VerticalLayoutLogic.superclass._init.apply(this,arguments)}}),BI.HorizontalLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.HorizontalLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.horizontal":"bi.htape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalLayoutLogic.superclass._init.apply(this,arguments)}}),BI.TableLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.TableLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,columns:0,rows:0,columnSize:[],rowSize:[],hgap:0,vgap:0,items:[]})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.table":"bi.window",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,columns:b.columns,rows:b.rows,columnSize:b.columnSize,rowSize:b.rowSize,hgap:b.hgap,vgap:b.vgap,items:b.items}},_init:function(){BI.TableLayoutLogic.superclass._init.apply(this,arguments)}}),BI.HorizontalFillLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.HorizontalFillLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options,c=[];return BI.each(b.items,function(a,b){c.push(b.width||0)}),a=b.dynamic?"bi.horizontal_adapt":"bi.htape",{type:a,columnSize:c,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalFillLayoutLogic.superclass._init.apply(this,arguments)}}),BI.Plugin=BI.Plugin||{},function(){var a={},b={};BI.extend(BI.Plugin,{getWidget:function(b,c){if(a[b])for(var d,e=a[b].length-1;e>=0;e--)if(d=a[b][e](c))return d;return c},registerWidget:function(b,c){a[b]||(a[b]=[]),a[b].length>0&&console.log("组件已经注册过了!"),a[b].push(c)},relieveWidget:function(b){delete a[b]},getObject:function(a,c){if(b[a])for(var d,e=0,f=b[a].length;e0&&console.log("对象已经注册过了!"),b[a].push(c)},relieveObject:function(a){delete b[a]}})}(),$.extend(Array.prototype,{contains:function(a){return this.indexOf(a)>-1},remove:function(a){var b=this.indexOf(a);return b!==-1&&this.splice(b,1),this},pushArray:function(a){for(var b=0;b=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(f.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(c.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},Date._DN=[BI.i18nText("BI-Basic_Sunday"),BI.i18nText("BI-Basic_Monday"),BI.i18nText("BI-Basic_Tuesday"),BI.i18nText("BI-Basic_Wednesday"),BI.i18nText("BI-Basic_Thursday"),BI.i18nText("BI-Basic_Friday"),BI.i18nText("BI-Basic_Saturday"),BI.i18nText("BI-Basic_Sunday")],Date._SDN=[BI.i18nText("BI-Basic_Simple_Sunday"),BI.i18nText("BI-Basic_Simple_Monday"),BI.i18nText("BI-Basic_Simple_Tuesday"),BI.i18nText("BI-Basic_Simple_Wednesday"),BI.i18nText("BI-Basic_Simple_Thursday"),BI.i18nText("BI-Basic_Simple_Friday"),BI.i18nText("BI-Basic_Simple_Saturday"),BI.i18nText("BI-Basic_Simple_Sunday")],Date._FD=1,Date._MN=[BI.i18nText("BI-Basic_January"),BI.i18nText("BI-Basic_February"),BI.i18nText("BI-Basic_March"),BI.i18nText("BI-Basic_April"),BI.i18nText("BI-Basic_May"),BI.i18nText("BI-Basic_June"),BI.i18nText("BI-Basic_July"),BI.i18nText("BI-Basic_August"),BI.i18nText("BI-Basic_September"),BI.i18nText("BI-Basic_October"),BI.i18nText("BI-Basic_November"),BI.i18nText("BI-Basic_December")],Date._SMN=[0,1,2,3,4,5,6,7,8,9,10,11],Date._QN=["",BI.i18nText("BI-Quarter_1"),BI.i18nText("BI-Quarter_2"),BI.i18nText("BI-Quarter_3"),BI.i18nText("BI-Quarter_4")],Date._MD=[31,28,31,30,31,30,31,31,30,31,30,31],Date.SECOND=1e3,Date.MINUTE=60*Date.SECOND,Date.HOUR=60*Date.MINUTE,Date.DAY=24*Date.HOUR,Date.WEEK=7*Date.DAY,Date.prototype.getTimezone=function(){return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"")},Date.prototype.getMonthDays=function(a){var b=this.getFullYear();return"undefined"==typeof a&&(a=this.getMonth()),0!=b%4||0==b%100&&0!=b%400||1!=a?Date._MD[a]:29},Date.prototype.getDayOfYear=function(){var a=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0),b=new Date(this.getFullYear(),0,0,0,0,0),c=a-b;return Math.floor(c/Date.DAY)},Date.prototype.getWeekNumber=function(){var a=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0),b=a.getDay();if(0===this.getMonth()&&this.getDate()<=b)return 1;a.setDate(this.getDate()-b);var c=a.valueOf();a.setMonth(0),a.setDate(1);var d=Math.floor((c-a.valueOf())/6048e5)+1;return a.getDay()>0&&d++,d},Date.prototype.getOffsetDate=function(a){return new Date(this.getTime()+864e5*a)},Date.prototype.getAfterMulQuarter=function(a){var b=new Date(this.getTime());return b.setMonth(b.getMonth()+3*a),b},Date.prototype.getBeforeMulQuarter=function(a){var b=new Date(this.getTime());return b.setMonth(b.getMonth()-3*a),b},Date.prototype.getQuarterStartMonth=function(){var a=0,b=this.getMonth();return b<3&&(a=0),28&&(a=9),a},Date.prototype.getQuarterStartDate=function(){return new Date(this.getFullYear(),this.getQuarterStartMonth(),1)},Date.prototype.getQuarterEndDate=function(){var a=this.getQuarterStartMonth()+2;return new Date(this.getFullYear(),a,this.getMonthDays(a))},Date.prototype.getAfterMultiMonth=function(a){var b=new Date(this.getTime());return b.setMonth(b.getMonth()+a|0),b},Date.prototype.getBeforeMultiMonth=function(a){var b=new Date(this.getTime());return b.setMonth(b.getMonth()-a|0),b},Date.prototype.getAfterMulQuarter=function(a){var b=new Date(this.getTime());return b.setMonth(b.getMonth()+3*a),b},Date.prototype.getBeforeMulQuarter=function(a){var b=new Date(this.getTime());return b.setMonth(b.getMonth()-3*a),b},Date.prototype.getQuarterStartMonth=function(){var a=0,b=this.getMonth();return b<3&&(a=0),28&&(a=9),a},Date.prototype.getOffsetMonth=function(a){var b=new Date(this.getTime()),c=b.getDate(),d=new Date(b.getFullYear(),b.getMonth()+parseInt(a),1).getMonthDays();return c>d&&(c=d),b.setDate(c),b.setMonth(b.getMonth()+parseInt(a)),b},Date.prototype.getWeekStartDate=function(){var a=this.getDay();return this.getOffsetDate(-a)},Date.prototype.getWeekEndDate=function(){var a=this.getDay(),b=0===a?6:6-a;return this.getOffsetDate(b)},Date.prototype.getQuarterStartDate=function(){return new Date(this.getFullYear(),this.getQuarterStartMonth(),1)},Date.prototype.getQuarterEndDate=function(){var a=this.getQuarterStartMonth()+2;return new Date(this.getFullYear(),a,this.getMonthDays(a))},Date.prototype.getAfterMultiMonth=function(a){var b=new Date(this.getTime());return b.setMonth(b.getMonth()+a|0),b},Date.prototype.getBeforeMultiMonth=function(a){var b=new Date(this.getTime());return b.setMonth(b.getMonth()-a|0),b},Date.prototype.equalsTo=function(a){return this.getFullYear()==a.getFullYear()&&this.getMonth()==a.getMonth()&&this.getDate()==a.getDate()&&this.getHours()==a.getHours()&&this.getMinutes()==a.getMinutes()&&this.getSeconds()==a.getSeconds()},Date.prototype.setDateOnly=function(a){var b=new Date(a);this.setDate(1),this.setFullYear(b.getFullYear()),this.setMonth(b.getMonth()),this.setDate(b.getDate())},Date.prototype.print=function(a){var b=this.getMonth(),c=this.getDate(),d=this.getFullYear(),e=this.getWeekNumber(),f=this.getDay(),g={},h=this.getHours(),i=h>=12,j=i?h-12:h,k=this.getDayOfYear();0==j&&(j=12);var l=this.getMinutes(),m=this.getSeconds();g["%a"]=Date._SDN[f],g["%A"]=Date._DN[f],g["%b"]=Date._SMN[b],g["%B"]=Date._MN[b],g["%C"]=1+Math.floor(d/100),g["%d"]=c<10?"0"+c:c,g["%e"]=c,g["%H"]=h<10?"0"+h:h,g["%I"]=j<10?"0"+j:j,g["%j"]=k<100?k<10?"00"+k:"0"+k:k,g["%k"]=h,g["%l"]=j,g["%X"]=b<9?"0"+(1+b):1+b,g["%x"]=b+1,g["%M"]=l<10?"0"+l:l,g["%n"]="\n",g["%p"]=i?"PM":"AM",g["%P"]=i?"pm":"am",g["%s"]=Math.floor(this.getTime()/1e3),g["%S"]=m<10?"0"+m:m,g["%t"]="\t",g["%U"]=g["%W"]=g["%V"]=e<10?"0"+e:e,g["%u"]=f+1,g["%w"]=f,g["%y"]=(""+d).substr(2,2),g["%Y"]=d,g["%%"]="%";var n=/%./g;if(!BI.isKhtml())return a.replace(n,function(a){return g[a]||a});for(var o=a.match(n),p=0;pe[0]?f=["y",1]:a>=d[0]&&a<=e[0]&&(a==d[0]&&(be[1]?f=["m",1]:b==e[1]&&c>e[2]&&(f=["d",1]))),f},Date.checkLegal=function(a){var b=a.match(/\d+/g),c=0|b[0],d=0|b[1],e=0|b[2];if(b.length<=1)return!0;if(b.length<=2)return d>=1&&d<=12;var f=Date._MD.slice(0);return f[1]=Date.isLeap(c)?29:28,d>=1&&d<=12&&e<=f[d-1]},Date.parseDateTime=function(a,b){var c=new Date,d=0,e=0,f=1,g=a.split(/\W+/);if("%y%x"==b.toLowerCase()||"%y%x%d"==b.toLowerCase()){var h=4,i=2;g[0]=a.substring(0,h),g[1]=a.substring(h,h+i),g[2]=a.substring(h+i,h+2*i)}var j=b.match(/%./g),k=0,l=0,m=0,n=0,o=0;for(k=0;k29?1900:2e3);break;case"%b":case"%B":for(l=0;l<12;++l)if(Date._MN[l].substr(0,g[k].length).toLowerCase()==g[k].toLowerCase()){e=l;break}break;case"%H":case"%I":case"%k":case"%l":m=parseInt(g[k],10);break;case"%P":case"%p":/pm/i.test(g[k])&&m<12?m+=12:/am/i.test(g[k])&&m>=12&&(m-=12);break;case"%M":n=parseInt(g[k],10);case"%S":o=parseInt(g[k],10)}if(isNaN(d)&&(d=c.getFullYear()),isNaN(e)&&(e=c.getMonth()),isNaN(f)&&(f=c.getDate()),isNaN(m)&&(m=c.getHours()),isNaN(n)&&(n=c.getMinutes()),isNaN(o)&&(o=c.getSeconds()),0!=d)return new Date(d,e,f,m,n,o);for(d=0,e=-1,f=0,k=0;k31&&0==d?(d=parseInt(g[k],10),d<100&&(d+=d>29?1900:2e3)):0==f&&(f=g[k]);return 0==d&&(d=c.getFullYear()),e!=-1&&0!=f?new Date(d,e,f,m,n,o):c},$.extend($.Event.prototype,{stopEvent:function(){this.stopPropagation(),this.preventDefault()}}),Function.prototype.before=function(a){var b=this;return function(){return a.apply(this,arguments)!==!1&&b.apply(this,arguments)}},Function.prototype.after=function(a){var b=this;return function(){var c=b.apply(this,arguments);return c!==!1&&(a.apply(this,arguments),c)}},jQuery&&!function(a){a.fn.insets||(a.fn.insets=function(){var a=this.padding(),b=this.border();return{top:a.top,bottom:a.bottom+b.bottom+b.top,left:a.left,right:a.right+b.right+b.left}}),a.fn.bounds||(a.fn.bounds=function(a){var b={hasIgnoredBounds:!0};return a?(isNaN(a.x)||(b.left=a.x),isNaN(a.y)||(b.top=a.y),null!=a.width&&(b.width=a.width-(this.outerWidth(!0)-this.width()),b.width=b.width>=0?b.width:a.width),null!=a.height&&(b.height=a.height-(this.outerHeight(!0)-this.height()),b.height=b.height>=0?b.height:a.height),this.css(b),this):(b=this.position(), -{x:b.left,y:b.top,width:this.outerWidth(),height:this.outerHeight()})})}(jQuery),Number.prototype.toFixed&&"0.000"===8e-5.toFixed(3)&&"0"!==.9.toFixed(0)&&"1.25"===1.255.toFixed(2)&&"1000000000000000128"===(0xde0b6b3a7640080).toFixed(0)||!function(){function a(a,b){for(var c=-1;++c=0;)c+=h[b],h[b]=Math.floor(c/a),c=c%a*f}function c(){for(var a=g,b="";--a>=0;)if(""!==b||0===a||0!==h[a]){var c=String(h[a]);""===b?b=c:b+="0000000".slice(0,7-c.length)+c}return b}function d(a,b,c){return 0===b?c:b%2===1?d(a,b-1,c*a):d(a*a,b/2,c)}function e(a){for(var b=0;a>=4096;)b+=12,a/=4096;for(;a>=2;)b+=1,a/=2;return b}var f,g,h;f=1e7,g=6,h=[0,0,0,0,0,0],Number.prototype.toFixed=function(f){var g,h,i,j,k,l,m,n;if(g=Number(f),g=g!==g?0:Math.floor(g),g<0||g>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(h=Number(this),h!==h)return"NaN";if(h<=-1e21||h>1e21)return String(h);if(i="",h<0&&(i="-",h=-h),j="0",h>1e-21)if(k=e(h*d(2,69,1))-69,l=k<0?h*d(2,-k,1):h/d(2,k,1),l*=4503599627370496,k=52-k,k>0){for(a(0,l),m=g;m>=7;)a(1e7,0),m-=7;for(a(d(10,m,1),0),m=k-1;m>=23;)b(1<<23),m-=23;b(1<0?(n=j.length,j=n<=g?i+"0.0000000000000000000".slice(0,g-n+2)+j:i+j.slice(0,n-g)+"."+j.slice(n-g)):j=i+j,j}}(),Number.prototype.add=function(a){return accAdd(a,this)},Number.prototype.sub=function(a){return accSub(this,a)},Number.prototype.mul=function(a){return accMul(a,this)},Number.prototype.div=function(a){return accDiv(this,a)},$.extend(String.prototype,{startWith:function(a){return!(null==a||""==a||0===this.length||a.length>this.length)&&this.substr(0,a.length)==a},endWith:function(a){return!(null==a||""==a||0===this.length||a.length>this.length)&&this.substring(this.length-a.length)==a},getQuery:function(a){var b=new RegExp("(^|&)"+a+"=([^&]*)(&|$)"),c=this.substr(this.indexOf("?")+1).match(b);return c?unescape(c[2]):null},appendQuery:function(a){if(!a)return this;var b=this;return b.indexOf("?")===-1&&(b+="?"),b.endWith("?")!==!1||(b+="&"),$.each(a,function(a,c){"string"==typeof a&&(b+=a+"="+c+"&")}),b=b.substr(0,b.length-1)},replaceAll:function(a,b){return this.replace(new RegExp(a,"gm"),b)},perfectStart:function(a){return this.startWith(a)?this:a+this},allIndexOf:function(a){if("string"!=typeof a)return[];for(var b=this,c=[],d=0;b.length>0;){var e=b.indexOf(a);if(e===-1)break;c.push(d+e),b=b.substring(e+a.length,b.length),d+=e+a.length}return c}}),$.extend(String,{escape:function(a){return a.replace(/('|\\)/g,"\\$1")},leftPad:function(a,b,c){var d=String(a);for(c||(c=" ");d.length").attr({cellspacing:0,cellpadding:0}).css({position:"relative",width:"100%",height:"100%","white-space":"nowrap","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.$tr=$("
"),this.$tr.appendTo(this.$table),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.attr("width",e);else{var f=BI.createWidget(b);f.element.css({position:"relative",top:"0",left:"0",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",tagName:"td",attributes:{width:e},items:[f]}),this.addWidget(this._getChildName(a),c)}return c.element.css({"max-width":d.columnSize[a]}),0===a&&c.element.addClass("first-element"),c.element.css({position:"relative",height:"100%","vertical-align":"middle",margin:"0",padding:"0",border:"none"}),d.hgap+d.lgap+(b.lgap||0)!==0&&f.element.css({"margin-left":d.hgap+d.lgap+(b.lgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)!==0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+"px"}),d.vgap+d.tgap+(b.tgap||0)!==0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)!==0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+"px"}),c},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&(this.$tr.append(b),this.element.append(this.$table))},resize:function(){},_getWrapper:function(){return this.$tr},populate:function(a){BI.CenterAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.center_adapt",BI.CenterAdaptLayout),BI.HorizontalAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HorizontalAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-horizontal-adapt-layout",verticalAlign:BI.VerticalAlign.Middle,columnSize:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.HorizontalAdaptLayout.superclass.render.apply(this,arguments),this.$table=$("
").attr({cellspacing:0,cellpadding:0}).css({position:"relative",width:"100%","white-space":"nowrap","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.$tr=$(""),this.$tr.appendTo(this.$table),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.attr("width",e);else{var f=BI.createWidget(b);f.element.css({position:"relative",top:"0",left:"0",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",tagName:"td",attributes:{width:e},items:[f]}),this.addWidget(this._getChildName(a),c)}return c.element.css({"max-width":d.columnSize[a]+"px"}),0===a&&c.element.addClass("first-element"),c.element.css({position:"relative","vertical-align":d.verticalAlign,margin:"0",padding:"0",border:"none"}),d.hgap+d.lgap+(b.lgap||0)!==0&&f.element.css({"margin-left":d.hgap+d.lgap+(b.lgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)!==0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+"px"}),d.vgap+d.tgap+(b.tgap||0)!==0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)!==0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+"px"}),c},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&(this.$tr.append(b),this.element.append(this.$table))},resize:function(){},_getWrapper:function(){return this.$tr},populate:function(a){BI.HorizontalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_adapt",BI.HorizontalAdaptLayout),BI.LeftRightVerticalAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-left-right-vertical-adapt-layout",items:{},llgap:0,lrgap:0,lhgap:0,rlgap:0,rrgap:0,rhgap:0})},render:function(){BI.LeftRightVerticalAdaptLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},addItem:function(){throw new Error("cannot be added")},stroke:function(a){var b=this.options;if("left"in a){var c=BI.createWidget({type:"bi.vertical_adapt",items:a.left,hgap:b.lhgap,lgap:b.llgap,rgap:b.lrgap});c.element.css("height","100%"),BI.createWidget({type:"bi.left",element:this,items:[c]})}if("right"in a){var d=BI.createWidget({type:"bi.vertical_adapt",items:a.right,hgap:b.rhgap,lgap:b.rlgap,rgap:b.rrgap});d.element.css("height","100%"),BI.createWidget({type:"bi.right",element:this,items:[d]})}},populate:function(a){BI.LeftRightVerticalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.left_right_vertical_adapt",BI.LeftRightVerticalAdaptLayout),BI.LeftVerticalAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-left-vertical-adapt-layout",items:[],lgap:0,rgap:0,hgap:0})},render:function(){BI.LeftVerticalAdaptLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},addItem:function(){throw new Error("cannot be added")},stroke:function(a){var b=this.options,c=BI.createWidget({type:"bi.vertical_adapt",items:a,lgap:b.lgap,hgap:b.hgap,rgap:b.rgap});c.element.css("height","100%"),BI.createWidget({type:"bi.left",element:this,items:[c]})},populate:function(a){BI.LeftVerticalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.left_vertical_adapt",BI.LeftVerticalAdaptLayout),BI.RightVerticalAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.RightVerticalAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-right-vertical-adapt-layout",items:[],lgap:0,rgap:0,hgap:0})},render:function(){BI.RightVerticalAdaptLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},addItem:function(){throw new Error("cannot be added")},stroke:function(a){var b=this.options,c=BI.createWidget({type:"bi.vertical_adapt",items:a,lgap:b.lgap,hgap:b.hgap,rgap:b.rgap});c.element.css("height","100%"),BI.createWidget({type:"bi.right",element:this,items:[c]})},populate:function(a){BI.RightVerticalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.right_vertical_adapt",BI.RightVerticalAdaptLayout),BI.VerticalAdaptLayout=BI.inherit(BI.Layout,{props:{baseCls:"bi-vertical-adapt-layout",columnSize:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0},render:function(){BI.VerticalAdaptLayout.superclass.render.apply(this,arguments),this.$table=$("
").attr({cellspacing:0,cellpadding:0}).css({position:"relative",height:"100%","white-space":"nowrap","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.$tr=$(""),this.$tr.appendTo(this.$table),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.attr("width",e);else{var f=BI.createWidget(b);f.element.css({position:"relative",top:"0",left:"0",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",tagName:"td",attributes:{width:e},items:[f]}),this.addWidget(this._getChildName(a),c)}return 0===a&&c.element.addClass("first-element"),c.element.css({position:"relative",height:"100%","vertical-align":"middle",margin:"0",padding:"0",border:"none"}),d.hgap+d.lgap+(b.lgap||0)!==0&&f.element.css({"margin-left":d.hgap+d.lgap+(b.lgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)!==0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+"px"}),d.vgap+d.tgap+(b.tgap||0)!==0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)!==0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+"px"}),c},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&(this.$tr.append(b),this.element.append(this.$table))},_getWrapper:function(){return this.$tr},resize:function(){},populate:function(a){BI.VerticalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.vertical_adapt",BI.VerticalAdaptLayout),BI.HorizontalAutoLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HorizontalAutoLayout.superclass.props.apply(this,arguments),{baseCls:"bi-horizon-auto-layout",hgap:0,lgap:0,rgap:0,vgap:0,tgap:0,bgap:0})},render:function(){BI.HorizontalAutoLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.HorizontalAutoLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",margin:"0px auto"}),c.hgap+c.lgap+(b.lgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.tgap+(b.tgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.HorizontalAutoLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_auto",BI.HorizontalAutoLayout),BI.FloatCenterAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FloatCenterAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-float-center-adapt-layout",items:[],hgap:0,vgap:0,tgap:0,bgap:0,lgap:0,rgap:0})},render:function(){BI.FloatCenterAdaptLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},addItem:function(){throw new Error("cannot be added")},mounted:function(){var a=this,b=this.left.element.outerWidth(),c=this.left.element.outerHeight();this.left.element.width(b).height(c).css("float","none"),BI.remove(this._children,function(b,c){c===a.container&&delete a._children[b]}),BI.createWidget({type:"bi.center_adapt",element:this,items:[this.left]})},stroke:function(a){var b=this.options;this.left=BI.createWidget({type:"bi.vertical",items:a,hgap:b.hgap,vgap:b.vgap,tgap:b.tgap,bgap:b.bgap,lgap:b.lgap,rgap:b.rgap}),this.container=BI.createWidget({type:"bi.left",element:this,items:[this.left]})},populate:function(a){BI.FloatCenterAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.float_center_adapt",BI.FloatCenterAdaptLayout),BI.FloatHorizontalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FloatHorizontalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-float-horizontal-adapt-layout",items:[],hgap:0,vgap:0,tgap:0,bgap:0,lgap:0,rgap:0})},render:function(){BI.FloatHorizontalLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},mounted:function(){var a=this,b=this.left.element.width(),c=this.left.element.height();this.left.element.width(b).height(c).css("float","none"),BI.remove(this._children,function(b,c){c===a.container&&delete a._children[b]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[this.left]})},_addElement:function(a,b){var c=this.options;return this.left=BI.createWidget({type:"bi.vertical",items:[b],hgap:c.hgap,vgap:c.vgap,tgap:c.tgap,bgap:c.bgap,lgap:c.lgap,rgap:c.rgap}),this.container=BI.createWidget({type:"bi.left",element:this,items:[this.left]}),this.left},populate:function(a){BI.HorizontalAutoLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_float",BI.FloatHorizontalLayout),BI.FlexCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-center-layout"})},render:function(){BI.FlexCenterLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=(this.options,BI.FlexCenterLayout.superclass._addElement.apply(this,arguments));return c.element.css({position:"relative","flex-shrink":"0"}),c},resize:function(){},populate:function(a){BI.FlexCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_center",BI.FlexCenterLayout),BI.FlexHorizontalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexHorizontalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-horizontal-layout",verticalAlign:"middle",columnSize:[],scrollx:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexHorizontalLayout.superclass.render.apply(this,arguments);var a=this.options;this.element.addClass(a.verticalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.hgap+c.lgap+(b.lgap||0)>0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)>0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.tgap+(b.tgap||0)>0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)>0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.FlexHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_horizontal",BI.FlexHorizontalLayout),BI.FlexVerticalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexVerticalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-vertical-center",columnSize:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexVerticalCenter.superclass.render.apply(this,arguments);this.options;this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexVerticalCenter.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.hgap+c.lgap+(b.lgap||0)>0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)>0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.tgap+(b.tgap||0)>0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)>0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.FlexVerticalCenter.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_vertical_center",BI.FlexVerticalCenter),BI.FlexCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-wrapper-center-layout clearfix"})},render:function(){BI.FlexCenterLayout.superclass.render.apply(this,arguments),this.$wrapper=$("
").addClass("flex-wrapper-center-layout-wrapper"),this.populate(this.options.items)},_addElement:function(a,b){var c=(this.options,BI.FlexCenterLayout.superclass._addElement.apply(this,arguments));return c.element.css({position:"relative"}),c},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&(this.$wrapper.append(b),this.element.append(this.$wrapper))},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_wrapper_center",BI.FlexCenterLayout),BI.FlexHorizontalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexHorizontalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-wrapper-horizontal-layout clearfix",verticalAlign:"middle",columnSize:[],scrollx:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexHorizontalLayout.superclass.render.apply(this,arguments);var a=this.options;this.$wrapper=$("
").addClass("flex-wrapper-horizontal-layout-wrapper "+a.verticalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative"}),c.hgap+c.lgap+(b.lgap||0)>0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)>0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.tgap+(b.tgap||0)>0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)>0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&(this.$wrapper.append(b),this.element.append(this.$wrapper))},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_wrapper_horizontal",BI.FlexHorizontalLayout),BI.FlexVerticalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexVerticalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-wrapper-vertical-center clearfix",columnSize:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexVerticalCenter.superclass.render.apply(this,arguments);this.options;this.$wrapper=$("
").addClass("flex-wrapper-vertical-center-wrapper"),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexVerticalCenter.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative"}),c.hgap+c.lgap+(b.lgap||0)>0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)>0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.tgap+(b.tgap||0)>0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)>0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&(this.$wrapper.append(b),this.element.append(this.$wrapper))},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexVerticalCenter.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_wrapper_vertical_center",BI.FlexVerticalCenter),BI.AbsoluteLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.AbsoluteLayout.superclass.props.apply(this,arguments),{baseCls:"bi-absolute-layout",hgap:null,vgap:null,lgap:null,rgap:null,tgap:null,bgap:null})},render:function(){BI.AbsoluteLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.AbsoluteLayout.superclass._addElement.apply(this,arguments),e=0,f=0,g=0,h=0;return BI.isNotNull(b.left)&&(d.element.css({left:b.left}),e+=b.left),BI.isNotNull(b.right)&&(d.element.css({right:b.right}),f+=b.right),BI.isNotNull(b.top)&&(d.element.css({top:b.top}),g+=b.top),BI.isNotNull(b.bottom)&&(d.element.css({bottom:b.bottom}),h+=b.bottom),BI.isNotNull(c.hgap)&&(e+=c.hgap,d.element.css({left:e}),f+=c.hgap,d.element.css({right:f})),BI.isNotNull(c.vgap)&&(g+=c.vgap,d.element.css({top:g}),h+=c.vgap,d.element.css({bottom:h})),BI.isNotNull(c.lgap)&&(e+=c.lgap,d.element.css({left:e})),BI.isNotNull(c.rgap)&&(f+=c.rgap,d.element.css({right:f})),BI.isNotNull(c.tgap)&&(g+=c.tgap,d.element.css({top:g})),BI.isNotNull(c.bgap)&&(h+=c.bgap,d.element.css({bottom:h})),BI.isNotNull(b.width)&&d.element.css({width:b.width}),BI.isNotNull(b.height)&&d.element.css({height:b.height}),d.element.css({position:"absolute"}),d},resize:function(){this.stroke(this.options.items)},stroke:function(a){this.options.items=a||[];var b=this;BI.each(a,function(a,c){if(c){if(!BI.isWidget(c)&&!c.el)throw new Error("el must be exist");b._addElement(a,c)}})},populate:function(a){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute",BI.AbsoluteLayout),BI.AdaptiveLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.AdaptiveLayout.superclass.props.apply(this,arguments),{baseCls:"bi-adaptive-layout",hgap:null,vgap:null,lgap:null,rgap:null,tgap:null,bgap:null})},render:function(){BI.AdaptiveLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.AdaptiveLayout.superclass._addElement.apply(this,arguments);d.element.css({position:"relative"});var e=0,f=0,g=0,h=0;return BI.isNotNull(b.left)&&d.element.css({ -"margin-left":b.left}),BI.isNotNull(b.right)&&d.element.css({"margin-right":b.right}),BI.isNotNull(b.top)&&d.element.css({"margin-top":b.top}),BI.isNotNull(b.bottom)&&d.element.css({"margin-bottom":b.bottom}),BI.isNotNull(c.hgap)&&(e+=c.hgap,d.element.css({left:e}),f+=c.hgap,d.element.css({right:f})),BI.isNotNull(c.vgap)&&(g+=c.vgap,d.element.css({top:g}),h+=c.vgap,d.element.css({bottom:h})),BI.isNotNull(c.lgap)&&(e+=c.lgap,d.element.css({left:e})),BI.isNotNull(c.rgap)&&(f+=c.rgap,d.element.css({right:f})),BI.isNotNull(c.tgap)&&(g+=c.tgap,d.element.css({top:g})),BI.isNotNull(c.bgap)&&(h+=c.bgap,d.element.css({bottom:h})),BI.isNotNull(b.width)&&d.element.css({width:b.width}),BI.isNotNull(b.height)&&d.element.css({height:b.height}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.adaptive",BI.AdaptiveLayout),BI.BorderLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.BorderLayout.superclass.props.apply(this,arguments),{baseCls:"bi-border-layout",items:{}})},render:function(){BI.BorderLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.options.items)},addItem:function(a){throw new Error("cannot be added")},stroke:function(a){var b,c=0,d=0,e=0,f=0;if("north"in a&&(b=a.north,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"north")){var g=BI.createWidget(b);this.addWidget(this.getName()+"north",g)}this.getWidgetByName(this.getName()+"north").element.height(b.height).css({position:"absolute",top:b.top||0,left:b.left||0,right:b.right||0,bottom:"initial"})}c=(b.height||0)+(b.top||0)+(b.bottom||0)}if("south"in a&&(b=a.south,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"south")){var g=BI.createWidget(b);this.addWidget(this.getName()+"south",g)}this.getWidgetByName(this.getName()+"south").element.height(b.height).css({position:"absolute",bottom:b.bottom||0,left:b.left||0,right:b.right||0,top:"initial"})}d=(b.height||0)+(b.top||0)+(b.bottom||0)}if("west"in a&&(b=a.west,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"west")){var g=BI.createWidget(b);this.addWidget(this.getName()+"west",g)}this.getWidgetByName(this.getName()+"west").element.width(b.width).css({position:"absolute",left:b.left||0,top:c,bottom:d,right:"initial"})}e=(b.width||0)+(b.left||0)+(b.right||0)}if("east"in a&&(b=a.east,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"east")){var g=BI.createWidget(b);this.addWidget(this.getName()+"east",g)}this.getWidgetByName(this.getName()+"east").element.width(b.width).css({position:"absolute",right:b.right||0,top:c,bottom:d,left:"initial"})}f=(b.width||0)+(b.left||0)+(b.right||0)}if("center"in a&&(b=a.center,null!=b)){if(!this.hasWidget(this.getName()+"center")){var g=BI.createWidget(b);this.addWidget(this.getName()+"center",g)}this.getWidgetByName(this.getName()+"center").element.css({position:"absolute",top:c,bottom:d,left:e,right:f})}},populate:function(a){BI.BorderLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.border",BI.BorderLayout),BI.CardLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.CardLayout.superclass.props.apply(this,arguments),{baseCls:"bi-card-layout",items:[]})},render:function(){BI.CardLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},stroke:function(a){var b=this,c=this.options;this.showIndex=void 0,BI.each(a,function(a,d){if(d){if(b.hasWidget(d.cardName))var e=b.getWidgetByName(d.cardName);else{var e=BI.createWidget(d);e.on(BI.Events.DESTROY,function(){var a=BI.findIndex(c.items,function(a,b){return b.cardName==d.cardName});a>-1&&c.items.splice(a,1)}),b.addWidget(d.cardName,e)}e.element.css({position:"absolute",top:"0",right:"0",bottom:"0",left:"0"}),e.setVisible(!1)}})},update:function(){},empty:function(){BI.CardLayout.superclass.empty.apply(this,arguments),this.options.items=[]},populate:function(a){BI.CardLayout.superclass.populate.apply(this,arguments),this._mount(),this.options.defaultShowName&&this.showCardByName(this.options.defaultShowName)},isCardExisted:function(a){return BI.some(this.options.items,function(b,c){return c.cardName==a&&c.el})},getCardByName:function(a){if(!this.isCardExisted(a))throw new Error("cardName is not exist");return this._children[a]},_deleteCardByName:function(a){delete this._children[a];var b=BI.findIndex(this.options.items,function(b,c){return c.cardName==a});b>-1&&this.options.items.splice(b,1)},deleteCardByName:function(a){if(!this.isCardExisted(a))throw new Error("cardName is not exist");var b=this._children[a];this._deleteCardByName(a),b&&b._destroy()},addCardByName:function(a,b){if(this.isCardExisted(a))throw new Error("cardName is already exist");var c=BI.createWidget(b);return c.element.css({position:"relative",top:"0",left:"0",width:"100%",height:"100%"}).appendTo(this.element),c.invisible(),this.addWidget(a,c),this.options.items.push({el:b,cardName:a}),c},showCardByName:function(a,b,c){var d=this,e=this.isCardExisted(a);null!=this.showIndex&&(this.lastShowIndex=this.showIndex),this.showIndex=a;var f=!1;BI.each(this.options.items,function(g,h){var i=d._children[h.cardName];i&&(a!=h.cardName?!f&&!e&&BI.Action&&b instanceof BI.Action?(b.actionBack(i),f=!0):i.invisible():BI.Action&&b instanceof BI.Action?b.actionPerformed(void 0,i,c):(i.visible(),c&&c()))})},showLastCard:function(){var a=this;this.showIndex=this.lastShowIndex,BI.each(this.options.items,function(b,c){a._children[c.cardName].setVisible(a.showIndex==b)})},setDefaultShowName:function(a){return this.options.defaultShowName=a,this},getDefaultShowName:function(){return this.options.defaultShowName},getAllCardNames:function(){return BI.map(this.options.items,function(a,b){return b.cardName})},getShowingCard:function(){if(BI.isKey(this.showIndex))return this.getWidgetByName(this.showIndex)},deleteAllCard:function(){var a=this;BI.each(this.getAllCardNames(),function(b,c){a.deleteCardByName(c)})},hideAllCard:function(){var a=this;BI.each(this.options.items,function(b,c){a._children[c.cardName].invisible()})},isAllCardHide:function(){var a=this,b=!0;return BI.some(this.options.items,function(c,d){if(a._children[d.cardName].isVisible())return b=!1,!1}),b},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._deleteCardByName(b)}}),BI.shortcut("bi.card",BI.CardLayout),BI.DefaultLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.DefaultLayout.superclass.props.apply(this,arguments),{hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,items:[]})},render:function(){BI.DefaultLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.DefaultLayout.superclass._addElement.apply(this,arguments);return c.vgap+c.tgap+(b.tgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.DefaultLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.default",BI.DefaultLayout),BI.DivisionLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.DivisionLayout.superclass.props.apply(this,arguments),{baseCls:"bi-division-layout",columns:null,rows:null,items:[]})},render:function(){BI.DivisionLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.opitons.items)},addItem:function(a){throw new Error("cannot be added")},stroke:function(a){function b(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function c(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}var e=this.options,f=e.rows||e.items.length,g=e.columns||0|(e.items[0]&&e.items[0].length),h=BI.makeArray(f),i={},j={};BI.each(h,function(a){h[a]=BI.makeArray(g)}),BI.each(a,function(a,b){return BI.isArray(b)?void BI.each(b,function(c,d){i[a]=(i[a]||0)+b.width,j[c]=(j[c]||0)+b.height,h[a][c]=d}):(i[b.row]=(i[b.row]||0)+b.width,j[b.column]=(j[b.column]||0)+b.height,void(h[b.row][b.column]=b))});for(var k=0;k0){var p=this.getWidgetByName(this.getName()+k+"_"+(m-1));p.element.css({right:100-o+"%"})}m==e.columns-1&&n.element.css({right:"0%"}),d(n,k,m),l+=h[k][m].width}for(var m=0;m0){var p=this.getWidgetByName(this.getName()+(k-1)+"_"+m);p.element.css({bottom:100-r+"%"})}k==e.rows-1&&n.element.css({bottom:"0%"}),q+=h[k][m].height}},populate:function(a){BI.DivisionLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.division",BI.DivisionLayout),BI.FloatLeftLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FloatLeftLayout.superclass.props.apply(this,arguments),{baseCls:"bi-float-left-layout clearfix",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FloatLeftLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FloatLeftLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","float":"left"}),BI.isNotNull(b.left)&&d.element.css({left:b.left}),BI.isNotNull(b.right)&&d.element.css({right:b.right}),BI.isNotNull(b.top)&&d.element.css({top:b.top}),(b.lgap||0)+c.hgap+c.lgap!==0&&d.element.css("margin-left",(b.lgap||0)+c.hgap+c.lgap),(b.rgap||0)+c.hgap+c.rgap!==0&&d.element.css("margin-right",(b.rgap||0)+c.hgap+c.rgap),(b.tgap||0)+c.vgap+c.tgap!==0&&d.element.css("margin-top",(b.tgap||0)+c.vgap+c.tgap),(b.bgap||0)+c.vgap+c.bgap!==0&&d.element.css("margin-bottom",(b.bgap||0)+c.vgap+c.bgap),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.FloatLeftLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.left",BI.FloatLeftLayout),BI.FloatRightLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FloatRightLayout.superclass.props.apply(this,arguments),{baseCls:"bi-float-right-layout clearfix",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FloatRightLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FloatRightLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","float":"right"}),BI.isNotNull(b.left)&&d.element.css({left:b.left}),BI.isNotNull(b.right)&&d.element.css({right:b.right}),BI.isNotNull(b.top)&&d.element.css({top:b.top}),(b.lgap||0)+c.hgap+c.lgap!==0&&d.element.css("margin-left",(b.lgap||0)+c.hgap+c.lgap),(b.rgap||0)+c.hgap+c.rgap!==0&&d.element.css("margin-right",(b.rgap||0)+c.hgap+c.rgap),(b.tgap||0)+c.vgap+c.tgap!==0&&d.element.css("margin-top",(b.tgap||0)+c.vgap+c.tgap),(b.bgap||0)+c.vgap+c.bgap!==0&&d.element.css("margin-bottom",(b.bgap||0)+c.vgap+c.bgap),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.FloatRightLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.right",BI.FloatRightLayout),BI.GridLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.GridLayout.superclass.props.apply(this,arguments),{baseCls:"bi-grid-layout",columns:null,rows:null,items:[]})},render:function(){BI.GridLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},addItem:function(){throw new Error("cannot be added")},stroke:function(a){function b(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function c(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}for(var e=this.options,f=e.rows||e.items.length,g=e.columns||0|(e.items[0]&&e.items[0].length),h=100/g,i=100/f,j=[],k=0;k").attr({cellspacing:0,cellpadding:0}).css({position:"relative","white-space":"nowrap","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.$tr=$("
"),this.$tr.appendTo(this.$table),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.attr("width",e);else{var f=BI.createWidget(b);f.element.css({position:"relative",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",tagName:"td",attributes:{width:e},items:[f]}),this.addWidget(this._getChildName(a),c)}return 0===a&&c.element.addClass("first-element"),c.element.css({position:"relative","vertical-align":d.verticalAlign,margin:"0",padding:"0",border:"none"}),d.hgap+d.lgap+(b.lgap||0)>0&&f.element.css({"margin-left":d.hgap+d.lgap+(b.lgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)>0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+"px"}),d.vgap+d.tgap+(b.tgap||0)>0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)>0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+"px"}),c},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&(this.$tr.append(b),this.element.append(this.$table))},resize:function(){},_getWrapper:function(){return this.$tr},populate:function(a){BI.HorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal",BI.HorizontalLayout),BI.HorizontalCellLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HorizontalCellLayout.superclass.props.apply(this,arguments),{baseCls:"bi-horizontal-cell-layout",scrollable:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.HorizontalCellLayout.superclass.render.apply(this,arguments),this.element.css({display:"table","vertical-align":"top"}),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.HorizontalCellLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",display:"table-cell","vertical-align":"middle"}),c.hgap+c.lgap>0&&d.element.css({"margin-left":c.hgap+c.lgap+"px"}),c.hgap+c.rgap>0&&d.element.css({"margin-right":c.hgap+c.rgap+"px"}),c.vgap+c.tgap>0&&d.element.css({"margin-top":c.vgap+c.tgap+"px"}),c.vgap+c.bgap>0&&d.element.css({"margin-bottom":c.vgap+c.bgap+"px"}),d},resize:function(){},populate:function(a){BI.HorizontalCellLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_cell",BI.HorizontalCellLayout),BI.LatticeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.LatticeLayout.superclass.props.apply(this,arguments),{baseCls:"bi-lattice-layout clearfix"})},render:function(){BI.LatticeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.LatticeLayout.superclass._addElement.apply(this,arguments);if(c.columnSize&&c.columnSize[a])var e=c.columnSize[a]/BI.sum(c.columnSize)*100+"%";else var e=1/this.options.items.length*100+"%";return d.element.css({position:"relative","float":"left",width:e}),d},addItem:function(a){var b=BI.LatticeLayout.superclass.addItem.apply(this,arguments);return this.resize(),b},addItemAt:function(a){var b=BI.LatticeLayout.superclass.addItemAt.apply(this,arguments);return this.resize(),b},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.LatticeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.lattice",BI.LatticeLayout),BI.TableLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.TableLayout.superclass.props.apply(this,arguments),{baseCls:"bi-table-layout",scrolly:!0,columnSize:[200,200,"fill"],rowSize:30,hgap:0,vgap:0,items:[[{el:{text:"label1"}},{el:{text:"label2"}},{el:{text:"label3"}}]]})},render:function(){BI.TableLayout.superclass.render.apply(this,arguments),this.rows=0,this.populate(this.options.items)},_addElement:function(a,b){function c(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function d(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function e(a,b,e){a instanceof BI.Widget?c(a.element,b,e):a.el instanceof BI.Widget?c(a.el.element,b,e):a.el?d(a.el,b,e):d(a,b,e)}var f,g,h=this.options,i=[],j=0,k=0;for(f=0;ff;g--){if(!BI.isNumber(h.columnSize[g]))throw new Error("item with fill can only be one");e(b[g],this.rows,g),i.push(BI.extend({top:0,bottom:0,right:h.columnSize[g]<=1?100*k+"%":k,width:h.columnSize[g]<=1?100*h.columnSize[g]+"%":h.columnSize[g]},b[g])),k+=h.columnSize[g]+(h.columnSize[g]<1?0:h.hgap)}f>=0&&f0&&this.getWidgetByName(this.getName()+(this.rows-1)).element.css({"margin-bottom":h.vgap}),l.element.css({position:"relative"}),this.addWidget(this.getName()+this.rows++,l),l},resize:function(){},addItem:function(a){if(!BI.isArray(a))throw new Error("item must be array");return BI.TableLayout.superclass.addItem.apply(this,arguments)},populate:function(a){BI.TableLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.table",BI.TableLayout),BI.HTapeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HTapeLayout.superclass.props.apply(this,arguments),{baseCls:"bi-h-tape-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,items:[{width:100,el:{type:"bi.button",text:"button1"}},{width:"fill",el:{type:"bi.button",text:"button2"}},{width:200,el:{type:"bi.button",text:"button3"}}]})},render:function(){BI.HTapeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.options.items)},addItem:function(a){throw new Error("cannot be added")},stroke:function(a){var b=this,c=this.options;a=BI.compact(a),BI.each(a,function(a,d){if(b.hasWidget(b.getName()+a+""))e=b.getWidgetByName(b.getName()+a+"");else{var e=BI.createWidget(d);b.addWidget(b.getName()+a+"",e)}e.element.css({position:"absolute",top:c.vgap+c.tgap+"px",bottom:c.vgap+c.bgap+"px"})});var d={},e={};d[0]=0,e[a.length-1]=0,BI.any(a,function(e,f){var g=b.getWidgetByName(b.getName()+e+"");if(BI.isNull(d[e])&&(d[e]=d[e-1]+a[e-1].width+2*c.hgap+c.lgap+c.rgap),f.width<1&&f.width>=0?g.element.css({left:100*d[e]+"%",width:100*f.width+"%"}):g.element.css({left:d[e]+c.hgap+c.lgap+"px",width:BI.isNumber(f.width)?f.width:""}),!BI.isNumber(f.width))return!0}),BI.backAny(a,function(d,f){var g=b.getWidgetByName(b.getName()+d+"");if(BI.isNull(e[d])&&(e[d]=e[d+1]+a[d+1].width+2*c.hgap+c.lgap+c.rgap),f.width<1&&f.width>=0?g.element.css({right:100*e[d]+"%",width:100*f.width+"%"}):g.element.css({right:e[d]+c.hgap+c.rgap+"px",width:BI.isNumber(f.width)?f.width:""}),!BI.isNumber(f.width))return!0})},populate:function(a){BI.HTapeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.htape",BI.HTapeLayout),BI.VTapeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.VTapeLayout.superclass.props.apply(this,arguments),{baseCls:"bi-v-tape-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,items:[{height:100,el:{type:"bi.button",text:"button1"}},{height:"fill",el:{type:"bi.button",text:"button2"}},{height:200,el:{type:"bi.button",text:"button3"}}]})},render:function(){BI.VTapeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.options.items)},addItem:function(a){throw new Error("cannot be added")},stroke:function(a){var b=this,c=this.options;a=BI.compact(a),BI.each(a,function(a,d){if(b.hasWidget(b.getName()+a+""))e=b.getWidgetByName(b.getName()+a+"");else{var e=BI.createWidget(d);b.addWidget(b.getName()+a+"",e)}e.element.css({position:"absolute",left:c.hgap+c.lgap+"px",right:c.hgap+c.rgap+"px"})});var d={},e={};d[0]=0,e[a.length-1]=0,BI.any(a,function(e,f){var g=b.getWidgetByName(b.getName()+e+"");if(BI.isNull(d[e])&&(d[e]=d[e-1]+a[e-1].height+2*c.vgap+c.tgap+c.bgap),f.height<1&&f.height>=0?g.element.css({top:100*d[e]+"%",height:100*f.height+"%"}):g.element.css({top:d[e]+c.vgap+c.tgap+"px",height:BI.isNumber(f.height)?f.height:""}),!BI.isNumber(f.height))return!0}),BI.backAny(a,function(d,f){var g=b.getWidgetByName(b.getName()+d+"");if(BI.isNull(e[d])&&(e[d]=e[d+1]+a[d+1].height+2*c.vgap+c.tgap+c.bgap),f.height<1&&f.height>=0?g.element.css({bottom:100*e[d]+"%",height:100*f.height+"%"}):g.element.css({bottom:e[d]+c.vgap+c.bgap+"px",height:BI.isNumber(f.height)?f.height:""}),!BI.isNumber(f.height))return!0})},populate:function(a){BI.VTapeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.vtape",BI.VTapeLayout),BI.TdLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.TdLayout.superclass.props.apply(this,arguments),{baseCls:"bi-td-layout",columnSize:[200,200,200],hgap:0,vgap:0,items:[[{el:{text:"label1"}},{el:{text:"label2"}},{el:{text:"label3"}}]]})},render:function(){BI.TdLayout.superclass.render.apply(this,arguments),this.$table=$("
").attr({cellspacing:0,cellpadding:0}).css({position:"relative",width:"100%",height:"100%","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.rows=0,this.populate(this.options.items)},_addElement:function(a,b){function c(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function d(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function e(a,b,e){a instanceof BI.Widget?c(a.element,b,e):a.el instanceof BI.Widget?c(a.el.element,b,e):a.el?d(a.el,b,e):d(a,b,e)}for(var f=this.options,g=BI.createWidget({type:"bi.default",tagName:"tr"}),h=0;h=0;f--){for(var g=0;g=0;g--){for(var f=0;f=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var a=h.length;a;)this.addEventListener(h[--a],b,!1);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var a=h.length;a;)this.removeEventListener(h[--a],b,!1);else this.onmousewheel=null},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),BI.Pane=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Pane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-pane",tipText:BI.i18nText("BI-No_Selected_Item"),overlap:!0,onLoaded:BI.emptyFn})},_init:function(){BI.Pane.superclass._init.apply(this,arguments)},_assertTip:function(){var a=this.options;this._tipText||(this._tipText=BI.createWidget({type:"bi.label",cls:"bi-tips",text:a.tipText,height:25}),BI.createWidget({type:"bi.vertical",element:this,items:[this._tipText],bgap:25}))},loading:function(){var a=this,b=this.options;b.overlap===!0?(BI.Layers.has(this.getName())||BI.createWidget({type:"bi.vtape",items:[{el:{type:"bi.layout",cls:"loading-background"},height:30}],element:BI.Layers.make(this.getName(),this)}),BI.Layers.show(a.getName())):BI.isNull(this._loading)&&(this._loading=BI.createWidget({type:"bi.layout",cls:"loading-background",height:30}),this._loading.element.css("zIndex",1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this._loading,left:0,right:0,top:0}]}))},loaded:function(){var a=this,b=this.options;BI.Layers.remove(a.getName()),this._loading&&this._loading.destroy(),this._loading&&(this._loading=null),b.onLoaded(),a.fireEvent(BI.Pane.EVENT_LOADED)},check:function(){this.setTipVisible(BI.isEmpty(this.options.items))},setTipVisible:function(a){a===!0?(this._assertTip(),this._tipText.setVisible(!0)):this._tipText&&this._tipText.setVisible(!1)},populate:function(a){this.options.items=a||[],this.check()},empty:function(){}}),BI.Pane.EVENT_LOADED="EVENT_LOADED",BI.Single=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Single.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-single",readonly:!1,title:null,warningTitle:null,tipType:null,value:null})},_showToolTip:function(a,b){b||(b={});var c=this.getTipType()||(this.isEnabled()?"success":"warning"),d="success"===c?this.getTitle():this.getWarningTitle()||this.getTitle();BI.isKey(d)&&BI.Tooltips.show(a,this.getName(),d,c,this,b)},_hideTooltip:function(){var a=this,b=BI.Tooltips.get(this.getName());BI.isNotNull(b)&&b.element.fadeOut(200,function(){BI.Tooltips.remove(a.getName())})},_init:function(){BI.Single.superclass._init.apply(this,arguments);var a=this.options;(BI.isKey(a.title)||BI.isKey(a.warningTitle)||BI.isFunction(a.title)||BI.isFunction(a.warningTitle))&&this.enableHover()},enableHover:function(a){a||(a={});var b=this;this._hoverBinded||(this.element.on("mouseenter.title"+this.getName(),function(c){b._e=c,"warning"===b.getTipType()||BI.isKey(b.getWarningTitle())&&!b.isEnabled()?b.timeout=BI.delay(function(){b._showToolTip(b._e||c,a)},200):("success"===b.getTipType()||b.isEnabled())&&(b.timeout=BI.delay(function(){b._showToolTip(b._e||c,a)},500))}),this.element.on("mousemove.title"+this.getName(),function(a){b._e=a,b.element.__isMouseInBounds__(a)||(BI.isNotNull(b.timeout)&&clearTimeout(b.timeout),b._hideTooltip())}),this.element.on("mouseleave.title"+this.getName(),function(){b._e=null,BI.isNotNull(b.timeout)&&clearTimeout(b.timeout),b._hideTooltip()}),this._hoverBinded=!0)},disabledHover:function(){BI.isNotNull(this.timeout)&&clearTimeout(this.timeout),this._hideTooltip(),$(this.element).unbind("mouseenter.title"+this.getName()).unbind("mousemove.title"+this.getName()).unbind("mouseleave.title"+this.getName()),this._hoverBinded=!1},populate:function(a){this.items=a||[]},setTitle:function(a,b){this.options.title=a,BI.isKey(a)?this.enableHover(b):this.disabledHover()},setWarningTitle:function(a,b){this.options.warningTitle=a,BI.isKey(a)?this.enableHover(b):this.disabledHover()},getTipType:function(){return this.options.tipType},isReadOnly:function(){return!!this.options.readonly},getTitle:function(){var a=this.options.title;return BI.isFunction(a)?a():a},getWarningTitle:function(){var a=this.options.warningTitle;return BI.isFunction(a)?a():a},setValue:function(a){this.options.readonly||(this.options.value=a)},getValue:function(){return this.options.value}}),BI.Text=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Text.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text",textAlign:"left",whiteSpace:"normal",lineHeight:null,handler:null,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,text:"",py:""})},_init:function(){BI.Text.superclass._init.apply(this,arguments);var a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this,BI.isKey(b.text)?this.setText(b.text):BI.isKey(b.value)&&this.setText(b.value),BI.isKey(b.keyword)&&this.text.element.__textKeywordMarked__(b.text,b.keyword,b.py)},doRedMark:function(a){var b=this.options;this.text.element.__textKeywordMarked__(b.text||b.value,a,b.py)},unRedMark:function(){var a=this.options;this.text.element.__textKeywordMarked__(a.text||a.value,"",a.py)},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Text.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){BI.Text.superclass.setText.apply(this,arguments),this.options.text=a,this.text.element.text((a+"").replaceAll(" "," "))}}),BI.shortcut("bi.text",BI.Text),BI.BasicButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.BasicButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-basic-button"+(a.invalid?"":" cursor-pointer"),value:"",text:"",stopEvent:!1,stopPropagation:!1,selected:!1,once:!1,forceSelected:!1,forceNotSelected:!1,disableSelected:!1,shadow:!1,isShadowShowingOnSelected:!1,trigger:null,handler:BI.emptyFn})},_init:function(){BI.BasicButton.superclass._init.apply(this,arguments);var a=this.options;a.selected===!0&&BI.nextTick(BI.bind(function(){this.setSelected(a.selected)},this)),BI.nextTick(BI.bind(this.bindEvent,this)),a.shadow&&this._createShadow()},_createShadow:function(){var a=this,b=this.options,c=function(){a.$mask||(a.$mask=BI.createWidget(BI.isObject(b.shadow)?b.shadow:{},{type:"bi.layout",cls:"bi-button-mask"}),a.$mask.invisible(),BI.createWidget({type:"bi.absolute",element:a,items:[{el:a.$mask,left:0,right:0,top:0,bottom:0}]}))};this.element.mouseup(function(){a._hover||b.isShadowShowingOnSelected||(c(),a.$mask.invisible())}),this.element.on("mouseenter."+this.getName(),function(d){a.element.__isMouseInBounds__(d)&&(!a.isEnabled()||a._hover||!b.isShadowShowingOnSelected&&a.isSelected()||(c(),a.$mask.visible()))}),this.element.on("mousemove."+this.getName(),function(b){a.element.__isMouseInBounds__(b)||a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())}),this.element.on("mouseleave."+this.getName(),function(){a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())})},bindEvent:function(){function a(a){d.stopEvent&&a.stopEvent(),d.stopPropagation&&a.stopPropagation()}function b(b){a(b),!c.isEnabled()||c.isOnce()&&c.isSelected()||h.apply(c,arguments)}var c=this,d=this.options,f=this.handle();if(f){f=f.element;var g=(d.trigger||"").split(",");BI.each(g,function(g,h){switch(h){case"mouseup":var i=!1;f.mousedown(function(){i=!0,a(e)}),f.mouseup(function(c){i===!0&&b(c),i=!1,a(c)});break;case"mousedown":var i=!1,j=!1;f.mousedown(function(d){$(document).bind("mouseup."+c.getName(),function(a){!BI.DOM.isExist(c)||f.__isMouseInBounds__(a)||i!==!0||j||c._trigger(),i=!1,$(document).unbind("mouseup."+c.getName())}),i!==!0&&(c.isSelected()?j=!0:b(d),i=!0,a(d))}),f.mouseup(function(a){BI.DOM.isExist(c)&&i===!0&&j===!0&&b(a),i=!1,j=!1,$(document).unbind("mouseup."+c.getName())});break;case"dblclick":f.dblclick(b);break;case"lclick":var k,i=!1;f.mousedown(function(b){$(document).bind("mouseup."+c.getName(),function(a){k&&clearInterval(k),k=null,i=!1,$(document).unbind("mouseup."+c.getName())}),i!==!0&&(!c.isEnabled()||c.isOnce()&&c.isSelected()||(k=setInterval(function(){c.doClick()},100),i=!0,a(b)))});break;default:(d.stopEvent||d.stopPropagation)&&(f.mousedown(function(b){a(b)}),f.mouseup(function(b){a(b)})),f.click(b)}});var h=BI.debounce(this._doClick,BI.EVENT_RESPONSE_TIME,!0)}},_trigger:function(){var a=this.options;if(this.isEnabled()&&(this.isDisableSelected()||(this.isForceSelected()?this.setSelected(!0):this.isForceNotSelected()?this.setSelected(!1):this.setSelected(!this.isSelected())),this.isValid())){a.handler.call(this,this.getValue(),this);var b=this.getValue();this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,b,this),this.fireEvent(BI.BasicButton.EVENT_CHANGE,b,this)}},_doClick:function(a){this.isValid()&&this.beforeClick(a),this._trigger(),this.isValid()&&this.doClick(a)},beforeClick:function(){},doClick:function(){},handle:function(){return this},hover:function(){this._hover=!0,this.handle().element.addClass("hover"),this.options.shadow&&this.$mask&&this.$mask.setVisible(!0)},dishover:function(){this._hover=!1,this.handle().element.removeClass("hover"),this.options.shadow&&this.$mask&&this.$mask.setVisible(!1)},setSelected:function(a){var b=this.options;b.selected=a,a?this.handle().element.addClass("active"):this.handle().element.removeClass("active"),b.shadow&&!b.isShadowShowingOnSelected&&this.$mask&&this.$mask.setVisible(!1)},isSelected:function(){return this.options.selected},isOnce:function(){return this.options.once},isForceSelected:function(){return this.options.forceSelected},isForceNotSelected:function(){return this.options.forceNotSelected},isDisableSelected:function(){return this.options.disableSelected},setText:function(a){this.options.text=a},getText:function(){return this.options.text},_setEnable:function(a){BI.BasicButton.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled"),a||this.options.shadow&&this.$mask&&this.$mask.setVisible(!1)},empty:function(){$(document).unbind("mouseup."+this.getName()),BI.BasicButton.superclass.empty.apply(this,arguments)},destroy:function(){BI.BasicButton.superclass.destroy.apply(this,arguments)}}),BI.BasicButton.EVENT_CHANGE="BasicButton.EVENT_CHANGE",BI.NodeButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.NodeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-node",open:!1})},_init:function(){BI.NodeButton.superclass._init.apply(this,arguments);var a=this;BI.nextTick(function(){a.setOpened(a.isOpened())})},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.setOpened(!this.isOpened())},isOnce:function(){return!1},isOpened:function(){return!!this.options.open},setOpened:function(a){this.options.open=!!a},triggerCollapse:function(){this.isOpened()&&(this.setOpened(!1),this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,this.getValue(),this))},triggerExpand:function(){this.isOpened()||(this.setOpened(!0),this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,this.getValue(),this))}}),BI.Tip=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Link.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-tip",zIndex:BI.zIndex_tip})},_init:function(){BI.Tip.superclass._init.apply(this,arguments),this.element.css({zIndex:this.options.zIndex})}}),BI.ButtonGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ButtonGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-button-group",behaviors:{},items:[],chooseType:BI.Selection.Single,layouts:[{type:"bi.center",hgap:0,vgap:0}]})},_init:function(){BI.ButtonGroup.superclass._init.apply(this,arguments);var a={};BI.each(this.options.behaviors,function(b,c){a[b]=BI.BehaviorFactory.createBehavior(b,{rule:c})}),this.behaviors=a,this.populate(this.options.items)},_createBtns:function(a){this.options;return BI.createWidgets(BI.createItems(a,{type:"bi.text_button"}))},_btnsCreator:function(a){var b=this,c=Array.prototype.slice.call(arguments),d=this.options,e=this._createBtns(a);return c[0]=e,BI.each(this.behaviors,function(a,b){b.doBehavior.apply(b,c)}),BI.each(e,function(a,c){c.on(BI.Controller.EVENT_CHANGE,function(a,e,f){if(a===BI.Events.CLICK){switch(d.chooseType){case BI.ButtonGroup.CHOOSE_TYPE_SINGLE:b.setValue(c.getValue());break;case BI.ButtonGroup.CHOOSE_TYPE_NONE:b.setValue([])}b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b.fireEvent(BI.ButtonGroup.EVENT_CHANGE,e,f)}else b.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),c.on(BI.Events.DESTROY,function(){BI.remove(b.buttons,c)})}),e},_packageBtns:function(a){for(var b=this.options,c=b.layouts.length-1;c>0;c--)a=BI.map(a,function(a,d){return BI.extend({},b.layouts[c],{items:[BI.extend({},b.layouts[c].el,{el:d})]})});return a},_packageSimpleItems:function(a){var b=this.options;return BI.map(b.items,function(b,c){return BI.stripEL(c)===c?a[b]:BI.extend({},c,{el:a[b]})})},_packageItems:function(a,b){return BI.createItems(BI.makeArrayByArray(a,{}),BI.clone(b))},_packageLayout:function(a){for(var b=this.options,c=BI.deepClone(b.layouts[0]),d=BI.formatEL(c).el;d&&d.items&&!BI.isEmpty(d.items);)d=BI.formatEL(d.items[0]).el;return d.items=a,c},_isSimpleLayout:function(){var a=this.options;return 1===a.layouts.length&&!BI.isArray(a.items[0])},doBehavior:function(){var a=Array.prototype.slice.call(arguments);a.unshift(this.buttons),BI.each(this.behaviors,function(b,c){c.doBehavior.apply(c,a)})},prependItems:function(a){var b=(this.options,this._btnsCreator.apply(this,arguments));return this.buttons=BI.concat(b,this.buttons),this._isSimpleLayout()&&this.layouts&&this.layouts.prependItems?void this.layouts.prependItems(b):(a=this._packageItems(a,this._packageBtns(b)),void this.layouts.prependItems(this._packageLayout(a).items))},addItems:function(a){var b=(this.options,this._btnsCreator.apply(this,arguments));return this.buttons=BI.concat(this.buttons,b),this._isSimpleLayout()&&this.layouts&&this.layouts.addItems?void this.layouts.addItems(b):(a=this._packageItems(a,this._packageBtns(b)),void this.layouts.addItems(this._packageLayout(a).items))},removeItemAt:function(a){BI.removeAt(this.buttons,a),this.layouts.removeItemAt(a)},removeItems:function(a){a=BI.isArray(a)?a:[a];var b=[];BI.each(this.buttons,function(c,d){BI.deepContains(a,d.getValue())&&b.push(c)}),BI.removeAt(this.buttons,b),this.layouts.removeItemAt(b)},populate:function(a){a=a||[],this.empty(),this.options.items=a,this.buttons=this._btnsCreator.apply(this,arguments),a=this._isSimpleLayout()?this._packageSimpleItems(this.buttons):this._packageItems(a,this._packageBtns(this.buttons)),this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(a)))},setNotSelectedValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setSelected&&c.setSelected(!1):c.setSelected&&c.setSelected(!0)})},setEnabledValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setEnable(!0):c.setEnable(!1)})},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setSelected&&c.setSelected(!0):c.setSelected&&c.setSelected(!1)})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttons,function(b,c){!c.isEnabled()||c.isSelected&&c.isSelected()||a.push(c.getValue())}),a},getValue:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue())}),a},getAllButtons:function(){return this.buttons},getAllLeaves:function(){return this.buttons},getSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isSelected&&c.isSelected()&&a.push(c)}),a},getNotSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isSelected&&!c.isSelected()&&a.push(c)}),a},getIndexByValue:function(a){var b=-1;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.getValue()===a)return b=c,!0}),b},getNodeById:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.options.id===a)return b=d,!0}),b},getNodeByValue:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.getValue()===a)return b=d,!0}),b},empty:function(){BI.ButtonGroup.superclass.empty.apply(this,arguments),this.options.items=[]},destroy:function(){BI.ButtonGroup.superclass.destroy.apply(this,arguments),this.options.items=[]}}),BI.extend(BI.ButtonGroup,{CHOOSE_TYPE_SINGLE:BI.Selection.Single,CHOOSE_TYPE_MULTI:BI.Selection.Multi,CHOOSE_TYPE_ALL:BI.Selection.All,CHOOSE_TYPE_NONE:BI.Selection.None,CHOOSE_TYPE_DEFAULT:BI.Selection.Default}),BI.ButtonGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.button_group",BI.ButtonGroup),BI.ButtonTree=BI.inherit(BI.ButtonGroup,{_defaultConfig:function(){return BI.extend(BI.ButtonTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-button-tree"})},_init:function(){BI.ButtonTree.superclass._init.apply(this,arguments)},setNotSelectedValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(BI.deepContains(a,c.getValue())?c.setSelected(!1):c.setSelected(!0)):void c.setNotSelectedValue(a)})},setEnabledValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setEnabledValue)?void c.setEnabledValue(a):void(BI.deepContains(a,c.getValue())?c.setEnable(!0):c.setEnable(!1))})},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(BI.deepContains(a,c.getValue())?c.setSelected(!0):c.setSelected(!1)):void c.setValue(a)})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=BI.concat(a,c.getNotSelectedValue())):void(c.isEnabled()&&c.isSelected&&!c.isSelected()&&a.push(c.getValue()))}),a},getValue:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=BI.concat(a,c.getValue())):void(c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue()))}),a},getSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getSelectedButtons())):void(c.isSelected&&c.isSelected()&&a.push(c))}),a},getNotSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getNotSelectedButtons())):void(c.isSelected&&!c.isSelected()&&a.push(c))}),a},getAllLeaves:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getAllLeaves())):void(c.isEnabled()&&a.push(c))}),a},getIndexByValue:function(a){var b=-1;return BI.any(this.buttons,function(c,d){var e=d.getValue();if(d.isEnabled()&&(e===a||BI.contains(e,a)))return b=c,!0}),b},getNodeById:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()){if(d.attr("id")===a)return b=d,!0;if(BI.isFunction(d.getNodeById)&&(b=d.getNodeById(a)))return!0}}),b},getNodeByValue:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled())if(BI.isFunction(d.getNodeByValue)){if(b=d.getNodeByValue(a))return!0}else if(d.attr("value")===a)return b=d,!0}),b}}),BI.ButtonTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.button_tree",BI.ButtonTree),BI.TreeView=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TreeView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree",paras:{},itemsCreator:BI.emptyFn})},_init:function(){BI.TreeView.superclass._init.apply(this,arguments),this._stop=!1,this._createTree(),this.tip=BI.createWidget({type:"bi.loading_bar",invisible:!0,handler:BI.bind(this._loadMore,this)}),BI.createWidget({type:"bi.vertical",scrollable:!0,scrolly:!1,element:this,items:[this.tip]})},_createTree:function(){this.id="bi-tree"+BI.UUID(),this.nodes&&this.nodes.destroy(),this.tree&&this.tree.destroy(),this.tree=BI.createWidget({type:"bi.layout",element:"
    "}),BI.createWidget({type:"bi.default",element:this.element,items:[this.tree]})},_selectTreeNode:function(a,b){this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,b,this),this.fireEvent(BI.TreeView.EVENT_CHANGE,b,this)},_configSetting:function(){function a(a,b,c){l.nodes.checkNode(c,!c.checked,!0,!0)}function b(a,b){var c=l._getParentValues(b);b.times=b.times||1;var d="id="+b.id+"×="+b.times++ +"&parentValues= "+window.encodeURIComponent(BI.jsonEncode(c))+"&checkState="+window.encodeURIComponent(BI.jsonEncode(b.getCheckStatus()));return BI.servletURL+"?op="+l.options.op+"&cmd="+l.options.cmd+"&"+d}function c(a,b){return b.isAjaxing?(BI.Msg.toast("Please Wait。","warning"),!1):(b.children||(b.times=1,f(b,"refresh")),!0)}function d(a,b,c,d){if(c.halfCheck=!1,d&&0!==d.length&&!/^[\s,\S]*<\/html>$/gi.test(d)&&!l._stop){var e=l.nodes,g=c.count||0;c.children.length>g?(c.count=c.children.length,BI.delay(function(){f(c)},n)):(e.updateNode(c),e.selectNode(c.children[0]))}}function e(a,b,c,d,e,f){l.nodes;BI.Msg.toast("Error!","warning")}function f(a,b){var c=l.nodes;"refresh"==b&&c.updateNode(a),c.reAsyncChildNodes(a,b,!0)}function g(a,b){function c(a){BI.each(a,function(a,b){b.halfCheck===!0&&(b.halfCheck=!1,c(b.children))})}if(b.halfCheck=!1,b.checked===!0){c(b.children);var d=l.nodes,e=d.getSelectedNodes();$.each(e,function(a,b){b.halfCheck=!1})}}function h(a,b,c){l._selectTreeNode(b,c)}function i(a,b,c){c.halfCheck=!1}function j(a,b,c){}var k=this.options.paras,l=this,m={async:{enable:!0,url:b,autoParam:["id","name"],otherParam:BI.cjkEncodeDO(k)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeExpand:c,onAsyncSuccess:d,onAsyncError:e,beforeCheck:g,onCheck:h,onExpand:i,onCollapse:j,onClick:a}},n=100;return m},_getParentValues:function(a){if(!a.getParentNode())return[];var b=a.getParentNode(),c=this._getParentValues(b);return c=c.concat([this._getNodeValue(b)])},_getNodeValue:function(a){return null==a.value?a.text.replace(/<[^>]+>/g,"").replaceAll(" "," "):a.value},_getHalfSelectedValues:function(a,b){var c=this,d=b.getCheckStatus();if(d.checked!==!1||d.half!==!1){if(BI.isNotEmptyArray(b.children)&&d.half===!0){var e=b.children;return void BI.each(e,function(b,d){c._getHalfSelectedValues(a,d)})}var f=b.parentValues||c._getParentValues(b),g=f.concat(this._getNodeValue(b));if(BI.isNotEmptyArray(b.children)||d.half===!1)return void this._buildTree(a,g);var h=BI.deepClone(this.options.paras.selectedValues),i=this._getTree(h,g);this._addTreeNode(a,f,this._getNodeValue(b),i)}},_getTree:function(a,b){var c=a;return BI.any(b,function(a,b){return null==c[b]||void(c=c[b])}),c},_addTreeNode:function(a,b,c,d){var e=a;BI.each(b,function(a,b){null==e[b]&&(e[b]={}),e=e[b]}),e[c]=d},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){null==c[b]&&(c[b]={}),c=c[b]})},_getSelectedValues:function(){function a(a){BI.each(a,function(a,d){var e=d.getCheckStatus();if(e.checked===!0||e.half===!0)if(e.half===!0)b._getHalfSelectedValues(c,d);else{var f=d.parentValues||b._getParentValues(d),g=f.concat([b._getNodeValue(d)]);b._buildTree(c,g)}})}var b=this,c={},d=this.nodes.getNodes();return a(d),c},_dealWidthNodes:function(a){var b=this.options,c=BI.Tree.arrayFormat(a);return BI.each(c,function(a,c){c.title=c.title||c.text||c.value,BI.isKey(b.paras.keyword)?c.text=$("
    ").__textKeywordMarked__(c.text,b.paras.keyword,c.py).html():c.text=(c.text+"").replaceAll(" "," ")}),a},_loadMore:function(){var a=this,b=this.options;this.tip.setLoading();var c=BI.extend({},b.paras,{times:++this.times});b.itemsCreator(c,function(b){if(a._stop!==!0){var c=!!b.hasNext,d=b.items||[];c?a.tip.setLoaded():a.tip.setEnd(),d.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(d))}})},_initTree:function(a){var b=this,c=this.options;b.fireEvent(BI.Events.INIT),this.times=1;var d=this.tree;d.empty(),this.loading(),this.tip.setVisible(!1);var e=function(c){b._stop!==!0&&(b.nodes=$.fn.zTree.init(d.element,a,c))},f=BI.extend({},c.paras,{times:1});c.itemsCreator(f,function(a){if(b._stop!==!0){var c=!!a.hasNext,d=a.items||[];d.length>0&&e(b._dealWidthNodes(d)),b.setTipVisible(d.length<=0),b.loaded(),c?b.tip.setLoaded():b.tip.invisible(),1===f.times&&b.fireEvent(BI.Events.AFTERINIT)}})},initTree:function(a,b){var b=b||{async:{enable:!1},check:{enable:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1, -expandSpeed:"",nameIsHTML:!0},callback:{}};this.nodes=$.fn.zTree.init(this.tree.element,b,a)},start:function(){this._stop=!1},stop:function(){this._stop=!0},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._createTree(),this.start(),this._initTree(b)},populate:function(){this.stroke.apply(this,arguments)},hasChecked:function(){var a=this.nodes;return a.getCheckedNodes(!0).length>0},checkAll:function(a){function b(a){BI.each(a,function(a,c){c.halfCheck=!1,b(c.children)})}BI.each(this.nodes.getNodes(),function(a,c){c.halfCheck=!1,b(c.children)}),this.nodes&&this.nodes.checkAllNodes(a)},expandAll:function(a){this.nodes&&this.nodes.expandAll(a)},setValue:function(a,b){this.checkAll(!1),this.updateValue(a,b),this.refresh()},setSelectedValue:function(a){this.options.paras.selectedValues=BI.deepClone(a||{})},updateValue:function(a,b){if(this.nodes){b||(b="value");var c=this.nodes;BI.each(a,function(a,d){var e=c.getNodesByParam(b,a,null);BI.each(e,function(a,b){BI.extend(b,{checked:!0},d),c.updateNode(b)})})}},refresh:function(){this.nodes&&this.nodes.refresh()},getValue:function(){return this.nodes?this._getSelectedValues():null},destroyed:function(){this.stop(),this.nodes&&this.nodes.destroy()}}),BI.extend(BI.TreeView,{REQ_TYPE_INIT_DATA:1,REQ_TYPE_ADJUST_DATA:2,REQ_TYPE_SELECT_DATA:3,REQ_TYPE_GET_SELECTED_DATA:4}),BI.TreeView.EVENT_CHANGE="EVENT_CHANGE",BI.TreeView.EVENT_INIT=BI.Events.INIT,BI.TreeView.EVENT_AFTERINIT=BI.Events.AFTERINIT,BI.shortcut("bi.tree_view",BI.TreeView),BI.AsyncTree=BI.inherit(BI.TreeView,{_defaultConfig:function(){return BI.extend(BI.AsyncTree.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.AsyncTree.superclass._init.apply(this,arguments)},_configSetting:function(){function a(a,b,c){var d=$.fn.zTree.getZTreeObj(b);d.checkNode(c,!c.checked,!0,!0)}function b(a,b){function c(a){BI.each(a,function(a,b){b.halfCheck===!0&&(b.halfCheck=!1,c(b.children))})}if(b.halfCheck=!1,b.checked===!0){c(b.children);var d=$.fn.zTree.getZTreeObj(a),e=d.getSelectedNodes();BI.each(e,function(a,b){b.halfCheck=!1})}}function c(a,b){h._beforeExpandNode(a,b)}function d(a,b,c){h._selectTreeNode(b,c)}function e(a,b,c){c.halfCheck=!1}function f(a,b,c){c.halfCheck=!1}var g=this.options.paras,h=this,i={async:{enable:!1,otherParam:BI.cjkEncodeDO(g)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeCheck:b,onCheck:d,beforeExpand:c,onExpand:e,onCollapse:f,onClick:a}};return i},_selectTreeNode:function(a,b){var c=this,d=(this.options,BI.deepClone(b.parentValues||c._getParentValues(b))),e=this._getNodeValue(b);if(b.checked===!0);else{var f=b,g=this._getTree(this.options.paras.selectedValues,d);for(BI.isNotNull(g[e])&&delete g[e];null!=f&&BI.isEmpty(g);)d=d.slice(0,d.length-1),f=f.getParentNode(),null!=f&&(g=this._getTree(this.options.paras.selectedValues,d),e=this._getNodeValue(f),delete g[e])}BI.AsyncTree.superclass._selectTreeNode.apply(c,arguments)},_beforeExpandNode:function(a,b){function c(a,c){d.nodes.addNodes(b,a),c===!0&&BI.delay(function(){i++,g.times=i,e.itemsCreator(g,h)},100)}var d=this,e=this.options,f=b.parentValues||d._getParentValues(b),g=BI.extend({},e.paras,{id:b.id,times:1,parentValues:f.concat(this._getNodeValue(b)),checkState:b.getCheckStatus()}),h=function(a){var b=a.items||[];b.length>0&&c(d._dealWidthNodes(b),!!a.hasNext)},i=1;b.children||e.itemsCreator(g,h)},_join:function(a,b){function c(a,b,f){BI.each(b,function(g,h){BI.isNull(f[g])?d._addTreeNode(e,a,g,h):BI.isEmpty(f[g])?d._addTreeNode(e,a,g,{}):c(a.concat([g]),b[g],f[g])})}var d=this,e={};return c([],a,b),c([],b,a),e},hasChecked:function(){return!BI.isEmpty(this.options.paras.selectedValues)||BI.AsyncTree.superclass.hasChecked.apply(this,arguments)},getValue:function(){if(!this.nodes)return{};var a=this._getSelectedValues();return BI.isEmpty(a)?BI.deepClone(this.options.paras.selectedValues):BI.isEmpty(this.options.paras.selectedValues)?a:this._join(a,this.options.paras.selectedValues)},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._initTree(b)}}),BI.shortcut("bi.async_tree",BI.AsyncTree),BI.PartTree=BI.inherit(BI.AsyncTree,{_defaultConfig:function(){return BI.extend(BI.PartTree.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.PartTree.superclass._init.apply(this,arguments)},_loadMore:function(){var a=this,b=this.options,c=BI.extend({},b.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:++this.times});this.tip.setLoading(),b.itemsCreator(c,function(c){var d=!!c.hasNext,e=c.items||[];b.paras.lastSearchValue=c.lastSearchValue,a._stop!==!0&&(d?a.tip.setLoaded():a.tip.setEnd(),e.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(e)))})},_selectTreeNode:function(a,b){var c=this,d=this.options,e=BI.deepClone(b.parentValues||c._getParentValues(b)),f=this._getNodeValue(b);if(b.checked===!0)BI.AsyncTree.superclass._selectTreeNode.apply(c,arguments);else{for(var g=this.options.paras.selectedValues,h=e.concat(f),i=0,j=h.length;i0&&c(d._dealWidthNodes(g)),d.setTipVisible(g.length<=0),d.loaded(),f?d.tip.setLoaded():d.tip.invisible(),d.fireEvent(BI.Events.AFTERINIT)}};BI.delay(function(){e.itemsCreator(g,h)},100)},getValue:function(){var a=this.options,b=BI.PartTree.superclass.getValue.apply(this,arguments);return a.itemsCreator({type:BI.TreeView.REQ_TYPE_ADJUST_DATA,selectedValues:b},function(a){b=a}),b},stroke:function(a){var b=this.options;delete b.paras.keyword,BI.extend(b.paras,a),delete b.paras.lastSearchValue;var c=this._configSetting();this._initTree(c,b.paras.keyword)}}),BI.shortcut("bi.part_tree",BI.PartTree),BI.Resizers=new BI.ResizeController,BI.Layers=new BI.LayerController,BI.Maskers=new BI.MaskersController,BI.Bubbles=new BI.BubblesController,BI.Tooltips=new BI.TooltipsController,BI.Popovers=new BI.FloatBoxController,BI.Broadcasts=new BI.BroadcastController,BI.StyleLoaders=new BI.StyleLoaderManager,BI.Canvas=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Canvas.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-canvas"})},_init:function(){BI.Canvas.superclass._init.apply(this,arguments);var a=this.options,b=document.createElement("canvas");document.createElement("canvas").getContext||(b=window.G_vmlCanvasManager.initElement(b)),this.element.append(b),b.width=a.width,b.height=a.height,$(b).width("100%"),$(b).height("100%"),this.canvas=b,this._queue=[]},_getContext:function(){return this.ctx||(this.ctx=this.canvas.getContext("2d")),this.ctx},_attr:function(a,b){var c=this;if(!BI.isNull(a))return BI.isObject(a)?void BI.each(a,function(a,b){c._queue.push({k:a,v:b})}):void this._queue.push({k:a,v:b})},_line:function(a,b){var c=this,d=[].slice.call(arguments,2);BI.isOdd(d.length)&&(this._attr(BI.last(d)),d=BI.initial(d)),this._attr("moveTo",[a,b]);var e=BI.filter(d,function(a){return a%2===0}),f=BI.filter(d,function(a){return a%2!==0});d=BI.zip(e,f),BI.each(d,function(a,b){c._attr("lineTo",b)})},line:function(a,b,c,d){this._line.apply(this,arguments),this._attr("stroke",[])},rect:function(a,b,c,d,e){this._attr("fillStyle",e),this._attr("fillRect",[a,b,c,d])},circle:function(a,b,c,d){this._attr({fillStyle:d,beginPath:[],arc:[a,b,c,0,2*Math.PI,!0],closePath:[],fill:[]})},hollow:function(){this._attr("beginPath",[]),this._line.apply(this,arguments),this._attr("closePath",[]),this._attr("stroke",[])},solid:function(){this.hollow.apply(this,arguments),this._attr("fill",[])},gradient:function(a,b,c,d,e,f){var g=this._getContext().createLinearGradient(a,b,c,d);return g.addColorStop(0,e),g.addColorStop(1,f),g},reset:function(){this._getContext().clearRect(0,0,this.canvas.width,this.canvas.height)},stroke:function(a){var b=this;BI.nextTick(function(){var c=b._getContext();BI.each(b._queue,function(a,b){BI.isFunction(c[b.k])?c[b.k].apply(c,b.v):c[b.k]=b.v}),b._queue=[],a&&a()})}}),BI.shortcut("bi.canvas",BI.Canvas),BI.CollectionView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CollectionView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-collection",overflowX:!0,overflowY:!0,cellSizeAndPositionGetter:BI.emptyFn,horizontalOverscanSize:0,verticalOverscanSize:0,scrollLeft:0,scrollTop:0,items:[]})},_init:function(){BI.CollectionView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1,this._debounceRelease=BI.debounce(function(){a._scrollLock=!1},1e3/60),this.container=BI.createWidget({type:"bi.absolute"}),this.element.scroll(function(){a._scrollLock!==!0&&(b.scrollLeft=a.element.scrollLeft(),b.scrollTop=a.element.scrollTop(),a._calculateChildrenToRender(),a.fireEvent(BI.CollectionView.EVENT_SCROLL,{scrollLeft:b.scrollLeft,scrollTop:b.scrollTop}))}),BI.createWidget({type:"bi.vertical",element:this,scrollable:b.overflowX===!0&&b.overflowY===!0,scrolly:b.overflowX===!1&&b.overflowY===!0,scrollx:b.overflowX===!0&&b.overflowY===!1,items:[this.container]}),b.items.length>0&&(this._calculateSizeAndPositionData(),this._populate()),0===b.scrollLeft&&0===b.scrollTop||BI.nextTick(function(){a.element.scrollTop(b.scrollTop),a.element.scrollLeft(b.scrollLeft)})},_calculateSizeAndPositionData:function(){for(var a=this.options,b=[],c=new BI.SectionManager,d=0,e=0,f=0,g=a.items.length;f0&&h>0){if(f>=this.renderRange.minY&&h<=this.renderRange.maxY&&e>=this.renderRange.minX&&g<=this.renderRange.maxX)return;for(var i=this._cellRenderers(h-f,g-e,e,f),j=[],k=[],l={},m={},n={},o=0,p=i.length;o-1?(q.width!==this.renderedCells[A]._width&&(this.renderedCells[A]._width=q.width,this.renderedCells[A].el.setWidth(q.width)),q.height!==this.renderedCells[A]._height&&(this.renderedCells[A]._height=q.height,this.renderedCells[A].el.setHeight(q.height)),this.renderedCells[A]._left!==q.x&&this.renderedCells[A].el.element.css("left",q.x+"px"),this.renderedCells[A]._top!==q.y&&this.renderedCells[A].el.element.css("top",q.y+"px"),j.push(z=this.renderedCells[A])):(z=BI.createWidget(BI.extend({type:"bi.label",width:q.width,height:q.height},b.items[q.index],{cls:(b.items[q.index].cls||"")+" container-cell"+(0===q.y?" first-row":"")+(0===q.x?" first-col":""),_left:q.x,_top:q.y})),j.push({el:z,left:q.x,top:q.y,_left:q.x,_top:q.y,_width:q.width,_height:q.height}));for(var B=0|s[q.y],C=0|s[q.y+q.height],D=B;D<=C;D++){var E=n[D];x(t,E),y(u,E),t[E]=Math.min(t[E],q.x),u[E]=Math.max(u[E],q.x+q.width)}for(var F=0|r[q.x],G=0|r[q.x+q.width],D=F;D<=G;D++){var H=m[D];x(v,H),y(w,H),v[H]=Math.min(v[H],q.y),w[H]=Math.max(w[H],q.y+q.height)}k.push(q.index),l[o]=z}var I={},J={},K=[];BI.each(k,function(b,c){BI.deepContains(a.renderedKeys,c)?I[b]=c:J[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(I,b)||BI.deepContains(J,b)||K.push(a)}),BI.each(K,function(b,c){a.renderedCells[c].el._destroy()});var L=[];BI.each(J,function(a){L.push(j[a])}),this.container.addItems(L),this.container._children=l,this.container.attr("items",j),this.renderedCells=j,this.renderedKeys=k;var M=BI.min(t),N=BI.max(u),O=BI.max(v),P=BI.min(w);this.renderRange={minX:M,minY:O,maxX:N,maxY:P}}},_getMaxScrollLeft:function(){return Math.max(0,this._width-this.options.width+(this.options.overflowX?BI.DOM.getScrollWidth():0))},_getMaxScrollTop:function(){return Math.max(0,this._height-this.options.height+(this.options.overflowY?BI.DOM.getScrollWidth():0))},_populate:function(a){var b=this.options;this._reRange(),a&&a!==this.options.items&&(this.options.items=a,this._calculateSizeAndPositionData()),b.items.length>0&&(this.container.setWidth(this._width),this.container.setHeight(this._height),this._calculateChildrenToRender(),this.element.scrollTop(b.scrollTop),this.element.scrollLeft(b.scrollLeft))},setScrollLeft:function(a){this.options.scrollLeft!==a&&(this._scrollLock=!0,this.options.scrollLeft=BI.clamp(a||0,0,this._getMaxScrollLeft()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollLeft(this.options.scrollLeft))},setScrollTop:function(a){this.options.scrollTop!==a&&(this._scrollLock=!0,this.options.scrollTop=BI.clamp(a||0,0,this._getMaxScrollTop()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollTop(this.options.scrollTop))},setOverflowX:function(a){var b=this;this.options.overflowX!==!!a&&(this.options.overflowX=!!a,BI.nextTick(function(){b.element.css({overflowX:a?"auto":"hidden"})}))},setOverflowY:function(a){var b=this;this.options.overflowY!==!!a&&(this.options.overflowY=!!a,BI.nextTick(function(){b.element.css({overflowY:a?"auto":"hidden"})}))},getScrollLeft:function(){return this.options.scrollLeft},getScrollTop:function(){return this.options.scrollTop},getMaxScrollLeft:function(){return this._getMaxScrollLeft()},getMaxScrollTop:function(){return this._getMaxScrollTop()},_reRange:function(){this.renderRange={}},_clearChildren:function(){this.container._children={},this.container.attr("items",[])},restore:function(){BI.each(this.renderedCells,function(a,b){b.el._destroy()}),this._clearChildren(),this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1},populate:function(a){a&&a!==this.options.items&&this.restore(),this._populate(a)}}),BI.CollectionView.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.collection_view",BI.CollectionView),BI.Combo=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Combo.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-combo",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!1,destroyWhenHide:!1,isNeedAdjustHeight:!0,isNeedAdjustWidth:!0,stopEvent:!1,stopPropagation:!1,adjustLength:0,adjustXOffset:0,adjustYOffset:0,hideChecker:BI.emptyFn,offsetStyle:"left",el:{},popup:{},comboClass:"bi-combo-popup",hoverClass:"bi-combo-hover"})},_init:function(){BI.Combo.superclass._init.apply(this,arguments);var a=this,b=this.options;this._initCombo(),this._initPullDownAction(),this.combo.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Combo.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Combo.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE,d))}),a.element.on("mouseenter."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&a.element.addClass(b.hoverClass)}),a.element.on("mouseleave."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.combo}]}),b.isDefaultInit&&this._assertPopupView(),BI.Resizers.add(this.getName(),BI.bind(function(){this.isViewVisible()&&this._hideView()},this))},_toggle:function(){this._assertPopupViewRender(),this.popupView.isVisible()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(","),d=function(a){b.stopEvent&&a.stopEvent(),b.stopPropagation&&a.stopPropagation()};BI.each(c,function(c,e){switch(e){case"hover":a.element.on("mouseenter."+a.getName(),function(b){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.combo),a.fireEvent(BI.Combo.EVENT_EXPAND))}),a.element.on("mouseleave."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&b.toggle===!0&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.combo),a.fireEvent(BI.Combo.EVENT_COLLAPSE))});break;case"click":var f=BI.debounce(function(c){a.combo.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&(b.toggle?a._toggle():a._popupView(),a.isViewVisible()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.combo),a.fireEvent(BI.Combo.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.combo),a.fireEvent(BI.Combo.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,!0);a.element.off(e+"."+a.getName()).on(e+"."+a.getName(),function(a){f(a),d(a)})}})},_initCombo:function(){this.combo=BI.createWidget(this.options.el)},_assertPopupView:function(){var a=this;null==this.popupView&&(this.popupView=BI.createWidget(this.options.popup,{type:"bi.popup_view"}),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a.combo.setValue(a.getValue()),a.fireEvent(BI.Combo.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popupView.setVisible(!1),BI.nextTick(function(){a.fireEvent(BI.Combo.EVENT_AFTER_INIT)}))},_assertPopupViewRender:function(){this._assertPopupView(),this._rendered||(BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._rendered=!0)},_hideIf:function(a){if(!(this.element.find(a.target).length>0)){var b=this.options.hideChecker.apply(this,[a]);b!==!1&&this._hideView()}},_hideView:function(){this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW),this.options.destroyWhenHide===!0?(this.popupView&&this.popupView.destroy(),this.popupView=null,this._rendered=!1):this.popupView&&this.popupView.invisible(),this.element.removeClass(this.options.comboClass),$(document).unbind("mousedown."+this.getName()).unbind("mousewheel."+this.getName()),this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW)},_popupView:function(){this._assertPopupViewRender(),this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW),this.popupView.visible(),this.adjustWidth(),this.adjustHeight(),this.element.addClass(this.options.comboClass),$(document).bind("mousedown."+this.getName(),BI.bind(this._hideIf,this)).bind("mousewheel."+this.getName(),BI.bind(this._hideIf,this)),this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW)},adjustWidth:function(){var a=this.options;if(this.popupView&&a.isNeedAdjustWidth===!0){this.resetListWidth("");var b=this.popupView.element.outerWidth(),c=this.element.outerWidth()||a.width;b>c+80?c+=80:b>c&&(c=b),this.resetListWidth(c<100?100:c)}},adjustHeight:function(){var a=this.options,b={};if(this.popupView){var c=this.popupView.isVisible();switch(this.popupView.visible(),a.direction){case"bottom":case"bottom,right":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight,["bottom","top","right","left"],a.offsetStyle);break;case"top":case"top,right":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight,["top","bottom","right","left"],a.offsetStyle);break;case"left":case"left,bottom":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength,a.adjustYOffset,a.isNeedAdjustHeight,["left","right","bottom","top"],a.offsetStyle);break;case"right":case"right,bottom":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength,a.adjustYOffset,a.isNeedAdjustHeight,["right","left","bottom","top"],a.offsetStyle);break;case"top,left":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight,["top","bottom","left","right"],a.offsetStyle);break;case"bottom,left":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight,["bottom","top","left","right"],a.offsetStyle);break;case"left,top":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength,a.adjustYOffset,a.isNeedAdjustHeight,["left","right","top","bottom"],a.offsetStyle);break;case"right,top":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength,a.adjustYOffset,a.isNeedAdjustHeight,["right","left","top","bottom"],a.offsetStyle);break;case"top,custom":case"custom,top":b=$.getTopAdaptPosition(this.combo,this.popupView,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight);break;case"custom,bottom":case"bottom,custom":b=$.getBottomAdaptPosition(this.combo,this.popupView,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight);break;case"left,custom":case"custom,left":b=$.getLeftAdaptPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength),delete b.top,delete b.adaptHeight;break;case"custom,right":case"right,custom":b=$.getRightAdaptPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength),delete b.top,delete b.adaptHeight}"adaptHeight"in b&&this.resetListHeight(b.adaptHeight),"left"in b&&this.popupView.element.css({left:b.left}),"top"in b&&this.popupView.element.css({top:b.top}),this.position=b,this.popupView.setVisible(c)}},resetListHeight:function(a){this._assertPopupView(),this.popupView.resetHeight&&this.popupView.resetHeight(a)},resetListWidth:function(a){this._assertPopupView(),this.popupView.resetWidth&&this.popupView.resetWidth(a)},populate:function(a){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.combo.populate.apply(this.combo,arguments)},_setEnable:function(a){BI.Combo.superclass._setEnable.apply(this,arguments),!a&&this.element.removeClass(this.options.hoverClass),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this._assertPopupView(),this.combo.setValue(a),this.popupView&&this.popupView.setValue(a)},getValue:function(){return this._assertPopupView(),this.popupView&&this.popupView.getValue()},isViewVisible:function(){return this.isEnabled()&&this.combo.isEnabled()&&!!this.popupView&&this.popupView.isVisible()},showView:function(){this.isEnabled()&&this.combo.isEnabled()&&this._popupView()},hideView:function(){this._hideView()},getView:function(){return this.popupView},getPopupPosition:function(){return this.position},toggle:function(){this._toggle()},destroy:function(){$(document).unbind("mousedown."+this.getName()).unbind("mousewheel."+this.getName()).unbind("mouseenter."+this.getName()).unbind("mousemove."+this.getName()).unbind("mouseleave."+this.getName()),BI.Resizers.remove(this.getName()),BI.Combo.superclass.destroy.apply(this,arguments)}}),BI.Combo.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.Combo.EVENT_CHANGE="EVENT_CHANGE",BI.Combo.EVENT_EXPAND="EVENT_EXPAND",BI.Combo.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.Combo.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.Combo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.Combo.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.Combo.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.Combo.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.combo",BI.Combo),BI.Expander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Expander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-expander",trigger:"click",toggle:!0,isDefaultInit:!1,el:{},popup:{},expanderClass:"bi-expander-popup",hoverClass:"bi-expander-hover"})},_init:function(){BI.Expander.superclass._init.apply(this,arguments);var a=this,b=this.options;this._expanded=!!b.el.open,this._initExpander(),this._initPullDownAction(),this.expander.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Expander.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Expander.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE,c,d))}),this.element.hover(function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&a.element.addClass(b.hoverClass)},function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.expander}]}),b.isDefaultInit&&this._assertPopupView(),this.expander.isOpened()===!0&&this._popupView()},_toggle:function(){this._assertPopupViewRender(),this.popupView.isVisible()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(",");BI.each(c,function(c,d){switch(d){case"hover":a.element[d](function(b){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.expander),a.fireEvent(BI.Expander.EVENT_EXPAND))},function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&b.toggle&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.expander),a.fireEvent(BI.Expander.EVENT_COLLAPSE))});break;default:d&&a.element.off(d+"."+a.getName()).on(d+"."+a.getName(),BI.debounce(function(c){a.expander.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&(b.toggle?a._toggle():a._popupView(),a.isExpanded()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.expander),a.fireEvent(BI.Expander.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.expander),a.fireEvent(BI.Expander.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,!0))}})},_initExpander:function(){this.expander=BI.createWidget(this.options.el)},_assertPopupView:function(){var a=this;null==this.popupView&&(this.popupView=BI.createWidget(this.options.popup,{type:"bi.button_group",cls:"expander-popup",layouts:[{type:"bi.vertical",hgap:0,vgap:0}]}),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Expander.EVENT_CHANGE,c,d)}),this.popupView.setVisible(this.isExpanded()),BI.nextTick(function(){a.fireEvent(BI.Expander.EVENT_AFTER_INIT)}))},_assertPopupViewRender:function(){this._assertPopupView(),this._rendered||(BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._rendered=!0)},_hideView:function(){this.fireEvent(BI.Expander.EVENT_BEFORE_HIDEVIEW),this._expanded=!1,this.expander.setOpened(!1),this.popupView&&this.popupView.invisible(),this.element.removeClass(this.options.expanderClass),this.fireEvent(BI.Expander.EVENT_AFTER_HIDEVIEW)},_popupView:function(){this._assertPopupViewRender(),this.fireEvent(BI.Expander.EVENT_BEFORE_POPUPVIEW),this._expanded=!0,this.expander.setOpened(!0),this.popupView.visible(),this.element.addClass(this.options.expanderClass),this.fireEvent(BI.Expander.EVENT_AFTER_POPUPVIEW)},populate:function(a){this.popupView&&this.popupView.populate.apply(this.popupView,arguments),this.expander.populate.apply(this.expander,arguments)},_setEnable:function(a){BI.Expander.superclass._setEnable.apply(this,arguments),!a&&this.element.removeClass(this.options.hoverClass),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this.expander.setValue(a),this.popupView&&this.popupView.setValue(a)},getValue:function(){return this.popupView?this.popupView.getValue():[]},isViewVisible:function(){return this.isEnabled()&&this.expander.isEnabled()&&!!this.popupView&&this.popupView.isVisible()},isExpanded:function(){return this._expanded},showView:function(){this.isEnabled()&&this.expander.isEnabled()&&this._popupView()},hideView:function(){this._hideView()},getView:function(){return this.popupView},getAllLeaves:function(){return this.popupView&&this.popupView.getAllLeaves()},getNodeById:function(a){return this.expander.options.id===a?this.expander:this.popupView&&this.popupView.getNodeById(a)},getNodeByValue:function(a){return this.expander.getValue()===a?this.expander:this.popupView&&this.popupView.getNodeByValue(a)},destroy:function(){BI.Expander.superclass.destroy.apply(this,arguments)}}),BI.Expander.EVENT_EXPAND="EVENT_EXPAND",BI.Expander.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.Expander.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.Expander.EVENT_CHANGE="EVENT_CHANGE",BI.Expander.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.Expander.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.Expander.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.Expander.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.Expander.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.expander",BI.Expander),BI.ComboGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ComboGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-combo-group bi-list-item",trigger:"click,hover",direction:"right",adjustLength:0,isDefaultInit:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.text_button",text:"",value:""},children:[],popup:{el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}}})},_init:function(){BI.ComboGroup.superclass._init.apply(this,arguments),this.populate(this.options.el)},populate:function(a){var b=this,c=this.options,d=c.children;if(BI.isEmpty(d))throw new Error("ComboGroup构造错误");BI.each(d,function(a,b){var d=BI.formatEL(b).el.children;b=BI.formatEL(b).el,BI.isEmpty(d)||(b.el=BI.clone(b),b.children=d,b.type="bi.combo_group",b.action=c.action,b.height=c.height,b.direction=c.direction,b.isDefaultInit=c.isDefaultInit,b.isNeedAdjustHeight=c.isNeedAdjustHeight,b.isNeedAdjustWidth=c.isNeedAdjustWidth,b.adjustLength=c.adjustLength,b.popup=c.popup)}),this.combo=BI.createWidget({type:"bi.combo",element:this,height:c.height,trigger:c.trigger,direction:c.direction,isDefaultInit:c.isDefaultInit,isNeedAdjustWidth:c.isNeedAdjustWidth,isNeedAdjustHeight:c.isNeedAdjustHeight,adjustLength:c.adjustLength, -el:a,popup:BI.extend({},c.popup,{el:BI.extend({items:d},c.popup.el)})}),this.combo.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.ComboGroup.EVENT_CHANGE,d)})},getValue:function(){return this.combo.getValue()},setValue:function(a){this.combo.setValue(a)}}),BI.ComboGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.combo_group",BI.ComboGroup),BI.VirtualGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.VirtualGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-virtual-group",items:[],layouts:[{type:"bi.center",hgap:0,vgap:0}]})},render:function(){this.populate(this.options.items)},_packageBtns:function(a){for(var b=this.options,c=b.layouts.length-1;c>0;c--)a=BI.map(a,function(a,d){return BI.extend({},b.layouts[c],{items:[BI.extend({},b.layouts[c].el,{el:BI.stripEL(d)})]})});return a},_packageItems:function(a,b){return BI.createItems(BI.makeArrayByArray(a,{}),BI.clone(b))},_packageLayout:function(a){for(var b=this.options,c=BI.deepClone(b.layouts[0]),d=BI.formatEL(c).el;d&&d.items&&!BI.isEmpty(d.items);)d=BI.formatEL(d.items[0]).el;return d.items=a,c},addItems:function(a){this.layouts.addItems(a)},prependItems:function(a){this.layouts.prependItems(a)},setValue:function(a){this.layouts.setValue(a)},getValue:function(){return this.layouts.getValue()},empty:function(){this.layouts.empty()},populate:function(a){a=a||[],this.options.items=a,a=this._packageBtns(a),this.layouts?this.layouts.populate(a):this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(a)))}}),BI.VirtualGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.virtual_group",BI.VirtualGroup),BI.Loader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Loader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-loader",direction:"top",isDefaultInit:!0,logic:{dynamic:!0,scrolly:!0},el:{type:"bi.button_group"},items:[],itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn,count:!1,prev:!1,next:{},hasPrev:BI.emptyFn,hasNext:BI.emptyFn})},_prevLoad:function(){var a=this,b=this.options;this.prev.setLoading(),b.itemsCreator.apply(this,[{times:--this.times},function(){a.prev.setLoaded(),a.prependItems.apply(a,arguments)}])},_nextLoad:function(){var a=this,b=this.options;this.next.setLoading(),b.itemsCreator.apply(this,[{times:++this.times},function(){a.next.setLoaded(),a.addItems.apply(a,arguments)}])},_init:function(){BI.Loader.superclass._init.apply(this,arguments);var a=this,b=this.options;b.itemsCreator===!1&&(b.prev=!1,b.next=!1),b.prev!==!1&&(this.prev=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.prev)),this.prev.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._prevLoad()})),this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:0,items:b.items,behaviors:{},layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Loader.EVENT_CHANGE,d)}),b.next!==!1&&(this.next=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.next)),this.next.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._nextLoad()})),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.prev,this.button_group,this.next)})))),b.isDefaultInit&&BI.isEmpty(b.items)&&BI.nextTick(BI.bind(function(){b.isDefaultInit&&BI.isEmpty(b.items)&&this.populate()},this)),BI.isNotEmptyArray(b.items)&&this.populate(b.items)},hasPrev:function(){var a=this.options;return BI.isNumber(a.count)?this.count0&&f.push(c),BI.Maskers.show(a.getName()),a.popupView.populate.apply(a.popupView,f),b.isAutoSync&&b.adapter&&b.adapter.getValue&&a.popupView.setValue(b.adapter.getValue()),a.popupView.loaded&&a.popupView.loaded(),a.fireEvent(BI.Searcher.EVENT_SEARCHING)}})}},setAdapter:function(a){this.options.adapter=a,BI.Maskers.remove(this.getName())},doSearch:function(){this.isSearching()&&this._search()},stopSearch:function(){this._stopSearch();try{this.editor.blur()}catch(a){if(!this.editor.blur)throw new Error("editor没有实现blur方法")}finally{this.editor.setValue("")}},isSearching:function(){return this._isSearching},isViewVisible:function(){return this.editor.isEnabled()&&BI.Maskers.isVisible(this.getName())},getView:function(){return this.popupView},hasMatched:function(){return this._assertPopupView(),this.popupView.hasMatched()},adjustHeight:function(){BI.Maskers.has(this.getName())&&BI.Maskers.get(this.getName()).isVisible()&&BI.Maskers.show(this.getName())},adjustView:function(){this.isViewVisible()&&BI.Maskers.show(this.getName())},setValue:function(a){this._assertPopupView(),this.popupView&&this.popupView.setValue(a)},getKeyword:function(){return this.editor.getValue()},getKeywords:function(){return this.editor.getKeywords()},getValue:function(){var a=this.options;return a.isAutoSync&&a.adapter&&a.adapter.getValue?a.adapter.getValue():this.isSearching()?this.popupView.getValue():a.adapter&&a.adapter.getValue?a.adapter.getValue():this.popupView.getValue()},populate:function(a,b,c){var d=this.options;this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),d.isAutoSync&&d.adapter&&d.adapter.getValue&&this.popupView.setValue(d.adapter.getValue())},empty:function(){this.popupView&&this.popupView.empty()},destroy:function(){BI.Maskers.remove(this.getName()),BI.Searcher.superclass.destroy.apply(this,arguments)}}),BI.Searcher.EVENT_CHANGE="EVENT_CHANGE",BI.Searcher.EVENT_START="EVENT_START",BI.Searcher.EVENT_STOP="EVENT_STOP",BI.Searcher.EVENT_PAUSE="EVENT_PAUSE",BI.Searcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.Searcher.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.shortcut("bi.searcher",BI.Searcher),BI.Switcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Switcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switcher",direction:BI.Direction.Top,trigger:"click",toggle:!0,el:{},popup:{},adapter:null,masker:{},switcherClass:"bi-switcher-popup",hoverClass:"bi-switcher-hover"})},_init:function(){BI.Switcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this._initSwitcher(),this._initPullDownAction(),this.switcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Switcher.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Switcher.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE,c,d))}),this.element.hover(function(){a.isEnabled()&&a.switcher.isEnabled()&&a.element.addClass(b.hoverClass)},function(){a.isEnabled()&&a.switcher.isEnabled()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.switcher}]}),b.isDefaultInit&&this._assertPopupView()},_toggle:function(){this._assertPopupView(),this.isExpanded()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(",");BI.each(c,function(c,d){switch(d){case"hover":a.element[d](function(b){a.isEnabled()&&a.switcher.isEnabled()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_EXPAND))},function(){a.isEnabled()&&a.switcher.isEnabled()&&b.toggle&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_COLLAPSE))});break;default:d&&a.element.off(d+"."+a.getName()).on(d+"."+a.getName(),BI.debounce(function(c){a.switcher.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.switcher.isEnabled()&&(b.toggle?a._toggle():a._popupView(),a.isExpanded()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,!0))}})},_initSwitcher:function(){this.switcher=BI.createWidget(this.options.el)},_assertPopupView:function(){var a=this,b=this.options;this._created||(this.popupView=BI.createWidget(b.popup,{type:"bi.button_group",element:b.adapter&&BI.Maskers.create(this.getName(),b.adapter,BI.extend({container:this},b.masker)),cls:"switcher-popup",layouts:[{type:"bi.vertical",hgap:0,vgap:0}]}),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Switcher.EVENT_CHANGE,c,d)}),b.direction===BI.Direction.Custom||b.adapter||BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._created=!0,BI.nextTick(function(){a.fireEvent(BI.Switcher.EVENT_AFTER_INIT)}))},_hideView:function(){this.fireEvent(BI.Switcher.EVENT_BEFORE_HIDEVIEW);var a=this,b=this.options;b.adapter?BI.Maskers.hide(a.getName()):a.popupView&&a.popupView.setVisible(!1),BI.nextTick(function(){b.adapter?BI.Maskers.hide(a.getName()):a.popupView&&a.popupView.setVisible(!1),a.element.removeClass(b.switcherClass),a.fireEvent(BI.Switcher.EVENT_AFTER_HIDEVIEW)})},_popupView:function(){var a=this,b=this.options;this._assertPopupView(),this.fireEvent(BI.Switcher.EVENT_BEFORE_POPUPVIEW),b.adapter?BI.Maskers.show(this.getName()):a.popupView.setVisible(!0),BI.nextTick(function(c){b.adapter?BI.Maskers.show(c):a.popupView.setVisible(!0),a.element.addClass(b.switcherClass),a.fireEvent(BI.Switcher.EVENT_AFTER_POPUPVIEW)},this.getName())},populate:function(a){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.switcher.populate.apply(this.switcher,arguments)},_setEnable:function(a){BI.Switcher.superclass._setEnable.apply(this,arguments),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this._assertPopupView(),this.switcher.setValue(a),this.popupView&&this.popupView.setValue(a)},getValue:function(){return this._assertPopupView(),this.popupView?this.popupView.getValue():[]},setAdapter:function(a){this.options.adapter=a,BI.Maskers.remove(this.getName())},isViewVisible:function(){return this.isEnabled()&&this.switcher.isEnabled()&&(this.options.adapter?BI.Maskers.isVisible(this.getName()):this.popupView&&this.popupView.isVisible())},isExpanded:function(){return this.isViewVisible()},showView:function(){this.isEnabled()&&this.switcher.isEnabled()&&this._popupView()},hideView:function(){this._hideView()},getView:function(){return this.popupView},adjustView:function(){this.isViewVisible()&&BI.Maskers.show(this.getName())},getAllLeaves:function(){return this.popupView&&this.popupView.getAllLeaves()},getNodeById:function(a){return this.switcher.attr("id")===a?this.switcher:this.popupView&&this.popupView.getNodeById(a)},getNodeByValue:function(a){return this.switcher.getValue()===a?this.switcher:this.popupView&&this.popupView.getNodeByValue(a)},empty:function(){this.popupView&&this.popupView.empty()},destroy:function(){BI.Switcher.superclass.destroy.apply(this,arguments)}}),BI.Switcher.EVENT_EXPAND="EVENT_EXPAND",BI.Switcher.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.Switcher.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.Switcher.EVENT_CHANGE="EVENT_CHANGE",BI.Switcher.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.Switcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.Switcher.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.Switcher.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.Switcher.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.switcher",BI.Switcher),BI.Tab=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Tab.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tab",direction:"top",single:!1,logic:{dynamic:!1},defaultShowIndex:!1,tab:!1,cardCreator:function(a){return BI.createWidget()}})},render:function(){var a=this,b=this.options;BI.isObject(b.tab)&&(this.tab=BI.createWidget(this.options.tab,{type:"bi.button_group"}),this.tab.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})),this.cardMap={},this.layout=BI.createWidget({type:"bi.card"}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.tab,this.layout)}))));var c=new BI.ShowListener({eventObj:this.tab,cardLayout:this.layout,cardCreator:function(c){var d=b.cardCreator.apply(a,arguments);return a.cardMap[c]=d,d},afterCardShow:function(b){a._deleteOtherCards(b),a.curr=b}});c.on(BI.ShowListener.EVENT_CHANGE,function(b){a.fireEvent(BI.Tab.EVENT_CHANGE,b,a)})},_deleteOtherCards:function(a){var b=this,c=this.options;c.single===!0&&BI.each(this.cardMap,function(c,d){c!==a+""&&(b.layout.deleteCardByName(c),delete b.cardMap[c])})},_assertCard:function(a){if(!this.layout.isCardExisted(a)){var b=this.options.cardCreator(a);this.cardMap[a]=b,this.layout.addCardByName(a,b)}},mounted:function(){var a=this.options;a.defaultShowIndex!==!1&&this.setSelect(a.defaultShowIndex)},setSelect:function(a){this.tab&&this.tab.setValue(a),this._assertCard(a),this.layout.showCardByName(a),this._deleteOtherCards(a),this.curr!==a&&(this.curr=a)},removeTab:function(a){var b=this;this.options;BI.any(this.cardMap,function(c,d){if(BI.isEqual(c,a+""))return b.layout.deleteCardByName(c),delete b.cardMap[c],!0})},getSelect:function(){return this.curr},getSelectedTab:function(){return this.layout.getShowingCard()},getTab:function(a){return this._assertCard(a),this.layout.getCardByName(a)},setValue:function(a){var b=this.layout.getShowingCard();b&&b.setValue(a)},getValue:function(){var a=this.layout.getShowingCard();if(a)return a.getValue()},populate:function(){var a=this.layout.getShowingCard();if(a)return a.populate&&a.populate.apply(a,arguments)},empty:function(){this.layout.deleteAllCard(),this.cardMap={}},destroy:function(){this.cardMap={},BI.Tab.superclass.destroy.apply(this,arguments)}}),BI.Tab.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.tab",BI.Tab),BI.EL=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.EL.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-el",el:{},layout:{}})},_init:function(){BI.EL.superclass._init.apply(this,arguments);var a=this,b=this.options;this.ele=BI.createWidget(b.el),BI.createWidget(b.layout,{type:"bi.adaptive",element:this,items:[this.ele]}),this.ele.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.ele.setValue(a)},getValue:function(){return this.ele.getValue()},populate:function(){this.ele.populate.apply(this,arguments)}}),BI.shortcut("bi.el",BI.EL),function(a){this.CodeMirror=a()}(function(){"use strict";function a(c,d){if(!(this instanceof a))return new a(c,d);this.options=d=d?He(d):{},He(Vf,d,!1),n(d);var e=d.value;"string"==typeof e&&(e=new rg(e,d.mode)),this.doc=e;var f=new a.inputStyles[d.inputStyle](this),g=this.display=new b(c,e,f);g.wrapper.CodeMirror=this,j(this),h(this),d.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),d.autofocus&&!xf&&g.input.focus(),r(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new ze,keySeq:null,specialChars:null};var i=this;nf&&of<11&&setTimeout(function(){i.display.input.reset(!0)},20),Pb(this),Te(),tb(this),this.curOp.forceUpdate=!0,Ud(this,e),d.autofocus&&!xf||i.hasFocus()?setTimeout(Ie(nc,this),20):oc(this);for(var k in Wf)Wf.hasOwnProperty(k)&&Wf[k](this,d[k],Xf);w(this),d.finishInit&&d.finishInit(this);for(var l=0;l<_f.length;++l)_f[l](this);vb(this),pf&&d.lineWrapping&&"optimizelegibility"==getComputedStyle(g.lineDiv).textRendering&&(g.lineDiv.style.textRendering="auto")}function b(a,b,c){var d=this;this.input=c,d.scrollbarFiller=Me("div",null,"CodeMirror-scrollbar-filler"),d.scrollbarFiller.setAttribute("cm-not-content","true"),d.gutterFiller=Me("div",null,"CodeMirror-gutter-filler"),d.gutterFiller.setAttribute("cm-not-content","true"),d.lineDiv=Me("div",null,"CodeMirror-code"),d.selectionDiv=Me("div",null,null,"position: relative; z-index: 1"),d.cursorDiv=Me("div",null,"CodeMirror-cursors"),d.measure=Me("div",null,"CodeMirror-measure"),d.lineMeasure=Me("div",null,"CodeMirror-measure"),d.lineSpace=Me("div",[d.measure,d.lineMeasure,d.selectionDiv,d.cursorDiv,d.lineDiv],null,"position: relative; outline: none"),d.mover=Me("div",[Me("div",[d.lineSpace],"CodeMirror-lines")],null,"position: relative"),d.sizer=Me("div",[d.mover],"CodeMirror-sizer"),d.sizerWidth=null,d.heightForcer=Me("div",null,null,"position: absolute; height: "+Bg+"px; width: 1px;"),d.gutters=Me("div",null,"CodeMirror-gutters"),d.lineGutter=null,d.scroller=Me("div",[d.sizer,d.heightForcer,d.gutters],"CodeMirror-scroll"),d.scroller.setAttribute("tabIndex","-1"),d.wrapper=Me("div",[d.scrollbarFiller,d.gutterFiller,d.scroller],"CodeMirror"),nf&&of<8&&(d.gutters.style.zIndex=-1,d.scroller.style.paddingRight=0),pf||kf&&xf||(d.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(d.wrapper):a(d.wrapper)),d.viewFrom=d.viewTo=b.first,d.reportedViewFrom=d.reportedViewTo=b.first,d.view=[],d.renderedView=null,d.externalMeasured=null,d.viewOffset=0,d.lastWrapHeight=d.lastWrapWidth=0,d.updateLineNumbers=null,d.nativeBarWidth=d.barHeight=d.barWidth=0,d.scrollbarsClipped=!1,d.lineNumWidth=d.lineNumInnerWidth=d.lineNumChars=null,d.alignWidgets=!1,d.cachedCharWidth=d.cachedTextHeight=d.cachedPaddingH=null,d.maxLine=null,d.maxLineLength=0,d.maxLineChanged=!1,d.wheelDX=d.wheelDY=d.wheelStartX=d.wheelStartY=null,d.shift=!1,d.selForContextMenu=null,d.activeTouch=null,c.init(d)}function c(b){b.doc.mode=a.getMode(b.options,b.doc.modeOption),d(b)}function d(a){a.doc.iter(function(a){a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null)}),a.doc.frontier=a.doc.first,Ma(a,100),a.state.modeGen++,a.curOp&&Ib(a)}function e(a){a.options.lineWrapping?(Rg(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(Qg(a.display.wrapper,"CodeMirror-wrap"),m(a)),g(a),Ib(a),gb(a),setTimeout(function(){s(a)},100)}function f(a){var b=rb(a.display),c=a.options.lineWrapping,d=c&&Math.max(5,a.display.scroller.clientWidth/sb(a.display)-3);return function(e){if(sd(a.doc,e))return 0;var f=0;if(e.widgets)for(var g=0;gb.maxLineLength&&(b.maxLineLength=c,b.maxLine=a)})}function n(a){var b=De(a.gutters,"CodeMirror-linenumbers");b==-1&&a.lineNumbers?a.gutters=a.gutters.concat(["CodeMirror-linenumbers"]):b>-1&&!a.lineNumbers&&(a.gutters=a.gutters.slice(0),a.gutters.splice(b,1))}function o(a){var b=a.display,c=b.gutters.offsetWidth,d=Math.round(a.doc.height+Ra(a.display));return{clientHeight:b.scroller.clientHeight,viewHeight:b.wrapper.clientHeight,scrollWidth:b.scroller.scrollWidth,clientWidth:b.scroller.clientWidth,viewWidth:b.wrapper.clientWidth,barLeft:a.options.fixedGutter?c:0,docHeight:d,scrollHeight:d+Ta(a)+b.barHeight,nativeBarWidth:b.nativeBarWidth,gutterWidth:c}}function p(a,b,c){this.cm=c;var d=this.vert=Me("div",[Me("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),e=this.horiz=Me("div",[Me("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");a(d),a(e),xg(d,"scroll",function(){d.clientHeight&&b(d.scrollTop,"vertical")}),xg(e,"scroll",function(){e.clientWidth&&b(e.scrollLeft,"horizontal")}),this.checkedOverlay=!1,nf&&of<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function q(){}function r(b){b.display.scrollbars&&(b.display.scrollbars.clear(),b.display.scrollbars.addClass&&Qg(b.display.wrapper,b.display.scrollbars.addClass)),b.display.scrollbars=new a.scrollbarModel[b.options.scrollbarStyle](function(a){b.display.wrapper.insertBefore(a,b.display.scrollbarFiller),xg(a,"mousedown",function(){b.state.focused&&setTimeout(function(){b.display.input.focus()},0)}),a.setAttribute("cm-not-content","true")},function(a,c){"horizontal"==c?bc(b,a):ac(b,a)},b),b.display.scrollbars.addClass&&Rg(b.display.wrapper,b.display.scrollbars.addClass)}function s(a,b){b||(b=o(a));var c=a.display.barWidth,d=a.display.barHeight;t(a,b);for(var e=0;e<4&&c!=a.display.barWidth||d!=a.display.barHeight;e++)c!=a.display.barWidth&&a.options.lineWrapping&&F(a),t(a,o(a)),c=a.display.barWidth,d=a.display.barHeight}function t(a,b){var c=a.display,d=c.scrollbars.update(b);c.sizer.style.paddingRight=(c.barWidth=d.right)+"px",c.sizer.style.paddingBottom=(c.barHeight=d.bottom)+"px",d.right&&d.bottom?(c.scrollbarFiller.style.display="block",c.scrollbarFiller.style.height=d.bottom+"px",c.scrollbarFiller.style.width=d.right+"px"):c.scrollbarFiller.style.display="",d.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(c.gutterFiller.style.display="block",c.gutterFiller.style.height=d.bottom+"px",c.gutterFiller.style.width=b.gutterWidth+"px"):c.gutterFiller.style.display=""}function u(a,b,c){var d=c&&null!=c.top?Math.max(0,c.top):a.scroller.scrollTop;d=Math.floor(d-Qa(a));var e=c&&null!=c.bottom?c.bottom:d+a.wrapper.clientHeight,f=$d(b,d),g=$d(b,e);if(c&&c.ensure){var h=c.ensure.from.line,i=c.ensure.to.line;h=g&&(f=$d(b,_d(Vd(b,i))-a.wrapper.clientHeight),g=i)}return{from:f,to:Math.max(g,f+1)}}function v(a){var b=a.display,c=b.view;if(b.alignWidgets||b.gutters.firstChild&&a.options.fixedGutter){for(var d=y(b)-b.scroller.scrollLeft+a.doc.scrollLeft,e=b.gutters.offsetWidth,f=d+"px",g=0;g100)return this.text((a+"").replaceAll(" "," "));b+="",b=BI.toUpperCase(b);var d=(a||"")+"";for(c=(c||BI.makeFirstPY(a))+"",null!=c&&(c=BI.toUpperCase(c)),this.empty();;){var e=BI.toUpperCase(d).indexOf(b),f=null;if(null!=c&&(f=c.indexOf(b),f>=0&&(f%=a.length)),e>=0)this.append(d.substr(0,e)),this.append($("").addClass("bi-keyword-red-mark").text(d.substr(e,b.length).replaceAll(" "," "))),d=d.substr(e+b.length),null!=c&&(c=c.substr(e+b.length));else{if(!(null!=f&&f>=0&&Math.floor(f/a.length)===Math.floor((f+b.length-1)/a.length))){this.append(d);break}this.append(d.substr(0,f)),this.append($("").addClass("bi-keyword-red-mark").text(d.substr(f,b.length).replaceAll(" "," "))),null!=c&&(c=c.substr(f+b.length)),d=d.substr(f+b.length)}}return this},getDomHeight:function(a){var b=$(this).clone();b.appendTo($(a||"body"));var c=b.height();return b.remove(),c},hasVerticalScroll:function(){return this.height()>0&&this[0].clientWidth0&&this[0].clientHeightb.left+this.outerWidth()||a.pageYb.top+this.outerHeight())},__hasZIndexMask__:function(a){return a&&null!=this.zIndexMask[a]},__buildZIndexMask__:function(a,b){this.zIndexMask=this.zIndexMask||{},this.indexMask=this.indexMask||[];var c=BI.createWidget({type:"bi.center_adapt",cls:"bi-z-index-mask",items:b});return c.element.css({"z-index":a}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:c,left:0,right:0,top:0,bottom:0}]}),this.indexMask.push(c),a&&(this.zIndexMask[a]=c),c.element},__releaseZIndexMask__:function(a){if(a&&this.zIndexMask[a])return this.indexMask.remove(this.zIndexMask[a]),void this.zIndexMask[a].destroy();this.indexMask=this.indexMask||[];var b=this.indexMask.pop();b&&b.destroy()}}),BI.extend(jQuery,{getLeftPosition:function(a,b,c){return{left:a.element.offset().left-b.element.outerWidth()-(c||0)}},getRightPosition:function(a,b,c){var d=a.element;return{left:d.offset().left+d.outerWidth()+(c||0)}},getTopPosition:function(a,b,c){return{top:a.element.offset().top-b.element.outerHeight()-(c||0)}},getBottomPosition:function(a,b,c){var d=a.element;return{top:d.offset().top+d.outerHeight()+(c||0)}},isLeftSpaceEnough:function(a,b,c){return $.getLeftPosition(a,b,c).left>=0},isRightSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=$("body").bounds();return $.getRightPosition(a,b,c).left+d.width<=e.width},isTopSpaceEnough:function(a,b,c){return $.getTopPosition(a,b,c).top>=0},isBottomSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=$("body").bounds();return $.getBottomPosition(a,b,c).top+d.height<=e.height},isRightSpaceLarger:function(a){var b=$("body").bounds();return b.width-a.element.offset().left-a.element.bounds().width>=a.element.offset().left},isBottomSpaceLarger:function(a){var b=$("body").bounds();return b.height-a.element.offset().top-a.element.bounds().height>=a.element.offset().top},getLeftAlignPosition:function(a,b,c){var d=b.element.bounds(),e=$("body").bounds(),f=a.element.offset().left+c;return f+d.width>e.width&&(f=e.width-d.width),f<0&&(f=0),{left:f}},getLeftAdaptPosition:function(a,b,c){return $.isLeftSpaceEnough(a,b,c)?$.getLeftPosition(a,b,c):{left:0}},getRightAlignPosition:function(a,b,c){var d=a.element.bounds(),e=b.element.bounds(),f=a.element.offset().left+d.width-e.width-c;return f<0&&(f=0),{left:f}},getRightAdaptPosition:function(a,b,c){return $.isRightSpaceEnough(a,b,c)?$.getRightPosition(a,b,c):{left:$("body").bounds().width-b.element.bounds().width}},getTopAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=$("body").bounds();return $.isBottomSpaceEnough(a,b,-1*h.height+c)?e=g.top+c:d?(e=g.top+c,f=j.height-e):(e=j.height-i.height,ef.height?{top:0,adaptHeight:f.height-c}:{top:0}},getBottomAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=$("body").bounds();return $.isTopSpaceEnough(a,b,-1*h.height+c)?e=g.top+h.height-i.height-c:d?(e=0,f=g.top+h.height-c):(e=0,i.height+c>j.height&&(f=j.height-c)),e<0&&(e=0),f?{top:e,adaptHeight:f}:{top:e}},getBottomAdaptPosition:function(a,b,c,d){var e=a.element.offset(),f=a.element.bounds(),g=b.element.bounds(),h=$("body").bounds();return $.isBottomSpaceEnough(a,b,c)?$.getBottomPosition(a,b,c):d?{top:e.top+f.height+c,adaptHeight:h.height-e.top-f.height-c}:g.height+c>h.height?{top:c,adaptHeight:h.height-c}:{top:h.height-g.height-c}},getCenterAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=$("body").bounds();return c=d.left+e.width/2+f.width/2>g.width?g.width-f.width:d.left+e.width/2-f.width/2,c<0&&(c=0),{left:c}},getMiddleAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=$("body").bounds();return c=d.top+e.height/2+f.height/2>g.height?g.height-f.height:d.top+e.height/2-f.height/2,c<0&&(c=0),{top:c}},getComboPositionByDirections:function(a,b,c,d,e,f){c||(c=0),d||(d=0);var g,h,i,j,k,l=[],m=[],n=!1,o=!1,p=!1;for(g=0;g-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}),{matched:h,finded:i}}}),BI.DOM={},BI.extend(BI.DOM,{hang:function(a){if(!BI.isEmpty(a)){var b=document.createDocumentFragment();return BI.each(a,function(a,c){c instanceof BI.Widget&&(c=c.element),c instanceof $&&c[0]&&b.appendChild(c[0])}),b}},isExist:function(a){return $("body").find(a.element).length>0},preloadImages:function(a,b){function c(){d++,d>=a.length&&b()}var d=0,e=[];BI.each(a,function(a,b){e[a]=new Image,e[a].src=b,e[a].onload=function(){c()},e[a].onerror=function(){c()}})},isColor:function(a){return a&&(this.isRGBColor(a)||this.isHexColor(a))},isRGBColor:function(a){return!!a&&"rgb"===a.substr(0,3)},isHexColor:function(a){return!!a&&("#"===a[0]&&7===a.length)},isDarkColor:function(a){if(!a||!this.isHexColor(a))return!1;var b=this.rgb2json(this.hex2rgb(a)),c=Math.round(.299*b.r+.587*b.g+.114*b.b);return c<192},getContrastColor:function(a){return a&&this.isColor(a)?this.isDarkColor(a)?"#ffffff":"#1a1a1a":""},rgb2hex:function(a){if(!a||"rgb"!=a.substr(0,3))return"";var b=a.match(/\d+(\.\d+)?/g),c=BI.parseInt(b[0]),d=BI.parseInt(b[1]),e=BI.parseInt(b[2]),f="#"+this.int2hex(c)+this.int2hex(d)+this.int2hex(e);return f},rgb2json:function(a){if(!a)return{};if(!this.isRGBColor(a))return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2])}},rgba2json:function(a){if(!a)return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2]),a:BI.parseFloat(b[3])}},json2rgb:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgb("+a.r+","+a.g+","+a.b+")":""},json2rgba:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgba("+a.r+","+a.g+","+a.b+","+a.a+")":""},int2hex:function(a){var b=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return b[a>>>4]+""+b[15&a]},hex2rgb:function(a){if(!a)return"";if(!this.isHexColor(a))return a;var b,c="rgb(";return 7===a.length?b=[BI.parseInt("0x"+a.substring(1,3)),BI.parseInt("0x"+a.substring(3,5)),BI.parseInt("0x"+a.substring(5,7))]:4===a.length&&(b=[BI.parseInt("0x"+a.substring(1,2)),BI.parseInt("0x"+a.substring(2,3)),BI.parseInt("0x"+a.substring(3,4))]),c+=b[0]+",",c+=b[1]+",",c+=b[2]+")"},rgba2rgb:function(a,b){if(BI.isNull(b)&&(b=1),"rgba"!=a.substr(0,4))return"";var c=a.match(/\d+(\.\d+)?/g);if(c.length<4)return"";var d=BI.parseFloat(c[0]),e=BI.parseFloat(c[1]),f=BI.parseFloat(c[2]),g=BI.parseFloat(c[3]);return"rgb("+Math.floor(255*(b*(1-g))+d*g)+","+Math.floor(255*(b*(1-g))+e*g)+","+Math.floor(255*(b*(1-g))+f*g)+")"},getTextSizeWidth:function(a,b){var c=$("").addClass("text-width-span").appendTo($("body"));null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.width();return c.remove(),d},getScrollWidth:function(){if(null==this._scrollWidth){var a=$("
    ").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo($("body"));this._scrollWidth=a[0].offsetWidth-a[0].clientWidth,a.destroy()}return this._scrollWidth}}),BI.ShowListener=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.ShowListener.superclass._defaultConfig.apply(this,arguments),{eventObj:BI.createWidget(),cardLayout:null,cardNameCreator:function(a){return a},cardCreator:BI.emptyFn,afterCardCreated:BI.emptyFn,afterCardShow:BI.emptyFn})},_init:function(){BI.ShowListener.superclass._init.apply(this,arguments);var a=this,b=this.options;b.eventObj.on(BI.Controller.EVENT_CHANGE,function(c,d,e){if(c===BI.Events.CLICK){if(d=d||b.eventObj.getValue(),d=BI.isArray(d)?d.length>1?d.toString():d[0]:d,BI.isNull(d))throw new Error("value cannot be null");var f=b.cardNameCreator(d);if(!b.cardLayout.isCardExisted(f)){var g=b.cardCreator(f);b.cardLayout.addCardByName(f,g),b.afterCardCreated(f)}b.cardLayout.showCardByName(f),BI.nextTick(function(){b.afterCardShow(f),a.fireEvent(BI.ShowListener.EVENT_CHANGE,f)})}})}}),BI.ShowListener.EVENT_CHANGE="ShowListener.EVENT_CHANGE",BI.StyleLoaderManager=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.StyleLoaderManager.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.StyleLoaderManager.superclass._init.apply(this,arguments),this.stylesManager={}},loadStyle:function(a,b){var c=document,d=c.createElement("style");return c.getElementsByTagName("head")[0].appendChild(d),d.setAttribute("type","text/css"),d.styleSheet?d.styleSheet.cssText=b:d.appendChild(document.createTextNode(b)),this.stylesManager[a]=d,this},get:function(a){return this.stylesManager[a]},has:function(a){return null!=this.stylesManager[a]},removeStyle:function(a){return this.has(a)?(this.stylesManager[a].parentNode.removeChild(this.stylesManager[a]),delete this.stylesManager[a],this):this}}),BI.Logic=BI.inherit(BI.OB,{createLogic:function(){return this.options||{}}}),BI.LogicFactory={Type:{Vertical:"vertical",Horizontal:"horizontal",Table:"table",HorizontalFill:"horizontal_fill"},createLogic:function(a,b){var c;switch(a){case BI.LogicFactory.Type.Vertical:c=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:c=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:c=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:c=BI.HorizontalFillLayoutLogic;break;default:c=BI.Logic}return new c(b).createLogic()},createLogicTypeByDirection:function(a){switch(a){case BI.Direction.Top:case BI.Direction.Bottom:case BI.Direction.Custom:return BI.LogicFactory.Type.Vertical;case BI.Direction.Left:case BI.Direction.Right:return BI.LogicFactory.Type.Horizontal}},createLogicItemsByDirection:function(a){var b,c=Array.prototype.slice.call(arguments,1);switch(c=BI.map(c,function(a,b){return BI.isWidget(b)?{el:b,width:b.options.width,height:b.options.height}:b}),a){case BI.Direction.Bottom:b=BI.LogicFactory.Type.Vertical,c.reverse();break;case BI.Direction.Right:b=BI.LogicFactory.Type.Horizontal,c.reverse();break;case BI.Direction.Custom:c=c.slice(1)}return c}},BI.VerticalLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.VerticalLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.vertical":"bi.vtape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.VerticalLayoutLogic.superclass._init.apply(this,arguments)}}),BI.HorizontalLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.HorizontalLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.horizontal":"bi.htape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalLayoutLogic.superclass._init.apply(this,arguments)}}),BI.TableLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.TableLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,columns:0,rows:0,columnSize:[],rowSize:[],hgap:0,vgap:0,items:[]})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.table":"bi.window",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,columns:b.columns,rows:b.rows,columnSize:b.columnSize,rowSize:b.rowSize,hgap:b.hgap,vgap:b.vgap,items:b.items}},_init:function(){BI.TableLayoutLogic.superclass._init.apply(this,arguments)}}),BI.HorizontalFillLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.HorizontalFillLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options,c=[];return BI.each(b.items,function(a,b){c.push(b.width||0)}),a=b.dynamic?"bi.horizontal_adapt":"bi.htape",{type:a,columnSize:c,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalFillLayoutLogic.superclass._init.apply(this,arguments)}}),BI.Plugin=BI.Plugin||{},function(){var a={},b={};BI.extend(BI.Plugin,{getWidget:function(b,c){if(a[b])for(var d,e=a[b].length-1;e>=0;e--)if(d=a[b][e](c))return d;return c},registerWidget:function(b,c){a[b]||(a[b]=[]),a[b].length>0&&console.log("组件已经注册过了!"),a[b].push(c)},relieveWidget:function(b){delete a[b]},getObject:function(a,c){if(b[a])for(var d,e=0,f=b[a].length;e0&&console.log("对象已经注册过了!"),b[a].push(c)},relieveObject:function(a){delete b[a]}})}(),$.extend(Array.prototype,{contains:function(a){return this.indexOf(a)>-1},remove:function(a){var b=this.indexOf(a);return b!==-1&&this.splice(b,1),this},pushArray:function(a){for(var b=0;b=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(f.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(c.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},Date._DN=[BI.i18nText("BI-Basic_Sunday"),BI.i18nText("BI-Basic_Monday"),BI.i18nText("BI-Basic_Tuesday"),BI.i18nText("BI-Basic_Wednesday"),BI.i18nText("BI-Basic_Thursday"),BI.i18nText("BI-Basic_Friday"),BI.i18nText("BI-Basic_Saturday"),BI.i18nText("BI-Basic_Sunday")],Date._SDN=[BI.i18nText("BI-Basic_Simple_Sunday"),BI.i18nText("BI-Basic_Simple_Monday"),BI.i18nText("BI-Basic_Simple_Tuesday"),BI.i18nText("BI-Basic_Simple_Wednesday"),BI.i18nText("BI-Basic_Simple_Thursday"),BI.i18nText("BI-Basic_Simple_Friday"),BI.i18nText("BI-Basic_Simple_Saturday"),BI.i18nText("BI-Basic_Simple_Sunday")],Date._FD=1,Date._MN=[BI.i18nText("BI-Basic_January"),BI.i18nText("BI-Basic_February"),BI.i18nText("BI-Basic_March"),BI.i18nText("BI-Basic_April"),BI.i18nText("BI-Basic_May"),BI.i18nText("BI-Basic_June"),BI.i18nText("BI-Basic_July"),BI.i18nText("BI-Basic_August"),BI.i18nText("BI-Basic_September"),BI.i18nText("BI-Basic_October"),BI.i18nText("BI-Basic_November"),BI.i18nText("BI-Basic_December")],Date._SMN=[0,1,2,3,4,5,6,7,8,9,10,11],Date._QN=["",BI.i18nText("BI-Quarter_1"),BI.i18nText("BI-Quarter_2"),BI.i18nText("BI-Quarter_3"),BI.i18nText("BI-Quarter_4")],Date._MD=[31,28,31,30,31,30,31,31,30,31,30,31],Date.SECOND=1e3,Date.MINUTE=60*Date.SECOND,Date.HOUR=60*Date.MINUTE,Date.DAY=24*Date.HOUR,Date.WEEK=7*Date.DAY,Date.prototype.getTimezone=function(){return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"")},Date.prototype.getMonthDays=function(a){var b=this.getFullYear();return"undefined"==typeof a&&(a=this.getMonth()),0!=b%4||0==b%100&&0!=b%400||1!=a?Date._MD[a]:29},Date.prototype.getLastDateOfMonth=function(){return new Date(this.getFullYear(),this.getMonth(),this.getMonthDays())},Date.prototype.getDayOfYear=function(){var a=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0),b=new Date(this.getFullYear(),0,0,0,0,0),c=a-b;return Math.floor(c/Date.DAY)},Date.prototype.getWeekNumber=function(){var a=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0),b=a.getDay();if(0===this.getMonth()&&this.getDate()<=b)return 1;a.setDate(this.getDate()-b);var c=a.valueOf();a.setMonth(0),a.setDate(1);var d=Math.floor((c-a.valueOf())/6048e5)+1;return a.getDay()>0&&d++,d},Date.prototype.getOffsetDate=function(a){return new Date(this.getTime()+864e5*a)},Date.prototype.getAfterMulQuarter=function(a){var b=new Date(this.getTime());return b.setMonth(b.getMonth()+3*a),b},Date.prototype.getBeforeMulQuarter=function(a){var b=new Date(this.getTime());return b.setMonth(b.getMonth()-3*a),b},Date.prototype.getQuarterStartMonth=function(){var a=0,b=this.getMonth();return b<3&&(a=0),28&&(a=9),a},Date.prototype.getQuarterStartDate=function(){return new Date(this.getFullYear(),this.getQuarterStartMonth(),1)},Date.prototype.getQuarterEndDate=function(){var a=this.getQuarterStartMonth()+2;return new Date(this.getFullYear(),a,this.getMonthDays(a))},Date.prototype.getAfterMultiMonth=function(a){var b=new Date(this.getTime());return b.setMonth(b.getMonth()+a|0),b},Date.prototype.getBeforeMultiMonth=function(a){var b=new Date(this.getTime());return b.setMonth(b.getMonth()-a|0),b},Date.prototype.getAfterMulQuarter=function(a){var b=new Date(this.getTime());return b.setMonth(b.getMonth()+3*a),b},Date.prototype.getBeforeMulQuarter=function(a){var b=new Date(this.getTime());return b.setMonth(b.getMonth()-3*a),b},Date.prototype.getQuarterStartMonth=function(){var a=0,b=this.getMonth();return b<3&&(a=0),28&&(a=9),a},Date.prototype.getOffsetMonth=function(a){var b=new Date(this.getTime()),c=b.getDate(),d=new Date(b.getFullYear(),b.getMonth()+parseInt(a),1).getMonthDays();return c>d&&(c=d),b.setDate(c),b.setMonth(b.getMonth()+parseInt(a)),b},Date.prototype.getWeekStartDate=function(){var a=this.getDay();return this.getOffsetDate(-a)},Date.prototype.getWeekEndDate=function(){var a=this.getDay(),b=0===a?6:6-a;return this.getOffsetDate(b)},Date.prototype.getQuarterStartDate=function(){return new Date(this.getFullYear(),this.getQuarterStartMonth(),1)},Date.prototype.getQuarterEndDate=function(){var a=this.getQuarterStartMonth()+2;return new Date(this.getFullYear(),a,this.getMonthDays(a))},Date.prototype.getAfterMultiMonth=function(a){var b=new Date(this.getTime());return b.setMonth(b.getMonth()+a|0),b},Date.prototype.getBeforeMultiMonth=function(a){var b=new Date(this.getTime());return b.setMonth(b.getMonth()-a|0),b},Date.prototype.equalsTo=function(a){return this.getFullYear()==a.getFullYear()&&this.getMonth()==a.getMonth()&&this.getDate()==a.getDate()&&this.getHours()==a.getHours()&&this.getMinutes()==a.getMinutes()&&this.getSeconds()==a.getSeconds()},Date.prototype.setDateOnly=function(a){var b=new Date(a);this.setDate(1),this.setFullYear(b.getFullYear()),this.setMonth(b.getMonth()),this.setDate(b.getDate())},Date.prototype.print=function(a){var b=this.getMonth(),c=this.getDate(),d=this.getFullYear(),e=this.getWeekNumber(),f=this.getDay(),g={},h=this.getHours(),i=h>=12,j=i?h-12:h,k=this.getDayOfYear();0==j&&(j=12);var l=this.getMinutes(),m=this.getSeconds();g["%a"]=Date._SDN[f],g["%A"]=Date._DN[f],g["%b"]=Date._SMN[b],g["%B"]=Date._MN[b],g["%C"]=1+Math.floor(d/100),g["%d"]=c<10?"0"+c:c,g["%e"]=c,g["%H"]=h<10?"0"+h:h,g["%I"]=j<10?"0"+j:j,g["%j"]=k<100?k<10?"00"+k:"0"+k:k,g["%k"]=h,g["%l"]=j,g["%X"]=b<9?"0"+(1+b):1+b,g["%x"]=b+1,g["%M"]=l<10?"0"+l:l,g["%n"]="\n",g["%p"]=i?"PM":"AM",g["%P"]=i?"pm":"am",g["%s"]=Math.floor(this.getTime()/1e3),g["%S"]=m<10?"0"+m:m,g["%t"]="\t",g["%U"]=g["%W"]=g["%V"]=e<10?"0"+e:e,g["%u"]=f+1,g["%w"]=f,g["%y"]=(""+d).substr(2,2),g["%Y"]=d,g["%%"]="%";var n=/%./g;if(!BI.isKhtml())return a.replace(n,function(a){return g[a]||a});for(var o=a.match(n),p=0;pe[0]?f=["y",1]:a>=d[0]&&a<=e[0]&&(a==d[0]&&(be[1]?f=["m",1]:b==e[1]&&c>e[2]&&(f=["d",1]))),f},Date.checkLegal=function(a){var b=a.match(/\d+/g),c=0|b[0],d=0|b[1],e=0|b[2];if(b.length<=1)return!0;if(b.length<=2)return d>=1&&d<=12;var f=Date._MD.slice(0);return f[1]=Date.isLeap(c)?29:28,d>=1&&d<=12&&e<=f[d-1]},Date.parseDateTime=function(a,b){var c=new Date,d=0,e=0,f=1,g=a.split(/\W+/);if("%y%x"==b.toLowerCase()||"%y%x%d"==b.toLowerCase()){var h=4,i=2;g[0]=a.substring(0,h),g[1]=a.substring(h,h+i),g[2]=a.substring(h+i,h+2*i)}var j=b.match(/%./g),k=0,l=0,m=0,n=0,o=0;for(k=0;k29?1900:2e3);break;case"%b":case"%B":for(l=0;l<12;++l)if(Date._MN[l].substr(0,g[k].length).toLowerCase()==g[k].toLowerCase()){e=l;break}break;case"%H":case"%I":case"%k":case"%l":m=parseInt(g[k],10);break;case"%P":case"%p":/pm/i.test(g[k])&&m<12?m+=12:/am/i.test(g[k])&&m>=12&&(m-=12);break;case"%M":n=parseInt(g[k],10);case"%S":o=parseInt(g[k],10)}if(isNaN(d)&&(d=c.getFullYear()),isNaN(e)&&(e=c.getMonth()),isNaN(f)&&(f=c.getDate()),isNaN(m)&&(m=c.getHours()),isNaN(n)&&(n=c.getMinutes()),isNaN(o)&&(o=c.getSeconds()),0!=d)return new Date(d,e,f,m,n,o);for(d=0,e=-1,f=0,k=0;k31&&0==d?(d=parseInt(g[k],10),d<100&&(d+=d>29?1900:2e3)):0==f&&(f=g[k]);return 0==d&&(d=c.getFullYear()),e!=-1&&0!=f?new Date(d,e,f,m,n,o):c},$.extend($.Event.prototype,{stopEvent:function(){this.stopPropagation(),this.preventDefault()}}),Function.prototype.before=function(a){var b=this;return function(){return a.apply(this,arguments)!==!1&&b.apply(this,arguments)}},Function.prototype.after=function(a){var b=this;return function(){var c=b.apply(this,arguments);return c!==!1&&(a.apply(this,arguments),c)}},jQuery&&!function(a){a.fn.insets||(a.fn.insets=function(){var a=this.padding(),b=this.border();return{top:a.top,bottom:a.bottom+b.bottom+b.top,left:a.left,right:a.right+b.right+b.left}}),a.fn.bounds||(a.fn.bounds=function(a){var b={hasIgnoredBounds:!0};return a?(isNaN(a.x)||(b.left=a.x),isNaN(a.y)||(b.top=a.y),null!=a.width&&(b.width=a.width-(this.outerWidth(!0)-this.width()),b.width=b.width>=0?b.width:a.width),null!=a.height&&(b.height=a.height-(this.outerHeight(!0)-this.height()), +b.height=b.height>=0?b.height:a.height),this.css(b),this):(b=this.position(),{x:b.left,y:b.top,width:this.outerWidth(),height:this.outerHeight()})})}(jQuery),Number.prototype.toFixed&&"0.000"===8e-5.toFixed(3)&&"0"!==.9.toFixed(0)&&"1.25"===1.255.toFixed(2)&&"1000000000000000128"===(0xde0b6b3a7640080).toFixed(0)||!function(){function a(a,b){for(var c=-1;++c=0;)c+=h[b],h[b]=Math.floor(c/a),c=c%a*f}function c(){for(var a=g,b="";--a>=0;)if(""!==b||0===a||0!==h[a]){var c=String(h[a]);""===b?b=c:b+="0000000".slice(0,7-c.length)+c}return b}function d(a,b,c){return 0===b?c:b%2===1?d(a,b-1,c*a):d(a*a,b/2,c)}function e(a){for(var b=0;a>=4096;)b+=12,a/=4096;for(;a>=2;)b+=1,a/=2;return b}var f,g,h;f=1e7,g=6,h=[0,0,0,0,0,0],Number.prototype.toFixed=function(f){var g,h,i,j,k,l,m,n;if(g=Number(f),g=g!==g?0:Math.floor(g),g<0||g>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(h=Number(this),h!==h)return"NaN";if(h<=-1e21||h>1e21)return String(h);if(i="",h<0&&(i="-",h=-h),j="0",h>1e-21)if(k=e(h*d(2,69,1))-69,l=k<0?h*d(2,-k,1):h/d(2,k,1),l*=4503599627370496,k=52-k,k>0){for(a(0,l),m=g;m>=7;)a(1e7,0),m-=7;for(a(d(10,m,1),0),m=k-1;m>=23;)b(1<<23),m-=23;b(1<0?(n=j.length,j=n<=g?i+"0.0000000000000000000".slice(0,g-n+2)+j:i+j.slice(0,n-g)+"."+j.slice(n-g)):j=i+j,j}}(),Number.prototype.add=function(a){return accAdd(a,this)},Number.prototype.sub=function(a){return accSub(this,a)},Number.prototype.mul=function(a){return accMul(a,this)},Number.prototype.div=function(a){return accDiv(this,a)},$.extend(String.prototype,{startWith:function(a){return!(null==a||""==a||0===this.length||a.length>this.length)&&this.substr(0,a.length)==a},endWith:function(a){return!(null==a||""==a||0===this.length||a.length>this.length)&&this.substring(this.length-a.length)==a},getQuery:function(a){var b=new RegExp("(^|&)"+a+"=([^&]*)(&|$)"),c=this.substr(this.indexOf("?")+1).match(b);return c?unescape(c[2]):null},appendQuery:function(a){if(!a)return this;var b=this;return b.indexOf("?")===-1&&(b+="?"),b.endWith("?")!==!1||(b+="&"),$.each(a,function(a,c){"string"==typeof a&&(b+=a+"="+c+"&")}),b=b.substr(0,b.length-1)},replaceAll:function(a,b){return this.replace(new RegExp(a,"gm"),b)},perfectStart:function(a){return this.startWith(a)?this:a+this},allIndexOf:function(a){if("string"!=typeof a)return[];for(var b=this,c=[],d=0;b.length>0;){var e=b.indexOf(a);if(e===-1)break;c.push(d+e),b=b.substring(e+a.length,b.length),d+=e+a.length}return c}}),$.extend(String,{escape:function(a){return a.replace(/('|\\)/g,"\\$1")},leftPad:function(a,b,c){var d=String(a);for(c||(c=" ");d.length").attr({cellspacing:0,cellpadding:0}).css({position:"relative",width:"100%",height:"100%","white-space":"nowrap","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.$tr=$("
    "),this.$tr.appendTo(this.$table),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.attr("width",e);else{var f=BI.createWidget(b);f.element.css({position:"relative",top:"0",left:"0",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",tagName:"td",attributes:{width:e},items:[f]}),this.addWidget(this._getChildName(a),c)}return c.element.css({"max-width":d.columnSize[a]}),0===a&&c.element.addClass("first-element"),c.element.css({position:"relative",height:"100%","vertical-align":"middle",margin:"0",padding:"0",border:"none"}),d.hgap+d.lgap+(b.lgap||0)!==0&&f.element.css({"margin-left":d.hgap+d.lgap+(b.lgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)!==0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+"px"}),d.vgap+d.tgap+(b.tgap||0)!==0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)!==0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+"px"}),c},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&(this.$tr.append(b),this.element.append(this.$table))},resize:function(){},_getWrapper:function(){return this.$tr},populate:function(a){BI.CenterAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.center_adapt",BI.CenterAdaptLayout),BI.HorizontalAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HorizontalAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-horizontal-adapt-layout",verticalAlign:BI.VerticalAlign.Middle,columnSize:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.HorizontalAdaptLayout.superclass.render.apply(this,arguments),this.$table=$("
    ").attr({cellspacing:0,cellpadding:0}).css({position:"relative",width:"100%","white-space":"nowrap","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.$tr=$(""),this.$tr.appendTo(this.$table),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.attr("width",e);else{var f=BI.createWidget(b);f.element.css({position:"relative",top:"0",left:"0",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",tagName:"td",attributes:{width:e},items:[f]}),this.addWidget(this._getChildName(a),c)}return c.element.css({"max-width":d.columnSize[a]+"px"}),0===a&&c.element.addClass("first-element"),c.element.css({position:"relative","vertical-align":d.verticalAlign,margin:"0",padding:"0",border:"none"}),d.hgap+d.lgap+(b.lgap||0)!==0&&f.element.css({"margin-left":d.hgap+d.lgap+(b.lgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)!==0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+"px"}),d.vgap+d.tgap+(b.tgap||0)!==0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)!==0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+"px"}),c},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&(this.$tr.append(b),this.element.append(this.$table))},resize:function(){},_getWrapper:function(){return this.$tr},populate:function(a){BI.HorizontalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_adapt",BI.HorizontalAdaptLayout),BI.LeftRightVerticalAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-left-right-vertical-adapt-layout",items:{},llgap:0,lrgap:0,lhgap:0,rlgap:0,rrgap:0,rhgap:0})},render:function(){BI.LeftRightVerticalAdaptLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},addItem:function(){throw new Error("cannot be added")},stroke:function(a){var b=this.options;if("left"in a){var c=BI.createWidget({type:"bi.vertical_adapt",items:a.left,hgap:b.lhgap,lgap:b.llgap,rgap:b.lrgap});c.element.css("height","100%"),BI.createWidget({type:"bi.left",element:this,items:[c]})}if("right"in a){var d=BI.createWidget({type:"bi.vertical_adapt",items:a.right,hgap:b.rhgap,lgap:b.rlgap,rgap:b.rrgap});d.element.css("height","100%"),BI.createWidget({type:"bi.right",element:this,items:[d]})}},populate:function(a){BI.LeftRightVerticalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.left_right_vertical_adapt",BI.LeftRightVerticalAdaptLayout),BI.LeftVerticalAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-left-vertical-adapt-layout",items:[],lgap:0,rgap:0,hgap:0})},render:function(){BI.LeftVerticalAdaptLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},addItem:function(){throw new Error("cannot be added")},stroke:function(a){var b=this.options,c=BI.createWidget({type:"bi.vertical_adapt",items:a,lgap:b.lgap,hgap:b.hgap,rgap:b.rgap});c.element.css("height","100%"),BI.createWidget({type:"bi.left",element:this,items:[c]})},populate:function(a){BI.LeftVerticalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.left_vertical_adapt",BI.LeftVerticalAdaptLayout),BI.RightVerticalAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.RightVerticalAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-right-vertical-adapt-layout",items:[],lgap:0,rgap:0,hgap:0})},render:function(){BI.RightVerticalAdaptLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},addItem:function(){throw new Error("cannot be added")},stroke:function(a){var b=this.options,c=BI.createWidget({type:"bi.vertical_adapt",items:a,lgap:b.lgap,hgap:b.hgap,rgap:b.rgap});c.element.css("height","100%"),BI.createWidget({type:"bi.right",element:this,items:[c]})},populate:function(a){BI.RightVerticalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.right_vertical_adapt",BI.RightVerticalAdaptLayout),BI.VerticalAdaptLayout=BI.inherit(BI.Layout,{props:{baseCls:"bi-vertical-adapt-layout",columnSize:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0},render:function(){BI.VerticalAdaptLayout.superclass.render.apply(this,arguments),this.$table=$("
    ").attr({cellspacing:0,cellpadding:0}).css({position:"relative",height:"100%","white-space":"nowrap","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.$tr=$(""),this.$tr.appendTo(this.$table),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.attr("width",e);else{var f=BI.createWidget(b);f.element.css({position:"relative",top:"0",left:"0",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",tagName:"td",attributes:{width:e},items:[f]}),this.addWidget(this._getChildName(a),c)}return 0===a&&c.element.addClass("first-element"),c.element.css({position:"relative",height:"100%","vertical-align":"middle",margin:"0",padding:"0",border:"none"}),d.hgap+d.lgap+(b.lgap||0)!==0&&f.element.css({"margin-left":d.hgap+d.lgap+(b.lgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)!==0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+"px"}),d.vgap+d.tgap+(b.tgap||0)!==0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)!==0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+"px"}),c},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&(this.$tr.append(b),this.element.append(this.$table))},_getWrapper:function(){return this.$tr},resize:function(){},populate:function(a){BI.VerticalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.vertical_adapt",BI.VerticalAdaptLayout),BI.HorizontalAutoLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HorizontalAutoLayout.superclass.props.apply(this,arguments),{baseCls:"bi-horizon-auto-layout",hgap:0,lgap:0,rgap:0,vgap:0,tgap:0,bgap:0})},render:function(){BI.HorizontalAutoLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.HorizontalAutoLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",margin:"0px auto"}),c.hgap+c.lgap+(b.lgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.tgap+(b.tgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.HorizontalAutoLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_auto",BI.HorizontalAutoLayout),BI.FloatCenterAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FloatCenterAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-float-center-adapt-layout",items:[],hgap:0,vgap:0,tgap:0,bgap:0,lgap:0,rgap:0})},render:function(){BI.FloatCenterAdaptLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},addItem:function(){throw new Error("cannot be added")},mounted:function(){var a=this,b=this.left.element.outerWidth(),c=this.left.element.outerHeight();this.left.element.width(b).height(c).css("float","none"),BI.remove(this._children,function(b,c){c===a.container&&delete a._children[b]}),BI.createWidget({type:"bi.center_adapt",element:this,items:[this.left]})},stroke:function(a){var b=this.options;this.left=BI.createWidget({type:"bi.vertical",items:a,hgap:b.hgap,vgap:b.vgap,tgap:b.tgap,bgap:b.bgap,lgap:b.lgap,rgap:b.rgap}),this.container=BI.createWidget({type:"bi.left",element:this,items:[this.left]})},populate:function(a){BI.FloatCenterAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.float_center_adapt",BI.FloatCenterAdaptLayout),BI.FloatHorizontalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FloatHorizontalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-float-horizontal-adapt-layout",items:[],hgap:0,vgap:0,tgap:0,bgap:0,lgap:0,rgap:0})},render:function(){BI.FloatHorizontalLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},mounted:function(){var a=this,b=this.left.element.width(),c=this.left.element.height();this.left.element.width(b).height(c).css("float","none"),BI.remove(this._children,function(b,c){c===a.container&&delete a._children[b]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[this.left]})},_addElement:function(a,b){var c=this.options;return this.left=BI.createWidget({type:"bi.vertical",items:[b],hgap:c.hgap,vgap:c.vgap,tgap:c.tgap,bgap:c.bgap,lgap:c.lgap,rgap:c.rgap}),this.container=BI.createWidget({type:"bi.left",element:this,items:[this.left]}),this.left},populate:function(a){BI.HorizontalAutoLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_float",BI.FloatHorizontalLayout),BI.FlexCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-center-layout"})},render:function(){BI.FlexCenterLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=(this.options,BI.FlexCenterLayout.superclass._addElement.apply(this,arguments));return c.element.css({position:"relative","flex-shrink":"0"}),c},resize:function(){},populate:function(a){BI.FlexCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_center",BI.FlexCenterLayout),BI.FlexHorizontalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexHorizontalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-horizontal-layout",verticalAlign:"middle",columnSize:[],scrollx:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexHorizontalLayout.superclass.render.apply(this,arguments);var a=this.options;this.element.addClass(a.verticalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.hgap+c.lgap+(b.lgap||0)>0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)>0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.tgap+(b.tgap||0)>0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)>0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.FlexHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_horizontal",BI.FlexHorizontalLayout),BI.FlexVerticalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexVerticalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-vertical-center",columnSize:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexVerticalCenter.superclass.render.apply(this,arguments);this.options;this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexVerticalCenter.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.hgap+c.lgap+(b.lgap||0)>0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)>0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.tgap+(b.tgap||0)>0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)>0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.FlexVerticalCenter.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_vertical_center",BI.FlexVerticalCenter),BI.FlexCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-wrapper-center-layout clearfix"})},render:function(){BI.FlexCenterLayout.superclass.render.apply(this,arguments),this.$wrapper=$("
    ").addClass("flex-wrapper-center-layout-wrapper"),this.populate(this.options.items)},_addElement:function(a,b){var c=(this.options,BI.FlexCenterLayout.superclass._addElement.apply(this,arguments));return c.element.css({position:"relative"}),c},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&(this.$wrapper.append(b),this.element.append(this.$wrapper))},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_wrapper_center",BI.FlexCenterLayout),BI.FlexHorizontalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexHorizontalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-wrapper-horizontal-layout clearfix",verticalAlign:"middle",columnSize:[],scrollx:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexHorizontalLayout.superclass.render.apply(this,arguments);var a=this.options;this.$wrapper=$("
    ").addClass("flex-wrapper-horizontal-layout-wrapper "+a.verticalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative"}),c.hgap+c.lgap+(b.lgap||0)>0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)>0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.tgap+(b.tgap||0)>0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)>0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&(this.$wrapper.append(b),this.element.append(this.$wrapper))},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_wrapper_horizontal",BI.FlexHorizontalLayout),BI.FlexVerticalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexVerticalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-wrapper-vertical-center clearfix",columnSize:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexVerticalCenter.superclass.render.apply(this,arguments);this.options;this.$wrapper=$("
    ").addClass("flex-wrapper-vertical-center-wrapper"),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexVerticalCenter.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative"}),c.hgap+c.lgap+(b.lgap||0)>0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)>0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.tgap+(b.tgap||0)>0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)>0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&(this.$wrapper.append(b),this.element.append(this.$wrapper))},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexVerticalCenter.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_wrapper_vertical_center",BI.FlexVerticalCenter),BI.AbsoluteLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.AbsoluteLayout.superclass.props.apply(this,arguments),{baseCls:"bi-absolute-layout",hgap:null,vgap:null,lgap:null,rgap:null,tgap:null,bgap:null})},render:function(){BI.AbsoluteLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.AbsoluteLayout.superclass._addElement.apply(this,arguments),e=0,f=0,g=0,h=0;return BI.isNotNull(b.left)&&(d.element.css({left:b.left}),e+=b.left),BI.isNotNull(b.right)&&(d.element.css({right:b.right}),f+=b.right),BI.isNotNull(b.top)&&(d.element.css({top:b.top}),g+=b.top),BI.isNotNull(b.bottom)&&(d.element.css({bottom:b.bottom}),h+=b.bottom),BI.isNotNull(c.hgap)&&(e+=c.hgap,d.element.css({left:e}),f+=c.hgap,d.element.css({right:f})),BI.isNotNull(c.vgap)&&(g+=c.vgap,d.element.css({top:g}),h+=c.vgap,d.element.css({bottom:h})),BI.isNotNull(c.lgap)&&(e+=c.lgap,d.element.css({left:e})),BI.isNotNull(c.rgap)&&(f+=c.rgap,d.element.css({right:f})),BI.isNotNull(c.tgap)&&(g+=c.tgap,d.element.css({top:g})),BI.isNotNull(c.bgap)&&(h+=c.bgap,d.element.css({bottom:h})),BI.isNotNull(b.width)&&d.element.css({width:b.width}),BI.isNotNull(b.height)&&d.element.css({height:b.height}),d.element.css({position:"absolute"}),d},resize:function(){this.stroke(this.options.items)},stroke:function(a){this.options.items=a||[];var b=this;BI.each(a,function(a,c){if(c){if(!BI.isWidget(c)&&!c.el)throw new Error("el must be exist");b._addElement(a,c)}})},populate:function(a){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute",BI.AbsoluteLayout),BI.AdaptiveLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.AdaptiveLayout.superclass.props.apply(this,arguments),{baseCls:"bi-adaptive-layout",hgap:null,vgap:null,lgap:null,rgap:null,tgap:null,bgap:null})},render:function(){BI.AdaptiveLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.AdaptiveLayout.superclass._addElement.apply(this,arguments); +d.element.css({position:"relative"});var e=0,f=0,g=0,h=0;return BI.isNotNull(b.left)&&d.element.css({"margin-left":b.left}),BI.isNotNull(b.right)&&d.element.css({"margin-right":b.right}),BI.isNotNull(b.top)&&d.element.css({"margin-top":b.top}),BI.isNotNull(b.bottom)&&d.element.css({"margin-bottom":b.bottom}),BI.isNotNull(c.hgap)&&(e+=c.hgap,d.element.css({left:e}),f+=c.hgap,d.element.css({right:f})),BI.isNotNull(c.vgap)&&(g+=c.vgap,d.element.css({top:g}),h+=c.vgap,d.element.css({bottom:h})),BI.isNotNull(c.lgap)&&(e+=c.lgap,d.element.css({left:e})),BI.isNotNull(c.rgap)&&(f+=c.rgap,d.element.css({right:f})),BI.isNotNull(c.tgap)&&(g+=c.tgap,d.element.css({top:g})),BI.isNotNull(c.bgap)&&(h+=c.bgap,d.element.css({bottom:h})),BI.isNotNull(b.width)&&d.element.css({width:b.width}),BI.isNotNull(b.height)&&d.element.css({height:b.height}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.adaptive",BI.AdaptiveLayout),BI.BorderLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.BorderLayout.superclass.props.apply(this,arguments),{baseCls:"bi-border-layout",items:{}})},render:function(){BI.BorderLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.options.items)},addItem:function(a){throw new Error("cannot be added")},stroke:function(a){var b,c=0,d=0,e=0,f=0;if("north"in a&&(b=a.north,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"north")){var g=BI.createWidget(b);this.addWidget(this.getName()+"north",g)}this.getWidgetByName(this.getName()+"north").element.height(b.height).css({position:"absolute",top:b.top||0,left:b.left||0,right:b.right||0,bottom:"initial"})}c=(b.height||0)+(b.top||0)+(b.bottom||0)}if("south"in a&&(b=a.south,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"south")){var g=BI.createWidget(b);this.addWidget(this.getName()+"south",g)}this.getWidgetByName(this.getName()+"south").element.height(b.height).css({position:"absolute",bottom:b.bottom||0,left:b.left||0,right:b.right||0,top:"initial"})}d=(b.height||0)+(b.top||0)+(b.bottom||0)}if("west"in a&&(b=a.west,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"west")){var g=BI.createWidget(b);this.addWidget(this.getName()+"west",g)}this.getWidgetByName(this.getName()+"west").element.width(b.width).css({position:"absolute",left:b.left||0,top:c,bottom:d,right:"initial"})}e=(b.width||0)+(b.left||0)+(b.right||0)}if("east"in a&&(b=a.east,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"east")){var g=BI.createWidget(b);this.addWidget(this.getName()+"east",g)}this.getWidgetByName(this.getName()+"east").element.width(b.width).css({position:"absolute",right:b.right||0,top:c,bottom:d,left:"initial"})}f=(b.width||0)+(b.left||0)+(b.right||0)}if("center"in a&&(b=a.center,null!=b)){if(!this.hasWidget(this.getName()+"center")){var g=BI.createWidget(b);this.addWidget(this.getName()+"center",g)}this.getWidgetByName(this.getName()+"center").element.css({position:"absolute",top:c,bottom:d,left:e,right:f})}},populate:function(a){BI.BorderLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.border",BI.BorderLayout),BI.CardLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.CardLayout.superclass.props.apply(this,arguments),{baseCls:"bi-card-layout",items:[]})},render:function(){BI.CardLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},stroke:function(a){var b=this,c=this.options;this.showIndex=void 0,BI.each(a,function(a,d){if(d){if(b.hasWidget(d.cardName))var e=b.getWidgetByName(d.cardName);else{var e=BI.createWidget(d);e.on(BI.Events.DESTROY,function(){var a=BI.findIndex(c.items,function(a,b){return b.cardName==d.cardName});a>-1&&c.items.splice(a,1)}),b.addWidget(d.cardName,e)}e.element.css({position:"absolute",top:"0",right:"0",bottom:"0",left:"0"}),e.setVisible(!1)}})},update:function(){},empty:function(){BI.CardLayout.superclass.empty.apply(this,arguments),this.options.items=[]},populate:function(a){BI.CardLayout.superclass.populate.apply(this,arguments),this._mount(),this.options.defaultShowName&&this.showCardByName(this.options.defaultShowName)},isCardExisted:function(a){return BI.some(this.options.items,function(b,c){return c.cardName==a&&c.el})},getCardByName:function(a){if(!this.isCardExisted(a))throw new Error("cardName is not exist");return this._children[a]},_deleteCardByName:function(a){delete this._children[a];var b=BI.findIndex(this.options.items,function(b,c){return c.cardName==a});b>-1&&this.options.items.splice(b,1)},deleteCardByName:function(a){if(!this.isCardExisted(a))throw new Error("cardName is not exist");var b=this._children[a];this._deleteCardByName(a),b&&b._destroy()},addCardByName:function(a,b){if(this.isCardExisted(a))throw new Error("cardName is already exist");var c=BI.createWidget(b);return c.element.css({position:"relative",top:"0",left:"0",width:"100%",height:"100%"}).appendTo(this.element),c.invisible(),this.addWidget(a,c),this.options.items.push({el:b,cardName:a}),c},showCardByName:function(a,b,c){var d=this,e=this.isCardExisted(a);null!=this.showIndex&&(this.lastShowIndex=this.showIndex),this.showIndex=a;var f=!1;BI.each(this.options.items,function(g,h){var i=d._children[h.cardName];i&&(a!=h.cardName?!f&&!e&&BI.Action&&b instanceof BI.Action?(b.actionBack(i),f=!0):i.invisible():BI.Action&&b instanceof BI.Action?b.actionPerformed(void 0,i,c):(i.visible(),c&&c()))})},showLastCard:function(){var a=this;this.showIndex=this.lastShowIndex,BI.each(this.options.items,function(b,c){a._children[c.cardName].setVisible(a.showIndex==b)})},setDefaultShowName:function(a){return this.options.defaultShowName=a,this},getDefaultShowName:function(){return this.options.defaultShowName},getAllCardNames:function(){return BI.map(this.options.items,function(a,b){return b.cardName})},getShowingCard:function(){if(BI.isKey(this.showIndex))return this.getWidgetByName(this.showIndex)},deleteAllCard:function(){var a=this;BI.each(this.getAllCardNames(),function(b,c){a.deleteCardByName(c)})},hideAllCard:function(){var a=this;BI.each(this.options.items,function(b,c){a._children[c.cardName].invisible()})},isAllCardHide:function(){var a=this,b=!0;return BI.some(this.options.items,function(c,d){if(a._children[d.cardName].isVisible())return b=!1,!1}),b},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._deleteCardByName(b)}}),BI.shortcut("bi.card",BI.CardLayout),BI.DefaultLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.DefaultLayout.superclass.props.apply(this,arguments),{hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,items:[]})},render:function(){BI.DefaultLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.DefaultLayout.superclass._addElement.apply(this,arguments);return c.vgap+c.tgap+(b.tgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.DefaultLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.default",BI.DefaultLayout),BI.DivisionLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.DivisionLayout.superclass.props.apply(this,arguments),{baseCls:"bi-division-layout",columns:null,rows:null,items:[]})},render:function(){BI.DivisionLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.opitons.items)},addItem:function(a){throw new Error("cannot be added")},stroke:function(a){function b(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function c(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}var e=this.options,f=e.rows||e.items.length,g=e.columns||0|(e.items[0]&&e.items[0].length),h=BI.makeArray(f),i={},j={};BI.each(h,function(a){h[a]=BI.makeArray(g)}),BI.each(a,function(a,b){return BI.isArray(b)?void BI.each(b,function(c,d){i[a]=(i[a]||0)+b.width,j[c]=(j[c]||0)+b.height,h[a][c]=d}):(i[b.row]=(i[b.row]||0)+b.width,j[b.column]=(j[b.column]||0)+b.height,void(h[b.row][b.column]=b))});for(var k=0;k0){var p=this.getWidgetByName(this.getName()+k+"_"+(m-1));p.element.css({right:100-o+"%"})}m==e.columns-1&&n.element.css({right:"0%"}),d(n,k,m),l+=h[k][m].width}for(var m=0;m0){var p=this.getWidgetByName(this.getName()+(k-1)+"_"+m);p.element.css({bottom:100-r+"%"})}k==e.rows-1&&n.element.css({bottom:"0%"}),q+=h[k][m].height}},populate:function(a){BI.DivisionLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.division",BI.DivisionLayout),BI.FloatLeftLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FloatLeftLayout.superclass.props.apply(this,arguments),{baseCls:"bi-float-left-layout clearfix",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FloatLeftLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FloatLeftLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","float":"left"}),BI.isNotNull(b.left)&&d.element.css({left:b.left}),BI.isNotNull(b.right)&&d.element.css({right:b.right}),BI.isNotNull(b.top)&&d.element.css({top:b.top}),(b.lgap||0)+c.hgap+c.lgap!==0&&d.element.css("margin-left",(b.lgap||0)+c.hgap+c.lgap),(b.rgap||0)+c.hgap+c.rgap!==0&&d.element.css("margin-right",(b.rgap||0)+c.hgap+c.rgap),(b.tgap||0)+c.vgap+c.tgap!==0&&d.element.css("margin-top",(b.tgap||0)+c.vgap+c.tgap),(b.bgap||0)+c.vgap+c.bgap!==0&&d.element.css("margin-bottom",(b.bgap||0)+c.vgap+c.bgap),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.FloatLeftLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.left",BI.FloatLeftLayout),BI.FloatRightLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FloatRightLayout.superclass.props.apply(this,arguments),{baseCls:"bi-float-right-layout clearfix",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FloatRightLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FloatRightLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","float":"right"}),BI.isNotNull(b.left)&&d.element.css({left:b.left}),BI.isNotNull(b.right)&&d.element.css({right:b.right}),BI.isNotNull(b.top)&&d.element.css({top:b.top}),(b.lgap||0)+c.hgap+c.lgap!==0&&d.element.css("margin-left",(b.lgap||0)+c.hgap+c.lgap),(b.rgap||0)+c.hgap+c.rgap!==0&&d.element.css("margin-right",(b.rgap||0)+c.hgap+c.rgap),(b.tgap||0)+c.vgap+c.tgap!==0&&d.element.css("margin-top",(b.tgap||0)+c.vgap+c.tgap),(b.bgap||0)+c.vgap+c.bgap!==0&&d.element.css("margin-bottom",(b.bgap||0)+c.vgap+c.bgap),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.FloatRightLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.right",BI.FloatRightLayout),BI.GridLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.GridLayout.superclass.props.apply(this,arguments),{baseCls:"bi-grid-layout",columns:null,rows:null,items:[]})},render:function(){BI.GridLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},addItem:function(){throw new Error("cannot be added")},stroke:function(a){function b(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function c(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}for(var e=this.options,f=e.rows||e.items.length,g=e.columns||0|(e.items[0]&&e.items[0].length),h=100/g,i=100/f,j=[],k=0;k").attr({cellspacing:0,cellpadding:0}).css({position:"relative","white-space":"nowrap","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.$tr=$("
    "),this.$tr.appendTo(this.$table),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.attr("width",e);else{var f=BI.createWidget(b);f.element.css({position:"relative",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",tagName:"td",attributes:{width:e},items:[f]}),this.addWidget(this._getChildName(a),c)}return 0===a&&c.element.addClass("first-element"),c.element.css({position:"relative","vertical-align":d.verticalAlign,margin:"0",padding:"0",border:"none"}),d.hgap+d.lgap+(b.lgap||0)>0&&f.element.css({"margin-left":d.hgap+d.lgap+(b.lgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)>0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+"px"}),d.vgap+d.tgap+(b.tgap||0)>0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)>0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+"px"}),c},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&(this.$tr.append(b),this.element.append(this.$table))},resize:function(){},_getWrapper:function(){return this.$tr},populate:function(a){BI.HorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal",BI.HorizontalLayout),BI.HorizontalCellLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HorizontalCellLayout.superclass.props.apply(this,arguments),{baseCls:"bi-horizontal-cell-layout",scrollable:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.HorizontalCellLayout.superclass.render.apply(this,arguments),this.element.css({display:"table","vertical-align":"top"}),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.HorizontalCellLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",display:"table-cell","vertical-align":"middle"}),c.hgap+c.lgap>0&&d.element.css({"margin-left":c.hgap+c.lgap+"px"}),c.hgap+c.rgap>0&&d.element.css({"margin-right":c.hgap+c.rgap+"px"}),c.vgap+c.tgap>0&&d.element.css({"margin-top":c.vgap+c.tgap+"px"}),c.vgap+c.bgap>0&&d.element.css({"margin-bottom":c.vgap+c.bgap+"px"}),d},resize:function(){},populate:function(a){BI.HorizontalCellLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_cell",BI.HorizontalCellLayout),BI.LatticeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.LatticeLayout.superclass.props.apply(this,arguments),{baseCls:"bi-lattice-layout clearfix"})},render:function(){BI.LatticeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.LatticeLayout.superclass._addElement.apply(this,arguments);if(c.columnSize&&c.columnSize[a])var e=c.columnSize[a]/BI.sum(c.columnSize)*100+"%";else var e=1/this.options.items.length*100+"%";return d.element.css({position:"relative","float":"left",width:e}),d},addItem:function(a){var b=BI.LatticeLayout.superclass.addItem.apply(this,arguments);return this.resize(),b},addItemAt:function(a){var b=BI.LatticeLayout.superclass.addItemAt.apply(this,arguments);return this.resize(),b},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.LatticeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.lattice",BI.LatticeLayout),BI.TableLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.TableLayout.superclass.props.apply(this,arguments),{baseCls:"bi-table-layout",scrolly:!0,columnSize:[200,200,"fill"],rowSize:30,hgap:0,vgap:0,items:[[{el:{text:"label1"}},{el:{text:"label2"}},{el:{text:"label3"}}]]})},render:function(){BI.TableLayout.superclass.render.apply(this,arguments),this.rows=0,this.populate(this.options.items)},_addElement:function(a,b){function c(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function d(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function e(a,b,e){a instanceof BI.Widget?c(a.element,b,e):a.el instanceof BI.Widget?c(a.el.element,b,e):a.el?d(a.el,b,e):d(a,b,e)}var f,g,h=this.options,i=[],j=0,k=0;for(f=0;ff;g--){if(!BI.isNumber(h.columnSize[g]))throw new Error("item with fill can only be one");e(b[g],this.rows,g),i.push(BI.extend({top:0,bottom:0,right:h.columnSize[g]<=1?100*k+"%":k,width:h.columnSize[g]<=1?100*h.columnSize[g]+"%":h.columnSize[g]},b[g])),k+=h.columnSize[g]+(h.columnSize[g]<1?0:h.hgap)}f>=0&&f0&&this.getWidgetByName(this.getName()+(this.rows-1)).element.css({"margin-bottom":h.vgap}),l.element.css({position:"relative"}),this.addWidget(this.getName()+this.rows++,l),l},resize:function(){},addItem:function(a){if(!BI.isArray(a))throw new Error("item must be array");return BI.TableLayout.superclass.addItem.apply(this,arguments)},populate:function(a){BI.TableLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.table",BI.TableLayout),BI.HTapeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HTapeLayout.superclass.props.apply(this,arguments),{baseCls:"bi-h-tape-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,items:[{width:100,el:{type:"bi.button",text:"button1"}},{width:"fill",el:{type:"bi.button",text:"button2"}},{width:200,el:{type:"bi.button",text:"button3"}}]})},render:function(){BI.HTapeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.options.items)},addItem:function(a){throw new Error("cannot be added")},stroke:function(a){var b=this,c=this.options;a=BI.compact(a),BI.each(a,function(a,d){if(b.hasWidget(b.getName()+a+""))e=b.getWidgetByName(b.getName()+a+"");else{var e=BI.createWidget(d);b.addWidget(b.getName()+a+"",e)}e.element.css({position:"absolute",top:c.vgap+c.tgap+"px",bottom:c.vgap+c.bgap+"px"})});var d={},e={};d[0]=0,e[a.length-1]=0,BI.any(a,function(e,f){var g=b.getWidgetByName(b.getName()+e+"");if(BI.isNull(d[e])&&(d[e]=d[e-1]+a[e-1].width+2*c.hgap+c.lgap+c.rgap),f.width<1&&f.width>=0?g.element.css({left:100*d[e]+"%",width:100*f.width+"%"}):g.element.css({left:d[e]+c.hgap+c.lgap+"px",width:BI.isNumber(f.width)?f.width:""}),!BI.isNumber(f.width))return!0}),BI.backAny(a,function(d,f){var g=b.getWidgetByName(b.getName()+d+"");if(BI.isNull(e[d])&&(e[d]=e[d+1]+a[d+1].width+2*c.hgap+c.lgap+c.rgap),f.width<1&&f.width>=0?g.element.css({right:100*e[d]+"%",width:100*f.width+"%"}):g.element.css({right:e[d]+c.hgap+c.rgap+"px",width:BI.isNumber(f.width)?f.width:""}),!BI.isNumber(f.width))return!0})},populate:function(a){BI.HTapeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.htape",BI.HTapeLayout),BI.VTapeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.VTapeLayout.superclass.props.apply(this,arguments),{baseCls:"bi-v-tape-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,items:[{height:100,el:{type:"bi.button",text:"button1"}},{height:"fill",el:{type:"bi.button",text:"button2"}},{height:200,el:{type:"bi.button",text:"button3"}}]})},render:function(){BI.VTapeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.options.items)},addItem:function(a){throw new Error("cannot be added")},stroke:function(a){var b=this,c=this.options;a=BI.compact(a),BI.each(a,function(a,d){if(b.hasWidget(b.getName()+a+""))e=b.getWidgetByName(b.getName()+a+"");else{var e=BI.createWidget(d);b.addWidget(b.getName()+a+"",e)}e.element.css({position:"absolute",left:c.hgap+c.lgap+"px",right:c.hgap+c.rgap+"px"})});var d={},e={};d[0]=0,e[a.length-1]=0,BI.any(a,function(e,f){var g=b.getWidgetByName(b.getName()+e+"");if(BI.isNull(d[e])&&(d[e]=d[e-1]+a[e-1].height+2*c.vgap+c.tgap+c.bgap),f.height<1&&f.height>=0?g.element.css({top:100*d[e]+"%",height:100*f.height+"%"}):g.element.css({top:d[e]+c.vgap+c.tgap+"px",height:BI.isNumber(f.height)?f.height:""}),!BI.isNumber(f.height))return!0}),BI.backAny(a,function(d,f){var g=b.getWidgetByName(b.getName()+d+"");if(BI.isNull(e[d])&&(e[d]=e[d+1]+a[d+1].height+2*c.vgap+c.tgap+c.bgap),f.height<1&&f.height>=0?g.element.css({bottom:100*e[d]+"%",height:100*f.height+"%"}):g.element.css({bottom:e[d]+c.vgap+c.bgap+"px",height:BI.isNumber(f.height)?f.height:""}),!BI.isNumber(f.height))return!0})},populate:function(a){BI.VTapeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.vtape",BI.VTapeLayout),BI.TdLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.TdLayout.superclass.props.apply(this,arguments),{baseCls:"bi-td-layout",columnSize:[200,200,200],hgap:0,vgap:0,items:[[{el:{text:"label1"}},{el:{text:"label2"}},{el:{text:"label3"}}]]})},render:function(){BI.TdLayout.superclass.render.apply(this,arguments),this.$table=$("
    ").attr({cellspacing:0,cellpadding:0}).css({position:"relative",width:"100%",height:"100%","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.rows=0,this.populate(this.options.items)},_addElement:function(a,b){function c(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function d(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function e(a,b,e){a instanceof BI.Widget?c(a.element,b,e):a.el instanceof BI.Widget?c(a.el.element,b,e):a.el?d(a.el,b,e):d(a,b,e)}for(var f=this.options,g=BI.createWidget({type:"bi.default",tagName:"tr"}),h=0;h=0;f--){for(var g=0;g=0;g--){for(var f=0;f=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var a=h.length;a;)this.addEventListener(h[--a],b,!1);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var a=h.length;a;)this.removeEventListener(h[--a],b,!1);else this.onmousewheel=null},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),BI.Pane=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Pane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-pane",tipText:BI.i18nText("BI-No_Selected_Item"),overlap:!0,onLoaded:BI.emptyFn})},_init:function(){BI.Pane.superclass._init.apply(this,arguments)},_assertTip:function(){var a=this.options;this._tipText||(this._tipText=BI.createWidget({type:"bi.label",cls:"bi-tips",text:a.tipText,height:25}),BI.createWidget({type:"bi.vertical",element:this,items:[this._tipText],bgap:25}))},loading:function(){var a=this,b=this.options;b.overlap===!0?(BI.Layers.has(this.getName())||BI.createWidget({type:"bi.vtape",items:[{el:{type:"bi.layout",cls:"loading-background"},height:30}],element:BI.Layers.make(this.getName(),this)}),BI.Layers.show(a.getName())):BI.isNull(this._loading)&&(this._loading=BI.createWidget({type:"bi.layout",cls:"loading-background",height:30}),this._loading.element.css("zIndex",1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this._loading,left:0,right:0,top:0}]}))},loaded:function(){var a=this,b=this.options;BI.Layers.remove(a.getName()),this._loading&&this._loading.destroy(),this._loading&&(this._loading=null),b.onLoaded(),a.fireEvent(BI.Pane.EVENT_LOADED)},check:function(){this.setTipVisible(BI.isEmpty(this.options.items))},setTipVisible:function(a){a===!0?(this._assertTip(),this._tipText.setVisible(!0)):this._tipText&&this._tipText.setVisible(!1)},populate:function(a){this.options.items=a||[],this.check()},empty:function(){}}),BI.Pane.EVENT_LOADED="EVENT_LOADED",BI.Single=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Single.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-single",readonly:!1,title:null,warningTitle:null,tipType:null,value:null})},_showToolTip:function(a,b){b||(b={});var c=this.getTipType()||(this.isEnabled()?"success":"warning"),d="success"===c?this.getTitle():this.getWarningTitle()||this.getTitle();BI.isKey(d)&&BI.Tooltips.show(a,this.getName(),d,c,this,b)},_hideTooltip:function(){var a=this,b=BI.Tooltips.get(this.getName());BI.isNotNull(b)&&b.element.fadeOut(200,function(){BI.Tooltips.remove(a.getName())})},_init:function(){BI.Single.superclass._init.apply(this,arguments);var a=this.options;(BI.isKey(a.title)||BI.isKey(a.warningTitle)||BI.isFunction(a.title)||BI.isFunction(a.warningTitle))&&this.enableHover()},enableHover:function(a){a||(a={});var b=this;this._hoverBinded||(this.element.on("mouseenter.title"+this.getName(),function(c){b._e=c,"warning"===b.getTipType()||BI.isKey(b.getWarningTitle())&&!b.isEnabled()?b.timeout=BI.delay(function(){b._showToolTip(b._e||c,a)},200):("success"===b.getTipType()||b.isEnabled())&&(b.timeout=BI.delay(function(){b._showToolTip(b._e||c,a)},500))}),this.element.on("mousemove.title"+this.getName(),function(a){b._e=a,b.element.__isMouseInBounds__(a)||(BI.isNotNull(b.timeout)&&clearTimeout(b.timeout),b._hideTooltip())}),this.element.on("mouseleave.title"+this.getName(),function(){b._e=null,BI.isNotNull(b.timeout)&&clearTimeout(b.timeout),b._hideTooltip()}),this._hoverBinded=!0)},disabledHover:function(){BI.isNotNull(this.timeout)&&clearTimeout(this.timeout),this._hideTooltip(),$(this.element).unbind("mouseenter.title"+this.getName()).unbind("mousemove.title"+this.getName()).unbind("mouseleave.title"+this.getName()),this._hoverBinded=!1},populate:function(a){this.items=a||[]},setTitle:function(a,b){this.options.title=a,BI.isKey(a)?this.enableHover(b):this.disabledHover()},setWarningTitle:function(a,b){this.options.warningTitle=a,BI.isKey(a)?this.enableHover(b):this.disabledHover()},getTipType:function(){return this.options.tipType},isReadOnly:function(){return!!this.options.readonly},getTitle:function(){var a=this.options.title;return BI.isFunction(a)?a():a},getWarningTitle:function(){var a=this.options.warningTitle;return BI.isFunction(a)?a():a},setValue:function(a){this.options.readonly||(this.options.value=a)},getValue:function(){return this.options.value}}),BI.Text=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Text.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text",textAlign:"left",whiteSpace:"normal",lineHeight:null,handler:null,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,text:"",py:""})},_init:function(){BI.Text.superclass._init.apply(this,arguments);var a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this,BI.isKey(b.text)?this.setText(b.text):BI.isKey(b.value)&&this.setText(b.value),BI.isKey(b.keyword)&&this.text.element.__textKeywordMarked__(b.text,b.keyword,b.py)},doRedMark:function(a){var b=this.options;this.text.element.__textKeywordMarked__(b.text||b.value,a,b.py)},unRedMark:function(){var a=this.options;this.text.element.__textKeywordMarked__(a.text||a.value,"",a.py)},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Text.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){BI.Text.superclass.setText.apply(this,arguments),this.options.text=a,this.text.element.text((a+"").replaceAll(" "," "))}}),BI.shortcut("bi.text",BI.Text),BI.BasicButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.BasicButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-basic-button"+(a.invalid?"":" cursor-pointer"),value:"",text:"",stopEvent:!1,stopPropagation:!1,selected:!1,once:!1,forceSelected:!1,forceNotSelected:!1,disableSelected:!1,shadow:!1,isShadowShowingOnSelected:!1,trigger:null,handler:BI.emptyFn})},_init:function(){BI.BasicButton.superclass._init.apply(this,arguments);var a=this.options;a.selected===!0&&BI.nextTick(BI.bind(function(){this.setSelected(a.selected)},this)),BI.nextTick(BI.bind(this.bindEvent,this)),a.shadow&&this._createShadow()},_createShadow:function(){var a=this,b=this.options,c=function(){a.$mask||(a.$mask=BI.createWidget(BI.isObject(b.shadow)?b.shadow:{},{type:"bi.layout",cls:"bi-button-mask"}),a.$mask.invisible(),BI.createWidget({type:"bi.absolute",element:a,items:[{el:a.$mask,left:0,right:0,top:0,bottom:0}]}))};this.element.mouseup(function(){a._hover||b.isShadowShowingOnSelected||(c(),a.$mask.invisible())}),this.element.on("mouseenter."+this.getName(),function(d){a.element.__isMouseInBounds__(d)&&(!a.isEnabled()||a._hover||!b.isShadowShowingOnSelected&&a.isSelected()||(c(),a.$mask.visible()))}),this.element.on("mousemove."+this.getName(),function(b){a.element.__isMouseInBounds__(b)||a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())}),this.element.on("mouseleave."+this.getName(),function(){a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())})},bindEvent:function(){function a(a){d.stopEvent&&a.stopEvent(),d.stopPropagation&&a.stopPropagation()}function b(b){a(b),!c.isEnabled()||c.isOnce()&&c.isSelected()||h.apply(c,arguments)}var c=this,d=this.options,f=this.handle();if(f){f=f.element;var g=(d.trigger||"").split(",");BI.each(g,function(g,h){switch(h){case"mouseup":var i=!1;f.mousedown(function(){i=!0,a(e)}),f.mouseup(function(c){i===!0&&b(c),i=!1,a(c)});break;case"mousedown":var i=!1,j=!1;f.mousedown(function(d){$(document).bind("mouseup."+c.getName(),function(a){!BI.DOM.isExist(c)||f.__isMouseInBounds__(a)||i!==!0||j||c._trigger(),i=!1,$(document).unbind("mouseup."+c.getName())}),i!==!0&&(c.isSelected()?j=!0:b(d),i=!0,a(d))}),f.mouseup(function(a){BI.DOM.isExist(c)&&i===!0&&j===!0&&b(a),i=!1,j=!1,$(document).unbind("mouseup."+c.getName())});break;case"dblclick":f.dblclick(b);break;case"lclick":var k,i=!1;f.mousedown(function(b){$(document).bind("mouseup."+c.getName(),function(a){k&&clearInterval(k),k=null,i=!1,$(document).unbind("mouseup."+c.getName())}),i!==!0&&(!c.isEnabled()||c.isOnce()&&c.isSelected()||(k=setInterval(function(){c.doClick()},100),i=!0,a(b)))});break;default:(d.stopEvent||d.stopPropagation)&&(f.mousedown(function(b){a(b)}),f.mouseup(function(b){a(b)})),f.click(b)}});var h=BI.debounce(this._doClick,BI.EVENT_RESPONSE_TIME,!0)}},_trigger:function(){var a=this.options;if(this.isEnabled()&&(this.isDisableSelected()||(this.isForceSelected()?this.setSelected(!0):this.isForceNotSelected()?this.setSelected(!1):this.setSelected(!this.isSelected())),this.isValid())){a.handler.call(this,this.getValue(),this);var b=this.getValue();this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,b,this),this.fireEvent(BI.BasicButton.EVENT_CHANGE,b,this)}},_doClick:function(a){this.isValid()&&this.beforeClick(a),this._trigger(),this.isValid()&&this.doClick(a)},beforeClick:function(){},doClick:function(){},handle:function(){return this},hover:function(){this._hover=!0,this.handle().element.addClass("hover"),this.options.shadow&&this.$mask&&this.$mask.setVisible(!0)},dishover:function(){this._hover=!1,this.handle().element.removeClass("hover"),this.options.shadow&&this.$mask&&this.$mask.setVisible(!1)},setSelected:function(a){var b=this.options;b.selected=a,a?this.handle().element.addClass("active"):this.handle().element.removeClass("active"),b.shadow&&!b.isShadowShowingOnSelected&&this.$mask&&this.$mask.setVisible(!1)},isSelected:function(){return this.options.selected},isOnce:function(){return this.options.once},isForceSelected:function(){return this.options.forceSelected},isForceNotSelected:function(){return this.options.forceNotSelected},isDisableSelected:function(){return this.options.disableSelected},setText:function(a){this.options.text=a},getText:function(){return this.options.text},_setEnable:function(a){BI.BasicButton.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled"),a||this.options.shadow&&this.$mask&&this.$mask.setVisible(!1)},empty:function(){$(document).unbind("mouseup."+this.getName()),BI.BasicButton.superclass.empty.apply(this,arguments)},destroy:function(){BI.BasicButton.superclass.destroy.apply(this,arguments)}}),BI.BasicButton.EVENT_CHANGE="BasicButton.EVENT_CHANGE",BI.NodeButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.NodeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-node",open:!1})},_init:function(){BI.NodeButton.superclass._init.apply(this,arguments);var a=this;BI.nextTick(function(){a.setOpened(a.isOpened())})},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.setOpened(!this.isOpened())},isOnce:function(){return!1},isOpened:function(){return!!this.options.open},setOpened:function(a){this.options.open=!!a},triggerCollapse:function(){this.isOpened()&&(this.setOpened(!1),this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,this.getValue(),this))},triggerExpand:function(){this.isOpened()||(this.setOpened(!0),this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,this.getValue(),this))}}),BI.Tip=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Link.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-tip",zIndex:BI.zIndex_tip})},_init:function(){BI.Tip.superclass._init.apply(this,arguments),this.element.css({zIndex:this.options.zIndex})}}),BI.ButtonGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ButtonGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-button-group",behaviors:{},items:[],chooseType:BI.Selection.Single,layouts:[{type:"bi.center",hgap:0,vgap:0}]})},_init:function(){BI.ButtonGroup.superclass._init.apply(this,arguments);var a={};BI.each(this.options.behaviors,function(b,c){a[b]=BI.BehaviorFactory.createBehavior(b,{rule:c})}),this.behaviors=a,this.populate(this.options.items)},_createBtns:function(a){this.options;return BI.createWidgets(BI.createItems(a,{type:"bi.text_button"}))},_btnsCreator:function(a){var b=this,c=Array.prototype.slice.call(arguments),d=this.options,e=this._createBtns(a);return c[0]=e,BI.each(this.behaviors,function(a,b){b.doBehavior.apply(b,c)}),BI.each(e,function(a,c){c.on(BI.Controller.EVENT_CHANGE,function(a,e,f){if(a===BI.Events.CLICK){switch(d.chooseType){case BI.ButtonGroup.CHOOSE_TYPE_SINGLE:b.setValue(c.getValue());break;case BI.ButtonGroup.CHOOSE_TYPE_NONE:b.setValue([])}b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b.fireEvent(BI.ButtonGroup.EVENT_CHANGE,e,f)}else b.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),c.on(BI.Events.DESTROY,function(){BI.remove(b.buttons,c)})}),e},_packageBtns:function(a){for(var b=this.options,c=b.layouts.length-1;c>0;c--)a=BI.map(a,function(a,d){return BI.extend({},b.layouts[c],{items:[BI.extend({},b.layouts[c].el,{el:d})]})});return a},_packageSimpleItems:function(a){var b=this.options;return BI.map(b.items,function(b,c){return BI.stripEL(c)===c?a[b]:BI.extend({},c,{el:a[b]})})},_packageItems:function(a,b){return BI.createItems(BI.makeArrayByArray(a,{}),BI.clone(b))},_packageLayout:function(a){for(var b=this.options,c=BI.deepClone(b.layouts[0]),d=BI.formatEL(c).el;d&&d.items&&!BI.isEmpty(d.items);)d=BI.formatEL(d.items[0]).el;return d.items=a,c},_isSimpleLayout:function(){var a=this.options;return 1===a.layouts.length&&!BI.isArray(a.items[0])},doBehavior:function(){var a=Array.prototype.slice.call(arguments);a.unshift(this.buttons),BI.each(this.behaviors,function(b,c){c.doBehavior.apply(c,a)})},prependItems:function(a){var b=(this.options,this._btnsCreator.apply(this,arguments));return this.buttons=BI.concat(b,this.buttons),this._isSimpleLayout()&&this.layouts&&this.layouts.prependItems?void this.layouts.prependItems(b):(a=this._packageItems(a,this._packageBtns(b)),void this.layouts.prependItems(this._packageLayout(a).items))},addItems:function(a){var b=(this.options,this._btnsCreator.apply(this,arguments));return this.buttons=BI.concat(this.buttons,b),this._isSimpleLayout()&&this.layouts&&this.layouts.addItems?void this.layouts.addItems(b):(a=this._packageItems(a,this._packageBtns(b)),void this.layouts.addItems(this._packageLayout(a).items))},removeItemAt:function(a){BI.removeAt(this.buttons,a),this.layouts.removeItemAt(a)},removeItems:function(a){a=BI.isArray(a)?a:[a];var b=[];BI.each(this.buttons,function(c,d){BI.deepContains(a,d.getValue())&&b.push(c)}),BI.removeAt(this.buttons,b),this.layouts.removeItemAt(b)},populate:function(a){a=a||[],this.empty(),this.options.items=a,this.buttons=this._btnsCreator.apply(this,arguments),a=this._isSimpleLayout()?this._packageSimpleItems(this.buttons):this._packageItems(a,this._packageBtns(this.buttons)),this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(a)))},setNotSelectedValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setSelected&&c.setSelected(!1):c.setSelected&&c.setSelected(!0)})},setEnabledValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setEnable(!0):c.setEnable(!1)})},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setSelected&&c.setSelected(!0):c.setSelected&&c.setSelected(!1)})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttons,function(b,c){!c.isEnabled()||c.isSelected&&c.isSelected()||a.push(c.getValue())}),a},getValue:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue())}),a},getAllButtons:function(){return this.buttons},getAllLeaves:function(){return this.buttons},getSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isSelected&&c.isSelected()&&a.push(c)}),a},getNotSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isSelected&&!c.isSelected()&&a.push(c)}),a},getIndexByValue:function(a){var b=-1;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.getValue()===a)return b=c,!0}),b},getNodeById:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.options.id===a)return b=d,!0}),b},getNodeByValue:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.getValue()===a)return b=d,!0}),b},empty:function(){BI.ButtonGroup.superclass.empty.apply(this,arguments),this.options.items=[]},destroy:function(){BI.ButtonGroup.superclass.destroy.apply(this,arguments),this.options.items=[]}}),BI.extend(BI.ButtonGroup,{CHOOSE_TYPE_SINGLE:BI.Selection.Single,CHOOSE_TYPE_MULTI:BI.Selection.Multi,CHOOSE_TYPE_ALL:BI.Selection.All,CHOOSE_TYPE_NONE:BI.Selection.None,CHOOSE_TYPE_DEFAULT:BI.Selection.Default}),BI.ButtonGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.button_group",BI.ButtonGroup),BI.ButtonTree=BI.inherit(BI.ButtonGroup,{_defaultConfig:function(){return BI.extend(BI.ButtonTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-button-tree"})},_init:function(){BI.ButtonTree.superclass._init.apply(this,arguments)},setNotSelectedValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(BI.deepContains(a,c.getValue())?c.setSelected(!1):c.setSelected(!0)):void c.setNotSelectedValue(a)})},setEnabledValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setEnabledValue)?void c.setEnabledValue(a):void(BI.deepContains(a,c.getValue())?c.setEnable(!0):c.setEnable(!1))})},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(BI.deepContains(a,c.getValue())?c.setSelected(!0):c.setSelected(!1)):void c.setValue(a)})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=BI.concat(a,c.getNotSelectedValue())):void(c.isEnabled()&&c.isSelected&&!c.isSelected()&&a.push(c.getValue()))}),a},getValue:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=BI.concat(a,c.getValue())):void(c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue()))}),a},getSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getSelectedButtons())):void(c.isSelected&&c.isSelected()&&a.push(c))}),a},getNotSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getNotSelectedButtons())):void(c.isSelected&&!c.isSelected()&&a.push(c))}),a},getAllLeaves:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getAllLeaves())):void(c.isEnabled()&&a.push(c))}),a},getIndexByValue:function(a){var b=-1;return BI.any(this.buttons,function(c,d){var e=d.getValue();if(d.isEnabled()&&(e===a||BI.contains(e,a)))return b=c,!0}),b},getNodeById:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()){if(d.attr("id")===a)return b=d,!0;if(BI.isFunction(d.getNodeById)&&(b=d.getNodeById(a)))return!0}}),b},getNodeByValue:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled())if(BI.isFunction(d.getNodeByValue)){if(b=d.getNodeByValue(a))return!0}else if(d.attr("value")===a)return b=d,!0}),b}}),BI.ButtonTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.button_tree",BI.ButtonTree),BI.TreeView=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TreeView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree",paras:{},itemsCreator:BI.emptyFn})},_init:function(){BI.TreeView.superclass._init.apply(this,arguments),this._stop=!1,this._createTree(),this.tip=BI.createWidget({type:"bi.loading_bar",invisible:!0,handler:BI.bind(this._loadMore,this)}),BI.createWidget({type:"bi.vertical",scrollable:!0,scrolly:!1,element:this,items:[this.tip]})},_createTree:function(){this.id="bi-tree"+BI.UUID(),this.nodes&&this.nodes.destroy(),this.tree&&this.tree.destroy(),this.tree=BI.createWidget({type:"bi.layout",element:"
      "}),BI.createWidget({type:"bi.default",element:this.element,items:[this.tree]})},_selectTreeNode:function(a,b){this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,b,this),this.fireEvent(BI.TreeView.EVENT_CHANGE,b,this)},_configSetting:function(){function a(a,b,c){l.nodes.checkNode(c,!c.checked,!0,!0)}function b(a,b){var c=l._getParentValues(b);b.times=b.times||1;var d="id="+b.id+"×="+b.times++ +"&parentValues= "+window.encodeURIComponent(BI.jsonEncode(c))+"&checkState="+window.encodeURIComponent(BI.jsonEncode(b.getCheckStatus()));return BI.servletURL+"?op="+l.options.op+"&cmd="+l.options.cmd+"&"+d}function c(a,b){return b.isAjaxing?(BI.Msg.toast("Please Wait。","warning"),!1):(b.children||(b.times=1,f(b,"refresh")),!0)}function d(a,b,c,d){if(c.halfCheck=!1,d&&0!==d.length&&!/^[\s,\S]*<\/html>$/gi.test(d)&&!l._stop){var e=l.nodes,g=c.count||0;c.children.length>g?(c.count=c.children.length,BI.delay(function(){f(c)},n)):(e.updateNode(c),e.selectNode(c.children[0]))}}function e(a,b,c,d,e,f){l.nodes;BI.Msg.toast("Error!","warning")}function f(a,b){var c=l.nodes;"refresh"==b&&c.updateNode(a),c.reAsyncChildNodes(a,b,!0)}function g(a,b){function c(a){BI.each(a,function(a,b){b.halfCheck===!0&&(b.halfCheck=!1,c(b.children))})}if(b.halfCheck=!1,b.checked===!0){c(b.children);var d=l.nodes,e=d.getSelectedNodes();$.each(e,function(a,b){b.halfCheck=!1})}}function h(a,b,c){l._selectTreeNode(b,c)}function i(a,b,c){c.halfCheck=!1}function j(a,b,c){}var k=this.options.paras,l=this,m={async:{enable:!0,url:b,autoParam:["id","name"],otherParam:BI.cjkEncodeDO(k)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeExpand:c,onAsyncSuccess:d,onAsyncError:e,beforeCheck:g,onCheck:h,onExpand:i,onCollapse:j,onClick:a}},n=100;return m},_getParentValues:function(a){if(!a.getParentNode())return[];var b=a.getParentNode(),c=this._getParentValues(b);return c=c.concat([this._getNodeValue(b)])},_getNodeValue:function(a){return null==a.value?a.text.replace(/<[^>]+>/g,"").replaceAll(" "," "):a.value},_getHalfSelectedValues:function(a,b){var c=this,d=b.getCheckStatus();if(d.checked!==!1||d.half!==!1){if(BI.isNotEmptyArray(b.children)&&d.half===!0){var e=b.children;return void BI.each(e,function(b,d){c._getHalfSelectedValues(a,d)})}var f=b.parentValues||c._getParentValues(b),g=f.concat(this._getNodeValue(b));if(BI.isNotEmptyArray(b.children)||d.half===!1)return void this._buildTree(a,g);var h=BI.deepClone(this.options.paras.selectedValues),i=this._getTree(h,g);this._addTreeNode(a,f,this._getNodeValue(b),i)}},_getTree:function(a,b){var c=a;return BI.any(b,function(a,b){return null==c[b]||void(c=c[b])}),c},_addTreeNode:function(a,b,c,d){var e=a;BI.each(b,function(a,b){null==e[b]&&(e[b]={}),e=e[b]}),e[c]=d},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){null==c[b]&&(c[b]={}),c=c[b]})},_getSelectedValues:function(){function a(a){BI.each(a,function(a,d){var e=d.getCheckStatus();if(e.checked===!0||e.half===!0)if(e.half===!0)b._getHalfSelectedValues(c,d);else{var f=d.parentValues||b._getParentValues(d),g=f.concat([b._getNodeValue(d)]);b._buildTree(c,g)}})}var b=this,c={},d=this.nodes.getNodes();return a(d),c},_dealWidthNodes:function(a){var b=this.options,c=BI.Tree.arrayFormat(a);return BI.each(c,function(a,c){c.title=c.title||c.text||c.value,BI.isKey(b.paras.keyword)?c.text=$("
      ").__textKeywordMarked__(c.text,b.paras.keyword,c.py).html():c.text=(c.text+"").replaceAll(" "," ")}),a},_loadMore:function(){var a=this,b=this.options;this.tip.setLoading();var c=BI.extend({},b.paras,{times:++this.times});b.itemsCreator(c,function(b){if(a._stop!==!0){var c=!!b.hasNext,d=b.items||[];c?a.tip.setLoaded():a.tip.setEnd(),d.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(d))}})},_initTree:function(a){var b=this,c=this.options;b.fireEvent(BI.Events.INIT),this.times=1;var d=this.tree;d.empty(),this.loading(),this.tip.setVisible(!1);var e=function(c){b._stop!==!0&&(b.nodes=$.fn.zTree.init(d.element,a,c))},f=BI.extend({},c.paras,{times:1});c.itemsCreator(f,function(a){if(b._stop!==!0){var c=!!a.hasNext,d=a.items||[];d.length>0&&e(b._dealWidthNodes(d)),b.setTipVisible(d.length<=0),b.loaded(),c?b.tip.setLoaded():b.tip.invisible(),1===f.times&&b.fireEvent(BI.Events.AFTERINIT)}})},initTree:function(a,b){var b=b||{async:{enable:!1},check:{enable:!1},data:{key:{title:"title",name:"text"},simpleData:{ +enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0},callback:{}};this.nodes=$.fn.zTree.init(this.tree.element,b,a)},start:function(){this._stop=!1},stop:function(){this._stop=!0},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._createTree(),this.start(),this._initTree(b)},populate:function(){this.stroke.apply(this,arguments)},hasChecked:function(){var a=this.nodes;return a.getCheckedNodes(!0).length>0},checkAll:function(a){function b(a){BI.each(a,function(a,c){c.halfCheck=!1,b(c.children)})}BI.each(this.nodes.getNodes(),function(a,c){c.halfCheck=!1,b(c.children)}),this.nodes&&this.nodes.checkAllNodes(a)},expandAll:function(a){this.nodes&&this.nodes.expandAll(a)},setValue:function(a,b){this.checkAll(!1),this.updateValue(a,b),this.refresh()},setSelectedValue:function(a){this.options.paras.selectedValues=BI.deepClone(a||{})},updateValue:function(a,b){if(this.nodes){b||(b="value");var c=this.nodes;BI.each(a,function(a,d){var e=c.getNodesByParam(b,a,null);BI.each(e,function(a,b){BI.extend(b,{checked:!0},d),c.updateNode(b)})})}},refresh:function(){this.nodes&&this.nodes.refresh()},getValue:function(){return this.nodes?this._getSelectedValues():null},destroyed:function(){this.stop(),this.nodes&&this.nodes.destroy()}}),BI.extend(BI.TreeView,{REQ_TYPE_INIT_DATA:1,REQ_TYPE_ADJUST_DATA:2,REQ_TYPE_SELECT_DATA:3,REQ_TYPE_GET_SELECTED_DATA:4}),BI.TreeView.EVENT_CHANGE="EVENT_CHANGE",BI.TreeView.EVENT_INIT=BI.Events.INIT,BI.TreeView.EVENT_AFTERINIT=BI.Events.AFTERINIT,BI.shortcut("bi.tree_view",BI.TreeView),BI.AsyncTree=BI.inherit(BI.TreeView,{_defaultConfig:function(){return BI.extend(BI.AsyncTree.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.AsyncTree.superclass._init.apply(this,arguments)},_configSetting:function(){function a(a,b,c){var d=$.fn.zTree.getZTreeObj(b);d.checkNode(c,!c.checked,!0,!0)}function b(a,b){function c(a){BI.each(a,function(a,b){b.halfCheck===!0&&(b.halfCheck=!1,c(b.children))})}if(b.halfCheck=!1,b.checked===!0){c(b.children);var d=$.fn.zTree.getZTreeObj(a),e=d.getSelectedNodes();BI.each(e,function(a,b){b.halfCheck=!1})}}function c(a,b){h._beforeExpandNode(a,b)}function d(a,b,c){h._selectTreeNode(b,c)}function e(a,b,c){c.halfCheck=!1}function f(a,b,c){c.halfCheck=!1}var g=this.options.paras,h=this,i={async:{enable:!1,otherParam:BI.cjkEncodeDO(g)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeCheck:b,onCheck:d,beforeExpand:c,onExpand:e,onCollapse:f,onClick:a}};return i},_selectTreeNode:function(a,b){var c=this,d=(this.options,BI.deepClone(b.parentValues||c._getParentValues(b))),e=this._getNodeValue(b);if(b.checked===!0);else{var f=b,g=this._getTree(this.options.paras.selectedValues,d);for(BI.isNotNull(g[e])&&delete g[e];null!=f&&BI.isEmpty(g);)d=d.slice(0,d.length-1),f=f.getParentNode(),null!=f&&(g=this._getTree(this.options.paras.selectedValues,d),e=this._getNodeValue(f),delete g[e])}BI.AsyncTree.superclass._selectTreeNode.apply(c,arguments)},_beforeExpandNode:function(a,b){function c(a,c){d.nodes.addNodes(b,a),c===!0&&BI.delay(function(){i++,g.times=i,e.itemsCreator(g,h)},100)}var d=this,e=this.options,f=b.parentValues||d._getParentValues(b),g=BI.extend({},e.paras,{id:b.id,times:1,parentValues:f.concat(this._getNodeValue(b)),checkState:b.getCheckStatus()}),h=function(a){var b=a.items||[];b.length>0&&c(d._dealWidthNodes(b),!!a.hasNext)},i=1;b.children||e.itemsCreator(g,h)},_join:function(a,b){function c(a,b,f){BI.each(b,function(g,h){BI.isNull(f[g])?d._addTreeNode(e,a,g,h):BI.isEmpty(f[g])?d._addTreeNode(e,a,g,{}):c(a.concat([g]),b[g],f[g])})}var d=this,e={};return c([],a,b),c([],b,a),e},hasChecked:function(){return!BI.isEmpty(this.options.paras.selectedValues)||BI.AsyncTree.superclass.hasChecked.apply(this,arguments)},getValue:function(){if(!this.nodes)return{};var a=this._getSelectedValues();return BI.isEmpty(a)?BI.deepClone(this.options.paras.selectedValues):BI.isEmpty(this.options.paras.selectedValues)?a:this._join(a,this.options.paras.selectedValues)},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._initTree(b)}}),BI.shortcut("bi.async_tree",BI.AsyncTree),BI.PartTree=BI.inherit(BI.AsyncTree,{_defaultConfig:function(){return BI.extend(BI.PartTree.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.PartTree.superclass._init.apply(this,arguments)},_loadMore:function(){var a=this,b=this.options,c=BI.extend({},b.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:++this.times});this.tip.setLoading(),b.itemsCreator(c,function(c){var d=!!c.hasNext,e=c.items||[];b.paras.lastSearchValue=c.lastSearchValue,a._stop!==!0&&(d?a.tip.setLoaded():a.tip.setEnd(),e.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(e)))})},_selectTreeNode:function(a,b){var c=this,d=this.options,e=BI.deepClone(b.parentValues||c._getParentValues(b)),f=this._getNodeValue(b);if(b.checked===!0)BI.AsyncTree.superclass._selectTreeNode.apply(c,arguments);else{for(var g=this.options.paras.selectedValues,h=e.concat(f),i=0,j=h.length;i0&&c(d._dealWidthNodes(g)),d.setTipVisible(g.length<=0),d.loaded(),f?d.tip.setLoaded():d.tip.invisible(),d.fireEvent(BI.Events.AFTERINIT)}};BI.delay(function(){e.itemsCreator(g,h)},100)},getValue:function(){var a=this.options,b=BI.PartTree.superclass.getValue.apply(this,arguments);return a.itemsCreator({type:BI.TreeView.REQ_TYPE_ADJUST_DATA,selectedValues:b},function(a){b=a}),b},stroke:function(a){var b=this.options;delete b.paras.keyword,BI.extend(b.paras,a),delete b.paras.lastSearchValue;var c=this._configSetting();this._initTree(c,b.paras.keyword)}}),BI.shortcut("bi.part_tree",BI.PartTree),BI.Resizers=new BI.ResizeController,BI.Layers=new BI.LayerController,BI.Maskers=new BI.MaskersController,BI.Bubbles=new BI.BubblesController,BI.Tooltips=new BI.TooltipsController,BI.Popovers=new BI.FloatBoxController,BI.Broadcasts=new BI.BroadcastController,BI.StyleLoaders=new BI.StyleLoaderManager,BI.Canvas=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Canvas.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-canvas"})},_init:function(){BI.Canvas.superclass._init.apply(this,arguments);var a=this.options,b=document.createElement("canvas");document.createElement("canvas").getContext||(b=window.G_vmlCanvasManager.initElement(b)),this.element.append(b),b.width=a.width,b.height=a.height,$(b).width("100%"),$(b).height("100%"),this.canvas=b,this._queue=[]},_getContext:function(){return this.ctx||(this.ctx=this.canvas.getContext("2d")),this.ctx},_attr:function(a,b){var c=this;if(!BI.isNull(a))return BI.isObject(a)?void BI.each(a,function(a,b){c._queue.push({k:a,v:b})}):void this._queue.push({k:a,v:b})},_line:function(a,b){var c=this,d=[].slice.call(arguments,2);BI.isOdd(d.length)&&(this._attr(BI.last(d)),d=BI.initial(d)),this._attr("moveTo",[a,b]);var e=BI.filter(d,function(a){return a%2===0}),f=BI.filter(d,function(a){return a%2!==0});d=BI.zip(e,f),BI.each(d,function(a,b){c._attr("lineTo",b)})},line:function(a,b,c,d){this._line.apply(this,arguments),this._attr("stroke",[])},rect:function(a,b,c,d,e){this._attr("fillStyle",e),this._attr("fillRect",[a,b,c,d])},circle:function(a,b,c,d){this._attr({fillStyle:d,beginPath:[],arc:[a,b,c,0,2*Math.PI,!0],closePath:[],fill:[]})},hollow:function(){this._attr("beginPath",[]),this._line.apply(this,arguments),this._attr("closePath",[]),this._attr("stroke",[])},solid:function(){this.hollow.apply(this,arguments),this._attr("fill",[])},gradient:function(a,b,c,d,e,f){var g=this._getContext().createLinearGradient(a,b,c,d);return g.addColorStop(0,e),g.addColorStop(1,f),g},reset:function(){this._getContext().clearRect(0,0,this.canvas.width,this.canvas.height)},stroke:function(a){var b=this;BI.nextTick(function(){var c=b._getContext();BI.each(b._queue,function(a,b){BI.isFunction(c[b.k])?c[b.k].apply(c,b.v):c[b.k]=b.v}),b._queue=[],a&&a()})}}),BI.shortcut("bi.canvas",BI.Canvas),BI.CollectionView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CollectionView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-collection",overflowX:!0,overflowY:!0,cellSizeAndPositionGetter:BI.emptyFn,horizontalOverscanSize:0,verticalOverscanSize:0,scrollLeft:0,scrollTop:0,items:[]})},_init:function(){BI.CollectionView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1,this._debounceRelease=BI.debounce(function(){a._scrollLock=!1},1e3/60),this.container=BI.createWidget({type:"bi.absolute"}),this.element.scroll(function(){a._scrollLock!==!0&&(b.scrollLeft=a.element.scrollLeft(),b.scrollTop=a.element.scrollTop(),a._calculateChildrenToRender(),a.fireEvent(BI.CollectionView.EVENT_SCROLL,{scrollLeft:b.scrollLeft,scrollTop:b.scrollTop}))}),BI.createWidget({type:"bi.vertical",element:this,scrollable:b.overflowX===!0&&b.overflowY===!0,scrolly:b.overflowX===!1&&b.overflowY===!0,scrollx:b.overflowX===!0&&b.overflowY===!1,items:[this.container]}),b.items.length>0&&(this._calculateSizeAndPositionData(),this._populate()),0===b.scrollLeft&&0===b.scrollTop||BI.nextTick(function(){a.element.scrollTop(b.scrollTop),a.element.scrollLeft(b.scrollLeft)})},_calculateSizeAndPositionData:function(){for(var a=this.options,b=[],c=new BI.SectionManager,d=0,e=0,f=0,g=a.items.length;f0&&h>0){if(f>=this.renderRange.minY&&h<=this.renderRange.maxY&&e>=this.renderRange.minX&&g<=this.renderRange.maxX)return;for(var i=this._cellRenderers(h-f,g-e,e,f),j=[],k=[],l={},m={},n={},o=0,p=i.length;o-1?(q.width!==this.renderedCells[A]._width&&(this.renderedCells[A]._width=q.width,this.renderedCells[A].el.setWidth(q.width)),q.height!==this.renderedCells[A]._height&&(this.renderedCells[A]._height=q.height,this.renderedCells[A].el.setHeight(q.height)),this.renderedCells[A]._left!==q.x&&this.renderedCells[A].el.element.css("left",q.x+"px"),this.renderedCells[A]._top!==q.y&&this.renderedCells[A].el.element.css("top",q.y+"px"),j.push(z=this.renderedCells[A])):(z=BI.createWidget(BI.extend({type:"bi.label",width:q.width,height:q.height},b.items[q.index],{cls:(b.items[q.index].cls||"")+" container-cell"+(0===q.y?" first-row":"")+(0===q.x?" first-col":""),_left:q.x,_top:q.y})),j.push({el:z,left:q.x,top:q.y,_left:q.x,_top:q.y,_width:q.width,_height:q.height}));for(var B=0|s[q.y],C=0|s[q.y+q.height],D=B;D<=C;D++){var E=n[D];x(t,E),y(u,E),t[E]=Math.min(t[E],q.x),u[E]=Math.max(u[E],q.x+q.width)}for(var F=0|r[q.x],G=0|r[q.x+q.width],D=F;D<=G;D++){var H=m[D];x(v,H),y(w,H),v[H]=Math.min(v[H],q.y),w[H]=Math.max(w[H],q.y+q.height)}k.push(q.index),l[o]=z}var I={},J={},K=[];BI.each(k,function(b,c){BI.deepContains(a.renderedKeys,c)?I[b]=c:J[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(I,b)||BI.deepContains(J,b)||K.push(a)}),BI.each(K,function(b,c){a.renderedCells[c].el._destroy()});var L=[];BI.each(J,function(a){L.push(j[a])}),this.container.addItems(L),this.container._children=l,this.container.attr("items",j),this.renderedCells=j,this.renderedKeys=k;var M=BI.min(t),N=BI.max(u),O=BI.max(v),P=BI.min(w);this.renderRange={minX:M,minY:O,maxX:N,maxY:P}}},_getMaxScrollLeft:function(){return Math.max(0,this._width-this.options.width+(this.options.overflowX?BI.DOM.getScrollWidth():0))},_getMaxScrollTop:function(){return Math.max(0,this._height-this.options.height+(this.options.overflowY?BI.DOM.getScrollWidth():0))},_populate:function(a){var b=this.options;this._reRange(),a&&a!==this.options.items&&(this.options.items=a,this._calculateSizeAndPositionData()),b.items.length>0&&(this.container.setWidth(this._width),this.container.setHeight(this._height),this._calculateChildrenToRender(),this.element.scrollTop(b.scrollTop),this.element.scrollLeft(b.scrollLeft))},setScrollLeft:function(a){this.options.scrollLeft!==a&&(this._scrollLock=!0,this.options.scrollLeft=BI.clamp(a||0,0,this._getMaxScrollLeft()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollLeft(this.options.scrollLeft))},setScrollTop:function(a){this.options.scrollTop!==a&&(this._scrollLock=!0,this.options.scrollTop=BI.clamp(a||0,0,this._getMaxScrollTop()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollTop(this.options.scrollTop))},setOverflowX:function(a){var b=this;this.options.overflowX!==!!a&&(this.options.overflowX=!!a,BI.nextTick(function(){b.element.css({overflowX:a?"auto":"hidden"})}))},setOverflowY:function(a){var b=this;this.options.overflowY!==!!a&&(this.options.overflowY=!!a,BI.nextTick(function(){b.element.css({overflowY:a?"auto":"hidden"})}))},getScrollLeft:function(){return this.options.scrollLeft},getScrollTop:function(){return this.options.scrollTop},getMaxScrollLeft:function(){return this._getMaxScrollLeft()},getMaxScrollTop:function(){return this._getMaxScrollTop()},_reRange:function(){this.renderRange={}},_clearChildren:function(){this.container._children={},this.container.attr("items",[])},restore:function(){BI.each(this.renderedCells,function(a,b){b.el._destroy()}),this._clearChildren(),this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1},populate:function(a){a&&a!==this.options.items&&this.restore(),this._populate(a)}}),BI.CollectionView.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.collection_view",BI.CollectionView),BI.Combo=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Combo.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-combo",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!1,destroyWhenHide:!1,isNeedAdjustHeight:!0,isNeedAdjustWidth:!0,stopEvent:!1,stopPropagation:!1,adjustLength:0,adjustXOffset:0,adjustYOffset:0,hideChecker:BI.emptyFn,offsetStyle:"left",el:{},popup:{},comboClass:"bi-combo-popup",hoverClass:"bi-combo-hover"})},_init:function(){BI.Combo.superclass._init.apply(this,arguments);var a=this,b=this.options;this._initCombo(),this._initPullDownAction(),this.combo.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Combo.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Combo.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE,d))}),a.element.on("mouseenter."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&a.element.addClass(b.hoverClass)}),a.element.on("mouseleave."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.combo}]}),b.isDefaultInit&&this._assertPopupView(),BI.Resizers.add(this.getName(),BI.bind(function(){this.isViewVisible()&&this._hideView()},this))},_toggle:function(){this._assertPopupViewRender(),this.popupView.isVisible()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(","),d=function(a){b.stopEvent&&a.stopEvent(),b.stopPropagation&&a.stopPropagation()};BI.each(c,function(c,e){switch(e){case"hover":a.element.on("mouseenter."+a.getName(),function(b){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.combo),a.fireEvent(BI.Combo.EVENT_EXPAND))}),a.element.on("mouseleave."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&b.toggle===!0&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.combo),a.fireEvent(BI.Combo.EVENT_COLLAPSE))});break;case"click":var f=BI.debounce(function(c){a.combo.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&(b.toggle?a._toggle():a._popupView(),a.isViewVisible()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.combo),a.fireEvent(BI.Combo.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.combo),a.fireEvent(BI.Combo.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,!0);a.element.off(e+"."+a.getName()).on(e+"."+a.getName(),function(a){f(a),d(a)})}})},_initCombo:function(){this.combo=BI.createWidget(this.options.el)},_assertPopupView:function(){var a=this;null==this.popupView&&(this.popupView=BI.createWidget(this.options.popup,{type:"bi.popup_view"}),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a.combo.setValue(a.getValue()),a.fireEvent(BI.Combo.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popupView.setVisible(!1),BI.nextTick(function(){a.fireEvent(BI.Combo.EVENT_AFTER_INIT)}))},_assertPopupViewRender:function(){this._assertPopupView(),this._rendered||(BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._rendered=!0)},_hideIf:function(a){if(!(this.element.find(a.target).length>0)){var b=this.options.hideChecker.apply(this,[a]);b!==!1&&this._hideView()}},_hideView:function(){this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW),this.options.destroyWhenHide===!0?(this.popupView&&this.popupView.destroy(),this.popupView=null,this._rendered=!1):this.popupView&&this.popupView.invisible(),this.element.removeClass(this.options.comboClass),$(document).unbind("mousedown."+this.getName()).unbind("mousewheel."+this.getName()),this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW)},_popupView:function(){this._assertPopupViewRender(),this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW),this.popupView.visible(),this.adjustWidth(),this.adjustHeight(),this.element.addClass(this.options.comboClass),$(document).bind("mousedown."+this.getName(),BI.bind(this._hideIf,this)).bind("mousewheel."+this.getName(),BI.bind(this._hideIf,this)),this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW)},adjustWidth:function(){var a=this.options;if(this.popupView&&a.isNeedAdjustWidth===!0){this.resetListWidth("");var b=this.popupView.element.outerWidth(),c=this.element.outerWidth()||a.width;b>c+80?c+=80:b>c&&(c=b),this.resetListWidth(c<100?100:c)}},adjustHeight:function(){var a=this.options,b={};if(this.popupView){var c=this.popupView.isVisible();switch(this.popupView.visible(),a.direction){case"bottom":case"bottom,right":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight,["bottom","top","right","left"],a.offsetStyle);break;case"top":case"top,right":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight,["top","bottom","right","left"],a.offsetStyle);break;case"left":case"left,bottom":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength,a.adjustYOffset,a.isNeedAdjustHeight,["left","right","bottom","top"],a.offsetStyle);break;case"right":case"right,bottom":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength,a.adjustYOffset,a.isNeedAdjustHeight,["right","left","bottom","top"],a.offsetStyle);break;case"top,left":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight,["top","bottom","left","right"],a.offsetStyle);break;case"bottom,left":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight,["bottom","top","left","right"],a.offsetStyle);break;case"left,top":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength,a.adjustYOffset,a.isNeedAdjustHeight,["left","right","top","bottom"],a.offsetStyle);break;case"right,top":b=$.getComboPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength,a.adjustYOffset,a.isNeedAdjustHeight,["right","left","top","bottom"],a.offsetStyle);break;case"top,custom":case"custom,top":b=$.getTopAdaptPosition(this.combo,this.popupView,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight);break;case"custom,bottom":case"bottom,custom":b=$.getBottomAdaptPosition(this.combo,this.popupView,a.adjustYOffset||a.adjustLength,a.isNeedAdjustHeight);break;case"left,custom":case"custom,left":b=$.getLeftAdaptPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength),delete b.top,delete b.adaptHeight;break;case"custom,right":case"right,custom":b=$.getRightAdaptPosition(this.combo,this.popupView,a.adjustXOffset||a.adjustLength),delete b.top,delete b.adaptHeight}"adaptHeight"in b&&this.resetListHeight(b.adaptHeight),"left"in b&&this.popupView.element.css({left:b.left}),"top"in b&&this.popupView.element.css({top:b.top}),this.position=b,this.popupView.setVisible(c)}},resetListHeight:function(a){this._assertPopupView(),this.popupView.resetHeight&&this.popupView.resetHeight(a)},resetListWidth:function(a){this._assertPopupView(),this.popupView.resetWidth&&this.popupView.resetWidth(a)},populate:function(a){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.combo.populate.apply(this.combo,arguments)},_setEnable:function(a){BI.Combo.superclass._setEnable.apply(this,arguments),!a&&this.element.removeClass(this.options.hoverClass),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this._assertPopupView(),this.combo.setValue(a),this.popupView&&this.popupView.setValue(a)},getValue:function(){return this._assertPopupView(),this.popupView&&this.popupView.getValue()},isViewVisible:function(){return this.isEnabled()&&this.combo.isEnabled()&&!!this.popupView&&this.popupView.isVisible()},showView:function(){this.isEnabled()&&this.combo.isEnabled()&&this._popupView()},hideView:function(){this._hideView()},getView:function(){return this.popupView},getPopupPosition:function(){return this.position},toggle:function(){this._toggle()},destroy:function(){$(document).unbind("mousedown."+this.getName()).unbind("mousewheel."+this.getName()).unbind("mouseenter."+this.getName()).unbind("mousemove."+this.getName()).unbind("mouseleave."+this.getName()),BI.Resizers.remove(this.getName()),BI.Combo.superclass.destroy.apply(this,arguments)}}),BI.Combo.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.Combo.EVENT_CHANGE="EVENT_CHANGE",BI.Combo.EVENT_EXPAND="EVENT_EXPAND",BI.Combo.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.Combo.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.Combo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.Combo.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.Combo.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.Combo.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.combo",BI.Combo),BI.Expander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Expander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-expander",trigger:"click",toggle:!0,isDefaultInit:!1,el:{},popup:{},expanderClass:"bi-expander-popup",hoverClass:"bi-expander-hover"})},_init:function(){BI.Expander.superclass._init.apply(this,arguments);var a=this,b=this.options;this._expanded=!!b.el.open,this._initExpander(),this._initPullDownAction(),this.expander.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Expander.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Expander.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE,c,d))}),this.element.hover(function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&a.element.addClass(b.hoverClass)},function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.expander}]}),b.isDefaultInit&&this._assertPopupView(),this.expander.isOpened()===!0&&this._popupView()},_toggle:function(){this._assertPopupViewRender(),this.popupView.isVisible()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(",");BI.each(c,function(c,d){switch(d){case"hover":a.element[d](function(b){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.expander),a.fireEvent(BI.Expander.EVENT_EXPAND))},function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&b.toggle&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.expander),a.fireEvent(BI.Expander.EVENT_COLLAPSE))});break;default:d&&a.element.off(d+"."+a.getName()).on(d+"."+a.getName(),BI.debounce(function(c){a.expander.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&(b.toggle?a._toggle():a._popupView(),a.isExpanded()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.expander),a.fireEvent(BI.Expander.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.expander),a.fireEvent(BI.Expander.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,!0))}})},_initExpander:function(){this.expander=BI.createWidget(this.options.el)},_assertPopupView:function(){var a=this;null==this.popupView&&(this.popupView=BI.createWidget(this.options.popup,{type:"bi.button_group",cls:"expander-popup",layouts:[{type:"bi.vertical",hgap:0,vgap:0}]}),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Expander.EVENT_CHANGE,c,d)}),this.popupView.setVisible(this.isExpanded()),BI.nextTick(function(){a.fireEvent(BI.Expander.EVENT_AFTER_INIT)}))},_assertPopupViewRender:function(){this._assertPopupView(),this._rendered||(BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._rendered=!0)},_hideView:function(){this.fireEvent(BI.Expander.EVENT_BEFORE_HIDEVIEW),this._expanded=!1,this.expander.setOpened(!1),this.popupView&&this.popupView.invisible(),this.element.removeClass(this.options.expanderClass),this.fireEvent(BI.Expander.EVENT_AFTER_HIDEVIEW)},_popupView:function(){this._assertPopupViewRender(),this.fireEvent(BI.Expander.EVENT_BEFORE_POPUPVIEW),this._expanded=!0,this.expander.setOpened(!0),this.popupView.visible(),this.element.addClass(this.options.expanderClass),this.fireEvent(BI.Expander.EVENT_AFTER_POPUPVIEW)},populate:function(a){this.popupView&&this.popupView.populate.apply(this.popupView,arguments),this.expander.populate.apply(this.expander,arguments)},_setEnable:function(a){BI.Expander.superclass._setEnable.apply(this,arguments),!a&&this.element.removeClass(this.options.hoverClass),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this.expander.setValue(a),this.popupView&&this.popupView.setValue(a)},getValue:function(){return this.popupView?this.popupView.getValue():[]},isViewVisible:function(){return this.isEnabled()&&this.expander.isEnabled()&&!!this.popupView&&this.popupView.isVisible()},isExpanded:function(){return this._expanded},showView:function(){this.isEnabled()&&this.expander.isEnabled()&&this._popupView()},hideView:function(){this._hideView()},getView:function(){return this.popupView},getAllLeaves:function(){return this.popupView&&this.popupView.getAllLeaves()},getNodeById:function(a){return this.expander.options.id===a?this.expander:this.popupView&&this.popupView.getNodeById(a)},getNodeByValue:function(a){return this.expander.getValue()===a?this.expander:this.popupView&&this.popupView.getNodeByValue(a)},destroy:function(){BI.Expander.superclass.destroy.apply(this,arguments)}}),BI.Expander.EVENT_EXPAND="EVENT_EXPAND",BI.Expander.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.Expander.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.Expander.EVENT_CHANGE="EVENT_CHANGE",BI.Expander.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.Expander.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.Expander.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.Expander.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.Expander.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.expander",BI.Expander),BI.ComboGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ComboGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-combo-group bi-list-item",trigger:"click,hover",direction:"right",adjustLength:0,isDefaultInit:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.text_button",text:"",value:""},children:[],popup:{el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}}})},_init:function(){BI.ComboGroup.superclass._init.apply(this,arguments),this.populate(this.options.el)},populate:function(a){var b=this,c=this.options,d=c.children;if(BI.isEmpty(d))throw new Error("ComboGroup构造错误");BI.each(d,function(a,b){var d=BI.formatEL(b).el.children;b=BI.formatEL(b).el,BI.isEmpty(d)||(b.el=BI.clone(b),b.children=d,b.type="bi.combo_group",b.action=c.action,b.height=c.height,b.direction=c.direction,b.isDefaultInit=c.isDefaultInit,b.isNeedAdjustHeight=c.isNeedAdjustHeight,b.isNeedAdjustWidth=c.isNeedAdjustWidth,b.adjustLength=c.adjustLength,b.popup=c.popup)}),this.combo=BI.createWidget({type:"bi.combo",element:this,height:c.height,trigger:c.trigger,direction:c.direction,isDefaultInit:c.isDefaultInit,isNeedAdjustWidth:c.isNeedAdjustWidth,isNeedAdjustHeight:c.isNeedAdjustHeight, +adjustLength:c.adjustLength,el:a,popup:BI.extend({},c.popup,{el:BI.extend({items:d},c.popup.el)})}),this.combo.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.ComboGroup.EVENT_CHANGE,d)})},getValue:function(){return this.combo.getValue()},setValue:function(a){this.combo.setValue(a)}}),BI.ComboGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.combo_group",BI.ComboGroup),BI.VirtualGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.VirtualGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-virtual-group",items:[],layouts:[{type:"bi.center",hgap:0,vgap:0}]})},render:function(){this.populate(this.options.items)},_packageBtns:function(a){for(var b=this.options,c=b.layouts.length-1;c>0;c--)a=BI.map(a,function(a,d){return BI.extend({},b.layouts[c],{items:[BI.extend({},b.layouts[c].el,{el:BI.stripEL(d)})]})});return a},_packageItems:function(a,b){return BI.createItems(BI.makeArrayByArray(a,{}),BI.clone(b))},_packageLayout:function(a){for(var b=this.options,c=BI.deepClone(b.layouts[0]),d=BI.formatEL(c).el;d&&d.items&&!BI.isEmpty(d.items);)d=BI.formatEL(d.items[0]).el;return d.items=a,c},addItems:function(a){this.layouts.addItems(a)},prependItems:function(a){this.layouts.prependItems(a)},setValue:function(a){this.layouts.setValue(a)},getValue:function(){return this.layouts.getValue()},empty:function(){this.layouts.empty()},populate:function(a){a=a||[],this.options.items=a,a=this._packageBtns(a),this.layouts?this.layouts.populate(a):this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(a)))}}),BI.VirtualGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.virtual_group",BI.VirtualGroup),BI.Loader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Loader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-loader",direction:"top",isDefaultInit:!0,logic:{dynamic:!0,scrolly:!0},el:{type:"bi.button_group"},items:[],itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn,count:!1,prev:!1,next:{},hasPrev:BI.emptyFn,hasNext:BI.emptyFn})},_prevLoad:function(){var a=this,b=this.options;this.prev.setLoading(),b.itemsCreator.apply(this,[{times:--this.times},function(){a.prev.setLoaded(),a.prependItems.apply(a,arguments)}])},_nextLoad:function(){var a=this,b=this.options;this.next.setLoading(),b.itemsCreator.apply(this,[{times:++this.times},function(){a.next.setLoaded(),a.addItems.apply(a,arguments)}])},_init:function(){BI.Loader.superclass._init.apply(this,arguments);var a=this,b=this.options;b.itemsCreator===!1&&(b.prev=!1,b.next=!1),b.prev!==!1&&(this.prev=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.prev)),this.prev.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._prevLoad()})),this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:0,items:b.items,behaviors:{},layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Loader.EVENT_CHANGE,d)}),b.next!==!1&&(this.next=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.next)),this.next.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._nextLoad()})),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.prev,this.button_group,this.next)})))),b.isDefaultInit&&BI.isEmpty(b.items)&&BI.nextTick(BI.bind(function(){b.isDefaultInit&&BI.isEmpty(b.items)&&this.populate()},this)),BI.isNotEmptyArray(b.items)&&this.populate(b.items)},hasPrev:function(){var a=this.options;return BI.isNumber(a.count)?this.count0&&f.push(c),BI.Maskers.show(a.getName()),a.popupView.populate.apply(a.popupView,f),b.isAutoSync&&b.adapter&&b.adapter.getValue&&a.popupView.setValue(b.adapter.getValue()),a.popupView.loaded&&a.popupView.loaded(),a.fireEvent(BI.Searcher.EVENT_SEARCHING)}})}},setAdapter:function(a){this.options.adapter=a,BI.Maskers.remove(this.getName())},doSearch:function(){this.isSearching()&&this._search()},stopSearch:function(){this._stopSearch();try{this.editor.blur()}catch(a){if(!this.editor.blur)throw new Error("editor没有实现blur方法")}finally{this.editor.setValue("")}},isSearching:function(){return this._isSearching},isViewVisible:function(){return this.editor.isEnabled()&&BI.Maskers.isVisible(this.getName())},getView:function(){return this.popupView},hasMatched:function(){return this._assertPopupView(),this.popupView.hasMatched()},adjustHeight:function(){BI.Maskers.has(this.getName())&&BI.Maskers.get(this.getName()).isVisible()&&BI.Maskers.show(this.getName())},adjustView:function(){this.isViewVisible()&&BI.Maskers.show(this.getName())},setValue:function(a){this._assertPopupView(),this.popupView&&this.popupView.setValue(a)},getKeyword:function(){return this.editor.getValue()},getKeywords:function(){return this.editor.getKeywords()},getValue:function(){var a=this.options;return a.isAutoSync&&a.adapter&&a.adapter.getValue?a.adapter.getValue():this.isSearching()?this.popupView.getValue():a.adapter&&a.adapter.getValue?a.adapter.getValue():this.popupView.getValue()},populate:function(a,b,c){var d=this.options;this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),d.isAutoSync&&d.adapter&&d.adapter.getValue&&this.popupView.setValue(d.adapter.getValue())},empty:function(){this.popupView&&this.popupView.empty()},destroy:function(){BI.Maskers.remove(this.getName()),BI.Searcher.superclass.destroy.apply(this,arguments)}}),BI.Searcher.EVENT_CHANGE="EVENT_CHANGE",BI.Searcher.EVENT_START="EVENT_START",BI.Searcher.EVENT_STOP="EVENT_STOP",BI.Searcher.EVENT_PAUSE="EVENT_PAUSE",BI.Searcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.Searcher.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.shortcut("bi.searcher",BI.Searcher),BI.Switcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Switcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switcher",direction:BI.Direction.Top,trigger:"click",toggle:!0,el:{},popup:{},adapter:null,masker:{},switcherClass:"bi-switcher-popup",hoverClass:"bi-switcher-hover"})},_init:function(){BI.Switcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this._initSwitcher(),this._initPullDownAction(),this.switcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Switcher.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Switcher.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE,c,d))}),this.element.hover(function(){a.isEnabled()&&a.switcher.isEnabled()&&a.element.addClass(b.hoverClass)},function(){a.isEnabled()&&a.switcher.isEnabled()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.switcher}]}),b.isDefaultInit&&this._assertPopupView()},_toggle:function(){this._assertPopupView(),this.isExpanded()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(",");BI.each(c,function(c,d){switch(d){case"hover":a.element[d](function(b){a.isEnabled()&&a.switcher.isEnabled()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_EXPAND))},function(){a.isEnabled()&&a.switcher.isEnabled()&&b.toggle&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_COLLAPSE))});break;default:d&&a.element.off(d+"."+a.getName()).on(d+"."+a.getName(),BI.debounce(function(c){a.switcher.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.switcher.isEnabled()&&(b.toggle?a._toggle():a._popupView(),a.isExpanded()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,!0))}})},_initSwitcher:function(){this.switcher=BI.createWidget(this.options.el)},_assertPopupView:function(){var a=this,b=this.options;this._created||(this.popupView=BI.createWidget(b.popup,{type:"bi.button_group",element:b.adapter&&BI.Maskers.create(this.getName(),b.adapter,BI.extend({container:this},b.masker)),cls:"switcher-popup",layouts:[{type:"bi.vertical",hgap:0,vgap:0}]}),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Switcher.EVENT_CHANGE,c,d)}),b.direction===BI.Direction.Custom||b.adapter||BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._created=!0,BI.nextTick(function(){a.fireEvent(BI.Switcher.EVENT_AFTER_INIT)}))},_hideView:function(){this.fireEvent(BI.Switcher.EVENT_BEFORE_HIDEVIEW);var a=this,b=this.options;b.adapter?BI.Maskers.hide(a.getName()):a.popupView&&a.popupView.setVisible(!1),BI.nextTick(function(){b.adapter?BI.Maskers.hide(a.getName()):a.popupView&&a.popupView.setVisible(!1),a.element.removeClass(b.switcherClass),a.fireEvent(BI.Switcher.EVENT_AFTER_HIDEVIEW)})},_popupView:function(){var a=this,b=this.options;this._assertPopupView(),this.fireEvent(BI.Switcher.EVENT_BEFORE_POPUPVIEW),b.adapter?BI.Maskers.show(this.getName()):a.popupView.setVisible(!0),BI.nextTick(function(c){b.adapter?BI.Maskers.show(c):a.popupView.setVisible(!0),a.element.addClass(b.switcherClass),a.fireEvent(BI.Switcher.EVENT_AFTER_POPUPVIEW)},this.getName())},populate:function(a){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.switcher.populate.apply(this.switcher,arguments)},_setEnable:function(a){BI.Switcher.superclass._setEnable.apply(this,arguments),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this._assertPopupView(),this.switcher.setValue(a),this.popupView&&this.popupView.setValue(a)},getValue:function(){return this._assertPopupView(),this.popupView?this.popupView.getValue():[]},setAdapter:function(a){this.options.adapter=a,BI.Maskers.remove(this.getName())},isViewVisible:function(){return this.isEnabled()&&this.switcher.isEnabled()&&(this.options.adapter?BI.Maskers.isVisible(this.getName()):this.popupView&&this.popupView.isVisible())},isExpanded:function(){return this.isViewVisible()},showView:function(){this.isEnabled()&&this.switcher.isEnabled()&&this._popupView()},hideView:function(){this._hideView()},getView:function(){return this.popupView},adjustView:function(){this.isViewVisible()&&BI.Maskers.show(this.getName())},getAllLeaves:function(){return this.popupView&&this.popupView.getAllLeaves()},getNodeById:function(a){return this.switcher.attr("id")===a?this.switcher:this.popupView&&this.popupView.getNodeById(a)},getNodeByValue:function(a){return this.switcher.getValue()===a?this.switcher:this.popupView&&this.popupView.getNodeByValue(a)},empty:function(){this.popupView&&this.popupView.empty()},destroy:function(){BI.Switcher.superclass.destroy.apply(this,arguments)}}),BI.Switcher.EVENT_EXPAND="EVENT_EXPAND",BI.Switcher.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.Switcher.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.Switcher.EVENT_CHANGE="EVENT_CHANGE",BI.Switcher.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.Switcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.Switcher.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.Switcher.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.Switcher.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.switcher",BI.Switcher),BI.Tab=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Tab.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tab",direction:"top",single:!1,logic:{dynamic:!1},defaultShowIndex:!1,tab:!1,cardCreator:function(a){return BI.createWidget()}})},render:function(){var a=this,b=this.options;BI.isObject(b.tab)&&(this.tab=BI.createWidget(this.options.tab,{type:"bi.button_group"}),this.tab.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})),this.cardMap={},this.layout=BI.createWidget({type:"bi.card"}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.tab,this.layout)}))));var c=new BI.ShowListener({eventObj:this.tab,cardLayout:this.layout,cardCreator:function(c){var d=b.cardCreator.apply(a,arguments);return a.cardMap[c]=d,d},afterCardShow:function(b){a._deleteOtherCards(b),a.curr=b}});c.on(BI.ShowListener.EVENT_CHANGE,function(b){a.fireEvent(BI.Tab.EVENT_CHANGE,b,a)})},_deleteOtherCards:function(a){var b=this,c=this.options;c.single===!0&&BI.each(this.cardMap,function(c,d){c!==a+""&&(b.layout.deleteCardByName(c),delete b.cardMap[c])})},_assertCard:function(a){if(!this.layout.isCardExisted(a)){var b=this.options.cardCreator(a);this.cardMap[a]=b,this.layout.addCardByName(a,b)}},mounted:function(){var a=this.options;a.defaultShowIndex!==!1&&this.setSelect(a.defaultShowIndex)},setSelect:function(a){this.tab&&this.tab.setValue(a),this._assertCard(a),this.layout.showCardByName(a),this._deleteOtherCards(a),this.curr!==a&&(this.curr=a)},removeTab:function(a){var b=this;this.options;BI.any(this.cardMap,function(c,d){if(BI.isEqual(c,a+""))return b.layout.deleteCardByName(c),delete b.cardMap[c],!0})},getSelect:function(){return this.curr},getSelectedTab:function(){return this.layout.getShowingCard()},getTab:function(a){return this._assertCard(a),this.layout.getCardByName(a)},setValue:function(a){var b=this.layout.getShowingCard();b&&b.setValue(a)},getValue:function(){var a=this.layout.getShowingCard();if(a)return a.getValue()},populate:function(){var a=this.layout.getShowingCard();if(a)return a.populate&&a.populate.apply(a,arguments)},empty:function(){this.layout.deleteAllCard(),this.cardMap={}},destroy:function(){this.cardMap={},BI.Tab.superclass.destroy.apply(this,arguments)}}),BI.Tab.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.tab",BI.Tab),BI.EL=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.EL.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-el",el:{},layout:{}})},_init:function(){BI.EL.superclass._init.apply(this,arguments);var a=this,b=this.options;this.ele=BI.createWidget(b.el),BI.createWidget(b.layout,{type:"bi.adaptive",element:this,items:[this.ele]}),this.ele.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.ele.setValue(a)},getValue:function(){return this.ele.getValue()},populate:function(){this.ele.populate.apply(this,arguments)}}),BI.shortcut("bi.el",BI.EL),function(a){this.CodeMirror=a()}(function(){"use strict";function a(c,d){if(!(this instanceof a))return new a(c,d);this.options=d=d?He(d):{},He(Vf,d,!1),n(d);var e=d.value;"string"==typeof e&&(e=new rg(e,d.mode)),this.doc=e;var f=new a.inputStyles[d.inputStyle](this),g=this.display=new b(c,e,f);g.wrapper.CodeMirror=this,j(this),h(this),d.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),d.autofocus&&!xf&&g.input.focus(),r(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new ze,keySeq:null,specialChars:null};var i=this;nf&&of<11&&setTimeout(function(){i.display.input.reset(!0)},20),Pb(this),Te(),tb(this),this.curOp.forceUpdate=!0,Ud(this,e),d.autofocus&&!xf||i.hasFocus()?setTimeout(Ie(nc,this),20):oc(this);for(var k in Wf)Wf.hasOwnProperty(k)&&Wf[k](this,d[k],Xf);w(this),d.finishInit&&d.finishInit(this);for(var l=0;l<_f.length;++l)_f[l](this);vb(this),pf&&d.lineWrapping&&"optimizelegibility"==getComputedStyle(g.lineDiv).textRendering&&(g.lineDiv.style.textRendering="auto")}function b(a,b,c){var d=this;this.input=c,d.scrollbarFiller=Me("div",null,"CodeMirror-scrollbar-filler"),d.scrollbarFiller.setAttribute("cm-not-content","true"),d.gutterFiller=Me("div",null,"CodeMirror-gutter-filler"),d.gutterFiller.setAttribute("cm-not-content","true"),d.lineDiv=Me("div",null,"CodeMirror-code"),d.selectionDiv=Me("div",null,null,"position: relative; z-index: 1"),d.cursorDiv=Me("div",null,"CodeMirror-cursors"),d.measure=Me("div",null,"CodeMirror-measure"),d.lineMeasure=Me("div",null,"CodeMirror-measure"),d.lineSpace=Me("div",[d.measure,d.lineMeasure,d.selectionDiv,d.cursorDiv,d.lineDiv],null,"position: relative; outline: none"),d.mover=Me("div",[Me("div",[d.lineSpace],"CodeMirror-lines")],null,"position: relative"),d.sizer=Me("div",[d.mover],"CodeMirror-sizer"),d.sizerWidth=null,d.heightForcer=Me("div",null,null,"position: absolute; height: "+Bg+"px; width: 1px;"),d.gutters=Me("div",null,"CodeMirror-gutters"),d.lineGutter=null,d.scroller=Me("div",[d.sizer,d.heightForcer,d.gutters],"CodeMirror-scroll"),d.scroller.setAttribute("tabIndex","-1"),d.wrapper=Me("div",[d.scrollbarFiller,d.gutterFiller,d.scroller],"CodeMirror"),nf&&of<8&&(d.gutters.style.zIndex=-1,d.scroller.style.paddingRight=0),pf||kf&&xf||(d.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(d.wrapper):a(d.wrapper)),d.viewFrom=d.viewTo=b.first,d.reportedViewFrom=d.reportedViewTo=b.first,d.view=[],d.renderedView=null,d.externalMeasured=null,d.viewOffset=0,d.lastWrapHeight=d.lastWrapWidth=0,d.updateLineNumbers=null,d.nativeBarWidth=d.barHeight=d.barWidth=0,d.scrollbarsClipped=!1,d.lineNumWidth=d.lineNumInnerWidth=d.lineNumChars=null,d.alignWidgets=!1,d.cachedCharWidth=d.cachedTextHeight=d.cachedPaddingH=null,d.maxLine=null,d.maxLineLength=0,d.maxLineChanged=!1,d.wheelDX=d.wheelDY=d.wheelStartX=d.wheelStartY=null,d.shift=!1,d.selForContextMenu=null,d.activeTouch=null,c.init(d)}function c(b){b.doc.mode=a.getMode(b.options,b.doc.modeOption),d(b)}function d(a){a.doc.iter(function(a){a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null)}),a.doc.frontier=a.doc.first,Ma(a,100),a.state.modeGen++,a.curOp&&Ib(a)}function e(a){a.options.lineWrapping?(Rg(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(Qg(a.display.wrapper,"CodeMirror-wrap"),m(a)),g(a),Ib(a),gb(a),setTimeout(function(){s(a)},100)}function f(a){var b=rb(a.display),c=a.options.lineWrapping,d=c&&Math.max(5,a.display.scroller.clientWidth/sb(a.display)-3);return function(e){if(sd(a.doc,e))return 0;var f=0;if(e.widgets)for(var g=0;gb.maxLineLength&&(b.maxLineLength=c,b.maxLine=a)})}function n(a){var b=De(a.gutters,"CodeMirror-linenumbers");b==-1&&a.lineNumbers?a.gutters=a.gutters.concat(["CodeMirror-linenumbers"]):b>-1&&!a.lineNumbers&&(a.gutters=a.gutters.slice(0),a.gutters.splice(b,1))}function o(a){var b=a.display,c=b.gutters.offsetWidth,d=Math.round(a.doc.height+Ra(a.display));return{clientHeight:b.scroller.clientHeight,viewHeight:b.wrapper.clientHeight,scrollWidth:b.scroller.scrollWidth,clientWidth:b.scroller.clientWidth,viewWidth:b.wrapper.clientWidth,barLeft:a.options.fixedGutter?c:0,docHeight:d,scrollHeight:d+Ta(a)+b.barHeight,nativeBarWidth:b.nativeBarWidth,gutterWidth:c}}function p(a,b,c){this.cm=c;var d=this.vert=Me("div",[Me("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),e=this.horiz=Me("div",[Me("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");a(d),a(e),xg(d,"scroll",function(){d.clientHeight&&b(d.scrollTop,"vertical")}),xg(e,"scroll",function(){e.clientWidth&&b(e.scrollLeft,"horizontal")}),this.checkedOverlay=!1,nf&&of<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function q(){}function r(b){b.display.scrollbars&&(b.display.scrollbars.clear(),b.display.scrollbars.addClass&&Qg(b.display.wrapper,b.display.scrollbars.addClass)),b.display.scrollbars=new a.scrollbarModel[b.options.scrollbarStyle](function(a){b.display.wrapper.insertBefore(a,b.display.scrollbarFiller),xg(a,"mousedown",function(){b.state.focused&&setTimeout(function(){b.display.input.focus()},0)}),a.setAttribute("cm-not-content","true")},function(a,c){"horizontal"==c?bc(b,a):ac(b,a)},b),b.display.scrollbars.addClass&&Rg(b.display.wrapper,b.display.scrollbars.addClass)}function s(a,b){b||(b=o(a));var c=a.display.barWidth,d=a.display.barHeight;t(a,b);for(var e=0;e<4&&c!=a.display.barWidth||d!=a.display.barHeight;e++)c!=a.display.barWidth&&a.options.lineWrapping&&F(a),t(a,o(a)),c=a.display.barWidth,d=a.display.barHeight}function t(a,b){var c=a.display,d=c.scrollbars.update(b);c.sizer.style.paddingRight=(c.barWidth=d.right)+"px",c.sizer.style.paddingBottom=(c.barHeight=d.bottom)+"px",d.right&&d.bottom?(c.scrollbarFiller.style.display="block",c.scrollbarFiller.style.height=d.bottom+"px",c.scrollbarFiller.style.width=d.right+"px"):c.scrollbarFiller.style.display="",d.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(c.gutterFiller.style.display="block",c.gutterFiller.style.height=d.bottom+"px",c.gutterFiller.style.width=b.gutterWidth+"px"):c.gutterFiller.style.display=""}function u(a,b,c){var d=c&&null!=c.top?Math.max(0,c.top):a.scroller.scrollTop;d=Math.floor(d-Qa(a));var e=c&&null!=c.bottom?c.bottom:d+a.wrapper.clientHeight,f=$d(b,d),g=$d(b,e);if(c&&c.ensure){var h=c.ensure.from.line,i=c.ensure.to.line;h=g&&(f=$d(b,_d(Vd(b,i))-a.wrapper.clientHeight),g=i)}return{from:f,to:Math.max(g,f+1)}}function v(a){var b=a.display,c=b.view;if(b.alignWidgets||b.gutters.firstChild&&a.options.fixedGutter){for(var d=y(b)-b.scroller.scrollLeft+a.doc.scrollLeft,e=b.gutters.offsetWidth,f=d+"px",g=0;g=c.viewFrom&&b.visible.to<=c.viewTo&&(null==c.updateLineNumbers||c.updateLineNumbers>=c.viewTo)&&c.renderedView==c.view&&0==Ob(a))return!1;w(a)&&(Kb(a),b.dims=H(a));var e=d.first+d.size,f=Math.max(b.visible.from-a.options.viewportMargin,d.first),g=Math.min(e,b.visible.to+a.options.viewportMargin);c.viewFromg&&c.viewTo-g<20&&(g=Math.min(e,c.viewTo)),Ef&&(f=qd(a.doc,f),g=rd(a.doc,g));var h=f!=c.viewFrom||g!=c.viewTo||c.lastWrapHeight!=b.wrapperHeight||c.lastWrapWidth!=b.wrapperWidth;Nb(a,f,g),c.viewOffset=_d(Vd(a.doc,c.viewFrom)),a.display.mover.style.top=c.viewOffset+"px";var i=Ob(a);if(!h&&0==i&&!b.force&&c.renderedView==c.view&&(null==c.updateLineNumbers||c.updateLineNumbers>=c.viewTo))return!1;var j=Pe();return i>4&&(c.lineDiv.style.display="none"),I(a,c.updateLineNumbers,b.dims),i>4&&(c.lineDiv.style.display=""),c.renderedView=c.view,j&&Pe()!=j&&j.offsetHeight&&j.focus(),Ne(c.cursorDiv),Ne(c.selectionDiv),c.gutters.style.height=0,h&&(c.lastWrapHeight=b.wrapperHeight,c.lastWrapWidth=b.wrapperWidth,Ma(a,400)),c.updateLineNumbers=null,!0}function C(a,b){for(var c=b.viewport,d=!0;(d&&a.options.lineWrapping&&b.oldDisplayWidth!=Ua(a)||(c&&null!=c.top&&(c={top:Math.min(a.doc.height+Ra(a.display)-Va(a),c.top)}),b.visible=u(a.display,a.doc,c),!(b.visible.from>=a.display.viewFrom&&b.visible.to<=a.display.viewTo)))&&B(a,b);d=!1){F(a);var e=o(a);Ha(a),E(a,e),s(a,e)}b.signal(a,"update",a),a.display.viewFrom==a.display.reportedViewFrom&&a.display.viewTo==a.display.reportedViewTo||(b.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}function D(a,b){var c=new z(a,b);if(B(a,c)){F(a),C(a,c);var d=o(a);Ha(a),E(a,d),s(a,d),c.finish()}}function E(a,b){a.display.sizer.style.minHeight=b.docHeight+"px";var c=b.docHeight+a.display.barHeight;a.display.heightForcer.style.top=c+"px",a.display.gutters.style.height=Math.max(c+Ta(a),b.clientHeight)+"px"}function F(a){for(var b=a.display,c=b.lineDiv.offsetTop,d=0;d.001||i<-.001)&&(Yd(f.line,e),G(f.line),f.rest))for(var j=0;j-1&&(m=!1),J(a,l,j,c)),m&&(Ne(l.lineNumber),l.lineNumber.appendChild(document.createTextNode(x(a.options,j)))),h=l.node.nextSibling}else{var n=R(a,l,j,c);g.insertBefore(n,h)}j+=l.size}for(;h;)h=d(h)}function J(a,b,c,d){for(var e=0;e1&&(Hf&&Hf.join("\n")==b?i=d.ranges.length%Hf.length==0&&Ee(Hf,Ug):h.length==d.ranges.length&&(i=Ee(h,function(a){return[a]})));for(var j=d.ranges.length-1;j>=0;j--){var k=d.ranges[j],l=k.from(),m=k.to();k.empty()&&(c&&c>0?l=Ff(l.line,l.ch-c):a.state.overwrite&&!g&&(m=Ff(m.line,Math.min(Vd(f,m.line).text.length,m.ch+Ce(h).length))));var n=a.curOp.updateInput,o={from:l,to:m,text:i?i[j%i.length]:h,origin:e||(g?"paste":a.state.cutIncoming?"cut":"+input")};wc(a.doc,o),te(a,"inputRead",a,o)}b&&!g&&aa(a,b),Ic(a),a.curOp.updateInput=n,a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=!1}function _(a,b){var c=a.clipboardData&&a.clipboardData.getData("text/plain");if(c)return a.preventDefault(),Cb(b,function(){$(b,c,0,null,"paste")}),!0}function aa(a,b){if(a.options.electricChars&&a.options.smartIndent)for(var c=a.doc.sel,d=c.ranges.length-1;d>=0;d--){var e=c.ranges[d];if(!(e.head.ch>100||d&&c.ranges[d-1].head.line==e.head.line)){var f=a.getModeAt(e.head),g=!1;if(f.electricChars){for(var h=0;h-1){g=Kc(a,e.head.line,"smart");break}}else f.electricInput&&f.electricInput.test(Vd(a.doc,e.head.line).text.slice(0,e.head.ch))&&(g=Kc(a,e.head.line,"smart"));g&&te(a,"electricInput",a,e.head.line)}}}function ba(a){for(var b=[],c=[],d=0;d=0){var g=X(f.from(),e.from()),h=W(f.to(),e.to()),i=f.empty()?e.from()==e.head:f.from()==f.head;d<=b&&--b,a.splice(--d,2,new ma(i?h:g,i?g:h))}}return new la(a,b)}function oa(a,b){return new la([new ma(a,b||a)],0)}function pa(a,b){return Math.max(a.first,Math.min(b,a.first+a.size-1))}function qa(a,b){if(b.linec?Ff(c,Vd(a,c).text.length):ra(b,Vd(a,b.line).text.length)}function ra(a,b){var c=a.ch;return null==c||c>b?Ff(a.line,b):c<0?Ff(a.line,0):a}function sa(a,b){return b>=a.first&&b=f.ch:j.to>f.ch))){if(d&&(zg(k,"beforeCursorEnter"),k.explicitlyCleared)){if(h.markedSpans){--i;continue}break}if(!k.atomic)continue;var l=k.find(g<0?-1:1);if(0==Gf(l,f)&&(l.ch+=g,l.ch<0?l=l.line>a.first?qa(a,Ff(l.line-1)):null:l.ch>h.text.length&&(l=l.line3&&(d(n,p.top,null,p.bottom),n=j,p.bottomi.bottom||l.bottom==i.bottom&&l.right>i.right)&&(i=l),n0?b.blinker=setInterval(function(){b.cursorDiv.style.visibility=(c=!c)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(b.cursorDiv.style.visibility="hidden")}}function Ma(a,b){a.doc.mode.startState&&a.doc.frontier=a.display.viewTo)){var c=+new Date+a.options.workTime,d=bg(b.mode,Pa(a,b.frontier)),e=[];b.iter(b.frontier,Math.min(b.first+b.size,a.display.viewTo+500),function(f){if(b.frontier>=a.display.viewFrom){var g=f.styles,h=Ed(a,f,d,!0);f.styles=h.styles;var i=f.styleClasses,j=h.classes;j?f.styleClasses=j:i&&(f.styleClasses=null);for(var k=!g||g.length!=f.styles.length||i!=j&&(!i||!j||i.bgClass!=j.bgClass||i.textClass!=j.textClass),l=0;!k&&lc)return Ma(a,a.options.workDelay),!0}),e.length&&Cb(a,function(){for(var b=0;bg;--h){if(h<=f.first)return f.first;var i=Vd(f,h-1);if(i.stateAfter&&(!c||h<=f.frontier))return h;var j=Gg(i.text,null,a.options.tabSize);(null==e||d>j)&&(e=h-1,d=j)}return e}function Pa(a,b,c){var d=a.doc,e=a.display;if(!d.mode.startState)return!0;var f=Oa(a,b,c),g=f>d.first&&Vd(d,f-1).stateAfter;return g=g?bg(d.mode,g):cg(d.mode),d.iter(f,b,function(c){Gd(a,c.text,g);var h=f==b-1||f%5==0||f>=e.viewFrom&&f2&&f.push((i.bottom+j.top)/2-c.top)}}f.push(c.bottom-c.top)}}function Xa(a,b,c){if(a.line==b)return{map:a.measure.map,cache:a.measure.cache};for(var d=0;dc)return{map:a.measure.maps[d],cache:a.measure.caches[d],before:!0}}function Ya(a,b){b=od(b);var c=Zd(b),d=a.display.externalMeasured=new Gb(a.doc,b,c);d.lineN=c;var e=d.built=Id(a,d);return d.text=e.pre,Oe(a.display.lineMeasure,e.pre),d}function Za(a,b,c,d){return ab(a,_a(a,b),c,d)}function $a(a,b){if(b>=a.display.viewFrom&&b=c.lineN&&bb)&&(f=j-i,e=f-1,b>=j&&(g="right")),null!=e){if(d=a[h+2],i==j&&c==(d.insertLeft?"left":"right")&&(g=c),"left"==c&&0==e)for(;h&&a[h-2]==a[h-3]&&a[h-1].insertLeft;)d=a[(h-=3)+2],g="left";if("right"==c&&e==j-i)for(;h0&&(j=d="right");var l;e=a.options.lineWrapping&&(l=g.getClientRects()).length>1?l["right"==d?l.length-1:0]:g.getBoundingClientRect()}if(nf&&of<9&&!h&&(!e||!e.left&&!e.right)){var m=g.parentNode.getClientRects()[0];e=m?{left:m.left,right:m.left+sb(a.display),top:m.top,bottom:m.bottom}:Lf}for(var n=e.top-b.rect.top,o=e.bottom-b.rect.top,p=(n+o)/2,q=b.view.measure.heights,k=0;kc.from?g(a-1):g(a,d)}d=d||Vd(a.doc,b.line),e||(e=_a(a,d));var i=ae(d),j=b.ch;if(!i)return g(j);var k=ff(i,j),l=h(j,k);return null!=Zg&&(l.other=h(j,Zg)),l}function nb(a,b){var c=0,b=qa(a.doc,b);a.options.lineWrapping||(c=sb(a.display)*b.ch);var d=Vd(a.doc,b.line),e=_d(d)+Qa(a.display);return{left:c,right:c,top:e,bottom:e+d.height}}function ob(a,b,c,d){var e=Ff(a,b);return e.xRel=d,c&&(e.outside=!0),e}function pb(a,b,c){var d=a.doc;if(c+=a.display.viewOffset,c<0)return ob(d.first,0,!0,-1);var e=$d(d,c),f=d.first+d.size-1;if(e>f)return ob(d.first+d.size-1,Vd(d,f).text.length,!0,1);b<0&&(b=0);for(var g=Vd(d,e);;){var h=qb(a,g,e,b,c),i=md(g),j=i&&i.find(0,!0);if(!i||!(h.ch>j.from.ch||h.ch==j.from.ch&&h.xRel>0))return h;e=Zd(g=j.to.line)}}function qb(a,b,c,d,e){function f(d){var e=mb(a,Ff(c,d),"line",b,j);return h=!0,g>e.bottom?e.left-i:gq)return ob(c,n,r,1);for(;;){if(k?n==m||n==hf(b,m,1):n-m<=1){for(var s=d1?1:0);return u}var v=Math.ceil(l/2),w=m+v;if(k){w=m;for(var x=0;xd?(n=w,q=y,(r=h)&&(q+=1e3),l=v):(m=w,o=y,p=h,l-=v)}}function rb(a){if(null!=a.cachedTextHeight)return a.cachedTextHeight;if(null==If){If=Me("pre");for(var b=0;b<49;++b)If.appendChild(document.createTextNode("x")),If.appendChild(Me("br"));If.appendChild(document.createTextNode("x"))}Oe(a.measure,If);var c=If.offsetHeight/50;return c>3&&(a.cachedTextHeight=c),Ne(a.measure),c||1}function sb(a){if(null!=a.cachedCharWidth)return a.cachedCharWidth;var b=Me("span","xxxxxxxxxx"),c=Me("pre",[b]);Oe(a.measure,c);var d=b.getBoundingClientRect(),e=(d.right-d.left)/10;return e>2&&(a.cachedCharWidth=e),e||10}function tb(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Nf},Mf?Mf.ops.push(a.curOp):a.curOp.ownsGroup=Mf={ops:[a.curOp],delayedCallbacks:[]}}function ub(a){var b=a.delayedCallbacks,c=0;do{for(;c=c.viewTo)||c.maxLineChanged&&b.options.lineWrapping,a.update=a.mustUpdate&&new z(b,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function yb(a){a.updatedDisplay=a.mustUpdate&&B(a.cm,a.update)}function zb(a){var b=a.cm,c=b.display;a.updatedDisplay&&F(b),a.barMeasure=o(b),c.maxLineChanged&&!b.options.lineWrapping&&(a.adjustWidthTo=Za(b,c.maxLine,c.maxLine.text.length).left+3,b.display.sizerWidth=a.adjustWidthTo,a.barMeasure.scrollWidth=Math.max(c.scroller.clientWidth,c.sizer.offsetLeft+a.adjustWidthTo+Ta(b)+b.display.barWidth),a.maxScrollLeft=Math.max(0,c.sizer.offsetLeft+a.adjustWidthTo-Ua(b))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=c.input.prepareSelection())}function Ab(a){var b=a.cm;null!=a.adjustWidthTo&&(b.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeftb)&&(e.updateLineNumbers=b), a.curOp.viewChanged=!0,b>=e.viewTo)Ef&&qd(a.doc,b)e.viewFrom?Kb(a):(e.viewFrom+=d,e.viewTo+=d);else if(b<=e.viewFrom&&c>=e.viewTo)Kb(a);else if(b<=e.viewFrom){var f=Mb(a,c,c+d,1);f?(e.view=e.view.slice(f.index),e.viewFrom=f.lineN,e.viewTo+=d):Kb(a)}else if(c>=e.viewTo){var f=Mb(a,b,b,-1);f?(e.view=e.view.slice(0,f.index),e.viewTo=f.lineN):Kb(a)}else{var g=Mb(a,b,b,-1),h=Mb(a,c,c+d,1);g&&h?(e.view=e.view.slice(0,g.index).concat(Hb(a,g.lineN,h.lineN)).concat(e.view.slice(h.index)),e.viewTo+=d):Kb(a)}var i=e.externalMeasured;i&&(c=e.lineN&&b=d.viewTo)){var f=d.view[Lb(a,b)];if(null!=f.node){var g=f.changes||(f.changes=[]);De(g,c)==-1&&g.push(c)}}}function Kb(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function Lb(a,b){if(b>=a.display.viewTo)return null;if(b-=a.display.viewFrom,b<0)return null;for(var c=a.display.view,d=0;d0){if(f==g.length-1)return null;e=i+g[f].size-b,f++}else e=i-b;b+=e,c+=e}for(;qd(a.doc,c)!=c;){if(f==(d<0?0:g.length-1))return null;c+=d*g[f-(d<0?1:0)].size,f+=d}return{index:f,lineN:c}}function Nb(a,b,c){var d=a.display,e=d.view;0==e.length||b>=d.viewTo||c<=d.viewFrom?(d.view=Hb(a,b,c),d.viewFrom=b):(d.viewFrom>b?d.view=Hb(a,b,d.viewFrom).concat(d.view):d.viewFromc&&(d.view=d.view.slice(0,Lb(a,c)))),d.viewTo=c}function Ob(a){for(var b=a.display.view,c=0,d=0;d400}var e=a.display;xg(e.scroller,"mousedown",Db(a,Ub)),nf&&of<11?xg(e.scroller,"dblclick",Db(a,function(b){if(!ve(a,b)){var c=Tb(a,b);if(c&&!Zb(a,b)&&!Sb(a.display,b)){ug(b);var d=a.findWordAt(c);va(a.doc,d.anchor,d.head)}}})):xg(e.scroller,"dblclick",function(b){ve(a,b)||ug(b)}),Cf||xg(e.scroller,"contextmenu",function(b){pc(a,b)});var f,g={end:0};xg(e.scroller,"touchstart",function(a){if(!c(a)){clearTimeout(f);var b=+new Date;e.activeTouch={start:b,moved:!1,prev:b-g.end<=300?g:null},1==a.touches.length&&(e.activeTouch.left=a.touches[0].pageX,e.activeTouch.top=a.touches[0].pageY)}}),xg(e.scroller,"touchmove",function(){e.activeTouch&&(e.activeTouch.moved=!0)}),xg(e.scroller,"touchend",function(c){var f=e.activeTouch;if(f&&!Sb(e,c)&&null!=f.left&&!f.moved&&new Date-f.start<300){var g,h=a.coordsChar(e.activeTouch,"page");g=!f.prev||d(f,f.prev)?new ma(h,h):!f.prev.prev||d(f,f.prev.prev)?a.findWordAt(h):new ma(Ff(h.line,0),qa(a.doc,Ff(h.line+1,0))),a.setSelection(g.anchor,g.head),a.focus(),ug(c)}b()}),xg(e.scroller,"touchcancel",b),xg(e.scroller,"scroll",function(){e.scroller.clientHeight&&(ac(a,e.scroller.scrollTop),bc(a,e.scroller.scrollLeft,!0),zg(a,"scroll",a))}),xg(e.scroller,"mousewheel",function(b){cc(a,b)}),xg(e.scroller,"DOMMouseScroll",function(b){cc(a,b)}),xg(e.wrapper,"scroll",function(){e.wrapper.scrollTop=e.wrapper.scrollLeft=0}),e.dragFunctions={simple:function(b){ve(a,b)||wg(b)},start:function(b){_b(a,b)},drop:Db(a,$b)};var h=e.input.getField();xg(h,"keyup",function(b){kc.call(a,b)}),xg(h,"keydown",Db(a,ic)),xg(h,"keypress",Db(a,lc)),xg(h,"focus",Ie(nc,a)),xg(h,"blur",Ie(oc,a))}function Qb(b,c,d){var e=d&&d!=a.Init;if(!c!=!e){var f=b.display.dragFunctions,g=c?xg:yg;g(b.display.scroller,"dragstart",f.start),g(b.display.scroller,"dragenter",f.simple),g(b.display.scroller,"dragover",f.simple),g(b.display.scroller,"drop",f.drop)}}function Rb(a){var b=a.display;b.lastWrapHeight==b.wrapper.clientHeight&&b.lastWrapWidth==b.wrapper.clientWidth||(b.cachedCharWidth=b.cachedTextHeight=b.cachedPaddingH=null,b.scrollbarsClipped=!1,a.setSize())}function Sb(a,b){for(var c=re(b);c!=a.wrapper;c=c.parentNode)if(!c||1==c.nodeType&&"true"==c.getAttribute("cm-ignore-events")||c.parentNode==a.sizer&&c!=a.mover)return!0}function Tb(a,b,c,d){var e=a.display;if(!c&&"true"==re(b).getAttribute("cm-not-content"))return null;var f,g,h=e.lineSpace.getBoundingClientRect();try{f=b.clientX-h.left,g=b.clientY-h.top}catch(b){return null}var i,j=pb(a,f,g);if(d&&1==j.xRel&&(i=Vd(a.doc,j.line).text).length==j.ch){var k=Gg(i,i.length,a.options.tabSize)-i.length;j=Ff(j.line,Math.max(0,Math.round((f-Sa(a.display).left)/sb(a.display))-k))}return j}function Ub(a){var b=this,c=b.display;if(!(c.activeTouch&&c.input.supportsTouch()||ve(b,a))){if(c.shift=a.shiftKey,Sb(c,a))return void(pf||(c.scroller.draggable=!1,setTimeout(function(){c.scroller.draggable=!0},100)));if(!Zb(b,a)){var d=Tb(b,a);switch(window.focus(),se(a)){case 1:d?Vb(b,a,d):re(a)==c.scroller&&ug(a);break;case 2:pf&&(b.state.lastMiddleDown=+new Date),d&&va(b.doc,d),setTimeout(function(){c.input.focus()},20),ug(a);break;case 3:Cf?pc(b,a):mc(b)}}}}function Vb(a,b,c){nf?setTimeout(Ie(Y,a),0):a.curOp.focus=Pe();var d,e=+new Date;Kf&&Kf.time>e-400&&0==Gf(Kf.pos,c)?d="triple":Jf&&Jf.time>e-400&&0==Gf(Jf.pos,c)?(d="double",Kf={time:e,pos:c}):(d="single",Jf={time:e,pos:c});var f,g=a.doc.sel,h=yf?b.metaKey:b.ctrlKey;a.options.dragDrop&&Tg&&!Z(a)&&"single"==d&&(f=g.contains(c))>-1&&(Gf((f=g.ranges[f]).from(),c)<0||c.xRel>0)&&(Gf(f.to(),c)>0||c.xRel<0)?Wb(a,b,c,h):Xb(a,b,c,d,h)}function Wb(a,b,c,d){var e=a.display,f=+new Date,g=Db(a,function(h){pf&&(e.scroller.draggable=!1),a.state.draggingText=!1,yg(document,"mouseup",g),yg(e.scroller,"drop",g),Math.abs(b.clientX-h.clientX)+Math.abs(b.clientY-h.clientY)<10&&(ug(h),!d&&+new Date-200s&&e.push(new ma(Ff(o,s),Ff(o,Ae(r,n,f))))}e.length||e.push(new ma(c,c)),Ba(j,na(m.ranges.slice(0,l).concat(e),l),{origin:"*mouse",scroll:!1}),a.scrollIntoView(b)}else{var t=k,u=t.anchor,v=b;if("single"!=d){if("double"==d)var w=a.findWordAt(b);else var w=new ma(Ff(b.line,0),qa(j,Ff(b.line+1,0)));Gf(w.anchor,u)>0?(v=w.head,u=X(t.from(),w.anchor)):(v=w.anchor,u=W(t.to(),w.head))}var e=m.ranges.slice(0);e[l]=new ma(qa(j,u),v),Ba(j,na(e,l),Eg)}}function g(b){var c=++s,e=Tb(a,b,!0,"rect"==d);if(e)if(0!=Gf(e,q)){a.curOp.focus=Pe(),f(e);var h=u(i,j);(e.line>=h.to||e.liner.bottom?20:0;k&&setTimeout(Db(a,function(){s==c&&(i.scroller.scrollTop+=k,g(b))}),50)}}function h(a){s=1/0,ug(a),i.input.focus(),yg(document,"mousemove",t),yg(document,"mouseup",v),j.history.lastSelOrigin=null}var i=a.display,j=a.doc;ug(b);var k,l,m=j.sel,n=m.ranges;if(e&&!b.shiftKey?(l=j.sel.contains(c),k=l>-1?n[l]:new ma(c,c)):(k=j.sel.primary(),l=j.sel.primIndex),b.altKey)d="rect",e||(k=new ma(c,c)),c=Tb(a,b,!0,!0),l=-1;else if("double"==d){var o=a.findWordAt(c);k=a.display.shift||j.extend?ua(j,k,o.anchor,o.head):o}else if("triple"==d){var p=new ma(Ff(c.line,0),qa(j,Ff(c.line+1,0)));k=a.display.shift||j.extend?ua(j,k,p.anchor,p.head):p}else k=ua(j,k,c);e?l==-1?(l=n.length,Ba(j,na(n.concat([k]),l),{scroll:!1,origin:"*mouse"})):n.length>1&&n[l].empty()&&"single"==d&&!b.shiftKey?(Ba(j,na(n.slice(0,l).concat(n.slice(l+1)),0)),m=j.sel):xa(j,l,k,Eg):(l=0,Ba(j,new la([k],0),Eg),m=j.sel);var q=c,r=i.wrapper.getBoundingClientRect(),s=0,t=Db(a,function(a){se(a)?g(a):h(a)}),v=Db(a,h);xg(document,"mousemove",t),xg(document,"mouseup",v)}function Yb(a,b,c,d,e){try{var f=b.clientX,g=b.clientY}catch(b){return!1}if(f>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;d&&ug(b);var h=a.display,i=h.lineDiv.getBoundingClientRect();if(g>i.bottom||!xe(a,c))return qe(b);g-=i.top-h.viewOffset;for(var j=0;j=f){var l=$d(a.doc,g),m=a.options.gutters[j];return e(a,c,a,l,m,b),qe(b)}}}function Zb(a,b){return Yb(a,b,"gutterClick",!0,te)}function $b(a){var b=this;if(!ve(b,a)&&!Sb(b.display,a)){ug(a),nf&&(Of=+new Date);var c=Tb(b,a,!0),d=a.dataTransfer.files;if(c&&!Z(b))if(d&&d.length&&window.FileReader&&window.File)for(var e=d.length,f=Array(e),g=0,h=function(a,d){var h=new FileReader;h.onload=Db(b,function(){if(f[d]=h.result,++g==e){c=qa(b.doc,c);var a={from:c,to:c,text:Ug(f.join("\n")),origin:"paste"};wc(b.doc,a),Aa(b.doc,oa(c,Uf(a)))}}),h.readAsText(a)},i=0;i-1)return b.state.draggingText(a),void setTimeout(function(){b.display.input.focus()},20);try{var f=a.dataTransfer.getData("Text");if(f){if(b.state.draggingText&&!(yf?a.altKey:a.ctrlKey))var j=b.listSelections();if(Ca(b.doc,oa(c,c)),j)for(var i=0;ig.clientWidth||e&&g.scrollHeight>g.clientHeight){if(e&&yf&&pf)a:for(var h=b.target,i=f.view;h!=g;h=h.parentNode)for(var j=0;j=0;--e)xc(a,{from:d[e].from,to:d[e].to,text:e?[""]:b.text});else xc(a,b)}}function xc(a,b){if(1!=b.text.length||""!=b.text[0]||0!=Gf(b.from,b.to)){var c=sc(a,b);fe(a,b,c,a.cm?a.cm.curOp.id:NaN),Ac(a,b,c,bd(a,b));var d=[];Td(a,function(a,c){c||De(d,a.history)!=-1||(pe(a.history,b),d.push(a.history)),Ac(a,b,null,bd(a,b))})}}function yc(a,b,c){if(!a.cm||!a.cm.state.suppressEdits){for(var d,e=a.history,f=a.sel,g="undo"==b?e.done:e.undone,h="undo"==b?e.undone:e.done,i=0;i=0;--i){var l=d.changes[i];if(l.origin=b,k&&!vc(a,l,!1))return void(g.length=0);j.push(ce(a,l));var m=i?sc(a,l):Ce(g);Ac(a,l,m,dd(a,l)),!i&&a.cm&&a.cm.scrollIntoView({from:l.from,to:Uf(l)});var n=[];Td(a,function(a,b){b||De(n,a.history)!=-1||(pe(a.history,l),n.push(a.history)),Ac(a,l,null,dd(a,l))})}}}}function zc(a,b){if(0!=b&&(a.first+=b,a.sel=new la(Ee(a.sel.ranges,function(a){return new ma(Ff(a.anchor.line+b,a.anchor.ch),Ff(a.head.line+b,a.head.ch))}),a.sel.primIndex),a.cm)){Ib(a.cm,a.first,a.first-b,b);for(var c=a.cm.display,d=c.viewFrom;da.lastLine())){if(b.from.linef&&(b={from:b.from,to:Ff(f,Vd(a,f).text.length),text:[b.text[0]],origin:b.origin}),b.removed=Wd(a,b.from,b.to),c||(c=sc(a,b)),a.cm?Bc(a.cm,b,d):Qd(a,b,d),Ca(a,c,Dg)}}function Bc(a,b,c){var d=a.doc,e=a.display,g=b.from,h=b.to,i=!1,j=g.line;a.options.lineWrapping||(j=Zd(od(Vd(d,g.line))),d.iter(j,h.line+1,function(a){if(a==e.maxLine)return i=!0,!0})),d.sel.contains(b.from,b.to)>-1&&we(a),Qd(d,b,c,f(a)),a.options.lineWrapping||(d.iter(j,g.line+b.text.length,function(a){var b=l(a);b>e.maxLineLength&&(e.maxLine=a,e.maxLineLength=b,e.maxLineChanged=!0,i=!1)}),i&&(a.curOp.updateMaxLine=!0)),d.frontier=Math.min(d.frontier,g.line),Ma(a,400);var k=b.text.length-(h.line-g.line)-1;b.full?Ib(a):g.line!=h.line||1!=b.text.length||Pd(a.doc,b)?Ib(a,g.line,h.line+1,k):Jb(a,g.line,"text");var m=xe(a,"changes"),n=xe(a,"change");if(n||m){var o={from:g,to:h,text:b.text,removed:b.removed,origin:b.origin};n&&te(a,"change",a,o),m&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(o)}a.display.selForContextMenu=null}function Cc(a,b,c,d,e){if(d||(d=c),Gf(d,c)<0){var f=d;d=c,c=f}"string"==typeof b&&(b=Ug(b)),wc(a,{from:c,to:d,text:b,origin:e})}function Dc(a,b){if(!ve(a,"scrollCursorIntoView")){var c=a.display,d=c.sizer.getBoundingClientRect(),e=null;if(b.top+d.top<0?e=!0:b.bottom+d.top>(window.innerHeight||document.documentElement.clientHeight)&&(e=!1),null!=e&&!vf){var f=Me("div","​",null,"position: absolute; top: "+(b.top-c.viewOffset-Qa(a.display))+"px; height: "+(b.bottom-b.top+Ta(a)+c.barHeight)+"px; left: "+b.left+"px; width: 2px;");a.display.lineSpace.appendChild(f),f.scrollIntoView(e),a.display.lineSpace.removeChild(f)}}}function Ec(a,b,c,d){null==d&&(d=0);for(var e=0;e<5;e++){var f=!1,g=mb(a,b),h=c&&c!=b?mb(a,c):g,i=Gc(a,Math.min(g.left,h.left),Math.min(g.top,h.top)-d,Math.max(g.left,h.left),Math.max(g.bottom,h.bottom)+d),j=a.doc.scrollTop,k=a.doc.scrollLeft;if(null!=i.scrollTop&&(ac(a,i.scrollTop),Math.abs(a.doc.scrollTop-j)>1&&(f=!0)),null!=i.scrollLeft&&(bc(a,i.scrollLeft),Math.abs(a.doc.scrollLeft-k)>1&&(f=!0)),!f)break}return g}function Fc(a,b,c,d,e){var f=Gc(a,b,c,d,e);null!=f.scrollTop&&ac(a,f.scrollTop),null!=f.scrollLeft&&bc(a,f.scrollLeft)}function Gc(a,b,c,d,e){var f=a.display,g=rb(a.display);c<0&&(c=0);var h=a.curOp&&null!=a.curOp.scrollTop?a.curOp.scrollTop:f.scroller.scrollTop,i=Va(a),j={};e-c>i&&(e=c+i);var k=a.doc.height+Ra(f),l=ck-g;if(ch+i){var n=Math.min(c,(m?k:e)-i);n!=h&&(j.scrollTop=n)}var o=a.curOp&&null!=a.curOp.scrollLeft?a.curOp.scrollLeft:f.scroller.scrollLeft,p=Ua(a)-(a.options.fixedGutter?f.gutters.offsetWidth:0),q=d-b>p;return q&&(d=b+p),b<10?j.scrollLeft=0:bp+o-3&&(j.scrollLeft=d+(q?0:10)-p),j}function Hc(a,b,c){null==b&&null==c||Jc(a),null!=b&&(a.curOp.scrollLeft=(null==a.curOp.scrollLeft?a.doc.scrollLeft:a.curOp.scrollLeft)+b),null!=c&&(a.curOp.scrollTop=(null==a.curOp.scrollTop?a.doc.scrollTop:a.curOp.scrollTop)+c)}function Ic(a){Jc(a);var b=a.getCursor(),c=b,d=b;a.options.lineWrapping||(c=b.ch?Ff(b.line,b.ch-1):b,d=Ff(b.line,b.ch+1)),a.curOp.scrollToPos={from:c,to:d,margin:a.options.cursorScrollMargin,isCursor:!0}}function Jc(a){var b=a.curOp.scrollToPos;if(b){a.curOp.scrollToPos=null;var c=nb(a,b.from),d=nb(a,b.to),e=Gc(a,Math.min(c.left,d.left),Math.min(c.top,d.top)-b.margin,Math.max(c.right,d.right),Math.max(c.bottom,d.bottom)+b.margin);a.scrollTo(e.scrollLeft,e.scrollTop)}}function Kc(a,b,c,d){var e,f=a.doc;null==c&&(c="add"),"smart"==c&&(f.mode.indent?e=Pa(a,b):c="prev");var g=a.options.tabSize,h=Vd(f,b),i=Gg(h.text,null,g);h.stateAfter&&(h.stateAfter=null);var j,k=h.text.match(/^\s*/)[0];if(d||/\S/.test(h.text)){if("smart"==c&&(j=f.mode.indent(e,h.text.slice(k.length),h.text),j==Cg||j>150)){if(!d)return;c="prev"}}else j=0,c="not";"prev"==c?j=b>f.first?Gg(Vd(f,b-1).text,null,g):0:"add"==c?j=i+a.options.indentUnit:"subtract"==c?j=i-a.options.indentUnit:"number"==typeof c&&(j=i+c),j=Math.max(0,j);var l="",m=0;if(a.options.indentWithTabs)for(var n=Math.floor(j/g);n;--n)m+=g,l+="\t";if(m=0;b--)Cc(a.doc,"",d[b].from,d[b].to,"+delete");Ic(a)})}function Nc(a,b,c,d,e){function f(){var b=h+c;return b=a.first+a.size?l=!1:(h=b,k=Vd(a,b))}function g(a){var b=(e?hf:jf)(k,i,c,!0);if(null==b){if(a||!f())return l=!1;i=e?(c<0?af:_e)(k):c<0?k.text.length:0}else i=b;return!0}var h=b.line,i=b.ch,j=c,k=Vd(a,h),l=!0;if("char"==d)g();else if("column"==d)g(!0);else if("word"==d||"group"==d)for(var m=null,n="group"==d,o=a.cm&&a.cm.getHelper(b,"wordChars"),p=!0;!(c<0)||g(!p);p=!1){var q=k.text.charAt(i)||"\n",r=Je(q,o)?"w":n&&"\n"==q?"n":!n||/\s/.test(q)?null:"p";if(!n||p||r||(r="s"),m&&m!=r){c<0&&(c=1,g());break}if(r&&(m=r),c>0&&!g(!p))break}var s=Ga(a,Ff(h,i),j,!0);return l||(s.hitSide=!0),s}function Oc(a,b,c,d){var e,f=a.doc,g=b.left;if("page"==d){var h=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);e=b.top+c*(h-(c<0?1.5:.5)*rb(a.display))}else"line"==d&&(e=c>0?b.bottom+3:b.top-3);for(;;){var i=pb(a,g,e);if(!i.outside)break;if(c<0?e<=0:e>=f.height){i.hitSide=!0;break}e+=5*c}return i}function Pc(b,c,d,e){a.defaults[b]=c,d&&(Wf[b]=e?function(a,b,c){c!=Xf&&d(a,b,c)}:d)}function Qc(a){for(var b,c,d,e,f=a.split(/-(?!$)/),a=f[f.length-1],g=0;g0||0==g&&f.clearWhenEmpty!==!1)return f;if(f.replacedWith&&(f.collapsed=!0,f.widgetNode=Me("span",[f.replacedWith],"CodeMirror-widget"),d.handleMouseEvents||f.widgetNode.setAttribute("cm-ignore-events","true"),d.insertLeft&&(f.widgetNode.insertLeft=!0)),f.collapsed){if(nd(a,b.line,b,c,f)||b.line!=c.line&&nd(a,c.line,b,c,f))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ef=!0}f.addToHistory&&fe(a,{from:b,to:c,origin:"markText"},a.sel,NaN);var h,i=b.line,j=a.cm;if(a.iter(i,c.line+1,function(a){j&&f.collapsed&&!j.options.lineWrapping&&od(a)==j.display.maxLine&&(h=!0),f.collapsed&&i!=b.line&&Yd(a,0),$c(a,new Xc(f,i==b.line?b.ch:null,i==c.line?c.ch:null)),++i}),f.collapsed&&a.iter(b.line,c.line+1,function(b){sd(a,b)&&Yd(b,0)}),f.clearOnEnter&&xg(f,"beforeCursorEnter",function(){f.clear()}),f.readOnly&&(Df=!0,(a.history.done.length||a.history.undone.length)&&a.clearHistory()),f.collapsed&&(f.id=++jg,f.atomic=!0),j){if(h&&(j.curOp.updateMaxLine=!0),f.collapsed)Ib(j,b.line,c.line+1);else if(f.className||f.title||f.startStyle||f.endStyle||f.css)for(var k=b.line;k<=c.line;k++)Jb(j,k,"text");f.atomic&&Ea(j.doc),te(j,"markerAdded",j,f)}return f}function Tc(a,b,c,d,e){d=He(d),d.shared=!1;var f=[Sc(a,b,c,d,e)],g=f[0],h=d.widgetNode;return Td(a,function(a){h&&(d.widgetNode=h.cloneNode(!0)),f.push(Sc(a,qa(a,b),qa(a,c),d,e));for(var i=0;i=b:f.to>b);(d||(d=[])).push(new Xc(g,f.from,i?null:f.to))}}return d}function ad(a,b,c){if(a)for(var d,e=0;e=b:f.to>b);if(h||f.from==b&&"bookmark"==g.type&&(!c||f.marker.insertLeft)){var i=null==f.from||(g.inclusiveLeft?f.from<=b:f.from0&&h)for(var l=0;l0)){var k=[i,1],l=Gf(j.from,h.from),m=Gf(j.to,h.to);(l<0||!g.inclusiveLeft&&!l)&&k.push({from:j.from,to:h.from}),(m>0||!g.inclusiveRight&&!m)&&k.push({from:h.to,to:j.to}),e.splice.apply(e,k),i+=k.length-1}}return e}function fd(a){var b=a.markedSpans;if(b){for(var c=0;c=0&&l<=0||k<=0&&l>=0)&&(k<=0&&(Gf(j.to,c)>0||i.marker.inclusiveRight&&e.inclusiveLeft)||k>=0&&(Gf(j.from,d)<0||i.marker.inclusiveLeft&&e.inclusiveRight)))return!0}}}function od(a){for(var b;b=ld(a);)a=b.find(-1,!0).line;return a}function pd(a){for(var b,c;b=md(a);)a=b.find(1,!0).line,(c||(c=[])).push(a);return c}function qd(a,b){var c=Vd(a,b),d=od(c);return c==d?b:Zd(d)}function rd(a,b){if(b>a.lastLine())return b;var c,d=Vd(a,b);if(!sd(a,d))return b;for(;c=md(d);)d=c.find(1,!0).line;return Zd(d)+1}function sd(a,b){var c=Ef&&b.markedSpans;if(c)for(var d,e=0;ec.start)return g}throw new Error("Mode "+b.name+" failed to advance stream.")}function Cd(a,b,c,d){function e(a){return{start:l.start,end:l.pos,string:l.current(),type:f||null,state:a?bg(g.mode,k):k}}var f,g=a.doc,h=g.mode;b=qa(g,b);var i,j=Vd(g,b.line),k=Pa(a,b.line,c),l=new ig(j.text,a.options.tabSize);for(d&&(i=[]);(d||l.posa.options.maxHighlightLength?(h=!1,g&&Gd(a,b,d,l.pos),l.pos=b.length,i=null):i=zd(Bd(c,l,d,m),f),m){var n=m[0].name;n&&(i="m-"+(i?n+" "+i:n))}if(!h||k!=i){for(;ja&&e.splice(i,1,a,e[i+1],d),i+=2,j=Math.min(a,d)}if(b)if(h.opaque)e.splice(c,i-c,a,"cm-overlay "+b),i=c+2;else for(;cj&&m.from<=j)break}if(m.to>=k)return a(c,d,e,f,g,h,i);a(c,d.slice(0,m.to-j),e,f,null,h,i),f=null,d=d.slice(m.to-j),j=m.to}}}function Nd(a,b,c,d){var e=!d&&c.widgetNode;e&&a.map.push(a.pos,a.pos+b,e),!d&&a.cm.display.input.needsContentAttribute&&(e||(e=a.content.appendChild(document.createElement("span"))),e.setAttribute("cm-marker",c.id)),e&&(a.cm.display.input.setUneditable(e),a.content.appendChild(e)),a.pos+=b}function Od(a,b,c){var d=a.markedSpans,e=a.text,f=0;if(d)for(var g,h,i,j,k,l,m,n=e.length,o=0,p=1,q="",r=0;;){if(r==o){i=j=k=l=h="",m=null,r=1/0;for(var s=[],t=0;to||v.collapsed&&u.to==o&&u.from==o)?(null!=u.to&&u.to!=o&&r>u.to&&(r=u.to,j=""),v.className&&(i+=" "+v.className),v.css&&(h=v.css),v.startStyle&&u.from==o&&(k+=" "+v.startStyle),v.endStyle&&u.to==r&&(j+=" "+v.endStyle),v.title&&!l&&(l=v.title),v.collapsed&&(!m||jd(m.marker,v)<0)&&(m=u)):u.from>o&&r>u.from&&(r=u.from)}if(m&&(m.from||0)==o){if(Nd(b,(null==m.to?n+1:m.to)-o,m.marker,null==m.from),null==m.to)return;m.to==o&&(m=!1)}if(!m&&s.length)for(var t=0;t=n)break;for(var w=Math.min(n,r);;){if(q){var x=o+q.length;if(!m){var y=x>w?q.slice(0,w-o):q;b.addToken(b,y,g?g+i:i,k,o+y.length==r?j:"",l,h)}if(x>=w){q=q.slice(w-o),o=w;break}o=x,k=""}q=e.slice(f,f=c[p++]),g=Hd(c[p++],b.cm.options)}}else for(var p=1;p1&&a.remove(h.line+1,o-1),a.insert(h.line+1,p)}te(a,"change",a,b)}function Rd(a){this.lines=a,this.parent=null;for(var b=0,c=0;b=a.size)throw new Error("There is no line "+(b+a.first)+" in the document.");for(var c=a;!c.lines;)for(var d=0;;++d){var e=c.children[d],f=e.chunkSize();if(b1&&!a.done[a.done.length-2].ranges?(a.done.pop(),Ce(a.done)):void 0}function fe(a,b,c,d){var e=a.history;e.undone.length=0;var f,g=+new Date;if((e.lastOp==d||e.lastOrigin==b.origin&&b.origin&&("+"==b.origin.charAt(0)&&a.cm&&e.lastModTime>g-a.cm.options.historyEventDelay||"*"==b.origin.charAt(0)))&&(f=ee(e,e.lastOp==d))){var h=Ce(f.changes);0==Gf(b.from,b.to)&&0==Gf(b.from,h.to)?h.to=Uf(b):f.changes.push(ce(a,b))}else{var i=Ce(e.done);for(i&&i.ranges||ie(a.sel,e.done),f={changes:[ce(a,b)],generation:e.generation},e.done.push(f);e.done.length>e.undoDepth;)e.done.shift(),e.done[0].ranges||e.done.shift()}e.done.push(c),e.generation=++e.maxGeneration,e.lastModTime=e.lastSelTime=g,e.lastOp=e.lastSelOp=d,e.lastOrigin=e.lastSelOrigin=b.origin,h||zg(a,"historyAdded")}function ge(a,b,c,d){var e=b.charAt(0);return"*"==e||"+"==e&&c.ranges.length==d.ranges.length&&c.somethingSelected()==d.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function he(a,b,c,d){var e=a.history,f=d&&d.origin;c==e.lastSelOp||f&&e.lastSelOrigin==f&&(e.lastModTime==e.lastSelTime&&e.lastOrigin==f||ge(a,f,Ce(e.done),b))?e.done[e.done.length-1]=b:ie(b,e.done),e.lastSelTime=+new Date,e.lastSelOrigin=f,e.lastSelOp=c,d&&d.clearRedo!==!1&&de(e.undone)}function ie(a,b){var c=Ce(b);c&&c.ranges&&c.equals(a)||b.push(a)}function je(a,b,c,d){var e=b["spans_"+a.id],f=0;a.iter(Math.max(a.first,c),Math.min(a.first+a.size,d),function(c){c.markedSpans&&((e||(e=b["spans_"+a.id]={}))[f]=c.markedSpans),++f})}function ke(a){if(!a)return null;for(var b,c=0;c-1&&(Ce(h)[l]=k[l],delete k[l])}}}return e}function ne(a,b,c,d){c0}function ye(a){a.prototype.on=function(a,b){xg(this,a,b)},a.prototype.off=function(a,b){yg(this,a,b)}}function ze(){this.id=null}function Ae(a,b,c){for(var d=0,e=0;;){var f=a.indexOf("\t",d);f==-1&&(f=a.length);var g=f-d;if(f==a.length||e+g>=b)return d+Math.min(g,b-e);if(e+=f-d,e+=c-e%c,d=f+1,e>=b)return d}}function Be(a){for(;Hg.length<=a;)Hg.push(Ce(Hg)+" ");return Hg[a]}function Ce(a){return a[a.length-1]}function De(a,b){for(var c=0;c-1&&Lg(a))||b.test(a):Lg(a)}function Ke(a){for(var b in a)if(a.hasOwnProperty(b)&&a[b])return!1;return!0}function Le(a){return a.charCodeAt(0)>=768&&Mg.test(a)}function Me(a,b,c,d){var e=document.createElement(a);if(c&&(e.className=c),d&&(e.style.cssText=d),"string"==typeof b)e.appendChild(document.createTextNode(b));else if(b)for(var f=0;f0;--b)a.removeChild(a.firstChild);return a}function Oe(a,b){return Ne(a).appendChild(b)}function Pe(){return document.activeElement}function Qe(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}function Re(a,b){for(var c=a.split(" "),d=0;d2&&!(nf&&of<8))}var c=Og?Me("span","​"):Me("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return c.setAttribute("cm-text",""),c}function We(a){if(null!=Pg)return Pg;var b=Oe(a,document.createTextNode("AخA")),c=Jg(b,0,1).getBoundingClientRect();if(!c||c.left==c.right)return!1;var d=Jg(b,1,2).getBoundingClientRect();return Pg=d.right-c.right<3}function Xe(a){if(null!=Xg)return Xg;var b=Oe(a,Me("span","x")),c=b.getBoundingClientRect(),d=Jg(b,0,1).getBoundingClientRect();return Xg=Math.abs(c.left-d.left)>1}function Ye(a,b,c,d){if(!a)return d(b,c,"ltr");for(var e=!1,f=0;fb||b==c&&g.to==b)&&(d(Math.max(g.from,b),Math.min(g.to,c),1==g.level?"rtl":"ltr"),e=!0)}e||d(b,c,"ltr")}function Ze(a){return a.level%2?a.to:a.from}function $e(a){return a.level%2?a.from:a.to}function _e(a){var b=ae(a);return b?Ze(b[0]):0}function af(a){var b=ae(a);return b?$e(Ce(b)):a.text.length}function bf(a,b){var c=Vd(a.doc,b),d=od(c);d!=c&&(b=Zd(d));var e=ae(d),f=e?e[0].level%2?af(d):_e(d):0;return Ff(b,f)}function cf(a,b){for(var c,d=Vd(a.doc,b);c=md(d);)d=c.find(1,!0).line,b=null;var e=ae(d),f=e?e[0].level%2?_e(d):af(d):d.text.length;return Ff(null==b?Zd(d):b,f)}function df(a,b){var c=bf(a,b.line),d=Vd(a.doc,c.line),e=ae(d);if(!e||0==e[0].level){var f=Math.max(0,d.text.search(/\S/)),g=b.line==c.line&&b.ch<=f&&b.ch;return Ff(c.line,g?0:f)}return c}function ef(a,b,c){var d=a[0].level;return b==d||c!=d&&bb)return d;if(e.from==b||e.to==b){if(null!=c)return ef(a,e.level,a[c].level)?(e.from!=e.to&&(Zg=c),d):(e.from!=e.to&&(Zg=d),c);c=d}}return c}function gf(a,b,c,d){if(!d)return b+c;do b+=c;while(b>0&&Le(a.text.charAt(b)));return b}function hf(a,b,c,d){var e=ae(a);if(!e)return jf(a,b,c,d);for(var f=ff(e,b),g=e[f],h=gf(a,b,g.level%2?-c:c,d);;){if(h>g.from&&h0==g.level%2?g.to:g.from);if(g=e[f+=c],!g)return null;h=c>0==g.level%2?gf(a,g.to,-1,d):gf(a,g.from,1,d)}}function jf(a,b,c,d){var e=b+c;if(d)for(;e>0&&Le(a.text.charAt(e));)e+=c;return e<0||e>a.text.length?null:e}var kf=/gecko\/\d/i.test(navigator.userAgent),lf=/MSIE \d/.test(navigator.userAgent),mf=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),nf=lf||mf,of=nf&&(lf?document.documentMode||6:mf[1]),pf=/WebKit\//.test(navigator.userAgent),qf=pf&&/Qt\/\d+\.\d+/.test(navigator.userAgent),rf=/Chrome\//.test(navigator.userAgent),sf=/Opera\//.test(navigator.userAgent),tf=/Apple Computer/.test(navigator.vendor),uf=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),vf=/PhantomJS/.test(navigator.userAgent),wf=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),xf=wf||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),yf=wf||/Mac/.test(navigator.platform),zf=/win/i.test(navigator.platform),Af=sf&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);Af&&(Af=Number(Af[1])),Af&&Af>=15&&(sf=!1,pf=!0);var Bf=yf&&(qf||sf&&(null==Af||Af<12.11)),Cf=kf||nf&&of>=9,Df=!1,Ef=!1;p.prototype=He({update:function(a){var b=a.scrollWidth>a.clientWidth+1,c=a.scrollHeight>a.clientHeight+1,d=a.nativeBarWidth;if(c){this.vert.style.display="block",this.vert.style.bottom=b?d+"px":"0";var e=a.viewHeight-(b?d:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+e)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(b){this.horiz.style.display="block",this.horiz.style.right=c?d+"px":"0",this.horiz.style.left=a.barLeft+"px";var f=a.viewWidth-a.barLeft-(c?d:0);this.horiz.firstChild.style.width=a.scrollWidth-a.clientWidth+f+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedOverlay&&a.clientHeight>0&&(0==d&&this.overlayHack(),this.checkedOverlay=!0),{right:c?d:0,bottom:b?d:0}},setScrollLeft:function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a)},setScrollTop:function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a)},overlayHack:function(){var a=yf&&!uf?"12px":"18px";this.horiz.style.minHeight=this.vert.style.minWidth=a;var b=this,c=function(a){re(a)!=b.vert&&re(a)!=b.horiz&&Db(b.cm,Ub)(a)};xg(this.vert,"mousedown",c),xg(this.horiz,"mousedown",c)},clear:function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)}},p.prototype),q.prototype=He({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},q.prototype),a.scrollbarModel={"native":p,"null":q},z.prototype.signal=function(a,b){xe(a,b)&&this.events.push(arguments)},z.prototype.finish=function(){for(var a=0;a=9&&c.hasSelection&&(c.hasSelection=null),c.poll()}),xg(f,"paste",function(a){return!!_(a,d)||(d.state.pasteIncoming=!0,void c.fastPoll())}),xg(f,"cut",b),xg(f,"copy",b),xg(a.scroller,"paste",function(b){Sb(a,b)||(d.state.pasteIncoming=!0,c.focus())}),xg(a.lineSpace,"selectstart",function(b){Sb(a,b)||ug(b)}),xg(f,"compositionstart",function(){var a=d.getCursor("from");c.composing={start:a,range:d.markText(a,d.getCursor("to"),{className:"CodeMirror-composing"})}}),xg(f,"compositionend",function(){c.composing&&(c.poll(),c.composing.range.clear(),c.composing=null)})},prepareSelection:function(){var a=this.cm,b=a.display,c=a.doc,d=Ia(a);if(a.options.moveInputWithCursor){var e=mb(a,c.sel.primary().head,"div"),f=b.wrapper.getBoundingClientRect(),g=b.lineDiv.getBoundingClientRect();d.teTop=Math.max(0,Math.min(b.wrapper.clientHeight-10,e.top+g.top-f.top)),d.teLeft=Math.max(0,Math.min(b.wrapper.clientWidth-10,e.left+g.left-f.left))}return d},showSelection:function(a){var b=this.cm,c=b.display;Oe(c.cursorDiv,a.cursors),Oe(c.selectionDiv,a.selection),null!=a.teTop&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},reset:function(a){if(!this.contextMenuPending){var b,c,d=this.cm,e=d.doc;if(d.somethingSelected()){this.prevInput="";var f=e.sel.primary();b=Wg&&(f.to().line-f.from().line>100||(c=d.getSelection()).length>1e3);var g=b?"-":c||d.getSelection();this.textarea.value=g,d.state.focused&&Ig(this.textarea),nf&&of>=9&&(this.hasSelection=g)}else a||(this.prevInput=this.textarea.value="",nf&&of>=9&&(this.hasSelection=null));this.inaccurateSelection=b}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!xf||Pe()!=this.textarea))try{this.textarea.focus()}catch(a){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var a=this;a.pollingFast||a.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},fastPoll:function(){function a(){var d=c.poll();d||b?(c.pollingFast=!1,c.slowPoll()):(b=!0,c.polling.set(60,a))}var b=!1,c=this;c.pollingFast=!0,c.polling.set(20,a)},poll:function(){var a=this.cm,b=this.textarea,c=this.prevInput;if(this.contextMenuPending||!a.state.focused||Vg(b)&&!c||Z(a)||a.options.disableInput||a.state.keySeq)return!1;var d=b.value;if(d==c&&!a.somethingSelected())return!1;if(nf&&of>=9&&this.hasSelection===d||yf&&/[\uf700-\uf7ff]/.test(d))return a.display.input.reset(),!1;if(a.doc.sel==a.display.selForContextMenu){var e=d.charCodeAt(0);if(8203!=e||c||(c="​"),8666==e)return this.reset(),this.cm.execCommand("undo")}for(var f=0,g=Math.min(c.length,d.length);f1e3||d.indexOf("\n")>-1?b.value=h.prevInput="":h.prevInput=d,h.composing&&(h.composing.range.clear(),h.composing.range=a.markText(h.composing.start,a.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){nf&&of>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(a){function b(){if(null!=g.selectionStart){var a=e.somethingSelected(),b="​"+(a?g.value:"");g.value="⇚",g.value=b,d.prevInput=a?"":"​",g.selectionStart=1,g.selectionEnd=b.length,f.selForContextMenu=e.doc.sel}}function c(){if(d.contextMenuPending=!1,d.wrapper.style.position="relative",g.style.cssText=k,nf&&of<9&&f.scrollbars.setScrollTop(f.scroller.scrollTop=i),null!=g.selectionStart){(!nf||nf&&of<9)&&b();var a=0,c=function(){f.selForContextMenu==e.doc.sel&&0==g.selectionStart&&g.selectionEnd>0&&"​"==d.prevInput?Db(e,dg.selectAll)(e):a++<10?f.detectingSelectAll=setTimeout(c,500):f.input.reset()};f.detectingSelectAll=setTimeout(c,200)}}var d=this,e=d.cm,f=e.display,g=d.textarea,h=Tb(e,a),i=f.scroller.scrollTop;if(h&&!sf){var j=e.options.resetSelectionOnContextMenu;j&&e.doc.sel.contains(h)==-1&&Db(e,Ba)(e.doc,oa(h),Dg);var k=g.style.cssText;if(d.wrapper.style.position="absolute",g.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(a.clientY-5)+"px; left: "+(a.clientX-5)+"px; z-index: 1000; background: "+(nf?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",pf)var l=window.scrollY;if(f.input.focus(),pf&&window.scrollTo(null,l),f.input.reset(),e.somethingSelected()||(g.value=d.prevInput=" "),d.contextMenuPending=!0,f.selForContextMenu=e.doc.sel,clearTimeout(f.detectingSelectAll),nf&&of>=9&&b(),Cf){wg(a);var m=function(){yg(window,"mouseup",m),setTimeout(c,20)};xg(window,"mouseup",m)}else setTimeout(c,50)}},setUneditable:Fe,needsContentAttribute:!1},da.prototype),fa.prototype=He({init:function(a){function b(a){if(d.somethingSelected())Hf=d.getSelections(),"cut"==a.type&&d.replaceSelection("",null,"cut");else{if(!d.options.lineWiseCopyCut)return;var b=ba(d);Hf=b.text,"cut"==a.type&&d.operation(function(){d.setSelections(b.ranges,0,Dg),d.replaceSelection("",null,"cut")})}if(a.clipboardData&&!wf)a.preventDefault(),a.clipboardData.clearData(),a.clipboardData.setData("text/plain",Hf.join("\n"));else{var c=ea(),e=c.firstChild;d.display.lineSpace.insertBefore(c,d.display.lineSpace.firstChild),e.value=Hf.join("\n");var f=document.activeElement;Ig(e),setTimeout(function(){d.display.lineSpace.removeChild(c),f.focus()},50)}}var c=this,d=c.cm,e=c.div=a.lineDiv;e.contentEditable="true",ca(e),xg(e,"paste",function(a){_(a,d)}),xg(e,"compositionstart",function(a){var b=a.data;if(c.composing={sel:d.doc.sel,data:b,startData:b},b){var e=d.doc.sel.primary(),f=d.getLine(e.head.line),g=f.indexOf(b,Math.max(0,e.head.ch-b.length));g>-1&&g<=e.head.ch&&(c.composing.sel=oa(Ff(e.head.line,g),Ff(e.head.line,g+b.length)))}}),xg(e,"compositionupdate",function(a){c.composing.data=a.data}),xg(e,"compositionend",function(a){var b=c.composing;b&&(a.data==b.startData||/\u200b/.test(a.data)||(b.data=a.data),setTimeout(function(){b.handled||c.applyComposition(b),c.composing==b&&(c.composing=null)},50))}),xg(e,"touchstart",function(){c.forceCompositionEnd()}),xg(e,"input",function(){c.composing||c.pollContent()||Cb(c.cm,function(){Ib(d)})}),xg(e,"copy",b),xg(e,"cut",b)},prepareSelection:function(){var a=Ia(this.cm,!1);return a.focus=this.cm.state.focused,a},showSelection:function(a){a&&this.cm.display.view.length&&(a.focus&&this.showPrimarySelection(),this.showMultipleSelections(a))},showPrimarySelection:function(){var a=window.getSelection(),b=this.cm.doc.sel.primary(),c=ia(this.cm,a.anchorNode,a.anchorOffset),d=ia(this.cm,a.focusNode,a.focusOffset);if(!c||c.bad||!d||d.bad||0!=Gf(X(c,d),b.from())||0!=Gf(W(c,d),b.to())){var e=ga(this.cm,b.from()),f=ga(this.cm,b.to());if(e||f){var g=this.cm.display.view,h=a.rangeCount&&a.getRangeAt(0);if(e){if(!f){var i=g[g.length-1].measure,j=i.maps?i.maps[i.maps.length-1]:i.map;f={node:j[j.length-1],offset:j[j.length-2]-j[j.length-3]}}}else e={node:g[0].measure.map[2],offset:0};try{var k=Jg(e.node,e.offset,f.offset,f.node)}catch(l){}k&&(a.removeAllRanges(),a.addRange(k),h&&null==a.anchorNode?a.addRange(h):kf&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var a=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){a.gracePeriod=!1,a.selectionChanged()&&a.cm.operation(function(){a.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(a){Oe(this.cm.display.cursorDiv,a.cursors),Oe(this.cm.display.selectionDiv,a.selection)},rememberSelection:function(){var a=window.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},selectionInEditor:function(){var a=window.getSelection();if(!a.rangeCount)return!1;var b=a.getRangeAt(0).commonAncestorContainer;return Ng(this.div,b)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function a(){b.cm.state.focused&&(b.pollSelection(),b.polling.set(b.cm.options.pollInterval,a))}var b=this;this.selectionInEditor()?this.pollSelection():Cb(this.cm,function(){b.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,a)},selectionChanged:function(){var a=window.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var a=window.getSelection(),b=this.cm;this.rememberSelection();var c=ia(b,a.anchorNode,a.anchorOffset),d=ia(b,a.focusNode,a.focusOffset);c&&d&&Cb(b,function(){Ba(b.doc,oa(c,d),Dg),(c.bad||d.bad)&&(b.curOp.selectionChanged=!0)})}},pollContent:function(){var a=this.cm,b=a.display,c=a.doc.sel.primary(),d=c.from(),e=c.to();if(d.lineb.viewTo-1)return!1;var f;if(d.line==b.viewFrom||0==(f=Lb(a,d.line)))var g=Zd(b.view[0].line),h=b.view[0].node;else var g=Zd(b.view[f].line),h=b.view[f-1].node.nextSibling;var i=Lb(a,e.line);if(i==b.view.length-1)var j=b.viewTo-1,k=b.lineDiv.lastChild;else var j=Zd(b.view[i+1].line)-1,k=b.view[i+1].node.previousSibling;for(var l=Ug(ka(a,h,k,g,j)),m=Wd(a.doc,Ff(g,0),Ff(j,Vd(a.doc,j).text.length));l.length>1&&m.length>1;)if(Ce(l)==Ce(m))l.pop(),m.pop(),j--;else{if(l[0]!=m[0])break;l.shift(),m.shift(),g++}for(var n=0,o=0,p=l[0],q=m[0],r=Math.min(p.length,q.length);n1||l[0]||Gf(v,w)?(Cc(a.doc,l,v,w,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(a){a.data&&a.data!=a.startData&&Db(this.cm,$)(this.cm,a.data,0,a.sel)},setUneditable:function(a){ @@ -34,14 +34,14 @@ cls:"bi-card color-chooser-trigger-content"});var a=BI.createWidget({type:"bi.ic },getValue:function(){return this.textIconCheckCombo.getValue()},populate:function(a){this.options.items=a,this.textIconCheckCombo.populate(a)}}),BI.TextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo",BI.TextValueCheckCombo),BI.SmallTextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:""})},_init:function(){BI.SmallTextValueCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextIconCheckCombo.hideView(),a.fireEvent(BI.SmallTextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextIconCheckCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextIconCheckCombo.setValue(a)},getValue:function(){return this.SmallTextIconCheckCombo.getValue()},populate:function(a){this.options.items=a,this.SmallTextIconCheckCombo.populate(a)}}),BI.SmallTextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_check_combo",BI.SmallTextValueCheckCombo),BI.TextValueCheckComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueCheckComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueCheckComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:this._formatItems(a.items),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}]}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},_formatItems:function(a){return BI.map(a,function(a,b){return BI.extend({type:"bi.icon_text_item",cls:"item-check-font bi-list-item",height:30},b)})},populate:function(a){BI.TextValueCheckComboPopup.superclass.populate.apply(this,arguments),this.popup.populate(this._formatItems(a))},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueCheckComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo_popup",BI.TextValueCheckComboPopup),BI.TextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseClass:"bi-text-value-combo",height:30,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:"",el:{}})},_init:function(){BI.TextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.TextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.textIconCombo.setValue(a)},getValue:function(){return this.textIconCombo.getValue()},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.TextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo",BI.TextValueCombo),BI.SmallTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,el:{},text:""})},_init:function(){BI.SmallTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextValueCombo.hideView(),a.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextValueCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextValueCombo.setValue(a)},getValue:function(){return this.SmallTextValueCombo.getValue()},populate:function(a){this.options.items=a,this.SmallTextValueCombo.populate(a)}}),BI.SmallTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_combo",BI.SmallTextValueCombo),BI.TextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_item",textAlign:a.textAlign,height:30}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}]}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},populate:function(a){BI.TextValueComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_item",height:30}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo_popup",BI.TextValueComboPopup),BI.TextValueDownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TextValueDownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-value-down-list-combo",height:30,text:""})},_init:function(){BI.TextValueDownListCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this._createValueMap(),this.trigger=BI.createWidget({type:"bi.down_list_select_text_trigger",height:b.height,items:b.items}),this.combo=BI.createWidget({type:"bi.down_list_combo",element:this,chooseType:BI.Selection.Single,adjustLength:2,height:b.height,el:this.trigger,items:BI.deepClone(b.items)}),this.combo.on(BI.DownListCombo.EVENT_CHANGE,function(){a.setValue(a.combo.getValue()[0].value),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE)}),this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,function(){a.setValue(a.combo.getValue()[0].childValue),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE)})},_createValueMap:function(){var a=this;this.valueMap={},BI.each(BI.flatten(this.options.items),function(b,c){BI.has(c,"el")?BI.each(c.children,function(b,d){a.valueMap[d.value]={value:c.el.value,childValue:d.value}}):a.valueMap[c.value]={value:c.value}})},setValue:function(a){a=this.valueMap[a],this.combo.setValue([a]),this.trigger.setValue(a.childValue||a.value)},getValue:function(){var a=this.combo.getValue()[0];return[a.childValue||a.value]},populate:function(a){this.options.items=BI.flatten(a),this.combo.populate(a),this._createValueMap()}}),BI.TextValueDownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_down_list_combo",BI.TextValueDownListCombo),BI.DownListSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-select-text-trigger",height:24,text:""})},_init:function(){BI.DownListSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,height:a.height,items:this._formatItemArray(a.items),text:a.text})},_formatItemArray:function(){var a=BI.flatten(BI.deepClone(this.options.items)),b=[];return BI.each(a,function(a,c){BI.has(c,"el")?(BI.each(c.children,function(a,b){b.text=c.el.text+"("+b.text+")"}),b=BI.concat(b,c.children)):b.push(c)}),b},setValue:function(a){this.trigger.setValue(a)},populate:function(a){this.trigger.populate(this._formatItemArray(a))}}),BI.shortcut("bi.down_list_select_text_trigger",BI.DownListSelectTextTrigger),BI.ClearEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ClearEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-clear-editor",height:30,errorText:"",watermark:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){BI.ClearEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.fireEvent(BI.ClearEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:this.clear,width:25}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ClearEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ClearEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ClearEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ClearEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.ClearEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ClearEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ClearEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.ClearEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ClearEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ClearEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ClearEditor.EVENT_STOP)}),this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&this.clear.visible()},isValid:function(){return this.editor.isValid()}}),BI.ClearEditor.EVENT_CHANGE="EVENT_CHANGE",BI.ClearEditor.EVENT_FOCUS="EVENT_FOCUS",BI.ClearEditor.EVENT_BLUR="EVENT_BLUR",BI.ClearEditor.EVENT_CLICK="EVENT_CLICK",BI.ClearEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.ClearEditor.EVENT_SPACE="EVENT_SPACE",BI.ClearEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.ClearEditor.EVENT_CLEAR="EVENT_CLEAR",BI.ClearEditor.EVENT_START="EVENT_START",BI.ClearEditor.EVENT_PAUSE="EVENT_PAUSE",BI.ClearEditor.EVENT_STOP="EVENT_STOP",BI.ClearEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.ClearEditor.EVENT_VALID="EVENT_VALID",BI.ClearEditor.EVENT_ERROR="EVENT_ERROR",BI.ClearEditor.EVENT_ENTER="EVENT_ENTER",BI.ClearEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.ClearEditor.EVENT_REMOVE="EVENT_REMOVE",BI.ClearEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.clear_editor",BI.ClearEditor),BI.SearchEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-search-editor bi-border",height:30,errorText:"",watermark:BI.i18nText("BI-Basic_Search"),validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){this.options.height-=2,BI.SearchEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.fireEvent(BI.SearchEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:{type:"bi.center_adapt",cls:"search-font",items:[{el:{type:"bi.icon"}}]},width:25},{el:a.editor},{el:this.clear,width:25}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SearchEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SearchEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SearchEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SearchEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SearchEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SearchEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SearchEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.SearchEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.SearchEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SearchEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SearchEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SearchEditor.EVENT_STOP)}),this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&this.clear.visible()},isEditing:function(){return this.editor.isEditing()},isValid:function(){return this.editor.isValid()}}),BI.SearchEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SearchEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SearchEditor.EVENT_BLUR="EVENT_BLUR",BI.SearchEditor.EVENT_CLICK="EVENT_CLICK",BI.SearchEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SearchEditor.EVENT_SPACE="EVENT_SPACE",BI.SearchEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.SearchEditor.EVENT_CLEAR="EVENT_CLEAR",BI.SearchEditor.EVENT_START="EVENT_START",BI.SearchEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SearchEditor.EVENT_STOP="EVENT_STOP",BI.SearchEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SearchEditor.EVENT_VALID="EVENT_VALID",BI.SearchEditor.EVENT_ERROR="EVENT_ERROR",BI.SearchEditor.EVENT_ENTER="EVENT_ENTER",BI.SearchEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SearchEditor.EVENT_REMOVE="EVENT_REMOVE",BI.SearchEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.search_editor",BI.SearchEditor),BI.SmallSearchEditor=BI.inherit(BI.SearchEditor,{_defaultConfig:function(){var a=BI.SmallSearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-search-editor",height:24})},_init:function(){BI.SmallSearchEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_search_editor",BI.SmallSearchEditor),BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-shelter-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:30,textAlign:"left"})},_init:function(){BI.ShelterEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"shelter-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:b.textAlign,height:b.height,hgap:4}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.text.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL)}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ShelterEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ShelterEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ShelterEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ShelterEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ShelterEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ShelterEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ShelterEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ShelterEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ShelterEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.ShelterEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setTextStyle:function(a){this.text.setStyle(a)},setValue:function(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),BI.ShelterEditor.EVENT_CHANGE="EVENT_CHANGE",BI.ShelterEditor.EVENT_FOCUS="EVENT_FOCUS",BI.ShelterEditor.EVENT_BLUR="EVENT_BLUR",BI.ShelterEditor.EVENT_CLICK="EVENT_CLICK",BI.ShelterEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.ShelterEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.ShelterEditor.EVENT_START="EVENT_START",BI.ShelterEditor.EVENT_PAUSE="EVENT_PAUSE",BI.ShelterEditor.EVENT_STOP="EVENT_STOP",BI.ShelterEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.ShelterEditor.EVENT_VALID="EVENT_VALID",BI.ShelterEditor.EVENT_ERROR="EVENT_ERROR",BI.ShelterEditor.EVENT_ENTER="EVENT_ENTER",BI.ShelterEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.ShelterEditor.EVENT_SPACE="EVENT_SPACE",BI.ShelterEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.shelter_editor",BI.ShelterEditor),BI.SignInitialEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignInitialEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-initial-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",value:"",text:"",height:30})},_init:function(){BI.SignInitialEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignInitialEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignInitialEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignInitialEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignInitialEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignInitialEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignInitialEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignInitialEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignInitialEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignInitialEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignInitialEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignInitialEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignInitialEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignInitialEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignInitialEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignInitialEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignInitialEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){if(""===this.editor.getValue())this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark");else{var b=this.editor.getValue();b=BI.isEmpty(b)||b==a.text?a.text:b+"("+a.text+")",this.text.setValue(b),this.text.element.removeClass("bi-water-mark")}},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){var b=this.options;this.editor.setValue(a.value),b.text=a.text||b.text,this._checkText()},getValue:function(){return{value:this.editor.getValue(),text:this.options.text}},getState:function(){return this.text.getValue()},setState:function(a){var b=this.options;this._showHint(),a=BI.isEmpty(a)||a==b.text?b.text:a+"("+b.text+")",this.text.setValue(a)}}),BI.SignInitialEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SignInitialEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SignInitialEditor.EVENT_BLUR="EVENT_BLUR",BI.SignInitialEditor.EVENT_CLICK="EVENT_CLICK",BI.SignInitialEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SignInitialEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.SignInitialEditor.EVENT_START="EVENT_START",BI.SignInitialEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SignInitialEditor.EVENT_STOP="EVENT_STOP",BI.SignInitialEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignInitialEditor.EVENT_VALID="EVENT_VALID",BI.SignInitialEditor.EVENT_ERROR="EVENT_ERROR",BI.SignInitialEditor.EVENT_ENTER="EVENT_ENTER",BI.SignInitialEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SignInitialEditor.EVENT_SPACE="EVENT_SPACE",BI.SignInitialEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.sign_initial_editor",BI.SignInitialEditor),BI.SignEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:30})},_init:function(){BI.SignEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){ this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),BI.SignEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SignEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SignEditor.EVENT_BLUR="EVENT_BLUR",BI.SignEditor.EVENT_CLICK="EVENT_CLICK",BI.SignEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SignEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.SignEditor.EVENT_START="EVENT_START",BI.SignEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SignEditor.EVENT_STOP="EVENT_STOP",BI.SignEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignEditor.EVENT_VALID="EVENT_VALID",BI.SignEditor.EVENT_ERROR="EVENT_ERROR",BI.SignEditor.EVENT_ENTER="EVENT_ENTER",BI.SignEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SignEditor.EVENT_SPACE="EVENT_SPACE",BI.SignEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.sign_editor",BI.SignEditor),BI.StateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-state-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:30})},_init:function(){BI.StateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text bi-disabled",textAlign:"left",height:b.height,text:BI.i18nText("BI-Basic_Unrestricted"),hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.StateEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.StateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.StateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.StateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.StateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.StateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.StateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.StateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.StateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.StateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.StateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.StateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.StateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.StateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.StateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},focus:function(){this.options.disabled===!1&&(this._showInput(),this.editor.focus())},blur:function(){this.editor.blur(),this._showHint()},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){return BI.StateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Select_All")),this.text.setTitle(""),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.setTitle(""),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.setTitle(""),this.text.element.addClass("state-editor-infinite-text"))):BI.isString(a)?(this.text.setText(a),this.text.setTitle(a),void this.text.element.removeClass("state-editor-infinite-text")):void(BI.isArray(a)&&(BI.isEmpty(a)?(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.element.addClass("state-editor-infinite-text")):1===a.length?(this.text.setText(a[0]),this.text.setTitle(a[0]),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.setTitle(""),this.text.element.removeClass("state-editor-infinite-text"))))}}),BI.StateEditor.EVENT_CHANGE="EVENT_CHANGE",BI.StateEditor.EVENT_FOCUS="EVENT_FOCUS",BI.StateEditor.EVENT_BLUR="EVENT_BLUR",BI.StateEditor.EVENT_CLICK="EVENT_CLICK",BI.StateEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.StateEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.StateEditor.EVENT_START="EVENT_START",BI.StateEditor.EVENT_PAUSE="EVENT_PAUSE",BI.StateEditor.EVENT_STOP="EVENT_STOP",BI.StateEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.StateEditor.EVENT_VALID="EVENT_VALID",BI.StateEditor.EVENT_ERROR="EVENT_ERROR",BI.StateEditor.EVENT_ENTER="EVENT_ENTER",BI.StateEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.StateEditor.EVENT_SPACE="EVENT_SPACE",BI.StateEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.state_editor",BI.StateEditor),BI.SimpleStateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SimpleStateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-simple-state-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,mouseOut:!1,allowBlank:!0,watermark:"",errorText:"",height:30})},_init:function(){BI.SimpleStateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text bi-disabled",textAlign:"left",height:b.height,text:BI.i18nText("BI-Basic_Unrestricted"),hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint()},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){return BI.SimpleStateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.element.addClass("state-editor-infinite-text"))):void(BI.isArray(a)&&1!==a.length?BI.isEmpty(a)?(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.element.addClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(a),this.text.setTitle(a),this.text.element.removeClass("state-editor-infinite-text")))}}),BI.SimpleStateEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SimpleStateEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SimpleStateEditor.EVENT_BLUR="EVENT_BLUR",BI.SimpleStateEditor.EVENT_CLICK="EVENT_CLICK",BI.SimpleStateEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SimpleStateEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.SimpleStateEditor.EVENT_START="EVENT_START",BI.SimpleStateEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SimpleStateEditor.EVENT_STOP="EVENT_STOP",BI.SimpleStateEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SimpleStateEditor.EVENT_VALID="EVENT_VALID",BI.SimpleStateEditor.EVENT_ERROR="EVENT_ERROR",BI.SimpleStateEditor.EVENT_ENTER="EVENT_ENTER",BI.SimpleStateEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SimpleStateEditor.EVENT_SPACE="EVENT_SPACE",BI.SimpleStateEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.simple_state_editor",BI.SimpleStateEditor),BI.TextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.TextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-text-editor bi-border",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:"",height:30})},_init:function(){BI.TextEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNumber(b.height)&&this.element.css({height:b.height-2}),BI.isNumber(b.width)&&this.element.css({width:b.width-2}),this.editor=BI.createWidget({type:"bi.editor",height:b.height-2,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.TextEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.TextEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.TextEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.TextEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.TextEditor.EVENT_KEY_DOWN)}),this.editor.on(BI.Editor.EVENT_SPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.TextEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.TextEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(b){a.fireEvent(BI.TextEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.TextEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.TextEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.TextEditor.EVENT_STOP)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.TextEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.TextEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.TextEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.TextEditor.EVENT_EMPTY)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isValid:function(){return this.editor.isValid()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.TextEditor.EVENT_CHANGE="EVENT_CHANGE",BI.TextEditor.EVENT_FOCUS="EVENT_FOCUS",BI.TextEditor.EVENT_BLUR="EVENT_BLUR",BI.TextEditor.EVENT_CLICK="EVENT_CLICK",BI.TextEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.TextEditor.EVENT_SPACE="EVENT_SPACE",BI.TextEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.TextEditor.EVENT_START="EVENT_START",BI.TextEditor.EVENT_PAUSE="EVENT_PAUSE",BI.TextEditor.EVENT_STOP="EVENT_STOP",BI.TextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.TextEditor.EVENT_VALID="EVENT_VALID",BI.TextEditor.EVENT_ERROR="EVENT_ERROR",BI.TextEditor.EVENT_ENTER="EVENT_ENTER",BI.TextEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.TextEditor.EVENT_REMOVE="EVENT_REMOVE",BI.TextEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.text_editor",BI.TextEditor),BI.SmallTextEditor=BI.inherit(BI.TextEditor,{_defaultConfig:function(){var a=BI.SmallTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-text-editor",height:25})},_init:function(){BI.SmallTextEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_text_editor",BI.SmallTextEditor),BI.BarFloatSection=BI.inherit(BI.FloatSection,{_defaultConfig:function(){return BI.extend(BI.BarFloatSection.superclass._defaultConfig.apply(this,arguments),{btns:[BI.i18nText(BI.i18nText("BI-Basic_Sure")),BI.i18nText("BI-Basic_Cancel")]})},_init:function(){BI.BarFloatSection.superclass._init.apply(this,arguments);var a=this,b=["_init","_defaultConfig","_vessel","_render","getName","listenEnd","local","refresh","load","change"];b=BI.makeObject(b,!0),BI.each(this.constructor.caller.caller.caller.caller.prototype,function(c){if(!b[c]){var d=a[c];BI.isFunction(d)&&(a[c]=BI.bind(function(){return this.model._start===!0?void this._F.push({f:d,arg:arguments}):d.apply(this,arguments)},a))}})},rebuildSouth:function(a){var b=this;this.options;this.sure=BI.createWidget({type:"bi.button",text:this.options.btns[0],height:30,value:0,handler:function(a){b.end(),b.close(a)}}),this.cancel=BI.createWidget({type:"bi.button",text:this.options.btns[1],height:30,value:1,level:"ignore",handler:function(a){b.close(a)}}),BI.createWidget({type:"bi.right_vertical_adapt",element:a,hgap:5,items:[this.cancel,this.sure]})}}),BI.BarPopoverSection=BI.inherit(BI.PopoverSection,{_defaultConfig:function(){return BI.extend(BI.BarPopoverSection.superclass._defaultConfig.apply(this,arguments),{btns:[BI.i18nText(BI.i18nText("BI-Basic_Sure")),BI.i18nText(BI.i18nText("BI-Basic_Cancel"))]})},_init:function(){BI.BarPopoverSection.superclass._init.apply(this,arguments)},rebuildSouth:function(a){var b=this,c=this.options;this.sure=BI.createWidget({type:"bi.button",text:this.options.btns[0],warningTitle:c.warningTitle,height:30,value:0,handler:function(a){b.end(),b.close(a)}}),this.cancel=BI.createWidget({type:"bi.button",text:this.options.btns[1],height:30,value:1,level:"ignore",handler:function(a){b.close(a)}}),BI.createWidget({type:"bi.right_vertical_adapt",element:a,hgap:5,items:[this.cancel,this.sure]})},setConfirmButtonEnable:function(a){this.sure.setEnable(!!a)}}),BI.MultiPopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.MultiPopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-multi-list-view",buttons:[BI.i18nText("BI-Basic_Sure")]})},_init:function(){BI.MultiPopupView.superclass._init.apply(this,arguments)},_createToolBar:function(){var a=this.options,b=this;if(0!==a.buttons.length){var c=[];return BI.each(a.buttons,function(a,b){c.push({text:b,value:a})}),this.buttongroup=BI.createWidget({type:"bi.button_group",cls:"list-view-toolbar bi-high-light bi-border-top",height:30,items:BI.createItems(c,{type:"bi.text_button",once:!1,shadow:!0,isShadowShowingOnSelected:!0}),layouts:[{type:"bi.center",hgap:0,vgap:0}]}),this.buttongroup.on(BI.ButtonGroup.EVENT_CHANGE,function(a,c){b.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,a,c)}),this.buttongroup}}}),BI.MultiPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.multi_popup_view",BI.MultiPopupView),BI.PopupPanel=BI.inherit(BI.MultiPopupView,{_defaultConfig:function(){var a=BI.PopupPanel.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-popup-panel",title:""})},_init:function(){BI.PopupPanel.superclass._init.apply(this,arguments)},_createTool:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.icon_button",cls:"close-h-font",width:25,height:25});return c.on(BI.IconButton.EVENT_CHANGE,function(){a.setVisible(!1),a.fireEvent(BI.PopupPanel.EVENT_CLOSE)}),BI.createWidget({type:"bi.htape",cls:"popup-panel-title bi-background bi-border",height:25,items:[{el:{type:"bi.label",textAlign:"left",text:b.title,height:25,lgap:10}},{el:c,width:25}]})}}),BI.PopupPanel.EVENT_CHANGE="EVENT_CHANGE",BI.PopupPanel.EVENT_CLOSE="EVENT_CLOSE",BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.popup_panel",BI.PopupPanel),BI.ListPane=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.ListPane.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-list-pane",logic:{dynamic:!0},lgap:0,rgap:0,tgap:0,bgap:0,vgap:0,hgap:0,items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.button_group"}})},_init:function(){BI.ListPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{},items:b.items,itemsCreator:function(c,d){1===c.times&&(a.empty(),BI.nextTick(function(){a.loading()})),b.itemsCreator(c,function(){d.apply(a,arguments),1===c.times&&BI.nextTick(function(){a.loaded()})})},hasNext:b.hasNext,layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.ListPane.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top,this.button_group)}))))},hasPrev:function(){return this.button_group.hasPrev&&this.button_group.hasPrev()},hasNext:function(){return this.button_group.hasNext&&this.button_group.hasNext()},prependItems:function(a){this.options.items=a.concat(this.options.items),this.button_group.prependItems.apply(this.button_group,arguments),this.check()},addItems:function(a){this.options.items=this.options.items.concat(a),this.button_group.addItems.apply(this.button_group,arguments),this.check()},removeItemAt:function(a){a=a||[],BI.removeAt(this.options.items,a),this.button_group.removeItemAt.apply(this.button_group,arguments),this.check()},populate:function(a){var b=this;this.options;return 0===arguments.length&&BI.isFunction(this.button_group.attr("itemsCreator"))?void this.button_group.attr("itemsCreator").apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");b.populate.apply(b,arguments)}]):(BI.ListPane.superclass.populate.apply(this,arguments),void this.button_group.populate.apply(this.button_group,arguments))},empty:function(){this.button_group.empty()},setNotSelectedValue:function(){this.button_group.setNotSelectedValue.apply(this.button_group,arguments)},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},setValue:function(){this.button_group.setValue.apply(this.button_group,arguments)},getValue:function(){return this.button_group.getValue.apply(this.button_group,arguments)},getAllButtons:function(){return this.button_group.getAllButtons()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},getIndexByValue:function(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)}}),BI.ListPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_pane",BI.ListPane),BI.Panel=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Panel.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-panel bi-border",title:"",titleButtons:[],el:{},logic:{dynamic:!1}})},_init:function(){BI.Panel.superclass._init.apply(this,arguments);var a=this.options;BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this._createTitle(),this.options.el)}))))},_createTitle:function(){var a=this,b=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"panel-title-text",text:b.title,height:30}),this.button_group=BI.createWidget({type:"bi.button_group",items:b.titleButtons,layouts:[{type:"bi.center_adapt",lgap:10}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Panel.EVENT_CHANGE,b,c)}),{el:{type:"bi.left_right_vertical_adapt",cls:"panel-title bi-tips bi-border-bottom bi-background",height:30,items:{left:[this.text],right:[this.button_group]},lhgap:10,rhgap:10},height:30}},setTitle:function(a){this.text.setValue(a)}}),BI.Panel.EVENT_CHANGE="Panel.EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel),BI.SelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,toolbar:{type:"bi.multi_select_bar"},el:{type:"bi.list_pane"}})},_init:function(){BI.SelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.toolbar=BI.createWidget(b.toolbar),this.toolbar.on(BI.Controller.EVENT_CHANGE,function(b,c,d){var e=this.isSelected();b===BI.Events.CLICK&&(a.setAllSelected(e),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar.setVisible(b&&b.length>0),a.toolbar.setEnable(b&&b.length>0)),a._checkAllSelected()})},onLoaded:b.onLoaded,hasNext:b.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a._checkAllSelected(),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.toolbar,this.list)})))),b.items.length<=0&&(this.toolbar.setVisible(!1),this.toolbar.setEnable(!1))},_checkAllSelected:function(){var a=this.list.getValue().length,b=this.getAllLeaves().length-a,c=this.list.hasNext(),d=this.toolbar.isSelected(),e=a>0&&(b>0||!d&&c);e=e||b>0&&c&&d,this.toolbar.setHalfSelected(e),!e&&this.toolbar.setSelected(a>0&&b<=0&&(!c||d))},setAllSelected:function(a){BI.each(this.getAllButtons(),function(b,c){(c.setSelected||c.setAllSelected).apply(c,[a])}),this.toolbar.setSelected(a),this.toolbar.setHalfSelected(!1)},setToolBarVisible:function(a){this.toolbar.setVisible(a)},isAllSelected:function(){return this.toolbar.isSelected()},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){var b=a.type===BI.ButtonGroup.CHOOSE_TYPE_ALL;this.setAllSelected(b),this.list[b?"setNotSelectedValue":"setValue"](a.value),this._checkAllSelected()},getValue:function(){return this.isAllSelected()===!1?{type:BI.ButtonGroup.CHOOSE_TYPE_MULTI,value:this.list.getValue(),assist:this.list.getNotSelectedValue()}:{type:BI.ButtonGroup.CHOOSE_TYPE_ALL,value:this.list.getNotSelectedValue(),assist:this.list.getValue()}},empty:function(){this.list.empty()},populate:function(a){this.toolbar.setVisible(!BI.isEmptyArray(a)),this.toolbar.setEnable(!BI.isEmptyArray(a)),this.list.populate.apply(this.list,arguments),this._checkAllSelected()},_setEnable:function(a){BI.SelectList.superclass._setEnable.apply(this,arguments),this.toolbar.setEnable(a)},resetHeight:function(a){var b=(this.toolbar.element.outerHeight()||25)*(this.toolbar.isVisible()?1:0);this.list.resetHeight?this.list.resetHeight(a-b):this.list.element.css({"max-height":a-b+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments),this._checkAllSelected()},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_list",BI.SelectList),BI.LazyLoader=BI.inherit(BI.Widget,{_const:{PAGE:100},_defaultConfig:function(){return BI.extend(BI.LazyLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-lazy-loader",el:{}})},_init:function(){var a=this,b=this.options;BI.LazyLoader.superclass._init.apply(this,arguments);var c=b.items.length;this.loader=BI.createWidget({type:"bi.loader",element:this,el:b.el,itemsCreator:function(b,c){c(a._getNextItems(b))},hasNext:function(a){return a.count=1)},setValue:function(a){this.pager.setValue(a)},setVPage:function(a){this.pager.setValue(a)},setCount:function(a){this.rowCount.setText(a),this.rowCount.setTitle(a)},getCurrentPage:function(){return this.pager.getCurrentPage()},hasPrev:function(){return this.pager.hasPrev()},hasNext:function(){return this.pager.hasNext()},setPagerVisible:function(a){this.editor.setVisible(a),this.allPages.setVisible(a),this.pager.setVisible(a)},populate:function(){this.pager.populate()}}),BI.AllCountPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.all_count_pager",BI.AllCountPager),BI.DirectionPager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DirectionPager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-direction-pager",height:30,horizontal:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn},vertical:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn}})},_init:function(){BI.DirectionPager.superclass._init.apply(this,arguments);var a=this.options;a.vertical,a.horizontal;this._createVPager(),this._createHPager(),this.layout=BI.createWidget({type:"bi.absolute",scrollable:!1,element:this,items:[{el:this.vpager,top:5,right:74},{el:this.vlabel,top:5,right:111},{el:this.hpager,top:5,right:-9},{el:this.hlabel,top:5,right:28}]})},_createVPager:function(){var a=this,b=this.options,c=b.vertical;this.vlabel=BI.createWidget({type:"bi.label",width:24,height:20,value:c.curr,title:c.curr}),this.vpager=BI.createWidget({type:"bi.pager",width:76,layouts:[{type:"bi.horizontal",scrollx:!1,rgap:24,vgap:1}],dynamicShow:!1,pages:c.pages,curr:c.curr,groups:0,first:!1,last:!1,prev:{type:"bi.icon_button",value:"prev",title:BI.i18nText("BI-Up_Page"),warningTitle:BI.i18nText("BI-Current_Is_First_Page"),height:20,iconWidth:16,iconHeight:16,cls:"direction-pager-prev column-pre-page-h-font"},next:{type:"bi.icon_button",value:"next",title:BI.i18nText("BI-Down_Page"),warningTitle:BI.i18nText("BI-Current_Is_Last_Page"),height:20,iconWidth:16,iconHeight:16,cls:"direction-pager-next column-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.vpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.vlabel.setValue(this.getCurrentPage()),a.vlabel.setTitle(this.getCurrentPage())})},_createHPager:function(){var a=this,b=this.options,c=b.horizontal;this.hlabel=BI.createWidget({type:"bi.label",width:24,height:20,value:c.curr,title:c.curr}),this.hpager=BI.createWidget({type:"bi.pager",width:76,layouts:[{type:"bi.horizontal",scrollx:!1,rgap:24,vgap:1}],dynamicShow:!1,pages:c.pages,curr:c.curr,groups:0,first:!1,last:!1,prev:{type:"bi.icon_button",value:"prev",title:BI.i18nText("BI-Left_Page"),warningTitle:BI.i18nText("BI-Current_Is_First_Page"),height:20,iconWidth:16,iconHeight:16,cls:"direction-pager-prev row-pre-page-h-font"},next:{type:"bi.icon_button",value:"next",title:BI.i18nText("BI-Right_Page"),warningTitle:BI.i18nText("BI-Current_Is_Last_Page"),height:20,iconWidth:16,iconHeight:16,cls:"direction-pager-next row-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.hpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.hlabel.setValue(this.getCurrentPage()),a.hlabel.setTitle(this.getCurrentPage())})},getVPage:function(){return this.vpager.getCurrentPage()},getHPage:function(){return this.hpager.getCurrentPage()},setVPage:function(a){this.vpager.setValue(a),this.vlabel.setValue(a),this.vlabel.setTitle(a)},setHPage:function(a){this.hpager.setValue(a),this.hlabel.setValue(a),this.hlabel.setTitle(a)},hasVNext:function(){return this.vpager.hasNext()},hasHNext:function(){return this.hpager.hasNext()},hasVPrev:function(){return this.vpager.hasPrev()},hasHPrev:function(){return this.hpager.hasPrev()},setHPagerVisible:function(a){this.hpager.setVisible(a),this.hlabel.setVisible(a)},setVPagerVisible:function(a){this.vpager.setVisible(a),this.vlabel.setVisible(a)},populate:function(){this.vpager.populate(),this.hpager.populate();var a=!1,b=!1;this.hasHNext()||this.hasHPrev()?(this.setHPagerVisible(!0),b=!0):this.setHPagerVisible(!1),this.hasVNext()||this.hasVPrev()?(this.setVPagerVisible(!0),a=!0):this.setVPagerVisible(!1),this.setVisible(b||a);var c=[74,111,-9,28],d=this.layout.attr("items");a===!0&&b===!0?(d[0].right=c[0],d[1].right=c[1],d[2].right=c[2],d[3].right=c[3]):a===!0?(d[0].right=c[2],d[1].right=c[3]):b===!0&&(d[2].right=c[2],d[3].right=c[3]),this.layout.attr("items",d),this.layout.resize()},clear:function(){this.vpager.attr("curr",1),this.hpager.attr("curr",1)}}),BI.DirectionPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.direction_pager",BI.DirectionPager),BI.DetailPager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DetailPager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-detail-pager",behaviors:{},layouts:[{type:"bi.horizontal",hgap:10,vgap:0}],dynamicShow:!0,dynamicShowFirstLast:!1,dynamicShowPrevNext:!1,pages:!1,curr:function(){return 1},groups:0,jump:BI.emptyFn,first:!1,last:!1,prev:"上一页",next:"下一页",firstPage:1,lastPage:function(){return 1},hasPrev:BI.emptyFn,hasNext:BI.emptyFn})},_init:function(){BI.DetailPager.superclass._init.apply(this,arguments);var a=this;this.currPage=BI.result(this.options,"curr"),this._lock=!1,this._debouce=BI.debounce(function(){a._lock=!1},300),this._populate()},_populate:function(){var a=this,b=this.options,c=[],d={};this.empty();var e=BI.result(b,"pages"),f=BI.result(this,"currPage"),g=BI.result(b,"groups"),h=BI.result(b,"first"),i=BI.result(b,"last"),j=BI.result(b,"prev"),k=BI.result(b,"next");e===!1?(g=0,h=!1,i=!1):g>e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start1&&0!==g&&e>g&&d.endg&&d.endg&&d.endg&&d.end1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):ac?c:(d=BI.result(b,"firstPage"),ab.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.DetailPager.superclass.attr.apply(this,arguments),"curr"===a&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.DetailPager.EVENT_CHANGE="EVENT_CHANGE",BI.DetailPager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.detail_pager",BI.DetailPager),BI.SegmentButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.SegmentButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-segment-button bi-list-item-active",shadow:!0,readonly:!0,hgap:5})},_init:function(){BI.SegmentButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,height:a.height-2,whiteSpace:a.whiteSpace,text:a.text,value:a.value,hgap:a.hgap})},setSelected:function(){BI.SegmentButton.superclass.setSelected.apply(this,arguments)},setText:function(a){BI.SegmentButton.superclass.setText.apply(this,arguments),this.text.setText(a)},destroy:function(){BI.SegmentButton.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.segment_button",BI.SegmentButton),BI.Segment=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Segment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-segment",items:[],height:30})},_init:function(){BI.Segment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.buttonGroup=BI.createWidget({element:this,type:"bi.button_group",items:BI.createItems(b.items,{type:"bi.segment_button",height:b.height-2,whiteSpace:b.whiteSpace}),layout:[{type:"bi.center"}]}),this.buttonGroup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Segment.EVENT_CHANGE,b,c)})},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.Segment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.segment",BI.Segment),BI.AdaptiveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.AdaptiveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-adaptive-table",el:{type:"bi.resizable_table"},isNeedResize:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.AdaptiveTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:c.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:c.columnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:c.regionColumnSize,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),a._populate(),a.table.populate(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.columnSize=this.getColumnSize(),a._populate(),a.table.populate(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_getFreezeColLength:function(){return this.options.isNeedFreeze===!0?this.options.freezeCols.length:0},_digest:function(){var a=this.options,b=a.columnSize.slice(),c=a.regionColumnSize.slice(),d=a.freezeCols.slice(),e=a.regionColumnSize[0],f=this._getFreezeColLength();(!e||e>a.width-10||e<10)&&(e=(f>a.columnSize.length/2?2/3:1/3)*a.width),0===f&&(e=0),d.length>=b.length&&(d=[]),BI.isNumber(b[0])||(b=a.minColumnSize.slice());var g=0,h=0;return BI.each(b,function(a,b){a0&&(b[f-1]=BI.clamp(e-(g-b[f-1]),a.minColumnSize[f-1]||10,a.maxColumnSize[f-1]||Number.MAX_VALUE)),b.length>0&&(b[b.length-1]=BI.clamp(a.width-BI.GridTableScrollbar.SIZE-e-(h-g-b[b.length-1]),a.minColumnSize[b.length-1]||10,a.maxColumnSize[b.length-1]||Number.MAX_VALUE)),c[0]=e,{freezeCols:d,columnSize:b,regionColumnSize:c}},_populate:function(){var a=this.options,b=this._digest();a.regionColumnSize=b.regionColumnSize,a.columnSize=b.columnSize,this.table.setColumnSize(b.columnSize),this.table.setRegionColumnSize(b.regionColumnSize),this.table.attr("freezeCols",b.freezeCols)},setWidth:function(a){BI.AdaptiveTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.AdaptiveTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=BI.AdaptiveTable.superclass.attr.apply(this,arguments);return"freezeCols"===a?c:this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a){this.options;this._populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),BI.AdaptiveTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.adaptive_table",BI.AdaptiveTable),BI.DynamicSummaryLayerTreeTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DynamicSummaryLayerTreeTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-dynamic-summary-layer-tree-table",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:[],rowHeaderCreator:null,headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_createHeader:function(a){var b=this.options,c=b.header||[],d=b.crossHeader||[],e=BI.TableTree.formatCrossItems(b.crossItems,a,b.headerCellStyleGetter),f=[];if(BI.each(e,function(a,b){var c=[d[a]];f.push(c.concat(b||[]))}),c&&c.length>0){var g=this._formatColumns(c),h=this._getHDeep();h<=0?g.unshift(b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter}):g[0]=b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter},f.push(g)}return f},_formatItems:function(a,b,c){function d(a,b){a.type||(a.type="bi.layer_tree_table_cell"),a.layer=b;var c=[a];c=c.concat(a.values||[]),c.length>0&&f.push(c),BI.isNotEmptyArray(a.children)&&BI.each(a.children,function(a,c){d(c,b+1)})}var e=this.options,f=[];return BI.each(a,function(a,b){if(BI.each(b.children,function(a,b){d(b,0)}),BI.isArray(b.values)){var c=[{type:"bi.table_style_cell",text:BI.i18nText("BI-Summary_Values"),styleGetter:function(){return e.summaryCellStyleGetter(!0)}}].concat(b.values);f.push(c)}}),BI.DynamicSummaryTreeTable.formatSummaryItems(f,b,e.crossItems,1)},_formatColumns:function(a,b){return BI.isNotEmptyArray(a)?(b=b||this._getHDeep(),a.slice(Math.max(0,b-1))):a},_formatFreezeCols:function(){return this.options.freezeCols.length>0?[0]:[]},_formatColumnSize:function(a,b){if(a.length<=0)return[];var c=[0];return b=b||this._getHDeep(),BI.each(a,function(a,d){return a1)for(var c=0;c1)&&BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j0)if(c)for(var k=0,l=g.values.length;k0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e1?g+=a.values.length:g++}var f=[],g=0;if(BI.each(c,function(a,b){e(b)}),f.length>0){var h=[],i=[];BI.each(b,function(a,b){var c=b.slice();BI.removeAt(c,f),h.push(c)}),BI.each(a,function(a,b){var c=b.slice();BI.removeAt(c,f),i.push(c)}),b=h,a=i}return{items:a,header:b,deletedCols:f}}}),BI.shortcut("bi.dynamic_summary_tree_table",BI.DynamicSummaryTreeTable),BI.LayerTreeTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LayerTreeTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-layer-tree-table-cell",layer:0,text:""})},_init:function(){BI.LayerTreeTableCell.superclass._init.apply(this,arguments);var a=this.options;BI.createWidget({type:"bi.label",element:this.element,textAlign:"left",whiteSpace:"nowrap",height:a.height,text:a.text,value:a.value,lgap:5+30*a.layer,rgap:5})}}),BI.shortcut("bi.layer_tree_table_cell",BI.LayerTreeTableCell),BI.LayerTreeTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LayerTreeTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-layer-tree-table",el:{type:"bi.resizable_table"},isNeedResize:!1,isResizeAdapt:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],rowHeaderCreator:null,headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_createHeader:function(a){var b=this.options,c=b.header||[],d=b.crossHeader||[],e=BI.TableTree.formatCrossItems(b.crossItems,a,b.headerCellStyleGetter),f=[];if(BI.each(e,function(a,b){var c=[d[a]];f.push(c.concat(b||[]))}),c&&c.length>0){var g=this._formatColumns(c),h=this._getHDeep();h<=0?g.unshift(b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter}):g[0]=b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter},f.push(g)}return f},_formatItems:function(a){function b(a,c){a.type||(a.type="bi.layer_tree_table_cell"),a.layer=c;var e=[a];e=e.concat(a.values||[]),e.length>0&&d.push(e),BI.isNotEmptyArray(a.children)&&BI.each(a.children,function(a,d){b(d,c+1)})}var c=this.options,d=[];return BI.each(a,function(a,e){if(BI.each(e.children,function(a,c){b(c,0)}),BI.isArray(e.values)){var f=[{type:"bi.table_style_cell",text:BI.i18nText("BI-Summary_Values"),styleGetter:function(){return c.summaryCellStyleGetter(!0)}}].concat(e.values);d.push(f)}}),d},_formatColumns:function(a,b){return BI.isNotEmptyArray(a)?(b=b||this._getHDeep(),a.slice(Math.max(0,b-1))):a},_formatFreezeCols:function(){return this.options.freezeCols.length>0?[0]:[]},_formatColumnSize:function(a,b){if(a.length<=0)return[];var c=[0];return b=b||this._getHDeep(),BI.each(a,function(a,d){return a0&&(c=BI.makeArray(b,a[0]/b)),c.concat(a.slice(1))},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=this;if(BI.isObject(a))return void BI.each(a,function(a,b){c.attr(a,b)});switch(BI.LayerTreeTable.superclass.attr.apply(this,arguments),a){case"columnSize":case"minColumnSize":case"maxColumnSize":case"freezeCols":case"mergeCols":return}this.table.attr.apply(this.table,[a,b])},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;e.items=a||[],b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.setColumnSize(f.columnSize),this.table.attr("freezeCols",f.freezeCols),this.table.attr("minColumnSize",f.minColumnSize),this.table.attr("maxColumnSize",f.maxColumnSize),this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.LayerTreeTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.layer_tree_table",BI.LayerTreeTable),BI.TableStyleCell=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TableStyleCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-style-cell",styleGetter:BI.emptyFn})},_init:function(){BI.TableStyleCell.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",forceCenter:!0,hgap:5,text:a.text}),this._digestStyle()},_digestStyle:function(){var a=this.options,b=a.styleGetter();b&&this.text.element.css(b)},setText:function(a){this.text.setText(a)},populate:function(){this._digestStyle()}}),BI.shortcut("bi.table_style_cell",BI.TableStyleCell),BI.TableTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TableTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-tree",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_init:function(){BI.TableTree.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep(),d=BI.TableTree.formatHeader(a.header,a.crossHeader,a.crossItems,b,c,a.headerCellStyleGetter),e=BI.TableTree.formatItems(a.items,b,!1,a.summaryCellStyleGetter);return{header:d,items:e}},setWidth:function(a){BI.TableTree.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.TableTree.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(){BI.TableTree.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a||[]),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.TableTree.superclass.destroy.apply(this,arguments)}}),BI.extend(BI.TableTree,{formatHeader:function(a,b,c,d,e,f){for(var g=BI.TableTree.formatCrossItems(c,e,f),h=[],i=0;i0&&h.push(a),h},formatItems:function(a,b,c,d){function e(a,g){var h;if(BI.isArray(g.children)){if(BI.each(g.children,function(b,c){var d;a!=-1?(d=a.slice(),d.push(g)):d=[],e(d,c)}),a!=-1?(h=a.slice(),h.push(g)):h=[],BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j0)if(c)for(var k=0,l=g.values.length;k0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e0}})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){a.setSelected(a.isSelected())}}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){a.setSelected(!0)}}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:36,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]}),this.half.invisible()},beforeClick:function(){var a=this.isHalfSelected(),b=this.isSelected();a===!0?this.setSelected(!0):this.setSelected(!b)},setSelected:function(a){this.checkbox.setSelected(a),this.setHalfSelected(!1)},setHalfSelected:function(a){this._half=!!a,a===!0?(this.half.visible(),this.checkbox.invisible()):(this.half.invisible(),this.checkbox.visible())},isHalfSelected:function(){return!!this._half},isSelected:function(){return this.checkbox.isSelected()},setValue:function(a){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var b=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this.setSelected(b),!b&&this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this,arguments))}}),BI.MultiSelectBar.EVENT_CHANGE="MultiSelectBar.EVENT_CHANGE",BI.shortcut("bi.multi_select_bar",BI.MultiSelectBar),BI.HandStandBranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-expander",direction:BI.Direction.Top,logic:{dynamic:!0},el:{type:"bi.label"},popup:{}})},_init:function(){BI.HandStandBranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend({},a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,{type:"bi.center_adapt",items:[this.expander]},this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.HandStandBranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_expander",BI.HandStandBranchExpander),BI.BranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-expander",direction:BI.Direction.Left,logic:{dynamic:!0},el:{},popup:{}})},_init:function(){BI.BranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend({},a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,this.expander,this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el,{type:"bi.label",width:30,height:"100%"}),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.BranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_expander",BI.BranchExpander),BI.HandStandBranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.HandStandBranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.handstand_branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.horizontal_adapt"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.HandStandBranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.HandStandBranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_tree",BI.HandStandBranchTree),BI.BranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.BranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.BranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.BranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_tree",BI.BranchTree),BI.DisplayTree=BI.inherit(BI.TreeView,{_defaultConfig:function(){return BI.extend(BI.DisplayTree.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-display-tree"})},_init:function(){BI.DisplayTree.superclass._init.apply(this,arguments)},_configSetting:function(){function a(a,b){return!1}var b={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return b},_dealWidthNodes:function(a){a=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.count>0?b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")":b.text=b.value}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.DisplayTree.superclass.destroy.apply(this,arguments)}}),BI.DisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.display_tree",BI.DisplayTree),BI.LevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-level-tree",el:{chooseType:0},expander:{},items:[]})},_init:function(){BI.LevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.first_plus_group_node";break;case a.length-1:f.type="bi.last_plus_group_node";break;default:f.type="bi.mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){BI.isKey(b.id)||(b.id=BI.UUID())})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},c.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},c.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.LevelTree.EVENT_CHANGE,arguments)})},stroke:function(a){this.tree.stroke.apply(this.tree,arguments)},populate:function(a){a=this._formatItems(BI.Tree.transformToTreeFormat(a),0),this.tree.populate(a)},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree),BI.SimpleTreeView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SimpleTreeView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-simple-tree",itemsCreator:BI.emptyFn,items:null})},_init:function(){BI.SimpleTreeView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(c,d){var e=function(b){d({items:b}),a.structure.initTree(BI.Tree.transformToTreeFormat(b))};BI.isNotNull(b.items)?e(b.items):b.itemsCreator(c,e)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(b.items)&&this.populate()},populate:function(a,b){a&&(this.options.items=a),this.tree.stroke({keyword:b})},setValue:function(a){a||(a=[]);var b=this,c={},d=[];BI.each(a,function(a,e){var f=b.structure.search(e,"value");if(f){var g=f;for(g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++);g&&g.getChildrenLength()<=c[g.value];)d.push(g.value),g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++)}}),this.tree.setValue(BI.makeObject(a.concat(d)))},_getValue:function(){var a=[],b=this.tree.getValue(),c=function(b){BI.each(b,function(b,d){BI.isEmpty(d)?a.push(b):c(d)})};return c(b),a},empty:function(){this.tree.empty()},getValue:function(){var a=this,b=[],c=this._getValue();return BI.each(c,function(c,d){var e=a.structure.search(d,"value");e&&a.structure._traverse(e,function(a){a.isLeaf()&&b.push(a.value)})}),b}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView),BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-editor-trigger bi-border",height:30,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:"",triggerWidth:30})},_init:function(){this.options.height-=2,BI.EditorTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",cls:"bi-border-left",width:b.triggerWidth},width:b.triggerWidth}]})},getValue:function(){return this.editor.getValue()},setValue:function(a){this.editor.setValue(a)},setText:function(a){this.editor.setState(a)}}),BI.EditorTrigger.EVENT_CHANGE="BI.EditorTrigger.EVENT_CHANGE",BI.shortcut("bi.editor_trigger",BI.EditorTrigger),BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-trigger",el:{},height:30})},_init:function(){var a=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(a.el,{type:"bi.trigger_icon_button",element:this,width:a.width,height:a.height})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger),BI.TextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:30},_defaultConfig:function(){var a=BI.TextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:30})},_init:function(){BI.TextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-border-left",width:b.triggerWidth}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth}]})},setValue:function(a){this.text.setValue(a),this.text.setTitle(a)},setText:function(a){this.text.setText(a),this.text.setTitle(a)}}),BI.shortcut("bi.text_trigger",BI.TextTrigger),BI.SelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-text-trigger bi-border",height:24})},_init:function(){this.options.height-=2,BI.SelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",element:this,height:a.height}),BI.isKey(a.text)&&this.setValue(a.text)},setValue:function(a){var b=this.options;a=BI.isArray(a)?a:[a];var c=[],d=BI.Tree.transformToArrayFormat(this.options.items);BI.each(d,function(b,d){BI.deepContains(a,d.value)&&!c.contains(d.text||d.value)&&c.push(d.text||d.value)}),c.length>0?this.trigger.setText(c.join(",")):this.trigger.setText(b.text)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_text_trigger",BI.SelectTextTrigger),BI.SmallSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SmallSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-small-select-text-trigger bi-border",height:20})},_init:function(){this.options.height-=2,BI.SmallSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:a.height-2}),BI.isKey(a.text)&&this.setValue(a.text)},setValue:function(a){var b=this.options;a=BI.isArray(a)?a:[a];var c=[],d=BI.Tree.transformToArrayFormat(this.options.items);BI.each(d,function(b,d){BI.deepContains(a,d.value)&&!c.contains(d.text||d.value)&&c.push(d.text||d.value)}),c.length>0?(this.trigger.element.removeClass("bi-water-mark"),this.trigger.setText(c.join(","))):(this.trigger.element.addClass("bi-water-mark"),this.trigger.setText(b.text))},populate:function(a){this.options.items=a}}),BI.shortcut("bi.small_select_text_trigger",BI.SmallSelectTextTrigger),BI.SmallTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:20},_defaultConfig:function(){var a=BI.SmallTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:20})},_init:function(){BI.SmallTextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth}]})},setValue:function(a){this.text.setValue(a)},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.small_text_trigger",BI.SmallTextTrigger),BI.SequenceTableTreeNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableTreeNumber.superclass._defaultConfig.apply(this,arguments),{ -baseCls:"bi-sequence-table-tree-number",isNeedFreeze:!1,startSequence:1,scrollTop:0,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.SequenceTableTreeNumber.superclass._init.apply(this,arguments);this.options;this.vCurr=1,this.hCurr=1,this.tasks=[],this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:this._getHeaderHeight()-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this.start=this.options.startSequence,this.cache={},this._nextState(),this._populate()},_getNextSequence:function(a){function b(a){c.cache[a.text||a.value]||(c.cache[a.text||a.value]=e),e++}var c=this,d=this.start,e=this.start;return BI.each(a,function(a,f){BI.isNotEmptyArray(f.children)&&BI.each(f.children,function(a,f){0===a&&c.cache[f.text||f.value]&&(d=e=c.cache[f.text||f.value]),b(f)})}),this.start=e,d},_getStart:function(a){var b=this,c=this.start;return BI.some(a,function(a,d){if(BI.isNotEmptyArray(d.children))return BI.some(d.children,function(a,d){if(0===a&&b.cache[d.text||d.value])return c=b.cache[d.text||d.value],!0})}),c},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d},_layout:function(){var a=this.options,b=this._getHeaderHeight()-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize();try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_getHeaderHeight:function(){var a=this.options;return a.headerRowSize*(a.crossHeader.length+(a.header.length>0?1:0))},_nextState:function(){var a=this.options;this._getNextSequence(a.items)},_prevState:function(){var a,b=this.options;BI.some(b.items,function(b,c){if(BI.isNotEmptyArray(c.children))return BI.some(c.children,function(b,c){return a=c,!0})}),a&&BI.isNotEmptyObject(this.cache)?this.start=this.cache[a.text||a.value]:this.start=1,this._nextState()},_getMaxScrollTop:function(a){var b=0;return BI.each(a,function(a,c){b+=c.cnt}),Math.max(0,b*this.options.rowSize-(this.options.height-this._getHeaderHeight())+BI.DOM.getScrollWidth())},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){var a=this,b=this.options,c=[],d=[],e=this._formatNumber(b.items),f=BI.PrefixIntervalTree.uniform(e.length,0);BI.each(e,function(a,b){f.set(a,b.height)});for(var g=BI.clamp(b.scrollTop,0,this._getMaxScrollTop(e)),h=f.greatestLowerBound(g),i=-(g-(h>0?f.sumTo(h-1):0)),j=i,k=b.height-this._getHeaderHeight();j-1)e[f].height!==a.renderedCells[g]._height&&(a.renderedCells[g]._height=e[f].height,a.renderedCells[g].el.setHeight(e[f].height)),e[f].top!==a.renderedCells[g].top&&(a.renderedCells[g].top=e[f].top,a.renderedCells[g].el.element.css("top",e[f].top+"px")),c.push(a.renderedCells[g]);else{var h=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,styleGetter:e[f].isSummary===!0?function(){return b.summaryCellStyleGetter(!0)}:function(a){return function(){return b.sequenceCellStyleGetter(a)}}(e[f].index)},e[f]));c.push({el:h,left:0,top:e[f].top,_height:e[f].height})}});var l={},m={},n=[];BI.each(d,function(b,c){BI.deepContains(a.renderedKeys,c)?l[b]=c:m[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(l,b)||BI.deepContains(m,b)||n.push(a)}),BI.each(n,function(b,c){a.renderedCells[c].el.destroy()});var o=[];BI.each(m,function(a){o.push(c[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:o}),this.renderedCells=c,this.renderedKeys=d,this.container.setHeight(f.sumUntil(e.length))},_restore:function(){BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},_populate:function(){var a=this;BI.each(this.tasks,function(b,c){c.apply(a)}),this.tasks=[],this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a<=1?(this.cache={},this.start=this.options.startSequence,this._restore(),this.tasks.push(this._nextState)):a===this.vCurr+1?this.tasks.push(this._nextState):a===this.vCurr-1&&this.tasks.push(this._prevState),this.vCurr=a},setHPage:function(a){a!==this.hCurr&&this.tasks.push(this._prevState),this.hCurr=a},restore:function(){this._restore()},populate:function(a,b,c,d){var e=this.options;a&&a!==this.options.items&&(e.items=a,this._restore(),this.tasks.push(this._prevState)),b&&b!==this.options.header&&(e.header=b),c&&c!==this.options.crossItems&&(e.crossItems=c),d&&d!==this.options.crossHeader&&(e.crossHeader=d),this._populate()}}),BI.shortcut("bi.sequence_table_tree_number",BI.SequenceTableTreeNumber),BI.AdaptiveArrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AdaptiveArrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-adaptive-arrangement",resizable:!0,layoutType:BI.Arrangement.LAYOUT_TYPE.FREE,items:[]})},_init:function(){BI.AdaptiveArrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.arrangement",element:this,layoutType:b.layoutType,items:b.items}),this.arrangement.on(BI.Arrangement.EVENT_SCROLL,function(){a.fireEvent(BI.AdaptiveArrangement.EVENT_SCROLL,arguments)}),this.zIndex=0,BI.each(b.items,function(b,c){a._initResizable(c.el)}),$(document).mousedown(function(b){BI.each(a.getAllRegions(),function(a,c){0===c.el.element.find(b.target).length&&c.el.element.removeClass("selected")})}),BI.ResizeDetector.addResizeListener(this,function(){a.arrangement.resize(),a.fireEvent(BI.AdaptiveArrangement.EVENT_RESIZE)})},_isEqual:function(){return this.arrangement._isEqual.apply(this.arrangement,arguments)},_setSelect:function(a){a.element.hasClass("selected")||(a.element.css("zIndex",++this.zIndex),BI.each(this.getAllRegions(),function(a,b){b.el.element.removeClass("selected")}),a.element.addClass("selected"))},_initResizable:function(a){var b=this;this.options;a.element.css("zIndex",++this.zIndex),a.element.mousedown(function(){b._setSelect(a)})},_getScrollOffset:function(){return this.arrangement._getScrollOffset()},getClientWidth:function(){return this.arrangement.getClientWidth()},getClientHeight:function(){return this.arrangement.getClientHeight()},addRegion:function(a,b){this._initResizable(a.el),this._setSelect(a.el);var c,d=this.arrangement.getAllRegions();return(c=this.arrangement.addRegion(a,b))&&(this._old=d),c},deleteRegion:function(a){var b,c=this.getAllRegions();return(b=this.arrangement.deleteRegion(a))?this._old=c:(this._old=this.getAllRegions(),this.relayout()),b},setRegionSize:function(a,b){var c,d=this.getAllRegions();return(c=this.arrangement.setRegionSize(a,b))&&(this._old=d),c},setPosition:function(a,b){return this.arrangement.setPosition(a,b)},setRegionPosition:function(a,b){this.getRegionByName(a);return this.arrangement.setRegionPosition(a,b)},setDropPosition:function(a,b){return this.arrangement.setDropPosition(a,b)},scrollInterval:function(a,b,c,d){function e(a,b){if(""===a)return f.lastActiveRegion="",void(f._scrollInterval&&(clearInterval(f._scrollInterval),f._scrollInterval=null));if(f.lastActiveRegion!==a){f.lastActiveRegion=a,f._scrollInterval&&(clearInterval(f._scrollInterval),f._scrollInterval=null);var c=0;f._scrollInterval=setInterval(function(){if(c++,!(c<=3)){var d=f._getScrollOffset(),e=d.top+40*g[a][0],h=d.left+40*g[a][1];e<0||h<0||(b({offsetX:40*g[a][1],offsetY:40*g[a][0]}),f.scrollTo({top:e,left:h}))}},300)}}var f=this,g={top:[-1,0],bottom:[1,0],left:[0,-1],right:[0,1]},h=this.element.bounds();d({offsetX:0,offsetY:0});var i=this.element.offset(),j={left:a.pageX-i.left,top:a.pageY-i.top};b&&j.top>=0&&j.top<=30?e("top",d):b&&j.top>=h.height-30&&j.top<=h.height?e("bottom",d):b&&j.left>=0&&j.left<=30?e("left",d):b&&j.left>=h.width-30&&j.left<=h.width?e("right",d):c===!0?j.top<0?e("top",d):j.top>h.height?e("bottom",d):j.left<0?e("left",d):j.left>h.width?e("right",d):e("",d):e("",d)},scrollEnd:function(){this.lastActiveRegion="",this._scrollInterval&&(clearInterval(this._scrollInterval),this._scrollInterval=null)},scrollTo:function(a){this.arrangement.scrollTo(a)},zoom:function(a){this.arrangement.zoom(a)},resize:function(){this.arrangement.resize()},relayout:function(){return this.arrangement.relayout()},setLayoutType:function(a){this.arrangement.setLayoutType(a)},getLayoutType:function(){return this.arrangement.getLayoutType()},getLayoutRatio:function(){return this.arrangement.getLayoutRatio()},getHelper:function(){return this.arrangement.getHelper()},getRegionByName:function(a){return this.arrangement.getRegionByName(a)},getAllRegions:function(){return this.arrangement.getAllRegions()},revoke:function(){this._old&&this.populate(BI.toArray(this._old))},populate:function(a){var b=this;BI.each(a,function(a,c){b._initResizable(c.el)}),this.arrangement.populate(a)}}),BI.AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE",BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_RESIZE",BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE",BI.AdaptiveArrangement.EVENT_RESIZE="AdaptiveArrangement.EVENT_RESIZE",BI.AdaptiveArrangement.EVENT_SCROLL="AdaptiveArrangement.EVENT_SCROLL",BI.shortcut("bi.adaptive_arrangement",BI.AdaptiveArrangement),BI.ArrangementBlock=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ArrangementBlock.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement-block bi-mask"})}}),BI.shortcut("bi.arrangement_block",BI.ArrangementBlock),BI.ArrangementDroppable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ArrangementDroppable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement-droppable bi-resizer"})}}),BI.shortcut("bi.arrangement_droppable",BI.ArrangementDroppable),BI.Arrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Arrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement",layoutType:BI.Arrangement.LAYOUT_TYPE.GRID,items:[]})},_init:function(){BI.Arrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.arrangement_droppable",cls:"arrangement-block",invisible:!0}),this.block=BI.createWidget({type:"bi.arrangement_block",invisible:!0}),this.container=BI.createWidget({type:"bi.absolute",items:b.items.concat([this.block,this.arrangement])}),this.scrollContainer=BI.createWidget({type:"bi.adaptive",width:"100%",height:"100%",scrollable:!0,items:[this.container]}),this.scrollContainer.element.scroll(function(){a.fireEvent(BI.Arrangement.EVENT_SCROLL,{scrollLeft:a.scrollContainer.element.scrollLeft(),scrollTop:a.scrollContainer.element.scrollTop(),clientWidth:a.scrollContainer.element[0].clientWidth,clientHeight:a.scrollContainer.element[0].clientHeight})}),BI.createWidget({type:"bi.adaptive",element:this,items:[this.scrollContainer]}),this.regions={},b.items.length>0&&BI.nextTick(function(){a.populate(b.items)})},_calculateRegions:function(a){var b=this;this.options;this.regions={},BI.each(a,function(a,c){var d=b._createOneRegion(c);b.regions[d.id]=d})},_isEqual:function(a,b){return Math.abs(a-b)<2},_isLessThan:function(a,b){return ab&&!this._isEqual(a,b)},_isLessThanEqual:function(a,b){return a<=b||this._isEqual(a,b)},_isMoreThanEqual:function(a,b){return a>=b||this._isEqual(a,b)},_getRegionOccupied:function(a){this.options;if(BI.size(a||this.regions)<=0)return{left:0,top:0,width:0,height:0};var b=BI.MAX,c=BI.MIN,d=BI.MAX,e=BI.MIN;return BI.each(a||this.regions,function(a,f){b=Math.min(b,f.left),c=Math.max(c,f.left+f.width),d=Math.min(d,f.top),e=Math.max(e,f.top+f.height)}),{left:b,top:d,width:c-b,height:e-d}},_getCrossArea:function(a,b){if(a.left<=b.left){if(a.top<=b.top){if(a.top+a.height>b.top&&a.left+a.width>b.left)return this._isEqual(a.top+a.height,b.top)||this._isEqual(a.left+a.width,b.left)?0:(a.top+a.height-b.top)*(a.left+a.width-b.left)}else if(b.top+b.height>a.top&&a.left+a.width>b.left)return this._isEqual(b.top+b.height,a.top)||this._isEqual(a.left+a.width,b.left)?0:(b.top+b.height-a.top)*(a.left+a.width-b.left)}else if(a.top<=b.top){if(a.top+a.height>b.top&&b.left+b.width>a.left)return this._isEqual(a.top+a.height,b.top)||this._isEqual(b.left+b.width,a.left)?0:(a.top+a.height-b.top)*(b.left+b.width-a.left)}else if(b.top+b.height>a.top&&b.left+b.width>a.left)return this._isEqual(b.top+b.height,a.top)||this._isEqual(b.left+b.width,a.left)?0:(b.top+b.height-a.top)*(b.left+b.width-a.left);return 0},_isRegionOverlay:function(a){var b=[];BI.each(a||this.regions,function(a,c){b.push(new BI.Region(c.left,c.top,c.width,c.height))});for(var c=0,d=b.length;c1)return!0}return!1},_isArrangeFine:function(a){switch(this.options.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:return!0;case BI.Arrangement.LAYOUT_TYPE.GRID:}return!0},_getRegionNames:function(a){var b=[];return BI.each(a||this.regions,function(a,c){b.push(c.id||c.attr("id"))}),b},_getRegionsByNames:function(a,b){if(a=BI.isArray(a)?a:[a],b=b||this.regions,BI.isArray(b)){var c=[];BI.each(b,function(b,d){a.contains(d.id||d.attr("id"))&&c.push(d)})}else{var c={};BI.each(a,function(a,d){c[d]=b[d]})}return c},_cloneRegion:function(a){var b={};return BI.each(a||this.regions,function(a,c){b[a]={},b[a].el=c.el,b[a].id=c.id,b[a].left=c.left,b[a].top=c.top,b[a].width=c.width,b[a].height=c.height}),b},_test:function(a){return!BI.any(a||this.regions,function(a,b){if(BI.isNaN(b.width)||BI.isNaN(b.height)||b.width<=21||b.height<=21)return!0})},_getScrollOffset:function(){return{left:this.scrollContainer.element[0].scrollLeft,top:this.scrollContainer.element[0].scrollTop}},_createOneRegion:function(a){var b=BI.createWidget(a.el);return b.setVisible(!0),{id:b.attr("id"),left:a.left,top:a.top,width:a.width,height:a.height,el:b}},_applyRegion:function(a){this.options;BI.each(a||this.regions,function(a,b){b.el.element.css({left:b.left,top:b.top,width:b.width,height:b.height})}),this._applyContainer(),this.ratio=this.getLayoutRatio()},_renderRegion:function(){BI.createWidget({type:"bi.absolute",element:this.container,items:BI.toArray(this.regions)})},getClientWidth:function(){return this.scrollContainer.element[0].clientWidth},getClientHeight:function(){return this.scrollContainer.element[0].clientHeight},_applyContainer:function(){this.scrollContainer.element.css("overflow","hidden");var a=this._getRegionOccupied();return this.container.element.width(a.left+a.width).height(a.top+a.height),this.scrollContainer.element.css("overflow","auto"),a},_modifyRegion:function(a){BI.each(this.regions,function(b,c){a[b]&&(c.left=a[b].left,c.top=a[b].top,c.width=a[b].width,c.height=a[b].height)})},_addRegion:function(a){var b=this._createOneRegion(a);this.regions[b.id]=b,BI.createWidget({type:"bi.absolute",element:this.container,items:[b]})},_deleteRegionByName:function(a){this.regions[a].el.setVisible(!1),delete this.regions[a]},_setArrangeSize:function(a){this.arrangement.element.css({left:a.left,top:a.top,width:a.width,height:a.height})},_getOneWidthPortion:function(){return this.getClientWidth()/BI.Arrangement.PORTION},_getOneHeightPortion:function(){return this.getClientHeight()/BI.Arrangement.H_PORTION},_getGridPositionAndSize:function(a){var b=this._getOneWidthPortion(),c=this._getOneHeightPortion(),d=Math.round(a.width/b),e=Math.round(a.left/b),f=Math.round(a.top/c),g=Math.round(a.height/c);return 0===d&&(d=1),0===g&&(g=1),{x:e,y:f,w:d,h:g}},_getBlockPositionAndSize:function(a){var b=this._getOneWidthPortion(),c=this._getOneHeightPortion();return{left:a.x*b,top:a.y*c,width:a.w*b,height:a.h*c}},_getLayoutsByRegions:function(a){var b=this,c=[];return BI.each(a||this.regions,function(a,d){c.push(BI.extend(b._getGridPositionAndSize(d),{i:d.id}))}),c},_getLayoutIndexByName:function(a,b){return BI.findIndex(a,function(a,c){return c.i===b})},_setBlockPositionAndSize:function(a){this.block.element.css({left:a.left,top:a.top,width:a.width,height:a.height})},_getRegionsByLayout:function(a){var b=this,c={};return BI.each(a,function(a,d){c[d.i]=BI.extend(b._getBlockPositionAndSize(d),{id:d.i})}),c},_setRegionsByLayout:function(a,b){var c=this;return a||(a=this.regions),BI.each(b,function(b,d){a[d.i]&&BI.extend(a[d.i],c._getBlockPositionAndSize(d))}),a},_moveElement:function(a,b,c,d,e){function f(a,b){return BI.filter(a,function(a,c){return g._collides(c,b)})}var g=this;if(b._static)return a;if(b.y===d&&b.x===c)return a;var h=d&&b.y>d;"number"==typeof c&&(b.x=c),"number"==typeof d&&(b.y=d),b.moved=!0;var i=this._sortLayoutItemsByRowCol(a);h&&(i=i.reverse());for(var j=f(i,b),k=0,l=j.length;km.y&&b.y-m.y>m.h/4||(a=m._static?this._moveElementAwayFromCollision(a,m,b,e):this._moveElementAwayFromCollision(a,b,m,e))}return a},_sortLayoutItemsByRowCol:function(a){return[].concat(a).sort(function(a,b){return a.y>b.y||a.y===b.y&&a.x>b.x?1:-1})},_collides:function(a,b){return a!==b&&(!(a.x+a.w<=b.x)&&(!(a.x>=b.x+b.w)&&(!(a.y+a.h<=b.y)&&!(a.y>=b.y+b.h))))},_getFirstCollision:function(a,b){for(var c=0,d=a.length;c0&&!this._getFirstCollision(a,b);)b.y--;for(var d;d=this._getFirstCollision(a,b);)b.y=d.y+d.h;return b},compact:function(a,b){function c(a){return BI.filter(a,function(a,b){return b._static})}for(var d=c(a),e=this._sortLayoutItemsByRowCol(a),f=[],g=0,h=e.length;g0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,g);var k=g.parent.getChildIndex(g.id);g.parent.removeChildByIndex(k),g.parent.addChild(h,k),h.addChild(g),b[d].push(h),e[f]=h}else b[d].push(g)})}),b},_fill:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,h),g.addChild(h)}b[d].push(g)})}),b},_adjust:function(a){for(;;){var b=!1;if(BI.backEach(a,function(a,c){BI.each(c,function(a,c){if(!c.isNew){var d=!0;if(BI.any(c.getChildren(),function(a,b){if(!b.isNew)return d=!1,!0}),!c.isLeaf()&&d===!0){var e=[];BI.each(c.getChildren(),function(a,b){e=e.concat(b.getChildren())}),c.removeAllChilds(),BI.each(e,function(a,b){c.addChild(b)});var f=new BI.Node(BI.UUID());f.isNew=!0;var g=c.parent.getChildIndex(c.id);c.parent.removeChildByIndex(g),c.parent.addChild(f,g),f.addChild(c),b=!0}}})}),b===!1)break;a=this._stratification()}return a},_calculateWidth:function(){function a(b){var c=0;return b.isLeaf()?b.width:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),c)}function b(a){var c=0;return a.isLeaf()?a.height:(BI.each(a.getChildren(),function(a,d){c+=b(d)}),c)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_isVertical:function(){var a=this.options;return a.direction===BI.Direction.Top||a.direction===BI.Direction.Bottom},_calculateHeight:function(){function a(b){var c=0;return BI.each(b.getChildren(),function(b,d){c=Math.max(c,a(d))}),c+(b.height||0)}function b(a){var c=0;return BI.each(a.getChildren(),function(a,d){c=Math.max(c,b(d))}),c+(a.width||0)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_calculateXY:function(a){var b=(this.options,this._calculateWidth()),c=this._calculateHeight(),d=a.length,e=this._calculateLeaves(),f={},g=c/d;return BI.each(a,function(a,c){var d=[];BI.each(c,function(a,b){d[a]=(b.get("leaves")||1)/e}),BI.each(c,function(c,e){var h=BI.sum(d.slice(0,c)),i=h*b+d[c]*b/2,j=a*g+g/2;f[e.id]={x:i,y:j}})}),f},_stroke:function(a,b){var c=this._calculateHeight(),d=a.length,e=c/d,f=this,g=this.options;switch(g.direction){case BI.Direction.Top:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+h.x+","+(h.y+g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y+g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Bottom:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+h.x+","+(h.y-g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y-g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Left:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+(h.y+g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y+g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Right:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+(h.y-g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y-g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})})}},_createBranches:function(a){var b=this.options;b.direction!==BI.Direction.Bottom&&b.direction!==BI.Direction.Right||(a=a.reverse()); -var c=this._calculateXY(a);this._stroke(a,c)},_isNeedAdjust:function(){var a=this.options;return a.direction===BI.Direction.Top&&a.align===BI.VerticalAlign.Bottom||a.direction===BI.Direction.Bottom&&a.align===BI.VerticalAlign.Top||a.direction===BI.Direction.Left&&a.align===BI.HorizontalAlign.Right||a.direction===BI.Direction.Right&&a.align===BI.HorizontalAlign.Left},setValue:function(a){},getValue:function(){},_transformToTreeFormat:function(a){var b,c;if(!a)return[];if(BI.isArray(a)){var d=[],e=[];for(b=0,c=a.length;b=c.options.min&&d<=c.options.max},f=function(a){return Date.parseDateTime(a,"%Y-%X").print("%Y-%X")==a&&d>=c.options.min&&d<=c.options.max};if(BI.isNotNull(b)&&Date.checkLegal(a))switch(a.length){case this._const.yearLength:e(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:f(a)&&this.editor.setValue(a+"-")}},setValue:function(a){var b,c,d=this,e=new Date;this.store_value=a,BI.isNotNull(a)&&(b=a.type||BI.DateTrigger.MULTI_DATE_CALENDAR,c=a.value,BI.isNull(c)&&(c=a));var f=function(a,b){var c=a.print("%Y-%x-%e");d.editor.setState(c),d.editor.setValue(c),d.setTitle(b+":"+c)};switch(b){case BI.DateTrigger.MULTI_DATE_YEAR_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV];e=new Date(e.getFullYear()-1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER];e=new Date(e.getFullYear()+1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN];e=new Date(e.getFullYear(),0,1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END];e=new Date(e.getFullYear(),11,31),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV];e=(new Date).getBeforeMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER];e=(new Date).getAfterMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN];e=(new Date).getQuarterStartDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END];e=(new Date).getQuarterEndDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV];e=(new Date).getBeforeMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER];e=(new Date).getAfterMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN];e=new Date(e.getFullYear(),e.getMonth(),1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END];e=new Date(e.getFullYear(),e.getMonth(),e.getLastDateOfMonth().getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV];e=e.getOffsetDate(-7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER];e=e.getOffsetDate(7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV];e=e.getOffsetDate(-1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER];e=e.getOffsetDate(1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_TODAY:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY];e=new Date,f(e,g);break;default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue(""),this.setTitle("");else{var h=c.year+"-"+(c.month+1)+"-"+c.day;this.editor.setState(h),this.editor.setValue(h),this.setTitle(h)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.store_value}}),BI.DateTrigger.MULTI_DATE_YEAR_PREV=1,BI.DateTrigger.MULTI_DATE_YEAR_AFTER=2,BI.DateTrigger.MULTI_DATE_YEAR_BEGIN=3,BI.DateTrigger.MULTI_DATE_YEAR_END=4,BI.DateTrigger.MULTI_DATE_MONTH_PREV=5,BI.DateTrigger.MULTI_DATE_MONTH_AFTER=6,BI.DateTrigger.MULTI_DATE_MONTH_BEGIN=7,BI.DateTrigger.MULTI_DATE_MONTH_END=8,BI.DateTrigger.MULTI_DATE_QUARTER_PREV=9,BI.DateTrigger.MULTI_DATE_QUARTER_AFTER=10,BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN=11,BI.DateTrigger.MULTI_DATE_QUARTER_END=12,BI.DateTrigger.MULTI_DATE_WEEK_PREV=13,BI.DateTrigger.MULTI_DATE_WEEK_AFTER=14,BI.DateTrigger.MULTI_DATE_DAY_PREV=15,BI.DateTrigger.MULTI_DATE_DAY_AFTER=16,BI.DateTrigger.MULTI_DATE_DAY_TODAY=17,BI.DateTrigger.MULTI_DATE_PARAM=18,BI.DateTrigger.MULTI_DATE_CALENDAR=19,BI.DateTrigger.MULTI_DATE_SEGMENT_NUM={},BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV]=BI.i18nText("BI-Multi_Date_Year_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER]=BI.i18nText("BI-Multi_Date_Year_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN]=BI.i18nText("BI-Multi_Date_Year_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END]=BI.i18nText("BI-Multi_Date_Year_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV]=BI.i18nText("BI-Multi_Date_Quarter_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER]=BI.i18nText("BI-Multi_Date_Quarter_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN]=BI.i18nText("BI-Multi_Date_Quarter_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END]=BI.i18nText("BI-Multi_Date_Quarter_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV]=BI.i18nText("BI-Multi_Date_Month_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER]=BI.i18nText("BI-Multi_Date_Month_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN]=BI.i18nText("BI-Multi_Date_Month_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END]=BI.i18nText("BI-Multi_Date_Month_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV]=BI.i18nText("BI-Multi_Date_Week_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER]=BI.i18nText("BI-Multi_Date_Week_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV]=BI.i18nText("BI-Multi_Date_Day_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER]=BI.i18nText("BI-Multi_Date_Day_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY]=BI.i18nText("BI-Multi_Date_Today"),BI.DateTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DateTrigger.EVENT_START="EVENT_START",BI.DateTrigger.EVENT_STOP="EVENT_STOP",BI.DateTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.DateTrigger.EVENT_VALID="EVENT_VALID",BI.DateTrigger.EVENT_ERROR="EVENT_ERROR",BI.DateTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DateTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.date_trigger",BI.DateTrigger),BI.DatePaneWidget=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePaneWidget.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-pane-widget",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.DatePaneWidget.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=new Date,this._year=this.today.getFullYear(),this._month=this.today.getMonth(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar=BI.createWidget({direction:"top",element:this,logic:{dynamic:!1},type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this)}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.calendar.empty(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=new Date;return{year:a.getFullYear(),month:a.getMonth()}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){this._setDatePicker(a),this._setCalendar(a)},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.date_pane_widget",BI.DatePaneWidget),BI.DateTimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:290,popupWidth:270,comboAdjustHeight:1,border:1,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-combo bi-border",height:24})},_init:function(){BI.DateTimeCombo.superclass._init.apply(this,arguments);var a=this,b=(this.options,new Date);this.storeValue={year:b.getFullYear(),month:b.getMonth(),day:b.getDate(),hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.popup=BI.createWidget({type:"bi.date_time_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),a.setValue(this.storeValue),this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE,function(){a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CANCEL)}),this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE,function(){a.storeValue=a.popup.getValue(),a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM)}),this.popup.on(BI.DateTimePopup.CALENDAR_EVENT_CHANGE,function(){a.trigger.setValue(a.popup.getValue()),a.fireEvent(BI.DateTimeCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,maxHeight:this.constants.popupHeight,width:this.constants.popupWidth,stopPropagation:!1}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW)});var c=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-trigger-date-button chart-date-normal-font bi-border-right",width:30,height:24});c.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.htape",element:this,items:[{type:"bi.absolute",items:[{el:this.combo,top:0,left:0,right:0,bottom:0},{el:c,top:0,left:0}]}]})},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a)},getValue:function(){return this.storeValue},hidePopupView:function(){this.combo.hideView()}}),BI.DateTimeCombo.EVENT_CANCEL="EVENT_CANCEL",BI.DateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW="BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.date_time_combo",BI.DateTimeCombo),BI.CustomDateTimeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomDateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-date-time-combo"})},_init:function(){BI.CustomDateTimeCombo.superclass._init.apply(this,arguments);var a=this;this.DateTime=BI.createWidget({type:"bi.date_time_combo",element:this}),this.DateTime.on(BI.DateTimeCombo.EVENT_CANCEL,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE),a.fireEvent(BI.CustomDateTimeCombo.EVENT_CANCEL)}),this.DateTime.on(BI.DateTimeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE),a.fireEvent(BI.CustomDateTimeCombo.EVENT_CONFIRM)}),this.DateTime.on(BI.DateTimeCombo.EVENT_CHANGE,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE)})},getValue:function(){return this.DateTime.getValue()},setValue:function(a){this.DateTime.setValue(a)}}),BI.CustomDateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.CustomDateTimeCombo.EVENT_CANCEL="EVENT_CANCEL",BI.CustomDateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.custom_date_time_combo",BI.CustomDateTimeCombo),BI.DateTimePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-popup",width:268,height:290})},_init:function(){BI.DateTimePopup.superclass._init.apply(this,arguments);var a=this;this.options;this.cancelButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top bi-border-right",shadow:!0,text:BI.i18nText("BI-Basic_Cancel")}),this.cancelButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE)}),this.okButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK")}),this.okButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateCombo=BI.createWidget({type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}),this.dateSelect=BI.createWidget({type:"bi.horizontal",cls:"bi-border-top",items:[{type:"bi.label",text:BI.i18nText("BI-Basic_Time"),width:45},{type:"bi.date_time_select",max:23,min:0,width:60,height:30,ref:function(b){a.hour=b,a.hour.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,ref:function(b){a.minute=b,a.minute.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,ref:function(b){a.second=b,a.second.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}}]});var b=new Date;this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds()),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.cancelButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateCombo},{el:this.dateSelect,height:50},{el:this.dateButton,height:30}]})},setValue:function(a){var b,c=a;BI.isNull(c)?(b=new Date,this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds())):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.hour.setValue(c.hour),this.minute.setValue(c.minute),this.second.setValue(c.second))},getValue:function(){return{year:this.dateCombo.getValue().year,month:this.dateCombo.getValue().month,day:this.dateCombo.getValue().day,hour:this.hour.getValue(),minute:this.minute.getValue(),second:this.second.getValue()}}}),BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE="BUTTON_CANCEL_EVENT_CHANGE",BI.DateTimePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.date_time_popup",BI.DateTimePopup),BI.DateTimeSelect=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimeSelect.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-select bi-border",max:23,min:0})},_init:function(){BI.DateTimeSelect.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",value:this._alertInEditorValue(b.min),errorText:BI.i18nText("BI-Please_Input_Natural_Number"),validationChecker:function(a){return BI.isNaturalNumber(a)}}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a._finetuning(0),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",cls:"column-next-page-h-font bottom-button bi-border-left"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this._finetuning(0),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:30}]})},_alertOutEditorValue:function(a){return a>this.options.max&&(a=this.options.min),athis.options.max&&(a=this.options.min),a0&&a[c-1].xb)return!0});return c.y}var c=this,d=(this.options,this.pathChooser.routes),e=this.pathChooser.pathes,f=this.pathChooser.store;this.arrows={},BI.each(d,function(d,g){c.arrows[d]=[],BI.each(g,function(g,h){c.arrows[d][g]=[];var i=e[d][g];BI.each(i,function(a,b){if(a>0&&a0&&(e=c._drawOneArrow(i[a-1],3)):e=c._drawOneArrow(i[a],1)):b.x===i[a-1].x&&(e=b.y>i[a-1].y?f[BI.first(h)].direction===-1?c._drawOneArrow(i[a-1],0):c._drawOneArrow(b,2):f[h[h.length-2]].direction===-1?c._drawOneArrow(i[a-1],2):c._drawOneArrow(b,0)),e&&c.arrows[d][g].push(e)}}),BI.each(h,function(e,j){if(0!==e){var k,l=h[e-1];if(f[l].direction===-1){var m=c.pathChooser.getRegionIndexById(l),n=a(m,-1),o=b(i,n);k=c._drawOneArrow({x:n,y:o},3)}else{var m=c.pathChooser.getRegionIndexById(j),n=a(m),o=b(i,n);k=c._drawOneArrow({x:n,y:o},1)}k&&c.arrows[d][g].push(k)}})})})},_setValue:function(a,b){var c=this,d=this._const.lineColor,e=this._const.selectLineColor,f=this.pathChooser.routes,g=this.pathChooser.start,h=[a];g.contains(a)&&(h=g),BI.each(h,function(a,b){BI.each(c.arrows[b],function(a,b){BI.each(b,function(a,b){b.attr({fill:d,stroke:d}).toFront()})})}),BI.each(this.arrows[a][b],function(a,b){b.attr({fill:e,stroke:e}).toFront()});for(var i=BI.last(f[a][b]);i&&f[i]&&1===f[i].length;)BI.each(c.arrows[i][0],function(a,b){b.attr({fill:e,stroke:e}).toFront()}),i=BI.last(f[i][0])},setValue:function(a){this.pathChooser.setValue(a),this._unselectAllArrows();var b=this.pathChooser.routes,c=BI.keys(b),d=this,e=[],f=[];BI.each(a,function(a,b){BI.contains(c,b)&&f.length>0&&(f.push(b),e.push(f),f=[]),f.push(b)}),f.length>0&&e.push(f),BI.each(e,function(a,c){var e=c[0],f=BI.findIndex(b[e],function(a,b){if(BI.isEqual(c,b))return!0});f>=0&&d._setValue(e,f)})},getValue:function(){return this.pathChooser.getValue()},populate:function(a){this.pathChooser.populate(a),this._drawArrows()}}),BI.DirectionPathChooser.EVENT_CHANGE="DirectionPathChooser.EVENT_CHANGE",BI.shortcut("bi.direction_path_chooser",BI.DirectionPathChooser),BI.DownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-combo",invalid:!1,height:25,items:[],adjustLength:0,direction:"bottom",trigger:"click",el:{}})},_init:function(){BI.DownListCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.down_list_popup",items:b.items,chooseType:b.chooseType}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,adjustLength:b.adjustLength,direction:b.direction,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"pull-down-font",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:!0,maxHeight:1e3}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(){this.downlistcombo.showView()},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},getValue:function(){return this.popupview.getValue()}}),BI.DownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DownListCombo.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.DownListCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.down_list_combo",BI.DownListCombo),BI.DownListGroup=BI.inherit(BI.Widget,{constants:{iconCls:"check-mark-ha-font"},_defaultConfig:function(){return BI.extend(BI.DownListGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-group",items:[{el:{}}]})},_init:function(){BI.DownListGroup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.downlistgroup=BI.createWidget({element:this,type:"bi.button_tree",items:a.items,chooseType:0,layouts:[{type:"bi.vertical",hgap:0,vgap:0}]}),this.downlistgroup.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.DownListGroup.EVENT_CHANGE,arguments)})},getValue:function(){return this.downlistgroup.getValue()},setValue:function(a){this.downlistgroup.setValue(a)}}),BI.DownListGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group",BI.DownListGroup),BI.DownListItem=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.DownListItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-down-list-item bi-list-item-active",cls:"",height:25,logic:{dynamic:!0},selected:!1,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.DownListItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,height:b.height,text:b.text,value:b.value,logic:b.logic,selected:b.selected,disabled:b.disabled,iconHeight:b.iconHeight,iconWidth:b.iconWidth,textHgap:b.textHgap,textVgap:b.textVgap,textLgap:b.textLgap,textRgap:b.textRgap,father:b.father}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.IconTextItem.EVENT_CHANGE,function(){a.fireEvent(BI.DownListItem.EVENT_CHANGE)})},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()}}),BI.DownListItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_item",BI.DownListItem),BI.DownListGroupItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListGroupItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-down-list-group-item",logic:{dynamic:!1},iconCls1:"dot-e-font",iconCls2:"pull-right-e-font"})},_init:function(){BI.DownListGroupItem.superclass._init.apply(this,arguments);var a=this.options,b=this;this.text=BI.createWidget({type:"bi.label",cls:"list-group-item-text",textAlign:"left",text:a.text,value:a.value,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,width:25,forceNotSelected:!0}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,width:25,forceNotSelected:!0});var c=BI.createWidget({type:"bi.layout",width:25});BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.icon2,top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon1,this.text,c)})))),this.element.hover(function(){b.isEnabled()&&b.hover()},function(){b.isEnabled()&&b.dishover()})},hover:function(){BI.DownListGroupItem.superclass.hover.apply(this,arguments),this.icon1.element.addClass("hover"),this.icon2.element.addClass("hover")},dishover:function(){BI.DownListGroupItem.superclass.dishover.apply(this,arguments),this.icon1.element.removeClass("hover"),this.icon2.element.removeClass("hover")},doClick:function(){BI.DownListGroupItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.DownListGroupItem.EVENT_CHANGE,this.getValue())},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},setValue:function(a){var b=this,c=this.options;a=BI.isArray(a)?a:[a],BI.find(a,function(a,d){return BI.contains(c.childValues,d)?(b.icon1.setSelected(!0),!0):void b.icon1.setSelected(!1)})}}),BI.DownListGroupItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group_item",BI.DownListGroupItem),BI.DownListPopup=BI.inherit(BI.Pane,{constants:{nextIcon:"pull-right-e-font",height:25,iconHeight:12,iconWidth:12,hgap:0,vgap:0,border:1},_defaultConfig:function(){var a=BI.DownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-down-list-popup",items:[],chooseType:BI.Selection.Multi})},_init:function(){BI.DownListPopup.superclass._init.apply(this,arguments),this.singleValues=[],this.childValueMap={},this.fatherValueMap={};var a=this,b=this.options,c=this._createChildren(b.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])?(d=a.childValueMap[b],a.fireEvent(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,d,a.fatherValueMap[b])):a.fireEvent(BI.DownListPopup.EVENT_CHANGE,d,c),!a.singleValues.contains(d)){var e=a.getValue(),f=[];BI.each(e,function(a,b){b.value!=d&&f.push(b)}),a.setValue(f)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},_createChildren:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:4,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}},c.el.childValues=[],BI.each(c.children,function(a,d){var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value)})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=BI.createWidget({type:"bi.vertical",items:[{el:{type:"bi.layout",cls:"bi-down-list-spliter bi-border-top cursor-pointer",height:0}}],cls:"bi-down-list-spliter-container cursor-pointer",lgap:10,rgap:10});c.push(g)}}),c},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a0?b.type="bi.file_manager_folder_item":b.type="bi.file_manager_file_item"}),a},setValue:function(a){this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getAllButtons:function(){return this.button_group.getAllButtons()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},populate:function(a){this.button_group.populate(this._formatItems(a))}}),BI.FileManagerButtonGroup.EVENT_CHANGE="FileManagerButtonGroup.EVENT_CHANGE",BI.shortcut("bi.file_manager_button_group",BI.FileManagerButtonGroup),BI.FileManager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager",el:{},items:[]})},_init:function(){BI.FileManager.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree;var c=BI.Tree.transformToTreeFormat(b.items);this.tree.initTree(c),this.selectedValues=[],this.nav=BI.createWidget({type:"bi.file_manager_nav",items:BI.deepClone(c)}),this.nav.on(BI.FileManagerNav.EVENT_CHANGE,function(b,c){if("-1"==b)a.populate({children:a.tree.toJSON()});else{var d=a.tree.search(c.attr("id"));a.populate(BI.extend({id:d.id},d.get("data"),{children:a.tree.toJSON(d)}))}a.setValue(a.selectedValues)}),this.list=BI.createWidget(b.el,{type:"bi.file_manager_list",items:c}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){if(b===BI.Events.CHANGE){var e=a.tree.search(d.attr("id"));a.populate(BI.extend({id:e.id},e.get("data"),{children:a.tree.toJSON(e)}))}else if(b===BI.Events.CLICK){var f=[];if(d instanceof BI.MultiSelectBar){var g=a.list.getValue();c=g.type===BI.Selection.All,f=BI.concat(g.assist,g.value)}else f=d.getAllLeaves();BI.each(f,function(b,d){c===!0?a.selectedValues.pushDistinct(d):a.selectedValues.remove(d)})}a.setValue(a.selectedValues)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.list,left:0,right:0,top:0,bottom:10},{el:this.nav,left:40,right:100,top:0}]})},setValue:function(a){this.selectedValues=a||[],this.list.setValue(this.selectedValues)},getValue:function(){var a=this.list.getValue(),b=a.type===BI.Selection.All?a.assist:a.value;return b.pushDistinctArray(this.selectedValues),b},_populate:function(a){this.list.populate(a)},getSelectedValue:function(){return this.nav.getValue()[0]},getSelectedId:function(){return this.nav.getId()[0]},populate:function(a){var b=BI.deepClone(a);this._populate(a.children),this.nav.populate(b)}}),BI.FileManager.EVENT_CHANGE="FileManager.EVENT_CHANGE",BI.shortcut("bi.file_manager",BI.FileManager),BI.FileManagerFileItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.FileManagerFileItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-file-item bi-list-item bi-border-bottom",height:30})},_init:function(){BI.FileManagerFileItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checked=BI.createWidget({type:"bi.multi_select_bar",text:"",width:36,height:b.height}),this.checked.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.checked,width:36},{el:{type:"bi.icon_button",cls:"create-by-me-file-font"},width:20},{el:{type:"bi.label",textAlign:"left",height:b.height,text:b.text,value:b.value}}]})},getAllLeaves:function(){return[this.options.value]},isSelected:function(){return this.checked.isSelected()},setSelected:function(a){this.checked.setSelected(a)}}),BI.FileManagerFileItem.EVENT_CHANGE="FileManagerFileItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_file_item",BI.FileManagerFileItem),BI.FileManagerFolderItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.FileManagerFolderItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-folder-item bi-list-item bi-border-bottom",height:30})},_init:function(){BI.FileManagerFolderItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checked=BI.createWidget({type:"bi.multi_select_bar",text:"",width:36,height:b.height}),this.checked.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button=BI.createWidget({type:"bi.text_button",textAlign:"left",height:b.height,text:b.text,value:b.value}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CHANGE,b.value,a)}),this.tree=new BI.Tree,this.tree.initTree([{id:b.id,children:b.children}]),this.selectValue=[],BI.createWidget({type:"bi.htape",element:this,items:[{el:this.checked,width:36},{el:{type:"bi.icon_button",cls:"create-by-me-folder-font"},width:20},{el:this.button}]})},setAllSelected:function(a){this.checked.setSelected(a),this.selectValue=[]},setHalfSelected:function(a){this.checked.setHalfSelected(a),a||(this.selectValue=[])},setValue:function(a){var b=(this.options,!1),c=[];this.tree.traverse(function(d){d.isLeaf()&&(BI.contains(a,d.get("data").value)?c.push(d.get("data").value):b=!0)}),this.setAllSelected(c.length>0&&!b),this.setHalfSelected(c.length>0&&b),this.checked.isHalfSelected()&&(this.selectValue=c)},getAllButtons:function(){return[this]},getAllLeaves:function(){var a=(this.options,[]);return this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a},getNotSelectedValue:function(){var a=this,b=(this.options,[]),c=this.checked.isSelected();if(c===!0)return b;var d=this.checked.isHalfSelected();return this.tree.traverse(function(c){if(c.isLeaf()){var e=c.get("data").value;d===!0?BI.contains(a.selectValue,c.get("data").value)||b.push(e):b.push(e)}}),b},getValue:function(){var a=[];return this.checked.isSelected()?(this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a):this.checked.isHalfSelected()?this.selectValue:[]}}),BI.FileManagerFolderItem.EVENT_CHANGE="FileManagerFolderItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_folder_item",BI.FileManagerFolderItem),BI.FileManagerList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-list",el:{},items:[]})},_init:function(){BI.FileManagerList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget({type:"bi.select_list",element:this,items:b.items,toolbar:{type:"bi.multi_select_bar",height:40,text:""},el:{type:"bi.list_pane",el:BI.isWidget(b.el)?b.el:BI.extend({type:"bi.file_manager_button_group"},b.el)}}),this.list.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.list.setValue({value:a})},getValue:function(){return this.list.getValue()},populate:function(a){this.list.populate(a),this.list.setToolBarVisible(!0)}}),BI.FileManagerList.EVENT_CHANGE="FileManagerList.EVENT_CHANGE",BI.shortcut("bi.file_manager_list",BI.FileManagerList),BI.FileManagerNavButton=BI.inherit(BI.Widget,{_const:{normal_color:"#ffffff",select_color:"#eff1f4"},_defaultConfig:function(){return BI.extend(BI.FileManagerNavButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav-button",selected:!1,height:40})},_init:function(){BI.FileManagerNavButton.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.button=BI.createWidget({type:"bi.text_button",cls:"file-manager-nav-button-text bi-card",once:!0,selected:b.selected,text:b.text,title:b.text,value:b.value,height:b.height,lgap:20,rgap:10}),this.button.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var d=BI.createWidget({type:"bi.svg",cls:"file-manager-nav-button-triangle",width:15,height:b.height}),e=d.path("M0,0L15,20L0,40").attr({stroke:c.select_color,fill:b.selected?c.select_color:c.normal_color});this.button.on(BI.TextButton.EVENT_CHANGE,function(){this.isSelected()?e.attr("fill",c.select_color):e.attr("fill",c.normal_color)}),BI.createWidget({type:"bi.default",element:this,items:[this.button]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:d,right:-15,top:0,bottom:0}]})},isSelected:function(){return this.button.isSelected()},setValue:function(a){this.button.setValue(a)},getValue:function(){return this.button.getValue()},populate:function(a){}}),BI.FileManagerNavButton.EVENT_CHANGE="FileManagerNavButton.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav_button",BI.FileManagerNavButton),BI.FileManagerNav=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerNav.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav bi-border-left",height:40,items:[]})},_init:function(){BI.FileManagerNav.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree,this.refreshTreeData(b.items),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME}),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:[{type:"bi.file_manager_nav_button",text:BI.i18nText("BI-Created_By_Me"),selected:!0,id:BI.FileManagerNav.ROOT_CREATE_BY_ME,value:BI.FileManagerNav.ROOT_CREATE_BY_ME}],layouts:[{type:"bi.horizontal"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.FileManagerNav.EVENT_CHANGE,arguments)})},_getAllParents:function(a){var b,c=[];for(b=a?this.tree.search(a):this.tree.getRoot();b.parent;)c.push(b),b=b.parent;return c.push(b),c.reverse()},_formatNodes:function(a){var b=[];return BI.each(a,function(a,c){b.push(BI.extend({type:"bi.file_manager_nav_button",id:c.id},c.get("data")))}),BI.last(b).selected=!0,b},getValue:function(){return this.button_group.getValue()},getId:function(){var a=[];return BI.each(this.button_group.getSelectedButtons(),function(b,c){a.push(c.attr("id"))}),a},refreshTreeData:function(a){this.tree.initTree(BI.Tree.transformToTreeFormat(a)),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME})},populate:function(a){var b=BI.isNull(a)?[this.tree.getRoot()]:this._getAllParents(a.id);this.button_group.populate(this._formatNodes(b))}}),BI.extend(BI.FileManagerNav,{ROOT_CREATE_BY_ME:"-1"}),BI.FileManagerNav.EVENT_CHANGE="FileManagerNav.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav",BI.FileManagerNav),BI.FineTuningNumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FineTuningNumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-fine-tuning-number-editor bi-border",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,errorText:""})},_init:function(){BI.FineTuningNumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=this.getValue(),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(1),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-next-page-h-font bottom-button bi-border-left bi-border-top"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-1),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(b.add(a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setBottomEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.FineTuningNumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.FineTuningNumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.fine_tuning_number_editor",BI.FineTuningNumberEditor),BI.InteractiveArrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.InteractiveArrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-interactive-arrangement",resizable:!0,layoutType:BI.Arrangement.LAYOUT_TYPE.GRID,items:[]})},_init:function(){BI.InteractiveArrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.adaptive_arrangement",element:this,resizable:b.resizable,layoutType:b.layoutType,items:b.items}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_SCROLL,function(){a.fireEvent(BI.InteractiveArrangement.EVENT_SCROLL,arguments)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_RESIZE,function(){a.fireEvent(BI.InteractiveArrangement.EVENT_RESIZE,arguments)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE,function(b,c){var d=a._getRegionClientPosition(b);a.draw({left:d.left,top:d.top},c,b)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE,function(b,c){a.stopDraw(),a.setRegionSize(b,c)}),this.tags=[]},_isEqual:function(a,b){return this.arrangement._isEqual(a,b)},_getScrollOffset:function(){return this.arrangement._getScrollOffset()},_positionAt:function(a,b){var c=this;b=b||this.getAllRegions();var d=[],e=[],f=[],g=[],h=[],i=[];return BI.each(b,function(b,j){var k=c._getRegionClientPosition(j.id);Math.abs(k.left-a.left)<=3&&d.push(j),Math.abs(k.left+k.width/2-a.left)<=3&&e.push(j),Math.abs(k.left+k.width-a.left)<=3&&f.push(j),Math.abs(k.top-a.top)<=3&&g.push(j),Math.abs(k.top+k.height/2-a.top)<=3&&h.push(j),Math.abs(k.top+k.height-a.top)<=3&&i.push(j)}),{left:d, -center:e,right:f,top:g,middle:h,bottom:i}},_getRegionClientPosition:function(a){var b=this.getRegionByName(a),c=this.arrangement._getScrollOffset();return{top:b.top-c.top,left:b.left-c.left,width:b.width,height:b.height,id:b.id}},_vAlign:function(a,b){var c,d=this,e=this._positionAt(a,b),f=[];if(e.left.length>0)c=this._getRegionClientPosition(e.left[0].id).left;else if(e.right.length>0){var g=this._getRegionClientPosition(e.right[0].id);c=g.left+g.width}var h=e.left.concat(e.right);return BI.each(h,function(b,e){var g=d._getRegionClientPosition(e.id);if(d._isEqual(g.left,c)||d._isEqual(g.left+g.width,c)){var h={top:g.top+g.height/2,left:c};f.push({id:e.id,start:h,end:{left:c,top:a.top}})}}),f},_leftAlign:function(a,b,c){return this._vAlign({left:a.left,top:a.top+b.height/2},c)},_rightAlign:function(a,b,c){return this._vAlign({left:a.left+b.width,top:a.top+b.height/2},c)},_hAlign:function(a,b){var c,d=this,e=this._positionAt(a,b),f=[];if(e.top.length>0){var g=this._getRegionClientPosition(e.top[0].id);c=g.top}else if(e.bottom.length>0){var g=this._getRegionClientPosition(e.bottom[0].id);c=g.top+g.height}var h=e.top.concat(e.bottom);return BI.each(h,function(b,e){var g=d._getRegionClientPosition(e.id);if(d._isEqual(g.top,c)||d._isEqual(g.top+g.height,c)){var h={top:c,left:g.left+g.width/2};f.push({id:g.id,start:h,end:{left:a.left,top:c}})}}),f},_topAlign:function(a,b,c){return this._hAlign({left:a.left+b.width/2,top:a.top},c)},_bottomAlign:function(a,b,c){return this._hAlign({left:a.left+b.width/2,top:a.top+b.height},c)},_centerAlign:function(a,b,c){var d,e=this,f=this._positionAt({left:a.left+b.width/2,top:a.top+b.height/2},c),g=[];if(f.center.length>0){var h=this._getRegionClientPosition(f.center[0].id);d=h.left+h.width/2}return BI.each(f.center,function(c,f){var h=e._getRegionClientPosition(f.id);if(e._isEqual(h.left+h.width/2,d)){var i={top:h.top+h.height/2,left:h.left+h.width/2};g.push({id:h.id,start:i,end:{left:d,top:a.top+b.height/2}})}}),g},_middleAlign:function(a,b,c){var d,e=this,f=this._positionAt({left:a.left+b.width/2,top:a.top+b.height/2},c),g=[];if(f.middle.length>0){var h=this._getRegionClientPosition(f.middle[0].id);d=h.top+h.height/2}return BI.each(f.middle,function(c,f){var h=e._getRegionClientPosition(f.id);if(e._isEqual(h.top+h.height/2,d)){var i={top:h.top+h.height/2,left:h.left+h.width/2};g.push({id:h.id,start:i,end:{left:a.left+b.width/2,top:d}})}}),g},_drawOneTag:function(a,b){var c=BI.createWidget({type:"bi.icon_button",width:13,height:13,cls:"drag-tag-font interactive-arrangement-dragtag-icon"}),d=BI.createWidget({type:"bi.icon_button",width:13,height:13,cls:"drag-tag-font interactive-arrangement-dragtag-icon"});if(this._isEqual(a.left,b.left))var e=BI.createWidget({type:"bi.layout",cls:"interactive-arrangement-dragtag-line",width:1,height:Math.abs(a.top-b.top)});else var e=BI.createWidget({type:"bi.layout",cls:"interactive-arrangement-dragtag-line",height:1,width:Math.abs(a.left-b.left)});BI.createWidget({type:"bi.absolute",element:this,items:[{el:c,left:a.left-6,top:a.top-7},{el:d,left:b.left-6,top:b.top-7},{el:e,left:Math.min(a.left,b.left),top:Math.min(a.top,b.top)}]}),this.tags.push(c),this.tags.push(d),this.tags.push(e)},stopDraw:function(){BI.each(this.tags,function(a,b){b.destroy()}),this.tags=[]},_getRegionExcept:function(a,b){var c=[];return BI.each(b||this.getAllRegions(),function(b,d){a&&d.id===a||c.push(d)}),c},getClientWidth:function(){return this.arrangement.getClientWidth()},getClientHeight:function(){return this.arrangement.getClientHeight()},getPosition:function(a,b,c){var d,e=this.getAllRegions();a&&(d=this._getRegionClientPosition(a));var f=this._getRegionExcept(a,e);b=b||{left:d.left,top:d.top},c=c||{width:d.width,height:d.height};var g=this._leftAlign(b,c,f),h=this._rightAlign(b,c,f),i=this._topAlign(b,c,f,f),j=this._bottomAlign(b,c,f),k=this._centerAlign(b,c,f),l=this._middleAlign(b,c,f);return BI.each(k,function(a,d){b.left=d.end.left-c.width/2}),BI.each(h,function(a,d){b.left=d.end.left-c.width}),BI.each(g,function(a,c){b.left=c.end.left}),BI.each(l,function(a,d){b.top=d.end.top-c.height/2}),BI.each(j,function(a,d){b.top=d.end.top-c.height}),BI.each(i,function(a,c){b.top=c.end.top}),b},getSize:function(a,b,c){var d,e=this.getAllRegions();a&&(d=this._getRegionClientPosition(a));var f=this._getRegionExcept(a,e);b=b||{left:d.left,top:d.top},c=c||{width:d.width,height:d.height};var g=this._leftAlign(b,c,f),h=this._rightAlign(b,c,f),i=this._topAlign(b,c,f,f),j=this._bottomAlign(b,c,f),k=this._centerAlign(b,c,f),l=this._middleAlign(b,c,f);return BI.each(k,function(a,d){c.width=2*(d.end.left-b.left)}),BI.each(h,function(a,d){c.width=d.end.left-b.left}),BI.each(g,function(a,b){}),BI.each(l,function(a,d){c.height=2*(d.end.top-b.top)}),BI.each(j,function(a,d){c.height=d.end.top-b.top}),BI.each(i,function(a,b){}),c},draw:function(a,b,c){var d=this;switch(this.stopDraw(),this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:var e=this._getRegionExcept(c),f=this._leftAlign(a,b,e),g=this._rightAlign(a,b,e),h=this._topAlign(a,b,e),i=this._bottomAlign(a,b,e),j=this._centerAlign(a,b,e),k=this._middleAlign(a,b,e);BI.each(j,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(g,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(f,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(k,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(i,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(h,function(a,b){d._drawOneTag(b.start,b.end)});break;case BI.Arrangement.LAYOUT_TYPE.GRID:}},addRegion:function(a,b){return this.stopDraw(),this.arrangement.addRegion(a,b)},deleteRegion:function(a){return this.arrangement.deleteRegion(a)},setRegionSize:function(a,b){return b=this.getSize(a,null,b),this.arrangement.setRegionSize(a,b)},setPosition:function(a,b){if(this.stopDraw(),a.left>0&&a.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:a=this.getPosition(null,a,b),this.draw(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}var c=this.arrangement.setPosition(a,b);return c},setRegionPosition:function(a,b){if(b.left>0&&b.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:b=this.getPosition(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}return this.arrangement.setRegionPosition(a,b)},setDropPosition:function(a,b){var c=this;if(this.stopDraw(),a.left>0&&a.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:a=this.getPosition(null,a,b),this.draw(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}var d=c.arrangement.setDropPosition(a,b);return function(){d(),c.stopDraw()}},scrollInterval:function(){this.arrangement.scrollInterval.apply(this.arrangement,arguments)},scrollEnd:function(){this.arrangement.scrollEnd.apply(this.arrangement,arguments)},scrollTo:function(a){this.arrangement.scrollTo(a)},zoom:function(a){this.arrangement.zoom(a)},resize:function(){return this.arrangement.resize()},relayout:function(){return this.arrangement.relayout()},setLayoutType:function(a){this.arrangement.setLayoutType(a)},getLayoutType:function(){return this.arrangement.getLayoutType()},getLayoutRatio:function(){return this.arrangement.getLayoutRatio()},getHelper:function(){return this.arrangement.getHelper()},getRegionByName:function(a){return this.arrangement.getRegionByName(a)},getAllRegions:function(){return this.arrangement.getAllRegions()},revoke:function(){return this.arrangement.revoke()},populate:function(a){this.arrangement.populate(a)}}),BI.InteractiveArrangement.EVENT_RESIZE="InteractiveArrangement.EVENT_RESIZE",BI.InteractiveArrangement.EVENT_SCROLL="InteractiveArrangement.EVENT_SCROLL",BI.shortcut("bi.interactive_arrangement",BI.InteractiveArrangement),BI.MonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",behaviors:{},height:25})},_init:function(){BI.MonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.month_trigger"}),this.trigger.on(BI.MonthTrigger.EVENT_CONFIRM,function(b){this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getValue()):this.getKey()||a.setValue(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM)}),this.trigger.on(BI.MonthTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.MonthTrigger.EVENT_START,function(){a.combo.hideView()}),this.trigger.on(BI.MonthTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.MonthTrigger.EVENT_CHANGE,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors}),this.popup.on(BI.MonthPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.month_combo",BI.MonthCombo),BI.MonthPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-popup",behaviors:{}})},_init:function(){BI.MonthPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[0,6,1,7,2,8,3,9,4,10,5,11],d=[];d.push(c.slice(0,2)),d.push(c.slice(2,4)),d.push(c.slice(4,6)),d.push(c.slice(6,8)),d.push(c.slice(8,10)),d.push(c.slice(10,12)),d=BI.map(d,function(a,b){return BI.map(b,function(a,b){return{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:23,width:38,value:b,text:b+1}})}),this.month=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(d,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({dynamic:!0},{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1,hgap:2}]}),this.month.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.month.getValue()[0]},setValue:function(a){this.month.setValue([a])}}),BI.MonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_popup",BI.MonthPopup),BI.MonthTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:25,errorText:BI.i18nText("BI-Month_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.MonthTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-month-trigger bi-border",height:25})},_init:function(){BI.MonthTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=12},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.MonthTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.MonthTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.MonthTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.MonthTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.MonthTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),baseCls:"bi-trigger-month-text",width:c.triggerWidth},width:c.triggerWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){return BI.isNotNull(a)?(this.editor.setState(a+1),this.editor.setValue(a+1),void this.editor.setTitle(a+1)):(this.editor.setState(),this.editor.setValue(),void this.editor.setTitle())},getKey:function(){return 0|this.editor.getValue()},getValue:function(){return this.editor.getValue()-1}}),BI.MonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthTrigger.EVENT_START="EVENT_START",BI.MonthTrigger.EVENT_STOP="EVENT_STOP",BI.MonthTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_trigger",BI.MonthTrigger),BI.MultiDateCard=BI.inherit(BI.Widget,{constants:{lgap:80,itemHeight:35,defaultEditorValue:"1"},_defaultConfig:function(){return $.extend(BI.MultiDateCard.superclass._defaultConfig.apply(this,arguments),{})},dateConfig:function(){},defaultSelectedItem:function(){},_init:function(){BI.MultiDateCard.superclass._init.apply(this,arguments);var a=this;this.options;this.label=BI.createWidget({type:"bi.label",height:this.constants.itemHeight,textAlign:"left",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),cls:"bi-multidate-inner-label bi-tips"}),this.radioGroup=BI.createWidget({type:"bi.button_group",chooseType:0,items:BI.createItems(this.dateConfig(),{type:"bi.multidate_segment",height:this.constants.itemHeight}),layouts:[{type:"bi.vertical"}]}),this.radioGroup.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CONFIRM&&a.fireEvent(BI.MultiDateCard.EVENT_CHANGE)}),this.radioGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.setValue(a.getValue()),a.fireEvent(BI.MultiDateCard.EVENT_CHANGE)}),BI.createWidget({element:this,type:"bi.center_adapt",lgap:this.constants.lgap,items:[{type:"bi.vertical",items:[this.label,this.radioGroup]}]})},getValue:function(){var a=this.radioGroup.getSelectedButtons()[0],b=a.getValue(),c=a.getInputValue();return{type:b,value:c}},_isTypeAvaliable:function(a){var b=!1;return BI.find(this.dateConfig(),function(c,d){if(d.value===a)return b=!0,!0}),b},setValue:function(a){var b=this;BI.isNotNull(a)&&this._isTypeAvaliable(a.type)?(this.radioGroup.setValue(a.type),BI.each(this.radioGroup.getAllButtons(),function(c,d){d.isEditorExist()===!0&&d.isSelected()?d.setInputValue(a.value):d.setInputValue(b.constants.defaultEditorValue)})):(this.radioGroup.setValue(this.defaultSelectedItem()),BI.each(this.radioGroup.getAllButtons(),function(a,c){c.setInputValue(b.constants.defaultEditorValue)}))},getCalculationValue:function(){var a=this.getValue(),b=a.type,c=a.value;switch(b){case BICst.DATE_TYPE.MULTI_DATE_DAY_PREV:return(new Date).getOffsetDate(-1*c);case BICst.DATE_TYPE.MULTI_DATE_DAY_AFTER:return(new Date).getOffsetDate(c);case BICst.DATE_TYPE.MULTI_DATE_DAY_TODAY:return new Date;case BICst.DATE_TYPE.MULTI_DATE_MONTH_PREV:return(new Date).getBeforeMultiMonth(c);case BICst.DATE_TYPE.MULTI_DATE_MONTH_AFTER:return(new Date).getAfterMultiMonth(c);case BICst.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:return new Date((new Date).getFullYear(),(new Date).getMonth(),1);case BICst.DATE_TYPE.MULTI_DATE_MONTH_END:return new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getLastDateOfMonth().getDate());case BICst.DATE_TYPE.MULTI_DATE_QUARTER_PREV:return(new Date).getBeforeMulQuarter(c);case BICst.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:return(new Date).getAfterMulQuarter(c);case BICst.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:return(new Date).getQuarterStartDate();case BICst.DATE_TYPE.MULTI_DATE_QUARTER_END:return(new Date).getQuarterEndDate();case BICst.DATE_TYPE.MULTI_DATE_WEEK_PREV:return(new Date).getOffsetDate(-7*c);case BICst.DATE_TYPE.MULTI_DATE_WEEK_AFTER:return(new Date).getOffsetDate(7*c);case BICst.DATE_TYPE.MULTI_DATE_YEAR_PREV:return new Date((new Date).getFullYear()-1*c,(new Date).getMonth(),(new Date).getDate());case BICst.DATE_TYPE.MULTI_DATE_YEAR_AFTER:return new Date((new Date).getFullYear()+1*c,(new Date).getMonth(),(new Date).getDate());case BICst.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:return new Date((new Date).getFullYear(),0,1);case BICst.DATE_TYPE.MULTI_DATE_YEAR_END:return new Date((new Date).getFullYear(),11,31)}}}),BI.MultiDateCard.EVENT_CHANGE="EVENT_CHANGE",BI.MultiDateCombo=BI.inherit(BI.Single,{constants:{popupHeight:259,popupWidth:270,comboAdjustHeight:1,border:1,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){return BI.extend(BI.MultiDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-combo bi-border",height:24})},_init:function(){BI.MultiDateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.storeTriggerValue="";var b=new Date;this.storeValue=null,this.trigger=BI.createWidget({type:"bi.date_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.trigger.on(BI.DateTrigger.EVENT_KEY_DOWN,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DateTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.DateTrigger.EVENT_TRIGGER_CLICK,function(){a.combo.toggle()}),this.trigger.on(BI.DateTrigger.EVENT_FOCUS,function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.MultiDateCombo.EVENT_FOCUS)}),this.trigger.on(BI.DateTrigger.EVENT_ERROR,function(){a.storeValue={year:b.getFullYear(),month:b.getMonth()},a.popup.setValue(),a.fireEvent(BI.MultiDateCombo.EVENT_ERROR)}),this.trigger.on(BI.DateTrigger.EVENT_VALID,function(){a.fireEvent(BI.MultiDateCombo.EVENT_VALID)}),this.trigger.on(BI.DateTrigger.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDateCombo.EVENT_CHANGE)}),this.trigger.on(BI.DateTrigger.EVENT_CONFIRM,function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}}),this.popup=BI.createWidget({type:"bi.multidate_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.popup.on(BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE,function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE,function(){var b=new Date;a.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.CALENDAR_EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,maxHeight:this.constants.popupHeight,width:this.constants.popupWidth,stopPropagation:!1}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW)});var c=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-trigger-date-button chart-date-normal-font",width:30,height:23});c.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),this.changeIcon=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-date-change widget-date-h-change-font",width:30,height:23});var d=BI.createWidget({type:"bi.absolute",items:[{el:this.combo,top:0,left:0,right:0,bottom:0},{el:c,top:0,left:0}]});BI.createWidget({type:"bi.htape",element:this,items:[d,{el:this.changeIcon,width:30}],ref:function(b){a.comboWrapper=b}})},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BICst.DATE_TYPE.MULTI_DATE_YEAR_PREV:case BICst.DATE_TYPE.MULTI_DATE_YEAR_AFTER:case BICst.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:case BICst.DATE_TYPE.MULTI_DATE_YEAR_END:case BICst.DATE_TYPE.MULTI_DATE_QUARTER_PREV:case BICst.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:case BICst.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:case BICst.DATE_TYPE.MULTI_DATE_QUARTER_END:case BICst.DATE_TYPE.MULTI_DATE_MONTH_PREV:case BICst.DATE_TYPE.MULTI_DATE_MONTH_AFTER:case BICst.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:case BICst.DATE_TYPE.MULTI_DATE_MONTH_END:case BICst.DATE_TYPE.MULTI_DATE_WEEK_PREV:case BICst.DATE_TYPE.MULTI_DATE_WEEK_AFTER:case BICst.DATE_TYPE.MULTI_DATE_DAY_PREV:case BICst.DATE_TYPE.MULTI_DATE_DAY_AFTER:case BICst.DATE_TYPE.MULTI_DATE_DAY_TODAY:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[1].width=30,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[1].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.shortcut("bi.multidate_combo",BI.MultiDateCombo),BI.MultiDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MultiDateCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.MultiDateCombo.EVENT_VALID="EVENT_VALID",BI.MultiDateCombo.EVENT_ERROR="EVENT_ERROR",BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW="BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW",BI.extend(BI.MultiDateCombo,{MULTI_DATE_YMD_CARD:1,MULTI_DATE_YEAR_CARD:2,MULTI_DATE_QUARTER_CARD:3,MULTI_DATE_MONTH_CARD:4,MULTI_DATE_WEEK_CARD:5,MULTI_DATE_DAY_CARD:6}),BI.DayCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.DayCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-daycard"})},_init:function(){BI.DayCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{isEditorExist:!0,selected:!0,text:BI.i18nText("BI-Multi_Date_Day_Prev"),value:BICst.DATE_TYPE.MULTI_DATE_DAY_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Day_Next"),value:BICst.DATE_TYPE.MULTI_DATE_DAY_AFTER},{isEditorExist:!1,value:BICst.DATE_TYPE.MULTI_DATE_DAY_TODAY,text:BI.i18nText("BI-Multi_Date_Today")}]},defaultSelectedItem:function(){return BICst.DATE_TYPE.MULTI_DATE_DAY_PREV}}),BI.DayCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.daycard",BI.DayCard),BI.MonthCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.MonthCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-monthcard"})},_init:function(){BI.MonthCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,value:BICst.DATE_TYPE.MULTI_DATE_MONTH_PREV,text:BI.i18nText("BI-Multi_Date_Month_Prev")},{isEditorExist:!0,value:BICst.DATE_TYPE.MULTI_DATE_MONTH_AFTER,text:BI.i18nText("BI-Multi_Date_Month_Next")},{value:BICst.DATE_TYPE.MULTI_DATE_MONTH_BEGIN,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Month_Begin")},{value:BICst.DATE_TYPE.MULTI_DATE_MONTH_END,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Month_End")}]},defaultSelectedItem:function(){return BICst.DATE_TYPE.MULTI_DATE_MONTH_PREV}}),BI.MonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.monthcard",BI.MonthCard),BI.MultiDatePopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,tabWidth:42,titleHeight:27,itemHeight:30,triggerHeight:24,buttonWidth:90,buttonHeight:25,cardHeight:229,cardWidth:270,popupHeight:259,popupWidth:270,comboAdjustHeight:1,ymdWidth:58,lgap:2,border:1},_defaultConfig:function(){return BI.extend(BI.MultiDatePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-popup",width:268,height:260})},_init:function(){BI.MultiDatePopup.superclass._init.apply(this,arguments);var a=this;this.options;this.storeValue="",this.textButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-label bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Multi_Date_Today")}),this.textButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE)}),this.clearButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Clear")}),this.clearButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE)}),this.okButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK")}),this.okButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateTab=BI.createWidget({type:"bi.tab",tab:{cls:"bi-multidate-popup-tab bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.MultiDateCombo.MULTI_DATE_YMD_CARD,width:this.constants.ymdWidth},{text:BI.i18nText("BI-Multi_Date_Year"),value:BI.MultiDateCombo.MULTI_DATE_YEAR_CARD},{text:BI.i18nText("BI-Multi_Date_Quarter"),value:BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD},{text:BI.i18nText("BI-Multi_Date_Month"),value:BI.MultiDateCombo.MULTI_DATE_MONTH_CARD},{text:BI.i18nText("BI-Multi_Date_Week"),value:BI.MultiDateCombo.MULTI_DATE_WEEK_CARD},{text:BI.i18nText("BI-Multi_Date_Day"),value:BI.MultiDateCombo.MULTI_DATE_DAY_CARD}],{width:this.constants.tabWidth,textAlign:"center",height:this.constants.itemHeight,cls:"bi-multidate-popup-item bi-list-item-active"}),layouts:[{type:"bi.left"}]},cardCreator:function(b){switch(b){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:return a.ymd=BI.createWidget({type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max}),a.ymd.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.CALENDAR_EVENT_CHANGE)}),a.ymd;case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:return a.year=BI.createWidget({type:"bi.yearcard"}),a.year.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.year,b)}),a.year;case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:return a.quarter=BI.createWidget({type:"bi.quartercard"}),a.quarter.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.quarter,b)}),a.quarter;case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:return a.month=BI.createWidget({type:"bi.monthcard"}),a.month.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.month,b)}),a.month;case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:return a.week=BI.createWidget({type:"bi.weekcard"}),a.week.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.week,b)}),a.week;case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:return a.day=BI.createWidget({type:"bi.daycard"}),a.day.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.day,b)}),a.day}}}),this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_YMD_CARD,this.dateTab.on(BI.Tab.EVENT_CHANGE,function(){var b=a.dateTab.getSelect();switch(b){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:var c=this.getTab(a.cur).getCalculationValue();a.ymd.setValue({year:c.getFullYear(),month:c.getMonth(),day:c.getDate()}),a._setInnerValue(a.ymd);break;case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:a.year.setValue(a.storeValue),a._setInnerValue(a.year);break;case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:a.quarter.setValue(a.storeValue),a._setInnerValue(a.quarter);break;case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:a.month.setValue(a.storeValue),a._setInnerValue(a.month);break;case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:a.week.setValue(a.storeValue),a._setInnerValue(a.week);break;case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:a.day.setValue(a.storeValue),a._setInnerValue(a.day)}a.cur=b}),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.clearButton,this.textButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateTab},{el:this.dateButton,height:30}]})},_setInnerValue:function(a){if(this.dateTab.getSelect()===BI.MultiDateCombo.MULTI_DATE_YMD_CARD)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var b=a.getCalculationValue();b=b.print("%Y-%x-%e"),this.textButton.setValue(b),this.textButton.setEnable(!1)}},setValue:function(a){this.storeValue=a;var b,c,d,e=this;switch(BI.isNotNull(a)&&(c=a.type||BICst.DATE_TYPE.MULTI_DATE_CALENDAR,d=a.value,BI.isNull(d)&&(d=a)),c){case BICst.DATE_TYPE.MULTI_DATE_YEAR_PREV:case BICst.DATE_TYPE.MULTI_DATE_YEAR_AFTER:case BICst.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:case BICst.DATE_TYPE.MULTI_DATE_YEAR_END:this.dateTab.setSelect(BICst.MULTI_DATE_YEAR_CARD),this.year.setValue({type:c,value:d}),this.cur=BICst.MULTI_DATE_YEAR_CARD,e._setInnerValue(this.year);break;case BICst.DATE_TYPE.MULTI_DATE_QUARTER_PREV:case BICst.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:case BICst.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:case BICst.DATE_TYPE.MULTI_DATE_QUARTER_END:this.dateTab.setSelect(BICst.MULTI_DATE_QUARTER_CARD),this.cur=BICst.MULTI_DATE_QUARTER_CARD,this.quarter.setValue({type:c,value:d}),e._setInnerValue(this.quarter);break;case BICst.DATE_TYPE.MULTI_DATE_MONTH_PREV:case BICst.DATE_TYPE.MULTI_DATE_MONTH_AFTER:case BICst.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:case BICst.DATE_TYPE.MULTI_DATE_MONTH_END:this.dateTab.setSelect(BICst.MULTI_DATE_MONTH_CARD),this.cur=BICst.MULTI_DATE_MONTH_CARD,this.month.setValue({type:c,value:d}),e._setInnerValue(this.month);break;case BICst.DATE_TYPE.MULTI_DATE_WEEK_PREV:case BICst.DATE_TYPE.MULTI_DATE_WEEK_AFTER:this.dateTab.setSelect(BICst.MULTI_DATE_WEEK_CARD),this.cur=BICst.MULTI_DATE_WEEK_CARD,this.week.setValue({type:c,value:d}),e._setInnerValue(this.week);break;case BICst.DATE_TYPE.MULTI_DATE_DAY_PREV:case BICst.DATE_TYPE.MULTI_DATE_DAY_AFTER:case BICst.DATE_TYPE.MULTI_DATE_DAY_TODAY:this.dateTab.setSelect(BICst.MULTI_DATE_DAY_CARD),this.cur=BICst.MULTI_DATE_DAY_CARD,this.day.setValue({type:c,value:d}),e._setInnerValue(this.day);break;default:if(BI.isNull(d)||BI.isEmptyObject(d)){var b=new Date;this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.ymd.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.ymd.setValue(d),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){var a=this.dateTab.getSelect();switch(a){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:return this.ymd.getValue();case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:return this.year.getValue();case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:return this.quarter.getValue();case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:return this.month.getValue();case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:return this.week.getValue();case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:return this.day.getValue()}}}),BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.MultiDatePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.multidate_popup",BI.MultiDatePopup),BI.QuarterCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.QuarterCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-quartercard"})},_init:function(){BI.QuarterCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,value:BICst.DATE_TYPE.MULTI_DATE_QUARTER_PREV,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Quarter_Prev")},{value:BICst.DATE_TYPE.MULTI_DATE_QUARTER_AFTER,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Quarter_Next")},{value:BICst.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Quarter_Begin")},{value:BICst.DATE_TYPE.MULTI_DATE_QUARTER_END, -isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Quarter_End")}]},defaultSelectedItem:function(){return BICst.DATE_TYPE.MULTI_DATE_QUARTER_PREV}}),BI.QuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quartercard",BI.QuarterCard),BI.MultiDateSegment=BI.inherit(BI.Single,{constants:{itemHeight:24,maxGap:15,minGap:10,textWidth:30,defaultEditorValue:"1"},_defaultConfig:function(){return $.extend(BI.MultiDateSegment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-segment",text:"",width:130,height:30,isEditorExist:!0,selected:!1,defaultEditorValue:"1"})},_init:function(){BI.MultiDateSegment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.radio=BI.createWidget({type:"bi.radio",selected:b.selected}),this.radio.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textEditor=BI.createWidget({type:"bi.text_editor",value:this.constants.defaultEditorValue,title:function(){return a.textEditor.getValue()},cls:"bi-multidate-editor",width:this.constants.textWidth,height:this.constants.itemHeight}),this.textEditor.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",cls:"bi-multidate-normal-label",text:b.text,height:this.constants.itemHeight}),this._createSegment()},_createSegment:function(){return this.options.isEditorExist===!0?BI.createWidget({element:this,type:"bi.left",items:[{el:{type:"bi.center_adapt",items:[this.radio],height:this.constants.itemHeight},lgap:0},{el:{type:"bi.center_adapt",items:[this.textEditor],widgetName:"textEditor"},lgap:this.constants.maxGap},{el:this.text,lgap:this.constants.minGap}]}):BI.createWidget({element:this,type:"bi.left",items:[{el:{type:"bi.center_adapt",items:[this.radio],height:this.constants.itemHeight},lgap:0},{el:this.text,lgap:this.constants.maxGap}]})},setSelected:function(a){BI.isNotNull(this.radio)&&(this.radio.setSelected(a),this.textEditor.setEnable(a))},isSelected:function(){return this.radio.isSelected()},getValue:function(){return this.options.value},getInputValue:function(){return 0|this.textEditor.getValue()},setInputValue:function(a){this.textEditor.setValue(a)},isEditorExist:function(){return this.options.isEditorExist}}),BI.MultiDateSegment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multidate_segment",BI.MultiDateSegment),BI.WeekCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.WeekCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-weekcard"})},_init:function(){BI.WeekCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Week_Prev"),value:BICst.DATE_TYPE.MULTI_DATE_WEEK_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Week_Next"),value:BICst.DATE_TYPE.MULTI_DATE_WEEK_AFTER}]},defaultSelectedItem:function(){return BICst.DATE_TYPE.MULTI_DATE_WEEK_PREV}}),BI.WeekCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.weekcard",BI.WeekCard),BI.YearCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.YearCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-yearcard"})},_init:function(){BI.YearCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Year_Prev"),value:BICst.DATE_TYPE.MULTI_DATE_YEAR_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Year_Next"),value:BICst.DATE_TYPE.MULTI_DATE_YEAR_AFTER},{isEditorExist:!1,value:BICst.DATE_TYPE.MULTI_DATE_YEAR_BEGIN,text:BI.i18nText("BI-Multi_Date_Year_Begin")},{isEditorExist:!1,value:BICst.DATE_TYPE.MULTI_DATE_YEAR_END,text:BI.i18nText("BI-Multi_Date_Year_End")}]},defaultSelectedItem:function(){return BICst.DATE_TYPE.MULTI_DATE_YEAR_PREV}}),BI.YearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.yearcard",BI.YearCard),BI.MultiLayerSelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer_select_tree-combo",isDefaultInit:!1,height:30,text:"",items:[]})},_init:function(){BI.MultiLayerSelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.multilayer_select_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSelectTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSelectTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_combo",BI.MultiLayerSelectTreeCombo),BI.MultiLayerSelectLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSelectLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_select_tree_last_plus_group_node";break;default:f.type="bi.multilayer_select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.multilayer_single_tree_last_tree_leaf_item";break;default:f.type="bi.multilayer_single_tree_mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:{type:"bi.select_tree_expander",isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:c.itemsCreator,el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,arguments)})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSelectLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_level_tree",BI.MultiLayerSelectLevelTree),BI.MultiLayerSelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_select_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.MultiLayerSelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_popup",BI.MultiLayerSelectTreePopup),BI.MultiLayerSelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-first-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_first_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},isOnce:function(){return!0},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_first_plus_group_node",BI.MultiLayerSelectTreeFirstPlusGroupNode),BI.MultiLayerSelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-last-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_last_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_last_plus_group_node",BI.MultiLayerSelectTreeLastPlusGroupNode),BI.MultiLayerSelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_mid_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_mid_plus_group_node",BI.MultiLayerSelectTreeMidPlusGroupNode),BI.MultiLayerSingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-combo",isDefaultInit:!1,height:30,text:"",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.multilayer_single_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_combo",BI.MultiLayerSingleTreeCombo),BI.MultiLayerSingleLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-single-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSingleLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_single_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_single_tree_last_plus_group_node";break;default:f.type="bi.multilayer_single_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.multilayer_single_tree_last_tree_leaf_item";break;default:f.type="bi.multilayer_single_tree_mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:{isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:function(a,b){c.itemsCreator(a,function(a){b(BI.Tree.transformToTreeFormat(a),0)})},el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,c)})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSingleLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_level_tree",BI.MultiLayerSingleLevelTree),BI.MultiLayerSingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.MultiLayerSingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_popup",BI.MultiLayerSingleTreePopup),BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-first-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-last-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.last_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_last_plus_group_node",BI.MultiLayerSingleTreeLastPlusGroupNode),BI.MultiLayerSingleTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-mid-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.mid_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_plus_group_node",BI.MultiLayerSingleTreeMidPlusGroupNode),BI.MultiLayerSingleTreeFirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.first_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_first_tree_leaf_item",BI.MultiLayerSingleTreeFirstTreeLeafItem),BI.MultiLayerSingleTreeLastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.last_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_last_tree_leaf_item",BI.MultiLayerSingleTreeLastTreeLeafItem),BI.MultiLayerSingleTreeMidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.mid_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_tree_leaf_item",BI.MultiLayerSingleTreeMidTreeLeafItem),BI.MultiSelectCheckPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-pane bi-background",items:[],itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiSelectCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={},this.display=BI.createWidget({type:"bi.display_selected_list",items:b.items,itemsCreator:function(c,d){return c=BI.extend(c||{},{selectedValues:a.storeValue.value}),a.storeValue.type===BI.Selection.Multi?void d({items:BI.map(a.storeValue.value,function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d}})}):void b.itemsCreator(c,d)}}),this.continueSelect=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-select-check-selected bi-high-light"}),this.continueSelect.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect()}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:{type:"bi.left",cls:"multi-select-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:this.continueSelect,lgap:this.constants.lgap,tgap:this.constants.tgap}]}},{height:"fill",el:this.display}]})},setValue:function(a){this.storeValue=a||{}},empty:function(){this.display.empty()},populate:function(){this.display.populate.apply(this.display,arguments)}}),BI.shortcut("bi.multi_select_check_pane",BI.MultiSelectCheckPane),BI.DisplaySelectedList=BI.inherit(BI.Pane,{constants:{height:25,lgap:10},_defaultConfig:function(){return BI.extend(BI.DisplaySelectedList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-display-list",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.DisplaySelectedList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hasNext=!1,this.button_group=BI.createWidget({type:"bi.list_pane",element:this,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},items:this._createItems(b.items),chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical",lgap:10}]},itemsCreator:function(c,d){b.itemsCreator(c,function(b){a.hasNext=!!b.hasNext,d(a._createItems(b.items))})},hasNext:function(){return a.hasNext}})},_createItems:function(a){return BI.createItems(a,{type:"bi.icon_text_item",cls:"cursor-default check-font display-list-item bi-tips",once:!0,invalid:!0,selected:!0,height:this.constants.height,logic:{dynamic:!0}})},empty:function(){this.button_group.empty()},populate:function(a){0===arguments.length?this.button_group.populate():this.button_group.populate(this._createItems(a))}}),BI.shortcut("bi.display_selected_list",BI.DisplaySelectedList),BI.MultiSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.MultiSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue),a.trigger.getSearcher().setState(a.storeValue), -a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue={},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:b.height,masker:{offset:{left:1,top:1,right:2,bottom:33}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),d.apply(a,arguments)})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue("")})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(b){var d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){a.setValue(),a._defaultState()}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(a.storeValue),BI.nextTick(function(){a.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.trigger.stopEditing(),a.requesting===!0?a.wants2Quit=!0:a.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button bi-border-left"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.trigger.getCounter().hideView(),a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:d,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.pluck(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]}),c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_combo",BI.MultiSelectCombo),BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!a.storeValue.value.contains(a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,height:25,selected:this.isAllSelected()})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:30}]});this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.__isMouseInBounds__(b)&&!a.numberCounter.element.__isMouseInBounds__(b)&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:{dynamic:!1},el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:a.storeValue.value})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:{dynamic:!1},height:25,selected:this.isAllSelected()})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.matched.concat(f.finded)}return BI.map(d,function(b,c){return{text:c.text,title:c.text,value:c.value,selected:a.type===BI.Selection.All}})},setValue:function(a){this.storeValue=BI.deepClone(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])}}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane),BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button bi-high-light",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:15}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){a.numberCounter.setTag(a.numberCounter.getText()),a.numberCounter.setText(a._const.checkSelected)},function(){a.numberCounter.setText(a.numberCounter.getTag())}),this.setVisible(!1)},setValue:function(a){var b=this,c=this.options;return a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),a.type===BI.Selection.All?void c.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(c){var d=c.count-a.value.length;BI.nextTick(function(){b.numberCounter.setText(d),b.setVisible(d>0)})}):void BI.nextTick(function(){b.numberCounter.setText(a.value.length),b.setVisible(a.value.length>0)})},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton),BI.MultiSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{}})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.MultiSelectEditor.EVENT_PAUSE="MultiSelectEditor.EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,b)})},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All?1===BI.size(a.assist)?this.editor.setState(b.valueFormatter(a.assist[0]+"")||a.assist[0]+""):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.All):1===BI.size(a.value)?this.editor.setState(b.valueFormatter(a.value[0]+"")||a.value[0]+""):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.None)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher),BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget(b.el,{type:"bi.multi_select_check_selected_button",itemsCreator:b.itemsCreator}),this.button.on(BI.Events.VIEW,function(){a.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,onClickContinueSelect:function(){a.switcher.hideView()}},b.popup),adapter:b.adapter,masker:b.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var a=this;BI.nextTick(function(){a.populate()})}),this.switcher.element.click(function(a){a.stopPropagation()})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(a){this.switcher.setAdapter(a)},setValue:function(a){this.switcher.setValue(a)},setButtonChecked:function(a){this.button.setValue(a)},getValue:function(){},populate:function(a){this.switcher.populate.apply(this.switcher,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher),BI.MultiSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={};var c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue)};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,el:{height:""}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keyword=a.trigger.getKeyword(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane(),a._setStartValue(""),this.setValue(BI.deepClone(a.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),a._setStartValue(""),a.adapter.setValue(a.storeValue),a.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){if(this.hasMatched()){var b=this.getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a._setStartValue(""),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}else a._showAdapter()}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeyword(),d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.adapter.setValue(a.storeValue),c(),a.adapter.populate(),a._setStartValue("")):(a.adapter.setValue(a.storeValue),c())})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()})}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:30},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},_defaultState:function(){this.trigger.stopEditing()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA},function(a){d._allData=BI.pluck(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA,keyword:c.trigger.getKeyword()},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]})}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectList.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="BI.MultiSelectList.EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList),BI.MultiSelectTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree", -itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:b.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return a.searcher.getKeyword()},itemsCreator:function(c,d){c.keyword=a.searcher.getKeyword(),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),BI.nextTick(function(){a.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){a._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,height:30},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},resize:function(){},setSelectedValue:function(a){this.storeValue.value=a||{},this.adapter.setSelectedValue(a),this.searcherPane.setSelectedValue(a),this.searcher.setValue({value:a||{}})},setValue:function(a){this.adapter.setValue(a)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(a){this.adapter.updateValue(a)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="BI.MultiSelectTree.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:b.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(a){a||(a={}),this.popup.setValue(a)},setSelectedValue:function(a){a||(a={}),this.popup.setSelectedValue(a)},updateValue:function(a){this.popup.updateValue(a),this.popup.refresh()},populate:function(a){this.popup.stroke(a)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="BI.MultiSelectTreePopup.EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="BI.MultiSelectTreePopup.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={};var c=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});c.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect(),BI.nextTick(function(){a.empty()})});var d=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:c,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget({type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(a,c){a.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,b.itemsCreator(a,c)}}),this.display.on(BI.Events.AFTERINIT,function(){a.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){d.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){d.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:d},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(a){this.display.stroke(a)},setValue:function(a){a||(a={}),this.display.setSelectedValue(a.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane),BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:1,left:1,right:2,bottom:33}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,height:25})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:c.height,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:c.itemsCreator},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?{1:1}:{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===j.element.find(a.target).length}}),this.storeValue={value:{}};var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a={type:BI.Selection.Multi,value:this.getSearcher().hasChecked()?{1:1}:{}};this.getSearcher().setState(a),this.getCounter().setButtonChecked(a)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button bi-border-left"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_CONFIRM="MultiTreeCombo.EVENT_CONFIRM",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:100,maxHeight:400,onLoaded:BI.emptyFn})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={},this.tree=BI.createWidget({type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)}}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:this._const.checkSelected,textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)})},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All?this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.All):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.None)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumericalInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:30,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:""},_defaultConfig:function(){var a=BI.NumericalInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-numerical-interval",height:25,validation:"valid"})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumericalInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.min,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"numerical-interval-small-editor bi-border-top bi-border-bottom bi-border-left"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.max,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"numerical-interval-big-editor bi-border-top bi-border-bottom bi-border-right"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"numerical-interval-small-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconClass:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconClass:"less-equal-font"}]}),c.closemin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"numerical-interval-big-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconClass:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconClass:"less-equal-font"}]}),c.closemax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-2*b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-2*b.border},{el:a.bigEditor}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor)},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),a.smallEditor.isValid()&&a.bigEditor.isValid()){if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")}return a.element.removeClass("number-error"),c.validation="invalid",b.typeError},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"center"});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"center"}),c.fireEvent(BI.NumericalInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumericalInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"center"});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"})}b.fireEvent(BI.NumericalInterval.EVENT_CHANGE)})},_setComboValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.IconCombo.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.numberError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.signalError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumericalInterval.EVENT_CHANGE),b.fireEvent(BI.NumericalInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(a){this.smallEditor.setEnable(a)},setCloseMinEnable:function(a){this.smallCombo.setEnable(a)},setMaxEnable:function(a){this.bigEditor.setEnable(a)},setCloseMaxEnable:function(a){this.bigCombo.setEnable(a)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(a){this.smallTip.setText(a),this.bigTip.setText(a)},getNumTip:function(){return this.smallTip.getText()},setValue:function(a){a=a||{};var b,c=this;(BI.isNumeric(a.min)||BI.isEmptyString(a.min))&&c.smallEditor.setValue(a.min),BI.isNotNull(a.min)||c.smallEditor.setValue(""),(BI.isNumeric(a.max)||BI.isEmptyString(a.max))&&c.bigEditor.setValue(a.max),BI.isNotNull(a.max)||c.bigEditor.setValue(""),BI.isNull(a.closemin)||(b=a.closemin===!0?1:0,c.smallCombo.setValue(b)),BI.isNull(a.closemax)||(b=a.closemax===!0?1:0,c.bigCombo.setValue(b))},getValue:function(){var a=this,b={},c=a.smallCombo.getValue(),d=a.bigCombo.getValue();return b.min=a.smallEditor.getValue(),b.max=a.bigEditor.getValue(),0===c[0]?b.closemin=!1:b.closemin=!0,0===d[0]?b.closemax=!1:b.closemax=!0,b}}),BI.NumericalInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumericalInterval.EVENT_VALID="EVENT_VALID",BI.NumericalInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.numerical_interval",BI.NumericalInterval),BI.PageTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PageTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-page-table-cell",text:"",title:""})},_init:function(){BI.PageTableCell.superclass._init.apply(this,arguments);BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"nowrap",height:this.options.height,text:this.options.text,title:this.options.title,value:this.options.value,lgap:5,rgap:5});BI.isNotNull(this.options.styles)&&BI.isObject(this.options.styles)&&this.element.css(this.options.styles)}}),BI.shortcut("bi.page_table_cell",BI.PageTableCell),BI.PageTable=BI.inherit(BI.Widget,{_const:{scrollWidth:18,minScrollWidth:100},_defaultConfig:function(){return BI.extend(BI.PageTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-page-table",el:{type:"bi.sequence_table"},pager:{horizontal:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn},vertical:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn}},itemsCreator:BI.emptyFn,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.PageTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hCurr=1,this.vCurr=1,this.table=BI.createWidget(b.el,{type:"bi.sequence_table",width:b.width,height:b.height&&b.height-30,isNeedResize:!0,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.pager=BI.createWidget(b.pager,{type:"bi.direction_pager",height:30}),this.pager.on(BI.Pager.EVENT_CHANGE,function(){var c=this.getVPage&&this.getVPage();BI.isNull(c)&&(c=this.getCurrentPage());var d=this.getHPage&&this.getHPage();b.itemsCreator({vpage:c,hpage:d},function(b,e,f,g){a.table.setVPage?a.table.setVPage(c):a.table.setValue(c),a.table.setHPage&&a.table.setHPage(d),a.populate.apply(a,arguments)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.table,left:0,top:0},{el:this.pager,left:0,right:0,bottom:0}]})},setHPage:function(a){this.hCurr=a,this.pager.setHPage&&this.pager.setHPage(a),this.table.setHPage&&this.table.setHPage(a)},setVPage:function(a){this.vCurr=a,this.pager.setVPage&&this.pager.setVPage(a),this.table.setVPage&&this.table.setVPage(a)},getHPage:function(){var a=this.pager.getHPage&&this.pager.getHPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.hpage)},getVPage:function(){var a=this.pager.getVPage&&this.pager.getVPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.vpage)},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments);var b=!1;this.pager.alwaysShowPager?b=!0:this.pager.hasHNext&&this.pager.hasHNext()?b=!0:this.pager.hasHPrev&&this.pager.hasHPrev()?b=!0:this.pager.hasVNext&&this.pager.hasVNext()?b=!0:this.pager.hasVPrev&&this.pager.hasVPrev()?b=!0:this.pager.hasNext&&this.pager.hasNext()?b=!0:this.pager.hasPrev&&this.pager.hasPrev()&&(b=!0),this.table.setHeight(a-(b?30:0))},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getVerticalScroll:function(){return this.table.getVerticalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},restore:function(){this.table.restore()},attr:function(){BI.PageTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(){this.pager.populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),this.pager&&this.pager.destroy(),BI.PageTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.page_table",BI.PageTable),BI.PathChooser=BI.inherit(BI.Widget,{_const:{lineColor:"#d4dadd",selectLineColor:"#3f8ce8"},_defaultConfig:function(){return BI.extend(BI.PathChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-path-chooser",items:[]})},_init:function(){BI.PathChooser.superclass._init.apply(this,arguments),this.populate(this.options.items)},_createRegions:function(a){var b=this;this.regions=BI.createWidgets(BI.map(a,function(a,c){return{type:"bi.path_region",title:b.texts[c]||c}})),this.regionMap={},BI.each(a,function(a,c){b.regionMap[c]=a}),this.container=BI.createWidget({type:"bi.horizontal",verticalAlign:"top",scrollx:!1,scrolly:!1,hgap:10,items:this.regions}),BI.createWidget({type:"bi.vertical_adapt",element:this, -scrollable:!0,hgap:10,items:[this.container]})},getRegionIndexById:function(a){var b=this.store[a],c=b.get("region");return this.regionMap[c]},_drawPath:function(a,b,c){var d=this,e=[];e=BI.contains(this.start,a)?this.start:[a],BI.each(e,function(a,b){BI.each(d.radios[b],function(a,b){b.setSelected(!1)}),BI.each(d.lines[b],function(a,b){b.attr("stroke",d._const.lineColor)}),BI.each(d.regionIndexes[b],function(a,b){d.regions[b].reset()})}),BI.each(this.routes[a][c],function(a,e){var f=d.getRegionIndexById(e);d.regions[f].setSelect(b+c,e)});for(var f=BI.last(this.routes[a][c]);f&&this.routes[f]&&1===this.routes[f].length;)BI.each(this.routes[f][0],function(a,b){var c=d.getRegionIndexById(b);d.regions[c].setSelect(0,b)}),this.lines[f][0].attr("stroke",d._const.selectLineColor).toFront(),f=BI.last(this.routes[f][0]);this.lines[a][c].attr("stroke",d._const.selectLineColor).toFront(),this.radios[a]&&this.radios[a][c]&&this.radios[a][c].setSelected(!0)},_drawRadio:function(a,b,c,d,e){var f=this,g=BI.createWidget({type:"bi.radio",cls:"path-chooser-radio",selected:b+c===0,start:a,index:c});g.on(BI.Radio.EVENT_CHANGE,function(){f._drawPath(a,b,c),f.fireEvent(BI.PathChooser.EVENT_CHANGE,a,c)}),this.radios[a]||(this.radios[a]=[]),this.radios[a].push(g),BI.createWidget({type:"bi.absolute",element:this.container,items:[{el:g,left:d-6.5,top:e-6.5}]})},_drawLine:function(a,b){var c=this;this.lines[a]||(this.lines[a]=[]),this.pathes[a]||(this.pathes[a]=[]);var d=this.getRegionIndexById(a),e=this.regions[d].getIndexByValue(a);BI.each(b,function(f,g){c.pathes[a][f]=[];var h=f+e,i="",j=47.5+29*h,k=50+100*d,l=k,m=j,n=j,o=c.getRegionIndexById(BI.last(g)),p=c.regions[o].getIndexByValue(BI.last(g)),q=50+100*o;if(BI.contains(c.start,a)?(l=k-50,i+="M"+(k-50)+","+j,c.pathes[a][f].push({x:k-50,y:j})):0===h?(l=k+50,i+="M"+k+","+j,c.pathes[a][f].push({x:k,y:j})):(l=k+50,i+="M"+k+",47.5L"+(k+50)+",47.5L"+(k+50)+","+j,c.pathes[a][f].push({x:k,y:47.5}),c.pathes[a][f].push({x:k+50,y:47.5}),c.pathes[a][f].push({x:k+50,y:j})),h>0){var r=29*p+47.5;i+="L"+(q-50)+","+n+"L"+(q-50)+","+r+"L"+q+","+r,c.pathes[a][f].push({x:q-50,y:n}),c.pathes[a][f].push({x:q-50,y:r}),c.pathes[a][f].push({x:q,y:r})}else i+="L"+q+","+n,c.pathes[a][f].push({x:q,y:n});var s=c.svg.path(i).attr({stroke:0===h?c._const.selectLineColor:c._const.lineColor,"stroke-dasharray":"-"});c.lines[a].push(s),b.length>1&&c.lines[a][0].toFront(),BI.contains(c.start,a)&&c.lines[c.regions[0].getValueByIndex(0)][0].toFront(),(b.length>1||BI.contains(c.start,a))&&c._drawRadio(a,e,f,l,m)})},_drawLines:function(a){var b=this;this.lines={},this.pathes={},this.radios={},this.regionIndexes={},BI.each(a,function(a,c){b.regionIndexes[a]||(b.regionIndexes[a]=[]),BI.each(c,function(c,d){BI.each(d,function(c,d){var e=b.getRegionIndexById(d);BI.contains(b.regionIndexes[a],e)||b.regionIndexes[a].push(e)})})}),BI.each(a,function(a,c){b._drawLine(a,c)})},_pushNodes:function(a){for(var b=this,c=[],d=0;d0||BI.contains(b.start,e))&&g.addItem(e,b.texts[e])}for(var d=BI.first(c);d0&&(h=c[b-1]);var i=a.store[h.value||""],j=a.store[g.value]||new BI.Node(g.value);j.set(g),a.store[g.value]=j,a.texts[g.value]=g.text,a.texts[g.region]=g.regionText,i=BI.isNull(i)?d.getRoot():i,i.getChildIndex(g.value)===-1&&d.addNode(i,j)})}),d.traverse(function(a){BI.each(a.getChildren(),function(b,d){if(BI.contains(c,d.get("region"))){var e=BI.indexOf(c,a.get("region")),f=BI.indexOf(c,d.get("region"));if(e>f){for(var g=c[f],h=f;h0&&(e.push(c),d.push(e),e=[]),e.push(c)}),e.length>0&&d.push(e),BI.each(d,function(a,b){var d=b[0],e=BI.findIndex(c.routes[d],function(a,c){if(BI.isEqual(b,c))return!0});if(e>=0){var f=c.getRegionIndexById(d),g=c.regions[f].getIndexByValue(d);c._drawPath(d,g,e)}})},getValue:function(){var a=[];return BI.each(this.regions,function(b,c){var d=c.getValue();BI.isKey(d)&&a.push(d)}),a}}),BI.PathChooser.EVENT_CHANGE="PathChooser.EVENT_CHANGE",BI.shortcut("bi.path_chooser",BI.PathChooser),BI.PathRegion=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PathRegion.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-path-region bi-background",width:80,title:""})},_init:function(){BI.PathRegion.superclass._init.apply(this,arguments);var a=this.options;this.zIndex=100;var b=BI.createWidget({type:"bi.label",text:a.title,title:a.title,height:30});b.element.css("zIndex",this.zIndex--),this.items=[],this.vertical=BI.createWidget({type:"bi.vertical",element:this,bgap:5,hgap:10,items:[b]})},hasItem:function(a){return BI.any(this.items,function(b,c){return a===c.getValue()})},addItem:function(a,b){if(BI.isKey(a))var c=BI.createWidget({type:"bi.label",cls:"path-region-label bi-card bi-border bi-list-item-select",text:b,value:a,title:b||a,height:22});else var c=BI.createWidget({type:"bi.layout",height:24});c.element.css("zIndex",this.zIndex--),this.items.push(c),this.vertical.addItem(c),1===this.items.length&&this.setSelect(0,a)},reset:function(){BI.each(this.items,function(a,b){b.element.removeClass("active")})},setSelect:function(a,b){if(this.reset(),!(this.items.length<=0))return 1===this.items.length?void this.items[0].element.addClass("active"):void(this.items[a].attr("value")===b&&this.items[a].element.addClass("active"))},setValue:function(a){this.setSelect(this.getIndexByValue(a),a)},getValueByIndex:function(a){return this.items[a].attr("value")},getIndexByValue:function(a){return BI.findIndex(this.items,function(b,c){return c.attr("value")===a})},getValue:function(){var a;return BI.any(this.items,function(b,c){if(c.element.hasClass("active"))return a=c.getValue(),!0}),a}}),BI.PathRegion.EVENT_CHANGE="PathRegion.EVENT_CHANGE",BI.shortcut("bi.path_region",BI.PathRegion),BI.PreviewTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-cell",text:""})},_init:function(){BI.PreviewTableCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_cell",BI.PreviewTableCell),BI.PreviewTableHeaderCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-header-cell",text:""})},_init:function(){BI.PreviewTableHeaderCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_header_cell",BI.PreviewTableHeaderCell),BI.PreviewTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table",isNeedFreeze:!1,freezeCols:[],rowSize:null,columnSize:[],headerRowSize:30,header:[],items:[]})},_init:function(){BI.PreviewTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedResize:!1,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,rowSize:b.rowSize,columnSize:b.columnSize,headerRowSize:b.headerRowSize,header:BI.map(b.header,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_header_cell"},b)})}),items:BI.map(b.items,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_cell"},b)})})}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._adjustColumns(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._adjustColumns()})},_hasAdaptCol:function(a){return BI.any(a,function(a,b){return""===b})},_isPercentage:function(a){return a[0]<=1},_adjustColumns:function(){var a=this.options;if(a.isNeedFreeze===!0){if(this._isPercentage(a.columnSize)){if(this._hasAdaptCol(a.columnSize)){var b=[],c=0;BI.each(a.columnSize,function(a,d){""===d?b.push(a):c+=d}),c=1-c;var d=c/b.length;BI.each(b,function(b,c){a.columnSize[c]=d})}var e=0!==BI.first(a.freezeCols),f=[],g=[];BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)?f.push(c):g.push(c)});var h=BI.sum(f),i=BI.sum(g);BI.each(f,function(a,b){f[a]=b/h}),BI.each(g,function(a,b){g[a]=b/i}),this.table.setRegionColumnSize(e?["fill",h]:[h,"fill"]),this.table.setColumnSize(e?g.concat(f):f.concat(g))}}else(this._hasAdaptCol(a.columnSize)||this._isPercentage(a.columnSize))&&this.table.setRegionColumnSize(["100%"])},setColumnSize:function(a){return this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){return this.table.setHeaderColumnSize(a)},setRegionColumnSize:function(a){return this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){return this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){return this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){return this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},populate:function(a,b){this.table.populate(a,b)}}),BI.PreviewTable.EVENT_CHANGE="PreviewTable.EVENT_CHANGE",BI.shortcut("bi.preview_table",BI.PreviewTable),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger"}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_CHANGE,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:Date._QN[1],value:1},{text:Date._QN[2],value:2},{text:Date._QN[3],value:3},{text:Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}]}),this.quarter.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:30,textWidth:40,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:25})},_init:function(){BI.QuarterTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=4},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.QuarterTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.RelationViewItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.RelationViewItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-item bi-list-item-active",height:25,hoverIn:BI.emptyFn,hoverOut:BI.emptyFn})},_init:function(){BI.RelationViewItem.superclass._init.apply(this,arguments);var a=this.options;this.element.hover(a.hoverIn,a.hoverOut);var b=[];a.isPrimary&&b.push({type:"bi.icon",width:16,height:16,title:BI.i18nText("BI-Primary_Key")}),b.push({type:"bi.label",text:a.text,value:a.value,height:a.height,textAlign:"left",width:a.isPrimary?70:90}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:b,cls:"primary-key-font",lgap:5})},enableHover:function(a){BI.RelationViewRegion.superclass.enableHover.apply(this,[{container:"body"}])},setSelected:function(a){this.element[a?"addClass":"removeClass"]("active")}}),BI.shortcut("bi.relation_view_item",BI.RelationViewItem),BI.RelationView=BI.inherit(BI.Widget,{_const:{lineColor:"#c4c6c6",selectLineColor:"#009de3"},_defaultConfig:function(){return BI.extend(BI.RelationView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view",items:[]})},_init:function(){BI.RelationView.superclass._init.apply(this,arguments),this.populate(this.options.items)},_calculateWidths:function(){var a=[];return BI.each(this.views,function(b,c){BI.each(c,function(b,c){a[b]||(a[b]=BI.MIN),a[b]=Math.max(a[b],c.getWidth())})}),a},_calculateHeights:function(){var a=BI.makeArray(BI.size(this.views),BI.MIN);return BI.each(this.views,function(b,c){BI.each(c,function(c,d){a[b]=Math.max(a[b],d.getHeight())})}),a},_hoverIn:function(a){var b=this,c=this._const;BI.each(this.relations,function(d,e){BI.each(e,function(e,f){f[0].primary.value!==a&&f[0].foreign.value!==a||(b.lines[d][e].attr("stroke",c.selectLineColor).toFront(),b.storeViews[d].setValue(f[0].primary.value),b.storeViews[e].setValue(f[0].foreign.value))})})},_hoverOut:function(a){var b=this,c=this._const;BI.each(this.relations,function(d,e){BI.each(e,function(e,f){f[0].primary.value!==a&&f[0].foreign.value!==a||(b.lines[d][e].attr("stroke",c.lineColor),b.storeViews[d].setValue([]),b.storeViews[e].setValue([]))})})},previewRelationTables:function(a,b){return b?(BI.each(this.storeViews,function(b,c){a.contains(b)?c.setPreviewSelected(!0):c.toggleRegion(!1)}),void BI.each(this.lines,function(b,c){BI.each(c,function(c,d){a.contains(b)&&a.contains(c)||d.hide()})})):(BI.each(this.storeViews,function(a,b){b.toggleRegion(!0),b.setPreviewSelected(!1)}),void BI.each(this.lines,function(a,b){BI.each(b,function(a,b){b.show()})}))},populate:function(a){var b=this,c=this.options,d=this._const;c.items=a||[],this.empty(),this.svg=BI.createWidget({type:"bi.svg"});var e=this.regions={},f=this.relations={};BI.each(a,function(a,b){var c=b.primary.region,d=b.foreign&&b.foreign.region;c&&!f[c]&&(f[c]={}),c&&d&&!f[c][d]&&(f[c][d]=[]),c&&!e[c]&&(e[c]=[]),d&&!e[d]&&(e[d]=[]),c&&!BI.deepContains(e[c],b.primary)&&e[c].push(b.primary),d&&!BI.deepContains(e[d],b.foreign)&&e[d].push(b.foreign),c&&d&&f[c][d].push(b)});for(var g=[],h=BI.clone(e),i={};!BI.isEmpty(h);){var j=BI.clone(h);BI.each(c.items,function(a,b){i[b.primary.region]||delete j[b.foreign&&b.foreign.region]}),g.push(BI.keys(j)),BI.extend(i,j),BI.each(j,function(a,b){delete h[a]})}var k=this.views={},l=this.storeViews={},m=this.indexes={},n=[];BI.each(g,function(a,c){k[a]||(k[a]={});var d=[];BI.each(c,function(c,f){var g=e[f];k[a][c]=l[f]=BI.createWidget({type:"bi.relation_view_region_container",value:f,header:g[0].regionTitle,text:g.length>0?g[0].regionText:"",handler:g.length>0?g[0].regionHandler:BI.emptyFn,items:g,belongPackage:!(g.length>0)||g[0].belongPackage}),BI.isNotNull(g[0])&&BI.isNotNull(g[0].keyword)&&k[a][c].doRedMark(g[0].keyword),k[a][c].on(BI.RelationViewRegionContainer.EVENT_HOVER_IN,function(a){b._hoverIn(a)}),k[a][c].on(BI.RelationViewRegionContainer.EVENT_HOVER_OUT,function(a){b._hoverOut(a)}),k[a][c].on(BI.RelationViewRegionContainer.EVENT_PREVIEW,function(a){b.fireEvent(BI.RelationView.EVENT_PREVIEW,f,a)}),m[f]={i:a,j:c},d.push(k[a][c])}),n.push({type:"bi.horizontal",items:d})});var o=this._calculateHeights(),p=this._calculateWidths(),q=[0],r=[0];BI.each(o,function(a,b){0!==a&&(r[a]=r[a-1]+o[a-1])}),BI.each(p,function(a,b){0!==a&&(q[a]=q[a-1]+p[a-1])});var s=this.lines={};BI.each(f,function(a,c){BI.each(c,function(c,e){var f=m[a],g=m[c],h=0,i=1,j=2,n=3,t=j,u=h,v=function(a,b,c,d){var e,f=q[b]+(p[b]-k[a][b].getWidth())/2,g=r[a]+(o[a]-k[a][b].getHeight())/2,l="";switch(c){case h:e=d?k[a][b].getTopRightPosition():k[a][b].getTopLeftPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+f+","+(g-10),g-=10;break;case i:e=k[a][b].getRightPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+(f+10)+","+g,f+=10;break;case j:e=k[a][b].getBottomPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+f+","+(g+10),g+=10;break;case n:e=k[a][b].getLeftPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+(f-10)+","+g,f-=10}return{x:f,y:g,path:l}},w="",x=v(f.i,f.j,t),y=v(g.i,g.j,u,!0);w+=x.path+y.path,s[a]||(s[a]={}),w+="M"+x.x+","+x.y+"L"+y.x+","+y.y;var z=s[a][c]=b.svg.path(w).attr({stroke:d.lineColor,"stroke-width":"2"}).hover(function(){z.attr("stroke",d.selectLineColor).toFront(),l[a].setValue(e[0].primary.value),l[c].setValue(e[0].foreign.value)},function(){z.attr("stroke",d.lineColor),l[a].setValue([]),l[c].setValue([])})})});var t=BI.createWidget();BI.createWidget({type:"bi.vertical",element:t,items:n}),BI.createWidget({type:"bi.absolute",element:t,items:[{el:this.svg,left:0,right:0,top:0,bottom:0}]}),BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[t]})}}),BI.RelationView.EVENT_CHANGE="RelationView.EVENT_CHANGE",BI.RelationView.EVENT_PREVIEW="EVENT_PREVIEW",BI.shortcut("bi.relation_view",BI.RelationView),BI.RelationViewRegionContainer=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.RelationViewRegionContainer.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-region-container",width:150})},_init:function(){BI.RelationViewRegionContainer.superclass._init.apply(this,arguments);var a=this,b=this.options;this.region=BI.createWidget({type:"bi.relation_view_region",value:b.value,header:b.header,text:b.text,handler:b.handler,items:b.items,belongPackage:b.belongPackage}),this.region.on(BI.RelationViewRegion.EVENT_PREVIEW,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_PREVIEW,b)}),this.region.on(BI.RelationViewRegion.EVENT_HOVER_IN,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_HOVER_IN,b)}),this.region.on(BI.RelationViewRegion.EVENT_HOVER_OUT,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_HOVER_OUT,b)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.region],width:this.region.getWidth(),height:this.region.getHeight()})},doRedMark:function(){this.region.doRedMark.apply(this.region,arguments)},unRedMark:function(){this.region.unRedMark.apply(this.region,arguments)},getWidth:function(){return this.region.getWidth()},getHeight:function(){return this.region.getHeight()},getTopLeftPosition:function(){return this.region.getTopLeftPosition()},getTopRightPosition:function(){return this.region.getTopRightPosition()},getBottomPosition:function(){return this.region.getBottomPosition()},getLeftPosition:function(){return this.region.getLeftPosition()},getRightPosition:function(){return this.region.getRightPosition()},setValue:function(a){this.region.setValue(a)},toggleRegion:function(a){a===!0?this.region.element.fadeIn():this.region.element.fadeOut()},setPreviewSelected:function(a){this.region.setPreviewSelected(a)}}),BI.RelationViewRegionContainer.EVENT_HOVER_IN="RelationViewRegion.EVENT_HOVER_IN",BI.RelationViewRegionContainer.EVENT_HOVER_OUT="RelationViewRegion.EVENT_HOVER_OUT",BI.RelationViewRegionContainer.EVENT_PREVIEW="RelationViewRegion.EVENT_PREVIEW",BI.shortcut("bi.relation_view_region_container",BI.RelationViewRegionContainer),BI.RelationViewRegion=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.RelationViewRegion.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-region cursor-pointer",width:150,text:"",value:"",header:"",items:[],belongPackage:!0})},_init:function(){BI.RelationViewRegion.superclass._init.apply(this,arguments);var a=this,b=this.options;this.preview=BI.createWidget({type:"bi.icon_button",cls:"relation-table-preview-font",width:25,height:25,stopPropagation:!0}),this.preview.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.RelationViewRegion.EVENT_PREVIEW,this.isSelected())}),this.title=BI.createWidget({type:"bi.label",height:25,width:70,text:b.text,value:b.value,textAlign:"left"}),BI.isKey(b.header)&&this.title.setTitle(b.header,{container:"body"}),this.button_group=BI.createWidget({type:"bi.button_group",items:this._createItems(b.items),layouts:[{type:"bi.vertical"}]}),BI.createWidget({type:"bi.vertical",element:this,items:[{type:"bi.vertical",cls:"relation-view-region-container bi-card bi-border "+(b.belongPackage?"":"other-package"),items:[{type:"bi.vertical_adapt",cls:"relation-view-region-title bi-border-bottom",items:[this.preview,this.title]},this.button_group]}],hgap:25,vgap:20})},_createItems:function(a){var b=this;return BI.map(a,function(a,c){return BI.extend(c,{type:"bi.relation_view_item",hoverIn:function(){b.setValue(c.value),b.fireEvent(BI.RelationViewRegion.EVENT_HOVER_IN,c.value)},hoverOut:function(){b.setValue([]),b.fireEvent(BI.RelationViewRegion.EVENT_HOVER_OUT,c.value)}})})},doRedMark:function(){this.title.doRedMark.apply(this.title,arguments)},unRedMark:function(){this.title.unRedMark.apply(this.title,arguments)},getWidth:function(){return this.options.width},getHeight:function(){return 25*this.button_group.getAllButtons().length+25+40+3},getTopLeftPosition:function(){return{x:35,y:20}},getTopRightPosition:function(){return{x:this.getWidth()-25-10,y:20}},getBottomPosition:function(){return{x:35,y:this.getHeight()-20}},getLeftPosition:function(){return{x:25,y:30}},getRightPosition:function(){return{x:this.getWidth()-25,y:30}},setValue:function(a){this.button_group.setValue(a)},setPreviewSelected:function(a){this.preview.setSelected(a)}}),BI.RelationViewRegion.EVENT_HOVER_IN="RelationViewRegion.EVENT_HOVER_IN",BI.RelationViewRegion.EVENT_HOVER_OUT="RelationViewRegion.EVENT_HOVER_OUT",BI.RelationViewRegion.EVENT_PREVIEW="RelationViewRegion.EVENT_PREVIEW",BI.shortcut("bi.relation_view_region",BI.RelationViewRegion),BI.ResponisveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.ResponisveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-responsive-table",isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:!1,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.ResponisveTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,headerRowSize:b.headerRowSize,footerRowSize:b.footerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:b.header,footer:b.footer,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._initRegionSize(),a.table.resize(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_REGION_RESIZE,function(){b.isNeedResize===!0&&a._isAdaptiveColumn()&&a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,function(){a._resizeBody(),a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_COLUMN_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_initRegionSize:function(){var a=this.options;if(a.isNeedFreeze===!0){var b=this.table.getRegionColumnSize(),c=this.table.element.width();if(!b[0]||"fill"===b[0]||b[0]>c||b[1]>c){var d=a.freezeCols;if(0===d.length)this.table.setRegionColumnSize([0,"fill"]);else if(d.length>0&&d.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}else this.table.setRegionColumnSize(["fill",0])}}},_getBlockSize:function(){var a=this.options,b=this.table.getCalculateColumnSize();if(a.isNeedFreeze===!0){var c=[],d=[];BI.each(b,function(b,e){a.freezeCols.contains(b)?c.push(e):d.push(e)});var e=BI.sum(c)+c.length,f=BI.sum(d)+d.length;return{sumLeft:e,sumRight:f,left:c,right:d}}return{size:b,sum:BI.sum(b)+b.length}},_isAdaptiveColumn:function(a){return!(BI.last(a||this.table.getColumnSize())>1.05)},_resizeHeader:function(){var a=this,b=this.options;if(b.isNeedFreeze===!0)if(this._isAdaptiveColumn()){var c=this.table.getCalculateColumnSize();this.table.setHeaderColumnSize(c)}else{var d=this.table.getClientRegionColumnSize(),e=this._getBlockSize(),f=e.sumLeft,g=e.sumRight,h=e.left,i=e.right;h[h.length-1]+=d[0]-f,i[i.length-1]+=d[1]-g;var j=BI.clone(h),k=BI.clone(i);j[j.length-1]="",k[k.length-1]="",this.table.setColumnSize(j.concat(k)),e=a._getBlockSize(),h[h.length-1]0&&a.freezeCols.length=d+e)&&this.table.setRegionColumnSize([d,"fill"]),this._resizeRegion()}},_resizeRegion:function(){var a=this.options,b=this.table.getCalculateRegionColumnSize();if(a.isNeedFreeze===!0&&a.freezeCols.length>0&&a.freezeCols.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}}},resize:function(){this.table.resize(),this._resizeRegion(),this._resizeHeader()},setColumnSize:function(a){this.table.setColumnSize(a),this._adjustRegion(),this._resizeHeader()},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){this.table.setHeaderColumnSize(a),this._adjustRegion(),this._resizeHeader()},setRegionColumnSize:function(a){this.table.setRegionColumnSize(a),this._resizeHeader()},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},attr:function(){BI.ResponisveTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(a){var b=this,c=this.options;this.table.populate.apply(this.table,arguments),c.isNeedFreeze===!0&&BI.nextTick(function(){b._initRegionSize(),b.table.resize(),b._resizeHeader()})}}),BI.shortcut("bi.responsive_table",BI.ResponisveTable),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:30,text:"",items:[]})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.select_tree_popup",items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({stopPropagation:!0},b.el)),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),items:[]})},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(e.id=e.id||BI.UUID(),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.select_tree_last_plus_group_node";break;default:f.type="bi.select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items)),chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_tree_popup",BI.SelectTreePopup),BI.SequenceTableDynamicNumber=BI.inherit(BI.SequenceTableTreeNumber,{_defaultConfig:function(){return BI.extend(BI.SequenceTableDynamicNumber.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-sequence-table-dynamic-number"})},_init:function(){BI.SequenceTableDynamicNumber.superclass._init.apply(this,arguments)},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),a.children.length>1&&BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d}}),BI.shortcut("bi.sequence_table_dynamic_number",BI.SequenceTableDynamicNumber),BI.SequenceTableListNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableListNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-list-number",isNeedFreeze:!1,scrollTop:0,startSequence:1,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[],pageSize:20})},_init:function(){BI.SequenceTableListNumber.superclass._init.apply(this,arguments);var a=this.options;this.start=a.startSequence,this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:a.headerRowSize*a.header.length-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this._populate()},_layout:function(){var a=this.options,b=a.headerRowSize*a.header.length-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize(),this.container.setHeight(a.items.length*a.rowSize);try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){for(var a=this,b=this.options,c=BI.clamp(b.scrollTop,0,b.rowSize*b.items.length-(b.height-b.header.length*b.headerRowSize)+BI.DOM.getScrollWidth()),d=Math.floor(c/b.rowSize),e=d+Math.floor((b.height-b.header.length*b.headerRowSize)/b.rowSize),f=[],g=[],h=d,i=0;h<=e&&h-1)b.rowSize!==this.renderedCells[j]._height&&(this.renderedCells[j]._height=b.rowSize,this.renderedCells[j].el.setHeight(b.rowSize)),this.renderedCells[j].top!==k&&(this.renderedCells[j].top=k,this.renderedCells[j].el.element.css("top",k+"px")),f.push(this.renderedCells[j]);else{var l=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,height:b.rowSize,text:this.start+h,styleGetter:function(c){return function(){return b.sequenceCellStyleGetter(a.start+h-1)}}(i)}));f.push({el:l,left:0,top:k,_height:b.rowSize})}g.push(this.start+h)}var m={},n={},o=[];BI.each(g,function(b,c){BI.deepContains(a.renderedKeys,c)?m[b]=c:n[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(m,b)||BI.deepContains(n,b)||o.push(a)}),BI.each(o,function(b,c){a.renderedCells[c].el.destroy()});var p=[];BI.each(n,function(a){p.push(f[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:p}),this.renderedCells=f,this.renderedKeys=g},_populate:function(){this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a=a<1?1:a;var b=this.options;this.start=(a-1)*b.pageSize+1},_restore:function(){this.options;BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},restore:function(){this._restore()},populate:function(a,b){var c=this.options;a&&a!==this.options.items&&(c.items=a,this._restore()),b&&b!==this.options.header&&(c.header=b),this._populate()}}),BI.shortcut("bi.sequence_table_list_number",BI.SequenceTableListNumber),BI.SequenceTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table",el:{type:"bi.adaptive_table"},sequence:{},isNeedResize:!0,isResizeAdapt:!1,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[],showSequence:!1,startSequence:1})},_init:function(){BI.SequenceTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.sequence=BI.createWidget(b.sequence,{type:"bi.sequence_table_list_number",invisible:b.showSequence===!1,startSequence:b.startSequence,isNeedFreeze:b.isNeedFreeze,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems,headerRowSize:b.headerRowSize,rowSize:b.rowSize,width:60,height:b.height&&b.height-BI.GridTableScrollbar.SIZE,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter}),this.table=BI.createWidget(b.el,{type:"bi.adaptive_table",width:b.showSequence===!0?b.width-60:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(b){a.sequence.getVerticalScroll()!==this.getVerticalScroll()&&(a.sequence.setVerticalScroll(this.getVerticalScroll()),a.sequence.populate()),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.htape=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.sequence,left:0,top:0},{el:this.table,top:0,left:b.showSequence===!0?60:0}]}),this._populate()},_populate:function(){var a=this.options;a.showSequence===!0?(this.sequence.setVisible(!0),this.table.element.css("left","60px"),this.table.setWidth(a.width-60)):(this.sequence.setVisible(!1),this.table.element.css("left","0px"),this.table.setWidth(a.width))},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(this.options.showSequence?a-60:a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a),this.sequence.setHeight(a-BI.GridTableScrollbar.SIZE)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},hasLeftHorizontalScroll:function(){return this.table.hasLeftHorizontalScroll()},hasRightHorizontalScroll:function(){return this.table.hasRightHorizontalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a),this.sequence.setVerticalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},setVPage:function(a){this.sequence.setVPage&&this.sequence.setVPage(a)},setHPage:function(a){this.sequence.setHPage&&this.sequence.setHPage(a)},attr:function(){BI.SequenceTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments),this.sequence.attr.apply(this.sequence,arguments)},restore:function(){this.table.restore(),this.sequence.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d),this._populate(),this.table.populate.apply(this.table,arguments),this.sequence.populate.apply(this.sequence,arguments),this.sequence.setVerticalScroll(this.table.getVerticalScroll())},destroy:function(){this.table.destroy(),BI.SequenceTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.sequence_table",BI.SequenceTable),BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:30,text:"",items:[]})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items},b.trigger)),this.popup=BI.createWidget({type:"bi.single_tree_popup",items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(a){this.combo.populate(a)},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="SingleTreeCombo.EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo),BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),items:[]})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:b.items,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SingleTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_tree_popup",BI.SingleTreePopup),BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:30,text:"",items:[]})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:a.text,items:a.items,height:a.height})},_checkTitle:function(){var a=this,b=this.getValue();BI.any(this.options.items,function(c,d){if(b.contains(d.value))return a.trigger.setTitle(d.text||d.value),!0})},setValue:function(a){a=BI.isArray(a)?a:[a],this.options.value=a,this.trigger.setValue(a),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(a){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(a)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),BI.SwitchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SwitchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switch-tree",items:[]})},_init:function(){BI.SwitchTree.superclass._init.apply(this,arguments);this.options;this.tab=BI.createWidget({type:"bi.tab",element:this,tab:null,defaultShowIndex:BI.SwitchTree.SelectType.SingleSelect,cardCreator:BI.bind(this._createTree,this)})},_createTree:function(a){var b=this,c=this.options;switch(a){case BI.SwitchTree.SelectType.SingleSelect:return this.levelTree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:!0,items:BI.deepClone(c.items)}),this.levelTree.on(BI.LevelTree.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.levelTree;case BI.SwitchTree.SelectType.MultiSelect:return this.tree=BI.createWidget({type:"bi.simple_tree",items:this._removeIsParent(BI.deepClone(c.items))}),this.tree.on(BI.SimpleTreeView.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.tree}},_removeIsParent:function(a){return BI.each(a,function(a,b){BI.isNotNull(b.isParent)&&delete b.isParent}),a},switchSelect:function(){switch(this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.setSelect(BI.SwitchTree.SelectType.MultiSelect);break;case BI.SwitchTree.SelectType.MultiSelect:this.setSelect(BI.SwitchTree.SelectType.SingleSelect)}},setSelect:function(a){this.tab.setSelect(a)},getSelect:function(){return this.tab.getSelect()},setValue:function(a){switch(this.storeValue=a,this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.levelTree.setValue(a);break;case BI.SwitchTree.SelectType.MultiSelect:this.tree.setValue(a)}},getValue:function(){return this.tab.getValue()},populate:function(a){this.options.items=a,BI.isNotNull(this.levelTree)&&this.levelTree.populate(BI.deepClone(a)),BI.isNotNull(this.tree)&&this.tree.populate(this._removeIsParent(BI.deepClone(a)))}}),BI.SwitchTree.EVENT_CHANGE="SwitchTree.EVENT_CHANGE",BI.SwitchTree.SelectType={SingleSelect:BI.Selection.Single,MultiSelect:BI.Selection.Multi},BI.shortcut("bi.switch_tree",BI.SwitchTree),BI.TimeInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){var a=BI.TimeInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-time-interval"})},_init:function(){var a=this;BI.TimeInterval.superclass._init.apply(this,arguments),this.left=this._createCombo(),this.right=this._createCombo(),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(){var a=this,b=BI.createWidget({type:"bi.multidate_combo"});return b.on(BI.MultiDateCombo.EVENT_ERROR,function(){a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_ERROR)}),b.on(BI.MultiDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),a,{offsetStyle:"center"}),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls))}),b.on(BI.MultiDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),a,{offsetStyle:"center"}),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls))}),b.on(BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW,function(){a.left.hidePopupView(),a.right.hidePopupView()}),b.on(BI.MultiDateCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_CHANGE))}),b},_dateCheck:function(a){return Date.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")==a||Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")==a||Date.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")==a||Date.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")==a},_checkVoid:function(a){return!Date.checkVoid(a.year,a.month,a.day,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&Date.checkLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&Date.checkLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),b=Date.parseDateTime(b,"%Y-%X-%d").print("%Y-%X-%d"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimeInterval.EVENT_VALID="EVENT_VALID",BI.TimeInterval.EVENT_ERROR="EVENT_ERROR",BI.TimeInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_interval",BI.TimeInterval),BI.YearCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-combo",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.YearCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.year_trigger",min:b.min,max:b.max}),this.trigger.on(BI.YearTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.YearTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.YearTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.YearTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.YearTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.YearCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",element:this,destroyWhenHide:!0,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.year_popup",ref:function(){ -a.popup=this},listeners:[{eventName:BI.YearPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max}}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){var b=a.trigger.getKey();BI.isNotNull(b)?a.popup.setValue(b):b||b===a.storeValue?a.setValue():a.popup.setValue(a.storeValue),a.fireEvent(BI.YearCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_combo",BI.YearCombo),BI.YearPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31"})},_createYearCalendar:function(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var a=this;this.selectedYear=this._year=(new Date).getFullYear();var b=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1}),c=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,value:1});this.navigation=BI.createWidget({type:"bi.navigation",element:this,single:!0,logic:{dynamic:!0},tab:{cls:"year-popup-navigation bi-high-light bi-border-top",height:25,items:[b,c]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var d=this.getSelectedCard();b.setEnable(!d.isFrontYear()),c.setEnable(!d.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.YearPopup.EVENT_CHANGE,a.selectedYear)})},getValue:function(){return this.selectedYear},setValue:function(a){var b=this.options;Date.checkVoid(a,1,1,b.min,b.max)[0]?(a=(new Date).getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue("")):(this.selectedYear=a,this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue(a))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup),BI.YearTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:25,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},_defaultConfig:function(){return BI.extend(BI.YearTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-year-trigger bi-border",min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.YearTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(d){return a.editor.setErrorText(BI.isPositiveInteger(d)?c.errorTextInvalid:c.errorText),""===d||BI.isPositiveInteger(d)&&!Date.checkVoid(d,1,1,b.min,b.max)[0]},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.YearTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.YearTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.YearTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.YearTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.YearTrigger.EVENT_ERROR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-year-text",text:BI.i18nText("BI-Multi_Date_Year"),width:c.triggerWidth},width:c.triggerWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return 0|this.editor.getValue()}}),BI.YearTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.YearTrigger.EVENT_ERROR="EVENT_ERROR",BI.YearTrigger.EVENT_START="EVENT_START",BI.YearTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.year_trigger",BI.YearTrigger),BI.YearMonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearMonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-month-combo",yearBehaviors:{},monthBehaviors:{},height:25})},_init:function(){BI.YearMonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.year=BI.createWidget({type:"bi.year_combo",behaviors:b.yearBehaviors}),this.month=BI.createWidget({type:"bi.month_combo",behaviors:b.monthBehaviors}),this.year.on(BI.YearCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearMonthCombo.EVENT_CONFIRM)}),this.year.on(BI.YearCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),this.month.on(BI.MonthCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearMonthCombo.EVENT_CONFIRM)}),this.month.on(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.center",element:this,hgap:5,items:[this.year,this.month]})},setValue:function(a){a=a||{},this.month.setValue(a.month),this.year.setValue(a.year)},getValue:function(){return{year:this.year.getValue(),month:this.month.getValue()}}}),BI.YearMonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_month_combo",BI.YearMonthCombo),BI.YearQuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearQuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-quarter-combo",yearBehaviors:{},quarterBehaviors:{},height:25})},_init:function(){BI.YearQuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.year=BI.createWidget({type:"bi.year_combo",behaviors:b.yearBehaviors}),this.quarter=BI.createWidget({type:"bi.quarter_combo",behaviors:b.quarterBehaviors}),this.year.on(BI.YearCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_CONFIRM)}),this.year.on(BI.YearCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),this.quarter.on(BI.QuarterCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_CONFIRM)}),this.quarter.on(BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.center",element:this,hgap:5,items:[this.year,this.quarter]})},setValue:function(a){a=a||{},this.quarter.setValue(a.quarter),this.year.setValue(a.year)},getValue:function(){return{year:this.year.getValue(),quarter:this.quarter.getValue()}}}),BI.YearQuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_quarter_combo",BI.YearQuarterCombo),BI.AbstractAllValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractAllValueChooser.superclass._defaultConfig.apply(this,arguments),{width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(a){var b=a;return BI.isNotNull(this.items)&&BI.some(this.items,function(c,d){if(d.value===a)return b=d.text,!0}),b},_itemsCreator:function(a,b){function c(c){var d=(a.keywords||[]).slice();if(a.keyword&&d.push(a.keyword),BI.each(d,function(a,b){var d=BI.Func.getSearchResult(c,b);c=d.matched.concat(d.finded)}),a.selectedValues){var e=BI.makeObject(a.selectedValues,!0);c=BI.filter(c,function(a,b){return!e[b.value]})}return a.type===BI.MultiSelectCombo.REQ_GET_ALL_DATA?void b({items:c}):a.type===BI.MultiSelectCombo.REQ_GET_DATA_LENGTH?void b({count:c.length}):void b({items:c,hasNext:!1})}var d=this,e=this.options;e.cache&&this.items?c(this.items):e.itemsCreator({},function(a){d.items=a,c(a)})}}),BI.AllValueChooserCombo=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.combo=BI.createWidget({type:"bi.multi_select_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.combo.on(BI.MultiSelectCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.AllValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.combo.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.combo.populate.apply(this,arguments)}}),BI.AllValueChooserCombo.EVENT_CONFIRM="AllValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.all_value_chooser_combo",BI.AllValueChooserCombo),BI.AllValueChooserPane=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-pane",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.AllValueChooserPane.EVENT_CHANGE)})},setValue:function(a){this.list.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.list.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.list.populate.apply(this.list,arguments)}}),BI.AllValueChooserPane.EVENT_CHANGE="AllValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.all_value_chooser_pane",BI.AllValueChooserPane),BI.AbstractTreeValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractTreeValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn})},_initData:function(a){this.items=a;var b=BI.Tree.treeFormat(a);this.tree=new BI.Tree,this.tree.initTree(b)},_itemsCreator:function(a,b){function c(){switch(a.type){case BI.TreeView.REQ_TYPE_INIT_DATA:d._reqInitTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_ADJUST_DATA:d._reqAdjustTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_SELECT_DATA:d._reqSelectedTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA:d._reqDisplayTreeNode(a,b);break;default:d._reqTreeNode(a,b)}}var d=this,e=this.options;this.items?c():e.itemsCreator({},function(a){d._initData(a),c()})},_reqDisplayTreeNode:function(a,b){function c(a,b,g){return null==g||BI.isEmpty(g)?void BI.each(b.getChildren(),function(d,g){var h=BI.clone(a);h.push(g.value);var i=f._getChildCount(h);e(g,b.id,i),c(h,g,{})}):void BI.each(g,function(b){var h=f._getTreeNode(a,b),i=BI.clone(a);i.push(h.value),e(h,h.parent&&h.parent.id,d(g[b],i)),c(i,h,g[b])})}function d(a,b){return null==a?0:BI.isEmpty(a)?f._getChildCount(b):BI.size(a)}function e(a,b,c){g.push({id:a.id,pId:b,text:a.text+(c>0?"("+BI.i18nText("BI-Basic_Altogether")+c+BI.i18nText("BI-Basic_Count")+")":""),value:a.value,open:!0})}var f=this,g=[],h=a.selectedValues;return null==h||BI.isEmpty(h)?void b({}):(c([],this.tree.getRoot(),h),void b({items:g}))},_reqSelectedTreeNode:function(a,b){function c(a){var b=m.concat(k);if(g(a,b))if(f(b))i._deleteNode(a,b);else{var c=[],j=e(m,k,[],c);j&&BI.isNotEmptyArray(c)&&BI.each(c,function(b,c){var e=i._getNode(a,c);e?i._deleteNode(a,c):d(a,c,BI.last(c))})}if(h(a,b)){var l=[],j=!1;f(b)?j=!0:(j=e(m,k,l),b=m),j===!0&&(d(a,b,k),l.length>0&&BI.each(l,function(b,c){i._buildTree(a,c)}))}}function d(a,b,c){var d=a,e=[],f=[];BI.some(b,function(g,h){var j=d[h];if(null==j){if(0===g)return!0;if(!BI.isEmpty(d))return!0;var k=b.slice(0,g),l=i._getChildren(k);if(f.push(k),e.push(l.length),g===b.length-1&&1===l.length&&l[0]===c)for(var m=e.length-1;m>=0&&1===e[m];m--)i._deleteNode(a,f[m]);else BI.each(l,function(a,e){return g===b.length-1&&e.value===c||void(d[e.value]={})});d=d[h]}else d=j})}function e(a,b,c,d){var f=BI.clone(a);if(f.push(b),i._isMatch(a,b,l))return d&&d.push(f),!0;var g=i._getChildren(f),h=[],j=!1;return BI.each(g,function(a,b){e(f,b.value,c,d)?j=!0:h.push(b.value)}),j===!0&&BI.each(h,function(a,b){var d=BI.clone(f);d.push(b),c.push(d)}),j}function f(a){for(var b=0,c=a.length;bj._const.perPage)break}return f}function d(a,b,c,i,k){if(j._isMatch(b,c,l)){var m=i||h(b,c);return e(b,c,!1,m,!i&&f(b,c),!0,k),[!0,m]}var n=BI.clone(b);n.push(c);var o=j._getChildren(n),p=!1,m=!1,q=i||g(b,c);return BI.each(o,function(b,c){var e=d(a+1,n,c.value,q,k);e[1]===!0&&(m=!0),e[0]===!0&&(p=!0)}),p===!0&&(m=q||h(b,c)&&m,e(b,c,!0,m,!1,!1,k)),[p,m]}function e(a,b,c,d,e,f,g){var h=j._getTreeNode(a,b);g.push({id:h.id,pId:h.pId,text:h.text,value:h.value,title:h.title,isParent:h.getChildrenLength()>0,open:c,checked:d,halfCheck:e,flag:f})}function f(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&!BI.isEmpty(c))return!0})}function g(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&BI.isEmpty(c))return!0})}function h(a,b){var c=i(a);return null!=c&&BI.any(c,function(a){if(a===b)return!0})}function i(a){var b=m;return null==b?null:(BI.every(a,function(a,c){return b=b[c],null!=b}),b)}var j=this,k=[],l=a.keyword||"",m=a.selectedValues,n=a.lastSearchValue||"",o=c();BI.nextTick(function(){b({hasNext:o.length>j._const.perPage,items:k,lastSearchValue:BI.last(o)})})},_reqTreeNode:function(a,b){function c(a,b){var c={};return BI.each(a,function(a,c){b=b[c]||{}}),BI.each(b,function(a,b){if(BI.isNull(b))return void(c[a]=[0,0]);if(BI.isEmpty(b))return void(c[a]=[2,0]);var d={};BI.each(b,function(a,b){(BI.isNull(b)||BI.isEmpty(b))&&(d[a]=!0)}),c[a]=[1,BI.size(d)]}),c}function d(a,b,c,d){var f=d.checked,g=d.half,h=!1,i=!1;if(BI.has(c,a))if(1===c[a][0]){var j=BI.clone(b);j.push(a);var k=e._getChildCount(j);k>0&&k!==c[a][1]&&(i=!0)}else 2===c[a][0]&&(h=!0);var l;return l=f||i||h?(h||f)&&!g||BI.has(c,a):BI.has(c,a),[l,i]}var e=this,f=[],g=a.times,h=a.checkState||{},i=a.parentValues||[],j=a.selectedValues||{},k={};k=c(i,j);for(var l=this._getChildren(i),m=(g-1)*this._const.perPage;l[m]&&m0,checked:n[0],halfCheck:n[1]})}BI.nextTick(function(){b({items:f,hasNext:l.length>g*e._const.perPage})})},_getNode:function(a,b){for(var c=a,d=0,e=b.length;d0&&BI.isEmpty(e);)c=d[d.length-1],d=d.slice(0,d.length-1),e=this._getNode(a,d),null!=e&&delete e[c]},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){BI.has(c,b)||(c[b]={}),c=c[b]})},_isMatch:function(a,b,c){var d=this._getTreeNode(a,b),e=BI.Func.getSearchResult([d.text||d.value],c);return e.finded.length>0||e.matched.length>0},_getTreeNode:function(a,b){var c,d=this,e=0;return this.tree.traverse(function(f){if(!d.tree.isRoot(f))return!(e>a.length)&&(e===a.length&&f.value===b?(c=f,!1):f.value!==a[e]||void e++)}),c},_getChildren:function(a){if(a.length>0)var b=BI.last(a),c=this._getTreeNode(a.slice(0,a.length-1),b);else var c=this.tree.getRoot();return c.getChildren()},_getChildCount:function(a){return this._getChildren(a).length}}),BI.TreeValueChooserCombo=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&this._initData(b.items),this.combo=BI.createWidget({type:"bi.multi_tree_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),width:b.width,height:b.height}),this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.TreeValueChooserCombo.EVENT_CONFIRM="TreeValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.tree_value_chooser_combo",BI.TreeValueChooserCombo),BI.TreeValueChooserPane=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-pane",items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.pane=BI.createWidget({type:"bi.multi_select_tree",element:this,itemsCreator:BI.bind(this._itemsCreator,this)}),this.pane.on(BI.MultiSelectTree.EVENT_CHANGE,function(){a.fireEvent(BI.TreeValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(b.items)&&(this._initData(b.items),this.populate())},setSelectedValue:function(a){this.pane.setSelectedValue(a)},setValue:function(a){this.pane.setValue(a)},getValue:function(){return this.pane.getValue()},populate:function(){this.pane.populate.apply(this.pane,arguments)}}),BI.TreeValueChooserPane.EVENT_CHANGE="TreeValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.tree_value_chooser_pane",BI.TreeValueChooserPane),BI.AbstractValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(a){var b=a;return BI.isNotNull(this.items)&&BI.some(this.items,function(c,d){if(d.value===a)return b=d.text,!0}),b},_getItemsByTimes:function(a,b){for(var c=[],d=(b-1)*this._const.perPage;a[d]&&d1)&&BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j0)if(c)for(var k=0,l=g.values.length;k0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e1?g+=a.values.length:g++}var f=[],g=0;if(BI.each(c,function(a,b){e(b)}),f.length>0){var h=[],i=[];BI.each(b,function(a,b){var c=b.slice();BI.removeAt(c,f),h.push(c)}),BI.each(a,function(a,b){var c=b.slice();BI.removeAt(c,f),i.push(c)}),b=h,a=i}return{items:a,header:b,deletedCols:f}}}),BI.shortcut("bi.dynamic_summary_tree_table",BI.DynamicSummaryTreeTable),BI.LayerTreeTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LayerTreeTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-layer-tree-table-cell",layer:0,text:""})},_init:function(){BI.LayerTreeTableCell.superclass._init.apply(this,arguments);var a=this.options;BI.createWidget({type:"bi.label",element:this.element,textAlign:"left",whiteSpace:"nowrap",height:a.height,text:a.text,value:a.value,lgap:5+30*a.layer,rgap:5})}}),BI.shortcut("bi.layer_tree_table_cell",BI.LayerTreeTableCell),BI.LayerTreeTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LayerTreeTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-layer-tree-table",el:{type:"bi.resizable_table"},isNeedResize:!1,isResizeAdapt:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],rowHeaderCreator:null,headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_createHeader:function(a){var b=this.options,c=b.header||[],d=b.crossHeader||[],e=BI.TableTree.formatCrossItems(b.crossItems,a,b.headerCellStyleGetter),f=[];if(BI.each(e,function(a,b){var c=[d[a]];f.push(c.concat(b||[]))}),c&&c.length>0){var g=this._formatColumns(c),h=this._getHDeep();h<=0?g.unshift(b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter}):g[0]=b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter},f.push(g)}return f},_formatItems:function(a){function b(a,c){a.type||(a.type="bi.layer_tree_table_cell"),a.layer=c;var e=[a];e=e.concat(a.values||[]),e.length>0&&d.push(e),BI.isNotEmptyArray(a.children)&&BI.each(a.children,function(a,d){b(d,c+1)})}var c=this.options,d=[];return BI.each(a,function(a,e){if(BI.each(e.children,function(a,c){b(c,0)}),BI.isArray(e.values)){var f=[{type:"bi.table_style_cell",text:BI.i18nText("BI-Summary_Values"),styleGetter:function(){return c.summaryCellStyleGetter(!0)}}].concat(e.values);d.push(f)}}),d},_formatColumns:function(a,b){return BI.isNotEmptyArray(a)?(b=b||this._getHDeep(),a.slice(Math.max(0,b-1))):a},_formatFreezeCols:function(){return this.options.freezeCols.length>0?[0]:[]},_formatColumnSize:function(a,b){if(a.length<=0)return[];var c=[0];return b=b||this._getHDeep(),BI.each(a,function(a,d){return a0&&(c=BI.makeArray(b,a[0]/b)),c.concat(a.slice(1))},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=this;if(BI.isObject(a))return void BI.each(a,function(a,b){c.attr(a,b)});switch(BI.LayerTreeTable.superclass.attr.apply(this,arguments),a){case"columnSize":case"minColumnSize":case"maxColumnSize":case"freezeCols":case"mergeCols":return}this.table.attr.apply(this.table,[a,b])},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;e.items=a||[],b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.setColumnSize(f.columnSize),this.table.attr("freezeCols",f.freezeCols),this.table.attr("minColumnSize",f.minColumnSize),this.table.attr("maxColumnSize",f.maxColumnSize),this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.LayerTreeTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.layer_tree_table",BI.LayerTreeTable),BI.TableStyleCell=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TableStyleCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-style-cell",styleGetter:BI.emptyFn})},_init:function(){BI.TableStyleCell.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",forceCenter:!0,hgap:5,text:a.text}),this._digestStyle()},_digestStyle:function(){var a=this.options,b=a.styleGetter();b&&this.text.element.css(b)},setText:function(a){this.text.setText(a)},populate:function(){this._digestStyle()}}),BI.shortcut("bi.table_style_cell",BI.TableStyleCell),BI.TableTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TableTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-tree",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_init:function(){BI.TableTree.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep(),d=BI.TableTree.formatHeader(a.header,a.crossHeader,a.crossItems,b,c,a.headerCellStyleGetter),e=BI.TableTree.formatItems(a.items,b,!1,a.summaryCellStyleGetter);return{header:d,items:e}},setWidth:function(a){BI.TableTree.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.TableTree.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(){BI.TableTree.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a||[]),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.TableTree.superclass.destroy.apply(this,arguments)}}),BI.extend(BI.TableTree,{formatHeader:function(a,b,c,d,e,f){for(var g=BI.TableTree.formatCrossItems(c,e,f),h=[],i=0;i0&&h.push(a),h},formatItems:function(a,b,c,d){function e(a,g){var h;if(BI.isArray(g.children)){if(BI.each(g.children,function(b,c){var d;a!=-1?(d=a.slice(),d.push(g)):d=[],e(d,c)}),a!=-1?(h=a.slice(),h.push(g)):h=[],BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j0)if(c)for(var k=0,l=g.values.length;k0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e0}})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){a.setSelected(a.isSelected())}}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){a.setSelected(!0)}}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:36,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]}),this.half.invisible()},beforeClick:function(){var a=this.isHalfSelected(),b=this.isSelected();a===!0?this.setSelected(!0):this.setSelected(!b)},setSelected:function(a){this.checkbox.setSelected(a),this.setHalfSelected(!1)},setHalfSelected:function(a){this._half=!!a,a===!0?(this.half.visible(),this.checkbox.invisible()):(this.half.invisible(),this.checkbox.visible())},isHalfSelected:function(){return!!this._half},isSelected:function(){return this.checkbox.isSelected()},setValue:function(a){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var b=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this.setSelected(b),!b&&this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this,arguments))}}),BI.MultiSelectBar.EVENT_CHANGE="MultiSelectBar.EVENT_CHANGE",BI.shortcut("bi.multi_select_bar",BI.MultiSelectBar),BI.HandStandBranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-expander",direction:BI.Direction.Top,logic:{dynamic:!0},el:{type:"bi.label"},popup:{}})},_init:function(){BI.HandStandBranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend({},a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,{type:"bi.center_adapt",items:[this.expander]},this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.HandStandBranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_expander",BI.HandStandBranchExpander),BI.BranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-expander",direction:BI.Direction.Left,logic:{dynamic:!0},el:{},popup:{}})},_init:function(){BI.BranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend({},a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,this.expander,this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el,{type:"bi.label",width:30,height:"100%"}),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.BranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_expander",BI.BranchExpander),BI.HandStandBranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.HandStandBranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.handstand_branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.horizontal_adapt"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.HandStandBranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.HandStandBranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_tree",BI.HandStandBranchTree),BI.BranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.BranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.BranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.BranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_tree",BI.BranchTree),BI.DisplayTree=BI.inherit(BI.TreeView,{_defaultConfig:function(){return BI.extend(BI.DisplayTree.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-display-tree"})},_init:function(){BI.DisplayTree.superclass._init.apply(this,arguments)},_configSetting:function(){function a(a,b){return!1}var b={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return b},_dealWidthNodes:function(a){a=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.count>0?b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")":b.text=b.value}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.DisplayTree.superclass.destroy.apply(this,arguments)}}),BI.DisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.display_tree",BI.DisplayTree),BI.LevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-level-tree",el:{chooseType:0},expander:{},items:[]})},_init:function(){BI.LevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.first_plus_group_node";break;case a.length-1:f.type="bi.last_plus_group_node";break;default:f.type="bi.mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){BI.isKey(b.id)||(b.id=BI.UUID())})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},c.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},c.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.LevelTree.EVENT_CHANGE,arguments)})},stroke:function(a){this.tree.stroke.apply(this.tree,arguments)},populate:function(a){a=this._formatItems(BI.Tree.transformToTreeFormat(a),0),this.tree.populate(a)},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree),BI.SimpleTreeView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SimpleTreeView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-simple-tree",itemsCreator:BI.emptyFn,items:null})},_init:function(){BI.SimpleTreeView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(c,d){var e=function(b){d({items:b}),a.structure.initTree(BI.Tree.transformToTreeFormat(b))};BI.isNotNull(b.items)?e(b.items):b.itemsCreator(c,e)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(b.items)&&this.populate()},populate:function(a,b){a&&(this.options.items=a),this.tree.stroke({keyword:b})},setValue:function(a){a||(a=[]);var b=this,c={},d=[];BI.each(a,function(a,e){var f=b.structure.search(e,"value");if(f){var g=f;for(g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++);g&&g.getChildrenLength()<=c[g.value];)d.push(g.value),g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++)}}),this.tree.setValue(BI.makeObject(a.concat(d)))},_getValue:function(){var a=[],b=this.tree.getValue(),c=function(b){BI.each(b,function(b,d){BI.isEmpty(d)?a.push(b):c(d)})};return c(b),a},empty:function(){this.tree.empty()},getValue:function(){var a=this,b=[],c=this._getValue();return BI.each(c,function(c,d){var e=a.structure.search(d,"value");e&&a.structure._traverse(e,function(a){a.isLeaf()&&b.push(a.value)})}),b}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView),BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-editor-trigger bi-border",height:30,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:"",triggerWidth:30})},_init:function(){this.options.height-=2,BI.EditorTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",cls:"bi-border-left",width:b.triggerWidth},width:b.triggerWidth}]})},getValue:function(){return this.editor.getValue()},setValue:function(a){this.editor.setValue(a)},setText:function(a){this.editor.setState(a)}}),BI.EditorTrigger.EVENT_CHANGE="BI.EditorTrigger.EVENT_CHANGE",BI.shortcut("bi.editor_trigger",BI.EditorTrigger),BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-trigger",el:{},height:30})},_init:function(){var a=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(a.el,{type:"bi.trigger_icon_button",element:this,width:a.width,height:a.height})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger),BI.IconTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:30},_defaultConfig:function(){var a=BI.IconTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:30})},_init:function(){BI.IconTextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:b.height,text:b.text,hgap:c.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-border-left",width:c.triggerWidth}),BI.createWidget({element:this,type:"bi.htape",items:[{el:{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon "+b.iconClass,ref:function(b){a.icon=b},disableSelected:!0},width:24},{el:this.text},{el:this.trigerButton,width:c.triggerWidth}]})},setValue:function(a){this.text.setValue(a),this.text.setTitle(a)},setIcon:function(a){this.icon.setIcon(a)},setText:function(a){this.text.setText(a),this.text.setTitle(a)}}),BI.shortcut("bi.icon_text_trigger",BI.IconTextTrigger),BI.TextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:30},_defaultConfig:function(){var a=BI.TextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:30})},_init:function(){BI.TextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-border-left",width:b.triggerWidth}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth}]})},setValue:function(a){this.text.setValue(a),this.text.setTitle(a)},setText:function(a){this.text.setText(a),this.text.setTitle(a)}}),BI.shortcut("bi.text_trigger",BI.TextTrigger),BI.SelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-text-trigger bi-border",height:24})},_init:function(){this.options.height-=2,BI.SelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",element:this,height:a.height}),BI.isKey(a.text)&&this.setValue(a.text)},setValue:function(a){var b=this.options;a=BI.isArray(a)?a:[a];var c=[],d=BI.Tree.transformToArrayFormat(this.options.items);BI.each(d,function(b,d){BI.deepContains(a,d.value)&&!c.contains(d.text||d.value)&&c.push(d.text||d.value)}),c.length>0?this.trigger.setText(c.join(",")):this.trigger.setText(b.text)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_text_trigger",BI.SelectTextTrigger),BI.SmallSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SmallSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-small-select-text-trigger bi-border",height:20})},_init:function(){this.options.height-=2,BI.SmallSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:a.height-2}),BI.isKey(a.text)&&this.setValue(a.text)},setValue:function(a){var b=this.options;a=BI.isArray(a)?a:[a];var c=[],d=BI.Tree.transformToArrayFormat(this.options.items);BI.each(d,function(b,d){BI.deepContains(a,d.value)&&!c.contains(d.text||d.value)&&c.push(d.text||d.value)}),c.length>0?(this.trigger.element.removeClass("bi-water-mark"),this.trigger.setText(c.join(","))):(this.trigger.element.addClass("bi-water-mark"),this.trigger.setText(b.text))},populate:function(a){this.options.items=a; +}}),BI.shortcut("bi.small_select_text_trigger",BI.SmallSelectTextTrigger),BI.SmallTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,triggerWidth:20},_defaultConfig:function(){var a=BI.SmallTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:20})},_init:function(){BI.SmallTextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth}]})},setValue:function(a){this.text.setValue(a)},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.small_text_trigger",BI.SmallTextTrigger),BI.SequenceTableTreeNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableTreeNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-tree-number",isNeedFreeze:!1,startSequence:1,scrollTop:0,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.SequenceTableTreeNumber.superclass._init.apply(this,arguments);this.options;this.vCurr=1,this.hCurr=1,this.tasks=[],this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:this._getHeaderHeight()-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this.start=this.options.startSequence,this.cache={},this._nextState(),this._populate()},_getNextSequence:function(a){function b(a){c.cache[a.text||a.value]||(c.cache[a.text||a.value]=e),e++}var c=this,d=this.start,e=this.start;return BI.each(a,function(a,f){BI.isNotEmptyArray(f.children)&&BI.each(f.children,function(a,f){0===a&&c.cache[f.text||f.value]&&(d=e=c.cache[f.text||f.value]),b(f)})}),this.start=e,d},_getStart:function(a){var b=this,c=this.start;return BI.some(a,function(a,d){if(BI.isNotEmptyArray(d.children))return BI.some(d.children,function(a,d){if(0===a&&b.cache[d.text||d.value])return c=b.cache[d.text||d.value],!0})}),c},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d},_layout:function(){var a=this.options,b=this._getHeaderHeight()-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize();try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_getHeaderHeight:function(){var a=this.options;return a.headerRowSize*(a.crossHeader.length+(a.header.length>0?1:0))},_nextState:function(){var a=this.options;this._getNextSequence(a.items)},_prevState:function(){var a,b=this.options;BI.some(b.items,function(b,c){if(BI.isNotEmptyArray(c.children))return BI.some(c.children,function(b,c){return a=c,!0})}),a&&BI.isNotEmptyObject(this.cache)?this.start=this.cache[a.text||a.value]:this.start=1,this._nextState()},_getMaxScrollTop:function(a){var b=0;return BI.each(a,function(a,c){b+=c.cnt}),Math.max(0,b*this.options.rowSize-(this.options.height-this._getHeaderHeight())+BI.DOM.getScrollWidth())},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){var a=this,b=this.options,c=[],d=[],e=this._formatNumber(b.items),f=BI.PrefixIntervalTree.uniform(e.length,0);BI.each(e,function(a,b){f.set(a,b.height)});for(var g=BI.clamp(b.scrollTop,0,this._getMaxScrollTop(e)),h=f.greatestLowerBound(g),i=-(g-(h>0?f.sumTo(h-1):0)),j=i,k=b.height-this._getHeaderHeight();j-1)e[f].height!==a.renderedCells[g]._height&&(a.renderedCells[g]._height=e[f].height,a.renderedCells[g].el.setHeight(e[f].height)),e[f].top!==a.renderedCells[g].top&&(a.renderedCells[g].top=e[f].top,a.renderedCells[g].el.element.css("top",e[f].top+"px")),c.push(a.renderedCells[g]);else{var h=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,styleGetter:e[f].isSummary===!0?function(){return b.summaryCellStyleGetter(!0)}:function(a){return function(){return b.sequenceCellStyleGetter(a)}}(e[f].index)},e[f]));c.push({el:h,left:0,top:e[f].top,_height:e[f].height})}});var l={},m={},n=[];BI.each(d,function(b,c){BI.deepContains(a.renderedKeys,c)?l[b]=c:m[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(l,b)||BI.deepContains(m,b)||n.push(a)}),BI.each(n,function(b,c){a.renderedCells[c].el.destroy()});var o=[];BI.each(m,function(a){o.push(c[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:o}),this.renderedCells=c,this.renderedKeys=d,this.container.setHeight(f.sumUntil(e.length))},_restore:function(){BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},_populate:function(){var a=this;BI.each(this.tasks,function(b,c){c.apply(a)}),this.tasks=[],this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a<=1?(this.cache={},this.start=this.options.startSequence,this._restore(),this.tasks.push(this._nextState)):a===this.vCurr+1?this.tasks.push(this._nextState):a===this.vCurr-1&&this.tasks.push(this._prevState),this.vCurr=a},setHPage:function(a){a!==this.hCurr&&this.tasks.push(this._prevState),this.hCurr=a},restore:function(){this._restore()},populate:function(a,b,c,d){var e=this.options;a&&a!==this.options.items&&(e.items=a,this._restore(),this.tasks.push(this._prevState)),b&&b!==this.options.header&&(e.header=b),c&&c!==this.options.crossItems&&(e.crossItems=c),d&&d!==this.options.crossHeader&&(e.crossHeader=d),this._populate()}}),BI.shortcut("bi.sequence_table_tree_number",BI.SequenceTableTreeNumber),BI.AdaptiveArrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AdaptiveArrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-adaptive-arrangement",resizable:!0,layoutType:BI.Arrangement.LAYOUT_TYPE.FREE,items:[]})},_init:function(){BI.AdaptiveArrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.arrangement",element:this,layoutType:b.layoutType,items:b.items}),this.arrangement.on(BI.Arrangement.EVENT_SCROLL,function(){a.fireEvent(BI.AdaptiveArrangement.EVENT_SCROLL,arguments)}),this.zIndex=0,BI.each(b.items,function(b,c){a._initResizable(c.el)}),$(document).mousedown(function(b){BI.each(a.getAllRegions(),function(a,c){0===c.el.element.find(b.target).length&&c.el.element.removeClass("selected")})}),BI.ResizeDetector.addResizeListener(this,function(){a.arrangement.resize(),a.fireEvent(BI.AdaptiveArrangement.EVENT_RESIZE)})},_isEqual:function(){return this.arrangement._isEqual.apply(this.arrangement,arguments)},_setSelect:function(a){a.element.hasClass("selected")||(a.element.css("zIndex",++this.zIndex),BI.each(this.getAllRegions(),function(a,b){b.el.element.removeClass("selected")}),a.element.addClass("selected"))},_initResizable:function(a){var b=this;this.options;a.element.css("zIndex",++this.zIndex),a.element.mousedown(function(){b._setSelect(a)})},_getScrollOffset:function(){return this.arrangement._getScrollOffset()},getClientWidth:function(){return this.arrangement.getClientWidth()},getClientHeight:function(){return this.arrangement.getClientHeight()},addRegion:function(a,b){this._initResizable(a.el),this._setSelect(a.el);var c,d=this.arrangement.getAllRegions();return(c=this.arrangement.addRegion(a,b))&&(this._old=d),c},deleteRegion:function(a){var b,c=this.getAllRegions();return(b=this.arrangement.deleteRegion(a))?this._old=c:(this._old=this.getAllRegions(),this.relayout()),b},setRegionSize:function(a,b){var c,d=this.getAllRegions();return(c=this.arrangement.setRegionSize(a,b))&&(this._old=d),c},setPosition:function(a,b){return this.arrangement.setPosition(a,b)},setRegionPosition:function(a,b){this.getRegionByName(a);return this.arrangement.setRegionPosition(a,b)},setDropPosition:function(a,b){return this.arrangement.setDropPosition(a,b)},scrollInterval:function(a,b,c,d){function e(a,b){if(""===a)return f.lastActiveRegion="",void(f._scrollInterval&&(clearInterval(f._scrollInterval),f._scrollInterval=null));if(f.lastActiveRegion!==a){f.lastActiveRegion=a,f._scrollInterval&&(clearInterval(f._scrollInterval),f._scrollInterval=null);var c=0;f._scrollInterval=setInterval(function(){if(c++,!(c<=3)){var d=f._getScrollOffset(),e=d.top+40*g[a][0],h=d.left+40*g[a][1];e<0||h<0||(b({offsetX:40*g[a][1],offsetY:40*g[a][0]}),f.scrollTo({top:e,left:h}))}},300)}}var f=this,g={top:[-1,0],bottom:[1,0],left:[0,-1],right:[0,1]},h=this.element.bounds();d({offsetX:0,offsetY:0});var i=this.element.offset(),j={left:a.pageX-i.left,top:a.pageY-i.top};b&&j.top>=0&&j.top<=30?e("top",d):b&&j.top>=h.height-30&&j.top<=h.height?e("bottom",d):b&&j.left>=0&&j.left<=30?e("left",d):b&&j.left>=h.width-30&&j.left<=h.width?e("right",d):c===!0?j.top<0?e("top",d):j.top>h.height?e("bottom",d):j.left<0?e("left",d):j.left>h.width?e("right",d):e("",d):e("",d)},scrollEnd:function(){this.lastActiveRegion="",this._scrollInterval&&(clearInterval(this._scrollInterval),this._scrollInterval=null)},scrollTo:function(a){this.arrangement.scrollTo(a)},zoom:function(a){this.arrangement.zoom(a)},resize:function(){this.arrangement.resize()},relayout:function(){return this.arrangement.relayout()},setLayoutType:function(a){this.arrangement.setLayoutType(a)},getLayoutType:function(){return this.arrangement.getLayoutType()},getLayoutRatio:function(){return this.arrangement.getLayoutRatio()},getHelper:function(){return this.arrangement.getHelper()},getRegionByName:function(a){return this.arrangement.getRegionByName(a)},getAllRegions:function(){return this.arrangement.getAllRegions()},revoke:function(){this._old&&this.populate(BI.toArray(this._old))},populate:function(a){var b=this;BI.each(a,function(a,c){b._initResizable(c.el)}),this.arrangement.populate(a)}}),BI.AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE",BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_RESIZE",BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE",BI.AdaptiveArrangement.EVENT_RESIZE="AdaptiveArrangement.EVENT_RESIZE",BI.AdaptiveArrangement.EVENT_SCROLL="AdaptiveArrangement.EVENT_SCROLL",BI.shortcut("bi.adaptive_arrangement",BI.AdaptiveArrangement),BI.ArrangementBlock=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ArrangementBlock.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement-block bi-mask"})}}),BI.shortcut("bi.arrangement_block",BI.ArrangementBlock),BI.ArrangementDroppable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ArrangementDroppable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement-droppable bi-resizer"})}}),BI.shortcut("bi.arrangement_droppable",BI.ArrangementDroppable),BI.Arrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Arrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement",layoutType:BI.Arrangement.LAYOUT_TYPE.GRID,items:[]})},_init:function(){BI.Arrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.arrangement_droppable",cls:"arrangement-block",invisible:!0}),this.block=BI.createWidget({type:"bi.arrangement_block",invisible:!0}),this.container=BI.createWidget({type:"bi.absolute",items:b.items.concat([this.block,this.arrangement])}),this.scrollContainer=BI.createWidget({type:"bi.adaptive",width:"100%",height:"100%",scrollable:!0,items:[this.container]}),this.scrollContainer.element.scroll(function(){a.fireEvent(BI.Arrangement.EVENT_SCROLL,{scrollLeft:a.scrollContainer.element.scrollLeft(),scrollTop:a.scrollContainer.element.scrollTop(),clientWidth:a.scrollContainer.element[0].clientWidth,clientHeight:a.scrollContainer.element[0].clientHeight})}),BI.createWidget({type:"bi.adaptive",element:this,items:[this.scrollContainer]}),this.regions={},b.items.length>0&&BI.nextTick(function(){a.populate(b.items)})},_calculateRegions:function(a){var b=this;this.options;this.regions={},BI.each(a,function(a,c){var d=b._createOneRegion(c);b.regions[d.id]=d})},_isEqual:function(a,b){return Math.abs(a-b)<2},_isLessThan:function(a,b){return ab&&!this._isEqual(a,b)},_isLessThanEqual:function(a,b){return a<=b||this._isEqual(a,b)},_isMoreThanEqual:function(a,b){return a>=b||this._isEqual(a,b)},_getRegionOccupied:function(a){this.options;if(BI.size(a||this.regions)<=0)return{left:0,top:0,width:0,height:0};var b=BI.MAX,c=BI.MIN,d=BI.MAX,e=BI.MIN;return BI.each(a||this.regions,function(a,f){b=Math.min(b,f.left),c=Math.max(c,f.left+f.width),d=Math.min(d,f.top),e=Math.max(e,f.top+f.height)}),{left:b,top:d,width:c-b,height:e-d}},_getCrossArea:function(a,b){if(a.left<=b.left){if(a.top<=b.top){if(a.top+a.height>b.top&&a.left+a.width>b.left)return this._isEqual(a.top+a.height,b.top)||this._isEqual(a.left+a.width,b.left)?0:(a.top+a.height-b.top)*(a.left+a.width-b.left)}else if(b.top+b.height>a.top&&a.left+a.width>b.left)return this._isEqual(b.top+b.height,a.top)||this._isEqual(a.left+a.width,b.left)?0:(b.top+b.height-a.top)*(a.left+a.width-b.left)}else if(a.top<=b.top){if(a.top+a.height>b.top&&b.left+b.width>a.left)return this._isEqual(a.top+a.height,b.top)||this._isEqual(b.left+b.width,a.left)?0:(a.top+a.height-b.top)*(b.left+b.width-a.left)}else if(b.top+b.height>a.top&&b.left+b.width>a.left)return this._isEqual(b.top+b.height,a.top)||this._isEqual(b.left+b.width,a.left)?0:(b.top+b.height-a.top)*(b.left+b.width-a.left);return 0},_isRegionOverlay:function(a){var b=[];BI.each(a||this.regions,function(a,c){b.push(new BI.Region(c.left,c.top,c.width,c.height))});for(var c=0,d=b.length;c1)return!0}return!1},_isArrangeFine:function(a){switch(this.options.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:return!0;case BI.Arrangement.LAYOUT_TYPE.GRID:}return!0},_getRegionNames:function(a){var b=[];return BI.each(a||this.regions,function(a,c){b.push(c.id||c.attr("id"))}),b},_getRegionsByNames:function(a,b){if(a=BI.isArray(a)?a:[a],b=b||this.regions,BI.isArray(b)){var c=[];BI.each(b,function(b,d){a.contains(d.id||d.attr("id"))&&c.push(d)})}else{var c={};BI.each(a,function(a,d){c[d]=b[d]})}return c},_cloneRegion:function(a){var b={};return BI.each(a||this.regions,function(a,c){b[a]={},b[a].el=c.el,b[a].id=c.id,b[a].left=c.left,b[a].top=c.top,b[a].width=c.width,b[a].height=c.height}),b},_test:function(a){return!BI.any(a||this.regions,function(a,b){if(BI.isNaN(b.width)||BI.isNaN(b.height)||b.width<=21||b.height<=21)return!0})},_getScrollOffset:function(){return{left:this.scrollContainer.element[0].scrollLeft,top:this.scrollContainer.element[0].scrollTop}},_createOneRegion:function(a){var b=BI.createWidget(a.el);return b.setVisible(!0),{id:b.attr("id"),left:a.left,top:a.top,width:a.width,height:a.height,el:b}},_applyRegion:function(a){this.options;BI.each(a||this.regions,function(a,b){b.el.element.css({left:b.left,top:b.top,width:b.width,height:b.height})}),this._applyContainer(),this.ratio=this.getLayoutRatio()},_renderRegion:function(){BI.createWidget({type:"bi.absolute",element:this.container,items:BI.toArray(this.regions)})},getClientWidth:function(){return this.scrollContainer.element[0].clientWidth},getClientHeight:function(){return this.scrollContainer.element[0].clientHeight},_applyContainer:function(){this.scrollContainer.element.css("overflow","hidden");var a=this._getRegionOccupied();return this.container.element.width(a.left+a.width).height(a.top+a.height),this.scrollContainer.element.css("overflow","auto"),a},_modifyRegion:function(a){BI.each(this.regions,function(b,c){a[b]&&(c.left=a[b].left,c.top=a[b].top,c.width=a[b].width,c.height=a[b].height)})},_addRegion:function(a){var b=this._createOneRegion(a);this.regions[b.id]=b,BI.createWidget({type:"bi.absolute",element:this.container,items:[b]})},_deleteRegionByName:function(a){this.regions[a].el.setVisible(!1),delete this.regions[a]},_setArrangeSize:function(a){this.arrangement.element.css({left:a.left,top:a.top,width:a.width,height:a.height})},_getOneWidthPortion:function(){return this.getClientWidth()/BI.Arrangement.PORTION},_getOneHeightPortion:function(){return this.getClientHeight()/BI.Arrangement.H_PORTION},_getGridPositionAndSize:function(a){var b=this._getOneWidthPortion(),c=this._getOneHeightPortion(),d=Math.round(a.width/b),e=Math.round(a.left/b),f=Math.round(a.top/c),g=Math.round(a.height/c);return 0===d&&(d=1),0===g&&(g=1),{x:e,y:f,w:d,h:g}},_getBlockPositionAndSize:function(a){var b=this._getOneWidthPortion(),c=this._getOneHeightPortion();return{left:a.x*b,top:a.y*c,width:a.w*b,height:a.h*c}},_getLayoutsByRegions:function(a){var b=this,c=[];return BI.each(a||this.regions,function(a,d){c.push(BI.extend(b._getGridPositionAndSize(d),{i:d.id}))}),c},_getLayoutIndexByName:function(a,b){return BI.findIndex(a,function(a,c){return c.i===b})},_setBlockPositionAndSize:function(a){this.block.element.css({left:a.left,top:a.top,width:a.width,height:a.height})},_getRegionsByLayout:function(a){var b=this,c={};return BI.each(a,function(a,d){c[d.i]=BI.extend(b._getBlockPositionAndSize(d),{id:d.i})}),c},_setRegionsByLayout:function(a,b){var c=this;return a||(a=this.regions),BI.each(b,function(b,d){a[d.i]&&BI.extend(a[d.i],c._getBlockPositionAndSize(d))}),a},_moveElement:function(a,b,c,d,e){function f(a,b){return BI.filter(a,function(a,c){return g._collides(c,b)})}var g=this;if(b._static)return a;if(b.y===d&&b.x===c)return a;var h=d&&b.y>d;"number"==typeof c&&(b.x=c),"number"==typeof d&&(b.y=d),b.moved=!0;var i=this._sortLayoutItemsByRowCol(a);h&&(i=i.reverse());for(var j=f(i,b),k=0,l=j.length;km.y&&b.y-m.y>m.h/4||(a=m._static?this._moveElementAwayFromCollision(a,m,b,e):this._moveElementAwayFromCollision(a,b,m,e))}return a},_sortLayoutItemsByRowCol:function(a){return[].concat(a).sort(function(a,b){return a.y>b.y||a.y===b.y&&a.x>b.x?1:-1})},_collides:function(a,b){return a!==b&&(!(a.x+a.w<=b.x)&&(!(a.x>=b.x+b.w)&&(!(a.y+a.h<=b.y)&&!(a.y>=b.y+b.h))))},_getFirstCollision:function(a,b){for(var c=0,d=a.length;c0&&!this._getFirstCollision(a,b);)b.y--;for(var d;d=this._getFirstCollision(a,b);)b.y=d.y+d.h;return b},compact:function(a,b){function c(a){return BI.filter(a,function(a,b){return b._static})}for(var d=c(a),e=this._sortLayoutItemsByRowCol(a),f=[],g=0,h=e.length;g0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,g);var k=g.parent.getChildIndex(g.id);g.parent.removeChildByIndex(k),g.parent.addChild(h,k),h.addChild(g),b[d].push(h),e[f]=h}else b[d].push(g)})}),b},_fill:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,h),g.addChild(h)}b[d].push(g)})}),b},_adjust:function(a){for(;;){var b=!1;if(BI.backEach(a,function(a,c){BI.each(c,function(a,c){if(!c.isNew){var d=!0;if(BI.any(c.getChildren(),function(a,b){if(!b.isNew)return d=!1,!0}),!c.isLeaf()&&d===!0){var e=[];BI.each(c.getChildren(),function(a,b){e=e.concat(b.getChildren())}),c.removeAllChilds(),BI.each(e,function(a,b){c.addChild(b)});var f=new BI.Node(BI.UUID());f.isNew=!0;var g=c.parent.getChildIndex(c.id);c.parent.removeChildByIndex(g),c.parent.addChild(f,g),f.addChild(c),b=!0}}})}),b===!1)break;a=this._stratification()}return a},_calculateWidth:function(){function a(b){var c=0;return b.isLeaf()?b.width:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),c)}function b(a){var c=0;return a.isLeaf()?a.height:(BI.each(a.getChildren(),function(a,d){c+=b(d)}),c)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_isVertical:function(){var a=this.options;return a.direction===BI.Direction.Top||a.direction===BI.Direction.Bottom},_calculateHeight:function(){function a(b){var c=0;return BI.each(b.getChildren(),function(b,d){c=Math.max(c,a(d))}),c+(b.height||0)}function b(a){var c=0;return BI.each(a.getChildren(),function(a,d){c=Math.max(c,b(d))}),c+(a.width||0)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_calculateXY:function(a){var b=(this.options,this._calculateWidth()),c=this._calculateHeight(),d=a.length,e=this._calculateLeaves(),f={},g=c/d;return BI.each(a,function(a,c){var d=[];BI.each(c,function(a,b){d[a]=(b.get("leaves")||1)/e}),BI.each(c,function(c,e){var h=BI.sum(d.slice(0,c)),i=h*b+d[c]*b/2,j=a*g+g/2;f[e.id]={x:i,y:j}})}),f},_stroke:function(a,b){var c=this._calculateHeight(),d=a.length,e=c/d,f=this,g=this.options;switch(g.direction){case BI.Direction.Top:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+h.x+","+(h.y+g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y+g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Bottom:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+h.x+","+(h.y-g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y-g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i), +f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Left:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+(h.y+g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y+g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Right:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+(h.y-g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y-g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})})}},_createBranches:function(a){var b=this.options;b.direction!==BI.Direction.Bottom&&b.direction!==BI.Direction.Right||(a=a.reverse());var c=this._calculateXY(a);this._stroke(a,c)},_isNeedAdjust:function(){var a=this.options;return a.direction===BI.Direction.Top&&a.align===BI.VerticalAlign.Bottom||a.direction===BI.Direction.Bottom&&a.align===BI.VerticalAlign.Top||a.direction===BI.Direction.Left&&a.align===BI.HorizontalAlign.Right||a.direction===BI.Direction.Right&&a.align===BI.HorizontalAlign.Left},setValue:function(a){},getValue:function(){},_transformToTreeFormat:function(a){var b,c;if(!a)return[];if(BI.isArray(a)){var d=[],e=[];for(b=0,c=a.length;b=c.options.min&&d<=c.options.max},f=function(a){return Date.parseDateTime(a,"%Y-%X").print("%Y-%X")==a&&d>=c.options.min&&d<=c.options.max};if(BI.isNotNull(b)&&Date.checkLegal(a))switch(a.length){case this._const.yearLength:e(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:f(a)&&this.editor.setValue(a+"-")}},setValue:function(a){var b,c,d=this,e=new Date;this.store_value=a,BI.isNotNull(a)&&(b=a.type||BI.DateTrigger.MULTI_DATE_CALENDAR,c=a.value,BI.isNull(c)&&(c=a));var f=function(a,b){var c=a.print("%Y-%x-%e");d.editor.setState(c),d.editor.setValue(c),d.setTitle(b+":"+c)};switch(b){case BI.DateTrigger.MULTI_DATE_YEAR_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV];e=new Date(e.getFullYear()-1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER];e=new Date(e.getFullYear()+1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN];e=new Date(e.getFullYear(),0,1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END];e=new Date(e.getFullYear(),11,31),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV];e=(new Date).getBeforeMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER];e=(new Date).getAfterMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN];e=(new Date).getQuarterStartDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END];e=(new Date).getQuarterEndDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV];e=(new Date).getBeforeMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER];e=(new Date).getAfterMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN];e=new Date(e.getFullYear(),e.getMonth(),1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END];e=new Date(e.getFullYear(),e.getMonth(),e.getLastDateOfMonth().getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV];e=e.getOffsetDate(-7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER];e=e.getOffsetDate(7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV];e=e.getOffsetDate(-1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER];e=e.getOffsetDate(1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_TODAY:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY];e=new Date,f(e,g);break;default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue(""),this.setTitle("");else{var h=c.year+"-"+(c.month+1)+"-"+c.day;this.editor.setState(h),this.editor.setValue(h),this.setTitle(h)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.store_value}}),BI.DateTrigger.MULTI_DATE_YEAR_PREV=1,BI.DateTrigger.MULTI_DATE_YEAR_AFTER=2,BI.DateTrigger.MULTI_DATE_YEAR_BEGIN=3,BI.DateTrigger.MULTI_DATE_YEAR_END=4,BI.DateTrigger.MULTI_DATE_MONTH_PREV=5,BI.DateTrigger.MULTI_DATE_MONTH_AFTER=6,BI.DateTrigger.MULTI_DATE_MONTH_BEGIN=7,BI.DateTrigger.MULTI_DATE_MONTH_END=8,BI.DateTrigger.MULTI_DATE_QUARTER_PREV=9,BI.DateTrigger.MULTI_DATE_QUARTER_AFTER=10,BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN=11,BI.DateTrigger.MULTI_DATE_QUARTER_END=12,BI.DateTrigger.MULTI_DATE_WEEK_PREV=13,BI.DateTrigger.MULTI_DATE_WEEK_AFTER=14,BI.DateTrigger.MULTI_DATE_DAY_PREV=15,BI.DateTrigger.MULTI_DATE_DAY_AFTER=16,BI.DateTrigger.MULTI_DATE_DAY_TODAY=17,BI.DateTrigger.MULTI_DATE_PARAM=18,BI.DateTrigger.MULTI_DATE_CALENDAR=19,BI.DateTrigger.MULTI_DATE_SEGMENT_NUM={},BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV]=BI.i18nText("BI-Multi_Date_Year_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER]=BI.i18nText("BI-Multi_Date_Year_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN]=BI.i18nText("BI-Multi_Date_Year_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END]=BI.i18nText("BI-Multi_Date_Year_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV]=BI.i18nText("BI-Multi_Date_Quarter_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER]=BI.i18nText("BI-Multi_Date_Quarter_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN]=BI.i18nText("BI-Multi_Date_Quarter_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END]=BI.i18nText("BI-Multi_Date_Quarter_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV]=BI.i18nText("BI-Multi_Date_Month_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER]=BI.i18nText("BI-Multi_Date_Month_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN]=BI.i18nText("BI-Multi_Date_Month_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END]=BI.i18nText("BI-Multi_Date_Month_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV]=BI.i18nText("BI-Multi_Date_Week_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER]=BI.i18nText("BI-Multi_Date_Week_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV]=BI.i18nText("BI-Multi_Date_Day_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER]=BI.i18nText("BI-Multi_Date_Day_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY]=BI.i18nText("BI-Multi_Date_Today"),BI.DateTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DateTrigger.EVENT_START="EVENT_START",BI.DateTrigger.EVENT_STOP="EVENT_STOP",BI.DateTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.DateTrigger.EVENT_VALID="EVENT_VALID",BI.DateTrigger.EVENT_ERROR="EVENT_ERROR",BI.DateTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DateTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.date_trigger",BI.DateTrigger),BI.DatePaneWidget=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePaneWidget.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-pane-widget",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.DatePaneWidget.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=new Date,this._year=this.today.getFullYear(),this._month=this.today.getMonth(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar=BI.createWidget({direction:"top",element:this,logic:{dynamic:!1},type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this)}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.calendar.empty(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=new Date;return{year:a.getFullYear(),month:a.getMonth()}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){this._setDatePicker(a),this._setCalendar(a)},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.date_pane_widget",BI.DatePaneWidget),BI.DateTimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:290,popupWidth:270,comboAdjustHeight:1,border:1,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-combo bi-border",height:24})},_init:function(){BI.DateTimeCombo.superclass._init.apply(this,arguments);var a=this,b=(this.options,new Date);this.storeValue={year:b.getFullYear(),month:b.getMonth(),day:b.getDate(),hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.popup=BI.createWidget({type:"bi.date_time_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),a.setValue(this.storeValue),this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE,function(){a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CANCEL)}),this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE,function(){a.storeValue=a.popup.getValue(),a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM)}),this.popup.on(BI.DateTimePopup.CALENDAR_EVENT_CHANGE,function(){a.trigger.setValue(a.popup.getValue()),a.fireEvent(BI.DateTimeCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,maxHeight:this.constants.popupHeight,width:this.constants.popupWidth,stopPropagation:!1}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW)});var c=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-trigger-date-button chart-date-normal-font bi-border-right",width:30,height:24});c.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.htape",element:this,items:[{type:"bi.absolute",items:[{el:this.combo,top:0,left:0,right:0,bottom:0},{el:c,top:0,left:0}]}]})},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a)},getValue:function(){return this.storeValue},hidePopupView:function(){this.combo.hideView()}}),BI.DateTimeCombo.EVENT_CANCEL="EVENT_CANCEL",BI.DateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW="BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.date_time_combo",BI.DateTimeCombo),BI.CustomDateTimeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomDateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-date-time-combo"})},_init:function(){BI.CustomDateTimeCombo.superclass._init.apply(this,arguments);var a=this;this.DateTime=BI.createWidget({type:"bi.date_time_combo",element:this}),this.DateTime.on(BI.DateTimeCombo.EVENT_CANCEL,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE),a.fireEvent(BI.CustomDateTimeCombo.EVENT_CANCEL)}),this.DateTime.on(BI.DateTimeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE),a.fireEvent(BI.CustomDateTimeCombo.EVENT_CONFIRM)}),this.DateTime.on(BI.DateTimeCombo.EVENT_CHANGE,function(){a.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE)})},getValue:function(){return this.DateTime.getValue()},setValue:function(a){this.DateTime.setValue(a)}}),BI.CustomDateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.CustomDateTimeCombo.EVENT_CANCEL="EVENT_CANCEL",BI.CustomDateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.custom_date_time_combo",BI.CustomDateTimeCombo),BI.DateTimePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-popup",width:268,height:290})},_init:function(){BI.DateTimePopup.superclass._init.apply(this,arguments);var a=this;this.options;this.cancelButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top bi-border-right",shadow:!0,text:BI.i18nText("BI-Basic_Cancel")}),this.cancelButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE)}),this.okButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK")}),this.okButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateCombo=BI.createWidget({type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}),this.dateSelect=BI.createWidget({type:"bi.horizontal",cls:"bi-border-top",items:[{type:"bi.label",text:BI.i18nText("BI-Basic_Time"),width:45},{type:"bi.date_time_select",max:23,min:0,width:60,height:30,ref:function(b){a.hour=b,a.hour.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,ref:function(b){a.minute=b,a.minute.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,ref:function(b){a.second=b,a.second.on(BI.DateTimeSelect.EVENT_CONFIRM,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)})}}]});var b=new Date;this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds()),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.cancelButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateCombo},{el:this.dateSelect,height:50},{el:this.dateButton,height:30}]})},setValue:function(a){var b,c=a;BI.isNull(c)?(b=new Date,this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds())):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.hour.setValue(c.hour),this.minute.setValue(c.minute),this.second.setValue(c.second))},getValue:function(){return{year:this.dateCombo.getValue().year,month:this.dateCombo.getValue().month,day:this.dateCombo.getValue().day,hour:this.hour.getValue(),minute:this.minute.getValue(),second:this.second.getValue()}}}),BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE="BUTTON_CANCEL_EVENT_CHANGE",BI.DateTimePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.date_time_popup",BI.DateTimePopup),BI.DateTimeSelect=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimeSelect.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-select bi-border",max:23,min:0})},_init:function(){BI.DateTimeSelect.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",value:this._alertInEditorValue(b.min),errorText:BI.i18nText("BI-Please_Input_Natural_Number"),validationChecker:function(a){return BI.isNaturalNumber(a)}}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a._finetuning(0),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",cls:"column-next-page-h-font bottom-button bi-border-left"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this._finetuning(0),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:30}]})},_alertOutEditorValue:function(a){return a>this.options.max&&(a=this.options.min),athis.options.max&&(a=this.options.min),a0&&a[c-1].xb)return!0});return c.y}var c=this,d=(this.options,this.pathChooser.routes),e=this.pathChooser.pathes,f=this.pathChooser.store;this.arrows={},BI.each(d,function(d,g){c.arrows[d]=[],BI.each(g,function(g,h){c.arrows[d][g]=[];var i=e[d][g];BI.each(i,function(a,b){if(a>0&&a0&&(e=c._drawOneArrow(i[a-1],3)):e=c._drawOneArrow(i[a],1)):b.x===i[a-1].x&&(e=b.y>i[a-1].y?f[BI.first(h)].direction===-1?c._drawOneArrow(i[a-1],0):c._drawOneArrow(b,2):f[h[h.length-2]].direction===-1?c._drawOneArrow(i[a-1],2):c._drawOneArrow(b,0)),e&&c.arrows[d][g].push(e)}}),BI.each(h,function(e,j){if(0!==e){var k,l=h[e-1];if(f[l].direction===-1){var m=c.pathChooser.getRegionIndexById(l),n=a(m,-1),o=b(i,n);k=c._drawOneArrow({x:n,y:o},3)}else{var m=c.pathChooser.getRegionIndexById(j),n=a(m),o=b(i,n);k=c._drawOneArrow({x:n,y:o},1)}k&&c.arrows[d][g].push(k)}})})})},_setValue:function(a,b){var c=this,d=this._const.lineColor,e=this._const.selectLineColor,f=this.pathChooser.routes,g=this.pathChooser.start,h=[a];g.contains(a)&&(h=g),BI.each(h,function(a,b){BI.each(c.arrows[b],function(a,b){BI.each(b,function(a,b){b.attr({fill:d,stroke:d}).toFront()})})}),BI.each(this.arrows[a][b],function(a,b){b.attr({fill:e,stroke:e}).toFront()});for(var i=BI.last(f[a][b]);i&&f[i]&&1===f[i].length;)BI.each(c.arrows[i][0],function(a,b){b.attr({fill:e,stroke:e}).toFront()}),i=BI.last(f[i][0])},setValue:function(a){this.pathChooser.setValue(a),this._unselectAllArrows();var b=this.pathChooser.routes,c=BI.keys(b),d=this,e=[],f=[];BI.each(a,function(a,b){BI.contains(c,b)&&f.length>0&&(f.push(b),e.push(f),f=[]),f.push(b)}),f.length>0&&e.push(f),BI.each(e,function(a,c){var e=c[0],f=BI.findIndex(b[e],function(a,b){if(BI.isEqual(c,b))return!0});f>=0&&d._setValue(e,f)})},getValue:function(){return this.pathChooser.getValue()},populate:function(a){this.pathChooser.populate(a),this._drawArrows()}}),BI.DirectionPathChooser.EVENT_CHANGE="DirectionPathChooser.EVENT_CHANGE",BI.shortcut("bi.direction_path_chooser",BI.DirectionPathChooser),BI.DownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-combo",invalid:!1,height:25,items:[],adjustLength:0,direction:"bottom",trigger:"click",el:{}})},_init:function(){BI.DownListCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.down_list_popup",items:b.items,chooseType:b.chooseType}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,adjustLength:b.adjustLength,direction:b.direction,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"pull-down-font",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:!0,maxHeight:1e3}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(){this.downlistcombo.showView()},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},getValue:function(){return this.popupview.getValue()}}),BI.DownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DownListCombo.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.DownListCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.down_list_combo",BI.DownListCombo),BI.DownListGroup=BI.inherit(BI.Widget,{constants:{iconCls:"check-mark-ha-font"},_defaultConfig:function(){return BI.extend(BI.DownListGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-group",items:[{el:{}}]})},_init:function(){BI.DownListGroup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.downlistgroup=BI.createWidget({element:this,type:"bi.button_tree",items:a.items,chooseType:0,layouts:[{type:"bi.vertical",hgap:0,vgap:0}]}),this.downlistgroup.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.DownListGroup.EVENT_CHANGE,arguments)})},getValue:function(){return this.downlistgroup.getValue()},setValue:function(a){this.downlistgroup.setValue(a)}}),BI.DownListGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group",BI.DownListGroup),BI.DownListItem=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.DownListItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-down-list-item bi-list-item-active",cls:"",height:25,logic:{dynamic:!0},selected:!1,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.DownListItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,height:b.height,text:b.text,value:b.value,logic:b.logic,selected:b.selected,disabled:b.disabled,iconHeight:b.iconHeight,iconWidth:b.iconWidth,textHgap:b.textHgap,textVgap:b.textVgap,textLgap:b.textLgap,textRgap:b.textRgap,father:b.father}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.IconTextItem.EVENT_CHANGE,function(){a.fireEvent(BI.DownListItem.EVENT_CHANGE)})},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()}}),BI.DownListItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_item",BI.DownListItem),BI.DownListGroupItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListGroupItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-down-list-group-item",logic:{dynamic:!1},iconCls1:"dot-e-font",iconCls2:"pull-right-e-font"})},_init:function(){BI.DownListGroupItem.superclass._init.apply(this,arguments);var a=this.options,b=this;this.text=BI.createWidget({type:"bi.label",cls:"list-group-item-text",textAlign:"left",text:a.text,value:a.value,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,width:25,forceNotSelected:!0}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,width:25,forceNotSelected:!0});var c=BI.createWidget({type:"bi.layout",width:25});BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.icon2,top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon1,this.text,c)})))),this.element.hover(function(){b.isEnabled()&&b.hover()},function(){b.isEnabled()&&b.dishover()})},hover:function(){BI.DownListGroupItem.superclass.hover.apply(this,arguments),this.icon1.element.addClass("hover"),this.icon2.element.addClass("hover")},dishover:function(){BI.DownListGroupItem.superclass.dishover.apply(this,arguments),this.icon1.element.removeClass("hover"),this.icon2.element.removeClass("hover")},doClick:function(){BI.DownListGroupItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.DownListGroupItem.EVENT_CHANGE,this.getValue())},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},setValue:function(a){var b=this,c=this.options;a=BI.isArray(a)?a:[a],BI.find(a,function(a,d){return BI.contains(c.childValues,d)?(b.icon1.setSelected(!0),!0):void b.icon1.setSelected(!1)})}}),BI.DownListGroupItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group_item",BI.DownListGroupItem),BI.DownListPopup=BI.inherit(BI.Pane,{constants:{nextIcon:"pull-right-e-font",height:25,iconHeight:12,iconWidth:12,hgap:0,vgap:0,border:1},_defaultConfig:function(){var a=BI.DownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-down-list-popup",items:[],chooseType:BI.Selection.Multi})},_init:function(){BI.DownListPopup.superclass._init.apply(this,arguments),this.singleValues=[],this.childValueMap={},this.fatherValueMap={};var a=this,b=this.options,c=this._createChildren(b.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])?(d=a.childValueMap[b],a.fireEvent(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,d,a.fatherValueMap[b])):a.fireEvent(BI.DownListPopup.EVENT_CHANGE,d,c),!a.singleValues.contains(d)){var e=a.getValue(),f=[];BI.each(e,function(a,b){b.value!=d&&f.push(b)}),a.setValue(f)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},_createChildren:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:4,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}},c.el.childValues=[],BI.each(c.children,function(a,d){var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value)})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=BI.createWidget({type:"bi.vertical",items:[{el:{type:"bi.layout",cls:"bi-down-list-spliter bi-border-top cursor-pointer",height:0}}],cls:"bi-down-list-spliter-container cursor-pointer",lgap:10,rgap:10});c.push(g)}}),c},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a0?b.type="bi.file_manager_folder_item":b.type="bi.file_manager_file_item"}),a},setValue:function(a){this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getAllButtons:function(){return this.button_group.getAllButtons()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},populate:function(a){this.button_group.populate(this._formatItems(a))}}),BI.FileManagerButtonGroup.EVENT_CHANGE="FileManagerButtonGroup.EVENT_CHANGE",BI.shortcut("bi.file_manager_button_group",BI.FileManagerButtonGroup),BI.FileManager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager",el:{},items:[]})},_init:function(){BI.FileManager.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree;var c=BI.Tree.transformToTreeFormat(b.items);this.tree.initTree(c),this.selectedValues=[],this.nav=BI.createWidget({type:"bi.file_manager_nav",items:BI.deepClone(c)}),this.nav.on(BI.FileManagerNav.EVENT_CHANGE,function(b,c){if("-1"==b)a.populate({children:a.tree.toJSON()});else{var d=a.tree.search(c.attr("id"));a.populate(BI.extend({id:d.id},d.get("data"),{children:a.tree.toJSON(d)}))}a.setValue(a.selectedValues)}),this.list=BI.createWidget(b.el,{type:"bi.file_manager_list",items:c}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){if(b===BI.Events.CHANGE){var e=a.tree.search(d.attr("id"));a.populate(BI.extend({id:e.id},e.get("data"),{children:a.tree.toJSON(e)}))}else if(b===BI.Events.CLICK){var f=[];if(d instanceof BI.MultiSelectBar){var g=a.list.getValue();c=g.type===BI.Selection.All,f=BI.concat(g.assist,g.value)}else f=d.getAllLeaves();BI.each(f,function(b,d){c===!0?a.selectedValues.pushDistinct(d):a.selectedValues.remove(d)})}a.setValue(a.selectedValues)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.list,left:0,right:0,top:0,bottom:10},{el:this.nav,left:40,right:100,top:0}]})},setValue:function(a){this.selectedValues=a||[],this.list.setValue(this.selectedValues)},getValue:function(){var a=this.list.getValue(),b=a.type===BI.Selection.All?a.assist:a.value;return b.pushDistinctArray(this.selectedValues),b},_populate:function(a){this.list.populate(a)},getSelectedValue:function(){return this.nav.getValue()[0]},getSelectedId:function(){return this.nav.getId()[0]},populate:function(a){var b=BI.deepClone(a);this._populate(a.children),this.nav.populate(b)}}),BI.FileManager.EVENT_CHANGE="FileManager.EVENT_CHANGE",BI.shortcut("bi.file_manager",BI.FileManager),BI.FileManagerFileItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.FileManagerFileItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-file-item bi-list-item bi-border-bottom",height:30})},_init:function(){BI.FileManagerFileItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checked=BI.createWidget({type:"bi.multi_select_bar",text:"",width:36,height:b.height}),this.checked.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.checked,width:36},{el:{type:"bi.icon_button",cls:"create-by-me-file-font"},width:20},{el:{type:"bi.label",textAlign:"left",height:b.height,text:b.text,value:b.value}}]})},getAllLeaves:function(){return[this.options.value]},isSelected:function(){return this.checked.isSelected()},setSelected:function(a){this.checked.setSelected(a)}}),BI.FileManagerFileItem.EVENT_CHANGE="FileManagerFileItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_file_item",BI.FileManagerFileItem),BI.FileManagerFolderItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.FileManagerFolderItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-folder-item bi-list-item bi-border-bottom",height:30})},_init:function(){BI.FileManagerFolderItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checked=BI.createWidget({type:"bi.multi_select_bar",text:"",width:36,height:b.height}),this.checked.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button=BI.createWidget({type:"bi.text_button",textAlign:"left",height:b.height,text:b.text,value:b.value}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CHANGE,b.value,a)}),this.tree=new BI.Tree,this.tree.initTree([{id:b.id,children:b.children}]),this.selectValue=[],BI.createWidget({type:"bi.htape",element:this,items:[{el:this.checked,width:36},{el:{type:"bi.icon_button",cls:"create-by-me-folder-font"},width:20},{el:this.button}]})},setAllSelected:function(a){this.checked.setSelected(a),this.selectValue=[]},setHalfSelected:function(a){this.checked.setHalfSelected(a),a||(this.selectValue=[])},setValue:function(a){var b=(this.options,!1),c=[];this.tree.traverse(function(d){d.isLeaf()&&(BI.contains(a,d.get("data").value)?c.push(d.get("data").value):b=!0)}),this.setAllSelected(c.length>0&&!b),this.setHalfSelected(c.length>0&&b),this.checked.isHalfSelected()&&(this.selectValue=c)},getAllButtons:function(){return[this]},getAllLeaves:function(){var a=(this.options,[]);return this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a},getNotSelectedValue:function(){var a=this,b=(this.options,[]),c=this.checked.isSelected();if(c===!0)return b;var d=this.checked.isHalfSelected();return this.tree.traverse(function(c){if(c.isLeaf()){var e=c.get("data").value;d===!0?BI.contains(a.selectValue,c.get("data").value)||b.push(e):b.push(e)}}),b},getValue:function(){var a=[];return this.checked.isSelected()?(this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a):this.checked.isHalfSelected()?this.selectValue:[]}}),BI.FileManagerFolderItem.EVENT_CHANGE="FileManagerFolderItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_folder_item",BI.FileManagerFolderItem),BI.FileManagerList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-list",el:{},items:[]})},_init:function(){BI.FileManagerList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget({type:"bi.select_list",element:this,items:b.items,toolbar:{type:"bi.multi_select_bar",height:40,text:""},el:{type:"bi.list_pane",el:BI.isWidget(b.el)?b.el:BI.extend({type:"bi.file_manager_button_group"},b.el)}}),this.list.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.list.setValue({value:a})},getValue:function(){return this.list.getValue()},populate:function(a){this.list.populate(a),this.list.setToolBarVisible(!0)}}),BI.FileManagerList.EVENT_CHANGE="FileManagerList.EVENT_CHANGE",BI.shortcut("bi.file_manager_list",BI.FileManagerList),BI.FileManagerNavButton=BI.inherit(BI.Widget,{_const:{normal_color:"#ffffff",select_color:"#eff1f4"},_defaultConfig:function(){return BI.extend(BI.FileManagerNavButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav-button",selected:!1,height:40})},_init:function(){BI.FileManagerNavButton.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.button=BI.createWidget({type:"bi.text_button",cls:"file-manager-nav-button-text bi-card",once:!0,selected:b.selected,text:b.text,title:b.text,value:b.value,height:b.height,lgap:20,rgap:10}),this.button.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var d=BI.createWidget({type:"bi.svg",cls:"file-manager-nav-button-triangle",width:15,height:b.height}),e=d.path("M0,0L15,20L0,40").attr({stroke:c.select_color,fill:b.selected?c.select_color:c.normal_color});this.button.on(BI.TextButton.EVENT_CHANGE,function(){this.isSelected()?e.attr("fill",c.select_color):e.attr("fill",c.normal_color)}),BI.createWidget({type:"bi.default",element:this,items:[this.button]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:d,right:-15,top:0,bottom:0}]})},isSelected:function(){return this.button.isSelected()},setValue:function(a){this.button.setValue(a)},getValue:function(){return this.button.getValue()},populate:function(a){}}),BI.FileManagerNavButton.EVENT_CHANGE="FileManagerNavButton.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav_button",BI.FileManagerNavButton),BI.FileManagerNav=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerNav.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav bi-border-left",height:40,items:[]})},_init:function(){BI.FileManagerNav.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree,this.refreshTreeData(b.items),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME}),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:[{type:"bi.file_manager_nav_button",text:BI.i18nText("BI-Created_By_Me"),selected:!0,id:BI.FileManagerNav.ROOT_CREATE_BY_ME,value:BI.FileManagerNav.ROOT_CREATE_BY_ME}],layouts:[{type:"bi.horizontal"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.FileManagerNav.EVENT_CHANGE,arguments)})},_getAllParents:function(a){var b,c=[];for(b=a?this.tree.search(a):this.tree.getRoot();b.parent;)c.push(b),b=b.parent;return c.push(b),c.reverse()},_formatNodes:function(a){var b=[];return BI.each(a,function(a,c){b.push(BI.extend({type:"bi.file_manager_nav_button",id:c.id},c.get("data")))}),BI.last(b).selected=!0,b},getValue:function(){return this.button_group.getValue()},getId:function(){var a=[];return BI.each(this.button_group.getSelectedButtons(),function(b,c){a.push(c.attr("id"))}),a},refreshTreeData:function(a){this.tree.initTree(BI.Tree.transformToTreeFormat(a)),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME})},populate:function(a){var b=BI.isNull(a)?[this.tree.getRoot()]:this._getAllParents(a.id);this.button_group.populate(this._formatNodes(b))}}),BI.extend(BI.FileManagerNav,{ROOT_CREATE_BY_ME:"-1"}),BI.FileManagerNav.EVENT_CHANGE="FileManagerNav.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav",BI.FileManagerNav),BI.FineTuningNumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FineTuningNumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-fine-tuning-number-editor bi-border",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,errorText:"",step:1})},_init:function(){BI.FineTuningNumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=this.getValue(),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-next-page-h-font bottom-button bi-border-left bi-border-top"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE),a.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(b.add(a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setBottomEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.FineTuningNumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.FineTuningNumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.fine_tuning_number_editor",BI.FineTuningNumberEditor),BI.InteractiveArrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.InteractiveArrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-interactive-arrangement",resizable:!0,layoutType:BI.Arrangement.LAYOUT_TYPE.GRID,items:[]})},_init:function(){BI.InteractiveArrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.adaptive_arrangement",element:this,resizable:b.resizable,layoutType:b.layoutType,items:b.items}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_SCROLL,function(){a.fireEvent(BI.InteractiveArrangement.EVENT_SCROLL,arguments); +}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_RESIZE,function(){a.fireEvent(BI.InteractiveArrangement.EVENT_RESIZE,arguments)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE,function(b,c){var d=a._getRegionClientPosition(b);a.draw({left:d.left,top:d.top},c,b)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE,function(b,c){a.stopDraw(),a.setRegionSize(b,c)}),this.tags=[]},_isEqual:function(a,b){return this.arrangement._isEqual(a,b)},_getScrollOffset:function(){return this.arrangement._getScrollOffset()},_positionAt:function(a,b){var c=this;b=b||this.getAllRegions();var d=[],e=[],f=[],g=[],h=[],i=[];return BI.each(b,function(b,j){var k=c._getRegionClientPosition(j.id);Math.abs(k.left-a.left)<=3&&d.push(j),Math.abs(k.left+k.width/2-a.left)<=3&&e.push(j),Math.abs(k.left+k.width-a.left)<=3&&f.push(j),Math.abs(k.top-a.top)<=3&&g.push(j),Math.abs(k.top+k.height/2-a.top)<=3&&h.push(j),Math.abs(k.top+k.height-a.top)<=3&&i.push(j)}),{left:d,center:e,right:f,top:g,middle:h,bottom:i}},_getRegionClientPosition:function(a){var b=this.getRegionByName(a),c=this.arrangement._getScrollOffset();return{top:b.top-c.top,left:b.left-c.left,width:b.width,height:b.height,id:b.id}},_vAlign:function(a,b){var c,d=this,e=this._positionAt(a,b),f=[];if(e.left.length>0)c=this._getRegionClientPosition(e.left[0].id).left;else if(e.right.length>0){var g=this._getRegionClientPosition(e.right[0].id);c=g.left+g.width}var h=e.left.concat(e.right);return BI.each(h,function(b,e){var g=d._getRegionClientPosition(e.id);if(d._isEqual(g.left,c)||d._isEqual(g.left+g.width,c)){var h={top:g.top+g.height/2,left:c};f.push({id:e.id,start:h,end:{left:c,top:a.top}})}}),f},_leftAlign:function(a,b,c){return this._vAlign({left:a.left,top:a.top+b.height/2},c)},_rightAlign:function(a,b,c){return this._vAlign({left:a.left+b.width,top:a.top+b.height/2},c)},_hAlign:function(a,b){var c,d=this,e=this._positionAt(a,b),f=[];if(e.top.length>0){var g=this._getRegionClientPosition(e.top[0].id);c=g.top}else if(e.bottom.length>0){var g=this._getRegionClientPosition(e.bottom[0].id);c=g.top+g.height}var h=e.top.concat(e.bottom);return BI.each(h,function(b,e){var g=d._getRegionClientPosition(e.id);if(d._isEqual(g.top,c)||d._isEqual(g.top+g.height,c)){var h={top:c,left:g.left+g.width/2};f.push({id:g.id,start:h,end:{left:a.left,top:c}})}}),f},_topAlign:function(a,b,c){return this._hAlign({left:a.left+b.width/2,top:a.top},c)},_bottomAlign:function(a,b,c){return this._hAlign({left:a.left+b.width/2,top:a.top+b.height},c)},_centerAlign:function(a,b,c){var d,e=this,f=this._positionAt({left:a.left+b.width/2,top:a.top+b.height/2},c),g=[];if(f.center.length>0){var h=this._getRegionClientPosition(f.center[0].id);d=h.left+h.width/2}return BI.each(f.center,function(c,f){var h=e._getRegionClientPosition(f.id);if(e._isEqual(h.left+h.width/2,d)){var i={top:h.top+h.height/2,left:h.left+h.width/2};g.push({id:h.id,start:i,end:{left:d,top:a.top+b.height/2}})}}),g},_middleAlign:function(a,b,c){var d,e=this,f=this._positionAt({left:a.left+b.width/2,top:a.top+b.height/2},c),g=[];if(f.middle.length>0){var h=this._getRegionClientPosition(f.middle[0].id);d=h.top+h.height/2}return BI.each(f.middle,function(c,f){var h=e._getRegionClientPosition(f.id);if(e._isEqual(h.top+h.height/2,d)){var i={top:h.top+h.height/2,left:h.left+h.width/2};g.push({id:h.id,start:i,end:{left:a.left+b.width/2,top:d}})}}),g},_drawOneTag:function(a,b){var c=BI.createWidget({type:"bi.icon_button",width:13,height:13,cls:"drag-tag-font interactive-arrangement-dragtag-icon"}),d=BI.createWidget({type:"bi.icon_button",width:13,height:13,cls:"drag-tag-font interactive-arrangement-dragtag-icon"});if(this._isEqual(a.left,b.left))var e=BI.createWidget({type:"bi.layout",cls:"interactive-arrangement-dragtag-line",width:1,height:Math.abs(a.top-b.top)});else var e=BI.createWidget({type:"bi.layout",cls:"interactive-arrangement-dragtag-line",height:1,width:Math.abs(a.left-b.left)});BI.createWidget({type:"bi.absolute",element:this,items:[{el:c,left:a.left-6,top:a.top-7},{el:d,left:b.left-6,top:b.top-7},{el:e,left:Math.min(a.left,b.left),top:Math.min(a.top,b.top)}]}),this.tags.push(c),this.tags.push(d),this.tags.push(e)},stopDraw:function(){BI.each(this.tags,function(a,b){b.destroy()}),this.tags=[]},_getRegionExcept:function(a,b){var c=[];return BI.each(b||this.getAllRegions(),function(b,d){a&&d.id===a||c.push(d)}),c},getClientWidth:function(){return this.arrangement.getClientWidth()},getClientHeight:function(){return this.arrangement.getClientHeight()},getPosition:function(a,b,c){var d,e=this.getAllRegions();a&&(d=this._getRegionClientPosition(a));var f=this._getRegionExcept(a,e);b=b||{left:d.left,top:d.top},c=c||{width:d.width,height:d.height};var g=this._leftAlign(b,c,f),h=this._rightAlign(b,c,f),i=this._topAlign(b,c,f,f),j=this._bottomAlign(b,c,f),k=this._centerAlign(b,c,f),l=this._middleAlign(b,c,f);return BI.each(k,function(a,d){b.left=d.end.left-c.width/2}),BI.each(h,function(a,d){b.left=d.end.left-c.width}),BI.each(g,function(a,c){b.left=c.end.left}),BI.each(l,function(a,d){b.top=d.end.top-c.height/2}),BI.each(j,function(a,d){b.top=d.end.top-c.height}),BI.each(i,function(a,c){b.top=c.end.top}),b},getSize:function(a,b,c){var d,e=this.getAllRegions();a&&(d=this._getRegionClientPosition(a));var f=this._getRegionExcept(a,e);b=b||{left:d.left,top:d.top},c=c||{width:d.width,height:d.height};var g=this._leftAlign(b,c,f),h=this._rightAlign(b,c,f),i=this._topAlign(b,c,f,f),j=this._bottomAlign(b,c,f),k=this._centerAlign(b,c,f),l=this._middleAlign(b,c,f);return BI.each(k,function(a,d){c.width=2*(d.end.left-b.left)}),BI.each(h,function(a,d){c.width=d.end.left-b.left}),BI.each(g,function(a,b){}),BI.each(l,function(a,d){c.height=2*(d.end.top-b.top)}),BI.each(j,function(a,d){c.height=d.end.top-b.top}),BI.each(i,function(a,b){}),c},draw:function(a,b,c){var d=this;switch(this.stopDraw(),this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:var e=this._getRegionExcept(c),f=this._leftAlign(a,b,e),g=this._rightAlign(a,b,e),h=this._topAlign(a,b,e),i=this._bottomAlign(a,b,e),j=this._centerAlign(a,b,e),k=this._middleAlign(a,b,e);BI.each(j,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(g,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(f,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(k,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(i,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(h,function(a,b){d._drawOneTag(b.start,b.end)});break;case BI.Arrangement.LAYOUT_TYPE.GRID:}},addRegion:function(a,b){return this.stopDraw(),this.arrangement.addRegion(a,b)},deleteRegion:function(a){return this.arrangement.deleteRegion(a)},setRegionSize:function(a,b){return b=this.getSize(a,null,b),this.arrangement.setRegionSize(a,b)},setPosition:function(a,b){if(this.stopDraw(),a.left>0&&a.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:a=this.getPosition(null,a,b),this.draw(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}var c=this.arrangement.setPosition(a,b);return c},setRegionPosition:function(a,b){if(b.left>0&&b.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:b=this.getPosition(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}return this.arrangement.setRegionPosition(a,b)},setDropPosition:function(a,b){var c=this;if(this.stopDraw(),a.left>0&&a.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:a=this.getPosition(null,a,b),this.draw(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}var d=c.arrangement.setDropPosition(a,b);return function(){d(),c.stopDraw()}},scrollInterval:function(){this.arrangement.scrollInterval.apply(this.arrangement,arguments)},scrollEnd:function(){this.arrangement.scrollEnd.apply(this.arrangement,arguments)},scrollTo:function(a){this.arrangement.scrollTo(a)},zoom:function(a){this.arrangement.zoom(a)},resize:function(){return this.arrangement.resize()},relayout:function(){return this.arrangement.relayout()},setLayoutType:function(a){this.arrangement.setLayoutType(a)},getLayoutType:function(){return this.arrangement.getLayoutType()},getLayoutRatio:function(){return this.arrangement.getLayoutRatio()},getHelper:function(){return this.arrangement.getHelper()},getRegionByName:function(a){return this.arrangement.getRegionByName(a)},getAllRegions:function(){return this.arrangement.getAllRegions()},revoke:function(){return this.arrangement.revoke()},populate:function(a){this.arrangement.populate(a)}}),BI.InteractiveArrangement.EVENT_RESIZE="InteractiveArrangement.EVENT_RESIZE",BI.InteractiveArrangement.EVENT_SCROLL="InteractiveArrangement.EVENT_SCROLL",BI.shortcut("bi.interactive_arrangement",BI.InteractiveArrangement),BI.MonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",behaviors:{},height:25})},_init:function(){BI.MonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.month_trigger"}),this.trigger.on(BI.MonthTrigger.EVENT_CONFIRM,function(b){this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getValue()):this.getKey()||a.setValue(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM)}),this.trigger.on(BI.MonthTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.MonthTrigger.EVENT_START,function(){a.combo.hideView()}),this.trigger.on(BI.MonthTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.MonthTrigger.EVENT_CHANGE,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors}),this.popup.on(BI.MonthPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.month_combo",BI.MonthCombo),BI.MonthPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-popup",behaviors:{}})},_init:function(){BI.MonthPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[0,6,1,7,2,8,3,9,4,10,5,11],d=[];d.push(c.slice(0,2)),d.push(c.slice(2,4)),d.push(c.slice(4,6)),d.push(c.slice(6,8)),d.push(c.slice(8,10)),d.push(c.slice(10,12)),d=BI.map(d,function(a,b){return BI.map(b,function(a,b){return{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:23,width:38,value:b,text:b+1}})}),this.month=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(d,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({dynamic:!0},{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1,hgap:2}]}),this.month.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.month.getValue()[0]},setValue:function(a){this.month.setValue([a])}}),BI.MonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_popup",BI.MonthPopup),BI.MonthTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:25,errorText:BI.i18nText("BI-Month_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.MonthTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-month-trigger bi-border",height:25})},_init:function(){BI.MonthTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=12},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.MonthTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.MonthTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.MonthTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.MonthTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.MonthTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),baseCls:"bi-trigger-month-text",width:c.triggerWidth},width:c.triggerWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){return BI.isNotNull(a)?(this.editor.setState(a+1),this.editor.setValue(a+1),void this.editor.setTitle(a+1)):(this.editor.setState(),this.editor.setValue(),void this.editor.setTitle())},getKey:function(){return 0|this.editor.getValue()},getValue:function(){return this.editor.getValue()-1}}),BI.MonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthTrigger.EVENT_START="EVENT_START",BI.MonthTrigger.EVENT_STOP="EVENT_STOP",BI.MonthTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_trigger",BI.MonthTrigger),BI.MultiDateCard=BI.inherit(BI.Widget,{constants:{lgap:80,itemHeight:35,defaultEditorValue:"1"},_defaultConfig:function(){return $.extend(BI.MultiDateCard.superclass._defaultConfig.apply(this,arguments),{})},dateConfig:function(){},defaultSelectedItem:function(){},_init:function(){BI.MultiDateCard.superclass._init.apply(this,arguments);var a=this;this.options;this.label=BI.createWidget({type:"bi.label",height:this.constants.itemHeight,textAlign:"left",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),cls:"bi-multidate-inner-label bi-tips"}),this.radioGroup=BI.createWidget({type:"bi.button_group",chooseType:0,items:BI.createItems(this.dateConfig(),{type:"bi.multidate_segment",height:this.constants.itemHeight}),layouts:[{type:"bi.vertical"}]}),this.radioGroup.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CONFIRM&&a.fireEvent(BI.MultiDateCard.EVENT_CHANGE)}),this.radioGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.setValue(a.getValue()),a.fireEvent(BI.MultiDateCard.EVENT_CHANGE)}),BI.createWidget({element:this,type:"bi.center_adapt",lgap:this.constants.lgap,items:[{type:"bi.vertical",items:[this.label,this.radioGroup]}]})},getValue:function(){var a=this.radioGroup.getSelectedButtons()[0],b=a.getValue(),c=a.getInputValue();return{type:b,value:c}},_isTypeAvaliable:function(a){var b=!1;return BI.find(this.dateConfig(),function(c,d){if(d.value===a)return b=!0,!0}),b},setValue:function(a){var b=this;BI.isNotNull(a)&&this._isTypeAvaliable(a.type)?(this.radioGroup.setValue(a.type),BI.each(this.radioGroup.getAllButtons(),function(c,d){d.isEditorExist()===!0&&d.isSelected()?d.setInputValue(a.value):d.setInputValue(b.constants.defaultEditorValue)})):(this.radioGroup.setValue(this.defaultSelectedItem()),BI.each(this.radioGroup.getAllButtons(),function(a,c){c.setInputValue(b.constants.defaultEditorValue)}))},getCalculationValue:function(){var a=this.getValue(),b=a.type,c=a.value;switch(b){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:return(new Date).getOffsetDate(-1*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:return(new Date).getOffsetDate(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:return new Date;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:return(new Date).getBeforeMultiMonth(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:return(new Date).getAfterMultiMonth(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:return new Date((new Date).getFullYear(),(new Date).getMonth(),1);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:return new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getLastDateOfMonth().getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:return(new Date).getBeforeMulQuarter(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:return(new Date).getAfterMulQuarter(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:return(new Date).getQuarterStartDate();case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:return(new Date).getQuarterEndDate();case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:return(new Date).getOffsetDate(-7*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:return(new Date).getOffsetDate(7*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:return new Date((new Date).getFullYear()-1*c,(new Date).getMonth(),(new Date).getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:return new Date((new Date).getFullYear()+1*c,(new Date).getMonth(),(new Date).getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:return new Date((new Date).getFullYear(),0,1);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:return new Date((new Date).getFullYear(),11,31)}}}),BI.MultiDateCard.EVENT_CHANGE="EVENT_CHANGE",BI.MultiDateCombo=BI.inherit(BI.Single,{constants:{popupHeight:259,popupWidth:270,comboAdjustHeight:1,border:1,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){return BI.extend(BI.MultiDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-combo bi-border",height:24})},_init:function(){BI.MultiDateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.storeTriggerValue="";var b=new Date;this.storeValue=null,this.trigger=BI.createWidget({type:"bi.date_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.trigger.on(BI.DateTrigger.EVENT_KEY_DOWN,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DateTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.DateTrigger.EVENT_TRIGGER_CLICK,function(){a.combo.toggle()}),this.trigger.on(BI.DateTrigger.EVENT_FOCUS,function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.MultiDateCombo.EVENT_FOCUS)}),this.trigger.on(BI.DateTrigger.EVENT_ERROR,function(){a.storeValue={year:b.getFullYear(),month:b.getMonth()},a.popup.setValue(),a.fireEvent(BI.MultiDateCombo.EVENT_ERROR)}),this.trigger.on(BI.DateTrigger.EVENT_VALID,function(){a.fireEvent(BI.MultiDateCombo.EVENT_VALID)}),this.trigger.on(BI.DateTrigger.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDateCombo.EVENT_CHANGE)}),this.trigger.on(BI.DateTrigger.EVENT_CONFIRM,function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}}),this.popup=BI.createWidget({type:"bi.multidate_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.popup.on(BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE,function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE,function(){var b=new Date;a.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.CALENDAR_EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,maxHeight:this.constants.popupHeight,width:this.constants.popupWidth,stopPropagation:!1}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW)});var c=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-trigger-date-button chart-date-normal-font",width:30,height:23});c.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),this.changeIcon=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-date-change widget-date-h-change-font",width:30,height:23});var d=BI.createWidget({type:"bi.absolute",items:[{el:this.combo,top:0,left:0,right:0,bottom:0},{el:c,top:0,left:0}]});BI.createWidget({type:"bi.htape",element:this,items:[d,{el:this.changeIcon,width:30}],ref:function(b){a.comboWrapper=b}})},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[1].width=30,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[1].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.shortcut("bi.multidate_combo",BI.MultiDateCombo),BI.MultiDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MultiDateCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.MultiDateCombo.EVENT_VALID="EVENT_VALID",BI.MultiDateCombo.EVENT_ERROR="EVENT_ERROR",BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW="BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW",BI.extend(BI.MultiDateCombo,{MULTI_DATE_YMD_CARD:1,MULTI_DATE_YEAR_CARD:2,MULTI_DATE_QUARTER_CARD:3,MULTI_DATE_MONTH_CARD:4,MULTI_DATE_WEEK_CARD:5,MULTI_DATE_DAY_CARD:6}),BI.extend(BI.MultiDateCombo,{DATE_TYPE:{MULTI_DATE_YEAR_PREV:1,MULTI_DATE_YEAR_AFTER:2,MULTI_DATE_YEAR_BEGIN:3,MULTI_DATE_YEAR_END:4,MULTI_DATE_MONTH_PREV:5,MULTI_DATE_MONTH_AFTER:6,MULTI_DATE_MONTH_BEGIN:7,MULTI_DATE_MONTH_END:8,MULTI_DATE_QUARTER_PREV:9,MULTI_DATE_QUARTER_AFTER:10,MULTI_DATE_QUARTER_BEGIN:11,MULTI_DATE_QUARTER_END:12,MULTI_DATE_WEEK_PREV:13,MULTI_DATE_WEEK_AFTER:14,MULTI_DATE_DAY_PREV:15,MULTI_DATE_DAY_AFTER:16,MULTI_DATE_DAY_TODAY:17,MULTI_DATE_PARAM:18,MULTI_DATE_CALENDAR:19,YEAR_QUARTER:20,YEAR_MONTH:21,YEAR_WEEK:22,YEAR_DAY:23,MONTH_WEEK:24,MONTH_DAY:25,YEAR:26,SAME_PERIOD:27,LAST_SAME_PERIOD:28}}),BI.DayCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.DayCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-daycard"})},_init:function(){BI.DayCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{isEditorExist:!0,selected:!0,text:BI.i18nText("BI-Multi_Date_Day_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Day_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY,text:BI.i18nText("BI-Multi_Date_Today")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV}}),BI.DayCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.daycard",BI.DayCard),BI.MonthCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.MonthCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-monthcard"})},_init:function(){BI.MonthCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV,text:BI.i18nText("BI-Multi_Date_Month_Prev")},{isEditorExist:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER,text:BI.i18nText("BI-Multi_Date_Month_Next")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Month_Begin")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Month_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV}}),BI.MonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.monthcard",BI.MonthCard),BI.MultiDatePopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,tabWidth:42,titleHeight:27,itemHeight:30,triggerHeight:24,buttonWidth:90,buttonHeight:25,cardHeight:229,cardWidth:270,popupHeight:259,popupWidth:270,comboAdjustHeight:1,ymdWidth:58,lgap:2,border:1},_defaultConfig:function(){return BI.extend(BI.MultiDatePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-popup",width:268,height:260})},_init:function(){BI.MultiDatePopup.superclass._init.apply(this,arguments);var a=this;this.options;this.storeValue="",this.textButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-label bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Multi_Date_Today")}),this.textButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE)}),this.clearButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Clear")}),this.clearButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE)}),this.okButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK")}),this.okButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateTab=BI.createWidget({type:"bi.tab",tab:{cls:"bi-multidate-popup-tab bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.MultiDateCombo.MULTI_DATE_YMD_CARD,width:this.constants.ymdWidth},{text:BI.i18nText("BI-Multi_Date_Year"),value:BI.MultiDateCombo.MULTI_DATE_YEAR_CARD},{text:BI.i18nText("BI-Multi_Date_Quarter"),value:BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD},{text:BI.i18nText("BI-Multi_Date_Month"),value:BI.MultiDateCombo.MULTI_DATE_MONTH_CARD},{text:BI.i18nText("BI-Multi_Date_Week"),value:BI.MultiDateCombo.MULTI_DATE_WEEK_CARD},{text:BI.i18nText("BI-Multi_Date_Day"),value:BI.MultiDateCombo.MULTI_DATE_DAY_CARD}],{width:this.constants.tabWidth,textAlign:"center",height:this.constants.itemHeight,cls:"bi-multidate-popup-item bi-list-item-active"}),layouts:[{type:"bi.left"}]},cardCreator:function(b){switch(b){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:return a.ymd=BI.createWidget({type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max}),a.ymd.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.CALENDAR_EVENT_CHANGE)}),a.ymd;case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:return a.year=BI.createWidget({type:"bi.yearcard"}),a.year.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.year,b)}),a.year;case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:return a.quarter=BI.createWidget({type:"bi.quartercard"}),a.quarter.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.quarter,b)}),a.quarter;case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:return a.month=BI.createWidget({type:"bi.monthcard"}),a.month.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.month,b)}),a.month;case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:return a.week=BI.createWidget({type:"bi.weekcard"}),a.week.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.week,b)}),a.week;case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:return a.day=BI.createWidget({type:"bi.daycard"}),a.day.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.day,b)}),a.day}}}),this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_YMD_CARD,this.dateTab.on(BI.Tab.EVENT_CHANGE,function(){var b=a.dateTab.getSelect();switch(b){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:var c=this.getTab(a.cur).getCalculationValue();a.ymd.setValue({year:c.getFullYear(),month:c.getMonth(),day:c.getDate()}),a._setInnerValue(a.ymd);break;case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:a.year.setValue(a.storeValue),a._setInnerValue(a.year);break;case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:a.quarter.setValue(a.storeValue),a._setInnerValue(a.quarter);break;case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:a.month.setValue(a.storeValue),a._setInnerValue(a.month);break;case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:a.week.setValue(a.storeValue),a._setInnerValue(a.week);break;case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:a.day.setValue(a.storeValue),a._setInnerValue(a.day)}a.cur=b}),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.clearButton,this.textButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateTab},{el:this.dateButton,height:30}]})},_setInnerValue:function(a){if(this.dateTab.getSelect()===BI.MultiDateCombo.MULTI_DATE_YMD_CARD)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var b=a.getCalculationValue();b=b.print("%Y-%x-%e"),this.textButton.setValue(b),this.textButton.setEnable(!1)}},setValue:function(a){this.storeValue=a;var b,c,d,e=this;switch(BI.isNotNull(a)&&(c=a.type||BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_CALENDAR,d=a.value,BI.isNull(d)&&(d=a)),c){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YEAR_CARD),this.year.setValue({type:c,value:d}),this.cur=BI.MultiDateCombo.MULTI_DATE_YEAR_CARD,e._setInnerValue(this.year);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD,this.quarter.setValue({type:c,value:d}),e._setInnerValue(this.quarter);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_MONTH_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_MONTH_CARD,this.month.setValue({type:c,value:d}),e._setInnerValue(this.month);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER: +this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_WEEK_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_WEEK_CARD,this.week.setValue({type:c,value:d}),e._setInnerValue(this.week);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_DAY_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_DAY_CARD,this.day.setValue({type:c,value:d}),e._setInnerValue(this.day);break;default:if(BI.isNull(d)||BI.isEmptyObject(d)){var b=new Date;this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.ymd.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.ymd.setValue(d),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){var a=this.dateTab.getSelect();switch(a){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:return this.ymd.getValue();case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:return this.year.getValue();case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:return this.quarter.getValue();case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:return this.month.getValue();case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:return this.week.getValue();case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:return this.day.getValue()}}}),BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.MultiDatePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.multidate_popup",BI.MultiDatePopup),BI.QuarterCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.QuarterCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-quartercard"})},_init:function(){BI.QuarterCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Quarter_Prev")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Quarter_Next")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Quarter_Begin")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Quarter_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV}}),BI.QuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quartercard",BI.QuarterCard),BI.MultiDateSegment=BI.inherit(BI.Single,{constants:{itemHeight:24,maxGap:15,minGap:10,textWidth:30,defaultEditorValue:"1"},_defaultConfig:function(){return $.extend(BI.MultiDateSegment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-segment",text:"",width:130,height:30,isEditorExist:!0,selected:!1,defaultEditorValue:"1"})},_init:function(){BI.MultiDateSegment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.radio=BI.createWidget({type:"bi.radio",selected:b.selected}),this.radio.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textEditor=BI.createWidget({type:"bi.text_editor",value:this.constants.defaultEditorValue,title:function(){return a.textEditor.getValue()},cls:"bi-multidate-editor",width:this.constants.textWidth,height:this.constants.itemHeight}),this.textEditor.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",cls:"bi-multidate-normal-label",text:b.text,height:this.constants.itemHeight}),this._createSegment()},_createSegment:function(){return this.options.isEditorExist===!0?BI.createWidget({element:this,type:"bi.left",items:[{el:{type:"bi.center_adapt",items:[this.radio],height:this.constants.itemHeight},lgap:0},{el:{type:"bi.center_adapt",items:[this.textEditor],widgetName:"textEditor"},lgap:this.constants.maxGap},{el:this.text,lgap:this.constants.minGap}]}):BI.createWidget({element:this,type:"bi.left",items:[{el:{type:"bi.center_adapt",items:[this.radio],height:this.constants.itemHeight},lgap:0},{el:this.text,lgap:this.constants.maxGap}]})},setSelected:function(a){BI.isNotNull(this.radio)&&(this.radio.setSelected(a),this.textEditor.setEnable(a))},isSelected:function(){return this.radio.isSelected()},getValue:function(){return this.options.value},getInputValue:function(){return 0|this.textEditor.getValue()},setInputValue:function(a){this.textEditor.setValue(a)},isEditorExist:function(){return this.options.isEditorExist}}),BI.MultiDateSegment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multidate_segment",BI.MultiDateSegment),BI.WeekCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.WeekCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-weekcard"})},_init:function(){BI.WeekCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Week_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Week_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV}}),BI.WeekCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.weekcard",BI.WeekCard),BI.YearCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.YearCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-yearcard"})},_init:function(){BI.YearCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Year_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Year_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN,text:BI.i18nText("BI-Multi_Date_Year_Begin")},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END,text:BI.i18nText("BI-Multi_Date_Year_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV}}),BI.YearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.yearcard",BI.YearCard),BI.MultiLayerSelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer_select_tree-combo",isDefaultInit:!1,height:30,text:"",items:[]})},_init:function(){BI.MultiLayerSelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.multilayer_select_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSelectTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSelectTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_combo",BI.MultiLayerSelectTreeCombo),BI.MultiLayerSelectLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSelectLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_select_tree_last_plus_group_node";break;default:f.type="bi.multilayer_select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.multilayer_single_tree_last_tree_leaf_item";break;default:f.type="bi.multilayer_single_tree_mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:{type:"bi.select_tree_expander",isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:c.itemsCreator,el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,arguments)})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSelectLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_level_tree",BI.MultiLayerSelectLevelTree),BI.MultiLayerSelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_select_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.MultiLayerSelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_popup",BI.MultiLayerSelectTreePopup),BI.MultiLayerSelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-first-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_first_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},isOnce:function(){return!0},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_first_plus_group_node",BI.MultiLayerSelectTreeFirstPlusGroupNode),BI.MultiLayerSelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-last-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_last_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_last_plus_group_node",BI.MultiLayerSelectTreeLastPlusGroupNode),BI.MultiLayerSelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_mid_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_mid_plus_group_node",BI.MultiLayerSelectTreeMidPlusGroupNode),BI.MultiLayerSingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-combo",isDefaultInit:!1,height:30,text:"",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.multilayer_single_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_combo",BI.MultiLayerSingleTreeCombo),BI.MultiLayerSingleLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-single-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSingleLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_single_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_single_tree_last_plus_group_node";break;default:f.type="bi.multilayer_single_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.multilayer_single_tree_last_tree_leaf_item";break;default:f.type="bi.multilayer_single_tree_mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:{isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:function(a,b){c.itemsCreator(a,function(a){b(BI.Tree.transformToTreeFormat(a),0)})},el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,c)})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSingleLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_level_tree",BI.MultiLayerSingleLevelTree),BI.MultiLayerSingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.MultiLayerSingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_popup",BI.MultiLayerSingleTreePopup),BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-first-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-last-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.last_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_last_plus_group_node",BI.MultiLayerSingleTreeLastPlusGroupNode),BI.MultiLayerSingleTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-mid-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.mid_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_plus_group_node",BI.MultiLayerSingleTreeMidPlusGroupNode),BI.MultiLayerSingleTreeFirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.first_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_first_tree_leaf_item",BI.MultiLayerSingleTreeFirstTreeLeafItem),BI.MultiLayerSingleTreeLastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.last_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_last_tree_leaf_item",BI.MultiLayerSingleTreeLastTreeLeafItem),BI.MultiLayerSingleTreeMidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.mid_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_tree_leaf_item",BI.MultiLayerSingleTreeMidTreeLeafItem),BI.MultiSelectCheckPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-pane bi-background",items:[],itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiSelectCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={},this.display=BI.createWidget({type:"bi.display_selected_list",items:b.items,itemsCreator:function(c,d){return c=BI.extend(c||{},{selectedValues:a.storeValue.value}),a.storeValue.type===BI.Selection.Multi?void d({items:BI.map(a.storeValue.value,function(a,c){var d=b.valueFormatter(c)||c; +return{text:d,value:c,title:d}})}):void b.itemsCreator(c,d)}}),this.continueSelect=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-select-check-selected bi-high-light"}),this.continueSelect.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect()}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:{type:"bi.left",cls:"multi-select-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:this.continueSelect,lgap:this.constants.lgap,tgap:this.constants.tgap}]}},{height:"fill",el:this.display}]})},setValue:function(a){this.storeValue=a||{}},empty:function(){this.display.empty()},populate:function(){this.display.populate.apply(this.display,arguments)}}),BI.shortcut("bi.multi_select_check_pane",BI.MultiSelectCheckPane),BI.DisplaySelectedList=BI.inherit(BI.Pane,{constants:{height:25,lgap:10},_defaultConfig:function(){return BI.extend(BI.DisplaySelectedList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-display-list",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.DisplaySelectedList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hasNext=!1,this.button_group=BI.createWidget({type:"bi.list_pane",element:this,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},items:this._createItems(b.items),chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical",lgap:10}]},itemsCreator:function(c,d){b.itemsCreator(c,function(b){a.hasNext=!!b.hasNext,d(a._createItems(b.items))})},hasNext:function(){return a.hasNext}})},_createItems:function(a){return BI.createItems(a,{type:"bi.icon_text_item",cls:"cursor-default check-font display-list-item bi-tips",once:!0,invalid:!0,selected:!0,height:this.constants.height,logic:{dynamic:!0}})},empty:function(){this.button_group.empty()},populate:function(a){0===arguments.length?this.button_group.populate():this.button_group.populate(this._createItems(a))}}),BI.shortcut("bi.display_selected_list",BI.DisplaySelectedList),BI.MultiSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.MultiSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue={},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:b.height,masker:{offset:{left:1,top:1,right:2,bottom:33}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),d.apply(a,arguments)})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue("")})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(b){var d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){a.setValue(),a._defaultState()}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(a.storeValue),BI.nextTick(function(){a.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.trigger.stopEditing(),a.requesting===!0?a.wants2Quit=!0:a.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button bi-border-left"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.trigger.getCounter().hideView(),a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:d,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.pluck(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]}),c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_combo",BI.MultiSelectCombo),BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!a.storeValue.value.contains(a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,height:25,selected:this.isAllSelected()})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:30}]});this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.__isMouseInBounds__(b)&&!a.numberCounter.element.__isMouseInBounds__(b)&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:{dynamic:!1},el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:a.storeValue.value})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:{dynamic:!1},height:25,selected:this.isAllSelected()})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.matched.concat(f.finded)}return BI.map(d,function(b,c){return{text:c.text,title:c.text,value:c.value,selected:a.type===BI.Selection.All}})},setValue:function(a){this.storeValue=BI.deepClone(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])}}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane),BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button bi-high-light",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:15}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){a.numberCounter.setTag(a.numberCounter.getText()),a.numberCounter.setText(a._const.checkSelected)},function(){a.numberCounter.setText(a.numberCounter.getTag())}),this.setVisible(!1)},setValue:function(a){var b=this,c=this.options;return a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),a.type===BI.Selection.All?void c.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(c){var d=c.count-a.value.length;BI.nextTick(function(){b.numberCounter.setText(d),b.setVisible(d>0)})}):void BI.nextTick(function(){b.numberCounter.setText(a.value.length),b.setVisible(a.value.length>0)})},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton),BI.MultiSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{}})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.MultiSelectEditor.EVENT_PAUSE="MultiSelectEditor.EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,b)})},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All?1===BI.size(a.assist)?this.editor.setState(b.valueFormatter(a.assist[0]+"")||a.assist[0]+""):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.All):1===BI.size(a.value)?this.editor.setState(b.valueFormatter(a.value[0]+"")||a.value[0]+""):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.None)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher),BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget(b.el,{type:"bi.multi_select_check_selected_button",itemsCreator:b.itemsCreator}),this.button.on(BI.Events.VIEW,function(){a.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,onClickContinueSelect:function(){a.switcher.hideView()}},b.popup),adapter:b.adapter,masker:b.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var a=this;BI.nextTick(function(){a.populate()})}),this.switcher.element.click(function(a){a.stopPropagation()})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(a){this.switcher.setAdapter(a)},setValue:function(a){this.switcher.setValue(a)},setButtonChecked:function(a){this.button.setValue(a)},getValue:function(){},populate:function(a){this.switcher.populate.apply(this.switcher,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher),BI.MultiSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={};var c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue)};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,el:{height:""}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keyword=a.trigger.getKeyword(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane(),a._setStartValue(""),this.setValue(BI.deepClone(a.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),a._setStartValue(""),a.adapter.setValue(a.storeValue),a.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){if(this.hasMatched()){var b=this.getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a._setStartValue(""),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}else a._showAdapter()}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeyword(),d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.adapter.setValue(a.storeValue),c(),a.adapter.populate(),a._setStartValue("")):(a.adapter.setValue(a.storeValue),c())})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()})}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:30},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},_defaultState:function(){this.trigger.stopEditing()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b); +}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA},function(a){d._allData=BI.pluck(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA,keyword:c.trigger.getKeyword()},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]})}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectList.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="BI.MultiSelectList.EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList),BI.MultiSelectTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:b.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return a.searcher.getKeyword()},itemsCreator:function(c,d){c.keyword=a.searcher.getKeyword(),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),BI.nextTick(function(){a.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){a._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,height:30},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},resize:function(){},setSelectedValue:function(a){this.storeValue.value=a||{},this.adapter.setSelectedValue(a),this.searcherPane.setSelectedValue(a),this.searcher.setValue({value:a||{}})},setValue:function(a){this.adapter.setValue(a)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(a){this.adapter.updateValue(a)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="BI.MultiSelectTree.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:b.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(a){a||(a={}),this.popup.setValue(a)},setSelectedValue:function(a){a||(a={}),this.popup.setSelectedValue(a)},updateValue:function(a){this.popup.updateValue(a),this.popup.refresh()},populate:function(a){this.popup.stroke(a)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="BI.MultiSelectTreePopup.EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="BI.MultiSelectTreePopup.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={};var c=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});c.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect(),BI.nextTick(function(){a.empty()})});var d=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:c,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget({type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(a,c){a.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,b.itemsCreator(a,c)}}),this.display.on(BI.Events.AFTERINIT,function(){a.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){d.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){d.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:d},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(a){this.display.stroke(a)},setValue:function(a){a||(a={}),this.display.setSelectedValue(a.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane),BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:1,left:1,right:2,bottom:33}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,height:25})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:c.height,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:c.itemsCreator},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?{1:1}:{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===j.element.find(a.target).length}}),this.storeValue={value:{}};var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a={type:BI.Selection.Multi,value:this.getSearcher().hasChecked()?{1:1}:{}};this.getSearcher().setState(a),this.getCounter().setButtonChecked(a)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button bi-border-left"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_CONFIRM="MultiTreeCombo.EVENT_CONFIRM",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:100,maxHeight:400,onLoaded:BI.emptyFn})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={},this.tree=BI.createWidget({type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)}}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:this._const.checkSelected,textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)})},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All?this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.All):this.editor.setState(BI.size(a.value)>0?BI.Selection.Multi:BI.Selection.None)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumericalInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:30,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:""},_defaultConfig:function(){var a=BI.NumericalInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-numerical-interval",height:25,validation:"valid"})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumericalInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.min,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"numerical-interval-small-editor bi-border-top bi-border-bottom bi-border-left"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.max,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"numerical-interval-big-editor bi-border-top bi-border-bottom bi-border-right"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"numerical-interval-small-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconClass:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconClass:"less-equal-font"}]}),c.closemin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"numerical-interval-big-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconClass:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconClass:"less-equal-font"}]}),c.closemax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-2*b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-2*b.border},{el:a.bigEditor}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor)},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),a.smallEditor.isValid()&&a.bigEditor.isValid()){if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")}return a.element.removeClass("number-error"),c.validation="invalid",b.typeError},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"center"});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"center"}),c.fireEvent(BI.NumericalInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumericalInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"center"});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"})}b.fireEvent(BI.NumericalInterval.EVENT_CHANGE)})},_setComboValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.IconCombo.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.numberError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;case c.signalError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),b.fireEvent(BI.NumericalInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumericalInterval.EVENT_CHANGE),b.fireEvent(BI.NumericalInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(a){this.smallEditor.setEnable(a)},setCloseMinEnable:function(a){this.smallCombo.setEnable(a)},setMaxEnable:function(a){this.bigEditor.setEnable(a)},setCloseMaxEnable:function(a){this.bigCombo.setEnable(a)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(a){this.smallTip.setText(a),this.bigTip.setText(a)},getNumTip:function(){return this.smallTip.getText()},setValue:function(a){a=a||{};var b,c=this;(BI.isNumeric(a.min)||BI.isEmptyString(a.min))&&c.smallEditor.setValue(a.min),BI.isNotNull(a.min)||c.smallEditor.setValue(""),(BI.isNumeric(a.max)||BI.isEmptyString(a.max))&&c.bigEditor.setValue(a.max),BI.isNotNull(a.max)||c.bigEditor.setValue(""),BI.isNull(a.closemin)||(b=a.closemin===!0?1:0,c.smallCombo.setValue(b)),BI.isNull(a.closemax)||(b=a.closemax===!0?1:0,c.bigCombo.setValue(b))},getValue:function(){var a=this,b={},c=a.smallCombo.getValue(),d=a.bigCombo.getValue();return b.min=a.smallEditor.getValue(),b.max=a.bigEditor.getValue(),0===c[0]?b.closemin=!1:b.closemin=!0,0===d[0]?b.closemax=!1:b.closemax=!0,b}}),BI.NumericalInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumericalInterval.EVENT_VALID="EVENT_VALID",BI.NumericalInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.numerical_interval",BI.NumericalInterval),BI.PageTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PageTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-page-table-cell",text:"",title:""})},_init:function(){BI.PageTableCell.superclass._init.apply(this,arguments);BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"nowrap",height:this.options.height,text:this.options.text,title:this.options.title,value:this.options.value,lgap:5,rgap:5});BI.isNotNull(this.options.styles)&&BI.isObject(this.options.styles)&&this.element.css(this.options.styles)}}),BI.shortcut("bi.page_table_cell",BI.PageTableCell),BI.PageTable=BI.inherit(BI.Widget,{_const:{scrollWidth:18,minScrollWidth:100},_defaultConfig:function(){return BI.extend(BI.PageTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-page-table",el:{type:"bi.sequence_table"},pager:{horizontal:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn},vertical:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn}},itemsCreator:BI.emptyFn,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.PageTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hCurr=1,this.vCurr=1,this.table=BI.createWidget(b.el,{type:"bi.sequence_table",width:b.width,height:b.height&&b.height-30,isNeedResize:!0,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.pager=BI.createWidget(b.pager,{type:"bi.direction_pager",height:30}),this.pager.on(BI.Pager.EVENT_CHANGE,function(){var c=this.getVPage&&this.getVPage();BI.isNull(c)&&(c=this.getCurrentPage());var d=this.getHPage&&this.getHPage();b.itemsCreator({vpage:c,hpage:d},function(b,e,f,g){a.table.setVPage?a.table.setVPage(c):a.table.setValue(c),a.table.setHPage&&a.table.setHPage(d),a.populate.apply(a,arguments)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.table,left:0,top:0},{el:this.pager,left:0,right:0,bottom:0}]})},setHPage:function(a){this.hCurr=a,this.pager.setHPage&&this.pager.setHPage(a),this.table.setHPage&&this.table.setHPage(a)},setVPage:function(a){this.vCurr=a,this.pager.setVPage&&this.pager.setVPage(a),this.table.setVPage&&this.table.setVPage(a)},getHPage:function(){var a=this.pager.getHPage&&this.pager.getHPage(); +return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.hpage)},getVPage:function(){var a=this.pager.getVPage&&this.pager.getVPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.vpage)},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments);var b=!1;this.pager.alwaysShowPager?b=!0:this.pager.hasHNext&&this.pager.hasHNext()?b=!0:this.pager.hasHPrev&&this.pager.hasHPrev()?b=!0:this.pager.hasVNext&&this.pager.hasVNext()?b=!0:this.pager.hasVPrev&&this.pager.hasVPrev()?b=!0:this.pager.hasNext&&this.pager.hasNext()?b=!0:this.pager.hasPrev&&this.pager.hasPrev()&&(b=!0),this.table.setHeight(a-(b?30:0))},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getVerticalScroll:function(){return this.table.getVerticalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},restore:function(){this.table.restore()},attr:function(){BI.PageTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(){this.pager.populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),this.pager&&this.pager.destroy(),BI.PageTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.page_table",BI.PageTable),BI.PathChooser=BI.inherit(BI.Widget,{_const:{lineColor:"#d4dadd",selectLineColor:"#3f8ce8"},_defaultConfig:function(){return BI.extend(BI.PathChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-path-chooser",items:[]})},_init:function(){BI.PathChooser.superclass._init.apply(this,arguments),this.populate(this.options.items)},_createRegions:function(a){var b=this;this.regions=BI.createWidgets(BI.map(a,function(a,c){return{type:"bi.path_region",title:b.texts[c]||c}})),this.regionMap={},BI.each(a,function(a,c){b.regionMap[c]=a}),this.container=BI.createWidget({type:"bi.horizontal",verticalAlign:"top",scrollx:!1,scrolly:!1,hgap:10,items:this.regions}),BI.createWidget({type:"bi.vertical_adapt",element:this,scrollable:!0,hgap:10,items:[this.container]})},getRegionIndexById:function(a){var b=this.store[a],c=b.get("region");return this.regionMap[c]},_drawPath:function(a,b,c){var d=this,e=[];e=BI.contains(this.start,a)?this.start:[a],BI.each(e,function(a,b){BI.each(d.radios[b],function(a,b){b.setSelected(!1)}),BI.each(d.lines[b],function(a,b){b.attr("stroke",d._const.lineColor)}),BI.each(d.regionIndexes[b],function(a,b){d.regions[b].reset()})}),BI.each(this.routes[a][c],function(a,e){var f=d.getRegionIndexById(e);d.regions[f].setSelect(b+c,e)});for(var f=BI.last(this.routes[a][c]);f&&this.routes[f]&&1===this.routes[f].length;)BI.each(this.routes[f][0],function(a,b){var c=d.getRegionIndexById(b);d.regions[c].setSelect(0,b)}),this.lines[f][0].attr("stroke",d._const.selectLineColor).toFront(),f=BI.last(this.routes[f][0]);this.lines[a][c].attr("stroke",d._const.selectLineColor).toFront(),this.radios[a]&&this.radios[a][c]&&this.radios[a][c].setSelected(!0)},_drawRadio:function(a,b,c,d,e){var f=this,g=BI.createWidget({type:"bi.radio",cls:"path-chooser-radio",selected:b+c===0,start:a,index:c});g.on(BI.Radio.EVENT_CHANGE,function(){f._drawPath(a,b,c),f.fireEvent(BI.PathChooser.EVENT_CHANGE,a,c)}),this.radios[a]||(this.radios[a]=[]),this.radios[a].push(g),BI.createWidget({type:"bi.absolute",element:this.container,items:[{el:g,left:d-6.5,top:e-6.5}]})},_drawLine:function(a,b){var c=this;this.lines[a]||(this.lines[a]=[]),this.pathes[a]||(this.pathes[a]=[]);var d=this.getRegionIndexById(a),e=this.regions[d].getIndexByValue(a);BI.each(b,function(f,g){c.pathes[a][f]=[];var h=f+e,i="",j=47.5+29*h,k=50+100*d,l=k,m=j,n=j,o=c.getRegionIndexById(BI.last(g)),p=c.regions[o].getIndexByValue(BI.last(g)),q=50+100*o;if(BI.contains(c.start,a)?(l=k-50,i+="M"+(k-50)+","+j,c.pathes[a][f].push({x:k-50,y:j})):0===h?(l=k+50,i+="M"+k+","+j,c.pathes[a][f].push({x:k,y:j})):(l=k+50,i+="M"+k+",47.5L"+(k+50)+",47.5L"+(k+50)+","+j,c.pathes[a][f].push({x:k,y:47.5}),c.pathes[a][f].push({x:k+50,y:47.5}),c.pathes[a][f].push({x:k+50,y:j})),h>0){var r=29*p+47.5;i+="L"+(q-50)+","+n+"L"+(q-50)+","+r+"L"+q+","+r,c.pathes[a][f].push({x:q-50,y:n}),c.pathes[a][f].push({x:q-50,y:r}),c.pathes[a][f].push({x:q,y:r})}else i+="L"+q+","+n,c.pathes[a][f].push({x:q,y:n});var s=c.svg.path(i).attr({stroke:0===h?c._const.selectLineColor:c._const.lineColor,"stroke-dasharray":"-"});c.lines[a].push(s),b.length>1&&c.lines[a][0].toFront(),BI.contains(c.start,a)&&c.lines[c.regions[0].getValueByIndex(0)][0].toFront(),(b.length>1||BI.contains(c.start,a))&&c._drawRadio(a,e,f,l,m)})},_drawLines:function(a){var b=this;this.lines={},this.pathes={},this.radios={},this.regionIndexes={},BI.each(a,function(a,c){b.regionIndexes[a]||(b.regionIndexes[a]=[]),BI.each(c,function(c,d){BI.each(d,function(c,d){var e=b.getRegionIndexById(d);BI.contains(b.regionIndexes[a],e)||b.regionIndexes[a].push(e)})})}),BI.each(a,function(a,c){b._drawLine(a,c)})},_pushNodes:function(a){for(var b=this,c=[],d=0;d0||BI.contains(b.start,e))&&g.addItem(e,b.texts[e])}for(var d=BI.first(c);d0&&(h=c[b-1]);var i=a.store[h.value||""],j=a.store[g.value]||new BI.Node(g.value);j.set(g),a.store[g.value]=j,a.texts[g.value]=g.text,a.texts[g.region]=g.regionText,i=BI.isNull(i)?d.getRoot():i,i.getChildIndex(g.value)===-1&&d.addNode(i,j)})}),d.traverse(function(a){BI.each(a.getChildren(),function(b,d){if(BI.contains(c,d.get("region"))){var e=BI.indexOf(c,a.get("region")),f=BI.indexOf(c,d.get("region"));if(e>f){for(var g=c[f],h=f;h0&&(e.push(c),d.push(e),e=[]),e.push(c)}),e.length>0&&d.push(e),BI.each(d,function(a,b){var d=b[0],e=BI.findIndex(c.routes[d],function(a,c){if(BI.isEqual(b,c))return!0});if(e>=0){var f=c.getRegionIndexById(d),g=c.regions[f].getIndexByValue(d);c._drawPath(d,g,e)}})},getValue:function(){var a=[];return BI.each(this.regions,function(b,c){var d=c.getValue();BI.isKey(d)&&a.push(d)}),a}}),BI.PathChooser.EVENT_CHANGE="PathChooser.EVENT_CHANGE",BI.shortcut("bi.path_chooser",BI.PathChooser),BI.PathRegion=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PathRegion.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-path-region bi-background",width:80,title:""})},_init:function(){BI.PathRegion.superclass._init.apply(this,arguments);var a=this.options;this.zIndex=100;var b=BI.createWidget({type:"bi.label",text:a.title,title:a.title,height:30});b.element.css("zIndex",this.zIndex--),this.items=[],this.vertical=BI.createWidget({type:"bi.vertical",element:this,bgap:5,hgap:10,items:[b]})},hasItem:function(a){return BI.any(this.items,function(b,c){return a===c.getValue()})},addItem:function(a,b){if(BI.isKey(a))var c=BI.createWidget({type:"bi.label",cls:"path-region-label bi-card bi-border bi-list-item-select",text:b,value:a,title:b||a,height:22});else var c=BI.createWidget({type:"bi.layout",height:24});c.element.css("zIndex",this.zIndex--),this.items.push(c),this.vertical.addItem(c),1===this.items.length&&this.setSelect(0,a)},reset:function(){BI.each(this.items,function(a,b){b.element.removeClass("active")})},setSelect:function(a,b){if(this.reset(),!(this.items.length<=0))return 1===this.items.length?void this.items[0].element.addClass("active"):void(this.items[a].attr("value")===b&&this.items[a].element.addClass("active"))},setValue:function(a){this.setSelect(this.getIndexByValue(a),a)},getValueByIndex:function(a){return this.items[a].attr("value")},getIndexByValue:function(a){return BI.findIndex(this.items,function(b,c){return c.attr("value")===a})},getValue:function(){var a;return BI.any(this.items,function(b,c){if(c.element.hasClass("active"))return a=c.getValue(),!0}),a}}),BI.PathRegion.EVENT_CHANGE="PathRegion.EVENT_CHANGE",BI.shortcut("bi.path_region",BI.PathRegion),BI.PreviewTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-cell",text:""})},_init:function(){BI.PreviewTableCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_cell",BI.PreviewTableCell),BI.PreviewTableHeaderCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-header-cell",text:""})},_init:function(){BI.PreviewTableHeaderCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_header_cell",BI.PreviewTableHeaderCell),BI.PreviewTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table",isNeedFreeze:!1,freezeCols:[],rowSize:null,columnSize:[],headerRowSize:30,header:[],items:[]})},_init:function(){BI.PreviewTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedResize:!1,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,rowSize:b.rowSize,columnSize:b.columnSize,headerRowSize:b.headerRowSize,header:BI.map(b.header,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_header_cell"},b)})}),items:BI.map(b.items,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_cell"},b)})})}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._adjustColumns(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._adjustColumns()})},_hasAdaptCol:function(a){return BI.any(a,function(a,b){return""===b})},_isPercentage:function(a){return a[0]<=1},_adjustColumns:function(){var a=this.options;if(a.isNeedFreeze===!0){if(this._isPercentage(a.columnSize)){if(this._hasAdaptCol(a.columnSize)){var b=[],c=0;BI.each(a.columnSize,function(a,d){""===d?b.push(a):c+=d}),c=1-c;var d=c/b.length;BI.each(b,function(b,c){a.columnSize[c]=d})}var e=0!==BI.first(a.freezeCols),f=[],g=[];BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)?f.push(c):g.push(c)});var h=BI.sum(f),i=BI.sum(g);BI.each(f,function(a,b){f[a]=b/h}),BI.each(g,function(a,b){g[a]=b/i}),this.table.setRegionColumnSize(e?["fill",h]:[h,"fill"]),this.table.setColumnSize(e?g.concat(f):f.concat(g))}}else(this._hasAdaptCol(a.columnSize)||this._isPercentage(a.columnSize))&&this.table.setRegionColumnSize(["100%"])},setColumnSize:function(a){return this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){return this.table.setHeaderColumnSize(a)},setRegionColumnSize:function(a){return this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){return this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){return this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){return this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},populate:function(a,b){this.table.populate(a,b)}}),BI.PreviewTable.EVENT_CHANGE="PreviewTable.EVENT_CHANGE",BI.shortcut("bi.preview_table",BI.PreviewTable),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger"}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_CHANGE,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:Date._QN[1],value:1},{text:Date._QN[2],value:2},{text:Date._QN[3],value:3},{text:Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}]}),this.quarter.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:30,textWidth:40,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:25})},_init:function(){BI.QuarterTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=4},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.QuarterTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.RelationViewItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.RelationViewItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-item bi-list-item-active",height:25,hoverIn:BI.emptyFn,hoverOut:BI.emptyFn})},_init:function(){BI.RelationViewItem.superclass._init.apply(this,arguments);var a=this.options;this.element.hover(a.hoverIn,a.hoverOut);var b=[];a.isPrimary&&b.push({type:"bi.icon",width:16,height:16,title:BI.i18nText("BI-Primary_Key")}),b.push({type:"bi.label",text:a.text,value:a.value,height:a.height,textAlign:"left",width:a.isPrimary?70:90}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:b,cls:"primary-key-font",lgap:5})},enableHover:function(a){BI.RelationViewRegion.superclass.enableHover.apply(this,[{container:"body"}])},setSelected:function(a){this.element[a?"addClass":"removeClass"]("active")}}),BI.shortcut("bi.relation_view_item",BI.RelationViewItem),BI.RelationView=BI.inherit(BI.Widget,{_const:{lineColor:"#c4c6c6",selectLineColor:"#009de3"},_defaultConfig:function(){return BI.extend(BI.RelationView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view",items:[]})},_init:function(){BI.RelationView.superclass._init.apply(this,arguments),this.populate(this.options.items)},_calculateWidths:function(){var a=[];return BI.each(this.views,function(b,c){BI.each(c,function(b,c){a[b]||(a[b]=BI.MIN),a[b]=Math.max(a[b],c.getWidth())})}),a},_calculateHeights:function(){var a=BI.makeArray(BI.size(this.views),BI.MIN);return BI.each(this.views,function(b,c){BI.each(c,function(c,d){a[b]=Math.max(a[b],d.getHeight())})}),a},_hoverIn:function(a){var b=this,c=this._const;BI.each(this.relations,function(d,e){BI.each(e,function(e,f){f[0].primary.value!==a&&f[0].foreign.value!==a||(b.lines[d][e].attr("stroke",c.selectLineColor).toFront(),b.storeViews[d].setValue(f[0].primary.value),b.storeViews[e].setValue(f[0].foreign.value))})})},_hoverOut:function(a){var b=this,c=this._const;BI.each(this.relations,function(d,e){BI.each(e,function(e,f){f[0].primary.value!==a&&f[0].foreign.value!==a||(b.lines[d][e].attr("stroke",c.lineColor),b.storeViews[d].setValue([]),b.storeViews[e].setValue([]))})})},previewRelationTables:function(a,b){return b?(BI.each(this.storeViews,function(b,c){a.contains(b)?c.setPreviewSelected(!0):c.toggleRegion(!1)}),void BI.each(this.lines,function(b,c){BI.each(c,function(c,d){a.contains(b)&&a.contains(c)||d.hide()})})):(BI.each(this.storeViews,function(a,b){b.toggleRegion(!0),b.setPreviewSelected(!1)}),void BI.each(this.lines,function(a,b){BI.each(b,function(a,b){b.show()})}))},populate:function(a){var b=this,c=this.options,d=this._const;c.items=a||[],this.empty(),this.svg=BI.createWidget({type:"bi.svg"});var e=this.regions={},f=this.relations={};BI.each(a,function(a,b){var c=b.primary.region,d=b.foreign&&b.foreign.region;c&&!f[c]&&(f[c]={}),c&&d&&!f[c][d]&&(f[c][d]=[]),c&&!e[c]&&(e[c]=[]),d&&!e[d]&&(e[d]=[]),c&&!BI.deepContains(e[c],b.primary)&&e[c].push(b.primary),d&&!BI.deepContains(e[d],b.foreign)&&e[d].push(b.foreign),c&&d&&f[c][d].push(b)});for(var g=[],h=BI.clone(e),i={};!BI.isEmpty(h);){var j=BI.clone(h);BI.each(c.items,function(a,b){i[b.primary.region]||delete j[b.foreign&&b.foreign.region]}),g.push(BI.keys(j)),BI.extend(i,j),BI.each(j,function(a,b){delete h[a]})}var k=this.views={},l=this.storeViews={},m=this.indexes={},n=[];BI.each(g,function(a,c){k[a]||(k[a]={});var d=[];BI.each(c,function(c,f){var g=e[f];k[a][c]=l[f]=BI.createWidget({type:"bi.relation_view_region_container",value:f,header:g[0].regionTitle,text:g.length>0?g[0].regionText:"",handler:g.length>0?g[0].regionHandler:BI.emptyFn,items:g,belongPackage:!(g.length>0)||g[0].belongPackage}),BI.isNotNull(g[0])&&BI.isNotNull(g[0].keyword)&&k[a][c].doRedMark(g[0].keyword),k[a][c].on(BI.RelationViewRegionContainer.EVENT_HOVER_IN,function(a){b._hoverIn(a)}),k[a][c].on(BI.RelationViewRegionContainer.EVENT_HOVER_OUT,function(a){b._hoverOut(a)}),k[a][c].on(BI.RelationViewRegionContainer.EVENT_PREVIEW,function(a){b.fireEvent(BI.RelationView.EVENT_PREVIEW,f,a)}),m[f]={i:a,j:c},d.push(k[a][c])}),n.push({type:"bi.horizontal",items:d})});var o=this._calculateHeights(),p=this._calculateWidths(),q=[0],r=[0];BI.each(o,function(a,b){0!==a&&(r[a]=r[a-1]+o[a-1])}),BI.each(p,function(a,b){0!==a&&(q[a]=q[a-1]+p[a-1])});var s=this.lines={};BI.each(f,function(a,c){BI.each(c,function(c,e){var f=m[a],g=m[c],h=0,i=1,j=2,n=3,t=j,u=h,v=function(a,b,c,d){var e,f=q[b]+(p[b]-k[a][b].getWidth())/2,g=r[a]+(o[a]-k[a][b].getHeight())/2,l="";switch(c){case h:e=d?k[a][b].getTopRightPosition():k[a][b].getTopLeftPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+f+","+(g-10),g-=10;break;case i:e=k[a][b].getRightPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+(f+10)+","+g,f+=10;break;case j:e=k[a][b].getBottomPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+f+","+(g+10),g+=10;break;case n:e=k[a][b].getLeftPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+(f-10)+","+g,f-=10}return{x:f,y:g,path:l}},w="",x=v(f.i,f.j,t),y=v(g.i,g.j,u,!0);w+=x.path+y.path,s[a]||(s[a]={}),w+="M"+x.x+","+x.y+"L"+y.x+","+y.y;var z=s[a][c]=b.svg.path(w).attr({stroke:d.lineColor,"stroke-width":"2"}).hover(function(){z.attr("stroke",d.selectLineColor).toFront(),l[a].setValue(e[0].primary.value),l[c].setValue(e[0].foreign.value)},function(){z.attr("stroke",d.lineColor),l[a].setValue([]),l[c].setValue([])})})});var t=BI.createWidget();BI.createWidget({type:"bi.vertical",element:t,items:n}),BI.createWidget({type:"bi.absolute",element:t,items:[{el:this.svg,left:0,right:0,top:0,bottom:0}]}),BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[t]})}}),BI.RelationView.EVENT_CHANGE="RelationView.EVENT_CHANGE",BI.RelationView.EVENT_PREVIEW="EVENT_PREVIEW",BI.shortcut("bi.relation_view",BI.RelationView),BI.RelationViewRegionContainer=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.RelationViewRegionContainer.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-region-container",width:150})},_init:function(){BI.RelationViewRegionContainer.superclass._init.apply(this,arguments);var a=this,b=this.options;this.region=BI.createWidget({type:"bi.relation_view_region",value:b.value,header:b.header,text:b.text,handler:b.handler,items:b.items,belongPackage:b.belongPackage}),this.region.on(BI.RelationViewRegion.EVENT_PREVIEW,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_PREVIEW,b)}),this.region.on(BI.RelationViewRegion.EVENT_HOVER_IN,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_HOVER_IN,b)}),this.region.on(BI.RelationViewRegion.EVENT_HOVER_OUT,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_HOVER_OUT,b)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.region],width:this.region.getWidth(),height:this.region.getHeight()})},doRedMark:function(){this.region.doRedMark.apply(this.region,arguments)},unRedMark:function(){this.region.unRedMark.apply(this.region,arguments)},getWidth:function(){return this.region.getWidth()},getHeight:function(){return this.region.getHeight()},getTopLeftPosition:function(){return this.region.getTopLeftPosition()},getTopRightPosition:function(){return this.region.getTopRightPosition()},getBottomPosition:function(){return this.region.getBottomPosition()},getLeftPosition:function(){return this.region.getLeftPosition()},getRightPosition:function(){return this.region.getRightPosition()},setValue:function(a){this.region.setValue(a)},toggleRegion:function(a){a===!0?this.region.element.fadeIn():this.region.element.fadeOut()},setPreviewSelected:function(a){this.region.setPreviewSelected(a)}}),BI.RelationViewRegionContainer.EVENT_HOVER_IN="RelationViewRegion.EVENT_HOVER_IN",BI.RelationViewRegionContainer.EVENT_HOVER_OUT="RelationViewRegion.EVENT_HOVER_OUT",BI.RelationViewRegionContainer.EVENT_PREVIEW="RelationViewRegion.EVENT_PREVIEW",BI.shortcut("bi.relation_view_region_container",BI.RelationViewRegionContainer),BI.RelationViewRegion=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.RelationViewRegion.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-region cursor-pointer",width:150,text:"",value:"",header:"",items:[],belongPackage:!0})},_init:function(){BI.RelationViewRegion.superclass._init.apply(this,arguments);var a=this,b=this.options;this.preview=BI.createWidget({type:"bi.icon_button",cls:"relation-table-preview-font",width:25,height:25,stopPropagation:!0}),this.preview.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.RelationViewRegion.EVENT_PREVIEW,this.isSelected())}),this.title=BI.createWidget({type:"bi.label",height:25,width:70,text:b.text,value:b.value,textAlign:"left"}),BI.isKey(b.header)&&this.title.setTitle(b.header,{container:"body"}),this.button_group=BI.createWidget({type:"bi.button_group",items:this._createItems(b.items),layouts:[{type:"bi.vertical"}]}),BI.createWidget({type:"bi.vertical",element:this,items:[{type:"bi.vertical",cls:"relation-view-region-container bi-card bi-border "+(b.belongPackage?"":"other-package"),items:[{type:"bi.vertical_adapt",cls:"relation-view-region-title bi-border-bottom",items:[this.preview,this.title]},this.button_group]}],hgap:25,vgap:20})},_createItems:function(a){var b=this;return BI.map(a,function(a,c){return BI.extend(c,{type:"bi.relation_view_item",hoverIn:function(){b.setValue(c.value),b.fireEvent(BI.RelationViewRegion.EVENT_HOVER_IN,c.value)},hoverOut:function(){b.setValue([]),b.fireEvent(BI.RelationViewRegion.EVENT_HOVER_OUT,c.value)}})})},doRedMark:function(){this.title.doRedMark.apply(this.title,arguments)},unRedMark:function(){this.title.unRedMark.apply(this.title,arguments)},getWidth:function(){return this.options.width},getHeight:function(){return 25*this.button_group.getAllButtons().length+25+40+3},getTopLeftPosition:function(){return{x:35,y:20}},getTopRightPosition:function(){return{x:this.getWidth()-25-10,y:20}},getBottomPosition:function(){return{x:35,y:this.getHeight()-20}},getLeftPosition:function(){return{x:25,y:30}},getRightPosition:function(){return{x:this.getWidth()-25,y:30}},setValue:function(a){this.button_group.setValue(a)},setPreviewSelected:function(a){this.preview.setSelected(a)}}),BI.RelationViewRegion.EVENT_HOVER_IN="RelationViewRegion.EVENT_HOVER_IN",BI.RelationViewRegion.EVENT_HOVER_OUT="RelationViewRegion.EVENT_HOVER_OUT",BI.RelationViewRegion.EVENT_PREVIEW="RelationViewRegion.EVENT_PREVIEW",BI.shortcut("bi.relation_view_region",BI.RelationViewRegion),BI.ResponisveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.ResponisveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-responsive-table",isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:!1,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.ResponisveTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,headerRowSize:b.headerRowSize,footerRowSize:b.footerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:b.header,footer:b.footer,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._initRegionSize(),a.table.resize(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_REGION_RESIZE,function(){b.isNeedResize===!0&&a._isAdaptiveColumn()&&a._resizeHeader(), +a.fireEvent(BI.Table.EVENT_TABLE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,function(){a._resizeBody(),a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_COLUMN_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_initRegionSize:function(){var a=this.options;if(a.isNeedFreeze===!0){var b=this.table.getRegionColumnSize(),c=this.table.element.width();if(!b[0]||"fill"===b[0]||b[0]>c||b[1]>c){var d=a.freezeCols;if(0===d.length)this.table.setRegionColumnSize([0,"fill"]);else if(d.length>0&&d.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}else this.table.setRegionColumnSize(["fill",0])}}},_getBlockSize:function(){var a=this.options,b=this.table.getCalculateColumnSize();if(a.isNeedFreeze===!0){var c=[],d=[];BI.each(b,function(b,e){a.freezeCols.contains(b)?c.push(e):d.push(e)});var e=BI.sum(c)+c.length,f=BI.sum(d)+d.length;return{sumLeft:e,sumRight:f,left:c,right:d}}return{size:b,sum:BI.sum(b)+b.length}},_isAdaptiveColumn:function(a){return!(BI.last(a||this.table.getColumnSize())>1.05)},_resizeHeader:function(){var a=this,b=this.options;if(b.isNeedFreeze===!0)if(this._isAdaptiveColumn()){var c=this.table.getCalculateColumnSize();this.table.setHeaderColumnSize(c)}else{var d=this.table.getClientRegionColumnSize(),e=this._getBlockSize(),f=e.sumLeft,g=e.sumRight,h=e.left,i=e.right;h[h.length-1]+=d[0]-f,i[i.length-1]+=d[1]-g;var j=BI.clone(h),k=BI.clone(i);j[j.length-1]="",k[k.length-1]="",this.table.setColumnSize(j.concat(k)),e=a._getBlockSize(),h[h.length-1]0&&a.freezeCols.length=d+e)&&this.table.setRegionColumnSize([d,"fill"]),this._resizeRegion()}},_resizeRegion:function(){var a=this.options,b=this.table.getCalculateRegionColumnSize();if(a.isNeedFreeze===!0&&a.freezeCols.length>0&&a.freezeCols.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}}},resize:function(){this.table.resize(),this._resizeRegion(),this._resizeHeader()},setColumnSize:function(a){this.table.setColumnSize(a),this._adjustRegion(),this._resizeHeader()},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){this.table.setHeaderColumnSize(a),this._adjustRegion(),this._resizeHeader()},setRegionColumnSize:function(a){this.table.setRegionColumnSize(a),this._resizeHeader()},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},attr:function(){BI.ResponisveTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(a){var b=this,c=this.options;this.table.populate.apply(this.table,arguments),c.isNeedFreeze===!0&&BI.nextTick(function(){b._initRegionSize(),b.table.resize(),b._resizeHeader()})}}),BI.shortcut("bi.responsive_table",BI.ResponisveTable),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:30,text:"",items:[]})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.select_tree_popup",items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({stopPropagation:!0},b.el)),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),items:[]})},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(e.id=e.id||BI.UUID(),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.select_tree_last_plus_group_node";break;default:f.type="bi.select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items)),chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_tree_popup",BI.SelectTreePopup),BI.SequenceTableDynamicNumber=BI.inherit(BI.SequenceTableTreeNumber,{_defaultConfig:function(){return BI.extend(BI.SequenceTableDynamicNumber.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-sequence-table-dynamic-number"})},_init:function(){BI.SequenceTableDynamicNumber.superclass._init.apply(this,arguments)},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),a.children.length>1&&BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d}}),BI.shortcut("bi.sequence_table_dynamic_number",BI.SequenceTableDynamicNumber),BI.SequenceTableListNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableListNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-list-number",isNeedFreeze:!1,scrollTop:0,startSequence:1,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[],pageSize:20})},_init:function(){BI.SequenceTableListNumber.superclass._init.apply(this,arguments);var a=this.options;this.start=a.startSequence,this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:a.headerRowSize*a.header.length-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this._populate()},_layout:function(){var a=this.options,b=a.headerRowSize*a.header.length-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize(),this.container.setHeight(a.items.length*a.rowSize);try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){for(var a=this,b=this.options,c=BI.clamp(b.scrollTop,0,b.rowSize*b.items.length-(b.height-b.header.length*b.headerRowSize)+BI.DOM.getScrollWidth()),d=Math.floor(c/b.rowSize),e=d+Math.floor((b.height-b.header.length*b.headerRowSize)/b.rowSize),f=[],g=[],h=d,i=0;h<=e&&h-1)b.rowSize!==this.renderedCells[j]._height&&(this.renderedCells[j]._height=b.rowSize,this.renderedCells[j].el.setHeight(b.rowSize)),this.renderedCells[j].top!==k&&(this.renderedCells[j].top=k,this.renderedCells[j].el.element.css("top",k+"px")),f.push(this.renderedCells[j]);else{var l=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,height:b.rowSize,text:this.start+h,styleGetter:function(c){return function(){return b.sequenceCellStyleGetter(a.start+h-1)}}(i)}));f.push({el:l,left:0,top:k,_height:b.rowSize})}g.push(this.start+h)}var m={},n={},o=[];BI.each(g,function(b,c){BI.deepContains(a.renderedKeys,c)?m[b]=c:n[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(m,b)||BI.deepContains(n,b)||o.push(a)}),BI.each(o,function(b,c){a.renderedCells[c].el.destroy()});var p=[];BI.each(n,function(a){p.push(f[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:p}),this.renderedCells=f,this.renderedKeys=g},_populate:function(){this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a=a<1?1:a;var b=this.options;this.start=(a-1)*b.pageSize+1},_restore:function(){this.options;BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},restore:function(){this._restore()},populate:function(a,b){var c=this.options;a&&a!==this.options.items&&(c.items=a,this._restore()),b&&b!==this.options.header&&(c.header=b),this._populate()}}),BI.shortcut("bi.sequence_table_list_number",BI.SequenceTableListNumber),BI.SequenceTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table",el:{type:"bi.adaptive_table"},sequence:{},isNeedResize:!0,isResizeAdapt:!1,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[],showSequence:!1,startSequence:1})},_init:function(){BI.SequenceTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.sequence=BI.createWidget(b.sequence,{type:"bi.sequence_table_list_number",invisible:b.showSequence===!1,startSequence:b.startSequence,isNeedFreeze:b.isNeedFreeze,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems,headerRowSize:b.headerRowSize,rowSize:b.rowSize,width:60,height:b.height&&b.height-BI.GridTableScrollbar.SIZE,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter}),this.table=BI.createWidget(b.el,{type:"bi.adaptive_table",width:b.showSequence===!0?b.width-60:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(b){a.sequence.getVerticalScroll()!==this.getVerticalScroll()&&(a.sequence.setVerticalScroll(this.getVerticalScroll()),a.sequence.populate()),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.htape=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.sequence,left:0,top:0},{el:this.table,top:0,left:b.showSequence===!0?60:0}]}),this._populate()},_populate:function(){var a=this.options;a.showSequence===!0?(this.sequence.setVisible(!0),this.table.element.css("left","60px"),this.table.setWidth(a.width-60)):(this.sequence.setVisible(!1),this.table.element.css("left","0px"),this.table.setWidth(a.width))},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(this.options.showSequence?a-60:a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a),this.sequence.setHeight(a-BI.GridTableScrollbar.SIZE)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},hasLeftHorizontalScroll:function(){return this.table.hasLeftHorizontalScroll()},hasRightHorizontalScroll:function(){return this.table.hasRightHorizontalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a),this.sequence.setVerticalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},setVPage:function(a){this.sequence.setVPage&&this.sequence.setVPage(a)},setHPage:function(a){this.sequence.setHPage&&this.sequence.setHPage(a)},attr:function(){BI.SequenceTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments),this.sequence.attr.apply(this.sequence,arguments)},restore:function(){this.table.restore(),this.sequence.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d),this._populate(),this.table.populate.apply(this.table,arguments),this.sequence.populate.apply(this.sequence,arguments),this.sequence.setVerticalScroll(this.table.getVerticalScroll())},destroy:function(){this.table.destroy(),BI.SequenceTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.sequence_table",BI.SequenceTable),BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:30,text:"",items:[]})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items},b.trigger)),this.popup=BI.createWidget({type:"bi.single_tree_popup",items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(a){this.combo.populate(a)},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="SingleTreeCombo.EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo),BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),items:[]})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:b.items,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SingleTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_tree_popup",BI.SingleTreePopup),BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:30,text:"",items:[]})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:a.text,items:a.items,height:a.height})},_checkTitle:function(){var a=this,b=this.getValue();BI.any(this.options.items,function(c,d){if(b.contains(d.value))return a.trigger.setTitle(d.text||d.value),!0})},setValue:function(a){a=BI.isArray(a)?a:[a],this.options.value=a,this.trigger.setValue(a),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(a){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(a)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),BI.SwitchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SwitchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switch-tree",items:[]})},_init:function(){BI.SwitchTree.superclass._init.apply(this,arguments);this.options;this.tab=BI.createWidget({type:"bi.tab",element:this,tab:null,defaultShowIndex:BI.SwitchTree.SelectType.SingleSelect,cardCreator:BI.bind(this._createTree,this)})},_createTree:function(a){var b=this,c=this.options;switch(a){case BI.SwitchTree.SelectType.SingleSelect:return this.levelTree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:!0,items:BI.deepClone(c.items)}),this.levelTree.on(BI.LevelTree.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.levelTree;case BI.SwitchTree.SelectType.MultiSelect:return this.tree=BI.createWidget({type:"bi.simple_tree",items:this._removeIsParent(BI.deepClone(c.items))}),this.tree.on(BI.SimpleTreeView.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.tree}},_removeIsParent:function(a){return BI.each(a,function(a,b){BI.isNotNull(b.isParent)&&delete b.isParent}),a},switchSelect:function(){switch(this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.setSelect(BI.SwitchTree.SelectType.MultiSelect);break;case BI.SwitchTree.SelectType.MultiSelect:this.setSelect(BI.SwitchTree.SelectType.SingleSelect)}},setSelect:function(a){this.tab.setSelect(a)},getSelect:function(){return this.tab.getSelect()},setValue:function(a){switch(this.storeValue=a,this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.levelTree.setValue(a);break;case BI.SwitchTree.SelectType.MultiSelect:this.tree.setValue(a)}},getValue:function(){return this.tab.getValue()},populate:function(a){this.options.items=a,BI.isNotNull(this.levelTree)&&this.levelTree.populate(BI.deepClone(a)),BI.isNotNull(this.tree)&&this.tree.populate(this._removeIsParent(BI.deepClone(a)))}}),BI.SwitchTree.EVENT_CHANGE="SwitchTree.EVENT_CHANGE",BI.SwitchTree.SelectType={SingleSelect:BI.Selection.Single,MultiSelect:BI.Selection.Multi},BI.shortcut("bi.switch_tree",BI.SwitchTree),BI.TimeInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){var a=BI.TimeInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-time-interval"})},_init:function(){var a=this;BI.TimeInterval.superclass._init.apply(this,arguments),this.left=this._createCombo(),this.right=this._createCombo(),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(){var a=this,b=BI.createWidget({type:"bi.multidate_combo"});return b.on(BI.MultiDateCombo.EVENT_ERROR,function(){a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_ERROR)}),b.on(BI.MultiDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),a,{offsetStyle:"center"}),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls))}),b.on(BI.MultiDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),a,{offsetStyle:"center"}),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls))}),b.on(BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW,function(){a.left.hidePopupView(),a.right.hidePopupView()}),b.on(BI.MultiDateCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_CHANGE)); +}),b},_dateCheck:function(a){return Date.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")==a||Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")==a||Date.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")==a||Date.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")==a},_checkVoid:function(a){return!Date.checkVoid(a.year,a.month,a.day,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&Date.checkLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&Date.checkLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),b=Date.parseDateTime(b,"%Y-%X-%d").print("%Y-%X-%d"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimeInterval.EVENT_VALID="EVENT_VALID",BI.TimeInterval.EVENT_ERROR="EVENT_ERROR",BI.TimeInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_interval",BI.TimeInterval),BI.YearCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-combo",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.YearCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.year_trigger",min:b.min,max:b.max}),this.trigger.on(BI.YearTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.YearTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.YearTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.YearTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.YearTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.YearCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",element:this,destroyWhenHide:!0,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.year_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.YearPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max}}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){var b=a.trigger.getKey();BI.isNotNull(b)?a.popup.setValue(b):b||b===a.storeValue?a.setValue():a.popup.setValue(a.storeValue),a.fireEvent(BI.YearCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_combo",BI.YearCombo),BI.YearPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31"})},_createYearCalendar:function(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var a=this;this.selectedYear=this._year=(new Date).getFullYear();var b=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1}),c=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,value:1});this.navigation=BI.createWidget({type:"bi.navigation",element:this,single:!0,logic:{dynamic:!0},tab:{cls:"year-popup-navigation bi-high-light bi-border-top",height:25,items:[b,c]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var d=this.getSelectedCard();b.setEnable(!d.isFrontYear()),c.setEnable(!d.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.YearPopup.EVENT_CHANGE,a.selectedYear)})},getValue:function(){return this.selectedYear},setValue:function(a){var b=this.options;Date.checkVoid(a,1,1,b.min,b.max)[0]?(a=(new Date).getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue("")):(this.selectedYear=a,this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue(a))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup),BI.YearTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,triggerWidth:25,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},_defaultConfig:function(){return BI.extend(BI.YearTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-year-trigger bi-border",min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.YearTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(d){return a.editor.setErrorText(BI.isPositiveInteger(d)?c.errorTextInvalid:c.errorText),""===d||BI.isPositiveInteger(d)&&!Date.checkVoid(d,1,1,b.min,b.max)[0]},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.YearTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.YearTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.YearTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.YearTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.YearTrigger.EVENT_ERROR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-year-text",text:BI.i18nText("BI-Multi_Date_Year"),width:c.triggerWidth},width:c.triggerWidth},{el:{type:"bi.trigger_icon_button",width:c.triggerWidth},width:c.triggerWidth}]})},setValue:function(a){this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return 0|this.editor.getValue()}}),BI.YearTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.YearTrigger.EVENT_ERROR="EVENT_ERROR",BI.YearTrigger.EVENT_START="EVENT_START",BI.YearTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.year_trigger",BI.YearTrigger),BI.YearMonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearMonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-month-combo",yearBehaviors:{},monthBehaviors:{},height:25})},_init:function(){BI.YearMonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.year=BI.createWidget({type:"bi.year_combo",behaviors:b.yearBehaviors}),this.month=BI.createWidget({type:"bi.month_combo",behaviors:b.monthBehaviors}),this.year.on(BI.YearCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearMonthCombo.EVENT_CONFIRM)}),this.year.on(BI.YearCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),this.month.on(BI.MonthCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearMonthCombo.EVENT_CONFIRM)}),this.month.on(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.center",element:this,hgap:5,items:[this.year,this.month]})},setValue:function(a){a=a||{},this.month.setValue(a.month),this.year.setValue(a.year)},getValue:function(){return{year:this.year.getValue(),month:this.month.getValue()}}}),BI.YearMonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_month_combo",BI.YearMonthCombo),BI.YearQuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearQuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-quarter-combo",yearBehaviors:{},quarterBehaviors:{},height:25})},_init:function(){BI.YearQuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.year=BI.createWidget({type:"bi.year_combo",behaviors:b.yearBehaviors}),this.quarter=BI.createWidget({type:"bi.quarter_combo",behaviors:b.quarterBehaviors}),this.year.on(BI.YearCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_CONFIRM)}),this.year.on(BI.YearCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),this.quarter.on(BI.QuarterCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_CONFIRM)}),this.quarter.on(BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.center",element:this,hgap:5,items:[this.year,this.quarter]})},setValue:function(a){a=a||{},this.quarter.setValue(a.quarter),this.year.setValue(a.year)},getValue:function(){return{year:this.year.getValue(),quarter:this.quarter.getValue()}}}),BI.YearQuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_quarter_combo",BI.YearQuarterCombo),BI.AbstractAllValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractAllValueChooser.superclass._defaultConfig.apply(this,arguments),{width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(a){var b=a;return BI.isNotNull(this.items)&&BI.some(this.items,function(c,d){if(d.value===a)return b=d.text,!0}),b},_itemsCreator:function(a,b){function c(c){var d=(a.keywords||[]).slice();if(a.keyword&&d.push(a.keyword),BI.each(d,function(a,b){var d=BI.Func.getSearchResult(c,b);c=d.matched.concat(d.finded)}),a.selectedValues){var e=BI.makeObject(a.selectedValues,!0);c=BI.filter(c,function(a,b){return!e[b.value]})}return a.type===BI.MultiSelectCombo.REQ_GET_ALL_DATA?void b({items:c}):a.type===BI.MultiSelectCombo.REQ_GET_DATA_LENGTH?void b({count:c.length}):void b({items:c,hasNext:!1})}var d=this,e=this.options;e.cache&&this.items?c(this.items):e.itemsCreator({},function(a){d.items=a,c(a)})}}),BI.AllValueChooserCombo=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.combo=BI.createWidget({type:"bi.multi_select_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.combo.on(BI.MultiSelectCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.AllValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.combo.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.combo.populate.apply(this,arguments)}}),BI.AllValueChooserCombo.EVENT_CONFIRM="AllValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.all_value_chooser_combo",BI.AllValueChooserCombo),BI.AllValueChooserPane=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-pane",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.AllValueChooserPane.EVENT_CHANGE)})},setValue:function(a){this.list.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.list.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.list.populate.apply(this.list,arguments)}}),BI.AllValueChooserPane.EVENT_CHANGE="AllValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.all_value_chooser_pane",BI.AllValueChooserPane),BI.AbstractTreeValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractTreeValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn})},_initData:function(a){this.items=a;var b=BI.Tree.treeFormat(a);this.tree=new BI.Tree,this.tree.initTree(b)},_itemsCreator:function(a,b){function c(){switch(a.type){case BI.TreeView.REQ_TYPE_INIT_DATA:d._reqInitTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_ADJUST_DATA:d._reqAdjustTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_SELECT_DATA:d._reqSelectedTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA:d._reqDisplayTreeNode(a,b);break;default:d._reqTreeNode(a,b)}}var d=this,e=this.options;this.items?c():e.itemsCreator({},function(a){d._initData(a),c()})},_reqDisplayTreeNode:function(a,b){function c(a,b,g){return null==g||BI.isEmpty(g)?void BI.each(b.getChildren(),function(d,g){var h=BI.clone(a);h.push(g.value);var i=f._getChildCount(h);e(g,b.id,i),c(h,g,{})}):void BI.each(g,function(b){var h=f._getTreeNode(a,b),i=BI.clone(a);i.push(h.value),e(h,h.parent&&h.parent.id,d(g[b],i)),c(i,h,g[b])})}function d(a,b){return null==a?0:BI.isEmpty(a)?f._getChildCount(b):BI.size(a)}function e(a,b,c){g.push({id:a.id,pId:b,text:a.text+(c>0?"("+BI.i18nText("BI-Basic_Altogether")+c+BI.i18nText("BI-Basic_Count")+")":""),value:a.value,open:!0})}var f=this,g=[],h=a.selectedValues;return null==h||BI.isEmpty(h)?void b({}):(c([],this.tree.getRoot(),h),void b({items:g}))},_reqSelectedTreeNode:function(a,b){function c(a){var b=m.concat(k);if(g(a,b))if(f(b))i._deleteNode(a,b);else{var c=[],j=e(m,k,[],c);j&&BI.isNotEmptyArray(c)&&BI.each(c,function(b,c){var e=i._getNode(a,c);e?i._deleteNode(a,c):d(a,c,BI.last(c))})}if(h(a,b)){var l=[],j=!1;f(b)?j=!0:(j=e(m,k,l),b=m),j===!0&&(d(a,b,k),l.length>0&&BI.each(l,function(b,c){i._buildTree(a,c)}))}}function d(a,b,c){var d=a,e=[],f=[];BI.some(b,function(g,h){var j=d[h];if(null==j){if(0===g)return!0;if(!BI.isEmpty(d))return!0;var k=b.slice(0,g),l=i._getChildren(k);if(f.push(k),e.push(l.length),g===b.length-1&&1===l.length&&l[0]===c)for(var m=e.length-1;m>=0&&1===e[m];m--)i._deleteNode(a,f[m]);else BI.each(l,function(a,e){return g===b.length-1&&e.value===c||void(d[e.value]={})});d=d[h]}else d=j})}function e(a,b,c,d){var f=BI.clone(a);if(f.push(b),i._isMatch(a,b,l))return d&&d.push(f),!0;var g=i._getChildren(f),h=[],j=!1;return BI.each(g,function(a,b){e(f,b.value,c,d)?j=!0:h.push(b.value)}),j===!0&&BI.each(h,function(a,b){var d=BI.clone(f);d.push(b),c.push(d)}),j}function f(a){for(var b=0,c=a.length;bj._const.perPage)break}return f}function d(a,b,c,i,k){if(j._isMatch(b,c,l)){var m=i||h(b,c);return e(b,c,!1,m,!i&&f(b,c),!0,k),[!0,m]}var n=BI.clone(b);n.push(c);var o=j._getChildren(n),p=!1,m=!1,q=i||g(b,c);return BI.each(o,function(b,c){var e=d(a+1,n,c.value,q,k);e[1]===!0&&(m=!0),e[0]===!0&&(p=!0)}),p===!0&&(m=q||h(b,c)&&m,e(b,c,!0,m,!1,!1,k)),[p,m]}function e(a,b,c,d,e,f,g){var h=j._getTreeNode(a,b);g.push({id:h.id,pId:h.pId,text:h.text,value:h.value,title:h.title,isParent:h.getChildrenLength()>0,open:c,checked:d,halfCheck:e,flag:f})}function f(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&!BI.isEmpty(c))return!0})}function g(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&BI.isEmpty(c))return!0})}function h(a,b){var c=i(a);return null!=c&&BI.any(c,function(a){if(a===b)return!0})}function i(a){var b=m;return null==b?null:(BI.every(a,function(a,c){return b=b[c],null!=b}),b)}var j=this,k=[],l=a.keyword||"",m=a.selectedValues,n=a.lastSearchValue||"",o=c();BI.nextTick(function(){b({hasNext:o.length>j._const.perPage,items:k,lastSearchValue:BI.last(o)})})},_reqTreeNode:function(a,b){function c(a,b){var c={};return BI.each(a,function(a,c){b=b[c]||{}}),BI.each(b,function(a,b){if(BI.isNull(b))return void(c[a]=[0,0]);if(BI.isEmpty(b))return void(c[a]=[2,0]);var d={};BI.each(b,function(a,b){(BI.isNull(b)||BI.isEmpty(b))&&(d[a]=!0)}),c[a]=[1,BI.size(d)]}),c}function d(a,b,c,d){var f=d.checked,g=d.half,h=!1,i=!1;if(BI.has(c,a))if(1===c[a][0]){var j=BI.clone(b);j.push(a);var k=e._getChildCount(j);k>0&&k!==c[a][1]&&(i=!0)}else 2===c[a][0]&&(h=!0);var l;return l=f||i||h?(h||f)&&!g||BI.has(c,a):BI.has(c,a),[l,i]}var e=this,f=[],g=a.times,h=a.checkState||{},i=a.parentValues||[],j=a.selectedValues||{},k={};k=c(i,j);for(var l=this._getChildren(i),m=(g-1)*this._const.perPage;l[m]&&m0,checked:n[0],halfCheck:n[1]})}BI.nextTick(function(){b({items:f,hasNext:l.length>g*e._const.perPage})})},_getNode:function(a,b){for(var c=a,d=0,e=b.length;d0&&BI.isEmpty(e);)c=d[d.length-1],d=d.slice(0,d.length-1),e=this._getNode(a,d),null!=e&&delete e[c]},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){BI.has(c,b)||(c[b]={}),c=c[b]})},_isMatch:function(a,b,c){var d=this._getTreeNode(a,b),e=BI.Func.getSearchResult([d.text||d.value],c);return e.finded.length>0||e.matched.length>0},_getTreeNode:function(a,b){var c,d=this,e=0;return this.tree.traverse(function(f){if(!d.tree.isRoot(f))return!(e>a.length)&&(e===a.length&&f.value===b?(c=f,!1):f.value!==a[e]||void e++)}),c},_getChildren:function(a){if(a.length>0)var b=BI.last(a),c=this._getTreeNode(a.slice(0,a.length-1),b);else var c=this.tree.getRoot();return c.getChildren()},_getChildCount:function(a){return this._getChildren(a).length}}),BI.TreeValueChooserCombo=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&this._initData(b.items),this.combo=BI.createWidget({type:"bi.multi_tree_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),width:b.width,height:b.height}),this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.TreeValueChooserCombo.EVENT_CONFIRM="TreeValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.tree_value_chooser_combo",BI.TreeValueChooserCombo),BI.TreeValueChooserPane=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-pane",items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.pane=BI.createWidget({type:"bi.multi_select_tree",element:this,itemsCreator:BI.bind(this._itemsCreator,this)}),this.pane.on(BI.MultiSelectTree.EVENT_CHANGE,function(){a.fireEvent(BI.TreeValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(b.items)&&(this._initData(b.items),this.populate())},setSelectedValue:function(a){this.pane.setSelectedValue(a)},setValue:function(a){this.pane.setValue(a)},getValue:function(){return this.pane.getValue()},populate:function(){this.pane.populate.apply(this.pane,arguments)}}),BI.TreeValueChooserPane.EVENT_CHANGE="TreeValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.tree_value_chooser_pane",BI.TreeValueChooserPane),BI.AbstractValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(a){var b=a;return BI.isNotNull(this.items)&&BI.some(this.items,function(c,d){if(d.value===a)return b=d.text,!0}),b},_getItemsByTimes:function(a,b){for(var c=[],d=(b-1)*this._const.perPage;a[d]&&d - - + + - + diff --git a/dist/resource.css b/dist/resource.css index 5caac6fa3..ff55cead7 100644 --- a/dist/resource.css +++ b/dist/resource.css @@ -1732,31 +1732,31 @@ textarea::-webkit-scrollbar-thumb:hover { height: 101px; } .farbtastic .wheel { - background: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/third/farbtastic/wheel.png") no-repeat; + background: url("images/1x/third/farbtastic/wheel.png") no-repeat; width: 195px; height: 195px; } .farbtastic .overlay { - background: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/third/farbtastic/mask.png") no-repeat; + background: url("images/1x/third/farbtastic/mask.png") no-repeat; } .farbtastic .marker { width: 17px; height: 17px; margin: -8px 0 0 -8px; overflow: hidden; - background: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/third/farbtastic/marker.png") no-repeat; + background: url("images/1x/third/farbtastic/marker.png") no-repeat; } .bi-display-tree .ztree * { color: #999999; } .bi-display-tree .ztree li span.button.switch.center_open { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x//icon/tree-vertical-line-3.png"); + background-image: url("images/1x//icon/tree-vertical-line-3.png"); } .bi-display-tree .ztree li span.button.switch.roots_open { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x//icon/tree-vertical-line-2.png"); + background-image: url("images/1x//icon/tree-vertical-line-2.png"); } .bi-display-tree .ztree li span.button.switch.bottom_open { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x//icon/tree-vertical-line-4.png"); + background-image: url("images/1x//icon/tree-vertical-line-4.png"); } .bi-display-tree .ztree li a, .bi-display-tree .ztree li span { @@ -1803,10 +1803,10 @@ website: http://code.google.com/p/jquerytree/ padding: 0 0 0 18px; } .ztree li ul.line { - background: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/tree-vertical-line-1.png") 0 0 repeat-y; + background: url("images/1x/icon/tree-vertical-line-1.png") 0 0 repeat-y; } .bi-theme-dark .ztree li ul.line { - background: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/dark/tree-vertical-line-1.png") 0 0 repeat-y; + background: url("images/1x/icon/dark/tree-vertical-line-1.png") 0 0 repeat-y; } .ztree li a { padding: 1px 3px 0 0; @@ -1861,8 +1861,8 @@ website: http://code.google.com/p/jquerytree/ background-color: transparent; background-repeat: no-repeat; background-attachment: scroll; - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/third/ztree/img/zTreeStandard.png"); - *background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/third/ztree/img/zTreeStandard.gif"); + background-image: url("images/1x/third/ztree/img/zTreeStandard.png"); + *background-image: url("images/1x/third/ztree/img/zTreeStandard.gif"); } .ztree li span.button.chk { width: 16px; @@ -1871,31 +1871,31 @@ website: http://code.google.com/p/jquerytree/ cursor: auto; } .ztree li span.button.chk.checkbox_false_full { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/check-box-normal.png"); + background-image: url("images/1x/icon/check-box-normal.png"); } .ztree li span.button.chk.checkbox_false_full_focus { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/check-box-normal.png"); + background-image: url("images/1x/icon/check-box-normal.png"); } .ztree li span.button.chk.checkbox_false_part { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/half_selected.png"); + background-image: url("images/1x/icon/half_selected.png"); } .ztree li span.button.chk.checkbox_false_part_focus { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/half_selected.png"); + background-image: url("images/1x/icon/half_selected.png"); } .ztree li span.button.chk.checkbox_false_disable { background-position: 0 -56px; } .ztree li span.button.chk.checkbox_true_full { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/check-box-active.png"); + background-image: url("images/1x/icon/check-box-active.png"); } .ztree li span.button.chk.checkbox_true_full_focus { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/check-box-active.png"); + background-image: url("images/1x/icon/check-box-active.png"); } .ztree li span.button.chk.checkbox_true_part { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/half_selected.png"); + background-image: url("images/1x/icon/half_selected.png"); } .ztree li span.button.chk.checkbox_true_part_focus { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/half_selected.png"); + background-image: url("images/1x/icon/half_selected.png"); } .ztree li span.button.chk.checkbox_true_disable { background-position: -14px -56px; @@ -1935,52 +1935,52 @@ website: http://code.google.com/p/jquerytree/ height: 25px; } .ztree li span.button.root_open { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/tree-expand-1.png"); + background-image: url("images/1x/icon/tree-expand-1.png"); } .bi-theme-dark .ztree li span.button.root_open { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/dark/tree-expand-1.png"); + background-image: url("images/1x/icon/dark/tree-expand-1.png"); } .ztree li span.button.root_close { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/tree-collapse-1.png"); + background-image: url("images/1x/icon/tree-collapse-1.png"); } .bi-theme-dark .ztree li span.button.root_close { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/dark/tree-collapse-1.png"); + background-image: url("images/1x/icon/dark/tree-collapse-1.png"); } .ztree li span.button.roots_open { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/tree-expand-2.png"); + background-image: url("images/1x/icon/tree-expand-2.png"); } .bi-theme-dark .ztree li span.button.roots_open { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/dark/tree-expand-2.png"); + background-image: url("images/1x/icon/dark/tree-expand-2.png"); } .ztree li span.button.roots_close { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/tree-collapse-2.png"); + background-image: url("images/1x/icon/tree-collapse-2.png"); } .bi-theme-dark .ztree li span.button.roots_close { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/dark/tree-collapse-2.png"); + background-image: url("images/1x/icon/dark/tree-collapse-2.png"); } .ztree li span.button.center_open { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/tree-expand-3.png"); + background-image: url("images/1x/icon/tree-expand-3.png"); } .bi-theme-dark .ztree li span.button.center_open { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/dark/tree-expand-3.png"); + background-image: url("images/1x/icon/dark/tree-expand-3.png"); } .ztree li span.button.center_close { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/tree-collapse-3.png"); + background-image: url("images/1x/icon/tree-collapse-3.png"); } .bi-theme-dark .ztree li span.button.center_close { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/dark/tree-collapse-3.png"); + background-image: url("images/1x/icon/dark/tree-collapse-3.png"); } .ztree li span.button.bottom_open { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/tree-expand-4.png"); + background-image: url("images/1x/icon/tree-expand-4.png"); } .bi-theme-dark .ztree li span.button.bottom_open { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/dark/tree-expand-4.png"); + background-image: url("images/1x/icon/dark/tree-expand-4.png"); } .ztree li span.button.bottom_close { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/tree-collapse-4.png"); + background-image: url("images/1x/icon/tree-collapse-4.png"); } .bi-theme-dark .ztree li span.button.bottom_close { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/dark/tree-collapse-4.png"); + background-image: url("images/1x/icon/dark/tree-collapse-4.png"); } .ztree li span.button.noline_open { background-position: -92px -72px; @@ -1992,22 +1992,22 @@ website: http://code.google.com/p/jquerytree/ background: none; } .ztree li span.button.roots_docu { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/tree-vertical-line-2.png"); + background-image: url("images/1x/icon/tree-vertical-line-2.png"); } .bi-theme-dark .ztree li span.button.roots_docu { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/dark/tree-vertical-line-2.png"); + background-image: url("images/1x/icon/dark/tree-vertical-line-2.png"); } .ztree li span.button.center_docu { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/tree-vertical-line-3.png"); + background-image: url("images/1x/icon/tree-vertical-line-3.png"); } .bi-theme-dark .ztree li span.button.center_docu { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/dark/tree-vertical-line-3.png"); + background-image: url("images/1x/icon/dark/tree-vertical-line-3.png"); } .ztree li span.button.bottom_docu { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/tree-vertical-line-4.png"); + background-image: url("images/1x/icon/tree-vertical-line-4.png"); } .bi-theme-dark .ztree li span.button.bottom_docu { - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/icon/dark/tree-vertical-line-4.png"); + background-image: url("images/1x/icon/dark/tree-vertical-line-4.png"); } .ztree li span.button.noline_docu { background: none; @@ -2045,7 +2045,7 @@ website: http://code.google.com/p/jquerytree/ .ztree li span.button.ico_loading { width: 0px; margin-right: 2px; - background: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/third/ztree/img/loading.gif") no-repeat scroll 0 0 transparent; + background: url("images/1x/third/ztree/img/loading.gif") no-repeat scroll 0 0 transparent; vertical-align: top; *vertical-align: middle; } @@ -2066,8 +2066,8 @@ span.tmpzTreeMove_arrow { background-repeat: no-repeat; background-attachment: scroll; background-position: -110px -80px; - background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/third/ztree/img/zTreeStandard.png"); - *background-image: url("${remoteServletURL}?op=resource&resource=/com/fr/bi/web/images/1x/third/ztree/img/zTreeStandard.gif"); + background-image: url("images/1x/third/ztree/img/zTreeStandard.png"); + *background-image: url("images/1x/third/ztree/img/zTreeStandard.gif"); } ul.ztree.zTreeDragUL { margin: 0; diff --git a/dist/slider.js b/dist/slider.js index bc751db5a..d28871148 100644 --- a/dist/slider.js +++ b/dist/slider.js @@ -137,7 +137,9 @@ BI.SingleSlider = BI.inherit(BI.Widget, { } }); this.label.on(BI.SignEditor.EVENT_CONFIRM, function () { - var percent = self._getPercentByValue(this.getValue()); + var v = BI.parseFloat(this.getValue()); + self.value = v; + var percent = self._getPercentByValue(v); var significantPercent = BI.parseFloat(percent.toFixed(1)); self._setAllPosition(significantPercent); self.fireEvent(BI.SingleSlider.EVENT_CHANGE); diff --git a/dist/vancharts-all.js b/dist/vancharts-all.js deleted file mode 100644 index d12b37479..000000000 --- a/dist/vancharts-all.js +++ /dev/null @@ -1,167 +0,0 @@ -/** - * @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/almond for details - */ - -// Copyright 2006 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/*! Hammer.JS - v2.0.7 - 2016-04-22 - * http://hammerjs.github.io/ - * - * Copyright (c) 2016 Jorik Tangelder; - * Licensed under the MIT license */ - -//Copyright (c) 2013, Baidu Inc. -// All rights reserved. -// -// Redistribution and use of this software in source and binary forms, with or -// without modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright notice, this -//list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -//and/or other materials provided with the distribution. -// -// Neither the name of Baidu Inc. nor the names of its contributors may be used -//to endorse or promote products derived from this software without specific -//prior written permission of Baidu Inc. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -//IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -//DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -//ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -//(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -//ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -//(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// document.body.appendChild(c); - -// -//Copyright (c) 2014 Ga?tan Renaudeau -// -//Permission is hereby granted, free of charge, to any person -//obtaining a copy of this software and associated documentation -//files (the "Software"), to deal in the Software without -//restriction, including without limitation the rights to use, -// copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the -//Software is furnished to do so, subject to the following -//conditions: -// -// The above copyright notice and this permission notice shall be -//included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -//OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -//NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -//HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -//FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -//OTHER DEALINGS IN THE SOFTWARE. - -/* - * heatmap.js v2.0.5 | JavaScript Heatmap Library - * - * Copyright 2008-2016 Patrick Wied - All rights reserved. - * Dual licensed under MIT and Beerware license - * - * :: 2016-09-05 01:16 - */ - -/** - * Copyright (c) 2010-2016, Vladimir Agafonkin - Copyright (c) 2010-2011, CloudMade - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, are - permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of - conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list - of conditions and the following disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - **/ - -/* - Copyright (c) JS Foundation and other contributors - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation - files (the "Software"), to deal in the Software without - restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following - conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - OTHER DEALINGS IN THE SOFTWARE. - - https://github.com/moment/moment - */ - -!function(t,e){"function"==typeof define&&define.amd?define([],e):t.VanCharts=e()}(this,function(){var requirejs,require,define;!function(t){function e(t,e){return v.call(t,e)}function i(t,e){var i,n,r,a,o,s,h,l,u,c,d,f=e&&e.split("/"),p=g.map,m=p&&p["*"]||{};if(t&&"."===t.charAt(0))if(e){for(t=t.split("/"),o=t.length-1,g.nodeIdCompat&&y.test(t[o])&&(t[o]=t[o].replace(y,"")),t=f.slice(0,f.length-1).concat(t),u=0;u0&&(t.splice(u-1,2),u-=2)}t=t.join("/")}else 0===t.indexOf("./")&&(t=t.substring(2));if((f||m)&&p){for(i=t.split("/"),u=i.length;u>0;u-=1){if(n=i.slice(0,u).join("/"),f)for(c=f.length;c>0;c-=1)if(r=p[f.slice(0,c).join("/")],r&&(r=r[n])){a=r,s=u;break}if(a)break;!h&&m&&m[n]&&(h=m[n],l=u)}!a&&h&&(a=h,s=l),a&&(i.splice(0,s,a),t=i.join("/"))}return t}function n(e,i){return function(){var n=_.call(arguments,0);return"string"!=typeof n[0]&&1===n.length&&n.push(null),u.apply(t,n.concat([e,i]))}}function r(t){return function(e){return i(e,t)}}function a(t){return function(e){f[t]=e}}function o(i){if(e(p,i)){var n=p[i];delete p[i],m[i]=!0,l.apply(t,n)}if(!e(f,i)&&!e(m,i))throw new Error("No "+i);return f[i]}function s(t){var e,i=t?t.indexOf("!"):-1;return i>-1&&(e=t.substring(0,i),t=t.substring(i+1,t.length)),[e,t]}function h(t){return function(){return g&&g.config&&g.config[t]||{}}}var l,u,c,d,f={},p={},g={},m={},v=Object.prototype.hasOwnProperty,_=[].slice,y=/\.js$/;c=function(t,e){var n,a=s(t),h=a[0];return t=a[1],h&&(h=i(h,e),n=o(h)),h?t=n&&n.normalize?n.normalize(t,r(e)):i(t,e):(t=i(t,e),a=s(t),h=a[0],t=a[1],h&&(n=o(h))),{f:h?h+"!"+t:t,n:t,pr:h,p:n}},d={require:function(t){return n(t)},exports:function(t){var e=f[t];return"undefined"!=typeof e?e:f[t]={}},module:function(t){return{id:t,uri:"",exports:f[t],config:h(t)}}},l=function(i,r,s,h){var l,u,g,v,_,y,x=[],b=typeof s;if(h=h||i,"undefined"===b||"function"===b){for(r=!r.length&&s.length?["require","exports","module"]:r,_=0;_n;n++)for(var a=0;3>a;a++){for(var o=0,s=0;3>s;s++)o+=t[n][s]*e[s][a];i[n][a]=o}return i}function o(t,e){e.fillStyle=t.fillStyle,e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.shadowBlur=t.shadowBlur,e.shadowColor=t.shadowColor,e.shadowOffsetX=t.shadowOffsetX,e.shadowOffsetY=t.shadowOffsetY,e.strokeStyle=t.strokeStyle,e.globalAlpha=t.globalAlpha,e.arcScaleX_=t.arcScaleX_,e.arcScaleY_=t.arcScaleY_,e.lineScale_=t.lineScale_}function s(t){var e,i=1;if(t=String(t),"rgb"==t.substring(0,3)){var n=t.indexOf("(",3),r=t.indexOf(")",n+1),a=t.substring(n+1,r).split(",");e="#";for(var o=0;3>o;o++)e+=L[Number(a[o])];4===a.length&&"a"===t.substr(3,1)&&(i=a[3])}else e=t;return{color:e,alpha:i}}function h(t){switch(t){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function l(t){this.m_=r(),this.mStack_=[],this.aStack_=[],this.currentPath_=[],this.strokeStyle="#000",this.fillStyle="#000",this.font="12px sans-serif",this.lineWidth=1,this.lineJoin="miter",this.lineCap="butt",this.miterLimit=1*b,this.globalAlpha=1,this.canvas=t;var e=t.ownerDocument.createElement("div");e.style.width=t.clientWidth+"px",e.style.height=t.clientHeight+"px",e.style.position="absolute",t.appendChild(e),this.element_=e,this.arcScaleX_=1,this.arcScaleY_=1,this.lineScale_=1}function u(t,e,i,n){t.currentPath_.push({type:"bezierCurveTo",cp1x:e.x,cp1y:e.y,cp2x:i.x,cp2y:i.y,x:n.x,y:n.y}),t.currentX_=n.x,t.currentY_=n.y}function c(t){for(var e=0;3>e;e++)for(var i=0;2>i;i++)if(!isFinite(t[e][i])||isNaN(t[e][i]))return!1;return!0}function d(t,e,i){if(c(e)&&(t.m_=e,i)){var n=e[0][0]*e[1][1]-e[0][1]*e[1][0];t.lineScale_=x(y(n))}}function f(t){this.type_=t,this.x0_=0,this.y0_=0,this.r0_=0,this.x1_=0,this.y1_=0,this.r1_=0,this.colors_=[]}function p(){}var g=Math,m=g.round,v=g.sin,_=g.cos,y=g.abs,x=g.sqrt,b=10,T=b/2,A=Array.prototype.slice,C={init:function(t){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var i=t||document;i.createElement("vancanvas"),i.attachEvent("onreadystatechange",e(this.init_,this,i))}},init_:function(t){if(t.namespaces){if(t.namespaces.g_vml_||t.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML"),t.namespaces.g_o_||t.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML"),!t.styleSheets.ex_canvas_){var e=t.createStyleSheet();e.owningElement.id="ex_canvas_",e.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}for(var i=t.getElementsByTagName("vancanvas"),n=0;nP;P++)for(var M=0;16>M;M++)L[16*P+M]=P.toString(16)+M.toString(16);var w=l.prototype;w.clearRect=function(){this.element_.innerHTML=""},w.beginPath=function(){this.currentPath_=[]},w.moveTo=function(t,e){var i=this.getCoords_(t,e);this.currentPath_.push({type:"moveTo",x:i.x,y:i.y}),this.currentX_=i.x,this.currentY_=i.y},w.lineTo=function(t,e){var i=this.getCoords_(t,e);this.currentPath_.push({type:"lineTo",x:i.x,y:i.y}),this.currentX_=i.x,this.currentY_=i.y},w.bezierCurveTo=function(t,e,i,n,r,a){var o=this.getCoords_(r,a),s=this.getCoords_(t,e),h=this.getCoords_(i,n);u(this,s,h,o)},w.quadraticCurveTo=function(t,e,i,n){var r=this.getCoords_(t,e),a=this.getCoords_(i,n),o={x:this.currentX_+2/3*(r.x-this.currentX_),y:this.currentY_+2/3*(r.y-this.currentY_)},s={x:o.x+(a.x-this.currentX_)/3,y:o.y+(a.y-this.currentY_)/3};u(this,o,s,a)},w.arc=function(t,e,i,n,r,a){i*=b;var o=a?"at":"wa",s=t+_(n)*i-T,h=e+v(n)*i-T,l=t+_(r)*i-T,u=e+v(r)*i-T;s!=l||a||(s+=.125);var c=this.getCoords_(t,e),d=this.getCoords_(s,h),f=this.getCoords_(l,u);this.currentPath_.push({type:o,x:c.x,y:c.y,radius:i,xStart:d.x,yStart:d.y,xEnd:f.x,yEnd:f.y})},w.rect=function(t,e,i,n){this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+n),this.lineTo(t,e+n),this.closePath()},w.strokeRect=function(t,e,i,n){var r=this.currentPath_;this.beginPath(),this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+n),this.lineTo(t,e+n),this.closePath(),this.stroke(),this.currentPath_=r},w.fillRect=function(t,e,i,n){var r=this.currentPath_;this.beginPath(),this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+n),this.lineTo(t,e+n),this.closePath(),this.fill(),this.currentPath_=r},w.createLinearGradient=function(t,e,i,n){var r=new f("gradient");return r.x0_=t,r.y0_=e,r.x1_=i,r.y1_=n,r},w.createRadialGradient=function(t,e,i,n,r,a){var o=new f("gradientradial");return o.x0_=t,o.y0_=e,o.r0_=i,o.x1_=n,o.y1_=r,o.r1_=a,o},w.drawImage=function(t,e){t.getContext&&(this.element_.innerHTML+=t.getContext("2d").element_.innerHTML);var i,n,r,a,o,s,h,l,u=t.runtimeStyle.width,c=t.runtimeStyle.height;t.runtimeStyle.width="auto",t.runtimeStyle.height="auto";var d=t.width,f=t.height;if(t.runtimeStyle.width=u,t.runtimeStyle.height=c,3===arguments.length)i=arguments[1],n=arguments[2],o=s=0,h=r=d,l=a=f;else if(5===arguments.length)i=arguments[1],n=arguments[2],r=arguments[3],a=arguments[4],o=s=0,h=d,l=f;else{if(9!==arguments.length)throw Error("Invalid number of arguments");o=arguments[1],s=arguments[2],h=arguments[3],l=arguments[4],i=arguments[5],n=arguments[6],r=arguments[7],a=arguments[8]}var p=this.getCoords_(i,n),v=[],_=10,y=10;if(v.push(" ','",""),this.element_.insertAdjacentHTML("BeforeEnd",v.join(""))},w.stroke=function(t){var e=[],i=s(t?this.fillStyle:this.strokeStyle),n=i.color,r=i.alpha*this.globalAlpha,a=10,o=10;e.push("u.x)&&(u.x=f.x),(null==l.y||f.yu.y)&&(u.y=f.y))}if(e.push(' ">'),t)if(this.fillStyle&&"object"==typeof this.fillStyle){var p=this.fillStyle,v=0,_={x:0,y:0},y=0,x=1;if("gradient"==p.type_){var T=p.x0_/this.arcScaleX_,A=p.y0_/this.arcScaleY_,C=p.x1_/this.arcScaleX_,L=p.y1_/this.arcScaleY_,P=this.getCoords_(T,A),M=this.getCoords_(C,L),w=M.x-P.x,E=M.y-P.y;v=180*Math.atan2(w,E)/Math.PI,0>v&&(v+=360),1e-6>v&&(v=0)}else{var P=this.getCoords_(p.x0_,p.y0_),S=u.x-l.x,O=u.y-l.y;_={x:(P.x-l.x)/S,y:(P.y-l.y)/O},S/=this.arcScaleX_*b,O/=this.arcScaleY_*b;var k=g.max(S,O);y=2*p.r0_/k,x=2*p.r1_/k-y}var D=p.colors_;D.sort(function(t,e){return t.offset-e.offset});for(var R=D.length,B=D[0].color,I=D[R-1].color,G=D[0].alpha*this.globalAlpha,N=D[R-1].alpha*this.globalAlpha,H=[],c=0;R>c;c++){var z=D[c];H.push(z.offset*x+y+" "+z.color)}e.push('')}else e.push('');else{var U=this.lineScale_*this.lineWidth;1>U&&(r*=U),e.push("')}e.push(""),this.element_.insertAdjacentHTML("beforeEnd",e.join(""))},w.fill=function(){this.stroke(!0)},w.closePath=function(){this.currentPath_.push({type:"close"})},w.getCoords_=function(t,e){var i=this.m_;return{x:b*(t*i[0][0]+e*i[1][0]+i[2][0])-T,y:b*(t*i[0][1]+e*i[1][1]+i[2][1])-T}},w.save=function(){var t={};o(this,t),this.aStack_.push(t),this.mStack_.push(this.m_),this.m_=a(r(),this.m_)},w.restore=function(){o(this.aStack_.pop(),this),this.m_=this.mStack_.pop()},w.translate=function(t,e){var i=[[1,0,0],[0,1,0],[t,e,1]];d(this,a(i,this.m_),!1)},w.rotate=function(t){var e=_(t),i=v(t),n=[[e,i,0],[-i,e,0],[0,0,1]];d(this,a(n,this.m_),!1)},w.scale=function(t,e){this.arcScaleX_*=t,this.arcScaleY_*=e;var i=[[t,0,0],[0,e,0],[0,0,1]];d(this,a(i,this.m_),!0)},w.transform=function(t,e,i,n,r,o){var s=[[t,e,0],[i,n,0],[r,o,1]];d(this,a(s,this.m_),!0)},w.setTransform=function(t,e,i,n,r,a){var o=[[t,e,0],[i,n,0],[r,a,1]];d(this,o,!0)},w.clip=function(){},w.arcTo=function(){},w.createPattern=function(){return new p},w.measureText=function(t){var e=document.createElement("span");e.style.font=this.font,e.innerHTML=t;var i=document.getElementsByTagName("body")[0];i.appendChild(e);var n=e.offsetWidth;return i.removeChild(e),{width:n+1}},w.fillText=function(t,e,i){var n=[],r=this.font.split("px")[0].replace(/(^\s+)|(\s+$)/g,""),a=/^\d+$/.test(r)?parseInt(r):0;n.push(''+t," ",""),this.element_.insertAdjacentHTML("BeforeEnd",n.join(""))},f.prototype.addColorStop=function(t,e){e=s(e),this.colors_.push({offset:t,color:e.color,alpha:e.alpha})},VanCanvasManager=C,CanvasRenderingContext2D=l,CanvasGradient=f,CanvasPattern=p}(),define("excanvas",function(){}),function(t,e,i,n){"use strict";function r(t,e,i){return setTimeout(l(t,i),e)}function a(t,e,i){return Array.isArray(t)?(o(t,i[e],i),!0):!1}function o(t,e,i){var r;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==n)for(r=0;r\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",a=t.console&&(t.console.warn||t.console.log);return a&&a.call(t.console,r,n),e.apply(this,arguments)}}function h(t,e,i){var n,r=e.prototype;n=t.prototype=Object.create(r),n.constructor=t,n._super=r,i&&ct(n,i)}function l(t,e){return function(){return t.apply(e,arguments)}}function u(t,e){return typeof t==pt?t.apply(e?e[0]||n:n,e):t}function c(t,e){return t===n?e:t}function d(t,e,i){return o(m(e),function(e){t.addEventListener?"wheel"===e?t.addEventListener("onwheel"in t?"wheel":"mousewheel",i,!1):t.addEventListener(e,i,!1):t.attachEvent&&("wheel"==e&&(e="mousewheel"),t.attachEvent("on"+e,i))}),this}function f(t,e,i){o(m(e),function(e){t.removeEventListener?"wheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",i,!1):t.removeEventListener(e,i,!1):t.detachEvent&&("wheel"==e&&(e="mousewheel"),t.detachEvent("on"+e,i))})}function p(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function g(t,e){return t.indexOf(e)>-1}function m(t){return t.trim().split(/\s+/g)}function v(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;ni[e]}):n.sort()),n}function x(t,e){for(var i,r,a=e.charAt(0).toUpperCase()+e.slice(1),o=0;o1&&!i.firstMultiple?i.firstMultiple=E(e):1===r&&(i.firstMultiple=!1);var a=i.firstInput,o=i.firstMultiple,s=o?o.center:a.center,h=e.center=S(n);e.timeStamp=yt(),e.deltaTime=e.timeStamp-a.timeStamp,e.angle=R(s,h),e.distance=D(s,h),M(i,e),e.offsetDirection=k(e.deltaX,e.deltaY);var l=O(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=_t(l.x)>_t(l.y)?l.x:l.y,e.scale=o?I(o.pointers,n):1,e.rotation=o?B(o.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,w(i,e);var u=t.element;p(e.srcEvent.target,u)&&(u=e.srcEvent.target),e.target=u}function M(t,e){var i=e.center,n=t.offsetDelta||{},r=t.prevDelta||{},a=t.prevInput||{};(e.eventType===kt||a.eventType===Rt)&&(r=t.prevDelta={x:a.deltaX||0,y:a.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=r.x+(i.x-n.x),e.deltaY=r.y+(i.y-n.y)}function w(t,e){var i,r,a,o,s=t.lastInterval||e,h=e.timeStamp-s.timeStamp;if(e.eventType!=Bt&&(h>Ot||s.velocity===n)){var l=e.deltaX-s.deltaX,u=e.deltaY-s.deltaY,c=O(h,l,u);r=c.x,a=c.y,i=_t(c.x)>_t(c.y)?c.x:c.y,o=k(l,u),t.lastInterval=e}else i=s.velocity,r=s.velocityX,a=s.velocityY,o=s.direction;e.velocity=i,e.velocityX=r,e.velocityY=a,e.direction=o}function E(t){for(var e=[],i=0;ir;)i+=t[r].clientX,n+=t[r].clientY,r++;return{x:vt(i/e),y:vt(n/e)}}function O(t,e,i){return{x:e/t||0,y:i/t||0}}function k(t,e){return t===e?It:_t(t)>=_t(e)?0>t?Gt:Nt:0>e?Ht:zt}function D(t,e,i){i||(i=Wt);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return Math.sqrt(n*n+r*r)}function R(t,e,i){i||(i=Wt);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return 180*Math.atan2(r,n)/Math.PI}function B(t,e){return R(e[1],e[0],Xt)+R(t[1],t[0],Xt)}function I(t,e){return D(e[0],e[1],Xt)/D(t[0],t[1],Xt)}function G(){this.evEl=qt,this.evWin=Zt,this.pressed=!1,A.apply(this,arguments)}function N(){this.evEl=Jt,this.evWin=$t,A.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function H(){this.evTarget=ee,this.evWin=ie,this.started=!1,A.apply(this,arguments)}function z(t,e){var i=_(t.touches),n=_(t.changedTouches);return e&(Rt|Bt)&&(i=y(i.concat(n),"identifier",!0)),[i,n]}function U(){this.evTarget=re,this.targetIds={},A.apply(this,arguments)}function F(t,e){var i=_(t.touches),n=this.targetIds;if(e&(kt|Dt)&&1===i.length)return n[i[0].identifier]=!0,[i,i];var r,a,o=_(t.changedTouches),s=[],h=this.target;if(a=i.filter(function(t){return p(t.target,h)}),e===kt)for(r=0;r-1&&n.splice(t,1)};setTimeout(r,ae)}}function Y(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n=a&&oe>=o)return!0}return!1}function q(t,e){this.manager=t,this.set(e)}function Z(t){if(g(t,de))return de;var e=g(t,fe),i=g(t,pe);return e&&i?ce:e||i?e?fe:pe:g(t,ce)?ce:ue}function j(){if(!he)return!1;var e={},i=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){e[n]=i?t.CSS.supports("touch-action",n):!0}),e}function Q(t){this.options=ct({},this.defaults,t||{}),this.id=b(),this.manager=null,this.options.enable=c(this.options.enable,!0),this.state=me,this.simultaneous={},this.requireFail=[]}function K(t){return t&be?"cancel":t&ye?"end":t&_e?"move":t&ve?"start":""}function J(t){return t==zt?"down":t==Ht?"up":t==Gt?"left":t==Nt?"right":""}function $(t,e){var i=e.manager;return i?i.get(t):t}function tt(){Q.apply(this,arguments)}function et(){tt.apply(this,arguments),this.pX=null,this.pY=null}function it(){tt.apply(this,arguments)}function nt(){Q.apply(this,arguments),this._timer=null,this._input=null}function rt(){tt.apply(this,arguments)}function at(){tt.apply(this,arguments)}function ot(){Q.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function st(t,e){return e=e||{},e.recognizers=c(e.recognizers,st.defaults.preset),new ht(t,e)}function ht(t,e){this.options=ct({},st.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=C(this),this.touchAction=new q(this,this.options.touchAction),lt(this,!0),o(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function lt(t,e){var i=t.element;if(i.style){var n;o(t.options.cssProps,function(r,a){n=x(i.style,a),e?(t.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=t.oldCssProps[n]||""}),e||(t.oldCssProps={})}}function ut(t,i){var n=e.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=i,i.target.dispatchEvent(n)}var ct,dt=["","webkit","Moz","MS","ms","o"],ft=e.createElement("div"),pt="function",gt=function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},mt=!t.SVGSVGElement,vt=Math.round,_t=Math.abs,yt=Date.now;ct="function"!=typeof Object.assign?function(t){if(t===n||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;is&&(e.push(t),s=e.length-1):r&(Rt|Bt)&&(i=!0);var h={pointers:e,changedPointers:[t],pointerType:a,srcEvent:t};if(0>s){if(-1!=Kt.indexOf(t.type)){var l=this.manager.handlers[t.type]&&this.manager.handlers[t.type].slice();if(l&&l.length)for(var u=0;u-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){i.manager.emit(e,t)}var i=this,n=this.state;ye>n&&e(i.options.event+K(n)),e(i.options.event),t.additionalEvent&&e(t.additionalEvent),n>=ye&&e(i.options.event+K(n))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=Te)},canEmit:function(){for(var t=0;ta?Gt:Nt,i=a!=this.pX,n=Math.abs(t.deltaX)):(r=0===o?It:0>o?Ht:zt,i=o!=this.pY,n=Math.abs(t.deltaY))),t.direction=r,h&&i&&n>e.threshold&&r&e.direction},attrTest:function(t){return tt.prototype.attrTest.call(this,t)&&(this.state&ve||!(this.state&ve)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=J(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),h(it,tt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[de]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ve)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),h(nt,Q,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ue]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distancee.time;if(this._input=t,!n||!i||t.eventType&(Rt|Bt)&&!a)this.reset();else if(t.eventType&kt)this.reset(),this._timer=r(function(){this.state=xe,this.tryEmit()},e.time,this);else if(t.eventType&Rt)return xe;return Te},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===xe&&(t&&t.eventType&Rt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=yt(),this.manager.emit(this.options.event,this._input)))}}),h(rt,tt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[de]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ve)}}),h(at,tt,{defaults:{event:"swipe", - threshold:10,velocity:.3,direction:Ut|Ft,pointers:1},getTouchAction:function(){return et.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Ut|Ft)?e=t.overallVelocity:i&Ut?e=t.overallVelocityX:i&Ft&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&_t(e)>this.options.velocity&&t.eventType&Rt},emit:function(t){var e=J(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),h(ot,Q,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ce]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance=e[1]&&(t=e[1]),t}function i(t,e){if("function"!=typeof e)throw new TypeError;for(var i=t?t.length:0,n=0;i>n;n++)t[n]=e(t[n]);return t}function n(n){if(y[n]&&(n=y[n]),x[n])return x[n].slice();if(n=t(n),/^#[\da-f]{3}$/i.test(n)){n=parseInt(n.slice(1),16);var r=(3840&n)<<8,a=(240&n)<<4,o=15&n;n="#"+((1<<24)+(r<<4)+r+(a<<4)+a+(o<<4)+o).toString(16).slice(1)}var r=n.match(T);if(!r)return x[n]=b,b.slice();var s,h,l,u=[];if(r[2])s=r[2].replace("#","").split(""),l=[s[0]+s[1],s[2]+s[3],s[4]+s[5]],u=i(l,function(t){return e(parseInt(t,16),[0,255])});else if(r[4]){var c=r[4].split(",");h=c[3],l=c.slice(0,3),u=i(l,function(t){return t=Math.floor(t.indexOf("%")>0?2.55*parseInt(t,0):t),e(t,[0,255])}),"undefined"!=typeof h&&u.push(e(parseFloat(h),[0,1]))}return 3===u.length&&u.push(1),x[n]=u.slice(),u}function r(t,n){if(n=n||"rgb",t&&(3===t.length||4===t.length)){if(t=i(t,function(t){return t>1?Math.ceil(t):t}),n.indexOf("hex")>-1)return"#"+((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1);if(n.indexOf("hs")>-1){var r=i(t.slice(1,3),function(t){return t+"%"});t[1]=r[0],t[2]=r[1]}return n.indexOf("a")>-1?(3===t.length&&t.push(1),t[3]=e(t[3],[0,1]),n+"("+t.slice(0,4).join(", ")+")"):n+"("+t.slice(0,3).join(", ")+")"}}function a(t){for(var i=n(t),a=[],o=0;3>o;o++){var s=i[o];128>=s?a.push(e(s-(255-s)*(255-2*s)/(2*s),[0,255])):a.push(e(s+s*(2*s-255)/(2*(255-s)),[0,255]))}var h=[];for(o=0;3>o;o++)h.push(Math.round(.65*i[o]+.35*a[o]));return r(h,"rgb")}function o(t,e){var i=n(t);i.length=3;for(var a=0;3>a;a++)i[a]=parseInt(i[a]/e,10);return r(i,"rgb")}function s(t){var e=n(t);e.length=3;for(var i=0;2>i;i++)e[i]=parseInt(.95*e[i],10);return r(e,"rgb")}function h(t,e){var i=n(t);return i[3]=e,r(i,"rgba")}function l(t,e,i,a){var o=n(t),s=d(o[0],o[1],o[2]);s[0]+=e,s[1]+=i,s[2]+=a;var h=u(s[0],s[1],s[2]);return r(h,"rgb")}function u(t,e,i){e=Math.min(1,Math.max(0,e)),i=Math.min(1,Math.max(0,i));var n=0,r=0,a=0;if(0===e)n=r=a=255*i+.5;else{var o=6*(t-Math.floor(t)),s=o-Math.floor(o),h=i*(1-e),l=i*(1-e*s),u=i*(1-e*(1-s));switch(Math.floor(o)){case 0:n=255*i+.5,r=255*u+.5,a=255*h+.5;break;case 1:n=255*l+.5,r=255*i+.5,a=255*h+.5;break;case 2:n=255*h+.5,r=255*i+.5,a=255*u+.5;break;case 3:n=255*h+.5,r=255*l+.5,a=255*i+.5;break;case 4:n=255*u+.5,r=255*h+.5,a=255*i+.5;break;case 5:n=255*i+.5,r=255*h+.5,a=255*l+.5}}var c=[];return c.push(Math.floor(n)),c.push(Math.floor(r)),c.push(Math.floor(a)),c}function c(t,e){t=t||"blue",e=e||1;for(var i=n(t),a=d(i[0],i[1],i[2]),o=[],s=a[0],h=a[1],l=a[2],c=0;e>c;c++){var f=h*(1-c/e),p=l+c*(1-l)/e;o.push(r(u(s,f,p)))}return o}function d(t,e,i){var n,r,a,o=[3],s=t>e?t:e;i>s&&(s=i);var h=e>t?t:e;if(h>i&&(h=i),a=s/255,r=0!==s?(s-h)/s:0,0===r)n=0;else{var l=(s-t)/(s-h),u=(s-e)/(s-h),c=(s-i)/(s-h);n=t==s?c-u:e==s?2+l-c:4+u-l,n/=6,0>n&&(n+=1)}return o[0]=n,o[1]=r,o[2]=a,o}function f(t){return t&&"string"==typeof t&&-1!=t.indexOf("rgba")?n(t)[3]:1}function p(t){return t&&"string"==typeof t&&-1!=t.indexOf("rgba")?f(t):void 0}function g(t){return m(t).hex}function m(t){var e,i,a,o,s=r(n(t),"rgba"),h=/rgba?\((\d{1,3}),(\d{1,3}),(\d{1,3})(,([.\d]+))?\)/,l=s.replace(/\s+/g,"").match(h);return e=(+l[1]).toString(16),e=1===e.length?"0"+e:e,i=(+l[2]).toString(16),i=1===i.length?"0"+i:i,a=(+l[3]).toString(16),a=1===a.length?"0"+a:a,o=+(l[5]?l[5]:1),{hex:"#"+e+i+a,alpha:o}}function v(t,i){if(null==t)return{hex:t,alpha:i};null==i&&(i=1),i=e(parseFloat(i),[0,1]);var n=m(t);return null!=n.alpha&&(i*=n.alpha),{hex:n.hex,alpha:i}}function _(t){return y[t]}var y={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#0ff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000",blanchedalmond:"#ffebcd",blue:"#00f",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#f0f",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#789",lightslategrey:"#789",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#0f0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#f0f",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#f00",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#fff",whitesmoke:"#f5f5f5",yellow:"#ff0",yellowgreen:"#9acd32"},x={},b=[0,0,0,1],T=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,A={hasColorName:_,toColor:r,hsb2rgb:u,rgb2hsb:d,createColorsWithHsb:c,getRGBAColorArray:n,mixColorWithHSB:l,getHighLightColor:a,getColorWithDivider:o,mixColorWithAlpha:h,getColorOpacity:f,getColorOpacityWithoutDefault:p,colorToHex:g,colorToHexAlpha:m,getClickColor:s,getStandardColorAndOpacity:v};return window.ColorUtils=A,A}),define("Constants",[],function(){return{BLANK_VALUE_PERCENTAGE:"\xa0\xa0",INSTANCES_KEY:"vancharts_index_",SELECT_ANIMATION:"select",CHART_HIDE:"vancharts-chart-hide",EXPORT_HIDE:"vancharts-export-hide",GEO:"geographic_co_sys",PLANE:"plane_co_sys",BUTTON:"button",CAROUSEL:"carousel",BAR_CHART:"bar",COLUMN_CHART:"column",LINE_CHART:"line",AREA_CHART:"area",PIE_CHART:"pie",MULTIPIE_CHART:"multiPie",TREEMAP_CHART:"treeMap",SCATTER_CHART:"scatter",BUBBLE_CHART:"bubble",FORCE_BUBBLE_CHART:"forceBubble",GANTT_CHART:"gantt",GAUGE_CHART:"gauge",POINTER_GAUGE:"pointer",POINTER_SEMI_GAUGE:"pointer_semi",SLOT_GAUGE:"slot",THERMOMETER_GAUGE:"thermometer",RING_GAUGE:"ring",RADAR_CHART:"radar",COLUMN_RADAR:"columnRadar",LINE_RADAR:"lineRadar",POINT_MAP:"pointMap",AREA_MAP:"areaMap",HEAT_MAP:"heatMap",LINE_MAP:"lineMap",FUNNEL_CHART:"funnel",WORD_CLOUD_CHART:"wordCloud",STRUCTURE_CHART:"structure",VANCHART:"vanchart",FULL_SCREEN_ICON:"fullScreen",EXPORT_ICON:"toImage",SORT:"sort",MENU_ICON:"vancharts-icon-menu",REFRESH_ICON:"vancharts-icon-refresh",AXIS_GROUP:"vanchart-axis-group",BOTTOM:"bottom",TOP:"top",LEFT:"left",RIGHT:"right",RIGHT_TOP:"right-top",LEFT_TO_RIGHT:"left-to-right",RIGHT_TO_LEFT:"right-to-right",BOTTOM_TO_TOP:"bottom-to-top",TOP_TO_BOTTOM:"top-to-botttom",DISORDER:"disorder",DESCENDING:"descending",ASCENDING:"ascending",CIRCLE:"circle",SQUARE:"square",DIAMOND:"diamond",TRIANGLE:"triangle",STAR:"star",CIRCLE_HOLLOW:"circle_hollow",SQUARE_HOLLOW:"square_hollow",DIAMOND_HOLLOW:"diamond_hollow",TRIANGLE_HOLLOW:"triangle_hollow",NORMAL_ICON:"normal-legend-icon",PIE_ICON:"pie-legend-icon",DONUT_ICON:"donut-legend-icon",BUBBLE_ICON:"bubble-legend-icon",SCATTER_ICON:"scatter-legend-icon",TREEMAP_ICON:"treeMap-legend-icon",DASH_TYPE:{Solid:"none",Dash:"8,6"},SAME_ARC:"sameArc",DIFFERENT_ARC:"differentArc",OUTSIDE:"outside",INSIDE:"inside",CENTER:"center",STYLE_GRADUAL:"gradual",HORIZONTAL_LAYOUT:"horizontal",VERTICAL_LAYOUT:"vertical",POLYGON_RADAR:"polygon",CIRCLE_RADAR:"circle",SIZE_BY_AREA:"area",SIZE_BY_WIDTH:"width",GRADUAL_LIGHTER:"lighter",GRADUAL_DARKER:"darker",STATE_TO_DROP:"to-drop",STATE_DROPPED:"dropped",STATE_TO_SHOW:"to-show",STATE_SHOW:"show",EXPONENTIAL:"exponential",LINEAR:"linear",LOGARITHMIC:"logarithmic",POLYNOMIAL:"polynomial"}}),define("utils/vMap",["require"],function(t){function e(t,i){if(this._=Object.create(null),t){var n=this;if(t instanceof e)t.forEach(function(t,e){n.set(t,e)});else if(Array.isArray(t)){var r,a=-1,o=t.length;if(1===arguments.length)for(;++a-1||"Netscape"===navigator.appName&&navigator.appVersion.indexOf("Edge")>-1,utils.transPrefix="-webkit-transform"in document.body.style?"-webkit-":"-moz-transform"in document.body.style?"-moz-":"-ms-transform"in document.body.style?"-ms-":"",DIV_CONTAINER=document.createElement("div"),document.body.appendChild(DIV_CONTAINER),isSupportSVG())){var t=document.createElement("canvas");CANVAS_CTX=t.getContext("2d"),SVG_CONTAINER=document.createElementNS("http://www.w3.org/2000/svg","svg"),document.body.appendChild(SVG_CONTAINER);var e=document.createElementNS("http://www.w3.org/2000/svg","text");SVG_CONTAINER.appendChild(e),SVG_CONTAINER._textNode=e,SVG_CONTAINER.style.visibility="hidden"}}function initPaddingScale(t){SCALE=t||1}function pick(){for(var t,e=arguments.length,i=0;e>i;i++)if(t=arguments[i],"undefined"!=typeof t&&null!==t)return t;return null}function isArray(t){return"[object Array]"===Object.prototype.toString.apply(t)}function toArray(t){return Array.prototype.slice.call(t)}function setTextStyle(t,e){e=cssNormalization(e);for(var i in e)t.style(i,e[i])}function getTextDimension(t,e,i){if(null==t)return{width:0,height:0};if(i)return _getHtmlTextDim(t,e);if(!isSupportSVG())return _getHtmlTextDim(t,e,!1);var n=convertREMtoPX(e.fontSize);return!e["writing-mode"]&&n>=12?{width:_getCanvasTextWidth(t,n+"px",e),height:getTextHeight(e)}:_getSvgTextDim(t,e)}function getTextWrapDimension(t,e,i){var n=extend({"white-space":"normal",whiteSpace:"normal","word-wrap":"break-word",wordWrap:"break-word"},e);return _getHtmlTextDim(t,n,i)}function _getHtmlTextDim(t,e,i){DIV_CONTAINER.style.cssText="",DIV_CONTAINER.style.visibility="hidden",DIV_CONTAINER.style.whiteSpace="nowrap",DIV_CONTAINER.style.position="absolute",DIV_CONTAINER.style.display="";for(var n in e)"function"!=typeof e[n]&&"color"!=n&&(DIV_CONTAINER.style[n]=e[n]);i===!1?DIV_CONTAINER.textContent?DIV_CONTAINER.textContent=t:DIV_CONTAINER.innerText=t:DIV_CONTAINER.innerHTML=t;var r=DIV_CONTAINER.offsetWidth||0,a=DIV_CONTAINER.offsetHeight||0,o={width:r,height:a};return DIV_CONTAINER.style.display="none",o}function _getSvgTextDim(t,e){SVG_CONTAINER.style.display="";var i=SVG_CONTAINER._textNode;i.textContent=t,i.style.cssText="";for(var n in e)"function"!=typeof e[n]&&"color"!=n&&(i.style[n]=e[n]);var r=i.getBBox(),a={width:r.width,height:r.height};return SVG_CONTAINER.style.display="none",a}function _getCanvasTextWidth(t,e,i){if(!CANVAS_CTX)return 0;var n=i.fontStyle||"",r=i.fontWeight||"",a=i.fontFamily||"",o="italic"===n?5:0;return CANVAS_CTX.font=n+" "+r+" "+e+" "+a,CANVAS_CTX.measureText(t).width+o||0}function setDomBackground(t,e){var i=[];if(e.backgroundColor)if("string"==typeof e.backgroundColor)if(isSupportSVG())i.push("background-Color:"+e.backgroundColor);else{var n=ColorUtils.colorToHexAlpha(e.backgroundColor);i.push("background-Color:"+n.hex),i.push("filter:alpha(opacity="+100*n.alpha+")")}else if("object"==typeof e.backgroundColor){var r=e.backgroundColor,a=ColorUtils.colorToHex(r.startColor),o=ColorUtils.colorToHex(r.endColor),s="left",h="left top",l="right top",u=1;r.x1==r.x2&&(s="top",h="left top",l="left bottom",u=0),i.push("background: -ms-linear-gradient("+s+", "+a+", "+o+")"),i.push("background-image: -moz-linear-gradient("+s+", "+a+", "+o+")"),i.push("background-image: -webkit-gradient(linear, "+h+", "+l+", color-stop(0, "+a+"), color-stop(1, "+o+"))"),i.push("filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+a+", endColorstr="+o+", GradientType="+u+")")}e.backgroundImage&&(i.push("background-image:url("+e.backgroundImage+")"),i.push("background-size:100% 100%")),null!=e.borderWidth&&(i.push("border-style:solid"),i.push("border-width:"+e.borderWidth+"px")),null!=e.borderColor&&i.push("border-color:"+e.borderColor),null!=e.borderRadius&&(i.push("border-radius:"+e.borderRadius+"px"),i.push("-moz-border-radius:"+e.borderRadius+"px"),i.push("-webkit-border-radius:"+e.borderRadius+"px"),i.push("-o-border-radius:"+e.borderRadius+"px")),e.shadow&&i.push("box-shadow:1px 1px 2px rgba(0,0,0,0.2)"),t.style.cssText+=i.join(";")+";"}function getTextHeight(t){var e=t.fontSize||"0.75rem";return convertREMtoPX(e)}function stamp(t){return t._vanchart_id=t._vanchart_id||"vancharts"+ ++lastID,t._vanchart_id}function extend(t){var e,i,n,r;for(i=1,n=arguments.length;n>i;i++){r=arguments[i];for(e in r)t[e]=r[e]}return t}function domRotate(t,e){var i=[];i.push("transform:rotate("+e+"deg)"),i.push("-ms-transform:rotate("+e+"deg)"),i.push("-webkit-transform:rotate("+e+"deg)"),i.push("-moz-transform:rotate("+e+"deg)"),i.push("-o-transform:rotate("+e+"deg)");var n=Math.cos(toRadian(e)),r=Math.sin(toRadian(e));if(!isSupportSVG()){var a=e?["progid:DXImageTransform.Microsoft.Matrix(M11=",n,", M12=",-r,", M21=",r,", M22=",n,", sizingMethod='auto expand')"].join(""):"none";i.push("filter:"+a)}t.style.cssText+=i.join(";")+";"}function splitText(t,e,i,n){if(!t)return[];t+="",n=n||0,i-=2*n;for(var r=[],a=0,o=t.length;o>a;){for(var s=a;getTextDimension(t.substring(s,a+1),e,!1).width=o)););if(s==a)return["..."];r.push(t.substring(s,a))}return r}function getTextDimensionWithRotation(t,e,i,n){var r=getTextDimension(t,e,i);return getTextDimRotated(r,n)}function getTextDimRotated(t,e){var i=Math.abs(toRadian(e||0)),n=t.width*Math.cos(i)+t.height*Math.sin(i),r=t.width*Math.sin(i)+t.height*Math.cos(i);return{width:n,height:r}}function clone(t){if("object"==typeof t&&null!==t){var e=t;if(isArray(t)){e=[];for(var i=0,n=t.length;n>i;i++)e[i]=clone(t[i])}else{e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=clone(t[r]))}return e}return t}function cssNormalization(t){var e={};for(var i in t)if(styleToCss[i]&&(e[styleToCss[i]]=t[i]),"color"==i&&(e.color=t[i]),"fontSize"==i){var n=t[i];-1!=n.indexOf("pt")&&(n=4*parseFloat(n)/3,e["font-size"]=n+"px")}return e}function reformCssArray(t){if(!(t instanceof Array))return[t,t,t,t];switch(t.length+""){case"4":return t;case"3":return[t[0],t[1],t[2],t[1]];case"2":return[t[0],t[1],t[0],t[1]];case"1":return[t[0],t[0],t[0],t[0]];case"0":return[0,0,0,0]}}function lineSubPixelOpt(t,e){return e%2===0?Math.round(t):Math.round(t-.5)+.5}function rectSubPixelOpt(){var t,e,i,n,r;return 2===arguments.length?(t=arguments[0].x,e=arguments[0].y,i=arguments[0].width,n=arguments[0].height,r=arguments[1]):(t=arguments[0],e=arguments[1],i=arguments[2],n=arguments[3],r=arguments[4]),r=r||0,t=lineSubPixelOpt(t,r),e=lineSubPixelOpt(e,r),i=Math.round(i),n=Math.round(n),{x:t,y:e,width:i,height:n}}function addArray(t,e){var i=[];if(t&&t.length)for(var n=0,r=t.length;r>n;n++)i.push(t[n]);if(e&&e.length)for(var n=0,r=e.length;r>n;n++)i.push(e[n]);return i}function toFront(t){t&&t.parentNode&&t.parentNode.appendChild(t)}function toBack(t){t&&t.parentNode&&t.parentNode.insertBefore(t,t.parentNode.firstChild)}function toFrontOfAll(t){t.ownerSVGElement.appendChild(t)}function toBackOfAll(t){t.ownerSVGElement.appendChild(t,t.ownerSVGElement.firstChild)}function containsRect(t,e){return t.x<=e.x&&t.y<=e.y&&t.x+t.width>=e.x+e.width&&t.y+t.height>=e.y+e.height}function rectangleOverlapped(t,e){if(!t||!e)return!1;var i=Math.max(t.x,e.x),n=Math.max(t.y,e.y),r=Math.min(t.x+t.width,e.x+e.width),a=Math.min(t.y+t.height,e.y+e.height);return r>=i&&a>=n}function outsideRect(t,e){return!containsRect(t,e)&&!rectangleOverlapped(t,e)}function containsPoint(t,e){if(!t||!e)return!1;var i=pick(e.x||e[0]),n=pick(e.y||e[1]);return t.xi&&t.yn}function isSupportSVG(){return!!window.SVGSVGElement}function makeValueInRange(t,e,i){var n=Math.min(t,e),r=Math.max(t,e),a=r-n;return((i-n)%a+a)%a+n}function getValueInDomain(t,e){return Math.min(Math.max(t,e[0]),e[1])}function toRadian(t){return Math.PI*(t/180)}function toDegree(t){return 180*t/Math.PI}function getFormatterFunction(formatter){if(null==formatter||""===formatter)return null;if("string"==typeof formatter){var formatterFunc=new Function("return "+formatter)();return"string"==typeof formatterFunc?(eval("var _tmpFunc = "+formatter),_tmpFunc):formatterFunc}return formatter}function format(t,e){return e=getFormatterFunction(e),"function"==typeof e?e.bind(t)(t):t}function clone(t){if(null==t||"object"!=typeof t)return t;if(t instanceof Date){var e=new Date;return e.setTime(t.getTime()),e}if(t instanceof Array){for(var e=[],i=0,n=t.length;n>i;++i)e[i]=clone(t[i]);return e}if(t instanceof String)return t+"";if(t instanceof Object){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=clone(t[r]));return e}}function isEmpty(t){var e=""===t||null===t||void 0===t;return e}function isNull(t){return void 0==t||null==t}function isIE(){return window.ActiveXObject||"ActiveXObject"in window?!0:!1}function hasNotDefined(t){return null===t||void 0===t}function hasDefined(t){return!hasNotDefined(t)}function makeBounds(){var t=0,e=0,i=0,n=0;if(2===arguments.length){var r=arguments[0],a=arguments[1];t=pick(r.x,r[0]),e=pick(r.y,r[1]),i=pick(a.width,a[0]),n=pick(a.height,a[1])}else 4===arguments.length&&(t=arguments[0],e=arguments[1],i=arguments[2],n=arguments[3]);return{x:t,y:e,width:i,height:n}}function distance(t,e){var i=pick(t.x,t[0]),n=pick(t.y,t[1]),r=pick(e.x,e[0]),a=pick(e.y,e[1]),o=i-r,s=n-a;return Math.sqrt(o*o+s*s)}function isEmptyBounds(t){return t.width<=0||t.height<=0}function log(t,e){return Math.log(e)/Math.log(t)}function getOrder(t){var e=0;if(t>0&&1>t)for(;1>t;)t=accMul(t,10),e--;else if(t>=10)for(;t>=10;)t=accDiv(t,10),e++;return e}function getPercentValue(t,e){return t?(t+="",-1!=t.indexOf("%")&&(t=parseFloat(t)*e/100),parseFloat(t)):0}function getDecimalPlaces(t){var e=(t+"").match(decimalPlacesRegExp);return e?(e[1]?e[1].length:0)+(+e[2]||0):0}function accAdd(t,e){if(t%1===0&&e%1===0)return t+e;var i=getDecimalPlaces(t),n=getDecimalPlaces(e),r=Math.pow(10,Math.max(i,n));return(Math.round(t*r)+Math.round(e*r))/r}function accDiv(t,e){if(t%1===0&&e%1===0)return t/e;var i=t+"",n=e+"",r=-getDecimalPlaces(t);r+=getDecimalPlaces(e);var a=i.replace(decimalRegExp,""),o=n.replace(decimalRegExp,"");return r>0?a/o*Math.pow(10,r):a/o/Math.pow(10,-r)}function accMul(t,e){if(t%1===0&&e%1===0)return t*e;var i=t+"",n=e+"",r=getDecimalPlaces(t);return r+=getDecimalPlaces(e),i.replace(decimalRegExp,"")*n.replace(decimalRegExp,"")/Math.pow(10,r)}function objectToArray(t){if(t.length)return[].slice.call(t);var e=[];for(var i in t)e.push(t[i]);return e}function date2int(t){if(null==t)return null;"string"==typeof t&&(t=new Date(Date.parse(t.replace(/-|\./g,"/"))));var e=new Date("1970/01/01");return"number"==typeof t?t:t.getTime()-e.getTime()}function int2date(t){var e=new Date("1970/01/01");return t=t||0,new Date(t+e.getTime())}function object2date(t){var e=t;return"string"==typeof e?e=new Date(Date.parse(e.replace(/-|\./g,"/"))):"number"==typeof e&&(e=new Date(e)),e}function makeTranslate(t){var e=pick(t.x,t[0]),i=pick(t.y,t[1]);return"translate("+e+","+i+")"}function makeTranslate3d(t){var e=pick(t.x,t[0]),i=pick(t.y,t[1]),n=pick(t.z,t[2],0);return"translate3d("+e+"px,"+i+"px,"+n+"px)"}function isImageMarker(t){var e=Constants.STAR+Constants.CIRCLE+Constants.SQUARE+Constants.DIAMOND+Constants.TRIANGLE+Constants.CIRCLE_HOLLOW+Constants.SQUARE_HOLLOW+Constants.DIAMOND_HOLLOW+Constants.TRIANGLE_HOLLOW;return-1==e.indexOf(t)&&hasDefined(t)}function isNullMarker(t){return hasNotDefined(t.symbol)}function getDefaultMarkerSymbol(t){var e=[Constants.CIRCLE,Constants.CIRCLE_HOLLOW,Constants.SQUARE,Constants.SQUARE_HOLLOW,Constants.DIAMOND,Constants.DIAMOND_HOLLOW,Constants.TRIANGLE,Constants.TRIANGLE_HOLLOW];return e[t%e.length]}function splitWords(t){return t=t.trim?t.trim():t.replace(/^\s+|\s+$/g,""),t.split(/\s+/)}function trim(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function removeEvent(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.attachEvent&&t.detachEvent("on"+e,i)}function dealFloatPrecision(t){return Math.abs(t)<1e-6?0:t}function getDomWidth(t){var e=t.currentStyle||document.defaultView.getComputedStyle(t);return((t.clientWidth||parseInt(e.width,10))-parseInt(e.paddingLeft,10)-parseInt(e.paddingRight,10)).toFixed(0)-0}function getDomHeight(t){var e=t.currentStyle||document.defaultView.getComputedStyle(t);return((t.clientHeight||parseInt(e.height,10))-parseInt(e.paddingTop,10)-parseInt(e.paddingBottom,10)).toFixed(0)-0}function hasTouch(){var t=window.document;return t&&void 0!==t.documentElement.ontouchstart}function getArcPoint(t,e){return[t*Math.sin(e),-t*Math.cos(e)]}function getArcByPoint(t,e){return(2*Math.PI-(Math.atan2(e,t)-Math.PI/2))%(2*Math.PI)}function calculateAutoMinMaxAndGap(t,e,i){t>e&&(t=0,e=100);var n=accAdd(e,-t),r=getOrder(n),a=Math.pow(10,r);0>=r?(t=accMul(t,Math.pow(10,1-r)),t=accDiv(Math.floor(t),Math.pow(10,1-r))):t=Math.floor(t/a)*a;for(var o=accMul(accDiv(i,10),a),s=0;n>s;)s=accAdd(o,s);for(var h=accDiv(s,i);e>t+h*i;)s=accAdd(o,s),h=accDiv(s,i);return s=accDiv(s,i),e=accAdd(t,accMul(s,i)),[t,e,s]}function indexOf(t,e){for(var i=0;ii?-1:1,u=l*h/Math.tan(a),c=Math.atan((e-n)/(i-t)),d=u*Math.sin(c),f=u*Math.cos(c),p=(t+i)/2,g=(e+n)/2,m=p+d,v=g+f,_=t-m,y=e-v,x=i-m,b=n-v,T=normalRadian(Math.atan2(y,_)),A=normalRadian(Math.atan2(b,x));return T>A&&(A+=DOUBLE_PI),[m,v,h/r,T,A]}function normalRadian(t){return t%=DOUBLE_PI,0>t&&(t+=DOUBLE_PI),t}function formatNum(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i}function wrapNum(t,e,i){var n=e[1],r=e[0],a=n-r;return t===n&&i?t:((t-r)%a+a)%a+r}function bind(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}function getParamString(t,e,i){var n=[];for(var r in t)n.push(encodeURIComponent(i?r.toUpperCase():r)+"="+encodeURIComponent(t[r]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}function template(t,e){return t.replace(templateRe,function(t,i){var n=e[i];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n})}function setOptions(t,e){t.hasOwnProperty("options")||(t.options=t.options?Object.create(t.options):{});for(var i in e)t.options[i]=e[i];return t.options}function createOptions(t,e){return e.forEach(function(e){if(e)for(var i in e)hasNotDefined(t[i])&&!skipKeys[i]&&(t[i]=e[i])}),t}function getPrefixed(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}function timeoutDefer(t){var e=+new Date,i=Math.max(0,16-(e-lastTime));return lastTime=e+i,window.setTimeout(t,i)}function requestAnimFrame(t,e,i){return i&&requestFn===timeoutDefer?void t.call(e):requestFn.call(window,bind(t,e))}function cancelAnimFrame(t){t&&cancelFn.call(window,t)}function throttle(t,e,i){var n,r,a,o;return o=function(){n=!1,r&&(a.apply(i,r),r=!1)},a=function(){n?r=arguments:(t.apply(i,arguments),setTimeout(o,e),n=!0)}}function rebind(t,e){for(var i,n=1,r=arguments.length;++n=0&&(n=t.slice(i+1),t=t.slice(0,i)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}};var utils={dispatch:dispatch,rebind:rebind,throttle:throttle,requestAnimFrame:requestAnimFrame,cancelAnimFrame:cancelAnimFrame,getParamString:getParamString,template:template,setOptions:setOptions,createOptions:createOptions,formatNum:formatNum,wrapNum:wrapNum,bind:bind,initConst:initConst,initPaddingScale:initPaddingScale,toPng:toPng,getDomWidth:getDomWidth,getDomHeight:getDomHeight,makeTranslate:makeTranslate,makeTranslate3d:makeTranslate3d,clone:clone,date2int:date2int,int2date:int2date,object2date:object2date,log:log,getOrder:getOrder,getPercentValue:getPercentValue,accAdd:accAdd,accDiv:accDiv,accMul:accMul,dealFloatPrecision:dealFloatPrecision,isEmpty:isEmpty,isEmptyBounds:isEmptyBounds,objectToArray:objectToArray,toArray:toArray,pick:pick,isNull:isNull,getTextDimension:getTextDimension,getTextHeight:getTextHeight,splitText:splitText,getTextDimensionWithRotation:getTextDimensionWithRotation,getTextDimRotated:getTextDimRotated,isArray:isArray,indexOf:indexOf,cssNormalization:cssNormalization,reformCssArray:reformCssArray,rectSubPixelOpt:rectSubPixelOpt,lineSubPixelOpt:lineSubPixelOpt,addArray:addArray,toFront:toFront,toBack:toBack,toFrontOfAll:toFrontOfAll,toBackOfAll:toBackOfAll,containsRect:containsRect,rectangleOverlapped:rectangleOverlapped,outsideRect:outsideRect,containsPoint:containsPoint,isSupportSVG:isSupportSVG,setTextStyle:setTextStyle,domRotate:domRotate,makeValueInRange:makeValueInRange,getValueInDomain:getValueInDomain,toRadian:toRadian,toDegree:toDegree,getFormatterFunction:getFormatterFunction,format:format,isIE:isIE,hasTouch:hasTouch,hasNotDefined:hasNotDefined,hasDefined:hasDefined,distance:distance,makeBounds:makeBounds,isImageMarker:isImageMarker,isNullMarker:isNullMarker,getDefaultMarkerSymbol:getDefaultMarkerSymbol,removeEvent:removeEvent,getArcPoint:getArcPoint,getTextWrapDimension:getTextWrapDimension,stamp:stamp,splitWords:splitWords,trim:trim,extend:extend,setDomBackground:setDomBackground,getArcByPoint:getArcByPoint,calculateAutoMinMaxAndGap:calculateAutoMinMaxAndGap,hasChn:hasChn,convertREMtoPX:convertREMtoPX,paddingConvertWithScale:paddingConvertWithScale,getDefaultFontSize:getDefaultFontSize,convertToREMUseDefault16PX:convertToREMUseDefault16PX,getPlainText:getPlainText,computeArc:computeArc,normalRadian:normalRadian,bindData:bindData,falseFn:falseFn,trueFn:trueFn,emptyFn:emptyFn};return window.VanUtils=utils,utils}),define("utils/QueryUtils",["require"],function(t){function e(t,e){if(t&&t.length&&e)for(var i=0;it;t++)r._initHooks[t].call(this)}},e},e.include=function(t){return i.extend(this.prototype,t),this},e.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this},e}),define("dom/Evented",["require","../utils/BaseUtils","../utils/Class"],function(t){var e=t("../utils/BaseUtils"),i=t("../utils/Class"),n=i.extend({on:function(t,i,n){if("object"==typeof t)for(var r in t)this._on(r,t[r],i);else{t=e.splitWords(t);for(var a=0,o=t.length;o>a;a++)this._on(t[a],i,n)}return this},off:function(t,i,n){if(t)if("object"==typeof t)for(var r in t)this._off(r,t[r],i);else{t=e.splitWords(t);for(var a=0,o=t.length;o>a;a++)this._off(t[a],i,n)}else delete this._events;return this},_on:function(t,e,i){if(t&&e){this._events=this._events||{};var n=this._events[t];n||(n=[],this._events[t]=n),i===this&&(i=void 0);for(var r={fn:e,ctx:i},a=n,o=0,s=a.length;s>o;o++)if(a[o].fn===e&&a[o].ctx===i)return;a.push(r),n.count++}},_off:function(t,i,n){var r,a,o;if(this._events&&(r=this._events[t])){if(!i){for(a=0,o=r.length;o>a;a++)r[a].fn=e.falseFn;return void delete this._events[t]}if(n===this&&(n=void 0),r)for(a=0,o=r.length;o>a;a++){var s=r[a];if(s.ctx===n&&s.fn===i)return s.fn=e.falseFn,this._firingCount&&(this._events[t]=r=r.slice()),void r.splice(a,1)}}},fire:function(t,e,i){if(!this.listens(t,i))return this;var n=e;if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var a=0,o=r.length;o>a;a++){var s=r[a];s.fn.call(s.ctx||this,n)}this._firingCount--}}return i&&this._propagateEvent(n),this},listens:function(t,e){var i=this._events&&this._events[t];if(i&&i.length)return!0;if(e)for(var n in this._eventParents)if(this._eventParents[n].listens(t,e))return!0;return!1},once:function(t,i,n){if("object"==typeof t){for(var r in t)this.once(r,t[r],i);return this}var a=e.bind(function(){this.off(t,i,n).off(t,a,n)},this);return this.on(t,i,n).on(t,a,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[e.stamp(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[e.stamp(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.srcEvent.type,t,!0)}});return n}),define("ComponentLibrary",[],function(){function t(t){return n[t]}function e(t,e){n[t]=e}function i(){return n}var n=Object.create(null),r=["tooltip","tools","title","dTools","geo","rangeLegend","legend","zoom","dataSheet","xAxis","yAxis","polar","angleAxis","radiusAxis","gaugeAxis","value","category","datetime","levelBar","processes","timeAxis"];return{TOOLTIP_COMPONENT:"tooltip",TOOLBAR_COMPONENT:"tools",GEO_COMPONENT:"geo",DRILL_TOOLS:"dTools",TITLE_COMPONENT:"title",RANGE_LEGEND_COMPONENT:"rangeLegend",INTERVAL_RANGE_LEGEND:"intervalRangeLegend",GradientRangeLegend:"gradientRangeLegend",LEGEND_COMPONENT:"legend",DATA_SHEET_COMPONENT:"dataSheet",ZOOM_COMPONENT:"zoom",X_AXIS_COMPONENT:"xAxis",Y_AXIS_COMPONENT:"yAxis",POLAR_COMPONENT:"polar",RADIUS_AXIS_COMPONENT:"radiusAxis",ANGLE_AXIS_COMPONENT:"angleAxis",GAUGE_AXIS_COMPONENT:"gaugeAxis",VALUE_AXIS_COMPONENT:"value",CATEGORY_AXIS_COMPONENT:"category",DATE_AXIS_COMPONENT:"datetime",LEVELBAR:"levelBar",PROCESSES:"processes",TIMEAXIS:"timeAxis",ComponentsOrder:r,getRegisteredComponents:i,get:t,register:e}}),define("utils/BoundsManager",["require","./BaseUtils"],function(t){function e(){this.addedBounds=[]}var i=t("./BaseUtils");return e.prototype={constructor:e,addBounds:function(t){this.addedBounds.push(t)},isOverlapped:function(t){for(var e=0,n=this.addedBounds.length;n>e;e++)if(i.rectangleOverlapped(t,this.addedBounds[e]))return!0;return!1},isEmpty:function(){return 0===this.addedBounds.length}},e}),define("utils/BezierEasing",["require","./vMap"],function(t){function e(t,e){return 1-3*e+3*t}function i(t,e){return 3*e-6*t}function n(t){return 3*t}function r(t,r,a){return((e(r,a)*t+i(r,a))*t+n(r))*t}function a(t,r,a){return 3*e(r,a)*t*t+2*i(r,a)*t+n(r)}function o(t,e,i,n,a){var o,s,h=0;do s=e+(i-e)/2,o=r(s,n,a)-t,o>0?i=s:e=s;while(Math.abs(o)>C&&++ho;++o){var s=a(n,t,i);if(0===s)return n;var h=r(n,t,i)-e;n-=h/s}return n}function h(){for(var e=0;P>e;++e)d[e]=r(e*M,t,i)}function l(e){for(var n=0,r=1,h=P-1;r!=h&&d[r]<=e;++r)n+=M;--r;var l=(e-d[r])/(d[r+1]-d[r]),u=n+l*M,c=a(u,t,i);return c>=A?s(e,u):0===c?u:o(e,n,n+M,t,i)}function u(){f=!0,(t!=e||i!=n)&&h()}if(4!==arguments.length)throw new Error("BezierEasing requires 4 arguments.");for(var c=0;4>c;++c)if("number"!=typeof arguments[c]||isNaN(arguments[c])||!isFinite(arguments[c]))throw new Error("BezierEasing arguments should be integers.");if(0>t||t>1||0>i||i>1)throw new Error("BezierEasing x values must be in [0, 1] range.");var d=w?new Float32Array(P):[],f=!1,p=function(a){return f||u(),t===e&&i===n?a:0===a?0:.001>1-a?1:r(l(a),e,n)};p.getControlPoints=function(){return[{x:t,y:e},{x:i,y:n}]};var g=[t,e,i,n],m="BezierEasing("+g+")";return p.toString=function(){return m},p}function h(t){return function(e){return 0>=e?0:e>=1?1:t(e)}}function l(t){return function(e){return 1-t(1-e)}}function u(t){return function(e){return.5*(.5>e?t(2*e):2-t(2-2*e))}}function c(t){return t*t}function d(t){return t*t*t}function f(t){return function(e){return Math.pow(e,t)}}function p(t){return 1-Math.cos(t*half\u03c0)}function g(t){return Math.pow(2,10*(t-1))}function m(t){return 1-Math.sqrt(1-t*t)}function v(t,e){var i;return arguments.length<2&&(e=.45),arguments.length?i=e/E*Math.asin(1/t):(t=1,i=e/4),function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-i)*E/e)}}function _(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function y(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}var x=t("./vMap"),b=this,T=4,A=.001,C=1e-7,L=10,P=11,M=1/(P-1),w="Float32Array"in b;s.css={ease:s(.25,.1,.25,1),linear:s(0,0,1,1),"ease-in":s(.42,0,1,1),"ease-out":s(0,0,.58,1),"ease-in-out":s(.42,0,.58,1),"ease-in-out-quad":s(.455,.03,.515,.955),swing:s(.02,.01,.47,1),"ease-in-quart":s(.895,.03,.685,.22),"ease-out-back":s(.175,.885,.32,1.275),"ease-out-quart":s(.165,.84,.44,1),"ease-in-quint":s(.755,.05,.855,.06),"ease-out-quint":s(.23,1,.32,1),"ease-in-quad":s(.55,.085,.68,.53),"ease-out-quad":s(.25,.46,.45,.94)};var E=2*Math.PI,S=function(t){return t},O=function(){return S},k=new x({linear:O,poly:f,quad:function(){return c},cubic:function(){return d},sin:function(){return p},exp:function(){return g},circle:function(){return m},elastic:v,back:_,bounce:function(){return y}}),D=new x({"in":S,out:l,"in-out":u,"out-in":function(t){return u(l(t))}});return s.ease=function(t){var e=t.indexOf("-"),i=e>=0?t.slice(0,e):t,n=e>=0?t.slice(e+1):"in";return i=k.get(i)||O,n=D.get(n)||S,h(n(i.apply(null,Array.prototype.slice.call(arguments,1))))},s}),define("vans/VanChartLayout",["require","../Constants","../utils/BaseUtils","../ComponentLibrary","../utils/BoundsManager","../utils/BezierEasing"],function(t){function e(t){r(t),a(t.seriesOfType(f.WORD_CLOUD_CHART)),o(t,t.seriesOfType(f.BUBBLE_CHART),f.BUBBLE_CHART),o(t,t.seriesOfType(f.SCATTER_CHART),f.SCATTER_CHART),s(t.seriesOfType(f.BUBBLE_CHART)),s(t.seriesOfType(f.FORCE_BUBBLE_CHART))}function i(t){for(var e=new m,i=0,n=t.series.length;n>i;i++){var r=t.series[i];r.visible&&(r.doLayout(),r._calculateLabelPos(e))}}function n(t){e(t),u(t)}function r(t){for(var e={},i=t.series,n=0,r=i.length;r>n;n++){var a=i[n],o=a.type;if(!a.isTreeSeries()&&o!=f.WORD_CLOUD_CHART)if(a.isSeriesAccumulated())if(a._calculatePercentage)a._calculatePercentage();else{var s=a.getTargetKey();l(a.points,s),h(a.points,s)}else a.visible&&a.points.map(function(t){var i=[o,a.stack,t.category].join("-");e[i]||(e[i]=[]),e[i].push(t)})}for(var u in e){var c=e[u],s=c[0].series.getTargetKey();l(c,s),h(c,s)}for(var n=0,r=i.length;r>n;n++){var d=i[n];d.points.forEach(function(t){d.calculateLabelInfo(t)})}}function a(t){if(t&&t.length){var e=[];t.forEach(function(t){e=e.concat(t.points)}),l(e,t[0].getTargetKey())}}function o(t,e,i){var n,r;if(i==f.BUBBLE_CHART)r="swing",n=function(t,e){return e.radius-t.radius};else if(i==f.SCATTER_CHART){var a=t.isInverted();r="exp-in-out",n=function(t,e){return a?t.posY-e.posY:t.posX-e.posX}}var o=[];e.forEach(function(t){o=o.concat(t.points)}),o.sort(n);var s=o.length;s>0&&o.forEach(function(t,e){t.delayTime=800*v.ease(r)(e/s)})}function s(t){t.forEach(function(t){t._calculateMinMax4Radius()}),t.forEach(function(t){t._calculateBubbleRadius()})}function h(t,e){if(t&&t.length)for(var i=t[0].series,n=i.options.stackByPercent,r=i.stack||n,a=i.getStackAxis(),o=a&&a.isLog()?1:0,s=o,h=o,l=0,u=t.length;u>l;l++){var c=t[l],d=c.options;if(r){var f=n?c.percentage:c.getTargetValue();f>=o?(d[e+"0"]=s,s+=f):(d[e+"0"]=h,h+=f)}else d[e+"0"]=o}}function l(t,e){var i=0;t.filter(function(t){return!t.isNull&&t.visible}).forEach(function(t){i+=Math.abs(t[e])}),i=i>0?i:1,t.forEach(function(t){var e=t.series,n=e.getTargetKey(),r=e[e.getBaseAxisType()],a=!e.stack&&r&&r.type!=g.CATEGORY_AXIS_COMPONENT;t.percentage=a?1:Math.abs(t[n])/i})}function u(t){t.bounds=t._getDefaultBounds(),g.ComponentsOrder.map(function(e){e in t.components&&t.components[e].doLayout()},this),t.plotBounds=t.bounds,[g.Y_AXIS_COMPONENT,g.X_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].updateAxisClip()}),d(t),[g.Y_AXIS_COMPONENT,g.DATA_SHEET_COMPONENT,g.X_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].updateAxisSizeAndBounds()});var e=!1;[g.Y_AXIS_COMPONENT,g.X_AXIS_COMPONENT].forEach(function(i){e=t.components[i]&&t.components[i].adjustDomain4Radius()||e}),[g.Y_AXIS_COMPONENT,g.X_AXIS_COMPONENT,g.DATA_SHEET_COMPONENT,g.ZOOM_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].fixBoundsByPlot()}),[g.X_AXIS_COMPONENT,g.Y_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].dealOnZero()}),e&&c(t),i(t)}function c(t){t.plotBounds&&(t.bounds=p.makeBounds(t.plotBounds,t.plotBounds)),t.clipPool={},t.axisSize={left:0,right:0,bottom:0,top:0},[g.Y_AXIS_COMPONENT,g.X_AXIS_COMPONENT,g.DATA_SHEET_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].reCalculateSize()}),[g.Y_AXIS_COMPONENT,g.X_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].updateAxisClip()}),d(t),[g.Y_AXIS_COMPONENT,g.DATA_SHEET_COMPONENT,g.X_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].updateAxisSizeAndBounds()}),[g.Y_AXIS_COMPONENT,g.X_AXIS_COMPONENT,g.ZOOM_COMPONENT,g.DATA_SHEET_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].fixBoundsByPlot()}),[g.X_AXIS_COMPONENT,g.Y_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].dealOnZero()})}function d(t){var e=t.getChartBounds(),i=t.bounds,n=i.x,r=i.y,a=i.width,o=i.height,s=Math.max(t.clipPool[f.LEFT]||0,n),h=Math.max(t.clipPool[f.RIGHT]||0,e.width-(n+a)),l=Math.max(t.clipPool[f.TOP]||0,r),u=Math.max(t.clipPool[f.BOTTOM]||0,e.height-(r+o));i={x:s,y:l,width:e.width-s-h,height:e.height-l-u},t.setPlotBounds(i)}var f=t("../Constants"),p=t("../utils/BaseUtils"),g=t("../ComponentLibrary"),m=t("../utils/BoundsManager"),v=t("../utils/BezierEasing");return{PLANE_SYSTEM_LAYOUT:n,reLayoutPlotBounds:c,calculateBubbleRadius:s,calculateSeries:e,calculateSeriesShapes:i,fixCoordinateSystem:u}}),define("ChartLibrary",["require"],function(t){function e(t){return n[t]}function i(t,e){n[t]=e}var n={};return{get:e,register:i}}),define("utils/Point2D",["require","./BaseUtils"],function(t){var e=t("./BaseUtils"),i=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e};return i.prototype={clone:function(){return new i(this.x,this.y)},add:function(t){return this.clone()._add(i.create(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(i.create(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new i(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new i(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},distanceTo:function(t){t=i.create(t);var e=t.x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return t=i.create(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=i.create(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+e.formatNum(this.x)+", "+e.formatNum(this.y)+")"}},i.create=function(t,n,r){return t instanceof i?t:e.isArray(t)?new i(t[0],t[1]):void 0===t||null===t?t:"object"==typeof t&&"x"in t&&"y"in t?new i(t.x,t.y):new i(t,n,r)},i}),define("dom/Browser",[],function(){var t=navigator.userAgent.toLowerCase(),e=document.documentElement,i="ActiveXObject"in window,n=-1!==t.indexOf("webkit"),r=-1!==t.indexOf("phantom"),a=-1!==t.search("android [23]"),o=-1!==t.indexOf("chrome"),s=-1!==t.indexOf("gecko")&&!n&&!window.opera&&!i,h=0===navigator.platform.indexOf("Win"),l="undefined"!=typeof orientation||-1!==t.indexOf("mobile"),u=!window.PointerEvent&&window.MSPointerEvent,c=window.PointerEvent||u,d=i&&"transition"in e.style,f="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!a,p="MozPerspective"in e.style,g="OTransition"in e.style,m=!window.L_NO_TOUCH&&(c||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch);return{ie:i,ielt9:i&&!document.addEventListener,edge:"msLaunchUri"in navigator&&!("documentMode"in document),webkit:n,gecko:s,android:-1!==t.indexOf("android"),android23:a,chrome:o,safari:!o&&-1!==t.indexOf("safari"),win:h,ie3d:d,webkit3d:f,gecko3d:p,opera12:g,any3d:(d||f||p)&&!g&&!r,mobile:l,mobileWebkit:l&&n,mobileWebkit3d:l&&f,mobileOpera:l&&window.opera,mobileGecko:l&&s,touch:!!m,msPointer:!!u,pointer:!!c,retina:(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1}}),define("dom/DomUtils",["require","../utils/BaseUtils","../utils/Point2D","./Browser"],function(t){var e=t("../utils/BaseUtils"),i=t("../utils/Point2D"),n=t("./Browser"),r={get:function(t){return"string"==typeof t?document.getElementById(t):t},getStyle:function(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i},create:function(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n},remove:function(t){var e=t.parentNode;e&&e.removeChild(t)},empty:function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},toFront:function(t){t.parentNode.appendChild(t)},toBack:function(t){if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(t,e.firstChild)}},hasClass:function(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=r.getClass(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)},addClass:function(t,i){if(void 0!==t.classList)for(var n=e.splitWords(i),a=0,o=n.length;o>a;a++)t.classList.add(n[a]);else if(!r.hasClass(t,i)){var s=r.getClass(t);r.setClass(t,(s?s+" ":"")+i)}},removeClass:function(t,i){void 0!==t.classList?t.classList.remove(i):r.setClass(t,e.trim((" "+r.getClass(t)+" ").replace(" "+i+" "," ")))},setClass:function(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e},getClass:function(t){return void 0===t.className.baseVal?t.className:t.className.baseVal},setOpacity:function(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&r._setOpacityIE(t,e)},_setOpacityIE:function(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(r){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"},testProp:function(t){for(var e=document.documentElement.style,i=0;iu;u++){var d=l[u];if(d.bounds&&i.containsPoint(d.bounds,t))return d}}},cursor:function(t){this._container.style.cursor=t||""},onContainerMouseOver:function(t){},onContainerMouseMove:function(t){var e=this.vanchart.bounds,n=this.vanchart;n.renderer;if(n.chartType()!==r.GANTT_CHART||(n.isResizeEnabled()&&(i.containsPoint(n.resizeBounds,t.containerPoint)?(this.cursor("col-resize"),this._state=d,this.fire("resizeStart",t)):(this.cursor(),this._state=c,this.fire("resizeEnd",t))),this.fire("over",t),this._state!==d))if(i.containsPoint(e,t.containerPoint)){var a=t.srcEvent;a.target||a.srcElement;if(this.cursor(),!this._highlightShared(t)){this._removeHightlight(t);var o;if(n.isLargeMode()&&!n.hoverSeries)o=this._getCanvasClosestPoint(t.containerPoint),o&&(o._events||o.getEvents&&o.on(o.getEvents(),o),n.showTooltip(o,t),n.hoverPoint=o,o.options.click&&this.cursor("pointer"));else if(n.hoverSeries&&(o=n.hoverSeries.getClosestPoint(t.containerPoint))){if(o._events||o.getEvents&&o.on(o.getEvents(),o),o.series.defaultMarker){var s=o.series.defaultMarker;n._targets[i.stamp(s.node())]=o}o.fire("mouseover",t),o.options.click&&this.cursor("pointer")}}}else this.removeAllChosen(t)},removeAllChosen:function(t){var e=this.vanchart;this._removeHightlight(t),e.hoverPoint&&(e.hoverPoint.fire("mouseout",t),e.hoverPoint=null),e.hoverSeries&&e.hoverSeries.fire("mouseout",t);var i=e.getComponent(o.TOOLTIP_COMPONENT);i&&"vanChartMap"!==e.vanChartType&&i.immediateHide(),t&&e.cancelLegendHighlight(t.containerPoint)},_getCanvasClosestPoint:function(t){var e=this.vanchart,i=e.seriesOfType(r.BUBBLE_CHART).concat(e.seriesOfType(r.SCATTER_CHART)),n=e.isMap(),a=e.seriesOfType(r.HEAT_MAP);i=i.concat(a);for(var o=this.vanchart.bounds,s=i.length-1;s>=0;s--)for(var h=i[s],l=h.points.length-1;l>=0;l--){var u=h.points[l],c=n&&u.options.lnglat?e.latLngToContainerPoint(u.getLatLng()):{x:u.posX+o.x,y:u.posY+o.y},d=c.x-t.x,f=c.y-t.y,p=Math.sqrt(d*d+f*f),g=u.radius||u.options.marker&&u.options.marker.radius||4.5;if(g>=p&&u.visible)return u}},onContainerMouseOut:function(t){},onContainerTap:function(t){this.onContainerMouseMove(t);var e=this.vanchart.hoverPoint;e&&e.fire("tap",t)},onContainerPanStart:function(t){if(!this.forceTarget){var e=this.vanchart,n=e.renderer,a=t.containerPoint,s=e.bounds;if(e.chartType()===r.GANTT_CHART)return void(i.containsPoint(e.resizeBounds,a)?(this._state=d,this.fire("resizeStart",t)):!this._state&&i.containsPoint(e.panBounds,a)&&(this._state=p,this.fire("pan",t)));!this.selectRect&&this._supportCoordinateZoom()&&i.containsPoint(s,a)&&(this.selectRect=n.rect().style({fill:"rgb(69,114,167)","fill-opacity":.25}).add(),this.downPos=a,e.hoverPoint&&e.hoverPoint.fire("mouseout"));var h=e.getComponent(o.ZOOM_COMPONENT);this._zoomAsTarget(h,a)&&h._panStart(t,h.centerRect)}},_zoomAsTarget:function(t,e){var n=this.vanchart,r=n.bounds,a=!1,s=n.getComponent(o.DATA_SHEET_COMPONENT);return s&&(a=i.containsPoint(s.bounds,e)),a=a||i.containsPoint(r,e),t&&t.zoomToolEnabled()&&a},onContainerPanMove:function(t){var e=this.vanchart,n=(e.renderer,e.hoverPoint,e.bounds),a=e.options,s=t.containerPoint,h=this.downPos,l=e.isInverted();if(e.chartType()===r.GANTT_CHART)return void(i.containsPoint(this.vanchart.panBounds,s)&&(this._state===d?this.fire("resizeMove",t):this._state===p&&this.fire("pan",t)));if(this.selectRect){var u=a.zoom.zoomType,c=Math.min(s.x,h.x),f=Math.min(s.y,h.y),g=Math.abs(s.x-h.x),m=Math.abs(s.y-h.y),v=-1!=u.indexOf("x"),_=-1!=u.indexOf("y");l&&(v=-1!=u.indexOf("y"),_=-1!=u.indexOf("x")),v&&!_?(f=n.y,m=n.height):_&&!v&&(c=n.x,g=n.width),this.selectRect.attr({x:c,y:f,width:g,height:m})}var y=e.getComponent(o.ZOOM_COMPONENT);y&&y.zoomToolEnabled()&&y._panContainerMove(t)},onContainerPanEnd:function(t){var e=this.vanchart,n=(e.renderer,e.hoverPoint,e.bounds,e.options,t.containerPoint),a=this.downPos,s=e.components[o.TOOLBAR_COMPONENT];if(e.chartType()===r.GANTT_CHART)return void(this._state===d?(this._state=c,this.fire("resizeEnd",t)):this._state===p&&(this._state=f,this.fire("pan",t)));this.selectRect&&(i.distance(a,n)>14&&(e.clearAllEffects(),e.dealAxisZoom(a,n),s&&s.showRefreshIconWhenZoom()),this.selectRect.remove(),this.selectRect=null),this.panTarget=null;var h=e.getComponent(o.ZOOM_COMPONENT);h&&h.zoomToolEnabled()&&h._panEnd()},onContainerWheel:function(t){var e=this.vanchart;e.chartType()===r.GANTT_CHART&&i.containsPoint(e.panBounds,t.containerPoint)&&(t.srcEvent.preventDefault(),t.wheel=this.normalizeWheel(t.srcEvent),this.fire("wheelMove",t))},_highlightShared:function(t){var e=this.vanchart.getSharedAxis();if(e&&e.getPointsInCategory){var i=t.containerPoint,n=e.getPointsInCategory(i);if(n&&n.length)return n[0]._onPointMouseOver.call(n[0],t),e.drawHighlightBackground(n),!0}return!1},_removeHightlight:function(t){var e=this.vanchart,i=e.getSharedAxis(),n=e.hoverPoints;i&&i.removeHighlightBackground&&i.removeHighlightBackground(),n&&n.length&&n[0]._onPointMouseOut.call(n[0],t),e.hoverPoints=null},getEvents:function(){return{mouseover:this.onContainerMouseOver,mousemove:this.onContainerMouseMove,mouseout:this.onContainerMouseOut,tap:this.onContainerTap,panstart:this.onContainerPanStart,panmove:this.onContainerPanMove,panend:this.onContainerPanEnd,wheel:this.onContainerWheel}},_supportCoordinateZoom:function(){var t=this.vanchart.hoverPoint&&"vanChartForceBubble"==this.vanchart.vanChartType,e=this.vanchart.options;return i.isSupportSVG()&&e.zoom&&e.zoom.zoomType&&!t},destroy:function(){this.hammer.destroy()},_inZoomBar:function(t){var e=this.vanchart.getComponent(o.ZOOM_COMPONENT);return e&&e.bounds&&i.containsPoint(e.bounds,t)},preventDefault:function(t){var e=t.srcEvent,a=e.target||e.srcElement,s=n.getMousePos(e,this._container),h=this.pressed||this._inZoomBar(s),l=this.vanchart.getComponent(o.ZOOM_COMPONENT);return!h&&l&&(h=l.target||this._zoomAsTarget(l,s),h=h&&(Math.abs(t.angle)<45||Math.abs(t.angle)>135)),this.vanchart.isMap()&&(h=this.vanchart._zoomEnabled()&&"A"!=a.nodeName), -this.vanchart.chartType()===r.GANTT_CHART&&(h=i.containsPoint(this.vanchart.panBounds,s)),h?this.hammer.touchAction.setTouchActionNone():this.hammer.touchAction.recoverTouchAction(),h},normalizeWheel:function(t){var e=0,i=0,n=0,r=0;return"detail"in t&&(i=t.detail),"wheelDelta"in t&&(i=-t.wheelDelta/120),"wheelDeltaY"in t&&(i=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=i,i=0),n=e*h,r=i*h,"deltaY"in t&&(r=t.deltaY),"deltaX"in t&&(n=t.deltaX),(n||r)&&t.deltaMode&&(1===t.deltaMode?(n*=l,r*=l):(n*=u,r*=u)),n&&!e&&(e=1>n?-1:1),r&&!i&&(i=1>r?-1:1),{spinX:e,spinY:i,pixelX:n,pixelY:r}}});return m}),define("vector/Layer",["require","../dom/Evented","../utils/BaseUtils"],function(t){var e=t("../dom/Evented"),i=t("../utils/BaseUtils"),n=e.extend({options:{pane:"overlayPane",nonBubblingEvents:[]},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},beforeAdd:function(t){this._renderer=t.getMapRenderer(this)},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e)}},_reset:i.falseFn,_project:i.falseFn,_update:i.falseFn});return n}),define("utils/Bounds",["require","./Point2D"],function(t){var e=t("./Point2D"),i=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,r=i.length;r>n;n++)this.extend(i[n])};return i.prototype={extend:function(t){return t=e.create(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new e((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new e(this.min.x,this.max.y)},getTopRight:function(){return new e(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var n,r;return t="number"==typeof t[0]||t instanceof e?e.create(t):i.create(t),t instanceof i?(n=t.min,r=t.max):n=r=t,n.x>=this.min.x&&r.x<=this.max.x&&n.y>=this.min.y&&r.y<=this.max.y},intersects:function(t){t=i.create(t);var e=this.min,n=this.max,r=t.min,a=t.max,o=a.x>=e.x&&r.x<=n.x,s=a.y>=e.y&&r.y<=n.y;return o&&s},overlaps:function(t){t=i.create(t);var e=this.min,n=this.max,r=t.min,a=t.max,o=a.x>e.x&&r.xe.y&&r.y24?(isFinite(r)&&(clearTimeout(s),s=setTimeout(e,r)),o=0):(o=1,u(e))}function i(){var t=Date.now();for(h=r;h;)t>=h.t&&(h.f=h.c(t-h.t)),h=h.n;return t}function n(){for(var t,e=r,i=1/0;e;)e.f?e=t?t.n=e.n:r=e.n:(e.th&&(i=0),3>h&&(n=Date.now());var l=n+i,c={c:t,t:l,f:!1,n:null};a?a.n=c:r=c,a=c,o||(s=clearTimeout(s),o=1,u(e))};return c.flush=function(){i(),n()},c.getActiveTimer=function(){return h},c}),define("utils/Interpolator",["require","./ColorUtils"],function(t){function e(t,e){var i=typeof e;return("string"===i?p.hasColorName(e)||/^(#|rgb\(|hsl\()/.test(e)?n:r:Array.isArray(e)?s:"object"===i&&isNaN(e)?a:o)(t,e)}function i(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function n(t,e){t="none"==t||""==t?e:t,t=p.getRGBAColorArray(t),e=p.getRGBAColorArray(e);var n=t[0],r=t[1],a=t[2],o=e[0]-n,s=e[1]-r,h=e[2]-a;return function(t){return"#"+i(Math.round(n+o*t))+i(Math.round(r+s*t))+i(Math.round(a+h*t))}}function r(t,e){var i,n,r,a=g.lastIndex=m.lastIndex=0,s=-1,h=[],l=[];for(t+="",e+="";(i=g.exec(t))&&(n=m.exec(e));)(r=n.index)>a&&(r=e.slice(a,r),h[s]?h[s]+=r:h[++s]=r),(i=i[0])===(n=n[0])?h[s]?h[s]+=n:h[++s]=n:(h[++s]=null,l.push({i:s,x:o(i,n)})),a=m.lastIndex;return an;++n)h[(i=l[n]).i]=i.x(t);return h.join("")})}function a(t,i){var n,r={},a={};for(n in t)n in i?r[n]=e(t[n],i[n]):a[n]=t[n];for(n in i)n in t||(a[n]=i[n]);return function(t){for(n in r)a[n]=r[n](t);return a}}function o(t,e){return t=+t,e=+e,function(i){return t*(1-i)+e*i}}function s(t,i){var n,r=[],a=[],o=t.length,s=i.length,h=Math.min(t.length,i.length);for(n=0;h>n;++n)r.push(e(t[n],i[n]));for(;o>n;++n)a[n]=t[n];for(;s>n;++n)a[n]=i[n];return function(t){for(n=0;h>n;++n)a[n]=r[n](t);return a}}function h(t){var e=document.createElementNS("http://www.w3.org/2000/svg","g");return(h=function(t){if(null!=t){e.setAttribute("transform",t);var i=e.transform.baseVal.consolidate()}return new l(i?i.matrix:v)})(t)}function l(t){var e=[t.a,t.b],i=[t.c,t.d],n=c(e),r=u(e,i),a=c(d(i,e,-r))||0;e[0]*i[1]180?d+=360:d-c>180&&(c+=360),r.push({i:n.push(n.pop()+"rotate(",null,")")-2,x:o(c,d)})):d&&n.push(n.pop()+"rotate("+d+")"),f!=p?r.push({i:n.push(n.pop()+"skewX(",null,")")-2,x:o(f,p)}):p&&n.push(n.pop()+"skewX("+p+")"),g[0]!=m[0]||g[1]!=m[1]?(i=n.push(n.pop()+"scale(",null,",",null,")"),r.push({i:i-4,x:o(g[0],m[0])},{i:i-2,x:o(g[1],m[1])})):(1!==m[0]||1!==m[1])&&n.push(n.pop()+"scale("+m+")"),i=r.length,function(t){for(var e,a=-1;++ai)return c();var n=r[r.active];n&&(--r.count,delete r[r.active],n.event&&n.event.interrupt.call(t)),r.active=i,a.event&&a.event.start.call(t),a.tween.forEach(function(e,i){(i=i.call(t))&&m.push(i)}),f=a.ease,d=a.duration,s(function(){return g.c=u(e||1)?o.trueFn:u,1},0,l)}function u(e){if(r.active!==i)return 1;for(var n=e/d,o=f(n),s=m.length;s>0;)m[--s].call(t,o);return n>=1?(a.event&&a.event.end.call(t),c()):void 0}function c(){return--r.count?r[i]=void 0:t[e]=void 0,1}var d,f,p=a.delay,g=s.getActiveTimer(),m=[];return g.t=p+l,n>=p?h(n-p):void(g.c=h)},0,l)}}function n(){return++d}function r(t){return null==t?"__transition__":"__transition_"+t+"__"}function a(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}var o=t("../utils/BaseUtils"),s=t("../utils/Timer"),h=t("../utils/vMap"),l=t("../utils/Interpolator"),u=t("../utils/BezierEasing"),c=o.isSupportSVG(),d=0,f=function(t,e,a,o){var s=n(),h=r(e);a=a||{time:Date.now(),ease:u.ease("linear"),delay:0,duration:250},this.noAnimation=o||!c,o&&(a.time=0),i(t.node(),h,s,a),this.elW=t,this.namespace=h,this.id=s};return o.extend(f.prototype,{setAnimation:function(t){for(var e in t)this[e]&&this[e](t[e]);return this},tween:function(t,e){var i=this.id,n=this.namespace,r=this.elW.node();return arguments.length<2?r[n][i].tween.get(t):(null==e?r[n][i].tween.remove(t):r[n][i].tween.set(t,e),this)},attr:function(t,i){function n(){this.removeAttribute(h)}function r(){this.removeAttributeNS(h.space,h.local)}function a(t){return null==t?n:(t+="",function(){var e,i=this.getAttribute(h);return i!==t&&(e=s(i,t),function(t){this.setAttribute(h,e(t))})})}function o(t){return null==t?r:(t+="",function(){var e,i=this.getAttributeNS(h.space,h.local);return i!==t&&(e=s(i,t),function(t){this.setAttributeNS(h.space,h.local,e(t))})})}if(arguments.length<2){for(i in t)this.attr(i,t[i]);return this}if(this.noAnimation)return this.elW.attr(t,i),this;var s="transform"==t?l.interpolateTransform:l,h=t;return e(this,"attr."+t,i,h.local?o:a)},attrTween:function(t,e){function i(t,i){var n=e.call(this,t,i,this.getAttribute(r));return n&&function(t){this.setAttribute(r,n(t))}}function n(t,i){var n=e.call(this,t,i,this.getAttributeNS(r.space,r.local));return n&&function(t){this.setAttributeNS(r.space,r.local,n(t))}}if(arguments.length<2){for(e in t)this.attrTween(e,t[e]);return this}var r=t;if(this.noAnimation){var a=e.call(this.elW.node());return this.elW.attr(r,a(1)),this}return this.tween("attr."+t,r.local?n:i)},style:function(t,i,n){function r(){this.style.removeProperty(t)}function o(e){return null==e?r:(e+="",function(){var i,r=a(this).getComputedStyle(this,null).getPropertyValue(t);return r!==e&&(i=l(r,e),function(e){this.style.setProperty(t,i(e),n)})})}var s=arguments.length;if(3>s){if("string"!=typeof t){2>s&&(i="");for(n in t)this.style(n,t[n],i);return this}n=""}return this.noAnimation?(this.elW.style(t,i),this):e(this,"style."+t,i,o)},styleTween:function(t,e,i){function n(n,r){var o=e.call(this,n,r,a(this).getComputedStyle(this,null).getPropertyValue(t));return o&&function(e){this.style.setProperty(t,o(e),i)}}if(arguments.length<3&&(i=""),this.noAnimation){var r=e.call(this.elW.node());return this.elW.style(t,r(1)),this}return this.tween("style."+t,n)},remove:function(){var t=this.namespace;return this.each("end.transition",function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)})},each:function(t,e){var i=this.elW.node(),n=this.id,r=this.namespace,a=i[r][n];return(a.event||(a.event=o.dispatch("start","end","interrupt"))).on(t,e),this},ease:function(t){var e=this.id,i=this.namespace,n=this.elW.node();return arguments.length<1?n[i][e].ease:("function"!=typeof t&&(t=u.ease.apply(null,arguments)),n[i][e].ease=t,this)},delay:function(t){var e=this.id,i=this.namespace,n=this.elW.node();return arguments.length<1?n[i][e].delay:(t=+t,n[i][e].delay=t,this)},duration:function(t){var e=this.id,i=this.namespace,n=this.elW.node();return arguments.length<1?n[i][e].duration:(t=Math.max(1,t),n[i][e].duration=t,this)},transition:function(t){var e=this.id,i=this.namespace,n=this.elW.node(),r=n[i][e];return new f(this.elW,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration},this.noAnimation).setAnimation(t)},animate:function(t){return this.setAnimation(t)}}),f.d3_transitionNamespace=r,f.nextTransitionID=n,f}),define("vector/ElementWrapper",["require","../utils/Class","../dom/DomUtils","./Transition","../utils/BaseUtils"],function(t){var e=t("../utils/Class"),i=t("../dom/DomUtils"),n=t("./Transition"),r=t("../utils/BaseUtils").isArray,a=e.extend({initialize:function(t,e){return this.rawElement=t,this.renderer=e,this},node:function(){return this.rawElement},addTo:function(t){return t=t||this.renderer._container,t.append(this),this},addToBack:function(t){return t=t||this.renderer._container,t=t.node(),t.firstChild?t.insertBefore(this.node(),t.firstChild):t.appendChild(this.node()),this},add:function(){return"div"===this.type?this.addTo(this.renderer._divContainer):this.addTo(this.renderer._container)},append:function(t){return this.node().appendChild(t.node()),t},datum:function(){return arguments.length?(this._datum=arguments[0],this):this._datum},addClass:function(t){return i.addClass(this.node(),t),this},remove:function(){return i.remove(this.node()),this},removed:function(){return!(this.node().parentNode&&this.node().parentNode.tagName)},isVisible:function(){return!this.removed()&&"none"!=this.node().style.display},setType:function(t){return this.type=t,this},vRotate:function(t,e){return this.renderer.vRotate(this,t,e),this},vMiddle:function(){this.renderer.vMiddle(this)},animate:function(t){if(t){if(r(t)){for(var e=this.transition().setAnimation(t[0]),i=1,n=t.length;n>i;i++)e=e.transition(t[i]);return this.setTransitionEnd(e,t[n-1].style)}return this.setTransitionEnd(this.transition().setAnimation(t),t.style)}throw new Error("animate para empty")},setTransitionEnd:function(t,e){var i=this,n=this.renderer.vanchart;return++n.animationCount,t.each("end",function(){e&&i.style(e),n._animationStarted&&(--n.animationCount||(n.animationCount=-1,n.fire("animationEnd")))})},effectTransition:function(){return new n(this)},transition:function(t){return new n(this,t,null,!this.renderer.isAnimation)},interrupt:function(t){var e,i=this.node(),r=n.d3_transitionNamespace(t);return(e=i[r])&&e[e.active]&&(--e.count?delete e[e.active]:delete i[r],e.active+=.5),this}});return a}),define("vector/Renderer",["require","./Layer","../dom/DomUtils","../dom/Browser","../utils/Bounds","../utils/BaseUtils","./ElementWrapper"],function(t){var e=t("./Layer"),i=t("../dom/DomUtils"),n=t("../dom/Browser"),r=t("../utils/Bounds"),a=t("../utils/BaseUtils"),o=t("./ElementWrapper"),s=0,h=e.extend({initialize:function(t,e,i){this.dom=t,this.vanchart=e,this.config=i,this.isSupportSVG=a.isSupportSVG(),this.isAnimation=this.isSupportSVG&&a.pick(this.vanchart.options.plotOptions.animation,!0)},resize:function(){},remove:function(){i.remove(this._container.node()),this.off("update",this._updatePaths,this)},div:function(t){var e=new o(document.createElement("div"),this).setType("div").style({position:"absolute",left:0,top:0});return e.isHtml=t,e},vgroup:function(){var t=this.div(),e=this.group();return{divG:t,renderG:e,type:"vgroup",attr:function(){return this.divG.attr.apply(this.divG,arguments),this.renderG.attr.apply(this.renderG,arguments),this},style:function(){return this.divG.style.apply(this.divG,arguments),this.renderG.style.apply(this.renderG,arguments),this},append:function(i){return"div"===i.type&&i.isHtml?t.append(i):"vgroup"===i.type?(t.append(i.divG),e.append(i.renderG)):e.append(i),i},add:function(t){return t?this.renderG.addTo(t):this.renderG.add(),this.divG.add(),this},remove:function(){this.divG.node()&&this.divG.remove(),this.renderG.node()&&this.renderG.remove()},node:function(){return e.node()},vRotate:function(t){isNaN(t)||(this.divG.vRotate(t),this.renderG.vRotate(t))}}},vtext:function(t){return t||!this.isSupportSVG?this.div(t):this.text()},vtspan:function(t){return t||!this.isSupportSVG?this.div(t):this.tspan()},onAdd:function(){this._conatainer||(this._initContainer(),this._zoomAnimated&&i.addClass(this._container.node(),"leaflet-zoom-animated")),this.dom.appendChild(this._container.node()),this._divContainer&&this.dom.appendChild(this._divContainer.node()),this._update(),this.on("update",this._updatePaths,this)},_update:function(){var t=this.vanchart.getSize();if(this._bounds=new r([0,0],t),this._map){var e=s,i=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();this._bounds=new r(i,i.add(t.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);var t=this.vanchart._layers;for(var e in t)t[e]._path&&t[e]._reset()},_onZoomEnd:function(){var t=this.vanchart._layers;for(var e in t)t[e]._path&&t[e]._project()},_updatePaths:function(){var t=this.vanchart._layers;for(var e in t)t[e]._path&&t[e]._update()},_updateTransform:function(t,e){var r=this._container.node(),o=this._map.getZoomScale(e,this._zoom),h=i.getPosition(r),l=this._map.getSize().multiplyBy(.5+s),u=this._map.project(this._center,e),c=this._map.project(t,e),d=c.subtract(u),f=l.multiplyBy(-o).add(h).add(l).subtract(d);n.any3d?i.setTransform(r,f,o):a.isSupportSVG()?i.setPosition(r,f):(r.style.left="0px",r.style.top="0px")}});return h}),define("vector/SvgRenderer",["require","./Renderer","../dom/DomUtils","../utils/BaseUtils","./ElementWrapper"],function(t){function e(t){var e,i;return e=t.match(/translate\(\s*([\d|.|e|-]+)(?:[,\s]*)([\d|.|e|-]*)\s*\)/i),e&&e.shift(),i=t.match(/rotate\(\s*([\d|.|e|-]+[degratun]*)(?:[,\s]*)([\d|.|e|-]*)(?:[,\s]*)([\d|.|e|-]*)\s*\)/i),i=i&&i[1]||0,{translate:e,rotate:i}}function i(){s||(s=!0,o.include({imageContent:function(t){return this.node().setAttributeNS("http://www.w3.org/1999/xlink","href",t),this},textContent:function(t){return"div"===this.type?this.node().innerHTML=t:this.node().textContent=t,this},attr:function(){return"div"===this.type?this.style.apply(this,arguments):r.attr.apply(null,[this.node()].concat(a.objectToArray(arguments))),this},style:function(t){var i;2===arguments.length?(i={},i[arguments[0]]=arguments[1]):i=arguments[0];var n,r=this.styles,o={},s=this.node(),h="",l=!r;if(i&&i.color&&(i.fill=i.color),i&&i.fill&&"div"===this.type&&(i.color=i.fill),r)for(n in i)i[n]!==r[n]&&(o[n]=i[n],l=!0);if(l){if("div"===this.type){var u={x:"left",y:"top",dx:"margin-left"};for(var c in u){var d;null!=(d=o[c])&&(o[u[c]]=/em/gi.test(d)?d:d+"px",delete o[c])}if(o.transform){var f=e(o.transform.replace(/px/gi,""));f.translate&&(o[a.transPrefix+"transform"]="translate("+f.translate[0]+"px,"+f.translate[1]+"px)")}}r&&(i=a.extend(r,o)),this.styles=i;var p=function(t,e){return"-"+e.toLowerCase()};for(n in i)h+=n.replace(/([A-Z])/g,p)+":"+i[n]+";";s.style.cssText=h,i.fill&&(s.style.fill=i.fill)}return this}}))}var n=t("./Renderer"),r=t("../dom/DomUtils"),a=t("../utils/BaseUtils"),o=t("./ElementWrapper"),s=!1,h=n.extend({_initContainer:function(){i(),this._container=new o(this.create("svg"),this),this.defs=new o(this.create("defs"),this).addTo(this._container),this._divContainer=this.div().style({"white-space":"nowrap","pointer-events":"none"})},resize:function(){var t=this.vanchart.width,e=this.vanchart.height;this._container.style({width:t+"px",height:e+"px"})},_update:function(){if(!(this._map&&this._map._animatingZoom&&this._bounds)){n.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container.node();this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),r.setPosition(i,t.min),this._map&&i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},line:function(t){return new o(this.create("line"),this).attr(t)},rect:function(t){return new o(this.create("rect"),this).attr(t)},circle:function(t){return new o(this.create("circle"),this).attr(t)},path:function(t){return new o(this.create("path"),this).attr(t)},text:function(t){return new o(this.create("text"),this).attr(t)},tspan:function(t){return new o(this.create("tspan"),this).attr(t)},image:function(t){return new o(this.create("image"),this).attr(t)},group:function(t){return new o(this.create("g"),this).attr(t)},colorGradient:function(t,e,i){i=i||"linearGradient";var n=new o(this.create(i),this);t.id=a.stamp(n),n.attr(t),n.stops=[];for(var r=0,s=e.length;s>r;r++)n.stops[r]=new o(this.create("stop"),this).attr(e[r]).addTo(n);return n.addTo(this.defs)},updateColorGradient:function(t,e,i){t.attr(e);for(var n=0,r=i.length;r>n;n++)t.stops[n].attr(i[n])},createClip:function(t,e){e=e||"rect";var i=new o(this.create("clipPath"),this);return i.attr("id",a.stamp(i)),i.setType(e),i[e]=new o(this.create(e),this).attr(t).addTo(i),i.addTo(this.defs),i},clip:function(t,e){t.attr("clip-path","url(#"+a.stamp(e)+")")},updateClip:function(t,e){t&&t[t.type].attr(e)},imagePattern:function(t,e,i){var n=new o(this.create("pattern"),this);return t.id=a.stamp(n),n.attr(t),n.image=new o(this.create("image"),this).addTo(n),n.image.attr(e),n.image.imageContent(i),n.image._imageUrl=i,n.addTo(this.defs),n},updateImagePattern:function(t,e,i,n){t.attr(e),t.image.attr(i),t.image._imageUrl!=n&&(t.image.imageContent(n),t.image._imageUrl=n)},createDropShadowFilter:function(t,e,i,n,r,s,h){r=r||0,s=s||0,h=h||0;var l=new o(this.create("filter"),this),u=a.stamp(l);return l.attr({id:u,x:"-50%",y:"-50%",width:"200%",height:"200%"}),this.updateDropShadowFilter(l,t,e,i,n,r,s,h),l.feBlend=l.feBlend||new o(this.create("feBlend"),this).addTo(l),l.feBlend.attr({"in":"SourceGraphic",in2:"blurOut",mode:"normal"}),l.addTo(this.defs),l},updateDropShadowFilter:function(t,e,i,n,r,a,s,h){a=a||0,s=s||0,h=h||0,t.feOffset=t.feOffset||new o(this.create("feOffset"),this).addTo(t),t.feOffset.attr({"in":"SourceGraphic",dx:e,dy:i,result:"offOut"}),t.feColorMatrix=t.feColorMatrix||new o(this.create("feColorMatrix"),this).addTo(t),t.feColorMatrix.attr({"in":"offOut",type:"matrix",values:a+" 0 0 0 0 0 "+s+" 0 0 0 0 0 "+h+" 0 0 0 0 0 "+n+" 0",result:"matrixOut"}),t.feGaussianBlur=t.feGaussianBlur||new o(this.create("feGaussianBlur"),this).addTo(t),t.feGaussianBlur.attr({"in":"matrixOut",stdDeviation:r,result:"blurOut"})},createInnerShadowFilter:function(t,e,i,n){var r=new o(this.create("filter"),this),s=a.stamp(r);return r.attr({id:s,x:"-50%",y:"-50%",width:"200%",height:"200%"}),r.feComponentTransfer=r.feComponentTransfer||new o(this.create("feComponentTransfer"),this).attr({"in":"SourceAlpha"}).addTo(r),r.feComponentTransfer.feFuncA=r.feComponentTransfer.feFuncA||new o(this.create("feFuncA"),this).attr({type:"table",tableValues:"1 0"}).addTo(r.feComponentTransfer),r.feGaussianBlur=r.feGaussianBlur||new o(this.create("feGaussianBlur"),this).addTo(r),r.feGaussianBlur.attr("stdDeviation",n),r.feOffset=r.feOffset||new o(this.create("feOffset"),this).addTo(r),r.feOffset.attr({dx:t,dy:e,result:"offsetblur"}),r.feFlood=r.feFlood||new o(this.create("feFlood"),this).addTo(r),r.feFlood.attr({"flood-color":"black","flood-opacity":i,result:"color"}),r.feComposite1=r.feComposite1||new o(this.create("feComposite"),this).attr({in2:"offsetblur",operator:"in"}).addTo(r),r.feComposite2=r.feComposite2||new o(this.create("feComposite"),this).attr({in2:"SourceAlpha",operator:"in"}).addTo(r),r.merge=r.merge||new o(this.create("feMerge"),this).addTo(r),r.merge.feMergeNode1=r.merge.feMergeNode1||new o(this.create("feMergeNode"),this).attr("in","SourceGraphic").addTo(r.merge),r.merge.feMergeNode2=r.merge.feMergeNode2||new o(this.create("feMergeNode"),this).addTo(r.merge),r.addTo(this.defs),r},create:function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)},vRotate:function(t,i,n){var r,o,s,h=t.node();if("div"===t.type){o=t.styles[a.transPrefix+"transform"]||"",o&&(r=e(o.replace(/px/gi,"")),o="",r.translate&&(o="translate("+r.translate[0]+"px,"+r.translate[1]+"px) ")),s="rotate("+i+"deg)",o+=s;var l=a.transPrefix+"transform";t.styles[l]=o,h.style[l]=o}else{var u=(h.scrollWidth||h.getBBox().width)/2,c=(h.scrollHeight||h.getBBox().height)/2-1;u+=+h.getAttribute("x")||0,c+=+h.getAttribute("y")||0,o=h.getAttribute("transform")||"",o&&(r=e(o),o="",r.translate&&(o="translate("+r.translate[0]+" "+r.translate[1]+") ")),s="rotate("+i+" "+u+" "+c+")",o+=s,n||t.attr("transform",o)}return t.rotateStr=s,this},vMiddle:function(t){if("div"===t.type){var e=t.node(),i=e.offsetWidth;e.style.marginLeft=-i/2+"px"}else t.attr("text-anchor","middle");return this}});return h.include({getEvents:function(){var t=n.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_onZoomStart:function(){this._update()}}),h}),define("utils/PathUtils",["require"],function(t){function e(t){var e=/([clmz]),?([^clmz]*)/gi,i={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},n=/[ahqstv]/gi,a=h;if(String(t).match(n)&&(a=r),n=/[clmz]/g,a==h&&!String(t).match(n)){var o=String(t).replace(e,function(t,e,n){var r=[],a="m"==e.toLowerCase(),o=i[e];return n.replace(L,function(t){a&&2===r.length&&(o+=r+i["m"==e?"l":"L"],r=[]),r.push(x(t*w))}),o+r});return o}var s,l,u=a(t);o=[];for(var c=0,d=u.length;d>c;c++){s=u[c],l=u[c][0].toLowerCase(),"z"==l&&(l="x");for(var f=1,p=s.length;p>f;f++)l+=x(s[f]*w)+(f!=p-1?",":M);o.push(l)}return o.join(P)}function i(t){if(!t&&"string"!=typeof t)return null;var e={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},i=[];return String(t).replace(f,function(t,n,r){var a=[],o=n.toLowerCase();if(r.replace(p,function(t,e){e&&a.push(+e)}),"m"==o&&a.length>2&&(i.push([n][g](a.splice(0,2))),o="l",n="m"==n?"l":"L"),"r"==o)i.push([n][g](a));else for(;a.length>=e[o]&&(i.push([n][g](a.splice(0,e[o]))),e[o]););}),i.toString=n,i}function n(){return this.join(",").replace(C,"$1")}function r(t,e){for(var i=h(t),n=e&&h(e),r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},l={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},u=(function(t,e,i){var n,r,h={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in h)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][g](s[m](0,[e.x,e.y][g](t.slice(1))));break;case"S":"C"==i||"S"==i?(n=2*e.x-e.bx,r=2*e.y-e.by):(n=e.x,r=e.y),t=["C",n,r][g](t.slice(1));break;case"T":"Q"==i||"T"==i?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][g](a(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][g](a(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][g](o(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][g](o(e.x,e.y,t[1],e.y));break;case"V":t=["C"][g](o(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][g](o(e.x,e.y,e.X,e.Y))}return t}),c=function(t,e){if(t[e].length>7){t[e].shift();for(var r=t[e];r.length;)f[e]="A",n&&(p[e]="A"),t.splice(e++,0,["C"][g](r.splice(0,6)));t.splice(e,1),b=_(i.length,n&&n.length||0)}},d=function(t,e,r,a,o){t&&e&&"M"==t[o][0]&&"M"!=e[o][0]&&(e.splice(o,0,["M",a.x,a.y]),r.bx=0,r.by=0,r.x=t[o][1],r.y=t[o][2],b=_(i.length,n&&n.length||0))},f=[],p=[],v="",y="",x=0,b=Math.max(i.length,n&&n.length||0);b>x;x++){i[x]&&(v=i[x][0]),"C"!=v&&(f[x]=v,x&&(y=f[x-1])),i[x]=u(i[x],r,y),"A"!=f[x]&&"C"==v&&(f[x]="C"),c(i,x),n&&(n[x]&&(v=n[x][0]),"C"!=v&&(p[x]=v,x&&(y=p[x-1])),n[x]=u(n[x],l,y),"A"!=p[x]&&"C"==v&&(p[x]="C"),c(n,x)),d(i,n,r,l,x),d(n,i,l,r,x);var T=i[x],A=n&&n[x],C=T.length,L=n&&A.length;r.x=T[C-2],r.y=T[C-1],r.bx=parseFloat(T[C-4])||r.x,r.by=parseFloat(T[C-3])||r.y,l.bx=n&&(parseFloat(A[L-4])||l.x),l.by=n&&(parseFloat(A[L-3])||l.y),l.x=n&&A[L-2],l.y=n&&A[L-1]}return n?[i,n]:i}function a(t,e,i,n,r,a){var o=1/3,s=2/3;return[o*t+s*i,o*e+s*n,o*r+s*i,o*a+s*n,r,a]}function o(t,e,i,n){return[t,e,i,n,i,n]}function s(t,e,i,n,r,a,o,h,l,u){var c,d=120*b/180,f=b/180*(+r||0),p=[],m=function(t,e,i){var n=t*y.cos(i)-e*y.sin(i),r=t*y.sin(i)+e*y.cos(i);return{x:n,y:r}};if(u)E=u[0],S=u[1],M=u[2],w=u[3];else{c=m(t,e,-f),t=c.x,e=c.y,c=m(h,l,-f),h=c.x,l=c.y;var v=(y.cos(b/180*r),y.sin(b/180*r),(t-h)/2),_=(e-l)/2,x=v*v/(i*i)+_*_/(n*n);x>1&&(x=y.sqrt(x),i=x*i,n=x*n);var C=i*i,L=n*n,P=(a==o?-1:1)*y.sqrt(T((C*L-C*_*_-L*v*v)/(C*_*_+L*v*v))),M=P*i*_/n+(t+h)/2,w=P*-n*v/i+(e+l)/2,E=y.asin(((e-w)/n).toFixed(9)),S=y.asin(((l-w)/n).toFixed(9));E=M>t?b-E:E,S=M>h?b-S:S,0>E&&(E=2*b+E),0>S&&(S=2*b+S),o&&E>S&&(E-=2*b),!o&&S>E&&(S-=2*b)}var O=S-E;if(T(O)>d){var k=S,D=h,R=l;S=E+d*(o&&S>E?1:-1),h=M+i*y.cos(S),l=w+n*y.sin(S),p=s(h,l,i,n,r,0,o,D,R,[S,k,M,w])}O=S-E;var B=y.cos(E),I=y.sin(E),G=y.cos(S),N=y.sin(S),H=y.tan(O/4),z=4/3*i*H,U=4/3*n*H,F=[t,e],V=[t+z*I,e-U*B],W=[h+z*N,l-U*G],X=[h,l];if(V[0]=2*F[0]-V[0],V[1]=2*F[1]-V[1],u)return[V,W,X][g](p);p=[V,W,X][g](p).join()[A](",");for(var Y=[],q=0,Z=p.length;Z>q;q++)Y[q]=q%2?m(p[q-1],p[q],f).y:m(p[q],p[q+1],f).x;return Y}function h(t){if("string"==typeof t&&(t=i(t)),!t||!t.length)return[["M",0,0]];var e=[],r=0,a=0,o=0,s=0,h=0;"M"==t[0][0]&&(r=+t[0][1],a=+t[0][2],o=r,s=a,h++,e[0]=["M",r,a]);for(var u,c,d=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),f=h,p=t.length;p>f;f++){if(e.push(u=[]),c=t[f],c[0]!=v.call(c[0]))switch(u[0]=v.call(c[0]),u[0]){case"A":u[1]=c[1],u[2]=c[2],u[3]=c[3],u[4]=c[4],u[5]=c[5],u[6]=+(c[6]+r),u[7]=+(c[7]+a);break;case"V":u[1]=+c[1]+a;break;case"H":u[1]=+c[1]+r;break;case"R":for(var m=[r,a][g](c.slice(1)),_=2,y=m.length;y>_;_++)m[_]=+m[_]+r,m[++_]=+m[_]+a;e.pop(),e=e[g](l(m,d));break;case"M":o=+c[1]+r,s=+c[2]+a;default:for(_=1,y=c.length;y>_;_++)u[_]=+c[_]+(_%2?r:a)}else if("R"==c[0])m=[r,a][g](c.slice(1)),e.pop(),e=e[g](l(m,d)),u=["R"][g](c.slice(-2));else for(var x=0,b=c.length;b>x;x++)u[x]=c[x];switch(u[0]){case"Z":r=o,a=s;break;case"H":r=u[1];break;case"V":a=u[1];break;case"M":o=u[u.length-2],s=u[u.length-1];default:r=u[u.length-2],a=u[u.length-1]}}return e.toString=n,e}function l(t,e){for(var i=[],n=0,r=t.length;r-2*!e>n;n+=2){var a=[{x:+t[n-2],y:+t[n-1]},{x:+t[n],y:+t[n+1]},{x:+t[n+2],y:+t[n+3]},{x:+t[n+4],y:+t[n+5]}];e?n?r-4==n?a[3]={x:+t[0],y:+t[1]}:r-2==n&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[r-2],y:+t[r-1]}:r-4==n?a[3]=a[2]:n||(a[0]={x:+t[n],y:+t[n+1]}),i.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return i}function u(t,i,n,r,a){return a?[["M",t+a,i],["l",n-2*a,0],["a",a,a,0,0,1,a,a],["l",0,r-2*a],["a",a,a,0,0,1,-a,a],["l",2*a-n,0],["a",a,a,0,0,1,-a,-a],["l",0,2*a-r],["a",a,a,0,0,1,a,-a],["z"]]:e([["M",t,i],["l",n,0],["l",0,r],["l",-n,0],["z"]])}function c(t,i,n){return e([["M",t,i],["m",0,-n],["a",n,n,0,1,1,0,2*n],["a",n,n,0,1,1,0,-2*n],["z"]])}function d(t,i,n,r){return e([["M",t,i],["L",n,r]])}var f=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,p=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,g="concat",m="apply",v=String.prototype.toUpperCase,_=Math.max,y=Math,x=y.round,b=y.PI,T=Math.abs,A="split",C=/,?([achlmqrstvxz]),?/gi,L=/-?\d*\.?\d+(?:[eE][\-+]?\d+)?/g,P=" ",M="",w=1;return window.tmp={path2vml:e,rectPath:u,linePath:d,circlePath:c},window.tmp}),define("vector/VmlRenderer",["require","./Renderer","../utils/PathUtils","../utils/BaseUtils","../utils/ColorUtils","./ElementWrapper","../dom/DomUtils"],function(t){function e(t){var e,i;return e=t.match(/translate\(\s*([\d|.|e|-]+)(?:[,\s]*)([\d|.|e|-]*)\s*\)/i),e&&e.shift(),i=t.match(/rotate\(\s*([\d|.|e|-]+[degratun]*)(?:[,\s]*)([\d|.|e|-]*)(?:[,\s]*)([\d|.|e|-]*)\s*\)/i),i=i&&i[1]||0,{translate:e,rotate:i}}function i(){c||(c=!0,s.include({imageContent:function(t){return this.style({src:t}),this},textContent:function(t){return"div"===this.type?this.node().innerHTML=t:this.node().textContent=t, - this},attr:function(){return"div"===this.type?this.style.apply(this,arguments):this.renderer.attr(this,arguments),this},style:function(){var t;return 2===arguments.length?(t={},t[arguments[0]]=arguments[1]):t=arguments[0],this.renderer.style(this,t),this}}))}var n=t("./Renderer"),r=t("../utils/PathUtils"),a=t("../utils/BaseUtils"),o=t("../utils/ColorUtils"),s=t("./ElementWrapper"),h=t("../dom/DomUtils"),l="position:absolute;left:0px;top:0px;width:1px;height:1px;behavior:url(#default#VML);display:inline-block;",u="position:absolute;behavior:url(#default#VML);display:inline-block;",c=!1,d=n.extend({_initContainer:function(){i();var t=this.div().style({"white-space":"nowrap",display:"inline-block"});return h.addClass(t.node(),"van-vml"),this.dom.appendChild(t.node()),this._divContainer=t,this._container=t,t},line:function(t){return this._shapeWithPath(t,"line")},rect:function(t){return this._shapeWithPath(t,"rect")},circle:function(t){return this._shapeWithPath(t,"circle")},path:function(t){return this._shapeWithPath(t,"path")},image:function(t){var e=new s(document.createElement("image"),this).setType("image");return e.attr(t),e},group:function(t){var e=this.div().style({"white-space":"nowrap","pointer-events":"none"});return e.attr(t)},colorGradient:function(t,e,i){return i=i||"linearGradient",{type:i,attrs:t,stops:e,elements:[]}},updateColorGradient:function(t,e,i){t.attrs=e,t.stops=i},_updateGradientFill:function(t,e){var i=t.node(),n=t._fill,r=e.stops,a=e.attrs;if(n){i.removeChild(n),n.on=!0,n.method="none",n.color=r[0]["stop-color"],n.color2=r[r.length-1]["stop-color"];for(var o=[],s=0,h=r.length;h>s;s++){var l=100*r[s].offset+"%";o.push(l+" "+r[s]["stop-color"])}n.type="gradient",n.angle=a.x1==a.x2?0:270,i.appendChild(n)}},textContent:function(t,e){},text:function(){return this.vtext(!1)},tspan:function(){return this.vtspan(!1)},_shapeWithPath:function(t,e){var i=new s(this.create("shape"),this).setType(e),n=i.rawElement;return n.style.cssText=l,n.coordsize="1 1",i.attr(t)},create:function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),createClip:function(t,e){return e&&"rect"!=e?void 0:{x:t.x,y:t.y,width:t.width,height:t.height,clipped:[]}},_getClipStr:function(t,e){var i=e.y||0,n=e.x||0,r=n+e.width,a=i+e.height;if("div"!=t.type){var o=t.isLineChart?t.node().parentNode.firstChild:t.node();i-=o.offsetTop,a-=o.offsetTop}return"rect("+i+"px "+r+"px "+a+"px "+n+"px)"},clip:function(t,e){if(e){var i;t.node&&(i=t.node())&&(i.style.clip=this._getClipStr(t,e),e.clipped.push(t))}},updateClip:function(t,e){var i=this;t&&(a.extend(t,e),t.clipped.forEach(function(e){var n=e.node();n&&(n.style.clip=i._getClipStr(e,t))}))},imagePattern:function(t,e){},createDropShadowFilter:function(){return{}},createInnerShadowFilter:function(){return{}},attr:function(t,i){if(i&&!(i.length<=0)&&i[0]){var n={},o=t.rawElement;2===i.length?n[i[0]]=i[1]:n=i[0];var s=t.attrs,h=t.type;if(n=s?a.extend(s,n):a.extend({},n),t.attrs=n,n.transform){var l=e(n.transform);try{l.translate&&(o.style.left=l.translate[0]+"px",o.style.top=l.translate[1]+"px")}catch(u){}l.rotate}if("image"==h)o.style.position="absolute",o.style.left=n.x+"px",o.style.top=n.y+"px",o.style.width=n.width+"px",o.style.height=n.height+"px";else if("group"!=h){var c="";"rect"==h?c=r.rectPath(n.x||0,n.y||0,n.width,n.height):"line"==h?c=r.linePath(n.x1,n.y1,n.x2,n.y2):"path"==h?c=r.path2vml(n.d):"circle"==h&&(c=r.circlePath(n.cx||0,n.cy||0,n.r)),o.path=c}}},style:function(t,i){var n,r=t.styles,s={},h=t.rawElement;if(i&&i.color&&(i.fill=i.color),i&&i.fill&&"div"===t.type&&(i.color=i.fill),r)for(n in i)i[n]!==r[n]&&(s[n]=i[n]);if("div"===t.type){if(s.transform){var l=e(s.transform.replace(/px/gi,""));l.translate&&(s.transform="",s.x=l.translate[0],s.y=l.translate[1])}var c={x:"left",y:"top",dx:"margin-left"};for(var d in c){var f;null!=(f=s[d])&&(s[c[d]]=/em/gi.test(f)?f:f+"px",delete s[d])}}if(r&&(i=a.extend(r,s)),t.styles=i,"div"===t.type){var p=function(t,e){return"-"+e.toLowerCase()},g=1;if(/rgba/i.test(i.color)){var m=o.colorToHexAlpha(i.color);i.color=m.hex,g=m.alpha}a.hasDefined(i["fill-opacity"])&&(g*=i["fill-opacity"]),1>g&&(i.filter="progid:DXImageTransform.Microsoft.Alpha(Opacity="+100*g+")");var v="";for(n in i)v+=n.replace(/([A-Z])/g,p)+":"+i[n]+";";h.style.cssText=v}else if("group"!=t.type)if("image"==t.type)t.node().src=i.src;else{var _=t._stroke,y=t._fill,x=t.node();x.stroked=!0,x.filled=!!(i.fill&&"none"!=i.fill||"image"==t.type),_||(_=t._stroke=this.create("stroke"),_.style.cssText=u),x.appendChild(_),_.weight=(i["stroke-width"]||0)+"px";var b=i.stroke,T=a.hasDefined(i["stroke-opacity"])?i["stroke-opacity"]:1;if(b&&-1!=b.indexOf("rgba")&&(b=o.colorToHexAlpha(b),T*=b.alpha,b=b.hex),_.color=b,_.opacity=i["stroke-width"]?T:0,i["stroke-dasharray"]?_.dashStyle=i["stroke-dasharray"].replace(/( *, *)/g," "):_.dashStyle="","round"==i["stroke-linecap"]&&(_.endcap="round"),x.filled){y||(y=t._fill=this.create("fill"),y.style.cssText=u),x.appendChild(y);var A=i.fill,C=a.hasDefined(i["fill-opacity"])?i["fill-opacity"]:1;-1!=A.indexOf("rgba")&&(A=o.colorToHexAlpha(A),C*=A.alpha,A=A.hex),y.color=A,y.opacity=C}else y&&(x.removeChild(y),t._fill=null)}"display"in i&&(t.node().style.display=i.display),"cursor"in i&&(t.node().style.cursor=i.cursor)},vRotate:function(t,e){e%=360;var i=t.node();a.domRotate(i,0);var n=i.offsetWidth,r=i.offsetHeight;a.domRotate(i,e);var o=i.offsetWidth,s=i.offsetHeight;i.style.marginLeft=(n-o)/2+"px",i.style.marginTop=(r-s)/2+"px"},vMiddle:function(t){var e=t.node(),i=e.offsetWidth;e.style.marginLeft=-i/2+"px"}});return d}),define("chart/map/LatLng",["require","../../utils/BaseUtils"],function(t){var e=t("../../utils/BaseUtils"),i=function(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)};return i.prototype={equals:function(t,e){if(!t)return!1;t=i.create(t);var n=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return(void 0===e?1e-9:e)>=n},toString:function(t){return"LatLng("+e.formatNum(this.lat,t)+", "+e.formatNum(this.lng,t)+")"},distanceTo:function(t){return L.CRS.Earth.distance(this,i.create(t))},wrap:function(){return L.CRS.Earth.wrapLatLng(this)},clone:function(){return new i(this.lat,this.lng,this.alt)}},i.create=function(t,n,r){return t instanceof i?t:e.isArray(t)&&"object"!=typeof t[0]?3===t.length?new i(t[0],t[1],t[2]):2===t.length?new i(t[0],t[1]):null:void 0===t||null===t?t:"object"==typeof t&&"lat"in t?new i(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===n?null:new i(t,n,r)},i}),define("chart/map/Projection",["require","../../utils/Point2D","../../utils/Bounds","./LatLng"],function(t){var e=t("../../utils/Point2D"),i=t("../../utils/Bounds"),n=t("./LatLng"),r={};return r.LonLat={project:function(t){return new e(t.lng,t.lat)},unproject:function(t){return new n(t.y,t.x)},bounds:i.create([-180,-90],[180,90])},r.SphericalMercator={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var i=Math.PI/180,n=this.MAX_LATITUDE,r=Math.max(Math.min(n,t.lat),-n),a=Math.sin(r*i);return new e(this.R*t.lng*i,this.R*Math.log((1+a)/(1-a))/2)},unproject:function(t){var e=180/Math.PI;return new n((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:function(){var t=6378137*Math.PI;return i.create([-t,-t],[t,t])}()},r.Mercator={R:6378137,R_MINOR:6356752.314245179,bounds:i.create([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var i=Math.PI/180,n=this.R,r=t.lat*i,a=this.R_MINOR/n,o=Math.sqrt(1-a*a),s=o*Math.sin(r),h=Math.tan(Math.PI/4-r/2)/Math.pow((1-s)/(1+s),o/2);return r=-n*Math.log(Math.max(h,1e-10)),new e(t.lng*i*n,r)},unproject:function(t){for(var e,i=180/Math.PI,r=this.R,a=this.R_MINOR/r,o=Math.sqrt(1-a*a),s=Math.exp(-t.y/r),h=Math.PI/2-2*Math.atan(s),l=0,u=.1;15>l&&Math.abs(u)>1e-7;l++)e=o*Math.sin(h),e=Math.pow((1-e)/(1+e),o/2),u=Math.PI/2-2*Math.atan(s*e)-h,h+=u;return new n(h*i,t.x*i/r)}},r}),define("chart/map/Transformation",["require","../../utils/Point2D"],function(t){var e=t("../../utils/Point2D"),i=function(t,e,i,n){this._a=t,this._b=e,this._c=i,this._d=n};return i.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,i){return i=i||1,new e((t.x/i-this._b)/this._a,(t.y/i-this._d)/this._c)}},i}),define("chart/map/CRS",["require","../../utils/Bounds","./LatLng","../../utils/BaseUtils","./Projection","./Transformation"],function(t){var e=t("../../utils/Bounds"),i=(t("./LatLng"),t("../../utils/BaseUtils")),n=t("./Projection"),r=t("./Transformation"),a={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var i=this.projection.bounds,n=this.scale(t),r=this.transformation.transform(i.min,n),a=this.transformation.transform(i.max,n);return e.create(r,a)},infinite:!1,wrapLatLng:function(t){var n=this.wrapLng?i.wrapNum(t.lng,this.wrapLng,!0):t.lng,r=this.wrapLat?i.wrapNum(t.lat,this.wrapLat,!0):t.lat,a=t.alt;return e.create(r,n,a)}};return a.Simple=i.extend({},a,{projection:n.LonLat,transformation:new r(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0}),a.Earth=i.extend({},a,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,r=e.lat*i,a=Math.sin(n)*Math.sin(r)+Math.cos(n)*Math.cos(r)*Math.cos((e.lng-t.lng)*i);return this.R*Math.acos(Math.min(a,1))}}),a.EPSG3857=i.extend({},a.Earth,{code:"EPSG:3857",projection:n.SphericalMercator,transformation:function(){var t=.5/(Math.PI*n.SphericalMercator.R);return new r(t,.5,-t,.5)}()}),a.EPSG900913=i.extend({},a.EPSG3857,{code:"EPSG:900913"}),a.EPSG4326=i.extend({},a.Earth,{code:"EPSG:4326",projection:n.LonLat,transformation:new r(1/180,1,-1/180,.5)}),a.EPSG3395=i.extend({},a.Earth,{code:"EPSG:3395",projection:n.Mercator,transformation:function(){var t=.5/(Math.PI*n.Mercator.R);return new r(t,.5,-t,.5)}()}),a}),define("theme/config",["require","../Constants","../utils/QueryUtils","../utils/BaseUtils","../chart/map/CRS","../dom/Browser"],function(t){function e(){var t={pie:{plotOptions:{rotatable:!0,startAngle:0,endAngle:360,borderWidth:1,borderColor:"white",dataLabels:{formatter:{identifier:"${Y}"},enabled:!1,align:"inside"},tooltip:a()},options:{colors:A,style:L,legend:d()}},multiPie:{plotOptions:{borderWidth:1,borderColor:"rgb(255,255,255)",rotatable:!0,gradual:"lighter",innerRadius:0,startAngle:0,endAngle:360,drilldown:!0,tooltip:o(),dataLabels:{formatter:{identifier:"${NAME}"},enabled:!1,align:"inside"}},options:{colors:A,legend:d()}},treeMap:{plotOptions:{borderWidth:1,borderColor:"rgb(255,255,255)",zoom:!0,tooltip:o(),dataLabels:{formatter:{identifier:"${NAME}"},enabled:!1,align:"top"}},options:{colors:A,legend:d()}},bar:{plotOptions:{categoryGap:"20%",gap:"20%",borderRadius:0,borderWidth:1,borderColor:"white",dataLabels:{formatter:{identifier:"${Y}"},enabled:!1,align:"inside"},tooltip:i()},options:{colors:A,style:L,zoom:l(),legend:d(),xAxis:[g()],yAxis:[m()]}},column:{plotOptions:{categoryGap:"20%",gap:"20%",borderRadius:0,borderWidth:1,borderColor:"white",dataLabels:{formatter:{identifier:"${Y}"},enabled:!1,align:"inside"},tooltip:i()},options:{colors:A,style:L,zoom:l(),legend:d(),xAxis:[f()],yAxis:[p()]}},line:{plotOptions:{large:!1,connectNulls:!1,lineWidth:2,step:!1,curve:!1,marker:{radius:4.5},dataLabels:{formatter:{identifier:"${Y}"},enabled:!1,align:"outside"},tooltip:i()},options:{colors:A,zoom:l(),legend:d(),xAxis:[f()],yAxis:[p()]}},area:{plotOptions:{large:!1,connectNulls:!1,lineWidth:2,step:!1,curve:!1,marker:{radius:4.5},dataLabels:{formatter:{identifier:"${Y}"},enabled:!1,align:"outside"},tooltip:i(),fillColor:!0,fillColorOpacity:.15},options:{colors:A,zoom:l(),legend:d(),xAxis:[f()],yAxis:[p()]}},gauge:{thermometer:{layout:"horizontal",tooltip:n(),percentageLabel:{enabled:!1,useHtml:!1,align:"left",style:{color:"#333333",fontSize:"0.75rem",fontFamily:"Verdana",fontWeight:"bold"},formatter:{identifier:"${PERCENT}"}},valueLabel:{enabled:!1,useHtml:!1,align:"left",style:{color:"#bababa",fontSize:"0.75rem",fontFamily:"Verdana"},formatter:{identifier:"${CATEGORY}${VALUE}"}},needle:"#ffffff",slotBackgroundColor:"#eeeeee",thermometerLayout:"vertical"},ring:{layout:"horizontal",tooltip:n(),percentageLabel:{enabled:!1,useHtml:!1,style:{fontSize:"1.5rem",fontFamily:"Verdana",fontWeight:"bold"},formatter:{identifier:"${PERCENT}"}},valueLabel:{enabled:!1,useHtml:!1,style:{color:"#777777",fontSize:"0.75rem",fontFamily:"Verdana"},formatter:{identifier:"${CATEGORY}${VALUE}"}},clockwise:!1,paneBackgroundColor:"#eeeeee",innerPaneBackgroundColor:"#f4f4f4"},pointer:{layout:"horizontal",tooltip:n(),seriesLabel:{enabled:!1,align:y.BOTTOM,useHtml:!1,style:{color:"#333333",fontSize:"0.875rem",fontFamily:"Verdana"},formatter:{identifier:"${CATEGORY}"}},valueLabel:{enabled:!1,useHtml:!1,backgroundColor:"#F5F5F7",style:{color:"#333333",fontSize:"0.6875rem",fontFamily:"Verdana"},formatter:{identifier:"${SERIES}${VALUE}"}},needle:"#E5715A",hinge:"#656B6D",hingeBackgroundColor:"#DCF2F9",paneBackgroundColor:"#FCFCFC"},slot:{layout:"horizontal",tooltip:n(),percentageLabel:{enabled:!1,useHtml:!1,style:{fontSize:"2.25rem",fontFamily:"Verdana",fontWeight:"bold",textShadow:"0px 2px 0px rgba(0,0,0,0.08)"},formatter:{identifier:"${PERCENT}"}},valueLabel:{enabled:!1,useHtml:!1,style:{color:"#666666",fontSize:"0.875rem",fontFamily:"Verdana"},formatter:{identifier:"${CATEGORY}${VALUE}"}},needle:"#ffffff",slotBackgroundColor:"#eeeeee"},options:{colors:A,legend:d(),gaugeAxis:[{type:"value",showLabel:!0,step:1,enableTick:!0,tickColor:"#BBBBBB",tickWidth:1,enableMinorTick:!0,minorTickColor:"#e2e2e2",minorTickWidth:1,labelStyle:{color:"#666666",fontFamily:"Verdana",fontSize:"0.625rem"}}]}},radar:{plotOptions:{fillColorOpacity:.15,columnType:!1,marker:{radius:4.5},lineWidth:2,shape:"circle",dataLabels:{formatter:{identifier:"${Y}"},enabled:!1,align:"outside"},tooltip:i()},options:{colors:A,polar:{},legend:d(),angleAxis:[v()],radiusAxis:[_()]}},scatter:{plotOptions:{large:!1,lineWidth:0,curve:!1,marker:{radius:4.5},opacity:1,tooltip:r(),dataLabels:{formatter:{identifier:"${X}${Y}${SIZE}"},enabled:!1,align:"outside"}},options:{colors:A,zoom:l(),legend:d(),rangeLegend:c(),xAxis:[g()],yAxis:[p()]}},bubble:{plotOptions:{large:!1,displayNegative:!0,shadow:!0,minSize:12,maxSize:60,sizeBy:"area",opacity:.7,tooltip:r(),dataLabels:{formatter:{identifier:"${X}${Y}${SIZE}"},enabled:!1,align:"inside"}},options:{colors:A,zoom:l(),rangeLegend:c(),legend:d(),xAxis:[g()],yAxis:[p()]}},funnel:{plotOptions:{borderColor:"rgb(255,255,255)",borderWidth:1,sort:!0,useSameSlantAngle:!0,dataLabels:{formatter:{identifier:"${VALUE}"},enabled:!1,connectorWidth:1,align:"outside"}},options:{colors:A,legend:d(),style:L}},wordCloud:{plotOptions:{fontFamily:"Microsoft YaHei",maxRotation:0,minRotation:0,tooltip:o(),dataLabels:{enabled:!1}},options:{colors:A,legend:d(),style:L,rangeLegend:c()}},structure:{plotOptions:{layout:"vertical",force:!0,lineColor:"rgb(156,156,156)",lineOpacity:1,borderWidth:1,borderOpacity:1,fillColorOpacity:1,tooltip:o(),dataLabels:{enabled:!1}},options:{colors:A,legend:d(),style:L,rangeLegend:c()}},forceBubble:{plotOptions:{large:!1,displayNegative:!0,shadow:!0,minSize:12,maxSize:60,sizeBy:"area",opacity:1,tooltip:i(),dataLabels:{formatter:{identifier:"{SERIES}"},enabled:!1,align:"inside"}},options:{colors:A,legend:d(),zoom:l(),rangeLegend:c()}},areaMap:{plotOptions:{nullColor:"#cccccc",opacity:.75,borderColor:"#ffffff",borderWidth:1,borderOpacity:1,tooltip:s(),dataLabels:{formatter:{identifier:"${NAME}"},enabled:!1,align:"inside"}},options:{geo:{zoom:!0},colors:A,title:h(),rangeLegend:u(),legend:d(),dTools:{style:{fontFamily:"Microsoft Yahei",color:"#b2b2b2",fontSize:"0.75rem",fontWeight:""},currentColor:"#62b2ef",backgroundColor:"white",enabled:!1}}},pointMap:{plotOptions:{opacity:1,icon:{iconUrl:"../../doc/example/marker-icon.png",iconSize:[25,41]},dataLabels:{formatter:{identifier:"${NAME}"},enabled:!1,align:"outside"},tooltip:s()},options:{geo:{zoom:!0},colors:A,title:h(),rangeLegend:u(),legend:d(),dTools:{style:{fontFamily:"Microsoft Yahei",color:"#b2b2b2",fontSize:"0.75rem",fontWeight:""},currentColor:"#62b2ef",backgroundColor:"white",enabled:!1}}},heatMap:{plotOptions:{maxOpacity:1,minOpacity:0,radius:15,blur:.15},options:{geo:{zoom:!0},colors:A,title:h(),rangeLegend:u(),legend:d()}},lineMap:{plotOptions:{lineWidth:.5,curveness:.3,mouseOverColor:"rgb(253,221,49)",opacity:1},options:{geo:{zoom:!0},colors:A,title:h(),rangeLegend:u(),legend:d()}},gantt:{plotOptions:{newLine:!0,borderWidth:1,borderColor:"white",dataLabels:{formatter:{identifier:"${DURATION}${PROGRESS}"},enabled:!1},tooltip:i()},options:{processes:{resize:!0},levelBar:{enabled:!0},timeAxis:{zoom:!0,showWeekends:!0},colors:A,legend:d()}}};return t.MAP_CONFIG=C,t}function i(){return{formatter:{identifier:"${CATEGORY}${SERIES}${VALUE}"},enabled:!0,animation:!0,follow:!1,backgroundColor:"rgba(0,0,0,0.5)",borderColor:null,borderWidth:0,borderRadius:2,shadow:!0,hideDelay:500,shared:!1,padding:5}}function n(){return x.merge(i(),{formatter:{enabled:!1}},!0)}function r(){return x.merge(i(),{formatter:{identifier:"${SERIES}${X}${Y}${SIZE}"}},!0)}function a(){return x.merge(i(),{formatter:{identifier:"${SERIES}${VALUE}"}},!0)}function o(){return x.merge(i(),{formatter:{identifier:"${NAME}${SERIES}${VALUE}",shared:!0}},!0)}function s(){return x.merge(i(),{formatter:{identifier:"${NAME}${SERIES}${VALUE}${SIZE}",shared:!0}},!0)}function h(){return{align:"center",backgroundColor:null,borderRadius:0,floating:!1,x:0,y:0,text:null,style:{color:"#333333",fontSize:"1.375rem",fontFamily:"Verdana"},useHtml:!1}}function l(){return{zoomType:"xy",zoomTool:{enabled:!1,resize:!0}}}function u(){return{visible:!0,enabled:!0,borderColor:"#cccccc",borderWidth:0,hiddenColor:"#cccccc",hoverColor:"#293C55",style:{color:"#666666",fontFamily:"Verdana",fontSize:"0.875rem"},position:"right",floating:!1,x:0,y:0,layout:"vertical",continuous:!0,margin:10}}function c(){return x.merge(u(),{enabled:!1},!0)}function d(){return{visible:!0,enabled:!1,hiddenColor:"#cccccc",hoverColor:"#293C55",borderRadius:0,borderColor:"#cccccc",borderWidth:0,backgroundColor:null,style:{color:"#666666",fontFamily:"Verdana",fontSize:"0.875rem"},position:"right",floating:!1,layout:"vertical",x:0,y:0,shadow:!1,margin:10}}function f(){return{type:"category",position:"bottom",onZero:!1,reversed:!1,title:{text:null,align:"center",rotation:0,useHtml:!1,style:{color:"#666666",fontFamily:"Verdana",fontSize:"0.875rem"}},lineWidth:1,lineColor:"#cccccc",showArrow:!1,enableTick:!0,enableMinorTick:!1,minorTickColor:"#cccccc",minorTickWidth:1,minorTickLength:2,tickColor:"#cccccc",tickWidth:1,tickLength:4,tickPadding:6,gridLineWidth:0,gridLineColor:"#dddddd",showLabel:!0,labelStyle:{color:"#666666",fontFamily:"Verdana",fontSize:"0.875rem"},labelRotation:0,useHtml:!1}}function p(){return{type:"value",position:"left",onZero:!1,reversed:!1,title:{text:null,align:"center",rotation:0,useHtml:!1,style:{color:"#666666",fontFamily:"Verdana",fontSize:"0.875rem"}},lineWidth:0,lineColor:"#cccccc",showArrow:!1,enableTick:!1,enableMinorTick:!1,minorTickColor:"#cccccc",minorTickWidth:1,minorTickLength:2,tickColor:"#cccccc",tickWidth:1,tickLength:4,tickPadding:6,gridLineWidth:1,gridLineColor:"#dddddd",showLabel:!0,labelStyle:{color:"#666666",fontFamily:"Verdana",fontSize:"0.875rem"},labelRotation:0,useHtml:!1}}function g(){return x.merge(f(),{type:"value"},!0)}function m(){return x.merge(p(),{type:"category"},!0)}function v(){return{type:"category",lineWidth:1,lineColor:"#cccccc",gridLineWidth:1,gridLineColor:"#dddddd",showLabel:!0,labelStyle:{color:"#666666",fontFamily:"Verdana",fontSize:"0.875rem"},labelRotation:0,useHtml:!1}}function _(){return x.merge(v(),{type:"value"},!0)}var y=t("../Constants"),x=t("../utils/QueryUtils"),b=(t("../utils/BaseUtils"),t("../chart/map/CRS")),T=t("../dom/Browser"),A=["#63b2ee","#76da91","#f8cb7f","#f89588","#7cd6cf","#9192ab","#7898e1","#efa666","#eddd86","#9987ce"],C={crs:b.EPSG3857,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:.5,zoomDelta:.5,trackResize:!0,dragging:!0,inertia:!T.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0,scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60},L="gradual";return e}),define("vans/VanChartLibrary",["require","../Constants"],function(t){function e(t){return r[t]||r[n.VANCHART]}function i(t,e){r[t]=e}var n=t("../Constants"),r={};return{get:e,register:i}}),define("vans/VanChart",["require","./../utils/BaseUtils","./../utils/QueryUtils","../dom/Evented","./VanChartLayout","./../ComponentLibrary","./../ChartLibrary","./../Constants","./../HammerHandler","./../vector/SvgRenderer","./../vector/VmlRenderer","../utils/Point2D","./../theme/config","./VanChartLibrary"],function(t){var e=t("./../utils/BaseUtils"),i=t("./../utils/QueryUtils"),n=t("../dom/Evented"),r=t("./VanChartLayout"),a=t("./../ComponentLibrary"),o=t("./../ChartLibrary"),s=t("./../Constants"),h=t("./../HammerHandler"),l=t("./../vector/SvgRenderer"),u=t("./../vector/VmlRenderer"),c=t("../utils/Point2D"),d=5,f=[a.X_AXIS_COMPONENT,a.Y_AXIS_COMPONENT,a.ANGLE_AXIS_COMPONENT],p=n.extend({vanChartType:"vanChart",initialize:function(t,i,n){this.wrapDom=i,this.width=e.getDomWidth(i),this.height=e.getDomHeight(i),this.vancharts=n,this.series=[],this.components={},this._targets={},this.animationCount=0,this._changeDataState=!1,this.fullScreenChart=null,this.setOptions(t),this.handler=new h(this,i),this._initDomLayout(this.wrapDom),this.update()},setOptions:function(t){t.series=t.series||[],t.series.forEach(function(t){t.data=t.data||[]}),this._mergeThemeConfig(t),t.plotOptions.inverted&&t.dataSheet&&(t.dataSheet.enabled=!1),this.options=t,this.fullScreenChart&&this.fullScreenChart.setData(t)},_initDomLayout:function(t){this.dom=t,this.renderer=e.isSupportSVG()?new l(t,this):new u(t,this),this.renderer.onAdd(),this.on({animationStart:this._animationStart,animationEnd:this._animationEnd})},_animationStart:function(){this._animationStarted=!0,this.animationCount=0,this.series.forEach(function(t){t._removeDataLabels(),t.render()}),this.animationCount||this.fire("animationEnd")},_animationEnd:function(){this.renderer&&(this._animationStarted=!1,this.series.forEach(function(t){t._animateEnd()}))},_removeChangeDataState:function(t){this._changeDataState&&(this._changeDataSeries=this._changeDataSeries||[],this._changeDataSeries.push(t),this._changeDataSeries.length>=this.series.length&&(this._changeDataState=!1,this._changeDataSeries=[]))},_needShowMoreLabel:function(){return this._changeDataState&&e.hasDefined(this.options.moreLabel)&&!this.isLargeMode()},_clearMoreLabels:function(){this.series.forEach(function(t){t._clearMoreLabels()})},_initIntermediateState:function(){this.colorMap={},this.orderMap={},this.cateMap={},this.scale=1,this.timeQueue=this.clearTimeQueue(),this.clipPool={},this.axisSize={left:0,right:0,bottom:0,top:0},this.layerMap=this.layerIndex=null},refresh:function(t){this.setOptions(t),this.update()},refreshRestore:function(){var t=this,e=t.components;f.forEach(function(i){e[i]&&t._restoreCategoryAxisBasedSeries(e[i])});var i=this.seriesOfType(s.GAUGE_CHART);i.length==this.series.length&&this.series.sort(function(t,e){return t.index-e.index}),this.seriesOfType(s.PIE_CHART).forEach(function(t){var e=t.points.map(function(t){return t.graphic}),i={};t.options.data.forEach(function(t,e){i[t.x]=e}),t.points.sort(function(t,e){return i[t.x]-i[e.x]}),t.points.forEach(function(t,i){t.graphic=e[i]})});var n=this.seriesOfType(s.MULTIPIE_CHART);n.length&&n[0].orderData(null),this.update()},orderData:function(){var t=this,e=t.components;f.forEach(function(i){e[i]&&t._orderCategoryAxisBasedSeries(e[i])});var i=this.orderType==s.ASCENDING,n=i?1:-1,r=this.seriesOfType(s.GAUGE_CHART);r.length==this.series.length&&this.series.sort(function(t,e){var i=t.getSeryTotalValue(),r=e.getSeryTotalValue();return(i-r)*n}),this.seriesOfType(s.PIE_CHART).forEach(function(t){var e=t.points.filter(function(t){return t.visible}).map(function(t){return t.graphic});t.points.sort(function(t,e){return i?t.y-e.y:e.y-t.y});var n=0;t.points.forEach(function(t){t.visible&&(t.graphic=e[n],++n)})});var o=this.seriesOfType(s.MULTIPIE_CHART);o&&o.length&&o[0].orderData(i),this.reRenderSeries(),f.concat([a.ZOOM_COMPONENT,a.DATA_SHEET_COMPONENT,a.POLAR_COMPONENT]).forEach(function(t){e[t]&&e[t].render()})},_restoreCategoryAxisBasedSeries:function(t){for(var i=0,n=t.getAxisCount();n>i;i++){var r=t.getAxis(i),a=r.series;if(r._isBaseAxis()&&r.isCategory()&&this.orderMap&&Object.keys(this.orderMap).length){var o=this.orderMap[r.componentType][i],s={};o.forEach(function(t,e){s[t]=e});for(var h=r._dataDomain,l=0,u=a.length;u>l;l++){var c=[],d=a[l],f=!0;d.points.forEach(function(t){c[e.indexOf(h,t.category)]=t.graphic,t.graphic||(f=!1)}),d.points.forEach(function(t){t.graphic=f?c[s[t.category]]:t.graphic,d.updatePointGraphic(t)})}}}},_orderCategoryAxisBasedSeries:function(t){for(var i=this.orderType==s.ASCENDING?1:-1,n=0,r=t.getAxisCount();r>n;n++){var a=t.getAxis(n);if(this.orderMap[a.componentType]=this.orderMap[a.componentType]||[],this.orderMap[a.componentType][n]||(this.orderMap[a.componentType][n]=a._dataDomain),a._isBaseAxis()&&a.isCategory()){for(var o=a.series,h=[],l=o[0].points,u=0,c=l.length;c>u;u++){var d=l[u],f=0;d.points.forEach(function(t){t.visible&&t.series.visible&&(f+=Math.abs(t.getTargetValue()))}),h.push({key:d.category,value:f})}h.sort(function(t,e){return(t.value-e.value)*i});var p={},g=[];h.forEach(function(t,e){p[t.key]=e,g.push(t.key)});for(var m=a.getOriginalCategories(),u=0,c=o.length;c>u;u++){var v=[],_=o[u],y=!0;_.points.forEach(function(t){v[e.indexOf(m,t.category)]=t.graphic,t.graphic||(y=!1)}),_.points.forEach(function(t){t.graphic=y?v[p[t.category]]:t.graphic,_.updatePointGraphic(t)})}a.setCategories(g)}}},update:function(){this.series=this.layerMap&&this.layerMap.length?this.layerMap[0].series:this.series,this._initIntermediateState();for(var t,i,n=this.options,r=this,h=n.series,l=n.chartType,u=a.getRegisteredComponents(),c=a.ComponentsOrder,d=0,f=c.length;f>d;d++){if(t=c[d],i=u[t],t==a.RANGE_LEGEND_COMPONENT&&n[t]){var p=n[t].continuous?a.GradientRangeLegend:a.INTERVAL_RANGE_LEGEND;this.components[t]&&this.components[t].type!=p&&(this.components[t].remove(),this.components[t]=null),i=a.get(p)}if(i){var g=n[t]&&(e.hasNotDefined(n[t].enabled)||n[t].enabled);g||t!=a.TOOLBAR_COMPONENT||(g=!0,n[t]={enabled:!0,hidden:!1}),n[t]&&g?this.components[t]?this.components[t].refresh(n[t],r):this.components[t]=new i(n[t],t,r):this.components[t]&&(this.components[t].remove(),this.components[t]=null,delete this.components[t])}}var m,v={},_=[];r.series.forEach(function(t){m=t.type,m==s.GAUGE_CHART&&(m+=t.gaugeType+(t.options.thermometerLayout||"")),m==s.RADAR_CHART&&(m=t.columnType?s.COLUMN_RADAR:s.LINE_RADAR),v[t.name+m]=t}),h.forEach(function(t,i){m=t.type||l;var a=e.pick(t.name,"Series"+i),h=o.get(m),u=a+m;if(m==s.GAUGE_CHART){var c=t.style||n.plotOptions.style,d=t.thermometerLayout||n.plotOptions.thermometerLayout||"";h=o.get(c),u=a+m+c+d}else if(m==s.RADAR_CHART){var f=t.columnType||n.plotOptions.columnType;f=f?s.COLUMN_RADAR:s.LINE_RADAR,h=o.get(f),u=a+f}var p=v[u];p=p?p.refresh(t,i):new h(t,r,i),_.push(p),v[u]=null});for(var y in v)v[y]&&v[y].remove();r.series=_;var x=this.components[a.GAUGE_AXIS_COMPONENT];x&&x.initAttributesWithSeries();var b=this.components[a.RANGE_LEGEND_COMPONENT];b&&b.initAttributesWithSeries(),_.forEach(function(t){if(t.type!==s.LINE_MAP||!t.options.large)for(var e=0,i=t.points.length;i>e;e++)t.points[e].refreshPointColor()}),r.layoutComponentsAndCharts()},layoutComponentsAndCharts:function(){this.hoverPoint=this.hoverSeries=null,r.PLANE_SYSTEM_LAYOUT(this),this.render()},_getDefaultBounds:function(){var t=this.options&&this.options.padding||d,i=this.options&&this.options.borderWidth||0;return t=i+t,e.makeBounds(t,t,Math.max(this.width-2*t,0),Math.max(this.height-2*t,0))},reRenderWholePlot:function(){r.reLayoutPlotBounds(this),r.calculateSeries(this),r.calculateSeriesShapes(this),this.render()},dealAxisZoom:function(t,e){var i=this.options.zoom.zoomType,n=this.components.xAxis,r=this.components.yAxis;n&&-1!==i.indexOf("x")&&n.axisZoom(t,e),r&&-1!==i.indexOf("y")&&r.axisZoom(t,e),this.reRenderWholePlot()},clearAllEffects:function(){this.series.forEach(function(t){t.points.forEach(function(t){t.clearPointEffect()})})},_calculateZoomParas:function(t,e){var i=this.bounds,n=Math.min(t.x,e.x)-i.x,r=Math.min(t.y,e.y)-i.y,a=Math.abs(t.x-e.x),o=Math.abs(t.y-e.y),s=Math.min(i.width/a,i.height/o),h=i.width/s,l=i.height/s,u=(i.width-h)/2-n,c=(i.height-l)/2-r;return{shiftX:u,shiftY:c,scale:s}},_mergeThemeConfig:function(n){var r=t("./../theme/config")(),a={};n.series.forEach(function(t){var o=t.type||n.chartType,h=r[o].plotOptions;if(o==s.GAUGE_CHART){var l=t.style||n.plotOptions.gauge&&n.plotOptions.gauge.style||n.plotOptions.style;l="pointer_semi"==l?"pointer":l,h=r.gauge[l];var u=["seriesLabel","valueLabel","percentageLabel"];u.forEach(function(n){e.hasDefined(t[n])&&i.merge(t[n],h[n],!1)})}a[o]||(a[o]=!0,i.merge(n,r[o].options,!1),n.plotOptions[o]?n.plotOptions[o]=i.merge(n.plotOptions[o],h,!1):n.plotOptions=i.merge(n.plotOptions,h,!1))}),this.isMap()&&(n.xAxis=n.yAxis=n.zoom=void 0,e.extend(n,r.MAP_CONFIG)),n.chartType==s.RADAR_CHART&&(n.polar=n.polar||{}),n.tooltip=n.tooltip||{}},getChartMinMaxValue:function(){var t=Number.MAX_VALUE,e=-t;return this.series.forEach(function(i){i.points.filter(function(t){return!t.isNull&&!isNaN(t.getTargetValue())}).forEach(function(i){var n=i.getTargetValue();e=Math.max(e,n),t=Math.min(t,n)})}),t>e&&(t=0,e=100),[t,e]},getParentDom:function(){return this.dom},getDivParentDom:function(){return this.wrapDom},isInverted:function(){return!!this.options.plotOptions.inverted},setPlotBounds:function(t){this.bounds=t},getPlotClipBounds:function(){var t=0,e=0,i=this.bounds.width,n=this.bounds.height,r={},a=[];return this.components.xAxis&&(a=a.concat(this.components.xAxis._axisList)),this.components.yAxis&&(a=a.concat(this.components.yAxis._axisList)),a.forEach(function(t){var e=t.getPosition();t.isOnZero()||r[e]||(r[e]=t.getLineWidth())}),e=r[s.TOP]?Math.ceil(r[s.TOP]/2):0,n-=e,n=r[s.BOTTOM]?n-Math.ceil(r[s.BOTTOM]/2-.5):n,t=r[s.LEFT]?Math.ceil(r[s.LEFT]/2):0,i-=t,i=r[s.RIGHT]?i-Math.ceil(r[s.RIGHT]/2):i,{x:t+this.bounds.x,y:e+this.bounds.y,width:Math.max(i+1,0),height:Math.max(n+1,0)}},getChartBounds:function(){return e.makeBounds(0,0,this.width,this.height)},xAxis:function(t){t||(t=0);var e=this.components.xAxis;return e?e.getAxis(t):null},yAxis:function(t){t||(t=0);var e=this.components.yAxis;return e?e.getAxis(t):null},polar:function(t){t||(t=0);var e=this.components.polar;return e?e.getAxis(t):null},angleAxis:function(t){t||(t=0);var e=this.components.angleAxis;return e?e.getAxis(t):null},radiusAxis:function(t){t||(t=0);var e=this.components.radiusAxis; - return e?e.getAxis(t):null},gaugeAxis:function(t){t||(t=0);var e=this.components.gaugeAxis;return e?e.getAxis(t):null},getSharedAxis:function(){for(var t=[this.xAxis(),this.yAxis(),this.angleAxis()],e=0;ee;e++)t[e].state=t[e].state==s.STATE_TO_DROP?s.STATE_DROPPED:t[e].state,t[e].state=t[e].state==s.STATE_TO_SHOW?s.STATE_SHOW:t[e].state},isMap:function(){return"vanChartMap"==this.vanChartType},chartType:function(){return this.options.chartType},isHeatMap:function(){return this.options.chartType==s.HEAT_MAP},isAreaMap:function(){return this.options.chartType==s.AREA_MAP},isForceBubble:function(){return"vanChartForceBubble"==this.vanChartType},isLargeMode:function(){return this.options.plotOptions.large},seriesOfType:function(t){return this.series.filter(function(e){return e.type==t})},pointsOfType:function(t){var e=[];return this.series.forEach(function(i){i.type==t&&(e=e.concat(i.points))}),e},setTimeout:function(t,e,i){this.timeQueue[t]&&window.clearTimeout(this.timeQueue[t]),i?this.timeQueue[t]=window.setTimeout(e,i):(e&&e(),this.timeQueue[t]=null)},clearTimeQueue:function(){var t=this.timeQueue||{};return Object.keys(t).map(function(e){window.clearTimeout(t[e])}),{}},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new c(this.width,this.height),this._sizeChanged=!1),this._size.clone()}});return p.include({render:function(){function t(t){e[t]||(e[t]=i.group().addClass(t).add(),e.isMap()&&e[t].addClass("map-component"))}this.vancharts.endLoading();var e=this,i=this.renderer,n=this.getPlotClipBounds();this.plotClip?i.updateClip(this.plotClip,n):this.plotClip=i.createClip(n),["backGroup","clipSeriesGroup","seriesGroup","seriesTextRenderGroup","frontGroup"].forEach(t),i.clip(e.clipSeriesGroup,e.plotClip),i.clip(e.seriesTextRenderGroup,e.plotClip),this._addDivClipGroup(n),this._renderBackground(),this.renderComponents(),this.renderSeries(),this._consoleDone()},_addDivClipGroup:function(t){var e=this;e.seriesTextDivGroup||(e.seriesTextDivGroup=this.renderer.div().add()),e.seriesTextDivGroup.style({clip:"rect("+[t.y,t.x+t.width,t.y+t.height,t.x].join("px ")+"px)"})},_renderBackground:function(){var t=e.makeBounds(0,0,this.width,this.height),i=this.bounds,n=this.options,r=this.renderer,a={backgroundColor:n.geo?"":n.backgroundColor,backgroundImage:n.geo?"":n.backgroundImage,borderColor:n.borderColor,borderWidth:n.geo?0:n.borderWidth,borderRadius:n.borderRadius,shadow:n.shadow},o={backgroundColor:n.plotBackgroundColor,backgroundImage:n.plotBackgroundImage,borderColor:n.plotBorderColor,borderWidth:n.plotBorderWidth,borderRadius:n.plotBorderRadius,shadow:n.plotShadow};a.shadow&&(t.width-=5,t.height-=5),a.backgroundColor||a.backgroundImage||a.borderColor?this.chartBackgroundGroup=this.chartBackgroundGroup||r.group().addTo(this.backGroup):this.chartBackgroundGroup&&(this.chartBackgroundGroup.remove(),this.chartBackgroundGroup=null),o.backgroundColor||o.backgroundImage||o.borderColor?this.plotBackgroundGroup=this.plotBackgroundGroup||this.renderer.group().addTo(this.backGroup):this.plotBackgroundGroup&&(this.plotBackgroundGroup.remove(),this.plotBackgroundGroup=null),this._renderRectangleBackground(this.chartBackgroundGroup,a,t),this._renderRectangleBackground(this.plotBackgroundGroup,o,i)},renderComponents:function(){for(var t in this.components)this.components[t].render()},renderSeries:function(){this.getComponent(a.TOOLTIP_COMPONENT).immediateHide(),this.fire("animationStart"),this._renderTrendLine(),this._updateSeriesState()},_renderRectangleBackground:function(t,i,n){if(t){var r=i.borderWidth||0,a=this.renderer,o=r/2,s=e.rectSubPixelOpt(n.x+o,n.y+o,Math.max(n.width-r,0),Math.max(n.height-r,0),r);if(s.rx=s.ry=i.borderRadius,i.shadow){var h=e.rectSubPixelOpt(n,1),l=[5,3,1],u=[.05,.1,.15];l.forEach(function(e,n){var r="shadowRect"+n;t[r]=t[r]||a.rect().style({fill:"none",stroke:"black","stroke-width":l[n],"stroke-opacity":u[n]}).addTo(t),t[r].attr(h).attr({rx:i.borderRadius,ry:i.borderRadius,transform:"translate(1, 1)"})})}if(i.backgroundColor&&"object"==typeof i.backgroundColor)if(e.isSupportSVG()){var c=i.backgroundColor,d={x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2},f={offset:"0%","stop-color":c.startColor},p={offset:"100%","stop-color":c.endColor};t.gradientFill?a.updateColorGradient(t.gradientFill,d,[f,p]):t.gradientFill=a.colorGradient(d,[f,p])}else i.backgroundColor=i.backgroundColor.startColor;(i.backgroundColor||i.borderWidth)&&(t.backgroundColor=t.backgroundColor||a.rect().addTo(t),t.backgroundColor.attr(s).style({fill:i.backgroundColor?"string"==typeof i.backgroundColor?i.backgroundColor:"url(#"+e.stamp(t.gradientFill)+")":"none",stroke:i.borderColor,"stroke-width":e.pick(i.borderWidth,0)})),i.backgroundImage&&(t.backgroundImage=t.backgroundImage||a.image().addTo(t),t.backgroundImage.attr(n).attr("preserveAspectRatio","none").imageContent(i.backgroundImage))}},filterRender:function(){for(var t=0,e=this.series.length;e>t;t++)this.series[t].filterRender()},cancelLegendHighlight:function(t){var i=this.getComponent(a.LEGEND_COMPONENT);i=i||this.getComponent(a.RANGE_LEGEND_COMPONENT),i&&i.highlighted&&!e.containsPoint(i.bounds,t)&&(i.highlighted=!1,this.highlightTarget=null,this._updateSeriesStyle())},makeLegendHighlight:function(t){this.highlightTarget=t,this._updateSeriesStyle()},_updateSeriesStyle:function(){this.series.forEach(function(t){t.isSupportLegendHighlight()&&(t.useCanvas()?t._canvasRender():(t.drawSeries&&t.drawSeries(),t.getDataToDraw().filter(function(t){return t.isVisible()}).forEach(function(e){t._updatePointGraphicStyle(e)})))})},reRenderSeries:function(){r.calculateSeries(this),r.calculateSeriesShapes(this),this.renderSeries()},_consoleDone:function(){window.console&&console.log("done")},removePointGraphics:function(t){t&&t.remove()},registerInteractiveTarget:function(t,i){this._targets[e.stamp(i.node())]=t,t._events=null,t.getEvents&&t.on(t.getEvents(),t)},findInteractiveTarget:function(t){return this._targets[e.stamp(t)]},resize:function(){var t=this.wrapDom;this.width=e.getDomWidth(t),this.height=e.getDomHeight(t),this.renderer.resize(),this.isMap()&&(this.mapRenderer.resize(),this._onResize(),this.components.geo.resize()),this.layoutComponentsAndCharts()},remove:function(){this.force&&this.force.endTick(null).stop(),this.force=null,this.clearAllEffects(),this.clearTimeQueue(),this.renderer.remove(),this.handler&&this.handler.destroy(),this.mainRenderer&&this.mainRenderer.remove(),this.animationRenderer&&this.animationRenderer.remove(),this.mainRenderer=null,this.animationRenderer=null,this.largeSeries&&Object.keys(this.largeSeries).map(function(t){this.largeSeries[t]._canvas&&this.largeSeries[t]._canvas.remove(),this.largeSeries[t]=null},this),this.largeSeries=null,this.renderer=this.plotClip=this._leaflet=this.handler=this.chartBackgroundGroup=this.trendLineGroup=this.seriesGroup=this.clipSeriesGroup=this.seriesTextRenderGroup=this.seriesTextDivGroup=null}}),t("./VanChartLibrary").register(s.VANCHART,p),p}),define("vector/Cut",["require","../utils/BezierEasing"],function(t){var e=t("../utils/BezierEasing"),i=function(t,e){return function(i){return+t+(+e-+t)*i}},n=function(t,e,n){var r=i(t[e],n);return function(i){t[e]=r(i)}},r=function(t){if(!t)throw'animation "targets" empty';null==t.length?this.targets=[t]:this.targets=t,this._needsRemove=!1,this._lastSectionTime=null,this._sections=[],this.onend=null};return r.prototype={step:function(t){this._lastSectionTime||(this._lastSectionTime=t);var e=t-this._lastSectionTime,i=this.targets,n=this._sections[0],r=Math.min(e/n.time,1);if(!(!r>0)){n.easing&&(r=n.easing(r));for(var a=n.tweens,o=i.length,s=0;o>s;s++)for(var h in a)a.hasOwnProperty(h)&&a[h][s](r);return 1===r&&(this._lastSectionTime=t,this._sections.shift(),0===this._sections.length)?(this._needsRemove=!0,"end"):void 0}},_fillTweens:function(t){return this.targets.map(function(e,i){return t(e,i)})},delay:function(t){return this._sections.push({time:t,tweens:{}}),this},duration:function(t){return this._sections.push({time:t,tweens:{}}),this},tween:function(t,e){var i=this._sections.length,r=this._sections[i-1].tweens;return"function"==typeof e?r[t]=this._fillTweens(e):r[t]=this._fillTweens(function(i,r){return n(i,t,e)}),this},attrTween:function(t,e){return this.tween("attr"+t,function(i,n){var r=+i.getAttribute(t),a=e(i,n,r);return function(e){i.setAttribute(t,a(e))}}),this},attr:function(t,e){return this.attrTween(t,function(t,n,r){return"function"==typeof e?i(r,e.call(null,t,n,r)):i(r,e)}),this},end:function(t){return this.onend=t,this},stop:function(){return this._needsRemove=!0,this},ease:function(t){var i=this._sections.length;return this._sections[i-1].easing="string"==typeof t?e.css[t]:t,this}},r}),define("vector/Animation",["require","./Cut"],function(t){var e=t("./Cut"),i=window.requestAnimationFrame||window.msRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(t){setTimeout(t,16)},n=function(){this._initTime=null,this._running=!1,this._cuts=[],this._callback=[],this.onframe=null,this.onend=null};return n.prototype={_update:function(){var t=(new Date).getTime(),e=this._cuts,i=e.length;if(!e.length)return!1;for(var n=0;i>n;)e[n]._needsRemove?(e[n]=e[i-1],e.pop(),i--):n++;for(var n=0;i>n;n++){var r=e[n].step(t);r&&e[n]["on"+r]&&this._callback.push(e[n]["on"+r])}this.onframe&&this.onframe();for(var a,n=-1;a=this._callback[++n];)a();return this._callback=[],!0},_startLoop:function(){function t(){e._running&&(e._running=e._update(),i(t))}var e=this;i(t)},frame:function(t){return this.onframe=t,this},start:function(){return this._running||(this._running=!0,this._startLoop()),this},stop:function(){return this._running=!1,this},clear:function(){return this._running=!1,this._cuts=[],this},animate:function(t){var i=new e(t);return i.animation=this,this._cuts.push(i),this.start(),i}},n}),define("vector/shape/Arc",["require","../../utils/BaseUtils","../../dom/Browser"],function(t){var e=t("../../utils/BaseUtils"),i=t("../../dom/Browser").touch,n=i?10:2,r=2*Math.PI,a=Math.max,o=Math.atan2,s=Math.abs,h=Math.sqrt,l=e.normalRadian,u=function(t){this.renderer=t,this.ctx=t.ctx,this.cut=null,this.style={ox:null,oy:null,r:null,startAngle:null,endAngle:null,lineWidth:null,color:null,fillStyle:"rgba(0, 0, 0, 0)"}};return u.prototype={setStyle:function(t){for(var e in this.style)t.hasOwnProperty(e)&&(this.style[e]=t[e]);return this},drawStyle:function(){var t=this.ctx,e=this.style;return(e.lineWidth&&e.lineWidth!==t.lineWidth||e.color&&e.color!==t.strokeStyle)&&(t.stroke(),t.beginPath(),t.lineWidth=e.lineWidth,t.strokeStyle=e.color),e.fillStyle&&e.fillStyle!==t.fillStyle&&(t.fill(),t.fillStyle=e.fillStyle),this},draw:function(){var t=this.ctx,e=this.style;return e.lineWidth?(t.moveTo(e.ox+e.r*Math.cos(e.startAngle),e.oy+e.r*Math.sin(e.startAngle)),t.arc(e.ox,e.oy,e.r,e.startAngle,e.endAngle),this):this},animate:function(){return this.cut||(this.cut=this.renderer.animation.animate(this.style)),this},delay:function(t){return this.cut.delay(t),this},duration:function(t){return this.cut.duration(t),this},tween:function(t,e){return this.cut.tween(t,e),this},end:function(t){return this.cut.end(t),this},stop:function(){return this.cut.stop(),this},ease:function(t){return this.cut.ease(t),this},remove:function(){this.cut&&this.cut.stop(),this.needToRemove=!0},contain:function(t){var e=t.x,i=t.y,u=this.style,c=a(u.lineWidth,n),d=e-u.ox,f=i-u.oy,p=s(h(d*d+f*f)-u.r);if(p>c)return!1;var g=l(o(f,d));return(g+r-u.startAngle)%r<=u.endAngle-u.startAngle}},u}),define("vector/shape/Circle",["require"],function(t){var e=2*Math.PI,i=function(t){this.renderer=t,this.ctx=t.ctx,this.cut=null,this.style={ox:null,oy:null,r:null,lineWidth:null,strokeStyle:null,fillStyle:null}};return i.prototype={setStyle:function(t){for(var e in this.style)t.hasOwnProperty(e)&&(this.style[e]=t[e]);return this},drawStyle:function(){var t=this.ctx,e=this.renderer,i=this.style;return(i.lineWidth&&i.lineWidth!==t.lineWidth||i.strokeStyle&&i.strokeStyle!==t.strokeStyle)&&(t.stroke(),t.lineWidth=i.lineWidth,t.strokeStyle=i.strokeStyle),i.fillStyle&&i.fillStyle!==e.fillStyle&&(t.fill(),t.beginPath(),t.fillStyle=i.fillStyle,e.fillStyle=i.fillStyle),this},draw:function(){var t=this.ctx,i=this.style;return t.moveTo(i.r+i.ox,i.oy),t.arc(i.ox,i.oy,i.r,0,e),this}},i}),define("vector/shape/Image",["require"],function(t){var e=function(t){this.renderer=t,this.ctx=t.ctx,this.cut=null,this.style={imagedata:null,dx:null,dy:null,dirtyX:null,dirtyY:null,dirtyWidth:null,dirtyHeight:null}};return e.prototype={setStyle:function(t){for(var e in this.style)t.hasOwnProperty(e)&&(this.style[e]=t[e]);return this},drawStyle:function(){return this},draw:function(){var t=this.style;return this.ctx.putImageData(t.imagedata,t.dx,t.dy),this}},e}),define("vector/CanvasRenderer",["require","./Renderer","../Constants","./Animation","./shape/Arc","./shape/Circle","./shape/Image","./ElementWrapper"],function(t){var e=t("./Renderer"),i=t("../Constants"),n=t("./Animation"),r=t("./shape/Arc"),a=t("./shape/Circle"),o=t("./shape/Image"),s=t("./ElementWrapper"),h=["lineWidth","strokeStyle"],l=e.extend({_initContainer:function(){var t=this.dom,e=this.vanchart,i=this.config,r=i||e.bounds,a=i&&i.dpr||1;this._container=new s(this._createCanvas(t,r,a),this),this.ctx=this._container.node().getContext("2d"),this.ctx.scale(a,a),this.elements=[],this.animation=(new n).frame(this.flush.bind(this))},arc:function(t){return this._create(r,t)},circle:function(t){return this._create(a,t)},image:function(t){return this._create(o,t)},_create:function(t,e){var i=new t(this);return i.rawElement=i,this.elements.push(i),e&&i.setStyle(e),i},style:function(){},_createCanvas:function(t,e,i){var n=document.createElement(window.VAN_CANVAS),r=this.left=e.x,a=this.top=e.y,o=this.width=e.width,s=this.height=e.height;return this.dpr=i,n.style.position="absolute",n.style.left=r+"px",n.style.top=a+"px",n.style.width=o+"px",n.style.height=s+"px",n.width=o*i,n.height=s*i,n.onselectstart=function(){return!1},n.style["-webkit-user-select"]="none",n.style["user-select"]="none",n.style["pointer-events"]="none",n.style["-webkit-touch-callout"]="none",n.style.transform="translateZ(0)",t.appendChild(n),window.VanCanvasManager&&VanCanvasManager.initElement(n),n},flush:function(){this.clearAll(),this.ctx.beginPath();for(var t=this.elements,e=t.length,i=[],n=0;e>n;n++)t[n].needToRemove||(i.push(t[n]),t[n].drawStyle().draw());this.elements=i,this.ctx.stroke(),this.ctx.fill()},_updateCtxStatus:function(){for(var t,e,i=-1;t=h[++i];)this[t]!==this.ctx[t]&&(this[t]=this.ctx[t],e=!0);e&&this.ctx.stroke(),this.fillStyle!==this.ctx.fillStyle&&(this.fillStyle=this.ctx.fillStyle,this.ctx.fill())},clearAll:function(){this.ctx.clearRect(0,0,this.width,this.height)},remove:function(){this.animation.clear(),this.ctx=null,this._container.remove()},addBubbleSeries:function(t){var e=this.ctx;e.save();for(var i=0,n=t.points.length;n>i;i++){var r=t.points[i];r.visible&&!r.isNull&&(e.fillStyle=r.color,e.globalAlpha=this.getPointOpacity(r),e.beginPath(),e.arc(r.posX,r.posY,r.radius,0,2*Math.PI),e.fill())}e.restore()},getPointOpacity:function(t){var e=t.series,i=e.vanchart.highlightTarget;if(i){var n=e.name;return n==i||t._rangeItem==i?1:.3}return t.opacity},addScatterSeries:function(t){var e=this.ctx;e.save();for(var i=0,n=t.points.length;n>i;i++){var r=t.points[i];if(r.visible&&!r.isNull){var a=r.options.marker,o=a.symbol,s=isNaN(a.radius)?4.5:a.radius,h=a.fillColor||r.color;e.translate(r.posX,r.posY),e.fillStyle=h,e.strokeStyle=h,e.globalAlpha=this.getPointOpacity(r),this._drawMarker(e,o,s),e.translate(-r.posX,-r.posY)}}e.restore()},addSeries:function(t){t.visible&&(t.type==i.SCATTER_CHART?this.addScatterSeries(t):this.addBubbleSeries(t))},_drawMarker:function(t,e,n){-1!=e.indexOf(i.CIRCLE)?(t.beginPath(),t.arc(0,0,n,0,2*Math.PI)):-1!=e.indexOf(i.SQUARE)?(t.beginPath(),t.moveTo(-n,-n),t.lineTo(n,-n),t.lineTo(n,n),t.lineTo(-n,n),t.closePath()):-1!=e.indexOf(i.DIAMOND)?(n=2*n/Math.sqrt(2),t.beginPath(),t.moveTo(-n,0),t.lineTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.closePath()):-1!=e.indexOf(i.TRIANGLE)?(t.beginPath(),t.moveTo(-n,n/Math.sqrt(3)),t.lineTo(0,-(2*Math.sqrt(3)/3)*n),t.lineTo(n,n/Math.sqrt(3)),t.closePath()):(t.beginPath(),t.arc(0,0,n,0,2*Math.PI)),-1==e.indexOf("hollow")?t.fill():(t.fillStyle="white",t.lineWidth=2,t.fill(),t.stroke())}});return l}),define("chart/map/LineMapLayer",["require","../../utils/BaseUtils","../../dom/DomUtils","../../utils/ColorUtils","../../Constants","../../vector/Layer","../../dom/Browser"],function(t){function e(t,e,i,n){if(!p[t]){var r=document.createElement(window.VAN_CANVAS);r.style.width=e+"px",r.style.height=i+"px",r.width=e*n,r.height=i*n;var a=r.getContext("2d");a.scale(n,n),p[t]=a}return p[t]}function i(t){if(g[t])return g[t];var e=new Image;return e.crossOrigin="Anonymous",e.onload=function(){g[t]=e},e.src=t,!1}function n(t,n,r,a,o){var s=u*Math.max(n,r),h=e(t,s,s,a),l=null;return(l=i(t))?(h.clearRect(0,0,s,s),h.translate(s/2,s/2),h.rotate(o),h.drawImage(l,-n/2,-r/2,n,r),h.rotate(-o),h.translate(-s/2,-s/2),h.getImageData(0,0,s*a,s*a)):null}function r(t,e,i){function r(t){return b=t,this}function o(){return b=[],this}function h(t){l(!0,t)}function l(e,n){var r=b.length;if(r&&b[0]&&b[0].series.options.large){b[0].refreshPointColor();var a=s.mixColorWithAlpha(b[0].color,b[0].opacity)}b.map(function(o){var h=o.series,l=h.options.large,u=o.visible&&h.visible,m=o.graphic,_=o.options,y=_.from.lnglat[0],x=_.from.lnglat[1],b=_.to.lnglat[0],T=_.to.lnglat[1];if(y!==b||x!==T){var A=i.latLngToContainerPoint([x,y]),C=i.latLngToContainerPoint([T,b]);if(o.ax=A.x,o.ay=A.y,o.bx=C.x,o.by=C.y,o.curveness=_.curveness,0===o.curveness&&(o.curveness=.01),u)if(l)t.ctx.globalCompositeOperation="lighter",o._color=a;else{var L=o.opacity;n&&(L*=o.series.name==n||o._rangeItem==n?1:.3),o._color=s.mixColorWithAlpha(o.color,L)}if(u&&!m){var P,M;if(o.graphic=t.arc(),o.graphic.point=o,P=g(o.graphic,o),c&&!e&&!l&&h.options.animation&&o.options.lineWidth&&(o.graphic.style.endAngle=P[3],M=o.graphic.animate().duration(d).ease(f).tween("endAngle",P[4])),c&&!l&&u&&o.options.effect&&o.options.effect.enabled){var w=h.points.indexOf(o);M?M.end(v.bind(this,o,r,w)):v(o,r,w)}}else u&&m?g(o.graphic,o):!u&&m&&(o.graphic.needToRemove=!0,o.graphic=null,p(o))}})}function p(t){t._effect&&(t._effect.stop(),t._effect=null),t._symbol&&(t._symbol.map(function(t){t.needToRemove=!0}),t._symbol=null)}function g(t,e){var i=a.computeArc(e.ax,e.ay,e.bx,e.by,e.curveness);return t.setStyle({ox:i[0],oy:i[1],r:i[2],startAngle:i[3],endAngle:i[4],lineWidth:e.options.lineWidth,color:e._color}),i}function m(){e.clearAll()}function v(t,i,n){if(t.graphic){var r=t.options.effect.period||2e3;t._effect=e.animation.animate(t.graphic.style).delay(r/5*n/i).duration(r).tween("track",function(e){return _(e,t)}).end(v.bind(this,t,i,n))}}function _(t,e){var i=t.startAngle,n=t.endAngle,r=(n-i)/3,a=n-i+r,o=e.options.effect;if(o.symbol){var s=o.symbol,h=o.width,l=o.height,u=window.devicePixelRatio||1;return function(i){e._symbol&&(e._symbol[0].needToRemove=!0),e._symbol=y(a*i,t.ox,t.oy,t.r,t.startAngle,t.endAngle,r,s,h,l,u)}}var c=1.4,d=1.5;return function(i){e._symbol&&e._symbol.map(function(t){t.needToRemove=!0}),e._symbol=x(a*i,t.ox,t.oy,t.r,t.startAngle,t.endAngle,r,d,c,e.color)}}function y(t,i,r,a,o,s,h,l,c,d,f){var p=t-h+o;if(!(t+o>s)){var g=h+p,m=a*Math.cos(g)+i,v=a*Math.sin(g)+r,_=null;if(_=n(l,c,d,f,Math.PI+g)){var y=u*Math.max(c,d);return[e.image({imagedata:_,dx:(m-y/2)*f,dy:(v-y/2)*f})]}}}function x(t,i,n,r,a,o,s,h,l,u){for(var c=t>s?0:s-t,d=o>t+a?s:s-(t+a-o),f=t-s+a,p=[],g=d;g>c;g-=l/r){var m=g+f,v=r*Math.cos(m)+i,_=r*Math.sin(m)+n,y=g/s;p.push(e.circle({ox:v,oy:_,r:y*h,strokeStyle:"rgba(0, 0, 0, 0)",fillStyle:u}))}return p}var b=[];return{data:r,clear:o,draw:l,redraw:h,stop:m,removeEffect:p}}var a=t("../../utils/BaseUtils"),o=t("../../dom/DomUtils"),s=t("../../utils/ColorUtils"),h=(t("../../Constants").LINE_MAP,t("../../vector/Layer")),l=t("../../dom/Browser"),u=Math.SQRT2,c=a.isSupportSVG(),d=800,f="ease-in-out-quad",p={},g={},m=h.extend({options:{mainRenderer:null,animationRenderer:null,vanchart:null},initialize:function(t){a.setOptions(this,t)},setData:function(t){return this._pairs=t,this._draw()},addData:function(t){return this._pairs.push(t),this._draw()},setOptions:function(t){return a.setOptions(this,t),this._lineMap&&this._updateOptions(),this._draw()},redraw:function(){return this._lineMap.redraw(this.options.vanchart.highlightTarget),this.options.mainRenderer.flush(),this},removeEffect:function(t){this._lineMap&&this._lineMap.removeEffect(t)},onAdd:function(t){this._map=t,this._lineMap||this._initRenderer(),t.on("moveend",this._reset,this),t.options.zoomAnimation&&l.any3d&&t.on("zoomanim",this._animateZoom,this),t.on(this._events,this),this._reset()},onRemove:function(t){this.options.pane?(this.getPane().removeChild(this._canvas),this.getPane().removeChild(this._animCanvas)):(t.getPanes().overlayPane.removeChild(this._canvas),t.getPanes().overlayPane.removeChild(this._animCanvas)),t.off("moveend",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this),t.off(this._events,this)},addTo:function(t){return t.addLayer(this),this},_initRenderer:function(){var t=this._canvas=this.options.mainRenderer._container.node(),e=this._animCanvas=this.options.animationRenderer._container.node(),i=o.TRANSFORM_ORIGIN;t.style[i]=e.style[i]="50% 50%";var n=this._map.options.zoomAnimation&&l.any3d,a="leaflet-zoom-"+(n?"animated":"hide"),s="leaflet-linemap-layer leaflet-layer ";o.addClass(t,s+a),o.addClass(e,s+a),this._lineMap=r(this.options.mainRenderer,this.options.animationRenderer,this._map)},_updateOptions:function(){},_reset:function(){this._lineMap.stop();var t=this._map.containerPointToLayerPoint([0,0]);o.setPosition(this._canvas,t),o.setPosition(this._animCanvas,t),this._draw()},_draw:function(){return this._map&&this._pairs&&this._pairs.length?(this._lineMap.data(this._pairs).draw(),void this.options.mainRenderer.flush()):void this.options.mainRenderer.flush()},_animateZoom:function(t){this._lineMap.stop();var e=this._map.getZoomScale(t.zoom),i=this._map._getCenterOffset(t.center)._multiplyBy(-e).subtract(this._map._getMapPanePos());if(o.setTransform)o.setTransform(this._canvas,i,e),o.setTransform(this._animCanvas,i,e);else{var n=a.makeTranslate(i)+" scale("+e+")";this._canvas.style[o.TRANSFORM]=n,this._animCanvas.style[o.TRANSFORM]=n}},_events:{tap:function(t){var e=this.hoverPoint;e&&e._onPointTap(t)},mousemove:function(t){for(var e,i,n=this.options.mainRenderer,r=this.options.vanchart,a=this,o=n.elements,s=n.elements.length,h=t.containerPoint;e=o[--s];)if(e.contain(h)){i=e;break}var l=i&&i.point,u=l&&l.series.options.large;l?(r.showTooltip(l,t),r.handler.cursor("pointer"),l.mouseOverColor&&!u&&l!==a.hoverPoint&&(i.style.color=i.point.mouseOverColor)):(r.hoverPoint||r.hideTooltip(),r.handler.cursor("")),u||a.hoverPoint==l||(a.hoverPoint&&(a.hoverPoint.graphic.style.color=a.hoverPoint._color),a.hoverPoint=l,n.flush())}}});return function(t){return new m(t)}}),function(t,e,i){"undefined"!=typeof module&&module.exports?module.exports=i():"function"==typeof define&&define.amd?define("chart/map/heatmap",i):e[t]=i()}("h337",this,function(){var t={defaultRadius:40,defaultRenderer:"canvas2d",defaultGradient:{.25:"rgb(0,0,255)",.55:"rgb(0,255,0)",.85:"yellow",1:"rgb(255,0,0)"},defaultMaxOpacity:1,defaultMinOpacity:0,defaultBlur:.85,defaultXField:"x",defaultYField:"y",defaultValueField:"value",plugins:{}},e=function(){var e=function(t){this._coordinator={},this._data=[],this._radi=[],this._min=10,this._max=1,this._xField=t.xField||t.defaultXField,this._yField=t.yField||t.defaultYField,this._valueField=t.valueField||t.defaultValueField,t.radius&&(this._cfgRadius=t.radius)},i=t.defaultRadius;return e.prototype={_organiseData:function(t,e){var n=t[this._xField],r=t[this._yField],a=this._radi,o=this._data,s=this._max,h=this._min,l=t[this._valueField]||1,u=t.radius||this._cfgRadius||i;o[n]||(o[n]=[],a[n]=[]),o[n][r]?o[n][r]+=l:(o[n][r]=l,a[n][r]=u);var c=o[n][r];return c>s?(e?this.setDataMax(c):this._max=c,!1):h>c?(e?this.setDataMin(c):this._min=c,!1):{x:n,y:r,value:l,radius:u,min:h,max:s}},_unOrganizeData:function(){var t=[],e=this._data,i=this._radi;for(var n in e)for(var r in e[n])t.push({x:n,y:r,radius:i[n][r],value:e[n][r]});return{min:this._min,max:this._max,data:t}},_onExtremaChange:function(){this._coordinator.emit("extremachange",{min:this._min,max:this._max})},addData:function(){if(arguments[0].length>0)for(var t=arguments[0],e=t.length;e--;)this.addData.call(this,t[e]);else{var i=this._organiseData(arguments[0],!0);i&&(0===this._data.length&&(this._min=this._max=i.value),this._coordinator.emit("renderpartial",{min:this._min,max:this._max,data:[i]}))}return this},setData:function(t){var e=t.data,i=e.length;this._data=[],this._radi=[];for(var n=0;i>n;n++)this._organiseData(e[n],!1);return this._max=t.max,this._min=t.min||0,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},removeData:function(){},setDataMax:function(t){return this._max=t,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setDataMin:function(t){return this._min=t,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setCoordinator:function(t){this._coordinator=t},_getInternalData:function(){return{max:this._max,min:this._min,data:this._data,radi:this._radi}},getData:function(){return this._unOrganizeData()}},e}(),i=function(){function t(t){var i=t.container,n=this.shadowCanvas=document.createElement(window.VAN_CANVAS),r=this.canvas=t.canvas||document.createElement(window.VAN_CANVAS);window.VanCanvasManager&&VanCanvasManager.initElement(r),window.VanCanvasManager&&VanCanvasManager.initElement(n);var a=(this._renderBoundaries=[1e4,1e4,0,0],t.container.currentStyle||getComputedStyle(t.container)||{});r.className="heatmap-canvas",this._width=r.width=n.width=t.width||+a.width.replace(/px/,""),this._height=r.height=n.height=t.height||+a.height.replace(/px/,""),this.shadowCtx=n.getContext("2d"),this.ctx=r.getContext("2d"),r.style.cssText=n.style.cssText="position:absolute;left:0;top:0;",i.style.position="relative",i.appendChild(r),this._palette=e(t),this._templates={},this._setStyles(t)}var e=function(t){var e=t.gradient||t.defaultGradient,i=document.createElement(window.VAN_CANVAS);if(i.getContext){var n=i.getContext("2d");i.width=256,i.height=1;var r=n.createLinearGradient(0,0,256,1);for(var a in e)r.addColorStop(a,e[a]);return n.fillStyle=r,n.fillRect(0,0,256,1),n.getImageData(0,0,256,1).data}return{}},i=function(t,e){var i=document.createElement(window.VAN_CANVAS),n=i.getContext("2d"),r=t,a=t;if(i.width=i.height=2*t,1===e)n.beginPath(),n.arc(r,a,t,0,2*Math.PI,!1),n.fillStyle="rgba(0,0,0,1)",n.fill();else{var o=n.createRadialGradient(r,a,t*e,r,a,t);o.addColorStop(0,"rgba(0,0,0,1)"),o.addColorStop(1,"rgba(0,0,0,0)"),n.fillStyle=o,n.fillRect(0,0,2*t,2*t)}return i},n=function(t){for(var e=[],i=t.min,n=t.max,r=t.radi,t=t.data,a=Object.keys(t),o=a.length;o--;)for(var s=a[o],h=Object.keys(t[s]),l=h.length;l--;){var u=h[l],c=t[s][u],d=r[s][u];e.push({x:s,y:u,value:c,radius:d})}return{min:i,max:n,data:e}};return t.prototype={renderPartial:function(t){t.data.length>0&&(this.ctx.getImageData?(this._drawAlpha(t),this._colorize()):this._drawPoints(t))},renderAll:function(t){if(this._clear(),t.data.length>0){var t=n(t);this.ctx.getImageData?(this._drawAlpha(t),this._colorize()):this._drawPoints(t)}},_drawPoints:function(t){for(var e=this._min=t.min,i=this._max=t.max,t=t.data||[],n=t.length,r=1-this._blur,a=this.ctx;n--;){var o=t[n],s=+o.radius,h=Math.min(o.value,i),l=+o.x,u=+o.y,c=(h-e)/(i-e);c=isNaN(c)?1:c,a.globalAlpha=.01>c?.01:c;var d=a.createRadialGradient(l,u,s*r,l,u,s),f=this._gradientConfig;for(var p in f)d.addColorStop(+p,f[p]);a.fillStyle=d,a.beginPath(),a.moveTo(l,u),a.arc(l,u,s,0,2*Math.PI,!1),a.fill()}},_updateGradient:function(t){this._palette=e(t)},updateConfig:function(t){t.gradient&&this._updateGradient(t),this._setStyles(t)},setDimensions:function(t,e){this._width=t,this._height=e,this.canvas.width=this.shadowCanvas.width=t,this.canvas.height=this.shadowCanvas.height=e},_clear:function(){this.shadowCtx.clearRect(0,0,this._width,this._height),this.ctx.clearRect(0,0,this._width,this._height)},_setStyles:function(t){this._blur=0===t.blur?0:t.blur||t.defaultBlur,this._gradientConfig=t.gradient||t.defaultGradient,t.backgroundColor&&(this.canvas.style.backgroundColor=t.backgroundColor),this._width=this.canvas.width=this.shadowCanvas.width=t.width||this._width,this._height=this.canvas.height=this.shadowCanvas.height=t.height||this._height,this._opacity=255*(t.opacity||0),this._maxOpacity=255*(t.maxOpacity||t.defaultMaxOpacity),this._minOpacity=255*(t.minOpacity||t.defaultMinOpacity),this._useGradientOpacity=!!t.useGradientOpacity},_drawAlpha:function(t){for(var e=this._min=t.min,n=this._max=t.max,t=t.data||[],r=t.length,a=1-this._blur;r--;){var o,s=t[r],h=s.x,l=s.y,u=s.radius,c=Math.min(s.value,n),d=h-u,f=l-u,p=this.shadowCtx;this._templates[u]?o=this._templates[u]:this._templates[u]=o=i(u,a);var g=(c-e)/(n-e);p.globalAlpha=.01>g?.01:g,p.drawImage(o,d,f),dthis._renderBoundaries[2]&&(this._renderBoundaries[2]=d+2*u),f+2*u>this._renderBoundaries[3]&&(this._renderBoundaries[3]=f+2*u)}},_colorize:function(){var t=this._renderBoundaries[0],e=this._renderBoundaries[1],i=this._renderBoundaries[2]-t,n=this._renderBoundaries[3]-e,r=this._width,a=this._height,o=this._opacity,s=this._maxOpacity,h=this._minOpacity,l=this._useGradientOpacity;0>t&&(t=0),0>e&&(e=0),t+i>r&&(i=r-t),e+n>a&&(n=a-e);for(var u=this.shadowCtx.getImageData(t,e,i,n),c=u.data,d=c.length,f=this._palette,p=3;d>p;p+=4){var g=c[p],m=4*g;if(m){var v;v=o>0?o:s>g?h>g?h:g:s,c[p-3]=f[m],c[p-2]=f[m+1],c[p-1]=f[m+2],c[p]=l?f[m+3]:v}}u.data=c,this.ctx.putImageData(u,t,e),this._renderBoundaries=[1e3,1e3,0,0]},getValueAt:function(t){var e,i=this.shadowCtx,n=i.getImageData(t.x,t.y,1,1),r=n.data[3],a=this._max,o=this._min;return e=Math.abs(a-o)*(r/255)>>0},getDataURL:function(){return this.canvas.toDataURL()}},t}(),n=function(){var e=!1;return"canvas2d"===t.defaultRenderer&&(e=i),e}(),r={merge:function(){for(var t={},e=arguments.length,i=0;e>i;i++){var n=arguments[i];for(var r in n)t[r]=n[r]}return t}},a=function(){function i(){var i=this._config=r.merge(t,arguments[0]||{});if(this._coordinator=new a,i.plugin){var s=i.plugin;if(!t.plugins[s])throw new Error("Plugin '"+s+"' not found. Maybe it was not registered."); - var h=t.plugins[s];this._renderer=new h.renderer(i),this._store=new h.store(i)}else this._renderer=new n(i),this._store=new e(i);o(this)}var a=function(){function t(){this.cStore={}}return t.prototype={on:function(t,e,i){var n=this.cStore;n[t]||(n[t]=[]),n[t].push(function(t){return e.call(i,t)})},emit:function(t,e){var i=this.cStore;if(i[t])for(var n=i[t].length,r=0;n>r;r++){var a=i[t][r];a(e)}}},t}(),o=function(t){var e=t._renderer,i=t._coordinator,n=t._store;i.on("renderpartial",e.renderPartial,e),i.on("renderall",e.renderAll,e),i.on("extremachange",function(e){t._config.onExtremaChange&&t._config.onExtremaChange({min:e.min,max:e.max,gradient:t._config.gradient||t._config.defaultGradient})}),n.setCoordinator(i)};return i.prototype={addData:function(){return this._store.addData.apply(this._store,arguments),this},removeData:function(){return this._store.removeData&&this._store.removeData.apply(this._store,arguments),this},setData:function(){return this._store.setData.apply(this._store,arguments),this},setDataMax:function(){return this._store.setDataMax.apply(this._store,arguments),this},setDataMin:function(){return this._store.setDataMin.apply(this._store,arguments),this},configure:function(t){return this._config=r.merge(this._config,t),this._renderer.updateConfig(this._config),this._coordinator.emit("renderall",this._store._getInternalData()),this},repaint:function(){return this._coordinator.emit("renderall",this._store._getInternalData()),this},getData:function(){return this._store.getData()},getDataURL:function(){return this._renderer.getDataURL()},getValueAt:function(t){return this._store.getValueAt?this._store.getValueAt(t):this._renderer.getValueAt?this._renderer.getValueAt(t):null}},i}(),o={create:function(t){return new a(t)},register:function(e,i){t.plugins[e]=i}};return o}),define("chart/map/HeatMapOverlay",["require","./heatmap","../../vector/Layer","../../dom/DomUtils","../../utils/Point2D","../../utils/BaseUtils","./LatLng"],function(t){var e=t("./heatmap"),i=t("../../vector/Layer"),n=t("../../dom/DomUtils"),r=t("../../utils/Point2D"),a=t("../../utils/BaseUtils"),o=t("./LatLng"),s=i.extend({initialize:function(t){this.cfg=t,this._el=n.create("div","leaflet-zoom-hide"),this._el.style.zIndex=201,this._data=[],this._max=1,this._min=0,this.cfg.container=this._el},onAdd:function(t){var i=t.getSize();this._map=t,this._width=i.x,this._height=i.y,this._el.style.width=i.x+"px",this._el.style.height=i.y+"px",this._el.style.position="absolute",this._origin=this._map.layerPointToLatLng(new r(0,0)),t.getPanes().overlayPane.appendChild(this._el),this._heatmap||(this._heatmap=e.create(this.cfg)),t.on("moveend",this._reset,this),t.on(this._events,this),this._draw()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._el),t.off("moveend",this._reset,this),t.off(this._events,this)},_draw:function(){if(this._map){var t=this._map.getPanes().mapPane,e=t._leaflet_pos;a.isSupportSVG()?this._el.style[s.CSS_TRANSFORM]="translate("+-Math.round(e.x)+"px,"+-Math.round(e.y)+"px)":(this._el.style.left=-Math.round(e.x)+"px",this._el.style.bottom=Math.round(e.y)+"px"),this._update()}},_update:function(){var t,e,i,n={max:this._max,min:this._min,data:[]};if(t=this._map.getBounds(),e=this._map.getZoom(),i=Math.pow(2,e),0===this._data.length)return void(this._heatmap&&this._heatmap.setData(n));for(var r=[],a=this.cfg.scaleRadius?i:1,o=0,s=0,h=this.cfg.valueField,l=this._data.length;l--;){var u=this._data[l],c=u[h],d=u.latlng;if(t.contains(d)){o=Math.max(c,o),s=Math.min(c,s);var f=this._map.latLngToContainerPoint(d),p={x:Math.round(f.x),y:Math.round(f.y)};p[h]=c;var g;g=u.radius?u.radius*a:(this.cfg.radius||2)*a,p.radius=g,r.push(p)}}this.cfg.useLocalExtrema&&(n.max=o,n.min=s),n.data=r,this._heatmap.setData(n)},setData:function(t){this._max=t.max||this._max,this._min=t.min||this._min;for(var e=this.cfg.lnglatField||"lnglat",i=this.cfg.valueField||"value",t=t.data,n=t.length,r=[];n--;){var a=t[n].options,s=new o(a[e][1],a[e][0]),h={latlng:s};h[i]=a[i],a.radius&&(h.radius=a.radius),r.push(h)}this._data=r,this._draw()},addData:function(t){if(t.length>0)for(var e=t.length;e--;)this.addData(t[e]);else{var i=this.cfg.lnglatField||"lnglat",n=this.cfg.valueField||"value",r=t,a=new o(r[i][1],r[i][0]),s={latlng:a};s[n]=r[n],this._max=Math.max(this._max,s[n]),this._min=Math.min(this._min,s[n]),r.radius&&(s.radius=r.radius),this._data.push(s),this._draw()}},_reset:function(){this._origin=this._map.layerPointToLatLng(new r(0,0));var t=this._map.getSize();(this._width!==t.x||this._height!==t.y)&&(this._width=t.x,this._height=t.y,this._el.style.width=this._width+"px",this._el.style.height=this._height+"px",this._heatmap._renderer.setDimensions(this._width,this._height)),this._draw()},_events:{tap:function(t){var e=this.hoverPoint;e&&e._onPointTap(t)},mousemove:function(t){var e=this._map,i=e.handler._getCanvasClosestPoint(t.containerPoint);i?(i._events||i.getEvents&&i.on(i.getEvents(),i),e.showTooltip(i,t),e.hoverPoint=i):e.hideTooltip()}}});return s.CSS_TRANSFORM=function(){for(var t=document.createElement("div"),e=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],i=0;ie;e++)this.addLayer(t[e])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){for(var t in this._layers)this.removeLayer(this._layers[t]);return this},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)i=this._layers[e],i[t]&&i[t].apply(i,n);return this},onAdd:function(t){for(var e in this._layers)t.addLayer(this._layers[e])},onRemove:function(t){for(var e in this._layers)t.removeLayer(this._layers[e])},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var e in this._layers)t.push(this._layers[e]);return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return i.stamp(t)}});return n}),define("vector/shape/Path",["require","./../Layer","../../dom/Browser","../../utils/BaseUtils"],function(t){var e=t("./../Layer"),i=t("../../dom/Browser"),n=(t("../../utils/BaseUtils"),e.extend({onAdd:function(){this._path=this._renderer.path().style(this.options),this._reset(),this._path.add()},onRemove:function(){this._path.remove()},redraw:function(){return this._map&&this._reset(),this},setStyle:function(t){return this.options=t||this.options,this._renderer&&this._path.style(this.options),this},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options["stroke-width"]?this.options["stroke-width"]/2:0)+(i.touch?10:0)},node:function(){return this._path.node()}}));return n}),define("chart/map/LatLngBounds",["require","./LatLng"],function(t){var e=t("./LatLng"),i=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,r=i.length;r>n;n++)this.extend(i[n])};return i.prototype={extend:function(t){var n,r,a=this._southWest,o=this._northEast;if(t instanceof e)n=t,r=t;else{if(!(t instanceof i))return t?this.extend(e.create(t)||i.create(t)):this;if(n=t._southWest,r=t._northEast,!n||!r)return this}return a||o?(a.lat=Math.min(n.lat,a.lat),a.lng=Math.min(n.lng,a.lng),o.lat=Math.max(r.lat,o.lat),o.lng=Math.max(r.lng,o.lng)):(this._southWest=new e(n.lat,n.lng),this._northEast=new e(r.lat,r.lng)),this},pad:function(t){var n=this._southWest,r=this._northEast,a=Math.abs(n.lat-r.lat)*t,o=Math.abs(n.lng-r.lng)*t;return new i(new e(n.lat-a,n.lng-o),new e(r.lat+a,r.lng+o))},getCenter:function(){return new e((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new e(this.getNorth(),this.getWest())},getSouthEast:function(){return new e(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof e?e.create(t):i.create(t);var n,r,a=this._southWest,o=this._northEast;return t instanceof i?(n=t.getSouthWest(),r=t.getNorthEast()):n=r=t,n.lat>=a.lat&&r.lat<=o.lat&&n.lng>=a.lng&&r.lng<=o.lng},intersects:function(t){t=i.create(t);var e=this._southWest,n=this._northEast,r=t.getSouthWest(),a=t.getNorthEast(),o=a.lat>=e.lat&&r.lat<=n.lat,s=a.lng>=e.lng&&r.lng<=n.lng;return o&&s},overlaps:function(t){t=i.create(t);var e=this._southWest,n=this._northEast,r=t.getSouthWest(),a=t.getNorthEast(),o=a.lat>e.lat&&r.late.lng&&r.lng1?K:-1>t?-K:Math.asin(t)}function i(t){return t[0]}function n(t){return t[1]}function r(t){return t}function a(){return!0}function o(){return 0}function s(t){return t.innerRadius}function h(t){return t.outerRadius}function l(t){return t.startAngle}function u(t){return t.endAngle}function c(t){return t&&t.padAngle}function d(t,e,i,n){return(t-i)*e-(e-n)*t>0?0:1}function f(t,e,i,n,r){var a=t[0]-e[0],o=t[1]-e[1],s=(r?n:-n)/Math.sqrt(a*a+o*o),h=s*o,l=-s*a,u=t[0]+h,c=t[1]+l,d=e[0]+h,f=e[1]+l,p=(u+d)/2,g=(c+f)/2,m=d-u,v=f-c,_=m*m+v*v,y=i-n,x=u*f-d*c,b=(0>v?-1:1)*Math.sqrt(y*y*_-x*x),T=(x*v-m*b)/_,A=(-x*m-v*b)/_,C=(x*v+m*b)/_,L=(-x*m+v*b)/_,P=T-p,M=A-g,w=C-p,E=L-g;return P*P+M*M>w*w+E*E&&(T=C,A=L),[[T-h,A-l],[T*i/y,A*i/y]]}function p(t,e,i,n){var r=t[0],a=i[0],o=e[0]-r,s=n[0]-a,h=t[1],l=i[1],u=e[1]-h,c=n[1]-l,d=(s*(h-l)-c*(r-a))/(c*o-s*u);return[r+d*o,h+d*u]}function g(t){return"function"==typeof t?t:function(){return t}}function m(t){function e(e){function i(){a.push("M",h(t(l),u))}for(var n,a=[],l=[],c=-1,d=e.length,f=g(r),p=g(o);++c1&&r.push("H",n[0]),r.join("")}function x(t){for(var e=0,i=t.length,n=t[0],r=[n[0],",",n[1]];++e1){s=e[1],a=t[h],h++,n+="C"+(r[0]+o[0])+","+(r[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var l=2;l9&&(r=3*e/Math.sqrt(r),o[s]=r*i,o[s+1]=r*n));for(s=-1;++s<=h;)r=(t[Math.min(h,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([r||0,o[s]*r||0]);return a}function I(t){return t.length<3?v(t):t[0]+L(t,B(t))}function G(t){for(var e,i,n,r=-1,a=t.length;++rh?0:1;if(t>o&&(c=o,o=t,t=c),l>=Q)return i(o,u)+(t?i(t,1-u):"")+"Z";var c,g,T,A,C,L,P,M,w,E,S,O,k=0,D=0,R=[];if((A=(+b.apply(this,arguments)||0)/2)&&(T=_===tt?Math.sqrt(t*t+o*o):+_.apply(this,arguments),u||(D*=-1),o&&(D=e(T/o*Math.sin(A))),t&&(k=e(T/t*Math.sin(A)))),o){C=o*Math.cos(s+D),L=o*Math.sin(s+D),P=o*Math.cos(h-D),M=o*Math.sin(h-D);var B=Math.abs(h-s-2*D)<=Z?0:1;if(D&&d(C,L,P,M)===u^B){var I=(s+h)/2;C=o*Math.cos(I),L=o*Math.sin(I),P=M=null}}else C=L=0;if(t){w=t*Math.cos(h-k),E=t*Math.sin(h-k),S=t*Math.cos(s+k),O=t*Math.sin(s+k);var G=Math.abs(s-h+2*k)<=Z?0:1;if(k&&d(w,E,S,O)===1-u^G){var N=(s+h)/2;w=t*Math.cos(N),E=t*Math.sin(N),S=O=null}}else w=E=0;if((c=Math.min(Math.abs(o-t)/2,+v.apply(this,arguments)))>.001){g=o>t^u?0:1;var H=null==S?[w,E]:null==P?[C,L]:p([C,L],[S,O],[P,M],[w,E]),z=C-H[0],U=L-H[1],F=P-H[0],V=M-H[1],W=1/Math.sin(Math.acos((z*F+U*V)/(Math.sqrt(z*z+U*U)*Math.sqrt(F*F+V*V)))/2),X=Math.sqrt(H[0]*H[0]+H[1]*H[1]);if(null!=P){var Y=Math.min(c,(o-X)/(W+1)),q=f(null==S?[w,E]:[S,O],[C,L],o,Y,u),j=f([P,M],[w,E],o,Y,u);c===Y?R.push("M",q[0],"A",Y,",",Y," 0 0,",g," ",q[1],"A",o,",",o," 0 ",1-u^d(q[1][0],q[1][1],j[1][0],j[1][1]),",",u," ",j[1],"A",Y,",",Y," 0 0,",g," ",j[0]):R.push("M",q[0],"A",Y,",",Y," 0 1,",g," ",j[0])}else R.push("M",C,",",L);if(null!=S){var J=Math.min(c,(t-X)/(W-1)),$=f([C,L],[S,O],t,-J,u),et=f([w,E],null==P?[C,L]:[P,M],t,-J,u);c===J?R.push("L",et[0],"A",J,",",J," 0 0,",g," ",et[1],"A",t,",",t," 0 ",u^d(et[1][0],et[1][1],$[1][0],$[1][1]),",",1-u," ",$[1],"A",J,",",J," 0 0,",g," ",$[0]):R.push("L",et[0],"A",J,",",J," 0 0,",g," ",$[0])}else n&&R.push("L",w,",",E)}else R.push("M",C,",",L),null!=P&&R.push("A",o,",",o," 0 ",B,",",u," ",P,",",M),n&&R.push("L",w,",",E),null!=S&&R.push("A",t,",",t," 0 ",G,",",1-u," ",S,",",O);return r&&R.push("Z"),R.join("")}function i(t,e){return"M0,"+t+"A"+t+","+t+" 0 1,"+e+" 0,"+-t+"A"+t+","+t+" 0 1,"+e+" 0,"+t}var n=!0,r=!0,a=s,m=h,v=o,_=tt,y=l,x=u,b=c;return t.toCenter=function(e){return arguments.length?(n=!!e,t):n},t.closePath=function(e){return arguments.length?(r=!!e,t):r},t.innerRadius=function(e){return arguments.length?(a=g(e),t):a},t.outerRadius=function(e){return arguments.length?(m=g(e),t):m},t.cornerRadius=function(e){return arguments.length?(v=g(e),t):v},t.padRadius=function(e){return arguments.length?(_=e==tt?tt:g(e),t):_},t.startAngle=function(e){return arguments.length?(y=g(e),t):y},t.endAngle=function(e){return arguments.length?(x=g(e),t):x},t.padAngle=function(e){return arguments.length?(b=g(e),t):b},t.centroid=function(){var t=(+a.apply(this,arguments)+ +m.apply(this,arguments))/2,e=(+y.apply(this,arguments)+ +x.apply(this,arguments))/2-K;return[Math.cos(e)*t,Math.sin(e)*t]},t};var tt="auto";$.line=function(){return m(r)};var et=new X({linear:v,"linear-closed":_,step:y,"step-before":x,"step-after":b,basis:M,"basis-open":w,"basis-closed":E,bundle:S,cardinal:C,"cardinal-open":T,"cardinal-closed":A,monotone:I});et.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var it=[0,2/3,1/3,0],nt=[0,1/3,2/3,0],rt=[0,1/6,2/3,1/6];return $.line.radial=function(){var t=m(G);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},x.reverse=b,b.reverse=x,$.area=function(){return N(r)},$.area.radial=function(){var t=N(G);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},$.diagonal=function(){function t(t,r){var a=e.call(this,t,r),o=i.call(this,t,r),s=(a.y+o.y)/2,h=[a,{x:a.x,y:s},{x:o.x,y:s},o];return h=h.map(n),"M"+h[0]+"C"+h[1]+" "+h[2]+" "+h[3]}var e=H,i=z,n=U;return t.source=function(i){return arguments.length?(e=g(i),t):e},t.target=function(e){return arguments.length?(i=g(e),t):i},t.projection=function(e){return arguments.length?(n=e,t):n},t},$.getMarkerPath=function(t,e){switch(t){case Y.CIRCLE:case Y.CIRCLE_HOLLOW:return $.arc().outerRadius(e)({startAngle:0,endAngle:2*Math.PI});case Y.SQUARE:case Y.SQUARE_HOLLOW:var i=-e+","+-e,n=e+","+-e,r=e+","+e,a=-e+","+e;return"M"+i+"L"+n+"L"+r+"L"+a+"Z";case Y.DIAMOND:case Y.DIAMOND_HOLLOW:e=2*e/Math.sqrt(2);var o=-e+",0",s="0,"+-e,h=e+",0",l="0,"+e;return"M"+o+"L"+s+"L"+h+"L"+l+"Z";case Y.TRIANGLE:case Y.TRIANGLE_HOLLOW:var u=Math.sqrt(3),o=-2*e/u+","+e,s="0,"+-e,h=2*e/u+","+e;return"M"+o+"L"+s+"L"+h+"Z";case Y.STAR:e*=1.4;for(var c=V(e),d="",f=-1;++f<5;){var p=f*F(72),g=p+F(36),m=W(p,e,3),v=W(g,c,3),_=f?"L":"M";d+=_+m[0]+","+m[1],d+="L"+v[0]+","+v[1]}return d+="z"}},$}),define("vector/shape/CircleMarker",["require","./Path","../../utils/BaseUtils","../../chart/map/LatLng","../../chart/map/LatLngBounds","../../utils/PathGenerator"],function(t){var e=t("./Path"),i=t("../../utils/BaseUtils"),n=t("../../chart/map/LatLng"),r=t("../../chart/map/LatLngBounds"),a=t("../../utils/PathGenerator"),o=e.extend({initialize:function(t,e,r){i.setOptions(this,e),this._latlng=n.create(t),this._radius=r,this._circle=a.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0)},setLatLng:function(t){return this._latlng=n.create(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this._radius=t,this.redraw()},getRadius:function(){return this._radius},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),n=[t+i,e+i];this._pxBounds=new r(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._path.attr({d:this._circle.outerRadius(this._radius)(),transform:i.makeTranslate(this._point)}),this.setStyle()},_empty:function(){return!this._renderer._bounds.intersects(this._pxBounds)}});return o}),define("chart/map/Marker",["require","./../../vector/Layer","./Icon","../../utils/BaseUtils","./LatLng","../../dom/DomUtils"],function(t){var e=t("./../../vector/Layer"),i=t("./Icon"),n=t("../../utils/BaseUtils"),r=t("./LatLng"),a=t("../../dom/DomUtils"),o=e.extend({options:{icon:new i.Default,interactive:!0,draggable:!1,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",nonBubblingEvents:["click","dblclick","mouseover","mouseout","contextmenu"]},initialize:function(t,e){n.setOptions(this,e),this._latlng=r.create(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=r.create(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},update:function(){if(this._icon){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),t.alt&&(i.alt=t.alt)),a.addClass(i,e),t.keyboard&&(i.tabIndex="0"),this._icon=i,n&&this.getPane().appendChild(this._icon)},_removeIcon:function(){a.remove(this._icon),this._icon=null},_setPos:function(t){a.setPosition(this._icon,t),this._shadow&&a.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_resetZIndex:function(){this._updateZIndex(0)},node:function(){return this._icon},setStyle:function(){}});return o}),define("vector/shape/ScatterMarker",["require","./Path","../../utils/BaseUtils","../../chart/map/LatLng","../../utils/PathGenerator"],function(t){var e=t("./Path"),i=t("../../utils/BaseUtils"),n=t("../../chart/map/LatLng"),r=t("../../utils/PathGenerator"),a=e.extend({initialize:function(t,e,r){i.setOptions(this,e),this._latlng=n.create(t),this._marker=r},getLatLng:function(){return this._latlng},_getMarkerPath:function(){var t=this._marker.symbol||"circle",e=this._marker.radius||4.5;return r.getMarkerPath(t,e)},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._path.attr({d:this._getMarkerPath(),transform:i.makeTranslate(this._point)})},_empty:function(){return!this._renderer._bounds.intersects(this._pxBounds)}});return a}),define("vector/shape/TextLayer",["require","../../vector/Layer","../../chart/map/LatLng","../../utils/BaseUtils","../../utils/ColorUtils","../../dom/DomUtils"],function(t){var e=t("../../vector/Layer"),i=t("../../chart/map/LatLng"),n=t("../../utils/BaseUtils"),r=t("../../utils/ColorUtils"),a=t("../../dom/DomUtils"),o=4,s=e.extend({initialize:function(t,e){this._latlng=i.create(t),this._dataPoint=e},setStyle:function(t){this._latlng=t,this.onRemove(),this.onAdd()},beforeAdd:function(t){this._renderer=t.getMapRenderer(this)},onAdd:function(){this._text=document.createElement("div"),this._text.style.position="absolute",this._text.style.zIndex=1001,this._text.style["pointer-events"]="none",this.getPane().appendChild(this._text);var t=this._dataPoint,e=t.labelContent,i=t.options.marker,a=t.series.type,s=-t.labelDim.height/2;if("scatter"==a||"pointMap"==a)if(i&&!n.isImageMarker(i.symbol)){var h=i.radius||4.5;s=-h-t.labelDim.height}else{var l=i?i.height:t.options.icon.iconSize[1];s=-l/2-t.labelDim.height}s-=o;for(var u=0,c=e.length;c>u;u++){var d=e[u],f=d.dim,p=d.text,g=d.style,m=document.createElement("div");m.innerHTML=p,m.style.zIndex=1001,m.style.position="absolute",m.style.left=-f.width/2+"px",m.style.top=s+"px",m.style.overflow="hidden",m.style.whiteSpace="nowrap";for(var v in g)"color"==v&&"inherit"!=g.color?m.style.color=r.colorToHex(g.color):m.style[v]=g[v];this._text.appendChild(m),s+=f.height+2}this._reset()},onRemove:function(){a.remove(this._text)},getEvents:function(){return{zoomend:this._project,moveend:this._update,viewreset:this._reset}},_reset:function(){this._project(),this._update()},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_update:function(){this._map&&(this._text.style.left=this._point.x+"px",this._text.style.top=this._point.y+"px")}});return s}),define("chart/map/PosAnimation",["require","../../dom/Evented","../../dom/DomUtils","../../utils/BaseUtils"],function(t){var e=t("../../dom/Evented"),i=t("../../dom/DomUtils"),n=t("../../utils/BaseUtils"),r=e.extend({run:function(t,e,n,r){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(r||.5,.2),this._startPos=i.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=n.requestAnimFrame(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;i>e?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),i.setPosition(this._el,n),this.fire("step")},_complete:function(){n.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}});return r}),define("vans/VanChartBaseMap",["require","./VanChart","../utils/BaseUtils","../dom/DomUtils","../Constants","../dom/Evented","../dom/Browser","../utils/Point2D","../utils/Bounds","../chart/map/LatLng","../chart/map/LatLngBounds","../chart/map/PosAnimation"],function(t){var e=t("./VanChart"),i=t("../utils/BaseUtils"),n=t("../dom/DomUtils"),r=(t("../Constants"),t("../dom/Evented"),t("../dom/Browser")),a=t("../utils/Point2D"),o=t("../utils/Bounds"),s=t("../chart/map/LatLng"),h=t("../chart/map/LatLngBounds"),l=t("../chart/map/PosAnimation"),u=e.extend({setView:function(t,e,n){if(e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(s.create(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&n!==!0){void 0!==n.animate&&(n.zoom=i.extend({animate:n.animate},n.zoom),n.pan=i.extend({animate:n.animate,duration:n.duration},n.pan));var r=this._zoom!==e?this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan);if(r)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(r.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(r.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),r=this.getSize().divideBy(2),o=t instanceof a?t:this.latLngToContainerPoint(t),s=o.subtract(r).multiplyBy(1-1/n),h=this.containerPointToLatLng(r.add(s));return this.setView(h,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():h.create(t);var i=a.create(e.paddingTopLeft||e.padding||[0,0]),n=a.create(e.paddingBottomRight||e.padding||[0,0]),r=this.getBoundsZoom(t,!1,i.add(n));r="number"==typeof e.maxZoom?Math.min(e.maxZoom,r):r;var o=n.subtract(i).divideBy(2),s=this.project(t.getSouthWest(),r),l=this.project(t.getNorthEast(),r),u=this.unproject(s.add(l).divideBy(2).add(o),r);return{center:u,zoom:r}},fitBounds:function(t,e){if(t=h.create(t),!t.isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=a.create(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend"); - if(e.animate!==!0&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new l,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){n.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},setMaxBounds:function(t){return t=h.create(t),t.isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,h.create(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},invalidateSize:function(t){if(!this._loaded)return this;t=i.extend({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var n=this.getSize(),r=e.divideBy(2).round(),a=n.divideBy(2).round(),o=r.subtract(a);return o.x||o.y?(t.animate&&t.pan?this.panBy(o):(t.pan&&this._rawPanBy(o),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(i.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},remove:function(){n.remove(this._mapPane),n.remove(this._controlContainer),this._loaded&&this.fire("unload");for(var t in this._layers)this._layers[t].remove();return e.prototype.remove.call(this),this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),r=n.create("div",i,e||this._mapPane);return t&&(this._panes[t]=r),r},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new h(e,i)},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=h.create(t),i=a.create(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),l=t.getNorthWest(),u=t.getSouthEast(),c=this.getSize().subtract(i),d=this.project(u,n).subtract(this.project(l,n)),f=r.any3d?this.options.zoomSnap:1,p=Math.min(c.x/d.x,c.y/d.y);return n=this.getScaleZoom(p,n),f&&(n=Math.round(n/(f/100))*(f/100),n=e?Math.ceil(n/f)*f:Math.floor(n/f)*f),Math.max(o,Math.min(s,n))},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new o(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(s.create(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(a.create(t),e)},layerPointToLatLng:function(t){var e=a.create(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(s.create(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(s.create(t))},distance:function(t,e){return this.options.crs.distance(s.create(t),s.create(e))},containerPointToLayerPoint:function(t){return a.create(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return a.create(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(a.create(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(s.create(t)))},mouseEventToContainerPoint:function(t){return n.getMousePos(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=n.get(t);n.addClass(e,"leaflet-grab")},addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){function t(t,a){var o=i+t+" "+i+a;e[t+a]=n.create("div",o,r)}var e=this._controlCorners={},i="leaflet-",r=this._controlContainer=n.create("div",i+"control-container",this._container);t("top","left"),t("bottom","right")},_resetView:function(t,e){n.setPosition(this._mapPane,new a(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var r=this._zoom!==e;this._moveStart(r)._move(t,e)._moveEnd(r),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t){return t&&this.fire("zoomstart"),this.fire("movestart")},_move:function(t,e,i){void 0===e&&(e=this._zoom);var n=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return i.cancelAnimFrame(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){n.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_onResize:function(){i.cancelAnimFrame(this._resizeRequest),this._resizeRequest=i.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this)},_performZoom:function(){var t=this,e=t.getZoom(),i=this.options.zoomSnap||0;t._stop();var n=this._delta/(4*this.options.wheelPxPerZoomLevel),r=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,a=i?Math.ceil(r/i)*i:r,o=t._limitZoom(e+(this._delta>0?a:-a))-e;this._delta=0,this._startTime=null,o&&("center"===t.options.scrollWheelZoom?t.setZoom(e+o):t.setZoomAround(this._lastMousePos,e+o))},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return n.getPosition(this._mapPane)||new a(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){var i=t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin();return i.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return o.create([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),r=this.getSize().divideBy(2),a=new o(n.subtract(r),n.add(r)),s=this._getBoundsOffset(a,i,e);return s.round().equals([0,0])?t:this.unproject(n.add(s),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new o(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=o.create(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),r=n.min.subtract(t.min),s=n.max.subtract(t.max),h=this._rebound(r.x,-s.x),l=this._rebound(r.y,-s.y);return new a(h,l)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=r.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){n.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return(e&&e.animate)===!0||this.getSize().contains(i)?(this.panBy(i,e),!0):!1},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||n.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(e),a=this._getCenterOffset(t)._divideBy(1-1/r);return n.animate===!0||this.getSize().contains(a)?(i.requestAnimFrame(function(){this._moveStart(!0)._animateZoom(t,e,!0)},this),!0):!1},_animateZoom:function(t,e,r,a){r&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,n.addClass(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:a}),setTimeout(i.bind(this._onZoomTransitionEnd,this),250)},_onZoomTransitionEnd:function(){this._animatingZoom&&(n.removeClass(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),i.requestAnimFrame(function(){this._moveEnd(!0)},this))},addLayer:function(t){var e=i.stamp(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=i.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&i.stamp(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addZoomLimit:function(t){(isNaN(t.options.maxZoom)||!isNaN(t.options.minZoom))&&(this._zoomBoundLayers[i.stamp(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=i.stamp(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-(1/0);this._getZoomSpan();for(var i in this._zoomBoundLayers){var n=this._zoomBoundLayers[i].options;t=void 0===n.minZoom?t:Math.min(t,n.minZoom),e=void 0===n.maxZoom?e:Math.max(e,n.maxZoom)}this._layersMaxZoom=e===-(1/0)?void 0:e,this._layersMinZoom=t===1/0?void 0:t,void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())}},_onPinch:function(t){if(this._zoomEnabled()){var e=this;this._pinchZoom=e._limitZoom(e.getZoom()+t.scale-1),this._pinchCenter=t.center,this._pinchStartTime||(this._pinchStartTime=+new Date);var i=this.options.wheelDebounceTime,n=Math.max(i-(+new Date-this._pinchStartTime),0);clearTimeout(this._pinchTimer),this._pinchTimer=setTimeout(function(){e._stop(),e._pinchStartTime=null,e.setZoomAround(g.create(e._pinchCenter),e._pinchZoom)},n)}},_onWheelScroll:function(t){if(this._zoomEnabled()){t=t.srcEvent;var e=c.getWheelDelta(t),i=this.options.wheelDebounceTime;this._delta=u.pick(this._delta,0),this._delta+=e,this._lastMousePos=this.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(u.bind(this._performZoom,this),n),c.stop(t)}},_animationEnd:function(){this.series.forEach(function(t){t._drawEffectPoints()})},_animationStart:function(){this._animationStarted=!0,this.animationCount=0,this.animationCount||this.fire("animationEnd")},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&d.any3d,c.addClass(t,"leaflet-container"+(d.touch?" leaflet-touch":"")+(d.retina?" leaflet-retina":"")+(d.ielt9?" leaflet-oldie":"")+(d.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=c.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos()},_initPanes:function(){var t=this._panes={};this._mapPane=this.createPane("mapPane",this._container),c.setPosition(this._mapPane,new g(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.options.markerZoomAnimation||c.addClass(t.markerPane,"leaflet-zoom-hide")},layoutComponentsAndCharts:function(){this.initLayerInfo();var t=this;t.bounds=t._getDefaultBounds(),o.ComponentsOrder.map(function(e){e in t.components&&t.components[e].doLayout()},this),this.reRenderSeries()},filterRender:function(){this.renderSeries()},_updateSeriesStyle:function(){this.validPoints.forEach(function(t){if(t.layers){var e=t.series._getDynamicStyle(t);t.layers.forEach(function(t){t.setStyle(e)})}})},reRenderWholePlot:function(){var t=this.components[o.LEGEND_COMPONENT];t&&t.render(),this.reRenderSeries()},refreshRestore:function(){this._initIntermediateState();for(var t in this.components)this.components[t].refresh();this.series.forEach(function(t,e){t.refresh(t.options,e)});var e=this.components[o.RANGE_LEGEND_COMPONENT];e&&e.initAttributesWithSeries(),this.series.forEach(function(t){if(t.type!==f.LINE_MAP||!t.options.large)for(var e=0,i=t.points.length;i>e;e++)t.points[e].refreshPointColor()}),this.layoutComponentsAndCharts()},reRenderSeries:function(){this.hoverPoint=this.hoverSeries=null,this.calculateMapSeries(),this.render()},calculateMapSeries:function(){var t=this;t.hoverPoint=null,t.hoverSeries=null;var e=t.seriesOfType(f.BUBBLE_CHART);r.calculateBubbleRadius(e);for(var i={},n={},a=this.series,o=0,s=a.length;s>o;o++){var h=0,l=a[o],c=l.type,d=l.points;d.forEach(function(t){h=u.accAdd(h,Math.abs(t.getTargetValue()))}),d.forEach(function(t){t.percentage=Math.abs(t.getTargetValue()/h);var e=t.options.lnglat?t.options.lnglat.join("-"):t.name;e+=c;var r=t.isNull?n:i;r[e]=r[e]||[],r[e].push(t)})}for(var p in i){var g=i[p].concat(n[p]||[]);g.forEach(function(t){if(c!==f.LINE_MAP){if(t.points=g,!t.options.drilldown)for(var e=g.length-1;e>=0;e--)g[e].options.drilldown&&(t.options.drilldown=g[e].options.drilldown,t.geo=g[e].geo);t.series.calculateLabelInfo(t)}})}this.validPoints=this._getMapPoints()},_getMapPoints:function(){var t=this,e={},i=[],n=t.getCurrentGeo(),r=this.getComponent(o.LEGEND_COMPONENT);return t.series.forEach(function(a,o){var s=a.points,h=a.type;if(h!==f.LINE_MAP&&h!==f.HEAT_MAP)for(var l=0,u=s.length;u>l;l++){var c=s[l];if(t.isMapPointVisible(c)){if(0!==o||!c.isNull||!c.options.drilldown){var d=n.getFeaturesByName(c.name,h);if(d||c.options.lnglat){var p=h==f.AREA_MAP?c.name:n.getDataPointLngLat(c,d&&d[0]).join("-");!e[p]||r&&h==f.BUBBLE_CHART?(i.push(c),e[p]=!0):t.removePointGraphics(c)}}}else t.removePointGraphics(c)}}),i},isMapPointVisible:function(t){var e=this.getComponent(o.RANGE_LEGEND_COMPONENT);if(e&&t.points&&t.points.length&&(t=t.points[0]),t.isNull){var i=t.series.type,n=t.options.marker,r=n&&u.isImageMarker(n.symbol),a=i==f.AREA_MAP?t.options.drilldown:i==f.POINT_MAP||r;return t&&t.visible&&t.series.visible&&a}return t.isVisible()},initLayerInfo:function(){if(!this.layerMap){this.layerMap=[],this.layerIndex=0;var t=this.getComponent(o.GEO_COMPONENT),e=this.series;this.layerMap=[{series:e,geo:t,layerIndex:this.layerIndex,drillUpDataPoint:e[0]&&e[0].points[0]}];var i=this.options.initDrillPath;if(i&&i.length>1)for(var n=1;ne;e++)t.points[e].refreshPointColor()}),this.layerIndex++,t=a.geo,this.layerMap[this.layerIndex]={geo:t,series:e,layerIndex:this.layerIndex},this.setComponent(t,o.GEO_COMPONENT)}}}},_createChildSeriesWhenLoaded:function(t){if(!t.childSeries){var e=[],i=this;i.parentPoint=t,t.options.drilldown.series.forEach(function(t,n){var r=t.type||i.options.chartType,o=a.get(r);e.push(new o(t,i,n))}),t.childSeries=e}},drillDown:function(t){var e=this.layerMap[this.layerIndex-1];if(t.options.drilldown&&t.options.drilldown.series&&(!e||e.drillUpDataPoint!=t)){var i=this.layerMap[this.layerIndex].geo;this._createChildSeriesWhenLoaded(t),this.layerMap[this.layerIndex].drillUpDataPoint=t,this._setNewGeoAndSeries(t.geo,i,t.childSeries,++this.layerIndex)}},drillUp:function(t){var e=this;if(t.series!=e.series){var i=this.layerMap[t.layerIndex+1].geo;this._setNewGeoAndSeries(t.geo,i,t.series,t.layerIndex)}},_setNewGeoAndSeries:function(t,e,i,n){for(var r=this,a=0,s=r.series.length;s>a;a++){var h=r.series[a],l=h.type,u=h.points;u.forEach(function(t){r.removePointGraphics(t,l)})}r.series=i;var c=r.getComponent(o.RANGE_LEGEND_COMPONENT);c&&c.initAttributesWithSeries(),i.forEach(function(t){for(var e=0,i=t.points.length;i>e;e++)t.points[e].refreshPointColor()}),this.layerMap[n]={geo:t,series:i,layerIndex:n,drillUpDataPoint:i[0]&&i[0].points[0]},this.layerIndex=n,this.layerMap=this.layerMap.slice(0,n+1),e&&e.remove(),this.setComponent(t,o.GEO_COMPONENT),this.layoutComponentsAndCharts()},cancelLegendHighlight:function(t){var e=this.highlightTarget;T.prototype.cancelLegendHighlight.call(this,t),this._lineMapLayer&&e&&this._lineMapLayer.redraw()},makeLegendHighlight:function(t){T.prototype.makeLegendHighlight.call(this,t),this._lineMapLayer&&this._lineMapLayer.redraw()},getEffectLayer:function(){var t=this;return t._effectLayer||(t._effectLayer=(new v).addTo(t)),t._effectLayer},renderSeries:function(){this.getComponent(o.TOOLTIP_COMPONENT).immediateHide();var t=this,e=(t.series,t.getComponent(o.GEO_COMPONENT));this._pointLayer=this._pointLayer||(new v).addTo(this);var i=[f.SCATTER_CHART,f.BUBBLE_CHART];this.largeSeries=i.reduce(function(t,e){return t[e]=t[e]||{visible:!0,type:e},t[e].points=[],t},this.largeSeries||{});var n=this.largeSeries;this.validPoints.forEach(function(i){var r=t.isMapPointVisible(i),a=i.series.type;if(i.series.options.large&&n[a]){if(!r)return;n[a].points.push(i)}else if(r){var o=i.series.getStyle(i),s=e.getFeaturesByName(i.name,a);i.layers?i.layers.forEach(function(e){e.setStyle(o),t.registerInteractiveTarget(i,e)}):(i.layers=[],s=i.options.lnglat?["null"]:s,s.forEach(function(n){var r;a==f.AREA_MAP?(r=e.getLayerByFeature(n),r.setStyle(o)):r=t.createPointLayer(n,i,o),i.layers.push(r),t.registerInteractiveTarget(i,r)}))}else t.removePointGraphics(i,a)}),i.map(function(e){n[e].points.length&&t._renderCanvas(n[e])}),this._renderHeatMap(),this._renderLineMap(),this.updateLabel(),this.fire("animationStart")},_renderCanvas:function(t){var e=this;if(!t._canvas){var i=e.getSize(),r={width:i.x,height:i.y,x:0,y:0,dpr:window.devicePixelRatio||1};t._canvas=new n(e._panes.overlayPane,e,r),t._canvas.onAdd(),e.on("moveend",e._resetCanvas.bind(e,t),e),e.options.zoomAnimation&&d.any3d&&e.on("zoomanim",e._resetCanvas.bind(e,t),e),e.on({tap:function(t){var i=e.hoverPoint;i&&i._onPointTap(t)},mousemove:function(t){var i=e.handler._getCanvasClosestPoint(t.containerPoint);i?(i._events||i.getEvents&&i.on(i.getEvents(),i),e.showTooltip(i,t),e.hoverPoint=i,i.options.click&&e.handler.cursor("pointer")):e.hoverPoint||(e.hideTooltip(),e.handler.cursor(""))}})}e._resetCanvas(t)},_resetCanvas:function(t){var e=this,i=e.getComponent(o.GEO_COMPONENT);t.points.map(function(n){var r=i.getFeaturesByName(n.name,t.type);r=n.options.lnglat?["null"]:r,r.map(function(t){var i=n.getLatLng(t),r=e.latLngToLayerPoint(i);n.posX=r.x,n.posY=r.y})}),t._canvas.clearAll(),t._canvas.addSeries(t)},_onZoom:function(){var t=this,e=t.hoverPoint,i=t.getZoom();if(e&&e.geo){var n=e.geo.getZoomListener();if(n&&i>=n)return void t.drillDown(e)}var r=t.layerMap[t.layerIndex-1];r&&r.geo.getZoomListener()>i&&t.drillUp(r),clearTimeout(this.labelRelaoutTimeOut),this.labelRelaoutTimeOut=setTimeout(function(){t.updateLabel()},200)},updateLabel:function(){if(this._fixConflictLabel(),!this._needShowMoreLabel()||this.layerIndex>0)return void this._updateNormalLabel();var t=this;t._moreLabelTimeOut&&clearTimeout(t._moreLabelTimeOut),t._removeNormalLabels(),t._updateMoreLabels(),t._moreLabelTimeOut=setTimeout(function(){t._changeDataState=!1,t._clearMoreLabels(),t._updateNormalLabel()},1e3)},_updateMoreLabels:function(){var t=this;this.validPoints&&this.validPoints.filter(function(t){return t.series.type!=f.LINE_CHART&&t.series.type!=f.HEAT_MAP}).forEach(function(e){var i=e.getLatLng();if(t.isMapPointVisible(e)&&i){var n=t.latLngToLayerPoint(i),r=n.y,a=null;e.series.type==f.POINT_MAP&&(r-=e.options.icon.iconSize[1]/2,a=function(t,e){return t-e/2-5}),e.moreLabelG=t.getMapRenderer().text().add(),e.series._showAndExitMoreLabel(e,n.x,r,null,a,e.moreLabelG)}})},_removeNormalLabels:function(){var t=this.validPoints.concat(this._getHeatMapPoints()),e=this._textGroup;t.forEach(function(t){t.textLayers&&(t.textLayers.forEach(function(t){e.removeLayer(t)}),t.textLayers=null)})},_updateNormalLabel:function(){var t=this,e=t.getCurrentGeo(),i=this.validPoints.concat(this._getHeatMapPoints());this._textGroup=this._textGroup||(new v).addTo(t);var n=this._textGroup;i.forEach(function(i){var r=i.series.type,a=e.getFeaturesByName(i.name,r);a=i.options.lnglat?["null"]:a,i.labelPos&&i.labelContent&&a?a.forEach(function(e,n){i.labelPos[n]&&(i.textLayers=i.textLayers||[],i.textLayers[n]?i.textLayers[n].setStyle(i.getLatLng(e)):i.textLayers[n]=new b(i.getLatLng(e),i).addTo(t._textGroup))}):i.textLayers&&(i.textLayers.forEach(function(t){n.removeLayer(t)}),i.textLayers=null)})},_fixConflictLabel:function(){var t=this,e=new p,i=t.getCurrentGeo(),n=this.validPoints.concat(this._getHeatMapPoints());n.forEach(function(n){var r=n.series.type;if(n.labelPos=null,t.isMapPointVisible(n)&&r==f.AREA_MAP&&n.labelContent){var a=i.getFeaturesByName(n.name,r);a.forEach(function(i,r){if(n.labelPos=n.labelPos||[],i.properties.center){var a=t._getTextBounds(n,i);n.labelPos[r]=a,e.addBounds(a)}else n.labelPos[r]=null}),n.labelPos&&!n.labelPos.filter(function(t){return!!t}).length&&(n.labelPos=null)}}),n.forEach(function(n){if(n.labelContent&&t.isMapPointVisible(n)){var r=n.series.type,a=i.getFeaturesByName(n.name,r);a=n.options.lnglat?["null"]:a,a&&a.forEach(function(i,r){if(!n.labelPos||!n.labelPos[r]){var a=t._getTextBounds(n,i);e.isOverlapped(a)?(n.labelPos=n.labelPos||[],n.labelPos[r]=null):(n.labelPos=n.labelPos||[],n.labelPos[r]=a,e.addBounds(a))}n.labelPos&&!n.labelPos.filter(function(t){return!!t}).length&&(n.labelPos=null)})}})},_getTextBounds:function(t,e){var i=this,n=t.getLatLng(e),r=i.latLngToContainerPoint(n),a=r.y,o=t.series.type,s=t.options.marker,h=t.options.icon;if(o==f.AREA_MAP||o==f.BUBBLE_CHART||o==f.HEAT_MAP)a-=t.labelDim.height/2;else if(s&&!u.isImageMarker(s.symbol)){var l=s.radius||4.5;a-=l+t.labelDim.height}else{var c=h?h.iconSize[1]:s.height;a-=c/2+t.labelDim.height}return u.makeBounds([r.x,a],t.labelDim)},createPointLayer:function(t,e,i){var n,r=e.series.type,a=e.getLatLng(t);switch(r){case f.BUBBLE_CHART:n=new _(a,i,e.radius).addTo(this._pointLayer);break;case f.POINT_MAP:n=new y(a,{icon:new l(e.options.icon)}).addTo(this._pointLayer);break;case f.SCATTER_CHART:var o=e.options.marker,s=u.isImageMarker(o.symbol);s&&(i={icon:new l({iconSize:[o.width,o.height],iconUrl:o.symbol})}),n=s?new y(a,i):new x(a,i,e.options.marker),n.addTo(this._pointLayer)}return n},getCurrentGeo:function(){return this.layerMap?this.layerMap[this.layerMap.length-1].geo:this.components.geo},_getHeatMapPoints:function(){var t=this.seriesOfType(f.HEAT_MAP),e=this,i=[],n=e.getComponent(o.GEO_COMPONENT);if(t&&t.length)for(var r=0,a=t.length;a>r;r++)t[r].points.forEach(function(t){if(!t.options.lnglat){var r=n.getFeaturesByName(t.name,f.HEAT_MAP);t.options.lnglat=n.getDataPointLngLat(t,r&&r[0])}!t.isNull&&t.visible&&t.options.lnglat?i.push(t):e.removePointGraphics(t,f.HEAT_MAP)});return i},_renderHeatMap:function(){var t=this.seriesOfType(f.HEAT_MAP),e=this.getComponent(o.RANGE_LEGEND_COMPONENT);if(t&&t.length&&e){var i={min:e._getMin(),max:e._getMax(),data:this._getHeatMapPoints()};if(!this._heatMapOverlay){var n=t[0].options,r={maxOpacity:n.maxOpacity,minOpacity:n.minOpacity,radius:n.radius,blur:n.blur,gradient:e._getGradient(),valueField:"value"};this._heatMapOverlay=new h(r).addTo(this)}this._heatMapOverlay.setData(i)}},removePointGraphics:function(t,e){if(t){e=e||t.series.type;var i=this.getCurrentGeo();if(e===f.LINE_MAP&&(this._lineMapLayer.removeEffect(t),t.remove()),t.layers)if(e==f.AREA_MAP)t.layers.forEach(function(t){t.setStyle(i.defaultAreaStyle())});else{var n=this._pointLayer;t.layers.forEach(function(t){n.removeLayer(t)}),t.layers=null}var r=this._textGroup;t.textLayers&&(t.textLayers.forEach(function(t){r.removeLayer(t)}),t.textLayers=null,t.labelPos=null),t.clearPointEffect()}},_renderLineMap:function(){var t=this.seriesOfType(f.LINE_MAP),e=t.reduce(function(t,e){return t.concat(e.points)},[]);if(!t.length||!e.length)return void(this._lineMapLayer&&this._lineMapLayer.setData([]));if(!this._lineMapLayer){var i=this,r=this.getSize(),a={width:r.x,height:r.y,x:0,y:0,dpr:window.devicePixelRatio||1},o=this.mainRenderer=new n(this._panes.overlayPane,this,a),h=this.animationRenderer=new n(this._panes.overlayPane,this,a);o.onAdd(),h.onAdd(),this._lineMapLayer=s({mainRenderer:o,animationRenderer:h,vanchart:i}).addTo(this)}this._lineMapLayer.setData(e)}});return t("./VanChartLibrary").register(f.POINT_MAP,A),t("./VanChartLibrary").register(f.AREA_MAP,A),t("./VanChartLibrary").register(f.LINE_MAP,A),t("./VanChartLibrary").register(f.HEAT_MAP,A),A}),define("utils/QuadTree",[],function(){function t(t){return t[0]}function e(t){return t[1]}function i(t){return"function"==typeof t?t:function(){return t}}function n(n,u,c,d,f){function p(t){function e(t,e,i,r,a,o,s,h){if(!isNaN(i)&&!isNaN(r))if(t.leaf){var u=t.x,c=t.y;if(null!=u)if(l(u-i)+l(c-r)<.01)n(t,e,i,r,a,o,s,h);else{var d=t.point;t.x=t.y=t.point=null,n(t,d,u,c,a,o,s,h),n(t,e,i,r,a,o,s,h)}else t.x=i,t.y=r,t.point=e}else n(t,e,i,r,a,o,s,h)}function n(t,i,n,r,a,s,h,l){var u=.5*(a+h),c=.5*(s+l),d=n>=u,f=r>=c,p=f<<1|d;t.leaf=!1,t=t.nodes[p]||(t.nodes[p]=o()),d?a=u:h=u,f?s=c:l=c,e(t,i,n,r,a,s,h,l)}var r,a,p,_,y,x,b,T,A,C=i(m),L=i(v);if(null!=u)x=u,b=c,T=d,A=f;else if(T=A=-(x=b=1/0),a=[],p=[],y=t.length,g)for(_=0;y>_;++_)r=t[_],r.xT&&(T=r.x),r.y>A&&(A=r.y),a.push(r.x),p.push(r.y);else for(_=0;y>_;++_){var P=+C(r=t[_],_),M=+L(r,_);x>P&&(x=P),b>M&&(b=M),P>T&&(T=P),M>A&&(A=M),a.push(P),p.push(M)}var w=T-x,E=A-b;w>E?A=b+w:T=x+E;var S=o();if(S.add=function(t){e(S,t,+C(t,++_),+L(t,_),x,b,T,A)},S.visit=function(t){s(t,S,x,b,T,A); - },S.find=function(t){return h(S,t[0],t[1],x,b,T,A)},_=-1,null==u){for(;++_a||c>o||n>d||r>f)){if(p=t.point){var p,g=e-t.x,m=i-t.y,v=g*g+m*m;if(h>v){var _=Math.sqrt(h=v);n=e-_,r=i-_,a=e+_,o=i+_,s=p}}for(var y=t.nodes,x=.5*(u+d),b=.5*(c+f),T=e>=x,A=i>=b,C=A<<1|T,L=C+4;L>C;++C)if(t=y[3&C])switch(3&C){case 0:l(t,u,c,x,b);break;case 1:l(t,x,c,d,b);break;case 2:l(t,u,b,x,f);break;case 3:l(t,x,b,d,f)}}}(t,n,r,a,o),s}var l=Math.abs;return n}),define("vans/ForceLayout",["require","../utils/QuadTree","../utils/Timer","../utils/BaseUtils"],function(t){function e(t,e,i){for(var n;e;){if(n=t[c.stamp(e)])return n;if(e===i)return null;e=e.parentNode}}function i(){return{mouseover:o,mouseout:s,panstart:r,panmove:n,panend:a}}function n(t,e,i){var n=i.containerPoint.x-e.currentPoint.x,r=i.containerPoint.y-e.currentPoint.y;e.currentPoint=i.containerPoint,t.px+=n,t.py+=r,e.resume()}function r(t,e,i){t.fixed|=2,e.panTarget=t,e.currentPoint=i.containerPoint}function a(t,e){t.fixed&=-7,e.panTarget=null}function o(t){t.fixed|=4,t.px=t.x,t.py=t.y}function s(t){t.fixed&=-5}function h(t,e,i){var n=0,r=0;if(t.charge=0,!t.leaf)for(var a,o=t.nodes,s=o.length,l=-1;++ls*s/L){if(A>h){var l=e.charge/h;t.px-=a*l,t.py-=o*l}return!0}if(e.point&&h&&A>h){var l=e.pointCharge/h;t.px-=a*l,t.py-=o*l}}return!e.charge}}var n,r,a,o,s,g,m,v={},_=[1,1],y=.9,x=d,b=f,T=-30,A=p,C=.1,L=.64,P=[],M=[],w=1,E={};return v.tick=function(){if((n*=.99)<.005)return n=0,g&&g(),!0;var e,i,u,c,d,f,p,m,v,x=P.length,b=M.length;for(i=0;b>i;++i)u=M[i],c=u.source,d=u.target,m=d.x-c.x,v=d.y-c.y,(f=m*m+v*v)&&(f=n*a[i]*((f=Math.sqrt(f))-r[i]*w)/f,m*=f,v*=f,d.x-=m*(p=c.weight/(d.weight+c.weight)),d.y-=v*p,c.x+=m*(p=1-p),c.y+=v*p);if((p=n*C)&&(m=_[0]/2,v=_[1]/2,i=-1,p))for(;++i0?t:0:t>0&&(n=t,u(v.tick)),v):n},v.start=function(){return v.preparePara(),v.resume()},v.simulateForce=function(){for(v.preparePara(),v.alpha(.1);v.alpha()>=.005;)v.tick();return g&&g(),v},v.simpleSimulateForce=function(){v.preparePara();for(var t=.1,e=.005,i=2,n=2,r=.5,a=.02,o=.9,s=t;s>=e;s-=s>.07?.001:5e-4){var h,l,u,c,d,f=P.length;if((u=s*a)&&(c=_[0]/2,d=_[1]/2,h=-1,u))for(;++hh;h++)for(var p=P[h],m=0;f>m;m++){var y=P[m];if(y!==p){var c=p.x-y.x,d=p.y-y.y,x=Math.sqrt(c*c+d*d),b=p.radius+y.radius+(p.series.cluster===y.series.cluster?i:n);b>x&&(x=(x-b)/x*r,p.x-=c*=x,p.y-=d*=x,y.x+=c,y.y+=d)}}}return g&&g(),v},v.preparePara=function(){function t(t,n){if(!i){for(i=[],l=0;s>l;++l)i[l]=[];for(l=0;h>l;++l){var r=M[l];i[r.source.index].push(r.target),i[r.target.index].push(r.source)}}for(var a,o=i[e],l=-1,u=o.length;++le;++e)(n=P[e]).index=e,n.weight=0;for(e=0;h>e;++e)n=M[e],"number"==typeof n.source&&(n.source=P[n.source]),"number"==typeof n.target&&(n.target=P[n.target]),++n.source.weight,++n.target.weight;for(e=0;s>e;++e)n=P[e],isNaN(n.x)&&(n.x=t("x",l)),isNaN(n.y)&&(n.y=t("y",u)),isNaN(n.px)&&(n.px=n.x),isNaN(n.py)&&(n.py=n.y);if(r=[],"function"==typeof x)for(e=0;h>e;++e)r[e]=+x.call(this,M[e],e);else for(e=0;h>e;++e)r[e]=x;if(a=[],"function"==typeof b)for(e=0;h>e;++e)a[e]=+b.call(this,M[e],e);else for(e=0;h>e;++e)a[e]=b;if(o=[],"function"==typeof T)for(e=0;s>e;++e)o[e]=+T.call(this,P[e],e);else for(e=0;s>e;++e)o[e]=T;return v},v.resume=function(){return v.alpha(.1)},v.stop=function(){return v.alpha(0)},v.registerDragTarget=function(t,e){m||(m=i()),E[c.stamp(e.node())]=t},v.dragFire=function(t,i){if(m){var n,r=t.srcEvent,a=t.type||r.type,o="panstart"===a||"panmove"===a||"panend"===a;if(o&&v.panTarget)n=v.panTarget;else{var s=r.target||r.srcElement;n=e(E,s,i)}return n&&m[a]?(m[a](n,v,t),n):void 0}},v};return g}),define("vans/VanChartForceBubble",["require","./VanChart","./../utils/BaseUtils","./../Constants","./ForceLayout","../utils/QuadTree","./VanChartLibrary"],function(t){function e(t){return function(e){var i=e.series.cluster;if(i&&i!==e){var n=e.x-i.x,r=e.y-i.y,a=Math.sqrt(n*n+r*r),o=e.radius+i.radius;a!=o&&(a=(a-o)/a*t,e.x-=n*=a,e.y-=r*=a,i.x+=n,i.y+=r)}}}function i(t,e,i){var n=s(e);return function(e){var r=e.radius+i+Math.max(h,l),a=e.x-r,o=e.x+r,s=e.y-r,u=e.y+r;n.visit(function(i,n,r,c,d){if(i.point&&i.point!==e){var f=e.x-i.point.x,p=e.y-i.point.y,g=Math.sqrt(f*f+p*p),m=e.radius+i.point.radius+(e.series.cluster===i.point.series.cluster?h:l);m>g&&(g=(g-m)/g*t,e.x-=f*=g,e.y-=p*=g,i.point.x+=f,i.point.y+=p)}return n>o||a>c||r>u||s>d})}}var n=t("./VanChart"),r=t("./../utils/BaseUtils"),a=t("./../Constants"),o=t("./ForceLayout"),s=t("../utils/QuadTree"),h=2,l=4,u=500,c=n.extend({vanChartType:"vanChartForceBubble",renderSeries:function(){function t(t){s._animationStarted&&t.alpha<.05&&n.prototype._animationEnd.bind(s)();var r=e(10*t.alpha*t.alpha),a=i(.5,l,s.maxRadius);l.forEach(function(t){r(t)}),l.forEach(function(t){a(t)}),s._updateGraphics()}function a(){s._updateGraphics(),n.prototype._animationEnd.bind(s)()}n.prototype.renderSeries.call(this);var s=this,h=s.bounds,l=this.nodes=[];this.maxRadius=0;var u=s.renderer.isAnimation;s.force&&s.force.stop(),s.force=s.force||o(),this.series.forEach(function(t){var e;t.points.forEach(function(t){t.isVisible()&&(t.x=s._changeDataState&&r.hasDefined(t._posX)?t._posX:s.validPosXY(t.x,0,h.width),t.y=s._changeDataState&&r.hasDefined(t._posY)?t._posY:s.validPosXY(t.y,0,h.height),u&&s.force.registerDragTarget(t,t.graphic),l.push(t),s.maxRadius=Math.max(s.maxRadius,t.radius),e=e||t,e=t.radius>e.radius?t:e)}),t.cluster=e}),s.force.nodes(l).size([h.width,h.height]).gravity(.05).charge(0).eachTick(t),r.isSupportSVG()?u?s.force.start():s.force.simulateForce():s.force.endTick(a).simpleSimulateForce()},_updateGraphics:function(){var t=this;t.nodes&&t.nodes.forEach(function(e){e._posX=e.x,e._posY=e.y,t._calculateLabelPos(e),e.textGraphic&&e.textGraphic.attr("transform",r.makeTranslate(e.labelPos)),e.graphic.attr(e.series.getPointUpdateAnimationAttr(e))})},_animationEnd:function(){},validPosXY:function(t,e,i){return t=+t,t>e&&i>t?t:void 0},dealAxisZoom:function(t,e){var i=this,n=i.bounds;i.force&&i.force.stop();var a=i._calculateZoomParas(t,e),o=a.shiftX,s=a.shiftY,h=a.scale;i.nodes.forEach(function(t){t.radius*=h;var e=t.x+o,r=t.y+s;e-=n.width/2,r-=n.height/2,t.x=e*h+n.width/2-o,t.y=r*h+n.height/2-s,i._calculateLabelPos(t),i._updatePointTextGraphic(t);var a=t.series,l=a.getPointUpdateAnimationAttr(t);t.graphic.animate({duration:u,ease:"back-out",attr:l})}),this.scale=h*r.pick(this.scale,1)},refreshRestore:function(){this.scale=1,this.update()},_calculateLabelPos:function(t){if(t.labelContent&&t.labelDim){var e=t.radius;t.labelDim.width>2*e||t.labelDim.height>2*e?t.labelPos=null:t.labelPos={x:-t.labelDim.width/2+t.x,y:-t.labelDim.height/2+t.y}}},orderData:function(){},_updatePointTextGraphic:function(t){t.textGraphic?t.labelPos?t.textGraphic.attr("transform",r.makeTranslate(t.labelPos)):(t.textGraphic.remove(),t.textGraphic=null):t.series._createTextGraphic(t)}});return t("./VanChartLibrary").register(a.FORCE_BUBBLE_CHART,c),c}),define("utils/Scale",["require","./BaseUtils","./Interpolator","./vMap"],function(t){function e(t){var e=t[0],i=t[t.length-1];return i>e?[e,i]:[i,e]}function i(t,e,i,n){var r=i(t[0],t[1]),a=n(e[0],e[1]);return function(t){return a(r(t))}}function n(t,e,i,n){var a=[],o=[],s=0,h=Math.min(t.length,e.length)-1;for(t[h]i;){var r=i+n>>>1;a(t[r],e)>0?n=r:i=r+1}return i}function a(t,e){return e>t?-1:t>e?1:t>=e?0:NaN}function o(t,e){return g.rebind(t,e,"range","rangeRound","interpolate")}function s(t,e,r,a){function o(){var o=Math.min(t.length,e.length)>2?n:i;return l=o(t,e,a,r),u=o(e,t,a,r),h}function h(t){return l(t)}var l,u;return h.invert=function(t){return u(t)},h.domain=function(e){return arguments.length?(t=e.map(Number),o()):t},h.range=function(t){return arguments.length?(e=t,o()):e},h.rangeRound=function(t){return h.range(t).interpolate(m.interpolateRound)},h.interpolate=function(t){return arguments.length?(r=t,o()):r},h.uninterpolate=function(t){return arguments.length?(a=t,o()):a},h.copy=function(){return s(t,e,r,a)},o()}function h(t,e,i,n){function r(t){return(i?Math.log(0>t?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function a(t){return i?Math.pow(e,t):-Math.pow(e,-t)}function s(e){return t(r(e))}return s.invert=function(e){return a(t.invert(e))},s.domain=function(e){return arguments.length?(i=e[0]>=0,t.domain((n=e.map(Number)).map(r)),s):n},s.base=function(i){return arguments.length?(e=+i,t.domain(n.map(r)),s):e},s.copy=function(){return h(t.copy(),e,i,n)},o(s,t)}function l(t,i){function n(e){return o[((a.get(e)||("range"===i.t?a.set(e,t.push(e)):NaN))-1)%o.length]}function r(e,i){for(var n=[],r=t.length,a=0;r>a;a++)n.push(e+i*a);return n}var a,o,s;return n.domain=function(e){if(!arguments.length)return t;t=[],a=new v;for(var r,o=-1,s=e.length;++oe?NaN:e/a+t,[e,e+1/a]},n.copy=function(){return u(t,e,i)},r()}function c(){return s([0,1],[0,1],m.interpolateNumber,m.uninterpolateNumber)}function d(){return h(c().domain([0,1]),10,!0,[1,10])}function f(){return u(0,1,[0,1])}function p(){return l([],{t:"range",a:[[]]})}var g=t("./BaseUtils"),m=t("./Interpolator"),v=t("./vMap");return{linear:c,quantize:f,log:d,quantize:f,ordinal:p}}),define("vans/CloudLayout",["require","./../utils/BaseUtils"],function(t){function e(t){return t.text}function i(){return"serif"}function n(){return"normal"}function r(t){return Math.sqrt(t.value)}function a(){return 30*(~~(6*Math.random())-3)}function o(){return 1}function s(t,e,i,n,r){if(!e.sprite){var a=t.context,o=t.ratio;a.clearRect(0,0,(v<<5)/o,_/o);var s=0,h=0,l=0,u=i.length;for(--n;++n>5<<5,d=~~Math.max(Math.abs(y+x),Math.abs(y-x))}else c=c+31>>5<<5;if(d>l&&(l=d),s+c>=v<<5&&(s=0,h+=l,l=0),h+d>=_&&!r)break;a.translate((s+(c>>1))/o,(h+(d>>1))/o),e.rotate&&a.rotate(e.rotate*m),a.fillText(e.text,0,0),e.padding&&!r&&(a.lineWidth=2*e.padding,a.strokeText(e.text,0,0)),a.restore(),e.width=c,e.height=d,e.xoff=s,e.yoff=h,e.x1=c>>1,e.y1=d>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,s+=c}if(!r)for(var T=a.getImageData(0,0,(v<<5)/o,_/o).data,A=[];--n>=0;)if(e=i[n],e.hasText){for(var c=e.width,C=c>>5,d=e.y1-e.y0,L=0;d*C>L;L++)A[L]=0;if(s=e.xoff,null==s)return;h=e.yoff;for(var P=0,M=-1,w=0;d>w;w++){for(var L=0;c>L;L++){var E=C*w+(L>>5),S=T[(h+w)*(v<<5)+(s+L)<<2]?1<<31-L%32:0;A[E]|=S,P|=S}P?M=w:(e.y0++,d--,w--,h++)}e.y1=e.y0+M,e.sprite=A.slice(0,(e.y1-e.y0)*C)}}}function h(t,e,i){i>>=5;for(var n,r=t.sprite,a=t.width>>5,o=t.x-(a<<4),s=127&o,h=32-s,l=t.y1-t.y0,u=(t.y+t.y0)*i+(o>>5),c=0;l>c;c++){n=0;for(var d=0;a>=d;d++)if((n<d?(n=r[c*a+d])>>>s:0))&e[u+d])return!0;u+=i}return!1}function l(t,e){var i=t[0],n=t[1];e.x+e.x0n.x&&(n.x=e.x+e.x1),e.y+e.y1>n.y&&(n.y=e.y+e.y1)}function u(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0e[0].y&&t.y+t.y0>5)/n,a=A[1]/n;i.clearRect(0,0,r,a);var o=new Image;o.src=k,o.onload=function(){i.drawImage(o,0,0,r,a);var t=i.getImageData(0,0,r,a).data;i.clearRect(0,0,r,a);for(var n=t.length,s=[],h=0;n>h;h+=4)s[h/4]=t[h+3]?0:1;e(s)}}function x(t){t.width=t.height=1;var e=t.getContext("2d"),i=D?1:Math.sqrt(e.getImageData(0,0,1,1).data.length>>2);return t.width=(v<<5)/i,t.height=_/i,e.fillStyle=e.strokeStyle="red",e.textAlign="center",{context:e,ratio:i}}function b(t,e){for(var i=t.x+t.x0,n=t.x+t.x1,r=t.y+t.y0,a=t.y+t.y1,o=0,s=e.length;s>o;o++){var h=e[o],l=h.x+h.x0,u=h.x+h.x1,c=h.y+h.y0,d=h.y+h.y1,f=Math.max(i,l),p=Math.min(n,u),g=Math.max(r,c),m=Math.min(a,d);if(p>f&&m>g)return!0}return!1}function T(t,e,i){for(var n,r,a,o=([{x:0,y:0},{x:A[0],y:A[1]}],e.x),s=e.y,l=Math.sqrt(A[0]*A[0]+A[1]*A[1]),c=O(A),d=N()<.5?1:-1,f=-d;(n=c(f+=d))&&(r=~~n[0],a=~~n[1],!(Math.min(Math.abs(r),Math.abs(a))>=l));)if(e.x=o+r,e.y=s+a,!(e.x+e.x0<0||e.y+e.y0<0||e.x+e.x1>A[0]||e.y+e.y1>A[1]))if(D){if(!i||!b(e,i))return!0}else if((!i&&!k||!h(e,t,A[0]))&&(!i||u(e,i))){for(var p,g=e.sprite,m=e.width>>5,v=A[0]>>5,_=e.x-(m<<4),y=127&_,x=32-y,T=e.y1-e.y0,C=(e.y+e.y0)*v+(_>>5),L=0;T>L;L++){p=0;for(var P=0;m>=P;P++)t[C+P]|=p<P?(p=g[L*m+P])>>>y:0);C+=v}return delete e.sprite,!0}return!1}var A=[256,256],C=e,L=i,P=r,M=n,w=n,E=a,S=o,O=c,k=null,D=!g.isSupportSVG(),R=null,B=[],I=1/0,G=null,N=Math.random,H={},z=f;return H.canvas=function(t){return arguments.length?(z=p(t),H):z},H.start=function(){function e(t){D?n(t):(G&&clearInterval(G),G=setInterval(i,0),i(t))}function i(t){function e(){return n.hasText&&T(a,n,o)?(c.push(n),o?l(o,n):o=[{x:n.x+n.x0,y:n.y+n.y0},{x:n.x+n.x1,y:n.y+n.y1}],n.x-=A[0]>>1,n.y-=A[1]>>1,!0):!1}a=t?t:a;for(var i=Date.now();Date.now()-i>1,n.y=A[1]*(N()+.5)>>1,s(r,n,f,u,D),e()||e()}u>=h&&(H.stop(),R())}function n(t){for(;++u>1,e.y=A[1]*(N()+.5)>>1;var i=g.getTextDimension(e.text,{fontSize:e.size+"px",fontFamily:e.fontFamily},!1);e.height=i.height,e.y0=-e.height>>1,e.y1=-e.y0,e.width=i.width,e.x0=-e.width>>1,e.x1=-e.x0,T(a,e,o)&&(c.push(e),o?o.push({x:e.x,y:e.y,x0:e.x0,y0:e.y0,x1:e.x1,y1:e.y1}):o=[{x:e.x,y:e.y,x0:e.x0,y0:e.y0,x1:e.x1,y1:e.y1}],e.x-=A[0]>>1,e.y-=A[1]>>1,e.x-=e.width>>1,e.y-=e.height>>1)}u>=h&&(H.stop(),R())}var r=x(z()),a=t()?m(r,e):D?[]:d((A[0]>>5)*A[1]),o=null,h=B.length,u=-1,c=[],f=B.map(function(t,e){return t.text=C.call(this,t,e),t.font=L.call(this,t,e),t.style=M.call(this,t,e),t.weight=w.call(this,t,e),t.rotate=E.call(this,t,e),t.size=~~P.call(this,t,e),t.padding=S.call(this,t,e),t}).sort(function(t,e){return e.size-t.size});return t()||e(),H},H.stop=function(){return G&&(clearInterval(G),G=null),H},H.timeInterval=function(t){return arguments.length?(I=null==t?1/0:t,H):I},H.words=function(t){return arguments.length?(B=t,H):B},H.path=function(t){return arguments.length?(k=t,H):k},H.renderFun=function(t){return arguments.length?(R=t,H):R},H.size=function(t){return arguments.length?(A=[+t[0],+t[1]],H):A},H.font=function(t){return arguments.length?(L=p(t),H):L},H.fontStyle=function(t){return arguments.length?(M=p(t),H):M},H.fontWeight=function(t){return arguments.length?(w=p(t),H):w},H.rotate=function(t){return arguments.length?(E=p(t),H):E},H.text=function(t){return arguments.length?(C=p(t),H):C},H.spiral=function(t){return arguments.length?(O=y[t]||t,H):O},H.fontSize=function(t){return arguments.length?(P=p(t),H):P},H.padding=function(t){return arguments.length?(S=p(t),H):S},H.random=function(t){return arguments.length?(N=t,H):N},H};var y}),define("vans/VanChartWordCloud",["require","./VanChart","./../Constants","./../utils/BaseUtils","../utils/Scale","./CloudLayout","./VanChartLibrary"],function(t){var e=t("./VanChart"),i=t("./../Constants"),n=t("./../utils/BaseUtils"),r=t("../utils/Scale"),a=t("./CloudLayout"),o=e.extend({vanChartType:"vanChartWordCloud",dealAxisZoom:function(t,e){var i=this,r=i.series,a=i._calculateZoomParas(t,e),o=a.shiftX,s=a.shiftY,h=a.scale;r.forEach(function(t){t.points.forEach(function(e){if(e.word){var i=e.word.x,n=e.word.y;e.word.x=(i+o)*h-o,e.word.y=(n+s)*h-s,e.word.size*=h,t._drawUpdatePoints(e)}})}),this.scale=h*n.pick(this.scale,1)},_getTranslate:function(){var t=this.bounds;return[t.x+t.width/2,t.y+t.height/2]},renderSeries:function(){function t(){e.group||(e.group=o.group().addTo(e.clipSeriesGroup),e.mouseOverGroup=o.group().addTo(e.clipSeriesGroup)),e.group.attr("transform",n.makeTranslate(e._getTranslate())),e.mouseOverGroup.attr("transform",n.makeTranslate(e._getTranslate()));var t=e.seriesOfType(i.WORD_CLOUD_CHART);if(t&&t.length){var r=t[0];e.registerInteractiveTarget(r,e.group),m.forEach(function(t){var e=t.word;e&&(t.labelDim=n.getTextDimension(e.text,{fontSize:e.size+"px",fontFamily:e.fontFamily},!1)),r.drawPoint(t)}),e.setTimeout("effect",function(){m.forEach(function(t){r.drawPointEffect(t)})},800)}e._updateSeriesState(),window.console&&console.log("done")}var e=this,o=e.renderer,s=e.options.plotOptions,h=e.bounds,l=h.width,u=h.height,c=s.minRotation,d=s.maxRotation,f=s.fontFamily,p=s.minFontSize,g=s.maxFontSize,m=e.pointsOfType(i.WORD_CLOUD_CHART).filter(function(t){return!t.isNull}).sort(function(t,e){return Math.abs(e.value)-Math.abs(t.value)});if(0!==m.length){p=n.hasDefined(p)?p:10,g=n.hasDefined(g)?g:e._calculateNiceMaxFontSize(l,u,m[0].name,f),e.minFontSize=Math.min(parseFloat(p),parseFloat(g)),e.maxFontSize=Math.max(parseFloat(p),parseFloat(g));var v=r.linear().domain([Math.abs(m[m.length-1].value),Math.abs(m[0].value)]).range([e.minFontSize,e.maxFontSize]),_=a().size([l,u]).words(m.filter(function(t){return t.visible}).map(function(t){var i={text:t.name,size:v(Math.abs(t.value))*e.scale,point:t,fontFamily:f};return t.word=i,i})).path(s.path).padding(5).rotate(function(){return c+Math.random()*(d-c)}).font(f).fontSize(function(t){return t.size}).renderFun(t);_.start()}},_consoleDone:function(){},_calculateNiceMaxFontSize:function(t,e,i,r){for(var a={min:0,max:100},o=function(){return a.max-a.min>2},s={fontSize:a.max+"px",fontFamily:r},h=n.getTextDimension(i,s,!1);o()&&(h.width>t||h.height>e);){var l=Math.ceil(a.min+(a.max-a.min)/2);s.fontSize=l+"px";var u=n.getTextDimension(i,s,!1);u.width>t||u.height>e?(a.max=l,h=u):a.min=l}return o()?a.max:a.min}});return t("./VanChartLibrary").register(i.WORD_CLOUD_CHART,o),o}),define("vans/TreeMapLayout",["require","../utils/BaseUtils"],function(t){function e(t,e){return m.rebind(t,e,"sort","children","value"),t.nodes=t,t.links=s,t}function i(t,e){for(var i=[t];null!=(t=i.pop());)if(e(t),(r=t.children)&&(n=r.length))for(var n,r;--n>=0;)i.push(r[n])}function n(t,e){for(var i=[t],n=[];null!=(t=i.pop());)if(n.push(t),(a=t.children)&&(r=a.length))for(var r,a,o=-1;++o=0;)e=r[a],e.z+=i,e.m+=i,i+=e.s+(n+=e.c)}function f(t,e,i){return t.a.parent===e.parent?t.a:i}function p(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function g(t,e){var i=t.x+e[3],n=t.y+e[0],r=t.dx-e[1]-e[3],a=t.dy-e[0]-e[2];return 0>r&&(i+=r/2,r=0),0>a&&(n+=a/2,a=0),{x:i,y:n,dx:r,dy:a}}var m=t("../utils/BaseUtils"),v=function(){function t(i){var r,a=[i],o=[];for(i.depth=0;null!=(r=a.pop());)if(o.push(r),(u=s.call(t,r,r.depth))&&(l=u.length)){for(var l,u,c;--l>=0;)a.push(c=u[l]),c.parent=r,c.depth=r.depth+1;h&&(r.value=0),r.children=u}else h&&(r.value=+h.call(t,r,r.depth)||0),delete r.children;return n(i,function(t){var i,n;e&&(i=t.children)&&i.sort(e),h&&(n=t.parent)&&(n.value+=t.value)}),o}var e=o,s=r,h=a;return t.sort=function(i){return arguments.length?(e=i,t):e},t.children=function(e){return arguments.length?(s=e,t):s},t.value=function(e){return arguments.length?(h=e,t):h},t.revalue=function(e){return h&&(i(e,function(t){t.children&&(t.value=0)}),n(e,function(e){var i;e.children||(e.value=+h.call(t,e,e.depth)||0),(i=e.parent)&&(i.value+=e.value)})),e},t},_=function(){function t(t,e){var s=g.call(this,t,e),h=s[0],l=r(h);if(n(l,a),l.parent.m=-l.z,i(l,o),y)i(h,p);else{var u=h,c=h,d=h;i(h,function(t){t.xc.x&&(c=t),t.depth>d.depth&&(d=t)});var f=m(u,c)/2-u.x,v=_[0]/(c.x+m(c,u)/2+f),x=_[1]/(d.depth||1);i(h,function(t){t.x=(t.x+f)*v,t.y=t.depth*x})}return s}function r(t){for(var e,i={A:null,children:[t]},n=[i];null!=(e=n.pop());)for(var r,a=e.children,o=0,s=a.length;s>o;++o)n.push((a[o]=r={_:a[o],parent:e,children:(r=a[o].children)&&r.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=r);return i.children[0]}function a(t){var e=t.children,i=t.parent.children,n=t.i?i[t.i-1]:null;if(e.length){d(t);var r=(e[0].z+e[e.length-1].z)/2;n?(t.z=n.z+m(t._,n._),t.m=t.z-r):t.z=r}else n&&(t.z=n.z+m(t._,n._));t.parent.A=s(t,n,t.parent.A||i[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t,e,i){if(e){for(var n,r=t,a=t,o=e,s=r.parent.children[0],h=r.m,d=a.m,p=o.m,g=s.m;o=u(o),r=l(r),o&&r;)s=l(s),a=u(a),a.a=t,n=o.z+p-r.z-h+m(o._,r._),n>0&&(c(f(o,t,i),t,n),h+=n,d+=n),p+=o.m,h+=r.m,g+=s.m,d+=a.m;o&&!u(a)&&(a.t=o,a.m+=p-d),r&&!l(s)&&(s.t=r,s.m+=h-g,i=t)}return i}function p(t){t.x*=_[0],t.y=t.depth*_[1]}var g=v().sort(null).value(null),m=h,_=[1,1],y=null;return t.separation=function(e){return arguments.length?(m=e,t):m},t.size=function(e){return arguments.length?(y=null==(_=e)?p:null,t):y?null:_},t.nodeSize=function(e){return arguments.length?(y=null==(_=e)?null:p,t):y?_:null},e(t,g)},y=function(){function t(t,e){for(var i,n,r=-1,a=t.length;++re?0:e),i.area=isNaN(n)||0>=n?0:n}function i(e){var n=e.children;if(n&&n.length){var o,s,h,l=d(e),u=[],c=n.slice(),f=1/0,p="slice"===m?l.dx:"dice"===m?l.dy:"slice-dice"===m?1&e.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(t(c,l.dx*l.dy/e.value),u.area=0;(h=c.length)>0;)u.push(o=c[h-1]),u.area+=o.area,"squarify"!==m||(s=r(u,p))<=f?(c.pop(),f=s):(u.area-=u.pop().area,a(u,p,l,!1),p=Math.min(l.dx,l.dy),u.length=u.area=0,f=1/0);u.length&&(a(u,p,l,!0),u.length=u.area=0),n.forEach(i)}}function n(e){var i=e.children;if(i&&i.length){var r,o=d(e),s=i.slice(),h=[];for(t(s,o.dx*o.dy/e.value),h.area=0;r=s.pop();)h.push(r),h.area+=r.area,null!=r.z&&(a(h,r.z?o.dx:o.dy,o,!s.length),h.length=h.area=0);i.forEach(n)}}function r(t,e){for(var i,n=t.area,r=0,a=1/0,o=-1,s=t.length;++oi&&(a=i),i>r&&(r=i));return n*=n,e*=e,n?Math.max(e*r*_/n,n/(e*a*_)):1/0}function a(t,e,i,n){var r,a=-1,o=t.length,s=i.x,h=i.y,u=e?l(t.area/e):0;if(e==i.dx){for((n||u>i.dy)&&(u=i.dy);++ai.dx)&&(u=i.dx);++a=i;)e[i]=m*r(n/a),n+=Math.pow(2,-i),i++;return e}function n(t){if(0===t)return[0];for(var e=[],i=0;t>=i;)e[i]=m*r(i/t),i++;return e}function r(t){var e=y(.5);return t>e?1-Math.sqrt((1-t)/2):Math.sqrt(t/2)}function a(t,e){return e-t.source.level}var o=t("./VanChart"),s=t("./../Constants"),h=t("./../utils/BaseUtils"),l=t("./../utils/BezierEasing"),u=t("./../utils/BoundsManager"),c=t("./TreeMapLayout").treeLayout,d=t("./ForceLayout"),f=t("../utils/Scale"),p=t("../utils/PathGenerator"),g=t("../dom/EventObject"),m=800,v=300,_=500,y=l.css["ease-in-out-quad"],x=l.css.swing,b=2,T=o.extend({vanChartType:"vanChartStructure",dealAxisZoom:function(t,e){var i=this,n=i.bounds,r=i._horizontalLayout(),a=i._radialLayout(),o=i._calculateZoomParas(t,e),s=o.shiftX,l=o.shiftY,u=o.scale;i.nodes.forEach(function(t){var e=t.posX+s,a=t.posY+l;e-=n.width/2,a-=n.height/2,t.posX=e*u+n.width/2-s,t.posY=a*u+n.height/2-l,t.x=r?t.posY:t.posX,t.y=r?t.posX:t.posY,t.radius*=u,t.labelPos=i._labelPos(t);var o=i._nodeAttrs(t),c={transform:h.makeTranslate(t.labelPos)},d="translate("+t.posX+","+t.posY+")";t.graphic.animate({duration:_,attr:{transform:d}}),t.graphic.nodeGraphic.animate({duration:_,attr:o}),t.textGraphic&&t.textGraphic.animate({duration:_,attr:c})}),i.edges.forEach(function(t){var e=a?i._forceLinkAttrs(t):{d:i._treeLinkPath(t)};t.linkGraphic.animate({duration:_,attr:e})}),i._forceDragEnabled()&&i.force.scale(u),this.scale=u*h.pick(this.scale,1)},renderSeries:function(){this.fire("animationStart");var t=this,e=t.renderer,i=t.bounds,n=t.seriesOfType(s.STRUCTURE_CHART);t.nodes&&n&&n.length&&(t.layout=t.options.plotOptions.layout,t.animation=t.options.plotOptions.animation,t.lineWidth=t.options.plotOptions.lineWidth,h.hasNotDefined(t.lineWidth)&&(t.lineWidth=null),t.linkGroup||(t.linkGroup=e.group().addTo(t.clipSeriesGroup),t.nodeGroup=e.group().addTo(t.clipSeriesGroup)),t.linkGroup.attr("transform",h.makeTranslate(i)),t.nodeGroup.attr("transform",h.makeTranslate(i)),t.groupTrans=null,t.registerInteractiveTarget(n[0],t.linkGroup),t._radialLayout()?t._forceRenderer():t._treeRenderer(),this.animationCount||this.fire("animationEnd"))},_animationStart:function(){this._animationStarted=!0,this.animationCount=0,this.series.forEach(function(t){t._removeDataLabels()})},_forceDragEnabled:function(){return this.animation&&this._radialLayout()&&this.options.plotOptions.force},_treeDragEnabled:function(){return this.animation&&!this._radialLayout()&&this.options.plotOptions.force},_verticalLayout:function(){return"vertical"===this.layout},_horizontalLayout:function(){return"horizontal"===this.layout},_radialLayout:function(){return"radial"===this.layout},_validPosition:function(t,e,i,n){return Math.min(n-i,Math.max(t,e))},_forceRenderer:function(){function t(t){return f*Math.pow(2,-t.source.level)}function n(){r(!0)}function r(t){var i=t?o.ancestor.x-p:0,n=t?o.ancestor.y-g:0;l.forEach(function(t){t.x-=i,t.y-=n,t.labelPos=o._labelPos(t),e(t,o.maxLevel);var r=t.radius,a=t.radius,l=t.radius,u=t.radius;t.hasValidDataLabel()&&(r=Math.max(r,t.x-t.labelPos.x),a=Math.max(a,t.labelPos.x+t.labelDim.width-t.x),l=Math.max(l,t.y-t.labelPos.y),u=Math.max(u,t.labelPos.y+t.labelDim.height-t.y)), - t.x=o._validPosition(t.x,r,a,s.width),t.y=o._validPosition(t.y,l,u,s.height),t.labelPos=o._labelPos(t),t.posX=t.x,t.posY=t.y,t.graphic&&t.graphic.attr("transform",h.makeTranslate(t)),t.textGraphic&&t.textGraphic.attr("transform",h.makeTranslate(t.labelPos))}),u.forEach(function(t){t.linkGraphic&&t.linkGraphic.attr("x1",t.source.x).attr("y1",t.source.y).attr("x2",t.target.x).attr("y2",t.target.y)})}function a(){r(!1)}var o=this,s=o.bounds,l=o.nodes,u=o.edges,c=o.maxLevel,f=Math.min(s.width,s.height)/4,p=s.width/2,g=s.height/2;o.force&&o.force.stop(),o.force=d().nodes(l).links(u).size([s.width,s.height]).linkDistance(t).gravity(0).charge(-150).eachTick(n).simulateForce();var m=i(c);o._rendererNodes(m),o._renderForceLink(m),o.force.eachTick(a)},_renderForceLink:function(t){var e=this,i=e.renderer;e.edges.forEach(function(n){n.linkGraphic&&n.linkGraphic.remove(),n.linkGraphic=null;var r=e._forceLinkAttrs(n),o=e.options.plotOptions,s={fill:"none",stroke:o.lineColor,"stroke-opacity":o.lineOpacity,"stroke-width":null==e.lineWidth?a(n,e.maxLevel):e.lineWidth};if(n.linkGraphic=i.line(r).style(s).addTo(e.linkGroup),n.linkGraphic.datum(n),e.animation){var h=t[n.source.level],l=t[n.target.level],u=h/m,c=l/m,d=y(u),p=y(c),g=f.linear().domain([0,1]).range([u,c]),v=f.linear().domain([d,p]).range([0,1]);n.linkGraphic.attr("x2",r.x1).attr("y2",r.y1).animate({delay:h,ease:"linear",duration:l-h,attrTween:{x2:function(){return function(t){return r.x1+(r.x2-r.x1)*v(y(g(t)))}},y2:function(){return function(t){return r.y1+(r.y2-r.y1)*v(y(g(t)))}}}})}})},_forceLinkAttrs:function(t){return{x1:t.source.x,x2:t.target.x,y1:t.source.y,y2:t.target.y}},_treeRenderer:function(){var t=this,e=t.bounds,i=t.maxLevel,r=t._verticalLayout()?[e.width,e.height]:[e.height,e.width],a=c().size(r),o=a.nodes(t.ancestor).reverse();t._adjustTreeSize(a,r,o,i);var s=n(i);t._rendererNodes(s),t._renderTreeLink()},_adjustTreeSize:function(t,i,n,r){var a=this,o=a._verticalLayout(),h=0,l=i[0],u=0,c=i[1];n.forEach(function(t){var i=e(t,r);i+=t.options.borderWidth||0;var n=t.options.dataLabels,a=t.labelDim;if(n&&n.enabled){var d=a.width,f=a.height,p=n.align==s.OUTSIDE;o?(h=Math.min(h,t.x-d/2),l=Math.max(l,t.x+d/2),u=Math.min(u,t.y-(p?f+b+i:f/2)),c=Math.max(c,t.y+(p?0:f/2))):(h=Math.min(h,t.x-(p?0:f/2)),l=Math.max(l,t.x+(p?i+b+f:f/2)),u=Math.min(u,t.y-d/2),c=Math.max(c,t.y+d/2))}h=Math.min(h,t.x-i),l=Math.max(l,t.x+i),u=Math.min(u,t.y-i),c=Math.max(c,t.y+i)}),h=-h,l-=i[0],u=-u,c-=i[1],i=[i[0]-h-l,i[1]-u-c],t.size(i),t.nodes(a.ancestor).reverse(),n.forEach(function(t){t.x=t.x+h,t.y=t.y+u})},_treeLinkPath:function(t){var e=this,i=e.maxLevel,n=e._verticalLayout()?function(t){return[t.x,t.y]}:function(t){return[t.y,t.x]};if(e.lineWidth){var r=p.diagonal().projection(n);return r(t)}var o=t.source,s=t.target,h=a(t,i),l=h/2,u=o.x,c=o.y,d=s.x,f=s.y,g=(c+f)/2,m=u-l,v=Math.min(d-.25,d-l+.5),_=u+l,y=Math.max(d+.25,d+l-.5),x=[{x:m,y:c},{x:m,y:g},{x:v,y:g},{x:v,y:f},{x:y,y:f},{x:y,y:g},{x:_,y:g},{x:_,y:c}];return x=x.map(n),"M"+x[0]+"C"+x[1]+" "+x[2]+" "+x[3]+"L"+x[4]+"C"+x[5]+" "+x[6]+" "+x[7]},_renderTreeLink:function(){var t,e=this,i=e.renderer,n=e.bounds,r=e.options.plotOptions;if(t=null==e.lineWidth?{fill:r.lineColor,"fill-opacity":r.lineOpacity}:{fill:"none",stroke:r.lineColor,"stroke-opacity":r.lineOpacity,"stroke-width":e.lineWidth},e.edges.forEach(function(n){n.linkGraphic&&n.linkGraphic.remove(),n.linkGraphic=null,n.linkGraphic=i.path().addTo(e.linkGroup),n.linkGraphic.attr("d",e._treeLinkPath(n)).style(t),n.linkGraphic.datum(n)}),e.animation&&h.isSupportSVG()){var a={x:0,y:0,width:n.width,height:n.height};e.linkGroup.clipG?i.updateClip(e.linkGroup.clipG,a):(e.linkGroup.clipG=i.createClip(a),i.clip(e.linkGroup,e.linkGroup.clipG));var o=e._verticalLayout()?"height":"width",s={};s[o]=n[o],e.linkGroup.clipG.rect.attr(o,0).animate({ease:y,duration:m,attr:s})}},_rendererNodes:function(t){var i=this,n=i.renderer,r=i.maxLevel;i.nodes.forEach(function(a){function o(){var t=new g(i.getEvents());return t.vanchart=i,t}function s(t,e){e&&i.registerInteractiveTarget(t,e)}a._events=null,a.graphic&&a.graphic.remove(),a.graphic=null;var h=(e(a,r),t[a.level]);a.posX=i._horizontalLayout()?a.y:a.x,a.posY=i._horizontalLayout()?a.x:a.y;var l=i._nodeAttrs(a),u=a.series.getStyle(a);a.graphic=n.group().attr("transform","translate("+a.posX+","+a.posY+")").addTo(i.nodeGroup),a.options.image?a.graphic.nodeGraphic=n.image(l).imageContent(a.options.image).addTo(a.graphic):a.graphic.nodeGraphic=n.circle(l).style(u).addTo(a.graphic),s(a,a.graphic),s(o(),a.graphic.nodeGraphic),a.graphic.attr("transform","translate("+a.posX+","+a.posY+") scale(0.01)").animate({delay:h,ease:x,duration:v/2,attr:{transform:"translate("+a.posX+","+a.posY+") scale(1.5)"},transition:{ease:x,duration:v/2,attr:{transform:"translate("+a.posX+","+a.posY+") scale(1)"}}}),i._forceDragEnabled()&&i.force.registerDragTarget(a,a.graphic)})},_nodeAttrs:function(t){var e=t.radius;return t.options.image?{preserveAspectRatio:"none",x:-e,y:-e,width:2*e,height:2*e}:{cx:0,cy:0,r:e}},_labelPos:function(t){if(t.labelDim){var e=t.options.dataLabels,i=t.labelDim,n=e.align==s.INSIDE;return n?{x:t.posX-i.width/2,y:t.posY-i.height/2}:{x:t.posX-i.width/2,y:t.posY-t.radius-b-i.height}}},_animationEnd:function(){this._renderLabels()},_renderLabels:function(){var t=new u,e=this;e.nodes&&e.nodes.forEach(function(i){i.textGraphic&&i.textGraphic.remove(),i.textGraphic=null;var n=i.options.dataLabels,r=i.series;if(n&&n.enabled){var a=e._labelPos(i);n.autoAdjust&&(a=r._calculateAutoLabelPos(i,a,e._horizontalLayout(),t)),a&&(i.labelPos=a,t.addBounds(h.makeBounds(i.labelPos,i.labelDim))),r._createTextGraphic(i)}})},_onPanStart:function(t){var e=this,i=e.vanchart;i.groupTrans=i.groupTrans||i.bounds,i.currentPoint=t.containerPoint},_onPanMove:function(t){var e=this,i=e.vanchart,n=t.containerPoint.x-i.currentPoint.x,r=t.containerPoint.y-i.currentPoint.y;i.groupTrans.x+=n,i.groupTrans.y+=r,i.currentPoint=t.containerPoint;var a=h.makeTranslate(i.groupTrans);i.linkGroup.attr("transform",a),i.nodeGroup.attr("transform",a),i.ancestor.series.textGraphicGroup&&i.ancestor.series.textGraphicGroup.attr("transform",a)},_onPanEnd:function(t){var e=this,i=e.vanchart;i.handler.panTarget=null},getEvents:function(){var t=this;return t._treeDragEnabled()?{panstart:t._onPanStart,panmove:t._onPanMove,panend:t._onPanEnd}:{}}});return t("./VanChartLibrary").register(s.STRUCTURE_CHART,T),T}),define("locale/localeText",["require","../utils/BaseUtils"],function(t){function e(t){return r[t]}var i=t("../utils/BaseUtils").extend,n="en",r={startTime:"start ",finishTime:"finish ",duration:"duration ",progress:"progress "};return e.setLocale=function(t){i(r,t),n=t._locale},e.getTextMap=function(){return r},e.normalizeLocale=function(t){return t?t.toLowerCase().replace("_","-"):t},e}),define("chart/Point",["require","../utils/QueryUtils","../utils/BaseUtils","../utils/ColorUtils","../Constants","../ComponentLibrary","../dom/Evented"],function(t){var e=(t("../utils/QueryUtils"),t("../utils/BaseUtils")),i=t("../utils/ColorUtils"),n=t("../Constants"),r=t("../ComponentLibrary"),a=t("../dom/Evented"),o="rgb(138, 138, 138)",s=a.extend({vanChartType:"point",initialize:function(t,e){this.series=e,this.refresh(t||{})},refresh:function(t){var i=this.series,a=i.vanchart;this.originalColor=t.color,this.originalMarkerFillColor=t.marker&&t.marker.fillColor,t=this.options=e.createOptions(t,[i.options]);var o=i.isSeriesAccumulated(),s=i.type==n.BAR_CHART?t.y:t.x,h=i.name;if(this.category=o?h:s,this.seriesName=o?s:h,this.value=this.getTargetValue(),this.name=e.pick(this.options.x,this.options.name),this.x=t.x,this.y=t.y,this.size=t.size,this.visible=!0,this.isNull=i.isNullValue(this),this.points=o?i.points:a.registerPointsPara(this),!i.options.large){if(t.drilldown&&t.drilldown.geo){var l=r.get(r.GEO_COMPONENT);this.geo=new l(t.drilldown.geo,r.GEO_COMPONENT,a)}e.convertToREMUseDefault16PX(t.dataLabels&&t.dataLabels.style),e.convertToREMUseDefault16PX(t.tooltip&&t.tooltip.style),this.jsonHyperlink=t.jsonHyperlink,this.drillUpLink=t.drillUpLink,this.hyperlink=t.hyperlink}},refreshPointColor:function(){var t=this,a=t.options,s=t.series,h=s.vanchart;if(!s.isTreeSeries()){var l,u=a.opacity,c=a.opacity;l=s.type==n.STRUCTURE_CHART?this.level:s.isSeriesAccumulated()?e.pick(a.x,a.name):s.name;var d=h.getDefaultSeriesColor(l),f=d;if(a.marker&&(a.marker=e.clone(a.marker),f=a.marker.fillColor||f),s.type!==n.LINE_MAP||!s.options.large){var p=h.getComponent(r.RANGE_LEGEND_COMPONENT);p&&(d=p.getColorWithSize(this.getTargetValue()),f=d,this.visible=!!d)}if(f=s.originalColor||f,f=s.originalMarkerFillColor||f,d=this.originalColor||s.originalColor||d,f=this.originalColor||f,f=this.originalMarkerFillColor||f,s.type!=n.BUBBLE_CHART&&s.type!=n.FORCE_BUBBLE_CHART||p||(t.getTargetValue()<0&&t.options.displayNegative?d=o:t.getTargetValue()<0&&(d=null)),d){var g=i.getStandardColorAndOpacity(d,u);d=g.hex,u=g.alpha}if(f){var g=i.getStandardColorAndOpacity(f,c);f=g.hex,c=g.alpha}var m=a.marker;m&&(m.fillColor=f,m.fillColorOpacity=c,m.radius=isNaN(m.radius)?4.5:m.radius,m.symbol=m.symbol||s.marker&&s.marker.symbol||""),d&&(this.color=d,this.opacity=u,this.mouseOverColor=this.options.mouseOverColor||i.getHighLightColor(d),this.clickColor=i.getClickColor(d),this.clickOpacity=.95*u),this.borderColor=this.options.borderColor,this.borderOpacity=this.options.borderOpacity}},getTargetValue:function(){var t=this.options[this.series.getTargetKey()];return isNaN(+t)?this.series.isNullValue(this)?0:t:+t},getLatLng:function(t){var e=this.options.lnglat;if(!e){var i=this.series.vanchart.getCurrentGeo();t||(t=i.getFeaturesByName(this.name,this.series.type),t=t&&t[0]),t&&(e=i.getDataPointLngLat(this,t))}return e?[e[1],e[0]]:null}});return s.include({_onPointMouseOver:function(t){var e=this,i=e.options,n=this.series,r=n.vanchart,a=(r.renderer,r.hoverPoint),o=r.hoverSeries,s=r.hoverPoints,h=r.getSharedAxis();if(a!==e){if(n.isTreeSeries())return n.vanchart.showTooltip(e,t),void n.fire("pointMouseOver",e);if(a&&a.fire("mouseout",t),i.tooltip&&i.tooltip.shared&&e.points&&h&&e.series.supportTooltipShared()){var l=r.getValidPointsPara(e.category),u=l.reduce(function(t,e){return e.series._onPointMouseOver.call(e,e),t?e.getTargetValue()>t.getTargetValue()?e:t:e},0);s&&s.length&&s[0]!=l[0]&&s[0]._onPointMouseOut.call(s[0],t),h&&l.length&&h.drawHighlightBackground(l),n.vanchart.showTooltip(u,t,r.getSharedPoints(e.category)[0]),r.hoverPoints=l}else n.vanchart.showTooltip(e,t),n.fire("pointMouseOver",e),o!=e.series&&(o&&o.fire("mouseout",t),e.series.fire("mouseover",t)),r.hoverSeries=e.series,r.hoverPoint=e}},_onPointMouseMove:function(t){var e=this.series.vanchart;e.showTooltip(e.hoverPoint,t)},_onPointMouseOut:function(t){var e=this,i=e.options.tooltip,n=this.series,r=n.vanchart.getSharedAxis();return n.isTreeSeries()?void n.fire("pointMouseOut",e):(i&&i.shared&&e.points&&e.points.length&&r?e.points.forEach(function(e){e.graphic&&e.series.fire("pointMouseOut",e),e.series.fire("mouseout",t)}):e.series.fire("pointMouseOut",e),void n.vanchart.hideTooltip())},_onPointTap:function(t){var i=this,n=(i.options,this.series),r=n.vanchart,a=r.isMap()?r.isMapPointVisible(i):i.isVisible();if(a){n.isTreeSeries()&&n.onPointTap(i);var o=t.srcEvent;o=o.touches?o.touches.length?o.touches[0]:o.changedTouches[0]:o,i.onClick(o),e.hasTouch()&&i.fire("mouseover",t),r.drillDown&&r.drillDown(i)}},hasValidDataLabel:function(){var t=this,e=t.labelPos&&!isNaN(t.labelPos.x)&&!isNaN(t.labelPos.y)&&t.options.dataLabels&&t.options.dataLabels.enabled;return t.series.visible&&!t.isNull&&t.visible&&e},clearPointEffect:function(){var t=this;clearInterval(t.effectInterval),t.effectGraphic&&t.effectGraphic.remove(),t.effectGraphic=null},isVisible:function(){var t=this;return t&&t.visible&&t.series.visible&&!t.isNull},getEffectTime:function(){var t=this;return e.isSupportSVG()&&t.isVisible()&&t.options.effect&&t.options.effect.enabled?t.series._getEffectTime(t):0},hasEffect:function(){return this.getEffectTime()>0},autoLabelColor:function(t){var e=this,i=e.options,r=e.series,t=t||i.dataLabels,a=t.align,o=a==n.TOP||a==n.BOTTOM||a==n.OUTSIDE;return r.type==n.BUBBLE_CHART||r.type==n.TREEMAP_CHART||r.type==n.FORCE_BUBBLE_CHART||r.columnType?o=!1:(r.type==n.SCATTER_CHART||r.type==n.POINT_MAP)&&(o=!0),o?i.marker&&i.marker.fillColor||e.color:"#ffffff"},_onPointPress:function(t){var e=this,i=this.series,n=i.vanchart,r=n.hoverPoint;r&&i.onPointPress.call(e,t)},_onPointPressUp:function(t){var e=this,i=this.series,n=i.vanchart,r=n.hoverPoint;r&&(i.onPointPressUp.call(e,t),r._onPointTap(t))},onClick:function(t){var i=this,n=i.options,r=n.click||n.onClick;r&&e.getFormatterFunction(r).call(i,t)},getEvents:function(){return{mouseover:this._onPointMouseOver,mouseout:this._onPointMouseOut,mousemove:this._onPointMouseMove,tap:this._onPointTap,press:this._onPointPress,pressup:this._onPointPressUp}},remove:function(){this.visible=!1,this.graphic&&this.graphic.remove(),this.textGraphic&&this.textGraphic.remove(),this.leadLine&&this.leadLine.remove(),this.moreLabelG&&this.moreLabelG.remove(),this.graphic=this.textGraphic=this.moreLabelG=this.leadLine=null},clearChild:function(){var t=this;if(t.parent){var i=t.parent.children;i&&i.splice(e.indexOf(i,t),1)}if(t.children)for(var n=t.children.length;--n>-1;)t.children[n].clearChild();t.remove()},getTooltipRect:function(){var t=this.series.vanchart.getComponent(r.TOOLTIP_COMPONENT);return t?t._tooltipRect:void 0}}),s}),define("component/FormattedText",["require","../utils/BaseUtils","../Constants","../ComponentLibrary"],function(t){function e(t,e,i){var n=t.options,r=h.format(n.x,e.XFormat),a=h.format(n.y,e.YFormat),o="-"==n.size?"-":h.format(n.size,e.sizeFormat),s="";return(-1!=i.indexOf(g)||-1!=i.indexOf(m))&&(s="(",-1!=i.indexOf(g)?(s+=r,-1!=i.indexOf(m)&&(s=s+","+a),s+=")"):(s+=a,s+=")"),s+=l.BLANK_VALUE_PERCENTAGE),-1!=i.indexOf(_)&&"-"!=o&&(s+=o),s}function i(t,e){var i=t&&(t.nameLabelContent||t.valueLabelContent);if(i&&"funnel"==e.series.type)return n(e,t);var r=0,a=0;if(t&&t.length){for(var o=0,s=t.length;s>o;o++){var h=t[o].dim;r=Math.max(r,h.width),a+=h.height}a+=(s-1)*D}return{width:r,height:a}}function n(t,e){var i=0,n=0,r=0;if(e.nameLabelContent){var a=e.nameLabelContent.dim;i+=a.width,n=Math.max(n,a.height)}if(e.valueLabelContent){var a=e.valueLabelContent.dim;i+=a.width,n=Math.max(n,a.height)}if(e.nameLabelContent&&e.valueLabelContent){var o=t.series,s=o.vanchart,h=s.bounds;r=h.width*c,i+=r}return{width:i,height:n,nameValueGap:r}}function r(t,e){if(!t)return"";if("object"==typeof t){var i="",n=t.identifier,r=h.format(h.pick(e.category,""),t.categoryFormat),a=h.format(h.pick(e.seriesName,""),t.seriesFormat);if((-1!=n.indexOf(p)||-1!=n.indexOf(f))&&(i+=-1!=n.indexOf(p)&&-1!=n.indexOf(f)?r+" "+a:-1!=n.indexOf(p)?r:a),!e.isNull&&-1!=n.indexOf(y)||-1!=n.indexOf(x)){h.isEmpty(i)||(i+=":");var o=h.format(e[e.series.getTargetKey()],t.valueFormat),s=h.format(e.percentage,t.percentFormat);i+=-1!=n.indexOf(y)&&-1!=n.indexOf(x)?o+" "+s:-1!=n.indexOf(y)?o:s}return i}return h.getFormatterFunction(t).call(e)}function a(t,e){if(!t)return[];if("object"==typeof t){var i=[],n=t.identifier,r=h.format(e.category,t.categoryFormat),a=h.format(e.seriesName,t.seriesFormat),o=h.format(e.value,t.valueFormat),s=h.format(e.percentage,t.percentFormat);return-1!=n.indexOf(p)&&i.push(r),-1!=n.indexOf(f)&&i.push(a),-1!=n.indexOf(y)&&i.push(o),-1!=n.indexOf(x)&&i.push(s),i}return[h.getFormatterFunction(t).call(e)]}function o(){function t(t,e){return e=e||t&&t.options&&t.options.dataLabels,e&&e.enabled&&e.formatter&&t.isVisible()}function n(e,n){if(!t(e,n))return void(e.labelDim={width:0,height:0});n=n||e.options.dataLabels;var r=n.formatter;e.labelContent="object"==typeof r?s(e,n):a(e,n),e.labelDim=i(e.labelContent,e)}function r(t,e){return e=e||t.options.dataLabels,e.style||h.convertToREMUseDefault16PX({fontSize:"0.75rem",fontFamily:"Verdana",textShadow:"1px 1px 1px rgba(0,0,0,0.15)",color:t.autoLabelColor(e)})}function a(t,e){e=e||t.options.dataLabels;var i=e.formatter,n="";try{n=h.getFormatterFunction(i).call(t)}catch(a){}var o=e.style||r(t),s=h.getTextDimension(n,o,e.useHtml);return e.useHtml&&(s.width=isNaN(parseFloat(e.labelWidth))?s.width:parseFloat(e.labelWidth),s.height=isNaN(parseFloat(e.labelHeight))?s.height:parseFloat(e.labelHeight)),[{text:n,style:o,dim:s}]}function o(t,e){return e=e||t.options.dataLabels,e.style||h.convertToREMUseDefault16PX({color:t.autoLabelColor(e),fontSize:"0.75rem",fontFamily:"Verdana",textShadow:"1px 1px 1px rgba(0,0,0, 0.15)",fontWeight:"bold"})}function s(t,e){var i=t.series,n=i.type;return i.vanchart.isMap()?b(t,e):n==l.BUBBLE_CHART||n==l.SCATTER_CHART?u(t):n==l.FUNNEL_CHART?c(t):d(t,e)}function u(t){var i=t.options.dataLabels,n=i.formatter,a=n.identifier,s=[];if(-1!=a.indexOf(f)){var l=h.format(t.seriesName,n.seriesFormat),u=i.style||o(t),c=h.getTextDimension(l,u,i.useHtml);s.push({text:l,style:u,dim:c})}if(-1!=a.indexOf(g)||-1!=a.indexOf(m)||-1!=a.indexOf(_)){var d=e(t,n,a),p=i.style||r(t),v=h.getTextDimension(d,p,i.useHtml);s.push({text:d,style:p,dim:v})}return s}function c(t){var e=t.options.dataLabels,i=e.formatter,n=i.identifier;if(e.align==l.INSIDE)return d(t);var a=t.series,s=[];if(-1!=n.indexOf(v)){var u=h.format(t.name,i.nameFormat),c=o(t),f=h.getTextDimension(u,c,e.useHtml);s.nameLabelContent={text:u,style:c,dim:f},a.maxNameLabelWidth||(a.maxNameLabelWidth=0),a.maxNameLabelWidth=Math.max(a.maxNameLabelWidth,f.width)}if(-1!=n.indexOf(y)||-1!=n.indexOf(x)){var p="";-1!=n.indexOf(y)&&(p+=h.format(t.value,i.valueFormat),-1!=n.indexOf(x)&&(p+=l.BLANK_VALUE_PERCENTAGE)),-1!=n.indexOf(x)&&(p+=h.format(t.percentage,i.percentFormat));var g=r(t),m=h.getTextDimension(p,g,e.useHtml);s.valueLabelContent={text:p,style:g,dim:m},a.maxValueLabelWidth||(a.maxValueLabelWidth=0),a.maxValueLabelWidth=Math.max(a.maxValueLabelWidth,m.width)}return s}function d(t,e){function i(t){return t.map(n).filter(a)}function n(e){if(-1!==d.indexOf(e)){var i=E[e][0],n=E[e][1],r=u._formatValue?u._formatValue(t,i):t[i],a=c[n]||u._getLabelFormatFn&&u._getLabelFormatFn(i),o=h.format(r,a);return u._postLabel?u._postLabel(o,i):o}return null}function a(t){return null!==t}function s(i,n,r){if(n.length){var a=n.join(l.BLANK_VALUE_PERCENTAGE),o=r(t,e),s=h.getTextDimension(a,o,e.useHtml);i.push({text:a,style:o,dim:s})}}e=e||t.options.dataLabels;var u=t.series,c=e.formatter,d=c.identifier,g=[v,p,f],m=[y,x,w],_=o,b=r;u.type===l.TREEMAP_CHART?(m.unshift(g.shift()),b=_):u.type===l.GANTT_CHART&&(g=[],m=[A,f,C,L,P,M]);var T=[];return s(T,i(g),_),s(T,i(m),b),T}function b(t,e){if(!t||t.isNull||!e||!e.enabled)return{};var i=e.formatter,n=e.useHtml,a=t.series.type,s=(a==l.SCATTER_CHART||a==l.POINT_MAP?l.OUTSIDE:l.INSIDE,[]);if("object"==typeof i){var u=i.identifier;if(-1!=u.indexOf(v)){var c=h.format(t.name,i.nameFormat),d=o(t,e),p=h.getTextDimension(c,d,n);s.push({text:c,style:d,dim:p})}var g="",m=-1!=u.indexOf(f),b=-1!=u.indexOf(y)||-1!=u.indexOf(_),T=-1!=u.indexOf(x),A=h.format(t.seriesName,i.seriesFormat),C=h.format(t.getTargetValue(),i.valueFormat),L=h.format(t.percentage,i.percentFormat);if(m&&(g+=A,(b||T)&&(g+=":")),b&&(g+=C,T&&(g+=" ")),T&&(g+=L),g){var d=r(t,e),p=h.getTextDimension(g,d,n);s.push({text:g,style:d,dim:p})}}return s}return n}function s(){function t(t){var e=t.options.tooltip;return e&&e.enabled&&t.isVisible()}function i(e){var i=e.options.tooltip;return t(e)&&i.shared}function n(e){var i=e.series,n=i.type,a=e.options.tooltip,o=a.formatter;if(!t(e)&&!a.shared)return"";if("object"!=typeof o)try{return h.getFormatterFunction(o).call(e)}catch(u){return""}var d;switch(n){case l.BUBBLE_CHART:case l.SCATTER_CHART:d=i.vanchart.isMap()?D:r;break;case l.TREEMAP_CHART:d=s;break;case l.GANTT_CHART:d=c;break;case l.LINE_MAP:d=I;break;default:d=D}return d(e,a)}function r(t,e){var i=(t.series,e.formatter),n=e.style,r=i.identifier,s="";return s+=a(t,r,n,i),s+=o(t,r,n,i)}function a(t,e,i,n){var r="";if(-1!=e.indexOf(f)){var a=h.format(t.seriesName,n.seriesFormat);r+=(i?"":O)+a+"",r+="
      "}return r}function o(t,i,n,r){var a="";if(-1!=i.indexOf(g)||-1!=i.indexOf(m)||-1!=i.indexOf(_)){var o=e(t,r,i);a+=(n?"":k)+o+""}return a}function s(t,e){var i=e.style,n=e.formatter,r=n.identifier,a="";if(e.shared){if(-1!=r.indexOf(v)){for(var o,s=t,h=[t.name];(o=s.parent)&&o.depth;)s=o,h.unshift(o.name);a+=(i?"":S)+h.join(" / ")+"
      "}a+=B(t,r,i,n)}else a+=R(t,r,i,n),a+=B(t,r,i,n);return a}function c(t,e){function i(e){if(-1!==a.indexOf(e)){var i=E[e][0],n=E[e][1],s=o._formatValue?o._formatValue(t,i):t[i],l=r[n]||o._getTooltipFormatFn&&o._getTooltipFormatFn(i),u=h.format(s,l);return o._postTooltip?o._postTooltip(u,i):u}return null}var n=e.style,r=e.formatter,a=r.identifier,o=t.series,s=[A,f,C,L,P,M],l="";return s.map(function(t){var e=i(t);null!=e&&(l+=(n?"":O)+e+"
      ")}),l}function D(t,e){var n=t.series,r=n.vanchart,a=t.points,o=e.formatter,s=o.identifier,h=e.style,l="";if(e.shared&&a&&a.length){var c=r.isMap(),f=r.getComponent(u.RANGE_LEGEND_COMPONENT);l+=R(t,s,h,o),a.filter(i).forEach(function(t){var e=c&&f?a[0].color:t.color,i=t.options.tooltip;l+='',l+=B(t,s,h,i.formatter),l+="
      "})}else l+=R(t,s,h,o),l+=B(t,s,h,o);return l}function R(t,e,i,n){var r="",a=t.series.type;return a===l.MULTIPIE_CHART?-1!=e.indexOf(f)&&(r=h.format(t.seriesName,n.seriesFormat)):(-1!=e.indexOf(p)&&(r=h.format(t.category,n.categoryFormat)),-1!=e.indexOf(v)&&a!==l.WORD_CLOUD_CHART&&(r=h.format(t.name,n.nameFormat))),r&&(r=(i?"":S)+r+"",r+="
      "),r}function B(t,e,i,n){var r,a="",o=t.series.type,s=h.format(t.value,n.valueFormat),u=h.format(t.percentage,n.percentFormat),c=h.format(t.level,n.levelFormat),d={};d[_]=s,d[y]=s,d[x]=u,d[w]=c,o===l.MULTIPIE_CHART||o===l.WORD_CLOUD_CHART?-1!=e.indexOf(v)&&(r=h.format(t.name,n.nameFormat)):-1!=e.indexOf(f)&&(r=h.format(t.seriesName,n.seriesFormat));var p=[y,x,w];(o==l.BUBBLE_CHART||o==l.SCATTER_CHART)&&(p=[_,x,w]);var g=p.filter(function(t){return-1!==e.indexOf(t)&&!h.isEmpty(d[t])}).map(function(t){return d[t]}).join(" ");return r&&g&&(r+=":"),r&&(a+=(i?"":O)+r+""),g&&(a+=(i?"":k)+g+""),a}function I(t,e){if(e&&e.enabled){var i=e.formatter,n="";if("object"==typeof i){var r=e.style,a=i.identifier;n+=G(t,a,r,i),n+=N(t,a,r,i)}else n=h.getFormatterFunction(i).call(t);return n}}function G(t,e,i,n){var r="";if(-1!=e.indexOf(f)){var a=h.format(t.seriesName,n.seriesFormat);r+=(i?"":O)+a+"",r+="
      "}return r}function N(t,e,i,n){var r="",a=function(t){return-1!==e.indexOf(t)},o=[],s=t.options;a(b)&&s.from.name&&o.push(s.from.name),a(T)&&s.to.name&&o.push(s.to.name),o.length&&(r+=(i?"":O)+o.join("\u2192")+" ");var l=[];if(a(y)){var u=h.format(t[t.series.getTargetKey()],n.valueFormat);u&&l.push(u)}if(a(x)){var c=h.format(t.percentage,n.percentFormat);c&&l.push(c)}return l.length&&(r+=(i?"":k)+l.join("  ")+""),r}return n}var h=t("../utils/BaseUtils"),l=t("../Constants"),u=t("../ComponentLibrary"),c=.02,d=h.isSupportSVG(),f="{SERIES}",p="{CATEGORY}",g="{X}",m="{Y}",v="{NAME}",_="{SIZE}",y="{VALUE}",x="{PERCENT}",b="{FROM.NAME}",T="{TO.NAME}",A="{PROCESSES}",C="{STARTTIME}",L="{FINISHTIME}",P="{DURATION}",M="{PROGRESS}",w="{LEVEL}",E={};["name","category","value","processes","startTime","finishTime","duration","progress","level"].map(function(t){var e="{"+t.toUpperCase()+"}";E[e]=[t,t+"Format"]}),E[f]=["seriesName","seriesFormat"],E[x]=["percentage","percentFormat"];var S='',O='',k='',D=2;return{calculateSingleLineLabelContent:r,createMultiLineLabelContent:a,calculateTextDim:i,dataLabelGenerator:o(),tooltipGenerator:s()}}),define("chart/Series",["require","../utils/BaseUtils","../utils/QueryUtils","../utils/ColorUtils","../Constants","./Point","../dom/Evented","../utils/BezierEasing","../utils/PathGenerator","../ComponentLibrary","../vector/CanvasRenderer","../component/FormattedText","../utils/Timer"],function(t){var e=t("../utils/BaseUtils"),i=t("../utils/QueryUtils"),n=t("../utils/ColorUtils"),r=t("../Constants"),a=t("./Point"),o=t("../dom/Evented"),s=t("../utils/BezierEasing"),h=t("../utils/PathGenerator"),l=(t("../ComponentLibrary"),t("../vector/CanvasRenderer")),u=t("../component/FormattedText"),c=(t("../utils/Timer"),250),d=500,f=250,p=1e3,g=600,m="quad-out",v=o.extend({initialize:function(t,e,i){this.vanchart=e,this.points=[],this.refresh(t,i)},refresh:function(t,a){var o=this.vanchart,s=t.type||o.options.chartType,h=o.options.plotOptions,l=[t,h[s],h];this.minSize=i.queryList(l,"minSize"),this.maxSize=i.queryList(l,"maxSize"),this.originalColor=t.color,this.originalMarkerFillColor=t.marker&&t.marker.fillColor,this.interpolate=this._getSeriesInterpolate(l),t=this.options=e.createOptions(t,[h[s],h]),this.type=s,this.stack=t.stack,this.index=a,this.className="vancharts-series-"+a,this.name=e.pick(t.name,"Series"+a),this.visible=e.pick(t.visible,!0),this.state=this.visible?r.STATE_SHOW:r.STATE_DROPPED;var u;if(!this.isSeriesAccumulated()&&this.type!=r.STRUCTURE_CHART){var c=this.options.color||o.getDefaultSeriesColor(this.name),d=t.opacity;u=n.getStandardColorAndOpacity(c,d),c=u.hex,d=u.alpha;var f=this.options.fillColor;f=f===!0?c:f;var p=+t.fillColorOpacity;p=isNaN(p)?this._getDefaultFillColorOpacity():p,u=n.getStandardColorAndOpacity(f,p),f=u.hex,p=u.alpha;var g=t.marker=e.clone(t.marker);if(e.hasDefined(g)){var m=this._getMarkerColorAlpha();g.fillColor=m.markerColor,g.fillColorOpacity=m.markerOpacity,this.type==r.SCATTER_CHART&&e.isNullMarker(g)&&(t.marker.symbol=e.getDefaultMarkerSymbol(a))}this.color=c,this.opacity=d,this.fillColor=f,this.fillColorOpacity=p,this.marker=g}if(e.hasDefined(this.options.startAngle)){var v=this.options.startAngle,_=this.options.endAngle;v>_?v-=360:v===_&&(_=v+360),this.startAngle=e.toRadian(v),this.endAngle=e.toRadian(_)}if(this._bindAxis(),this._loadData)var y=this._loadData(t.data);else var y=t.data||[];return this.isTreeSeries()||this._dealData(y),this},_dealData:function(t){var e=[],i=this,n={},r=this.vanchart,o=this.type;this.points.forEach(function(t){var e=i._getPointKey(t);n[e]=n[e]||[],n[e].push(t)});for(var s=0,h=t.length;h>s;s++){var l=i._getPointKey(t[s]),u=n[l],c=null;if(u){for(var d=0,f=u.length;f>d;d++)if(c=u[d]){u[d]=null;break}c&&(c._lastValue=c.options[i.getTargetKey()],c.drillSeries=null,c.geo=null,c.moreLabelG&&c.moreLabelG.remove(),c.moreLabelG=null,c.refresh(t[s]))}c||(c=new a(t[s],this)),e.push(c)}for(var l in n)n[l]&&n[l].forEach(function(t){r.removePointGraphics(t,o)});this.options.sort&&(e=e.filter(function(t){return!t.isNull}).sort(function(t,e){return Math.abs(e.getTargetValue())-Math.abs(t.getTargetValue())})),this.points=e},_getPointKey:function(t){return t.x},_getDefaultFillColorOpacity:function(){return 1},getStackAxis:function(){return this[this.getTargetKey()+"Axis"]},isNullValue:function(t){var i=t.options[t.series.getTargetKey()];return"-"==i||e.hasNotDefined(i)},_getMarkerColorAlpha:function(){var t=this.vanchart,i=this.options,r=t.options.plotOptions,a=r[this.type],o=a&&a.marker||r.marker,s=i.opacity,h=i.marker,l=h&&h.fillColor||this.options.color||o&&o.fillColor||t.getDefaultSeriesColor(this.name),u=s;if(e.hasDefined(l)){var c=n.getStandardColorAndOpacity(l,s);l=c.hex,u=c.alpha}return{markerColor:l,markerOpacity:u}},_bindAxis:function(){var t=this,e=t.options,i=t.vanchart;t._getAxisTypes().forEach(function(n){if(i[n]){var r=i[n](e[n]);r&&(r.series.push(t),t[n]=r)}})},supportTooltipShared:function(){return this.xAxis||this.yAxis||this.angleAxis},_getAxisTypes:function(){return["xAxis","yAxis"]},getTargetKey:function(){return"y"},getBaseAxisType:function(){return"xAxis"},_calculateAutoLabelPos:function(t,i,n,r){function a(t,n,a,o){for(var s=t;0>a?s>n:n>s;s+=a){var h={x:i.x,y:s};if(!r.isOverlapped(e.makeBounds(h,o)))return h}}function o(t,n,a,o){for(var s=t;0>a?s>n:n>s;s+=a){var h={x:s,y:i.y};if(!r.isOverlapped(e.makeBounds(h,o)))return h}}var s,h=3,l=t.labelDim,u=this.vanchart.bounds;if(n){var c,d;c=Math.max(0,i.y),d=u.height-l.height,s=a(c,d,h,l),s||(d=0,c=Math.min(i.y,u.height-l.height),s=a(c,d,-h,l))}else{var f,p;f=Math.max(0,i.x),p=u.width-l.width,s=o(f,p,h,l),s||(p=0,f=Math.min(i.x,u.width-l.width),s=o(f,p,-h,l))}return s?s:i},_getArcPoint:function(t,e){return[this._dealWithFloat(t*Math.sin(e)),this._dealWithFloat(-t*Math.cos(e))]},_getNormalTrendLineXYValues:function(t){var e=[],i=[],n=this.vanchart.isInverted()?"posY":"posX",a=this.vanchart.isInverted()?r.LEFT:r.BOTTOM;return t.points.sort(function(t,e){return t[n]-e[n]}),t.points.forEach(function(t){t.isNull||(e.push(t.posX),i.push(t.posY))}),[e,i,a]},_getSeriesInterpolate:function(t){var e=i.queryList(t,"step"),n=i.queryList(t,"curve"),r=t[0],a="linear";return r.step||e&&!r.curve?a="step-after":(r.curve||n&&!r.step)&&(a="cardinal"),a},_getAngle:function(t,e){return e=e||{x:0,y:0},Math.atan2(t.y-e.y,t.x-e.x)/(Math.PI/180)},_getBackgroundColor:function(){var t=this.vanchart.options,e="string"==typeof t.plotBackgroundColor,i="string"==typeof t.backgroundColor,r=e?t.plotBackgroundColor:i?t.backgroundColor:"white";return n.colorToHex(r)},getSeryTotalValue:function(){var t=0;return this.points.forEach(function(e){t+=e.getTargetValue()}),t},getLegendKey:function(t){return this.isSeriesAccumulated()?t.name:this.name},calculateLabelInfo:function(t){u.dataLabelGenerator(t)},_getPercentValue:function(t,e){return t?(t+="",-1!=t.indexOf("%")&&(t=parseFloat(t)*e/100),parseFloat(t)):0},isSupportLegendHighlight:function(){return!0},isSeriesAccumulated:function(){return!1},isTreeSeries:function(){return!1}});return v.include({getClosestPoint:function(){return null},getTooltipPos:function(t,e,i){var n;if(t.options.tooltip.follow){var r=i.containerPoint;n=[r.x+10,r.y+10]}else n=this._getFixedPos(t,e);if(n){var a=this.vanchart.getChartBounds(),o=a.y,s=a.x,h=a.y+a.height,l=a.x+a.width,u=n[0],c=n[1];return s>u?u+=s-u:u+e.width>l&&(u-=u+e.width-l),o>c?c+=o-c:c+e.height>h&&(c-=c+e.height-h),[u,c]}},getFillFilter:function(t){return t},filterRender:function(){this.useCanvas()?this._canvasRender():this._svgFilterRender()},render:function(){this.useCanvas()?this._canvasRender():this._svgRender()},useCanvas:e.falseFn,_createGroup:function(t,e){return t.group().addTo(e.clipSeriesGroup)},_svgRender:function(){this.initialAnimationMoving=!this.group;var t=this.vanchart,i=t.renderer;this.group||(this.group=this._createGroup(i,t).style("cursor",this._pointerStyle()).attr("transform",e.makeTranslate(this._getTranslate())).attr("class",this.className+" "+this.type)),this.type==r.GAUGE_CHART?this.group.animate({duration:g,ease:m,attr:{transform:e.makeTranslate(this._getTranslate())}}):this.group.attr("transform",e.makeTranslate(this._getTranslate())),this.drawSeries&&this.drawSeries(),this.drawPoints()},_svgFilterRender:function(){var t=this;t.getDataToDraw().forEach(function(e){e.isVisible()?(e.graphic&&e.graphic.style({display:"inline"}),e.textGraphic||t._createTextGraphic(e),e.effectGraphic||t.drawPointEffect(e)):(e.graphic&&e.graphic.style({display:"none"}),e.textGraphic&&e.textGraphic.remove(),e.textGraphic=null,e.clearPointEffect())})},_canvasRender:function(){this._canvas||(this._canvas=new l(this.vanchart.dom,this.vanchart),this._canvas.onAdd()),this._canvas.clearAll(),this._canvas.addSeries(this)},_pointerStyle:function(){return this.points[0]&&this.points[0].options.click?"pointer":""},getDataToDraw:function(){return this.points},getTextDataToDraw:function(){return this.getDataToDraw()},updatePointGraphic:function(t){},_updateMarkerPointGraphic:function(t){ - var i=t.graphic,n=t.options.marker,r=n.symbol;i&&(e.isImageMarker(r)&&!i.image?(i.strokePath&&i.strokePath.remove(),i.fillPath&&i.fillPath.remove(),i.markerPath&&i.markerPath.remove(),i.strokePath=i.fillPath=i.markerPath=null,this._createMarker(n,i)):!e.isImageMarker(r)&&i.image&&(i.image&&i.image.remove(),i.image=null,this._createMarker(n,i)))},drawPoints:function(){var t=this,e=t.vanchart,i=this._getPointGraphicGroup();e.registerInteractiveTarget(this,i),this.initialAnimationMoving&&this.initialAnimation&&this.initialAnimation();for(var n=this._calculateAnimationDelay(),r=t.getDataToDraw(),a=0,o=r.length;o>a;a++)t.drawPoint(r[a],n)},_drawEffectPoints:function(){var t=this;t.getTextDataToDraw().forEach(function(e){t.drawPointEffect(e)})},drawPointEffect:function(t){var e=t.series;t.clearPointEffect();var i=t.getEffectTime();i&&(e.effectAnimation(t),t.effectInterval=setInterval(function(){e.effectAnimation(t)},i))},effectAnimation:function(){},_drawUpdatePoints:function(t,e){this._updatePointGraphicStyle(t),t.graphic.animate(this.getPointUpdateAnimationAttr(t,e)),this.vanchart.registerInteractiveTarget(t,t.graphic)},_drawEnterPoints:function(t){var e=this,i=e._getPointGraphicGroup(),n=t.graphic=this._createPointGraphic(t);e._updatePointGraphicStyle(t);var r=e.getPointInitAttr&&e.getPointInitAttr(t),a=e.getPointInitStyle&&e.getPointInitStyle(t);t.hasEffect()?n.addTo(i):n.addToBack(i),n.attr(r||{}).style(a||{}).animate(e.getPointInitAnimationAttr(t)),e.vanchart.registerInteractiveTarget(t,n)},_drawExitPoints:function(t){var e=t.series;e.getPointDropAnimationAttr?t.graphic.animate(e.getPointDropAnimationAttr(t)).remove():t.graphic.remove()},drawPoint:function(t,e){e=e||0;var i=t.isVisible(),n=t.graphic&&t.graphic.isVisible();i===n?t.graphic&&this._drawUpdatePoints(t,e):i&&!n?t.graphic&&!t.graphic.removed()?(t.graphic.style("display","inline"),this._drawUpdatePoints(t,e)):this._drawEnterPoints(t):!i&&n&&this._drawExitPoints(t)},_getEffectTime:function(t){return isNaN(t.options.effect.period)?t.series.getDefaultEffectTime():t.options.effect.period},_getPointEffectGroup:function(t){var e=t.series,i=e.vanchart.renderer;return t.effectGraphic=t.effectGraphic||i.group().addTo(e._getPointGraphicGroup()).style("pointer-events","none")},_createPointGraphic:function(t){var e=this.getPointGraphicKey(t),i=this.vanchart.renderer;return i[e]()},getStyle:function(t){var e=t.options,i=t.series;return{fill:i.getFillFilter(t.color,t),"fill-opacity":e.image?1:t.opacity,stroke:t.borderColor,"stroke-opacity":t.borderOpacity,"stroke-width":e.borderWidth,filter:"none"}},_getDynamicStyle:function(t){var e=this.getStyle(t),i=this.vanchart.highlightTarget;if(null!=i&&this.isSupportLegendHighlight()){var n=this.getLegendKey(t),r=n==i||t._rangeItem==i?1:.3;e["fill-opacity"]=e["stroke-opacity"]=r}return e},_updatePointGraphicStyle:function(t,e){e=e||t.series._getDynamicStyle(t),t.graphic&&t.graphic.style(e)},_createMarker:function(t,i){var n=t.symbol,a=t.radius,o=this.vanchart.renderer,i=i||o.group();if(e.isImageMarker(n)){var s=t.width,l=t.height;i.image=o.image({preserveAspectRatio:"none",x:-s/2,y:-l/2,width:s,height:l}).imageContent(n).addTo(i)}else{var u=this._isHollowMarker(n),c=this.type==r.LINE_CHART;u&&c?(i.strokePath=o.path({d:h.getMarkerPath(n,a+2)}).addTo(i),i.fillPath=o.path({d:h.getMarkerPath(n,a-1)}).addTo(i)):i.markerPath=o.path({d:h.getMarkerPath(n,a)}).addTo(i)}return i},_updateMarker:function(t,i,n){i=i||t.graphic,n=n||t.options.marker;var a=n.fillColorOpacity,o=this.vanchart.highlightTarget;if(o){var s=this.getLegendKey(t);a=s==o||t._rangeItem==o?1:.3}var h=n.symbol,l=this._getBackgroundColor();if(e.isImageMarker(h));else{var u=this._isHollowMarker(h),c=this.type==r.LINE_CHART;u&&c?(i.strokePath.style({fill:n.fillColor,"fill-opacity":a,stroke:l,"stroke-width":2}),i.fillPath.style({fill:l})):u?i.markerPath.style({stroke:n.fillColor,"stroke-opacity":a,"stroke-width":2,fill:l}):c?i.markerPath.style({fill:n.fillColor,"fill-opacity":a,"stroke-width":2,stroke:l}):i.markerPath.style({fill:n.fillColor,"fill-opacity":a})}},_onMarkerPressed:function(t){if(t.graphic){var i=t.options.marker,n=i.symbol,a=(t.series,{fill:t.clickColor,"fill-opacity":t.clickOpacity});if(!e.isImageMarker(n)){var o=this._isHollowMarker(n),s=this.type==r.LINE_CHART;o&&s?t.graphic.strokePath.style(a):t.graphic.markerPath.style(a)}}},_onMarkerMouseOver:function(t){if(t.graphic){var i=t.options.marker,n=i.symbol,a=(t.series.animation,i.radius+2);if(e.isImageMarker(n)){var o=i.width+4,s=i.height+4;t.graphic.image.attr({x:-o/2,y:-s/2,width:o,height:s})}else{var l=this._isHollowMarker(n),u=this.type==r.LINE_CHART;l&&u?(t.graphic.strokePath.attr({d:h.getMarkerPath(n,a+2)}),t.graphic.fillPath.attr({d:h.getMarkerPath(n,a-1)})):t.graphic.markerPath.attr({d:h.getMarkerPath(n,a)})}}else{var i=this._getDefaultMarker(t);t.series.vanchart.renderer;t.series.defaultMarker=t.series.defaultMarker||this._createMarker(i).addTo(this.group),t.series.defaultMarker.attr("transform",e.makeTranslate([t.posX,t.posY])),this._updateMarker(t,t.series.defaultMarker,i)}},_onMarkerMouseOut:function(t){var i=t.options.marker,n=i.symbol,a=(t.series.animation,i.radius);if(t.graphic)if(e.isImageMarker(n)){var o=i.width,s=i.height;t.graphic.image.attr({x:-o/2,y:-s/2,width:o,height:s})}else{var l=this._isHollowMarker(n),u=this.type==r.LINE_CHART;l&&u?(t.graphic.strokePath.attr({d:h.getMarkerPath(n,a+2)}),t.graphic.fillPath.attr({d:h.getMarkerPath(n,a-1)})):t.graphic.markerPath.attr({d:h.getMarkerPath(n,a)})}},_getDefaultMarker:function(t){return{symbol:r.CIRCLE,fillColor:t.options.marker.fillColor,fillColorOpacity:t.options.marker.fillColorOpacity,radius:4.5,enabled:!0}},_calculateAnimationDelay:function(){return 0},_isHollowMarker:function(t){return t&&-1!=t.indexOf("hollow")},_animateEnd:function(){this._showLabels(),this._drawEffectPoints()},_showLabels:function(){var t=this,e=t.vanchart,i=0;e._needShowMoreLabel()&&(t.getTextDataToDraw().forEach(function(e){e.visible&&t._showAndExitMoreLabel(e)}),i=p),e.setTimeout(t.className+"more_label_animate",function(){e._removeChangeDataState(t),t._clearMoreLabels(),t._removeDataLabels(),t._updateDataLabels();var i=t._getPointTextLabelGroup();i.renderG.style({opacity:0}).transition().animate({transition:"linear",duration:400,style:{opacity:1}})},i)},_clearMoreLabels:function(){this.getTextDataToDraw().forEach(function(t){t.moreLabelG&&t.moreLabelG.remove(),t.moreLabelG=null})},_getMoreLabelStyle:function(){var t=this.vanchart.options.moreLabel;return t.style||{fontFamily:"verdana",fontSize:"9pt"}},_showAndExitMoreLabel:function(t,i,r,a,o,h){if(0!==t.depth){var l=this,u=l.vanchart,p=u.renderer,g=t._lastValue||0,m=e.accAdd(t.options[l.getTargetKey()],-g),v=u.options.moreLabel,_=0>m?v.minusColor||"#f4b145":v.plusColor||"#52d1b8";if(m>0)m="+"+m;else if(!(0>m))return;var y=l._getMoreLabelStyle(),x=e.getTextDimension(m,y);if(e.hasNotDefined(i)||e.hasNotDefined(r)){var b=l._getMoreLabelDefaultCenter(t,x);i=b.centerX,r=b.centerY,e.hasDefined(t.labelPos)&&e.hasDefined(t.labelDim)&&(i=t.labelPos.x+t.labelDim.width/2,r=t.labelPos.y+t.labelDim.height/2)}a&&(i=a(i,x.width)),o&&(r=o(r,x.height)),t.moreLabelG=h||p.text().addTo(l.group),y["white-space"]="nowrap";var T=r-x.height/2;t.moreLabelG.textContent(m).attr({x:i-x.width/2,y:T+5,opacity:0}).style(y).style({color:n.colorToHex(_)}).animate({duration:c,ease:"back-out",attr:{y:T},attrTween:{opacity:function(){return function(t){return s.css.swing(t)}}},transition:{delay:d,duration:f,ease:"back-in",attr:{y:T+5},attrTween:{opacity:function(){return function(t){return 1-s.css.swing(t)}}}}})}},_getMoreLabelDefaultCenter:function(t,e){return{centerX:t.x+t.width/2,centerY:t.y-e.height/2}},_updateDataLabels:function(){var t=this;t.getTextDataToDraw().forEach(function(e){t._createTextGraphic(e)})},_removeDataLabels:function(){var t=this;t.getTextDataToDraw().forEach(function(t){t.textGraphic&&(t.textGraphic.remove(),t.textGraphic=null),t.leadLine&&(t.leadLine.remove(),t.leadLine=null)})},_createTextGraphic:function(t){var i=this;if(t.hasValidDataLabel()){var n=i.vanchart,a=n.renderer,o=t.labelContent,s=t.labelPos.x,h=t.labelPos.y,l=t.options.dataLabels,u=l.useHtml,c=this._getPointTextLabelGroup(),d=a.vtext(u).attr("transform",e.makeTranslate([s,h])).style({"pointer-events":"none"});h=0;for(var f=0,p=o.length;p>f;f++){var g,m=o[f],v=m.dim,_=m.text,y=m.style;switch(t.options.dataLabels._align){case r.LEFT:g=0;break;case r.RIGHT:g=t.labelDim.width-v.width;break;case r.CENTER:default:g=(t.labelDim.width-v.width)/2}a.vtspan(u).style({width:l.labelWidth+"px",height:l.labelHeight+"px"}).attr("y",h).attr("x",0).attr("dy",.85*v.height).attr("dx",g).textContent(_).style(y).addTo(d),h+=v.height+2}t.textGraphic=c.append(d),t.labelPos.startPos&&(t.leadLine=c.append(this._getLeadLine(t)))}},_getLeadLine:function(t){return this.vanchart.renderer.path().attr("d",this._getLeadLinePath(t)).style({fill:"none",stroke:t.options.dataLabels.connectorColor||t.color,"stroke-width":t.options.dataLabels.connectorWidth||0})},_getLeadLinePath:function(t){var e=t.labelPos.startPos,i=t.labelPos.midPos,n=t.labelPos.endPos,r=this._dealWithFloat;return"M"+r(e.x)+","+r(e.y)+"L"+r(i.x)+","+r(i.y)+"L"+r(n.x)+","+r(n.y)},_dealWithFloat:function(t){return Math.abs(t)<1e-6?0:t},_getPointGraphicGroup:function(){return this.group},_getPointTextLabelGroup:function(){if(this.textGraphicGroup)this.textGraphicGroup.attr("transform",e.makeTranslate(this._getTranslate()));else{var t=this.vanchart,i=t.seriesTextRenderGroup,n=t.seriesTextDivGroup;this.textGraphicGroup=t.renderer.vgroup(),i.append(this.textGraphicGroup.renderG),n.append(this.textGraphicGroup.divG),this.textGraphicGroup.attr("transform",e.makeTranslate(this._getTranslate()))}return this.textGraphicGroup},_getTranslate:function(){return this.vanchart.bounds},getEvents:function(){return{mouseover:this._onSeriesMouseOver,mouseout:this._onSeriesMouseOut,pointMouseOver:this._onPointMouseOver,pointMouseOut:this._onPointMouseOut,tap:this._onSeriesTap}},_onSeriesMouseOver:function(t){var e=this,i=e.vanchart,n=i.hoverSeries,r=i.hoverPoint;n!=e&&(n&&n.fire("mouseout",t),i.hoverSeries=e);var a=e.getClosestPoint(t.containerPoint);a&&a!=r&&(r&&r.fire("mouseout",t),a._events||a.getEvents&&a.on(a.getEvents(),a),a.fire("mouseover",t))},_onSeriesTap:function(t){e.hasTouch()&&this.fire("mouseover",t)},getPressedStyle:function(){return null},onPointPress:function(){var t=this,e=t.series,i=e.getPressedStyle(t);i&&t.graphic&&t.graphic.style(i)},onPointPressUp:function(){var t=this,e=t.series,i=e.getHighLightStyle(t);i&&t.graphic&&t.graphic.style(i)},remove:function(){var t=this.vanchart;this.points.forEach(function(e){t.removePointGraphics(e,this.type)}),this._canvas&&this._canvas.remove(),this.textGraphicGroup&&this.textGraphicGroup.remove(),this.group&&this.group.remove(),this.textGraphicGroup=this._canvas=this.group=null}}),v}),define("chart/gantt/GanttSeries",["require","../Series","../../utils/BaseUtils","../../Constants","../../utils/BezierEasing","../../locale/localeText","../../ChartLibrary"],function(t){function e(t){return t.format("YYYY-MM-dd")}function i(t){return t.format("YYYY-MM-dd HH:mm")}function n(t){return 100*t+"%"}function r(t){return t.map(function(t){return t.name}).join(" ")}var a=t("../Series"),o=t("../../utils/BaseUtils"),s=t("../../Constants"),h=t("../../utils/BezierEasing"),l=t("../../locale/localeText"),u=2,c=.1,d=3,f=800,p=800,g=800,m="ease-out-back",v=7,_=o.isSupportSVG(),y=a.extend({doLayout:function(){var t=this,e=t.vanchart,i=e.getTimeAxis(),n=i.scale,r=e.getProcesses(),a=(r.procMap,r.cateMap),s=r.tableDims.rowHeight,h=e.options.plotOptions.newLine,l=this._getSeriesOffsetAndHeight(s,h);this.getDataToDraw().forEach(function(t){var e=t.options,i=e.borderWidth,r=e.processesId,h=n(+t.startTime),c=n(+t.finishTime),d={};d.x=h,d.y=a[r]*s+l.offset,d.width=c-h,d.height=l.height,d=o.rectSubPixelOpt(d,i),d.rx=d.ry=u,t.rect=d,t.initRect={x:d.x,y:d.y,width:0,height:d.height},t.leftRect={x:d.x,y:d.y,width:d.width*t.progress,height:d.height},t.rightRect={x:d.x+t.leftRect.width,y:d.y,width:d.width*(1-t.progress),height:d.height}})},_getSeriesOffsetAndHeight:function(t,e){var i=0,n=t*c,r=this._getVisibles(),a=e?r.length:1,o=e?r.indexOf(this.index):0;return i=t*(1-c*(a+1))/a,n+=o*(i+t*c),{height:i,offset:n}},_getVisibles:function(){return this.vanchart.seriesOfType(this.type).filter(function(t){return t.visible}).map(function(t){return t.index})},getDataToDraw:function(){var t=this.vanchart.getProcesses().procMap;return this.points.filter(function(e){return t[e.options.processesId]&&!e.isNull})},isNullValue:o.falseFn,_getTranslate:function(){return[0,0]},_calculateLabelPos:function(){this.getDataToDraw().forEach(function(t){var e=t.options.dataLabels;if(e&&e.enabled){var i=t.rect,n=t.labelDim,r=i.width*t.progress,a={y:i.y+i.height/2-n.height/2};e.align===s.RIGHT?a.x=i.x+r-n.width-d:a.x=i.x+r/2-n.width/2,t.labelPos=a}})},getFillFilter:function(t,e){var i=this.vanchart.renderer,n={x1:0,y1:0,x2:1,y2:0},r=e.progress,a=[{offset:r,"stop-color":t},{offset:r,"stop-color":t,"stop-opacity":"0.5"}];return e.colorGradient?i.updateColorGradient(e.colorGradient,n,a):e.colorGradient=i.colorGradient(n,a),"url(#"+o.stamp(e.colorGradient)+")"},getPointGraphicKey:function(){return"rect"},getPointInitAttr:function(t){return t.initRect},getPointInitAnimationAttr:function(t){return{ease:h.css[m],duration:f,attr:t.rect}},getPointUpdateAnimationAttr:function(t){return{ease:h.css[m],duration:g,attr:t.rect}},getPointDropAnimationAttr:function(t){return{ease:h.ease("exp-out"),duration:p,attr:t.initRect}},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);t.graphic.style(i)},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);t.graphic.style(i)},getHighLightStyle:function(t){return{stroke:t.mouseOverColor,fill:t.series.getFillFilter(t.mouseOverColor,t)}},getPressedStyle:function(t){return{stroke:t.clickColor,fill:t.series.getFillFilter(t.clickColor,t),"fill-opacity":t.clickOpacity}},_formatFn:function(t){switch(t){case"processes":return r;case"startTime":case"finishTime":return this.vanchart.getTimeAxis().initLevel0?n.DONUT_ICON:n.PIE_ICON;case n.RADAR_CHART:if(t.options.columnType)return n.NORMAL_ICON;break;case n.FORCE_BUBBLE_CHART:case n.BUBBLE_CHART:return n.BUBBLE_ICON;case n.TREEMAP_CHART:return n.TREEMAP_ICON;case n.LINE_MAP:return n.NULL_MARKER;default:r=n.NORMAL_ICON}return t.type==n.POINT_MAP&&t.options.icon?t.options.icon.iconUrl:(t.options.image&&e.isSupportSVG()?r=t.options.image:i&&(r=i.symbol,t.type!=n.SCATTER_CHART||e.isImageMarker(r)||(r=n.SCATTER_ICON+i.symbol)),r)},_getPercentValue:function(t,e){return t?(t+="",-1!=t.indexOf("%")&&(t=parseFloat(t)*e/100),parseFloat(t)):0},_setComponentBounds:function(t,e){this.isFloat||this.options&&this.options.onZero?this._updateFloatBounds(t,e):this._updateComponentBounds(t,e)},isHorizontal:function(){var t=this.getPosition();return t==n.TOP||t==n.BOTTOM},isVertical:function(){return!this.isHorizontal()},getPosition:function(){return this.options.position},_updateFloatBounds:function(t,e){e=Math.ceil(e);var i=this.vanchart.bounds,r=this._floatX,a=this._floatY,o=i.x+i.width-r,s=i.y+i.height-a;switch(t){case n.TOP:this.bounds={x:r,y:a,width:o,height:e};break;case n.BOTTOM:this.bounds={x:r,y:a,width:o,height:e};break;case n.LEFT:this.bounds={x:r,y:a,width:e,height:s};break;case n.RIGHT_TOP:case n.RIGHT:this.bounds={x:r,y:a,width:e,height:s}}},_updateComponentBounds:function(t,e){e=Math.ceil(e);var i=this.vanchart.bounds,r=i.x,a=i.y,o=i.width,s=i.height;switch(t){case n.TOP:this.bounds={x:r,y:a,width:o,height:e};break;case n.BOTTOM:this.bounds={x:r,y:a+s-e,width:o,height:e};break;case n.LEFT:this.bounds={x:r,y:a,width:e,height:s};break;case n.RIGHT_TOP:case n.RIGHT:this.bounds={x:r+o-e,y:a,width:e,height:s}}this.vanchart.setPlotBounds(i),this._clipPlotBounds(t,e)},_clipPlotBounds:function(t,e){e=Math.ceil(e);var i=this.vanchart.bounds,r=i.x,a=i.y,o=i.width,s=i.height;switch(t){case n.TOP:i={x:r,y:a+e,width:o,height:s-e};break;case n.BOTTOM:i={x:r,y:a,width:o,height:s-e};break;case n.LEFT:i={x:r+e,y:a,width:o-e,height:s};break;case n.RIGHT_TOP:case n.RIGHT:i={x:r,y:a,width:o-e,height:s}}this.vanchart.setPlotBounds(i)},_recordForPlotBounds:function(t,e){e=Math.ceil(e),t===n.RIGHT_TOP&&(t=n.RIGHT),this.vanchart.clipPool[t]=Math.max(this.vanchart.clipPool[t]||0,e)},_getBackgroundColor:function(){var t=this.option,e="string"==typeof t.plotBackgroundColor,n="string"==typeof t.backgroundColor,r=e?t.plotBackgroundColor:n?t.backgroundColor:"white";return i.colorToHex(r)},_maxHeight:function(t){var e=this.vanchart.height;return t||this.options.maxHeight?this._getPercentValue(this.options.maxHeight,e):e},_maxWidth:function(t){var e=this.vanchart.width;return t||this.options.maxWidth?this._getPercentValue(this.options.maxWidth,e):e},_getTickContent:function(t,i){return i?e.format(t,i):t},getDefaultMarkerRadius:function(){return a},getPlotBounds:function(){return this.vanchart.bounds},getChartBounds:function(){return this.vanchart.getChartBounds()},getParentDom:function(){return this.vanchart.getParentDom()},getDivParentDom:function(){return this.vanchart.getDivParentDom()},getTooltipComponent:function(){return this.vanchart.components.tooltip},remove:function(){},_bindData:e.bindData,invisible:function(){return e.hasDefined(this.options.visible)&&this.options.visible===!1},_innerClip:function(t){var i=this,n=i.bounds,r=i.vanchart,a=r.renderer,o=e.makeBounds(0,0,n.width,n.height);if(this._clip?a.updateClip(this._clip,o):this._clip=a.createClip(o),"vgroup"===t.type){var s=0,h=0,l=h+o.width,u=s+o.height;t.divG.style({clip:"rect("+s+"px "+l+"px "+u+"px "+h+"px)"}),a.clip(t.renderG,this._clip)}else a.clip(t,this._clip)}});return o}),define("chart/gantt/defaultValues",["require"],function(t){return{PADDING:"0.25rem",WEEKEND_COLOR:"rgba(169, 195, 200, 0.1)",OUTLINE:{fill:"none",stroke:"rgba(207, 207, 207, 1)","stroke-width":1},TWEENLINE:{fill:"none",stroke:"rgba(207, 207, 207, 0.6)","stroke-width":1},INNERLINE:{fill:"none",stroke:"rgba(207, 207, 207, 0.6)","stroke-width":.5},MINUS_PATH:{size:[7.5,7.5],graphics:[{fill:"#F2F2F2",d:"M0,12.7c2,0,3.6,1.6,3.6,3.6S2,19.9,0,19.9s-3.6-1.6-3.6-3.6S-2,12.7,0,12.7z"},{fill:"#727171",d:"M0,20c-2.1,0-3.8-1.7-3.8-3.8s1.7-3.7,3.8-3.7s3.8,1.7,3.8,3.8S2.1,20,0,20z M0,12.8c-1.9,0-3.4,1.5-3.4,3.4 s1.5,3.4,3.4,3.4s3.4-1.5,3.4-3.4S1.9,12.8,0,12.8z M2.1,16h-4.3v0.3h4.3V16z"}]},PLUS_PATH:{size:[7.5,7.5],graphics:[{fill:"#F2F2F2",d:"M0,12.7c2,0,3.6,1.6,3.6,3.6S2,19.9,0,19.9s-3.6-1.6-3.6-3.6S-2,12.7,0,12.7z"},{fill:"#727171",d:"M0,20c-2.1,0-3.8-1.7-3.8-3.8s1.7-3.7,3.8-3.7s3.8,1.7,3.8,3.8S2.1,20,0,20z M0,12.8c-1.9,0-3.4,1.5-3.4,3.4 s1.5,3.4,3.4,3.4s3.4-1.5,3.4-3.4S1.9,12.8,0,12.8z M2.1,16H0.2v-1.9h-0.3V16h-2v0.3h2v2h0.3v-2h1.9C2.1,16.3,2.1,16,2.1,16z"}]},THUMB_PATH:{size:[4.6,7.1],graphics:[{fill:"#F2F2F2",d:"M-0.008,13.717h-2.1v4.5l2.2,2.2l0,0l2.1-2.2v-4.5H-0.008"},{fill:"#727171",d:"M-0.008,20.617l-2.3-2.4v-4.7h4.6v4.7L-0.008,20.617z M-2.008,18.117l2,2l2-2v-4.3h-4V18.117z"}]}}}),define("chart/gantt/levelDomain",["require"],function(t){function e(t){return l[t][0]}function i(t){return l[t][1]}function n(t,e){return u*t*Math.pow(2,e)}var r=1e3,a=60*r,o=60*a,s=24*o,h=181*s,l=[["year","halfYear"],["year","halfYear"],["year","quarter"],["halfYear","month"],["quarter","month"],["quarter","month"],["month","week"],["week","day"],["month","date"],["month","date"],["date","meridiem"],["date","qDay"],["date","hour"]],u=3/h;return{r0:u,LEN:l.length,Ratio:n,upUnit:e,subUnit:i}}),define("chart/gantt/helper",[],function(){function t(t,e,i,n,r,a,o){return o||(o=e.append(t.line().style(i))),o.attr({x1:n,y1:a,x2:r,y2:a})}function e(t,e,i,n,r,a,o){return o||(o=e.append(t.line().style(i))),o.attr({x1:a,y1:n,x2:a,y2:r})}function i(t,e,i,n,r,a,o,s){return s||(s=e.append(t.rect().style(i))),s.attr({x:n,y:r,width:a,height:o})}function n(t,e,i,n){function r(t,a,o,s,h){i&&i(t,a,o,s,h);var l,u=t[e];u&&(l=u.length)&&u.map(function(e,i){r(e,a+1,l,i,t)}),n&&n(t,a,o,s,h)}r(t,0,0,0,null)}function r(t){return t.reduce(function(t,e){return t+e},0)}function a(t,e){var i=r(t);return t.map(function(t){return t/i*e})}function o(t){var e=t;return e>=0&&1>=e?e:1}return{lineH:t,lineV:e,rect:i,traverse:n,sum:r,distribValues:a,getValidProgress:o}}),define("chart/gantt/LevelBar",["require","../../component/Base","../../Constants","../../utils/BaseUtils","../../ComponentLibrary","./defaultValues","../../dom/EventObject","./levelDomain","./helper"],function(t){var e=t("../../component/Base"),i=t("../../Constants"),n=t("../../utils/BaseUtils"),r=t("../../ComponentLibrary"),a=t("./defaultValues"),o=t("../../dom/EventObject"),s=t("./levelDomain").LEN,h=t("./helper"),l=(h.lineV,h.lineH),u=a.MINUS_PATH,c=a.PLUS_PATH,d=a.THUMB_PATH,f=d.size[0],p=12,g=12,m=64,v=m-f,_=v/(s-1),y=e.extend({doLayout:function(){this._setComponentBounds(i.BOTTOM,p);var t=this.vanchart.bounds;this.bounds={x:t.x,y:t.y+t.height,height:p,width:t.width}},render:function(){if(!this.group){var t=this.vanchart.renderer;this.group=t.group().add(),this.group.attr("transform",n.makeTranslate(this.bounds)).attr("class","level-bar"),this._bar(t),this._slider(t)}},isEnabled:function(){return this.enabled&&this.vanchart.getTimeAxis().isZoomEnabled()},setLevel:function(t){null!=t&&(this.enabled=!0,this._setThumbLevel(t))},_setThumbLevel:function(t){var e=f/2+_*t;this.thumbG.attr("transform",n.makeTranslate({x:e,y:-17}))},_bar:function(t){this.group.append(t.rect().attr({x:0,y:0,width:this.bounds.width,height:this.bounds.height}).style({stroke:"none",fill:this._gradient(t)}))},_gradient:function(t){if(!n.isSupportSVG())return"rgb(220, 220, 220)";var e={x1:0,y1:0,x2:0,y2:1},i=[{offset:"0%","stop-color":"rgb(220, 220, 220)"},{offset:"75%","stop-color":"rgb(181, 181, 181)"},{offset:"100%","stop-color":"rgb(137, 137, 137)"}],r=t.colorGradient(e,i);return"url(#"+n.stamp(r)+")"},_slider:function(t){var e=this.group.append(t.group());e.attr("transform",n.makeTranslate({x:this._getLineStartX(),y:p/2})),l(t,e,{fill:"none",stroke:"#727171","stroke-width":.5},0,m,0),this.minusG=this._getIconGroup(t,u,-u.size[0]/2),this.plusG=this._getIconGroup(t,c,m+c.size[0]/2),this.thumbG=this._getIconGroup(t,d,m/2),["minus","plus","thumb"].map(function(t){var i=this[t+"G"];e.append(i);var n=new o(this.iconEvents(t));n.control=this,this.vanchart.registerInteractiveTarget(n,i)},this)},_getLineStartX:function(){return this.bounds.width-m-g},eventsMap:{minus:["tap"],plus:["tap"],thumb:["panstart","panmove","panend"]},iconEvents:function(t){var e=this.eventsMap[t],i={};return e.map(function(e){i[e]=this["on"+t+e]},this),i},onminustap:function(t){this.control._changeLevel(-1)},onplustap:function(t){this.control._changeLevel(1)},onthumbpanstart:function(t){},onthumbpanmove:function(t){var e=this.control,i=e.bounds,n=t.containerPoint,r=n.x-i.x-e._getLineStartX()-f/2;r=Math.min(Math.max(0,r),v);var a=Math.round(r/_);e._changeToLevel(a)},onthumbpanend:function(t){},_changeToLevel:function(t){this.isEnabled()&&(this.vanchart.changeToLevel(t),this._setThumbLevel(this.vanchart.getTimeAxis().getLevel()))},_changeLevel:function(t){var e=this.vanchart.getTimeAxis().getLevel()+t;this._changeToLevel(e)},_getIconGroup:function(t,e,i){var r=t.group();return r.attr("transform",n.makeTranslate({x:i,y:-17})),r.append(t.path().attr(e.graphics[0])),r.append(t.path().attr(e.graphics[1])),r}});return r.register(r.LEVELBAR,y),y}),define("chart/gantt/Table",["require","../../component/Base"],function(t){var e=t("../../component/Base");return e.extend({_getHeader:function(){return this.options.header},_getBody:function(){return this.options.body}})}),define("chart/gantt/ScrollbarItem",["require","../../dom/Evented","../../utils/BaseUtils"],function(t){var e=t("../../dom/Evented"),i=t("../../utils/BaseUtils"),n=(i.isSupportSVG(),12),r="rgba(233, 233, 233, 0.6)",a="rgba(207, 207, 207, 0.6)",o=.5,s=6,h="rgba(160, 160, 160, 0.6)",l="rgba(88, 88, 88, 0.6)",u=s/2,c=e.extend({initialize:function(t){this.opt=t,this.pos={x:0,y:0};var e=t.manager.vanchart,l=t.manager.renderer;this.group=t.group.append(l.group()),this.group.style("transition","opacity 0.3s"),this.group.attr("transform",i.makeTranslate([t.x,t.y])); - var c,d,f,p,g;"x"===t.dir?(c=this.opt.length,d=n,f=this.opt.barLength,p=s,g="y"):(c=n,d=this.opt.length,f=s,p=this.opt.barLength,g="x"),this.background=this.group.append(l.rect().attr({width:c,height:d}).style({fill:r,stroke:a,"stroke-width":o}));var m={rx:u,ry:u,width:f,height:p};m[g]=(n-s)/2,this.bar=this.group.append(l.rect().attr(m).style("fill",h)),e.registerInteractiveTarget(this,this.bar)},show:function(t){t!==this._showed&&(this._showed=t,i.isSupportSVG()?this.group.style("opacity",t?"1":"0"):this.group.style("display",t?"":"none"))},remove:function(){this.group.remove()},setPos:function(t,e){(t!==this.opt.x||e!==this.opt.y)&&(this.group.attr("transform",i.makeTranslate([t,e])),this.opt.x=t,this.opt.y=e)},setSize:function(t,e){if(t!==this.opt.length||e!==this.opt.barLength){(e>t||0>t||0>e)&&(t=e=0);var i="x"===this.opt.dir?"width":"height";this.background.attr(i,t),this.bar.attr(i,e),this.opt.length=t,this.opt.barLength=e}},setPct:function(t){this.setBarPos(this._getRemainLength()*t)},getBarPos:function(){return this.pos[this.opt.dir]},setBarPos:function(t){t=Math.max(0,Math.min(t,this._getRemainLength())),this.getBarPos()!==t&&(this.pos[this.opt.dir]=t,this.bar.attr("transform",i.makeTranslate(this.pos)))},_getRemainLength:function(){return this.opt.length-this.opt.barLength},getEvents:function(){return{mouseover:this.onMouseOver,mouseout:this.onMouseOut,panstart:this.onPanStart,panmove:this.onPanMove,panend:this.onPanEnd}},onMouseOver:function(){this.bar.attr({fill:l})},onMouseOut:function(){this.bar.attr({fill:h})},onPanStart:function(t){this.initPos=this.getBarPos(),this.initPointPos=t.containerPoint},onPanMove:function(t){var e=t.containerPoint[this.opt.dir]-this.initPointPos[this.opt.dir];this.setBarPos(this.initPos+e),this.opt.manager["on"+this.opt.dir](this.getBarPos()/this._getRemainLength())},onPanEnd:function(){this.opt.manager.vanchart.handler.panTarget=null}});return c.SIZE=n,c}),define("chart/gantt/Scrollbar",["require","../../dom/Evented","../../utils/BaseUtils","./ScrollbarItem"],function(t){function e(t){return+t.toFixed(3)}var i=t("../../dom/Evented"),n=t("../../utils/BaseUtils"),r=t("./ScrollbarItem"),a=20;return i.extend({initialize:function(t){this.view=t.view,this.vanchart=t.view.vanchart,this.renderer=t.view.renderer,this.group=t.group,this.options=t,this.options.autoHide=t.autoHide!==!1,this.x=this.y=0,this._isScrollX(t)&&(this.barX=this._barBottom()),this._isScrollY(t)&&(this.barY=this._barRight());var e=t.onChangeName||"innerChange",i=t.onResizeName||"resize",n=t.onOverName||"mouseover";this.view.on(e,this.setPos,this).on(i,this.setSize,this),t.autoHide&&(this.barX&&this.barX.show(!1),this.barY&&this.barY.show(!1),this.view.on(n,this.show,this))},show:function(t){this.barX&&this.barX.show(t),this.barY&&this.barY.show(t)},setPos:function(t){if(t.initiator!==this){if(this.barX&&null!=t.x){var e=t.x/(this.options.width-this.options.innerWidth);this.barX.setPct(e)}if(this.barY&&null!=t.y){var i=t.y/(this.options.height-this.options.innerHeight);this.barY.setPct(i)}}},setSize:function(t){if(t.scrollX=this.options.scrollX,t.scrollY=this.options.scrollY,this.options.scrollX){var e=this._isScrollX(t);if(e&&!this.barX&&(this.barX=this._barBottom()),!e&&this.barX&&(this.barX.remove(),this.barX=null),e&&this.barX){var i=this._getLengths(t,"width");this.barX.setPos(0,t.height-r.SIZE),this.barX.setSize(i.length,i.barLength)}}if(this.options.scrollY){var a=this._isScrollY(t);if(a&&!this.barY&&(this.barY=this._barBottom()),!a&&this.barY&&(this.barY.remove(),this.barX=null),a&&this.barY){var i=this._getLengths(t,"height");this.barY.setPos(t.width-r.SIZE,0),this.barY.setSize(i.length,i.barLength)}}n.extend(this.options,t)},_barBottom:function(){var t=this._getLengths(this.options,"width");return this._bar("x",0,this.options.height-r.SIZE,t.length,t.barLength)},_barRight:function(){var t=this._getLengths(this.options,"height");return this._bar("y",this.options.width-r.SIZE,0,t.length,t.barLength)},_getLengths:function(t,e){var i=t[e],n="width"===e?t.innerWidth:t.innerHeight,o=i-(this._isScrollBoth(t)?r.SIZE:0);return{length:o,barLength:Math.max(i/n*o,a)}},_bar:function(t,e,i,n,a){return new r({manager:this,group:this.group,x:e,y:i,length:n,barLength:a,dir:t})},onx:function(t){this.fire("scrollX",{initiator:this,x:t*(this.options.width-this.options.innerWidth)})},ony:function(t){this.fire("scrollY",{initiator:this,y:t*(this.options.height-this.options.innerHeight)})},_isScrollX:function(t){return t.scrollX&&e(t.width)this.model.bounds.y+this.model.tableDims.headerHeight},_shouldXMove:function(t){return i.containsPoint(this.model.bounds,t)},onScrollX:function(t){this._setInnerPos(t)},onScrollY:function(t){this._setInnerPos(t)},_setInnerPos:function(t){var e,n;return t&&(null!=t.x&&(e=t.x),null!=t.y&&(n=t.y)),null==e&&(e=this.innerPosX),null==n&&(n=this.innerPosY),e=u(c(this.model.bounds.width-this._getInnerWidth(),e),0),n=u(c(this.visibleBodyHeight-this.innerBodyHeight,n),0),e!==this.innerPosX||n!==this.innerPosY?(this._showShadow&&this._showShadow(0!==e),this._getGroup("header").attr("transform",i.makeTranslate([e,0])),this._getGroup("inner-body").attr("transform",i.makeTranslate([e,n])),this.innerPosX=e,this.innerPosY=n,{x:e,y:n}):!1},onresizeStart:function(t){this._initX=this.model.bounds.x,this._initWidth=this.model.bounds.width,this._initPointX=t.containerPoint.x},onresizeMove:function(){this.update(),this._fireResize()},_fireResize:function(){this.fire("resize",{width:this.model.bounds.width,height:this.visibleBodyHeight,innerWidth:this._getInnerWidth(),innerHeight:this.innerBodyHeight}),this._setInnerPos()},onover:function(t){this.fire("mouseover",i.containsPoint(this.model.bounds,t.containerPoint))}})}),define("chart/gantt/ProcessesView",["require","./TableView","../../utils/BaseUtils","./Scrollbar","../../dom/DomUtils","./helper","./defaultValues"],function(t){var e=t("./TableView"),i=(t("../../utils/BaseUtils"),t("./Scrollbar"),t("../../dom/DomUtils").toBack),n=t("./helper"),r=t("./defaultValues"),a=n.lineV,o=n.lineH,s=n.rect,h=n.traverse,l=n.sum,u=r.OUTLINE,c=r.INNERLINE,d=r.TWEENLINE;return e.extend({className:"processesGroup",update:function(){var t=this.renderer,e=this.model.bounds;t.updateClip(this.clip,{width:e.width,height:e.height}),this._header(),this._body(),this._outline()},_getInnerWidth:function(){return l(this.model.tableDims.widths)},_header:function(){var t=this.renderer,e=this._getGroup(),i=this.model.tableDims.widths,n=this.model.tableDims.headerHeight,r=this.model._getHeader(),h=this._getGroup("header");h||(h=this._addGroup("header",e),this._headerEles={},this._headerEles.gs=[]);var l=a.bind(null,t,h),u=o.bind(null,t,h),c=s.bind(null,t,h),f=this._headerEles.gs,p=-1,g=0;i.map(function(t,e){f[++p]=c({fill:this._getOptionsColor(r[e])},g,0,t,n,f[p]),e&&(f[++p]=l(d,0,n,g,f[p])),f[++p]=this._drawText(h,r[e].style,n/2,g+t/2,r[e].text,f[p]),g+=t},this);var m=d["stroke-width"]/2;f[++p]=u(d,0,g,n-m,f[p])},_body:function(){this._bodyEles||this._prepareBody();var t=this.renderer,e=this._getGroup("inner-body-back"),n=this._bodyEles.gs,r=-1,l=a.bind(null,t,e),u=o.bind(null,t,e),f=s.bind(null,t,e),p=this.model._getBody(),g=this.model.tableDims.widths,m=[],v=g.reduce(function(t,e,i){return m[i]=t,t+e},0),_=this.model.tableDims.rowNum,y=this.model.tableDims.rowHeight,x=0,b=g.map(function(){return 0}),T=this._drawText.bind(this);h(this.model._getCateRoot(),"categories",null,function(t,i,a,o){if(i){var s=i-1,h=b[s],l=x+1;if(a-1>o){++x;var f=1===i?d:c;n[++r]=u(f,m[s],v,y*x,n[r]);for(var _=b.length;--_>=s;)b[_]=x}var A=t.name;null!=A&&""!==A&&(n[++r]=T(e,p[s].style,y*(h+l)/2,m[s]+g[s]/2,A,n[r]))}}),++x;for(var A=x;_>=A;){var C=A===x?d:c;n[++r]=u(C,0,v,y*A,n[r]),++A}var L=0,P=this.innerBodyHeight;g.map(function(a,o){p[o]&&(++r,n[r]||(n[r]=e.append(t.rect()),n[r].style({fill:this._getOptionsColor(p[o])}),i(n[r].node())),f(null,L,0,a,P,n[r])),o&&(n[++r]=l(d,0,P,L,n[r])),L+=a},this)},_outline:function(){var t=this.renderer,e=this._getGroup(),i=this.model.bounds;if(!this._outlineEles){var n=u["stroke-width"]/2,r=a.bind(null,t,e,u),s=o.bind(null,t,e,u);r(0,i.height,n),s(0,this.vanchart.bounds.width,n),s(0,this.vanchart.bounds.width,i.height-n)}this._outlineEles=a(t,e,c,0,i.height,i.width-c["stroke-width"]/2,this._outlineEles)},_scrollbar:function(){this._buildScrollbar({scrollX:!0,scrollY:!1})},_drawText:function(t,e,i,n,r,a){return a||(a=t.append(this.renderer.text().style(e).textContent(r))),a.attr({x:n,y:i,dy:".35em","margin-top":"-0.5em"}).vMiddle(),a},onresizeMove:function(t){var i=this.model.bounds,n=t.containerPoint.x-this._initPointX;i.width=this._initWidth+n||0,this.model.expandPanelWidth(i.width),e.prototype.onresizeMove.call(this)}})}),define("chart/gantt/Processes",["require","./Table","../../utils/BaseUtils","../../ComponentLibrary","./ProcessesView","./helper","./defaultValues"],function(t){var e=t("./Table"),i=t("../../utils/BaseUtils"),n=t("../../ComponentLibrary"),r=t("./ProcessesView"),a=t("./helper"),o=a.traverse,s=a.sum,h=a.distribValues,l=t("./defaultValues").PADDING,u=0,c=3,d=i.getTextDimension,f=Math.max,p=e.extend({_refresh:function(){u=i.paddingConvertWithScale(l)},doLayout:function(){},getInitPanelDims:function(){return this.tableDims=this._calcTableDims(),{width:this._calcPanelWidth(),headerHeight:this.tableDims.headerHeight,rowHeight:this.tableDims.rowHeight,rowNum:this.tableDims.rowNum}},setPanelDims:function(t){this.tableDims.headerHeight=t.headerHeight,this.tableDims.rowNum=t.rowNum,this.bounds={x:t.x,y:t.y,width:t.pWidth,height:t.height}},_calcPanelWidth:function(){var t,e,i=s(this.tableDims.widths);if(t=this.options.width){var n=this.vanchart.bounds;e=n.width*t,e>i&&this.expandPanelWidth(e)}else e=i;return e},expandPanelWidth:function(t){t<=s(this.tightWidths)||(this.tableDims.widths=h(this.tableDims.widths,t))},_calcTableDims:function(){var t=this._getHeader(),e=this._getBody(),i=this._getCateRoot(),n=this._calcHeaderDim(t),r=this._calcRowDim(n.widths,e,i);return{headerHeight:n.height,rowHeight:r.height,widths:r.widths,rowNum:r.num}},_calcHeaderDim:function(t){if(!t||!t.length)return{height:0,widths:[]};var e=0,i=t.map(function(t){var i=d(t.text,t.style,!1);return e=f(e,i.height*c),i.width+2*u});return{height:e,widths:i}},_calcRowDim:function(t,e,i){var n=this.procMap={},r=this.cateMap={},a=0,s=0;return o(i,"categories",function(i,o,h,l,u){if(o){var p=o-1,g=d(i.name,e[p].style,!1);t[p]=f(t[p],g.width);var m=i.categories;m&&m.length>1||(a=f(a,g.height*c),r[i.processesId]=s),m&&m.length||++s,n[i.processesId]={options:i,parent:n[u.processesId]}}}),t=t.map(function(t){return t+2*u}),this.tightWidths=t.slice(),{num:s,height:a,widths:t}},_getCateRoot:function(){return this.options},render:function(){Object.keys(this.procMap).length&&(this.view||(this.view=new r(this,this.vanchart)),this.view.render())}});return n.register(n.PROCESSES,p),p}),define("dateUnits/dateFormat",["require"],function(t){function e(t,e,i){var n=""+Math.abs(t),r=e-n.length,a=t>=0;return(a?i?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+n}function i(t,i,n,r){var a=r;"string"==typeof r&&(a=function(){return this[r]()}),t&&(f[t]=a),i&&(f[i[0]]=function(){return e(a.apply(this,arguments),i[1],i[2])})}function n(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function r(t){var e,i,r=t.match(c);for(e=0,i=r.length;i>e;e++)f[r[e]]?r[e]=f[r[e]]:r[e]=n(r[e]);return function(e){var n,a="";for(n=0;i>n;n++)a+=r[n]instanceof Function?r[n].call(e,t):r[n];return a}}function a(t,e){return d[e]=d[e]||r(e),d[e](t)}function o(t,e){return t=t.toString().split("e"),t=Math.round(+(t[0]+"e"+(t[1]?+t[1]-e:-e))),t=t.toString().split("e"),+(t[0]+"e"+(t[1]?+t[1]+e:e))}function s(t,e){return o(e.get(t),-2)+u.duration[t]}function h(t,e){return null==p[e]&&("string"==typeof u.duration[e]?p[e]=s.bind(null,e):p[e]=u.duration[e]),p[e](t)}function l(t){for(var e in t)"_"!==e.charAt(0)&&("base"===e?t.base(i,u):u[e]=t[e])}var u={duration:{year:"years",month:"months",day:"days",hour:"hours",minute:"minutes",second:"seconds"},halfYears:["H1","H2"],quarters:"Q1_Q2_Q3_Q4".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),meridiem:["am","pm"],qDay:"0h~6h_6h~12h_12h~18h_18h~24h".split("_")},c=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w{1,3}|wo|W[o|W]?|Q{2,3}|Qo?|[yY]{2,6}|gg(ggg?)?|GG(GGG?)?|e{2,6}|E|a|A|hh?|HH?H?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,d={},f={},p={},g=i;return g("y",0,0,function(){var t=this.year();return 9999>=t?""+t:"+"+t}),g(0,["yy",2],0,function(){return this.year()%100}),g(0,["yyyy",4],0,"year"),g("Y",0,0,function(){var t=this.year();return 9999>=t?""+t:"+"+t}),g(0,["YY",2],0,function(){return this.year()%100}),g(0,["YYYY",4],0,"year"),g(0,["yyyyy",5],0,"year"),g(0,["yyyyyy",6,!0],0,"year"),g("N",0,0,function(){return u.halfYears[this.halfYear()-1]}),g("Q",["QQ",2],0,"quarter"),g("QQQ",0,0,function(){return u.quarters[this.quarter()-1]}),g("M",["MM",2],"Mo",function(){return this.month()+1}),g("MMM",0,0,function(){return u.monthsShort[this.month()]}),g("MMMM",0,0,function(){return u.months[this.month()]}),g("w",["ww",2],0,"week"),g("www",0,0,function(){return"Week"+this.week()}),g("e",["ee",2],0,"day"),g("eee",0,0,function(){return u.weekdaysShort[this.day()]}),g("eeee",0,0,function(){return u.weekdays[this.day()]}),g("eeeeee",0,0,function(){return u.weekdaysMin[this.day()]}),g("d",["dd",2],0,"date"),g("a",0,0,function(){return u.meridiem[this.meridiem()-1]}),g("I",0,0,function(){return u.qDay[this.qDay()-1]}),g("H",["HH",2],0,"hour"),g("HHH",0,0,function(){return this.hour()+"h"}),g("m",["mm",2],0,"minute"),g("s",["ss",2],0,"second"),{formatDate:a,formatDuration:h,setLocale:l}}),define("dateUnits/dateDuration",["require","./dateFormat"],function(t){var e=t("./dateFormat").formatDuration,i=1e3,n=60*i,r=60*n,a=24*r,o=365*a,s=30*a,h=function(t){this._ms=+t},l=(h.prototype={valueOf:function(){return this._ms},as:function(t){return e(this,t)},get:function(t){var e=this._ms;switch(t){case"millisecond":break;case"second":e/=i;break;case"hour":e/=r;break;case"minute":e/=n;break;case"day":e/=a;break;case"month":e/=s;break;case"year":e/=o;break;default:throw new Error("Unknown unit "+t)}return e}},function(t){return new h(t)});return l}),define("dateUnits/dateUnits",["require","./dateFormat","./dateDuration"],function(t){function e(t,e,i){var n=Math.floor((t-e)/(i-e+1)),r=t-(i-e+1)*n;return{c:n,r:r}}function i(t){return t%4===0&&t%100!==0||t%400===0}function n(t){return i(t)?366:365}function r(t){var e=new Date(t,0,4).getDay()||7;return 4-e}function a(t){var e=r(t),i=r(t+1);return(n(t)-e+i)/7}var o=t("./dateFormat"),s=t("./dateDuration"),h=o.formatDate,l=864e5,u=["year","month","halfYear","quarter","week","day","date","meridiem","qDay","hour","minute","second","millisecond"],c={};u.map(function(t){c[t+"s"]=t});var d=function(t){this._d=t},f=d.prototype={valueOf:function(){return+this._d},year:function(t){return null!=t?(this._d.setFullYear(t),this):this._d.getFullYear()},month:function(t){return null!=t?(this._d.setMonth(t),this):this._d.getMonth()},halfYear:function(t){if(null!=t){var i=e(t,1,2);return i.c&&this.year(this.year()+i.c),this.month(1===i.r?0:6),this}return this.month()<6?1:2},quarter:function(t){if(null!=t){var i=e(t,1,4);return i.c&&this.year(this.year()+i.c),this.month(3*(i.r-1)),this}return Math.ceil((this.month()+1)/3)},dayOfYear:function(){return Math.floor((this._d-new Date(this.year(),0,1))/l)+1},weekOfYear:function(){var t=Math.floor((this.dayOfYear()-(this.day()||7)+10)/7),e=this.year();return 1>t?(e-=1,t=a(e)):t>a(e)&&(t-=a(e),e+=1),{week:t,year:e}},week:function(){return this.weekOfYear().week},day:function(t){if(null!=t){var e=t-(this.day()||7);return this._d.setDate(this.date()+e),this}return this._d.getDay()},date:function(t){return null!=t?(this._d.setDate(t),this):this._d.getDate()},meridiem:function(t){if(null!=t){var i=e(t,1,2);return i.c&&this.date(this.date()+i.c),this.hours(1===i.r?0:12),this}return this.hours()<12?1:2},qDay:function(t){if(null!=t){var i=e(t,1,4);return i.c&&this.date(this.date()+i.c),this.hour(6*(i.r-1)),this}return Math.ceil((this.hour()+1)/6)},hour:function(t){return null!=t?(this._d.setHours(t),this):this._d.getHours()},minute:function(t){return null!=t?(this._d.setMinutes(t),this):this._d.getMinutes()},second:function(t){return null!=t?(this._d.setSeconds(t),this):this._d.getSeconds()},millisecond:function(t){return null!=t?(this._d.setMilliseconds(t),this):this._d.getMilliseconds()},startOf:function(t){switch(t){case"year":this.month(0);case"halfYear":case"quarter":case"month":this.date(1);case"week":case"day":case"date":this.hours(0);case"hour":case"meridiem":case"qDay":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t?this.day(1):-1!==["quarter","halfYear","meridiem","qDay"].indexOf(t)&&this[t](this[t]()),this},endOf:function(t){return t&&"millisecond"!==t?this.add(1,t).startOf(t).add(-1,"millisecond"):this},add:function(t,e){if(e=c[e]||e,"halfYear"===e)this.add(6*t,"month");else if("quarter"===e)this.add(3*t,"month");else if("week"===e)this.add(7*t,"date");else if("meridiem"===e)this.add(12*t,"hour");else if("qDay"===e)this.add(6*t,"hour");else{"day"===e&&(e="date");var i=this.get(e);this[e](i+t)}return this},isWeekend:function(){var t=this.day();return 6===t||0===t}};u.map(function(t){f[t+"s"]=f[t]}),f.get=function(t){return this[t]()},f.format=function(t){return h(this,t)};var p=function(t){var e;return e=t instanceof d?new Date(t._d):t?new Date(t):new Date,new d(e)};return p.isLeapYear=i,p.daysInYear=n,p.firstWeekOffset=r,p.weeksInYear=a,p.setLocale=o.setLocale,p.duration=s,p}),define("chart/gantt/TimeAxisView",["require","./TableView","../../utils/BaseUtils","./levelDomain","../../dateUnits/dateUnits","./helper","./defaultValues"],function(t){function e(t,e){for(var i=-1,n=t.length;++i=e.left},r:function(t,e){return t<=e.right},_checkTextBounds:function(t,e){var i,n,r,a=e.data[e.i],o=-this.innerPosX,s=-this.innerPosX+this.model.bounds.width;"left"===t?(i=o,n=i,r=Math.min(a.right,s)):(i=s,n=Math.max(a.left,o),r=i);var h=this.l(i,a),l=this.r(i,a);h&&l?(a.width||(a.width=f(a.content,a.style).width),r-n>=a.width?a.ele.attr("x",(n+r)/2).vMiddle():a.ele.attr("x",-100)):(a.ele.attr("x",a.x).vMiddle(),h?l||++e.i:--e.i)},_header:function(){var t=this.renderer,e=this._getGroup(),i=this.model,n=i.bounds.width,r=i.tableDims.heights,a=h(r),l=i._getHeader();this._headerEles||(this._headerEles={upLines:[],upTexts:[],subLines:[],subTexts:[]},this._headerEles.gs=[]);var u=this._headerEles.gs,f=-1,g=this._headerEles,m=this.model._headerData;u[++f]=s(t,e,{fill:this._getOptionsColor(l[0])},0,0,n,r[0],u[f]),u[++f]=s(t,e,{fill:this._getOptionsColor(l[1])},0,r[0],n,r[1],u[f]);var v=d["stroke-width"]/2;u[++f]=o(t,e,d,0,n,r[0]-v,u[f]),u[++f]=o(t,e,d,0,n,a-v,u[f]);var _=this._getGroup("header")||this._addGroup("header",e);["upLines","subLines"].map(function(e){var i=p(g[e],m[e]);i.exit.map(function(t){t.remove()});var n=i.enter.map(function(e){return _.append(t.line().datum(e).style(c))});g[e]=n.concat(i.update).map(function(t){return t.attr(t.datum())})}),["upTexts","subTexts"].map(function(e){var i=p(g[e],m[e]);i.exit.map(function(t){t.remove()});var n=i.enter.map(function(e){return _.append(t.text().datum(e).style(e.style))});g[e]=n.concat(i.update).map(function(t){var e=t.datum();return e.ele=t,t.textContent(e.content).attr({x:e.x,y:e.y,dy:".35em","margin-top":"-0.5em"}).vMiddle(),t})})},_body:function(){this._bodyEles||(this._prepareBody(),this._shadow()),this._bodyData={hLines:[],vLines:[],rects:[]};var t=this._bodyEles,e=this._bodyData,i=this.renderer,n=this._getGroup("inner-body-back"),r=this.model.tableDims.rowHeight,a=this.model.tableDims.rowNum,o=this.innerBodyHeight;e.rects=this.model._weekendsWidths;var s=p(t.rects,e.rects);s.exit.map(function(t){t.remove()});var h=s.enter.map(function(t){return n.append(i.rect().datum(t).style({fill:l.WEEKEND_COLOR}))});t.rects=h.concat(s.update).map(function(t){var e=t.datum();return t.attr({x:e.from,y:0,width:e.to-e.from,height:o})}),e.vLines=this.model._headerData.subLines;var s=p(t.vLines,e.vLines);s.exit.map(function(t){t.remove()});var h=s.enter.map(function(t){return n.append(i.line().datum(t).style(c))});t.vLines=h.concat(s.update).map(function(t){var e=t.datum();return t.attr({x1:e.x1,y1:0,x2:e.x2,y2:o})});for(var u=0;++u<=a;)e.hLines.push({x1:0,y1:u*r,x2:this._getInnerWidth(),y2:u*r});var s=p(t.hLines,e.hLines);s.exit.map(function(t){t.remove()});var h=s.enter.map(function(t){return n.append(i.line().datum(t).style(c))});t.hLines=h.concat(s.update).map(function(t){return t.attr(t.datum())})},_outline:function(){var t=this.renderer,e=this._getGroup(),i=this.model.bounds,r=a.bind(null,t,e,u),s=u["stroke-width"]/2;if(!this._outlineEles){var h=o.bind(null,t,e,u);h(0,this.vanchart.bounds.width,s),h(0,this.vanchart.bounds.width,i.height-s)}var l=i.width-s;n.isSupportSVG()||(l=Math.floor(l)),this._outlineEles=r(0,i.height,l,this._outlineEles)},_scrollbar:function(){this._buildScrollbar({scrollX:!0,scrollY:!0})},_shadow:function(){var t={x1:0,y1:0,x2:1,y2:0},e=[{offset:"0%","stop-color":"rgb(62, 62, 62)","stop-opacity":"0.2"},{offset:"75%","stop-color":"rgb(62, 62, 62)","stop-opacity":"0"}],i=this.renderer.colorGradient(t,e),r="url(#"+n.stamp(i)+")";this._shadowRect=this._getGroup("body").append(this.renderer.rect()).style("transition","opacity 0.2s").attr({x:0,y:0,width:10,height:this.model.bounds.height,fill:r}),this._showShadow(!1)},_showShadow:function(t){t!==this._shadowShowed&&(this._shadowShowed=t,this._shadowRect.style("opacity",t?"1":"0"))},onresizeMove:function(t){var e=this.model.bounds,n=this._initPointX-t.containerPoint.x;e.x=this._initX-n,e.width=this._initWidth+n||0,i.prototype.onresizeMove.call(this)}})}),define("chart/gantt/levelText",["require","../../locale/localeText"],function(t){function e(){return r("ganttLevels")||a}function i(t,i){return t.format(e()[i][0])}function n(t,i){return t.format(e()[i][1])}var r=t("../../locale/localeText"),a=[["yyyy","N"],["yyyy","N"],["yyyy","QQQ"],["N[,]yyyy","MMM"],["QQQ[,]yyyy","MMM"],["QQQ[,]yyyy","MMM"],["MMM[,]yyyy","www"],["d[,]MMM[,]yyyy","eee"],["MMM[,]yyyy","d"],["MMM","d"],["d[,]MMM","a"],["d[,]MMM","I"],["d[,]MMM","HHH"]];return{getUpText:i,getSubText:n}}),define("chart/gantt/TimeAxis",["require","./Table","../../utils/BaseUtils","../../ComponentLibrary","./TimeAxisView","./levelDomain","../../dateUnits/dateUnits","../../utils/Scale","./helper","./levelText","./levelText","./defaultValues"],function(t){function e(t,e,i,n,r){t.add(1,e);var a=(t-i)*n;return r.push(a),a}var i=t("./Table"),n=t("../../utils/BaseUtils"),r=t("../../ComponentLibrary"),a=t("./TimeAxisView"),o=t("./levelDomain"),s=t("../../dateUnits/dateUnits"),h=t("../../utils/Scale"),l=t("./helper"),u=l.sum,c=l.distribValues,d=t("./levelText").getUpText,f=t("./levelText").getSubText,p=t("./defaultValues").PADDING,g=0,m=3,v=o.upUnit,_=o.subUnit,y=o.LEN,x=o.Ratio,b=n.getTextDimension,T=n.getTextHeight,A=n.object2date,C=n.isEmpty,L=Math.max,P=Math.min,M=i.extend({_refresh:function(){g=n.paddingConvertWithScale(p),this.lastScale=this.scale,this.scale=h.linear()},doLayout:function(){},getInitPanelDims:function(){return this.tableDims=this._calcTableDims(),{headerHeight:u(this.tableDims.heights)}},setPanelDims:function(t){var e=t.headerHeight;this.tableDims.headerHeight=e,this.tableDims.rowHeight=t.rowHeight,this.tableDims.rowNum=t.rowNum;var i=u(this.tableDims.heights);e>i&&(this.tableDims.heights=c(this.tableDims.heights,e)),this.bounds={x:t.x+t.pWidth,y:t.y,width:t.tWidth,height:t.height}},_calcTableDims:function(){var t=this._getHeaderHeights();return{heights:t}},_getHeaderHeights:function(){return this._getHeader().map(function(t){return T(t.style)*m})},calcSeries:function(t,e){var i=Number.MAX_VALUE,n=0,r={},a={},o=[];t.map(function(t){t.points.map(function(t){var h=t.options,u=A(h.startTime),c=A(h.finishTime),d=A(h.markTime);if(isNaN(u.getTime())||isNaN(c.getTime()))return void(t.isNull=!0);var f=t.options.processesId;if(null!=e[f]){if(t.progress=l.getValidProgress(h.progress),h.tooltip.follow=!0,!t.processes){var p=f,g=e[p];for(t.processes=[g.options];g=g.parent;)t.processes.unshift(g.options)}C(t.options.id)||(a[h.id]=t);var m=r[f]=r[f]||{min:Number.MAX_VALUE,max:0};d&&!isNaN(d.getTime())&&(o.push(t),m.min=P(m.min,d),m.max=L(m.max,d)),m.min=P(m.min,u,c),m.max=L(m.max,u,c),i=P(m.min,i),n=L(m.max,n),t.startTime=s(u),t.finishTime=s(c),t.markTime=s(d),t.duration=s.duration(c-u)}})}),this.domainMap=r,this.dateDomain=[i,n],this.idMap=a,this.markArray=o,i>n&&(this.dateDomain=[])},render:function(){if(this.dateDomain.length)if(this.view)this.view.render();else{this.view=new a(this,this.vanchart),this.view.render();var t=this._calcFirstViewMovement();this.view.changeInner({x:t})}},_calcFirstViewMovement:function(){var t=s(this.dateDomain[0]),e=_(this.level),i=+t.startOf(e),n=+t.add(-1,e);return this.scale(n)-this.scale(i)},renderContent:function(){this.dateDomain.length&&this.view.updateContent()},calcScale:function(){function t(t){if(p){var e=D[D.length-1];P.isWeekend()&&!t?(!e||e&&e.finish)&&D.push({from:w,finish:!1}):e&&!e.finish&&(e.to=w,e.finish=!0)}}if(this.dateDomain.length){var i=this._headerData={upLines:[],upTexts:[],subLines:[],subTexts:[]},n=this.tableDims.heights,r=u(n),a=this._getHeader(),o=this.dateDomain,h=this._getEm(),l=this.getLevel(),c=x(h,l),p=this.shouldShowWeekends(),g=v(l),m=_(l),y=s(o[0]),b=s(o[1]),T=s(y).startOf(m).add(-1,m),A=s(b).endOf(m).add(1,m),C=s(T).startOf(g),L=s(C),P=s(T),M=(L-T)*c,w=(P-T)*c,E=[M],S=[w],O=e.bind(null,L,g,T,c,E),k=e.bind(null,P,m,T,c,S),D=this._weekendsWidths=[],R=(A-T)*c;for(this.scale.domain([T,A]).range([0,R]),this.innerWidth=Math.max(R,this.bounds.width);w=L?(i.upLines.push({x1:M,y1:0,x2:M,y2:n[0]}),i.subLines.push({x1:w,y1:n[0],x2:w,y2:r}),B=d(L,l),I=O(),i.upTexts.push({style:a[0].style,left:M,right:I,x:(I+M)/2,y:n[0]/2,content:B}),M=I):i.subLines.push({x1:w,y1:n[0],x2:w,y2:r}),B=f(P,l),I=k(),i.subTexts.push({style:a[1].style,left:w,right:I,x:(I+w)/2,y:n[0]+n[1]/2,content:B}),w=I}t(!0)}},getLevel:function(){if(null==this.level){if(!this.dateDomain.length)return;var t=this.setLevel(this.options.zoomLevel);t||this.setLevel(this._guessLevel()),this.initLevel=this.level}return this.level},setLevel:function(t){return null==t||0>t||t>y-1?!1:(this.level=t,!0)},_guessLevel:function(){for(var t=this.dateDomain,e=this._getEm(),i=this.bounds.width,n=i/(t[1]-t[0]),r=y;--r>-1;){var a=x(e,r);if(n>a)break}return Math.max(0,r)},_getEm:function(){var t=this._getHeader(),e=s(),i=b(d(e,0),t[0].style).width+2*g,n=6*b(f(e,0),t[1].style).width,r=n/6;return i>n&&(r=i/6),r},isZoomEnabled:function(){return this.options.zoom},shouldShowWeekends:function(){return this.level>6&&this.options.showWeekends}});return r.register(r.TIMEAXIS,M),M}),define("chart/gantt/Link",["require","../../vans/VanChart","../../utils/PathGenerator","../../Constants"],function(t){function e(t,e){return t.filter(function(t){ - return t.type&&f[t.type.toLowerCase()]&&t.lineWidth&&e[t.from]&&e[t.from].isVisible()&&e[t.to]&&e[t.to].isVisible()}).map(function(t){return i(t,e)},this)}function i(t,e){var i=n(t,e),r={d:i.line},a={fill:"none",stroke:t.lineColor,"stroke-width":t.lineWidth,"stroke-dasharray":h.DASH_TYPE[t.dashStyle||"Solid"]},o={d:i.arrow},s={fill:t.lineColor,stroke:"none"};return{lineAttr:r,lineStyle:a,arrowAttr:o,arrowStyle:s}}function n(t,e){var i=t.type.toLowerCase(),n=r(i,0,e[t.from]),o=r(i,1,e[t.to]),s=n[1],h=o[0],d=s[0],f=h[0],p=l,g=[null,(s[1]+h[1])/2];if(s[1]===h[1])g=[s[0],s[1]-e[t.from].rect.height/2-c],p=u;else switch(i){case"fs":d>f&&(g[0]=f);break;case"ff":f>d&&(p=u);break;case"ss":d>f&&(p=u);break;case"sf":default:f>d&&(g[0]=f)}var m=n;return null!=g[0]&&m.push(g),m=m.concat(o),{line:p(m),arrow:a(o[1],i.charAt(1))}}function r(t,e,i){var n,r=t.charAt(e),a=i.rect,o=a.y+a.height/2,s=Math.max(a.height/2,2*d),h=["s"===r?a.x:a.x+a.width,o],l=[h[0]+("s"===r?-s:s),o];return n=e?[l,h]:[h,l]}function a(t,e){var i="M"+t[0]+","+t[1]+"l",n=d;return"s"===e&&(i+="-"),i+=n+","+n+"v-"+2*n+"z"}var o=t("../../vans/VanChart"),s=t("../../utils/PathGenerator"),h=t("../../Constants"),l=s.line().interpolate("step-before"),u=s.line().interpolate("step-after"),c=2,d=3,f={};f.fs=f.ff=f.sf=f.ss=!0,o.include({renderLinks:function(){this._linksGroup&&this._linksGroup.remove(),this._linksGroup=this._links=null;var t=this.options.plotOptions.links;if(t&&t.length&&(this._linksGroup||(this._linksGroup=this.renderer.group().addTo(this.clipSeriesGroup)),!this._links)){this._links=e(t,this.getTimeAxis().idMap);var i=this._linksGroup,n=this.renderer;this._links.map(function(t){t._line=i.append(n.path().attr(t.lineAttr).style(t.lineStyle)),t._arrow=i.append(n.path().attr(t.arrowAttr).style(t.arrowStyle))})}}})}),define("chart/gantt/Mark",["require","../../vans/VanChart","../../utils/PathGenerator","../../Constants","../../utils/BaseUtils"],function(t){function e(t,e,i,n,s){var h=t.group().attr("transform",o(e));if(r.isImageMarker(n)){var l=i,u=i;h.image=t.image({preserveAspectRatio:"none",x:-l/2,y:-u/2,width:l,height:u}),h.image.imageContent(n),h.append(h.image)}else{var c=a(n,i/2);h.append(t.path().attr("d",c).style({stroke:"none",fill:s}))}return h}var i=t("../../vans/VanChart"),n=t("../../utils/PathGenerator"),r=(t("../../Constants"),t("../../utils/BaseUtils")),a=n.getMarkerPath,o=r.makeTranslate;i.include({renderMarks:function(){if(this._marksGroup&&this._marksGroup.remove(),this._marksGroup=this._marks=null,this._marksGroup||(this._marksGroup=this.renderer.group().addTo(this.clipSeriesGroup)),!this._marks){var t=this.getTimeAxis(),i=t.markArray,n=t.scale,r=this._marksGroup,a=this.renderer;i.map(function(t){if(t.visible&&t.series.visible){var i=t.rect.height,o=n(t.markTime),s=t.rect.y+.5*i;r.append(e(a,[o,s],i,t.options.markType,t.options.markColor))}})}}})}),define("dateUnits/locale/zh-cn",[],function(){return{_locale:"zh-cn",duration:{year:"\u5e74",month:"\u6708",day:"\u5929",hour:"\u5c0f\u65f6",minute:"\u5206\u949f",second:"\u79d2"},halfYears:["\u4e0a","\u4e0b"],quarters:"\u4e00\u5b63\u5ea6_\u4e8c\u5b63\u5ea6_\u4e09\u5b63\u5ea6_\u56db\u5b63\u5ea6".split("_"),months:"\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".split("_"),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".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u5468\u65e5_\u5468\u4e00_\u5468\u4e8c_\u5468\u4e09_\u5468\u56db_\u5468\u4e94_\u5468\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),meridiem:["\u4e0a\u5348","\u4e0b\u5348"],qDay:"0~6\u70b9_6~12\u70b9_12~18\u70b9_18~24\u70b9".split("_"),base:function(t,e){t("www",0,0,function(){return this.week()+"\u5468"})}}}),define("locale/zh-cn",["require"],function(t){return{_locale:"zh-cn",startTime:"\u5f00\u59cb",finishTime:"\u7ed3\u675f",duration:"\u6301\u7eed",progress:"\u8fdb\u5ea6",ganttLevels:[["yyyy[\u5e74]","N"],["yyyy[\u5e74]","N"],["yyyy[\u5e74]","QQQ"],["yyyy[,]N","MM"],["yyyy[,]QQQ","MMM"],["yyyy[,]QQQ","MMM"],["yyyy[\u5e74]MM[\u6708]","www"],["yyyy[\u5e74]MM[\u6708]dd[\u65e5]","eeeeee"],["yyyy[\u5e74]MM[\u6708]","d"],["MMM","d"],["MM[\u6708]dd[\u65e5]","a"],["MM[\u6708]dd[\u65e5]","I"],["MM[\u6708]dd[\u65e5]","H"]]}}),define("chart/gantt/Gantt",["require","../../Constants","../../vans/VanChart","../../vans/VanChartLayout","../../ComponentLibrary","../../utils/BaseUtils","../../locale/localeText","./GanttSeries","./LevelBar","./Processes","./TimeAxis","./Link","./Mark","../../dateUnits/locale/zh-cn","../../locale/zh-cn","../../dateUnits/dateUnits","../../vans/VanChartLibrary"],function(t){var e=t("../../Constants"),i=t("../../vans/VanChart"),n=t("../../vans/VanChartLayout"),r=t("../../ComponentLibrary"),a=t("../../utils/BaseUtils"),o=t("../../locale/localeText");t("./GanttSeries"),t("./LevelBar"),t("./Processes"),t("./TimeAxis"),t("./Link"),t("./Mark"),t("../../dateUnits/locale/zh-cn"),t("../../locale/zh-cn");var s=r.PROCESSES,h=r.TIMEAXIS,l=r.LEVELBAR,u=Math.max,c=10,d=i.extend({vanChartType:e.GANTT_CHART,initialize:function(e){if(e.language){var n=o.normalizeLocale(e.language);if(!/^en/.test(n)){var r=t("../../dateUnits/dateUnits"),a=t("../../dateUnits/locale/"+n);r.setLocale(a);var s=t("../../locale/"+n);o.setLocale(s)}}i.prototype.initialize.apply(this,arguments),this.handler.on("resizeEnd",this.onResizeEnd,this)},refresh:function(t){if(this.getTimeAxis()){this.remove();var e=this;e.panBounds=e.backGroup=e.processesGroup=e.timeaxisGroup=e.frontGroup=null,r.ComponentsOrder.map(function(t){t in e.components&&(e.components[t].remove(),e.components[t]=null)}),e.components={},this.initialize(t,this.wrapDom,this.vancharts)}else i.prototype.refresh.call(this,t)},resize:function(){this.refresh(this.options)},layoutComponentsAndCharts:function(){var t=this;t.bounds=t._getDefaultBounds(),r.ComponentsOrder.map(function(e){e in t.components&&t.components[e].doLayout()});var e=this.getProcesses(),i=this.getTimeAxis();if(!this.panBounds){var a=this._calcDims(e,i);this.panBounds=this._calcPanBounds(a),this.resizeBounds=this._calcResizeBounds(a),e.setPanelDims(a),i.setPanelDims(a)}i.calcSeries(this.series,e.procMap),i.calcScale(),n.calculateSeries(this),n.calculateSeriesShapes(this),this.render()},render:function(){this.vancharts.endLoading();var t=this,e=this.renderer;["backGroup","processesGroup","timeaxisGroup","frontGroup"].forEach(function(i){if(!t[i]){var n=t[i]=e.group().addClass(i).add();if("processesGroup"===i||"timeaxisGroup"===i){var r=i+"-body";n=t[r]=n.append(e.group().addClass(r)),r=i+"-inner-body",t[r]=n.append(e.group().addClass(r))}}});var i=t["timeaxisGroup-inner-body"];["clipSeriesGroup","seriesGroup","seriesTextRenderGroup"].forEach(function(n){t[n]||(t[n]=i.append(e.group().addClass(n)))});var n=this.getTimeAxis();this._addDivClipGroup({x:0,y:0,width:n.bounds.width,height:n.bounds.height-n.tableDims.headerHeight}),this.seriesTextDivGroup.attr("transform",a.makeTranslate([n.bounds.x+this.bounds.x,n.tableDims.headerHeight+this.bounds.y])),this._renderBackground(),this.renderSeries(),this.renderLinks(),this.renderMarks(),this.renderComponents();var r=this.getComponent(l);r&&r.setLevel(this.getTimeAxis().getLevel()),this._consoleDone()},changeToLevel:function(t){var e=this.getTimeAxis(),i=e.getLevel();t!==i&&(e.setLevel(t),e.calcScale(),e.renderContent(),this.reRenderWholePlot())},reRenderWholePlot:function(){n.calculateSeriesShapes(this),this.renderSeries(),this.renderLinks(),this.renderMarks(),this.getComponent(r.LEGEND_COMPONENT).render()},_calcDims:function(t,e){var i=this.bounds,n=i.width,r=t.getInitPanelDims(),a=r.width,o=r.headerHeight,s=e.getInitPanelDims(),h=n-a;o=u(o,s.headerHeight);var l=r.rowHeight*r.rowNum,c=i.height-o,d=r.rowNum;return c>l&&(d=Math.floor(c/r.rowHeight)),{x:i.x,y:i.y,pWidth:a,tWidth:h,height:i.height,headerHeight:o,rowHeight:r.rowHeight,rowNum:d}},getProcesses:function(){return this.getComponent(s)},getTimeAxis:function(){return this.getComponent(h)},isResizeEnabled:function(){return this.getComponent(s).options.resize},_calcPanBounds:function(t){return{x:t.x,y:t.y,width:t.pWidth+t.tWidth,height:t.height}},_calcResizeBounds:function(t){return{x:t.x+t.pWidth-c/2,y:t.y,width:c,height:t.height}},onResizeEnd:function(){this.resizeBounds.x=this.getTimeAxis().bounds.x-c/2},onScrollY:function(t){this.fire("moveY",t)}});return t("../../vans/VanChartLibrary").register(e.GANTT_CHART,d),d}),define("utils/LoadingUtils",[],function(){function t(t,e){if(e=e||"loading-div-id",e+=" loading-div-id",!i[e]&&!document.getElementById(e)){var n=document.createElement("div"),r=document.createElement("div");n.id=e,n.style.backgroundColor="white",n.style.opacity=.75,n.style.filter="alpha(opacity=75)",n.style.position="absolute",n.style.width="100%",n.style.height="100%",n.style.left=0,n.style.top=0,n.style.zIndex=9999,(void 0!=r.style.animation||void 0!=r.style.webkitAnimation)&&(r.style.left="50%",r.style.top="50%",r.className="loader-inner ball-scale-ripple-multiple",r.innerHTML="
      "),n.appendChild(r),t.appendChild(n),i[e]=n}}function e(t,e){if(e=e||"loading-div-id",e+=" loading-div-id",i[e])t.removeChild(i[e]),i[e]=null;else{var n=document.getElementById(e);n&&t.removeChild(n)}}var i={};return{startLoading:t,endLoading:e}}),define("component/Tooltip",["require","./Base","../utils/BaseUtils","../Constants","../utils/ColorUtils","../ComponentLibrary","./FormattedText"],function(t){var e=t("./Base"),i=t("../utils/BaseUtils"),n=(t("../Constants"),t("../utils/ColorUtils")),r=t("../ComponentLibrary"),a=t("./FormattedText"),o=.4,s=e.extend({_gCssText:"position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:2000;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none;pointer-events:none;",_style:function(t){if(!t)return"";var e=[];if(t.animation&&!t.follow){var r="left "+o+"s,top "+o+"s";e.push("transition:"+r),e.push("-moz-transition:"+r),e.push("-webkit-transition:"+r),e.push("-o-transition:"+r)}if(t.style){var a=i.cssNormalization(t.style);for(var s in a)"color"==s?e.push(s+":"+n.colorToHex(a[s])):e.push(s+":"+a[s])}if(t.backgroundColor)if("string"==typeof t.backgroundColor)if(i.isSupportSVG())e.push("background-Color:"+t.backgroundColor);else{var h=n.colorToHexAlpha(t.backgroundColor),l="#"+("0"+(255*h.alpha|0).toString(16)).slice(-2)+h.hex.replace("#","");e.push("filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+l+", endColorstr="+l+", GradientType=0)")}else if("object"==typeof t.backgroundColor){var u=t.backgroundColor,c=n.colorToHex(u.startColor),d=n.colorToHex(u.endColor),f="left",p="left top",g="right top",m=1;u.x1==u.x2&&(f="top",p="left top",g="left bottom",m=0),e.push("background: -ms-linear-gradient("+f+", "+c+", "+d+")"),e.push("background-image: -moz-linear-gradient("+f+", "+c+", "+d+")"),e.push("background-image: -webkit-gradient(linear, "+p+", "+g+", color-stop(0, "+c+"), color-stop(1, "+d+"))"),e.push("filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+c+", endColorstr="+d+", GradientType="+m+")")}null!=t.borderWidth&&e.push("border-width:"+t.borderWidth+"px"),null!=t.borderColor&&e.push("border-color:"+t.borderColor),null!=t.borderRadius&&(e.push("border-radius:"+t.borderRadius+"px"),e.push("-moz-border-radius:"+t.borderRadius+"px"),e.push("-webkit-border-radius:"+t.borderRadius+"px"),e.push("-o-border-radius:"+t.borderRadius+"px")),t.shadow&&e.push("box-shadow:1px 1px 2px rgba(0,0,0,0.2)");var v=t.padding;return null!=v&&void 0!=v&&(v=i.reformCssArray(v),e.push("padding:"+v[0]+"px "+v[1]+"px "+v[2]+"px "+v[3]+"px")),e=e.join(";")+";"},doLayout:function(t){this._tDom||(t=t||this.vanchart.getDivParentDom(),this._tDom=document.createElement("div"),this._hiddenDom=document.createElement("div"),this._tDom.onselectstart=function(){return!1},this._tDom.style.position="absolute",this._hiddenDom.style.visibility="hidden",t.appendChild(this._tDom),t.appendChild(this._hiddenDom),this._tooltipHideTick=null)},remove:function(){if(this._tDom){var t=this.vanchart.getDivParentDom();t.removeChild(this._tDom),t.removeChild(this._hiddenDom)}},showWithPoint:function(t,e,n){if(t&&t.options.tooltip&&t.series.vanchart.renderer){var r=n||t,o=r.options.tooltip,s=t.series,h=a.tooltipGenerator(r),l=this.calculateTooltipDivDim(o,h),u=s.getTooltipPos(t,l,e);u&&(this._show(u,o,h),this._tooltipRect=i.makeBounds(u,l))}},_getTooltipText:function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");return t.indexOf("Trident/7.0")>0||t.indexOf("Edge/")>0||e>0&&10===parseInt(t.substring(e+5,t.indexOf(".",e)),10)?function(t){t+="";for(var e,i="",n=!0,r=-1,a=t.length;++r"===e&&(n=!0),i+=e;return i}:function(t){return t}}(),_show:function(t,e,i){t&&e&&i&&!this.vanchart.isMouseDown&&(clearTimeout(this._tooltipHideTick),this._tDom.innerHTML=this._getTooltipText(i),this._tDom.style.cssText=this._gCssText+this._style(e)+"left:"+t[0]+"px;top:"+t[1]+"px;")},hide:function(){clearTimeout(this._tooltipHideTick),this._tooltipHideTick=setTimeout(function(){this._tDom.style.display="none"}.bind(this),400)},immediateHide:function(){this._tDom.style.display="none"},calculateTooltipDivDim:function(t,e){t=t||"";var i=this._hiddenDom;i.innerHTML=e,i.style.cssText=this._gCssText+this._style(t)+"visibility:hidden;";var n=i.offsetWidth,r=i.offsetHeight;return{width:n,height:r}},render:function(){}});return r.register(r.TOOLTIP_COMPONENT,s),s}),define("Carousel",["require","./utils/BaseUtils","./utils/QueryUtils","./dom/DomUtils","./utils/ColorUtils","./utils/PathUtils","./Constants","./utils/BezierEasing","./vector/SvgRenderer","./vector/VmlRenderer","./component/Tooltip"],function(t){function e(t){var e=t.title;return e.text&&e.useHtml?c.getPlainText(e.text):e.text||""}function i(t,e){Object.keys(e).map(function(i){"string"==typeof e[i]&&(t.style[i]=e[i])})}function n(t){var e=p.getRGBAColorArray(t),i=p.rgb2hsb(e[0],e[1],e[2]);return p.toColor(p.hsb2rgb(i[0],.85*i[1],100*(i[2]+.15)/115),"hex")}function r(t){var e=p.getRGBAColorArray(t),i=p.rgb2hsb(e[0],e[1],e[2]);return p.toColor(p.hsb2rgb(i[0],.75*i[1],100*(i[2]+.25)/125),"hex")}function a(t,e){var i=t.className.split(" ");-1===i.indexOf(e)&&(t.className+=" "+e)}function o(t,e){var i=t.className.split(" "),n=i.indexOf(e);-1!==n&&(i.splice(n,n),t.className=i.join(" "))}function s(t,e,i){if(c.isSupportSVG()){var n=""+C[e]+"";t.innerHTML=n,t.querySelector("g").setAttribute("fill",i),e===m.RADAR_CHART&&t.querySelector("g").setAttribute("stroke",i)}else t.innerHTML=''}function h(t,e){if(c.isSupportSVG())t.style.background=e,t.innerHTML='';else{var i=u("shape");i.path=g.circlePath(15,15,15),i.stroked="False",i.fillcolor=e;var n=u("fill");n.color=e,n.opacity=.5,i.appendChild(n),t.appendChild(i);var r=u("shape");r.path=/vanchart-arrow-left/.test(t.className)?"m19,22 l9,15 l19,9 e":"m11,22 l21,15 l11,9 e",r.filled="False",r.strokecolor="#ffffff",t.appendChild(r),Hammer.on(t,"mouseover",function(){n.opacity=.2}),Hammer.on(t,"mouseout",function(){n.opacity=.5})}}function l(t){var e=u("shape");e.style.width="100%",e.style.height="100%",e.coordsize="10 10",e.path=g.circlePath(5,5,5),e.stroked="False",e.fillcolor="#7f7f7f";var i=u("fill");i.color="#7f7f7f",i.opacity=.5,e.appendChild(i),t.appendChild(e)}function u(t){var e=_.prototype.create(t);return e.style.cssText=P,e.coordsize="1 1",e}var c=t("./utils/BaseUtils"),d=t("./utils/QueryUtils"),f=t("./dom/DomUtils"),p=t("./utils/ColorUtils"),g=t("./utils/PathUtils"),m=t("./Constants"),v=t("./utils/BezierEasing"),_=(t("./vector/SvgRenderer"),t("./vector/VmlRenderer")),y=t("./component/Tooltip"),x=3.4375,b={type:m.BUTTON,color:"#7f7f7f",interval:1e3,style:{fontSize:"16px",color:"#ffffff"}},T={borderWidth:1,borderColor:"#000000",borderRadius:2,backgroundColor:"rgba(255, 255, 255, 0.5)",padding:5,shadow:!0,animation:!0,style:{fontSize:"12px",fontFamily:"MicrosoftYaHei, sans-serif",color:"#515151"}},A=function(t){function u(i,n){var r=e(i),a=N[n];return a.mText&&(a.mText.textContent?a.mText.textContent=r:a.mText.innerText=r,R(a)),a._title=r,w(i,t.charts[n],Y[n],n)}function g(t,e,o){t&&t.switchStyle||D();var s=t.options,l=d.merge(b,t.switchStyle,!0);c.isSupportSVG()||l.style.color&&(l.style.color=p.colorToHex(l.style.color)),I=o,B=l.type,Z=s.length,G=G||f.create("div","vanchart-menu",o),U=U||f.create("div","vanchart-cc",o),o.style.overflow="hidden",$.doLayout(o);var u=l.color;switch(e.splice(Z).map(function(t){t.remove()}),N.splice(Z).map(function(t){f.remove(t)}),Y.splice(Z).map(function(t){f.remove(t)}),a(U,"van-ani"),q=q>=Z?0:q,B){case m.CAROUSEL:G.style.bottom=0,G.style.height="18px",G.style.width="100%",G.mWrap=G.mWrap||f.create("div","vanchart-menu-wrap",G),U.style.cssText="top:0;bottom: 18px;left:"+100*-q+"%;width:"+100*Z+"%",c.isSupportSVG()||(U.style.height=I.clientHeight-18+"px"),H=H||f.create("div","vanchart-arrow-wrap",o),z=z||f.create("div","vanchart-arrow-wrap",o),z.style.right=0;var g=H.arrowLeft=H.arrowLeft||f.create("div","vanchart-arrow vanchart-arrow-left",H),v=z.arrowRight=z.arrowRight||f.create("div","vanchart-arrow vanchart-arrow-right",z);h(g,u),h(v,u);var y=l.interval;return J.left&&J.left.off("tap"),J.left=J.left||new Hammer(g),J.left.on("tap",function(t){t.preventDefault(),D(y);var e=(Z+q-1)%Z;S(e,m.LEFT),O(e)}),J.right&&J.right.off("tap"),J.right=J.right||new Hammer(v),J.right.on("tap",function(t){t.preventDefault(),D(y);var e=(q+1)%Z;S(e,m.RIGHT),O(e)}),J.dom&&J.dom.off(o,"mouseover mouseout"),J.dom=Hammer.on(o,"mouseover",function(){D()}).on(o,"mouseout",function(){D(y)}),D(y),_(s,e);case m.BUTTON:default:var T=n(u),A="width:100%;top:0;background-color:"+u+";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="+T+", endColorstr="+p.colorToHex(u)+", GradientType=0);";A+="background-image: -webkit-gradient(linear, left top, left bottom, from("+T+"), to("+u+"));",A+="background-image: -moz-linear-gradient(top"+T+", "+u+");",A+="background-image: -webkit-linear-gradient(top"+T+", "+u+");",A+="background-image: linear-gradient(to bottom"+T+", "+u+");",G.style.cssText=A,i(G,l.style),K=c.getTextHeight(l.style);var C=K*x;return U.style.cssText="left:"+100*-q+"%;top:"+C+"px;bottom: 0;width:"+100*Z+"%",c.isSupportSVG()||(U.style.height=I.clientHeight-C+"px"),L(s,e,l.style.color,r(u))}}function _(t,e){F=F||f.create("div","vanchart-chart",U),F.style.width=100/Z+"%",F.style.marginLeft=-100/Z+"%",et&&(F.style.width=I.clientWidth+"px",F.style.marginLeft=-I.clientWidth+"px");var i=t.map(function(t,i){return A(t,i),w(t,e[i],Y[i],i)});return W=W||f.create("div","vanchart-chart",U),W.style.width=100/Z+"%",W.style.marginRight=-100/Z+"%",et&&(W.style.width=I.clientWidth+"px",W.style.marginLeft=-I.clientWidth+"px"),i}function A(t,i){var n=e(t),r=N[i];if(!Y[i]){if(Y[i]=f.create("div","vanchart-chart",U),N[i]=r=f.create("div","vanchart-menu-dot",G.mWrap),!c.isSupportSVG()){r.style.background="none";var o=f.create("div","vanchart-menu-dot-ie",r);l(o)}i||a(r,"van-on")}r._title=n,r.i=i,Hammer.on(r,"mouseover",function(){C(r)}),Hammer.on(r,"mouseout",function(){$.immediateHide()}),new Hammer(r).on("tap",function(t){t.preventDefault(),S(i),O(i)})}function C(t){var e=$.calculateTooltipDivDim(T,t._title),i=[I.clientWidth/2-(Z-1)/2*16+16*t.i-e.width/2,I.clientHeight-18-e.height];i[0]=Math.min(Math.max(i[0],0),I.clientWidth-e.width),$._show(i,T,t._title)}function L(t,e,i,n){return t.map(function(t,r){return P(t,r,i,n),w(t,e[r],Y[r],r)})}function P(t,i,n,r){var a=e(t),o=N[i];if(Y[i]||(Y[i]=f.create("div","vanchart-chart",U),N[i]=o=f.create("div","vanchart-menu-btn",G),o.mIcon=f.create("span","vanchart-menu-icon",o),o.mText=f.create("span","vanchart-menu-text",o),c.isSupportSVG()||o.insertAdjacentHTML("afterBegin",''),i||(o.style.background=r)),s(o.mIcon,t.chartType,n),o.style.width=100/Z+"%",!c.isSupportSVG()){var h=I.clientWidth/Z;et&&(h-=2*K+1),o.style.width=h+"px",0!==o.offsetTop&&(o.style.width=h-1+"px")}o.mText.textContent?o.mText.textContent=a:o.mText.innerText=a,o._title=a,o.i=i,R(o),Hammer.on(o,"mouseover",function(){o.style.background=r,M(o)}),Hammer.on(o,"mouseout",function(){q!==i&&(o.style.background=""),$.immediateHide()}),new Hammer(o).on("tap",function(t){t.preventDefault(),N[q].style.background="",N[i].style.background=r,O(i)})}function M(t){var e=!1;if(e=c.isSupportSVG()?t.scrollWidth>t.clientWidth:t.scrollWidth>=t.clientWidth,e||""===t.mText.innerHTML){var i=$.calculateTooltipDivDim(T,t._title),n=[I.clientWidth*(t.i+.5)/Z-i.width/2,t.offsetHeight];n[0]=Math.min(Math.max(n[0],0),I.clientWidth-i.width),$._show(n,T,t._title)}}function w(e,i,n,r){if(n.style.width=100/Z+"%",!c.isSupportSVG()||n.offsetLeft=n?(u=h,t.style[e]=u+l):(u=o+(h-o)*r(c/n),t.style[e]=u+l,c+=d,Q=window.setTimeout(a,d))}window.clearTimeout(Q);var o=parseFloat(t.style[e])||0,s=i.match(/([\d.E-]+)(.*)/i),h=+s[1],l=s[2],u=o,c=0,d=17;a()}function D(t){window.clearInterval(j),t&&(j=window.setInterval(function(){var t=(q+1)%Z;S(t,m.RIGHT),O(t)},t))}function R(t){t.clientWidth<=22+3*K&&(t.mText.innerHTML="",t.mText.style.marginLeft=0,et||(t.style.padding=0))}var B=null,I=null,G=null,N=[],H=null,z=null,U=null,F=null,V=null,W=null,X=null,Y=[],q=0,Z=0,j=null,Q=null,K=0,J={left:null,right:null,dom:null},$=new y({},m.TOOLBAR_COMPONENT,{}),tt="transition"in document.getElementsByTagName("body")[0].style,et=/MSIE 7/.test(navigator.userAgent);return{init:g,refresh:u}},C={};C[m.PIE_CHART]=' ',C[m.BAR_CHART]=' ',C[m.COLUMN_CHART]=' ',C[m.LINE_CHART]='',C[m.AREA_CHART]=' ',C[m.GAUGE_CHART]=' ',C[m.RADAR_CHART]=' ',C[m.SCATTER_CHART]=' ',C[m.BUBBLE_CHART]=C[m.FORCE_BUBBLE_CHART]=' ',C[""]=' ',C[m.MULTIPIE_CHART]=' ',C[m.AREA_MAP]=C[m.HEAT_MAP]=C[m.POINT_MAP]='', - C[m.TREEMAP_CHART]=' ',C[m.FUNNEL_CHART]=' ',C[m.GANTT_CHART]=' ',C[m.STRUCTURE_CHART]='';var L={};L[m.PIE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWBAMAAAA2mnEIAAAAMFBMVEUAAAD///////////////////////////////////////////////////////////87TQQwAAAAD3RSTlMAEM/vv4Bgr59AcFAg348jFhddAAAAjElEQVQY02MAArGSDx6JDGDAav//w//PASAmo/5/IPv/JwEgW/g/mP1fEcjWh7I/AVX/h7L/L2AQhrMvMOTD2b8Z6uHsfwz+ULZK1ByG/2B25smtLfYQ9hewLEQNRACoFwZ+AM2EgW9Au2DAkIEVzg6AuO0/xG1wRYpgv0CEBaB+/A/2I8Tv/zVAfgcA4kmspsM258YAAAAASUVORK5CYII=",L[m.BAR_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWBAMAAAA2mnEIAAAAElBMVEUAAAD///////////////////8+Uq06AAAABXRSTlMAQIAgEDB5ccoAAAA+SURBVBjTY0AGoqGhgTjZBICjoKCgCFw9SAMm20hJSUkZlwFwNWAgANELBgrobEdBMDDAZQZEPRQI4GQjAwAQhxXw9o2YjgAAAABJRU5ErkJggg==",L[m.COLUMN_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWBAMAAAA2mnEIAAAAG1BMVEUAAAD////////////////////////////////rTT7CAAAACHRSTlMAgEC/IGCPMNAZ/cwAAAAuSURBVBjTY4ADRSEEW6KRALvYDMHWaCbAtmgiwHZSgbOBiG5skJcDRRgcRYEMADB5J9shBWGXAAAAAElFTkSuQmCC",L[m.LINE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAM1BMVEUAAAD///////////////////////////////////////////////////////////////+3leKCAAAAEHRSTlMA74C/IM9AEN+vYDCfcFCP7HfXwgAAAG9JREFUGNPNjzsOxDAIRA0Yf+J1du5/2siKIQ1dmlA9PQ2gSa8nHznSBIo0gOgGlAPdm+M4HQuK4Qn8jEU88QdoZw6MZ0+lQ/Li5muDFpYGrokpu9UbJjUmtqaqdQeqAN2aYln7hx41nbwzLDN9Yi4tRQMa2y+S7gAAAABJRU5ErkJggg==",L[m.AREA_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAgklEQVR42mL4DwQMtACjBg8zg4FCBhRbiMPg+f8hIIFqBiMZCgMGFBuMxVAQeE+q4UD1AnCDgVT/f9zgPlgxcYaC4uc8Ayws/xMG5wkZDjX0Pdix/0kD8/EY6gAzlByDsRqOzcfkGIySDHEFIyMFGWEClC7AJslIqyw9avAQNhggwABVPsGVrLOsUQAAAABJRU5ErkJggg==",L[m.GAUGE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWBAMAAAA2mnEIAAAAMFBMVEUAAAD///////////////////////////////////////////////////////////87TQQwAAAAD3RSTlMAgL9A3zAQn89wII/vr2A5/8HrAAAAnUlEQVQY02NAA5kq/52mQZjZ/0FgG4jJ6v/fXbDk/5cAIDvmvzJDKIPR/6MMDGz+HxkYjBkY5L8kMLD/FwCzGf8XMKz/xABmM+j/Ytj/GUjPBGL73wz9DUBaEIg5fjAAlYPYIA0M/ydA2ZxA9gMgfQaI+f5D1NyFqOm/AHUh7w+G/b+g7PXfGeK/Q9n1XxmYtKDsRQoMbHAvJTAQAQCj4DRASabatgAAAABJRU5ErkJggg==",L[m.RADAR_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAM1BMVEUAAAD///////////////////////////////////////////////////////////////+3leKCAAAAEHRSTlMAEO+A32DPr7+fQFAwIHCP1A0rdQAAAMpJREFUGNOFUFlyRCEIlEXcfdz/tAHxVSr5mOmyQJu2UdI39Mob/pOjcuOK9KeQmbPJbd3CS3oqblWQVpiqnEx00tYnjlXqemlo+ISqZHhwBN25AOih0aQDGxhNuI2QbmGh16ByKSLT9w/FAw6aar0v89zItKMhqzJan3tf8i4qe3aWvHxLE81LQ5IKZU7nImu2Y3gvhcQjvBGsLHTat9srTZ0n+V8Ap4fuYd+h4rxCMkNp6YIEwhZwNfkdeWG+fxIfxQsQfdHTB/wA4h0GZUKWX6QAAAAASUVORK5CYII=",L[m.SCATTER_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAgUlEQVR42mJgGAVA8P//fwFaGFoAxP8ZaWCwAZByGHRhCPYuEKyntsH7oQb/x6WGhUyzF0LpCyMnoRtAkw+6uAMQnwdFIrlhfB5Ko6d3BSA2IDuMgS6aD8T9eDICeV6mNBzn/0eA+dQ0GB1QxeVMtExSDTQJCljBDMQKI7t6AggwAFyzgSCZYutPAAAAAElFTkSuQmCC",L[m.BUBBLE_CHART]=L[m.FORCE_BUBBLE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAnUlEQVR42mJgGAVQwEiswv///ysAqQQodwIjI+MHqrgAaPD7/wiwn1qGOvxHA1QLM1JdzEKC2YbIYUz31AANNgFqG9oPDar3TFR2sAGUFoCnUSCeD4oUKG1AposNgHg9ECdgTUpQEEBpuNzHYfB9Sg3GBwzINZdQ5H0YlEFhgJZd/0P5BhQXm9CckgBNfyDvbwAWiw9GaxWqAIAAAwA2evfwKvysMwAAAABJRU5ErkJggg==",L[""]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAM1BMVEUAAAD///////////////////////////////////////////////////////////////+3leKCAAAAEHRSTlMAQL/PMBBwgCDvn49gUN+vfvzE8AAAAGJJREFUGNPdjUEOgDAIBFkordpW+f9rNdqUQ3mBeyBhMiwURBNFYQu4HsK60E1aUNAlA+7sUgpQmdXMZh/vDORyPs8cJ+l4T7dEjhsPB8DE+bh0LD4IJkRO3K7Agj/xTzjKDUJoCsaJEKt8AAAAAElFTkSuQmCC",L[m.MULTIPIE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAe1BMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////NgkbwAAAAKHRSTlMAMpkDn0AnIBSz24Dmv4dKOhoQCuzKrJqMLfnyuaZ5dGZaUkIN0pRsCVisMQAAAOZJREFUGNN90dtygyAUhWHWEhA0Gg8xappz0pb3f8LKdkrTXvS/45s9DHtQL8G6TP0qcxYKS3n2gm0UVX9ugblPatFca63IsX4AfdLtB0nF2BbIhHPcNVkV6jBo8Txqj2bkfheCCmG3eA08ZfhC/RYii483GZ9BDkF4qSBLYGE8NDeJw4mUx+DGlU2ssdY9ZeWrFl7bkHcI48gicUHdCFt4+sRHTrCRHcoT33+GL3Cy+wxPVvHlh4Hcfy/fwXi9nL0ntTfo1JqDmSrGqglxxeQw57Iszwbx4lSWYy3/+2td27ad4D99Ae8gE70h03waAAAAAElFTkSuQmCC",L[m.AREA_MAP]=L[m.HEAT_MAP]=L[m.POINT_MAP]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAA5ElEQVR42mJgGHHg////AkDsAMQK1DZ4/38IeE/QcJACIDYgwlAHqIH/kQxvAOLz2BTPB0kA8X1CLoC6FtlgOEBXiA76QWGIx1cO/7GDfpCCAqjzcYH76MEC4hNQr8CAyys4QANUIzqAmbEe7kMcCkkF76HxooCeDqkB1mNLMtQAAdhyznkqGHwfawoikDKIBQ64EnwA1Ob9aLFNLFBgIDK7CpAQByDHNMD0s+AymJGR8QDUgngiyqIHQHwQiPlJLcHeIwXRe7QI+w/1mQLOMCZU7iKxQWXIfVoU7uS5blADgAADACOwXahZ5pbvAAAAAElFTkSuQmCC",L[m.TREEMAP_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAOUlEQVR42mL8DwQMRABGIAAqnclAJGBioBEYNXjU4FGDh5XBLEDMRyuD1YhUe3Y08kYNHqQGAwQYAL9YCMfrIWhGAAAAAElFTkSuQmCC",L[m.FUNNEL_CHART]="iVBORw0KGgoAAAANSUhEUgAAABcAAAAXBAMAAAASBMmTAAAAKlBMVEUAAAD///////////////////////////////////////////////////+Gu8ovAAAADXRSTlMAQMCAIGAw0FAQ8HCwS1BQUgAAAHVJREFUGNNjwA2Y78LAZQYGDjjnKgMDC5xzDahuLYxzAcjRhXEKgJxEQShIAHIcYRwHIGcvTFkAkOML40wActih7DsgJ3Aj7ETYehPsuloIRwHT3UlKYNAAZMKMuzUBzGFEGAZxKkJ/LojjAOWwGhsbW2CYCwC1z2uuESf9qgAAAABJRU5ErkJggg==",L[m.GANTT_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAeFBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////GqOSsAAAAJ3RSTlMABOgQCPvZzN3OhMOofnrCZD03jzDs0ryWiXNsXyUjDd9TUkQqHhgfRKpZAAAAmElEQVQY043P2Q6DIBRF0SsiKMrgXKfamf//w1qxQJo0uh73y8kBmEMDYxyA9SI1WrGB310+R9o4ie7mZW1zeXU5bBuaLKhQfQ4HBB7bgKOGbOJuqL45007G8p3MahJvLmVfLcXAjtncE8BEE3NrZXOhfXv5gXxgzaEH/nu2qZQyXUiajUqNavpdQ5wxVuafXEWWJoJzwYo3Z10TfT0w3LEAAAAASUVORK5CYII=",L[m.STRUCTURE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAhFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8g2+bRAAAAK3RSTlMAA/v3JXcSB9yNRSycF/Dsu7akmJSCTTMOC9HEwKWIWTof4taqoH1wZ1Ydf35d9gAAAO1JREFUGNNVUAlygzAMlA+wMZAQroTc6d3q///rYkHcahikWe+sdkVSitbhOQ2vOyu4/KUyZj4+0ft+gc9sNJdCnBrmSuCCNfuDkDPMHCIlbzS/k1MoUIzhG+D5s/UlKjr6wp6XHJhsHysVxh8K1b3vxJV4bTfM277LV5fSc88aywqalORZHRiGiW2UTfAFGErP9pVbnhz1wvZxT7rSnhEVS6+WqMzGiE7h8TiBzV1Z+fYTUwHcejan2mZDmCN/MPQ2NVEbu+g5oiPkNLQauaBTEvkKtR2mm/R0/3MR7/n9Nhz+xPifP0GL93SGVL8LLRIgop0Y4gAAAABJRU5ErkJggg==";var P="position:absolute;width:1px;height:1px;behavior:url(#default#VML);";return A}),define("VanCharts",["require","./vans/VanChart","./vans/VanChartMap","./vans/VanChartForceBubble","./vans/VanChartWordCloud","./vans/VanChartStructure","./chart/gantt/Gantt","./utils/BaseUtils","./Constants","./utils/LoadingUtils","./Carousel","./vans/VanChartLibrary"],function(t){function e(t){s.initConst();var e=t.getAttribute(h.INSTANCES_KEY);e||(e=h.INSTANCES_KEY+d++,t.setAttribute(h.INSTANCES_KEY,e));var n=f[e]||new i(t);return f[e]=n,n}function i(t){this.dom=t,this.charts=[],this.carousel=u&&u(this),this.dom.style.cssText+=";overflow:hidden;-ms-user-select:none;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none;",this.dom.onselectstart=this.dom.ondrag=function(){return!1}}function n(t){s.initPaddingScale(t)}function r(t,i){var n,r,o=t.options;try{r=window.top.document,n=window.top}catch(h){n=window,r=n.document}var l=r.body,u=7998;if(null==i)for(var c,d=-1,f=document.body.children.length;++dt;t++)this.charts[t].remove(),this.charts[t]=null},startLoading:function(){this.dom&&l.startLoading(this.dom,this.dom.getAttribute(h.INSTANCES_KEY))},endLoading:function(){this.dom&&l.endLoading(this.dom,this.dom.getAttribute(h.INSTANCES_KEY))}},window.VanCharts={version:"8.5.0",buildTime:"5/9/2017 09:08:58 GMT+0800 (CST)",showLightBox:r,hideLightBox:a,init:e,initPaddingScale:n,acceptPoint:o,instances:f}}),define("chart/Bar",["require","../utils/BaseUtils","../utils/ColorUtils","../Constants","../utils/BezierEasing","./Series","../ComponentLibrary","../dom/Browser","../ChartLibrary","../ChartLibrary"],function(t){var e=t("../utils/BaseUtils"),i=t("../utils/ColorUtils"),n=t("../Constants"),r=t("../utils/BezierEasing"),a=t("./Series"),o=(t("../ComponentLibrary"),t("../dom/Browser"),400),s=150,h=250,l=6,u=.35,c=1,d=3,f=2,p=a.extend({doLayout:function(){var t=this.getSeriesOffsetAndWidth(),i=this,r=i.vanchart,a=i.type==n.COLUMN_CHART,o=r.isInverted(),s="x",h="y";a||(s="y",h="x");var l=a&&!o||!a&&o,u=i[s+"Axis"],c=i[h+"Axis"],d=c.getZeroPos(),f=0;u.isOnZero()&&(f=u.options.lineWidth),this.points.forEach(function(n){var r=n.options,p=u.scale(u.getAxisValue(r[s],n)),g=c.scale(r[h+"0"]),m=c.getAxisValue(r[h],n)+r[h+"0"],v=c.scale(m-c.getStartPosValue());g===1/0&&(g=c.scale.range()[0]);var _,y,x,b;_=p+t.offset-t.width/2,y=Math.min(g,v),x=t.width,b=Math.abs(g-v),y===d?(y+=f/2,b-=f/2):y+b===d&&(b-=f/2),b=Math.max(b,0);var T={};l?(T.x=_,T.y=y,T.width=x,T.height=b):(T.x=y,T.y=_,T.width=b,T.height=x),n.rect=e.rectSubPixelOpt(T,r.borderWidth),n.rect.rx=n.rect.ry=n.options.borderRadius,n.isNull||i._calculateAnimationInitRect(n,a,o)})},getSeriesOffsetAndWidth:function(){var t=this,i=t.options,n=0,r={},a=0,o=0,s=this.vanchart.seriesOfType(this.type),h=this.getBaseAxisType();s.forEach(function(e){e[h]==t[h]&&e.visible&&(e.stack&&!r[e.stack]?(n++,r[e.stack]=!0,t.stack&&t.stack==e.stack&&(a=n-1)):e.stack||(n++,t==e&&(a=n-1))),e[h]==t[h]&&(o+=e.points.length)});var l=t[h],u=0,c=0;if(l.isCategory()){var d=i.categoryGap,p=i.gap,g=l.getTickLength();d=e.getPercentValue(d,g),u=(g-d)/n,c=d/2+u*(a+.5),p=e.getPercentValue(p,u),u-=p}else{var m=l._getRange();m=Math.abs(m[1]-m[0]),u=m/o/3,c=0}return{width:e.hasDefined(i.width)?i.width:Math.max(u,f),offset:c}},_getPointKey:function(t){return this.type==n.BAR_CHART?t.y:t.x},getTargetKey:function(){return this.type==n.BAR_CHART?"x":"y"},getBaseAxisType:function(){return this.type==n.COLUMN_CHART?"xAxis":"yAxis"},getTrendLineXYValues:function(t){for(var e=[],i=[],r=t.points,a=t.type==n.COLUMN_CHART?t.yAxis:t.xAxis,o=t.type==n.COLUMN_CHART?t.xAxis:t.yAxis,s=o.isHorizontal(),h=a.isAxisReversed(),l=[],u=0,c=r.length;c>u;u++){var d=r[u];!d.isNull&&d.rect&&l.push(d.rect)}return l.sort(function(t,e){return s?t.x-e.x:t.y-e.y}),l.forEach(function(t){var n,r;s?(n=t.x+t.width/2,r=h?t.y+t.height:t.y):(n=h?t.x:t.x+t.width,r=t.y+t.height/2),e.push(n),i.push(r)}),[e,i,o.getPosition()]},_calculateAnimationInitRect:function(t,e,i){var r,a,o=e?"y":"x",s=t.options,h=t.series[o+"Axis"],l=h.getAxisValue(s[o],t),u=h.getStartPos(),c=l>=0,d=e&&!i||!e&&i;d?c^h.isAxisReversed()?(r=n.BOTTOM_TO_TOP,a={x:t.rect.x,y:u,width:t.rect.width,height:0}):(r=n.TOP_TO_BOTTOM,a={x:t.rect.x,y:t.rect.y,width:t.rect.width,height:0}):c^h.isAxisReversed()?(r=n.LEFT_TO_RIGHT,a={x:t.rect.x,y:t.rect.y,width:0,height:t.rect.height}):(r=n.RIGHT_TO_LEFT,a={x:t.rect.x+t.rect.width,y:t.rect.y,width:0,height:t.rect.height}),t.location=r,t.initRect=a},_calculateLabelPos:function(t){var i=this,r=i.points.filter(function(t){return t.visible});r.forEach(function(r){var a=r.options.dataLabels;if(a&&a.enabled){var o;a.align&&(o=i._calculateAlignLabelPos(r,a.align));var s=r.location==n.TOP_TO_BOTTOM||r.location==n.BOTTOM_TO_TOP;a.autoAdjust&&(o=i._calculateAutoLabelPos(r,o,s,t)),o&&(r.labelPos=o,t.addBounds(e.makeBounds(r.labelPos,r.labelDim)))}})},_calculateAlignLabelPos:function(t,e){var i=t.labelDim,r=t.rect,a=this.vanchart.bounds,o=(a.width,a.height,t.location==n.TOP_TO_BOTTOM||t.location==n.BOTTOM_TO_TOP),s=t.location==n.BOTTOM_TO_TOP||t.location==n.LEFT_TO_RIGHT,h=r.x+r.width/2,l=r.y+r.height/2;if(i){var u,c;switch(e){case n.CENTER:u=h-i.width/2,c=l-i.height/2;break;case n.INSIDE:o?(u=h-i.width/2,c=s?r.y+d:r.y+r.height-d-i.height):(c=l-i.height/2,u=s?r.x+r.width-d-i.width:r.x+d);break;case n.OUTSIDE:o?(u=h-i.width/2,c=s?r.y-d-i.height:r.y+r.height+d):(c=l-i.height/2,u=s?r.x+r.width+d:r.x-d-i.width)}return{x:u,y:c}}},_getMoreLabelDefaultCenter:function(t,e){var i=this.type==n.COLUMN_CHART,r=this.vanchart.isInverted();return i&&!r||!i&&r?{centerX:t.rect.x+t.rect.width/2,centerY:t.rect.y-e.height/2}:{centerX:t.rect.x+t.rect.width+e.width/2,centerY:t.rect.y+t.rect.height/2}}});return p.include({_getFixedPos:function(t,e){var i,r,a=this.vanchart.bounds,o=t.rect;return 0===t.initRect.height?(i=a.x+o.x+o.width+c,r=t.location==n.BOTTOM_TO_TOP?a.y+o.y:a.y+o.y+o.height):(r=a.y+o.y+o.height+c,i=t.location==n.LEFT_TO_RIGHT?a.x+o.x+o.width-e.width:a.x+o.x-e.width),[i,r]},getPointGraphicKey:function(){return"rect"},getFillFilter:function(t,r){if(e.isSupportSVG()){var a=this,o=r.options,s=a.vanchart,h=s.renderer;if(o.image){var l,u,c=r.rect;switch(r.location){case n.BOTTOM_TO_TOP:l=c.x,u=c.y+c.height%o.imageHeight;break;case n.TOP_TO_BOTTOM:case n.LEFT_TO_RIGHT:l=c.x,u=c.y;break;case n.RIGHT_TO_LEFT:l=c.x+c.width%o.imageWidth,u=c.y}var d={x:l,y:u,width:o.imageWidth,height:o.imageHeight,patternUnits:"userSpaceOnUse"},f={x:0,y:0,width:o.imageWidth,height:o.imageHeight};return r.imagePattern?h.updateImagePattern(r.imagePattern,d,f,r.options.image):r.imagePattern=h.imagePattern(d,f,r.options.image),"url(#"+e.stamp(r.imagePattern)+")"}if(s.options.style==n.STYLE_GRADUAL){var p,g,m,v;switch(p=g=m=v="0%",r.location){case n.BOTTOM_TO_TOP:g="100%";break;case n.TOP_TO_BOTTOM:v="100%";break;case n.LEFT_TO_RIGHT:m="100%";break;case n.RIGHT_TO_LEFT:p="100%"}var _={x1:p,y1:g,x2:m,y2:v},y={offset:"0%","stop-color":t},x={offset:"100%","stop-color":i.getColorWithDivider(t,.9)};return r.colorGradient?h.updateColorGradient(r.colorGradient,_,[y,x]):r.colorGradient=h.colorGradient(_,[y,x]),"url(#"+e.stamp(r.colorGradient)+")"}}return t},_calculateAnimationDelay:function(){if(this.stack)return 0;if(this.state==n.STATE_SHOW){for(var t=this.vanchart.seriesOfType(this.type),e=0,i=t.length;i>e;e++)if(t[e].state==n.STATE_TO_DROP)return s}else if(this.state==n.STATE_TO_SHOW)return h;return 0},getPointInitAttr:function(t){return t.initRect},getPointInitAnimationAttr:function(t){return{ease:r.css.swing,duration:o,attr:t.rect}},getPointUpdateAnimationAttr:function(t){return{ease:r.css.swing,duration:h,attr:t.rect}},getPointDropAnimationAttr:function(t){return{ease:r.css.swing,duration:s,attr:t.initRect}},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);t.graphic.interrupt(n.SELECT_ANIMATION).transition(n.SELECT_ANIMATION).animate({duration:100,ease:"ease-out-in",style:i})},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);t.graphic.interrupt(n.SELECT_ANIMATION).transition(n.SELECT_ANIMATION).animate({duration:100,ease:"ease-out-in",style:i})},effectAnimation:function(t){function e(){return l.rect().addTo(u).attr(c).style(d)}function i(t){return.5*f*t}function r(t){return 0>t?0:t}function a(t,e,n){t.style(d).effectTransition().delay(e).ease("linear").duration(n).styleTween("stroke-opacity",function(){return function(t){return.8*(1-t)}}).styleTween("stroke-width",function(){return i}).attrTween("x",function(){return function(t){return c.x-i(t)/2+1}}).attrTween("y",function(){return function(t){return c.y-i(t)/2+1}}).attrTween("width",function(){return function(t){return r(c.width+i(t)-2)}}).attrTween("height",function(){return function(t){return r(c.height+i(t)-2)}})}var o=t.options,s=t.series,h=s.vanchart,l=h.renderer;if(!o.image){var u=s._getPointEffectGroup(t),c=t.rect,d={fill:"none",stroke:t.color,"stroke-opacity":0,"stroke-width":0},f=t.location===n.BOTTOM_TO_TOP||t.location===n.TOP_TO_BOTTOM?c.width:c.height,p=u.firstG=u.firstG||e(),g=u.secondG=u.secondG||e(),m=u.thirdG=u.thirdG||e(),v=s._getEffectTime(t),_=v/s.getDefaultEffectTime();a(p,0,1600*_),a(g,600*_,1600*_),a(m,1200*_,1600*_)}},getDefaultEffectTime:function(){return 2800},getHighLightStyle:function(t){return{stroke:t.mouseOverColor,fill:t.series.getFillFilter(t.mouseOverColor,t),"fill-opacity":t.opacity,"stroke-width":l,"stroke-opacity":0===t.opacity?0:u}},getPressedStyle:function(t){return{stroke:t.clickColor,fill:t.series.getFillFilter(t.clickColor,t),"fill-opacity":t.clickOpacity,"stroke-width":l,"stroke-opacity":0===t.opacity?0:u}}}),t("../ChartLibrary").register(n.BAR_CHART,p),t("../ChartLibrary").register(n.COLUMN_CHART,p),p}),define("chart/PieSeries",["require","../utils/BaseUtils","./Series"],function(t){var e=t("../utils/BaseUtils"),i=t("./Series"),n=2,r=[.9,.85,.8,.75,.7,.65,.6,.55,.5],a="right-top",o="right-bottom",s="left-top",h="left-bottom",l=Math.PI/180;return{calcOutsideLabel:function(t,e,i,n){var a=this,o={};if(t.map(function(t){var e=a.getLocByArc(a.getCenterAngle(t));o[e]=o[e]||[],o[e].push(t)}),n)return o=a.ignoreMin(o,n),a.placeOutSideLabels(o,n),n;n=Math.min(i[0]-e.x,e.x+e.width-i[0],i[1]-e.y,e.y+e.height-i[1]);for(var s=0,h=r.length;h>s;s++){var l=n*r[s],u=a.ignoreMin(o,l);if(a.placeOutSideLabels(u,l),a.testWithinBounds(u,i,e))break}return l},calculateInsideLabelBounds:function(t){var e=this;t.map(function(i,n){var r=t[n],a=e.getCenterAngle(r),o=e._getInnerRadius(r),s=e._getOuterRadius(r),h=o+(s-o)/2,l=e._getArcPoint(h,a),u=l[0]-r.labelDim.width/2,c=l[1]-r.labelDim.height/2;r.labelPos={x:u,y:c}})},calculateLeadLineStartPos:function(t){var e=this;t.map(function(t){var i=e._getOuterRadius(t),n=e.getCenterAngle(t);t.labelPos&&(t.labelPos.startPos={x:(i+1)*Math.sin(n),y:(i+1)*Math.cos(n+Math.PI)})})},getCenterAngle:function(t){var i=this.chartInfo.rotate||0,n=i+(this._getStartAngle(t)+this._getEndAngle(t))/2;return e.makeValueInRange(0,2*Math.PI,n)},getLocByArc:function(t){return t%=2*Math.PI,tn;n++){var a=e[n].labelDim;i+=a.height}if(i>1.2*t){var o=i-1.2*t;e.sort(function(t,e){return t.value-e.value});for(var n=0,r=e.length;r>n&&!(0>o);n++){var s=e[n].labelDim.height;o-=s}e=e.slice(n,e.length)}var h=this;return e.sort(function(t,e){return h.getCenterAngle(t)-h.getCenterAngle(e)}),e},placeOutSideLabels:function(t,e){var i=this;Object.keys(t).map(function(n){i.findNiceBounds(!0,t[n],e,n)||i.findNiceBounds(!1,t[n],e,n)})},findNiceBounds:function(t,e,i,n){var r,s,h=1.2*i,u=.1*i,c=this._getStartAndEndAngle(n),d=t?c.endAngle:c.startAngle,f=t?l:-l;e.map(function(t){t.labelPos=null});for(var p=0,g=e.length;g>p;p++){var m=t?p:g-p-1,v=t?Math.max:Math.min,_=e[m],y=_.labelDim,x=this.getCenterAngle(_);x=s?v(x,s):x;for(var b=!1,T=x;t?d>T:T>d;T+=f){var A=h*Math.sin(T),C=h*Math.cos(T+Math.PI),L=this._getLabelBounds(n,A,C,u,y);if(r?!this._isOverlapOrShadow(r,L):!0){b=!0,s=T;break}}if(!b)return!1;var P,M={x:A,y:C};P=n==a||n==o?{x:A+u,y:C}:{x:A-u,y:C},r=L,_.labelPos={x:L.x,y:L.y,midPos:M,endPos:P}}return!0},_getStartAndEndAngle:function(t){switch(t){case a:return{startAngle:0,endAngle:Math.PI/2};case o:return{startAngle:Math.PI/2,endAngle:Math.PI};case h:return{startAngle:Math.PI,endAngle:3*Math.PI/2};case s:return{startAngle:3*Math.PI/2,endAngle:2*Math.PI}}},_getLabelBounds:function(t,e,i,r,s){var h,l;return h=t==a||t==o?e+r+n:e-r-n-s.width,l=i-s.height/2,{x:h,y:l,width:s.width,height:s.height}},_isOverlapOrShadow:function(t,i){var n=Math.max(t.y,i.y),r=Math.min(t.y+t.height/2,i.y+i.height/2),a=Math.max(t.y+t.height/2,i.y+i.height/2),o=Math.min(t.y+t.height,i.y+i.height);return e.rectangleOverlapped(t,i)||r>=n||o>=a},testWithinBounds:function(t,i,n){for(var r in t){var l,u,c,d,f;switch(u=c=0,r){case a:case o:c=n.y-i[1],d=n.width+n.x-i[0],f=n.height;break;case h:case s:u=n.x-i[0],c=n.y-i[1],d=-u,f=n.height}l={x:u,y:c,width:d,height:f};for(var p=0;p=Math.PI&&a<3*Math.PI/2?s-=e.width:a>=3*Math.PI/2&&c>a&&(h-=e.height,s-=e.width),[s,h]},_calculateLabelPos:function(){for(var t=this.options.roseType,e=this.points.filter(function(t){return t.visible}),n=[],r=[],a=0,o=e.length;o>a;a++){var s=e[a],h=s.options.dataLabels;s.visible&&h&&h.enabled&&(h.align==i.OUTSIDE?n.push(s):r.push(s))}this._calculateOutsideLabelBounds(n),this.options.radius||(r.length&&!n.length||!r.length&&!n.length)&&(this.chartInfo.radius=this.chartInfo.radius/d-f);var l=this.options.innerRadius,u=this.chartInfo.radius;if(l&&(l="string"==typeof l&&-1!=l.indexOf("%")?parseFloat(l)*u/100:parseFloat(l)),this.chartInfo.innerRadius=l,this.points.forEach(function(t){t.innerRadius=l}),t){var c=u-l,p=0;e.forEach(function(t){p=Math.max(p,Math.abs(t.getTargetValue()))});var g=c/p;(isNaN(g)||!isFinite(g))&&(g=0),e.forEach(function(t){t.outerRadius=l+g*Math.abs(t.getTargetValue())})}else e.forEach(function(t){t.outerRadius=u});this.calculateLeadLineStartPos(n),this.calculateInsideLabelBounds(r)},_calculateLabelPosWhenRadiusFixed:function(){for(var t=this.points.filter(function(t){return t.visible}),e=[],n=[],r=0,a=t.length;a>r;r++){var o=t[r],s=o.options.dataLabels;s&&s.enabled&&(s.align==i.OUTSIDE?e.push(o):n.push(o))}this._calculateLabelBoundsForFixed([this.chartInfo.centerX,this.chartInfo.centerY],this.chartInfo.radius,e),this.calculateLeadLineStartPos(e),this.calculateInsideLabelBounds(n)},_calculateOutsideLabelBounds:function(t){if(t.length){t.forEach(function(t){t.labelPos=null});var e=this.chartInfo,i=e.radius,n=[e.centerX,e.centerY];this.options.radius?this.calcOutsideLabel(t,this.bounds,n,i):this.chartInfo.radius=this.calcOutsideLabel(t,this.bounds,n)}},_calculateLabelBoundsForFixed:function(t,e,i){var n=this.chartInfo,e=n.radius,t=[n.centerX,n.centerY];this.calcOutsideLabel(i,this.bounds,t,e)},_calculateSeriesBounds:function(){for(var t=this.vanchart.seriesOfType(i.PIE_CHART),e=this.vanchart.bounds,n=0,r=0,a=t.length;a>r;r++)t[r].options.center&&t[r].options.radius&&n++;for(var o=e.width/Math.max(1,t.length-n),r=0,a=t.length;a>r;r++)if(t[r]==this&&!this.options.center)return{x:e.x+r*o,y:e.y,width:o,height:e.height}},_getTranslate:function(){return[this.chartInfo.centerX,this.chartInfo.centerY]},_getArcData:function(t){return n.hasDefined(t.startAngle)?{startAngle:t.startAngle,endAngle:t.endAngle,outerRadius:t.outerRadius}:void 0},_getMoreLabelDefaultCenter:function(t,e){var i=this.getCenterAngle(t),n=t.series.chartInfo.innerRadius+(t.outerRadius-t.series.chartInfo.innerRadius)/2,r=this._getArcPoint(n,i);return{centerX:r[0],centerY:r[1]}},effectAnimation:function(t){h.areaStyleEffectAnimation(t)},getDefaultEffectTime:function(){return h.AREA_STYLE_EFFECT_TIME},getHighLightStyle:function(t){return{fill:t.series.getFillFilter(t.mouseOverColor||t.color,t),"fill-opacity":t.opacity,stroke:t.borderColor||t.mouseOverColor||t.color,"stroke-width":t.options.borderWidth,"stroke-opacity":t.borderOpacity}},getPressedStyle:function(t){return{fill:t.series.getFillFilter(t.clickColor,t),"fill-opacity":t.clickOpacity,stroke:t.borderColor||t.mouseOverColor||t.color,"stroke-width":t.options.borderWidth,"stroke-opacity":t.borderOpacity}},getAttrs:function(t){var e=l.arc().innerRadius(t.innerRadius);return{d:e(this._getArcData(t))}},getPointGraphicKey:function(){return"path"},_calculateAnimationDelay:function(){for(var t=0,e=0,i=0,n=this.points.length;n>i;i++){var r=this.points[i];r.visible&&r.series.visible&&t++,r.graphic&&e++}return e==t?0:1},_createGroup:function(t,e){return t.group().addTo(e.seriesGroup)},getPointInitAnimationAttr:function(t){var e=t.series,i=l.arc().innerRadius(e.chartInfo.innerRadius);return{ease:g,duration:p,attrTween:{d:function(){var n={startAngle:e.startAngle,endAngle:e.startAngle,outerRadius:t.outerRadius};if(!e.initialAnimationMoving){var r=e.getPreVisiblePoint(t);if("first"!=r&&r.lastShape){var a=Math.abs(r.lastShape.endAngle-r.endAngle),o=t.startAngle+a;n={startAngle:o,endAngle:o,outerRadius:t.outerRadius}}}var s=u(n,e._getArcData(t));return this._current_=s(1),function(t){return i(s(t))}}}}},getPointUpdateAnimationAttr:function(t,e){var i=t.series,n=l.arc().innerRadius(i.chartInfo.innerRadius),r=g,a=p;return e||(r=m,a=v),{ease:r,duration:a,attrTween:{d:function(){var e=i._getArcData(t),r=this._current_||e,a=u(r,e);return this._current_=a(1),function(t){return n(a(t))}}}}},getPointDropAnimationAttr:function(t){var e=t.series,i=(e.options,e.startAngle),n=l.arc().innerRadius(e.chartInfo.innerRadius);return{ease:g,duration:p,attrTween:{d:function(){var r=this._current_,a=e.getPreVisiblePoint(t),o=i;if("first"!=a&&a.lastShape){var s=Math.abs(a.lastShape.endAngle-a.endAngle);o=t.startAngle+s}var h={startAngle:o,endAngle:o,outerRadius:r.outerRadius},l=u(r,h);return this._current_=l(1),function(t){return n(l(t))}}}}},getPreVisiblePoint:function(t){for(var e=t.series.points,i="first",n=0,r=e.length;r>n;n++){if(e[n]==t)return i;e[n].visible&&(i=e[n])}return i},getFillFilter:function(t,e){var a=this,o=a.vanchart.options;if(o.style==i.STYLE_GRADUAL&&n.isSupportSVG()){var a=this,s=a.vanchart,h=s.renderer,l={cx:"0%",cy:"0%",r:Math.max(e.outerRadius,0)+"px",gradientUnits:"userSpaceOnUse"},u={offset:e.innerRadius/Math.max(e.outerRadius,1)*100+"%","stop-color":r.getColorWithDivider(t,.8)},c={offset:"100%","stop-color":t};return e.colorGradient?h.updateColorGradient(e.colorGradient,l,[u,c]):e.colorGradient=h.colorGradient(l,[u,c],"radialGradient"),"url(#"+n.stamp(e.colorGradient)+")"}return t},_onPointMouseOver:function(t){this._onState(t,!0)},_onPointMouseOut:function(t){this._onState(t,!1)},_onState:function(t,e){var n=this,r=l.arc().innerRadius(t.innerRadius),a=e?n.getHighLightStyle(t):n.getStyle(t),o=t.outerRadius*d,s=t.outerRadius;e&&(o=t.outerRadius,s=t.outerRadius*d);var h=u(o,s),c={startAngle:t.startAngle,endAngle:t.endAngle};t.graphic.style(a).interrupt(i.SELECT_ANIMATION).transition(i.SELECT_ANIMATION).animate({ease:"elastic",duration:800,attrTween:{d:function(){return function(t){return r.outerRadius(h(t))(c)}}}})},_getPointGraphicGroup:function(){return this.pathGroup||(this.pathGroup=this.vanchart.renderer.group().addTo(this.group)),this.pathGroup},_getPointTextLabelGroup:function(){return this.textLabelGroup||(this.textLabelGroup=this.vanchart.renderer.vgroup().add(),this.group.append(this.textLabelGroup.renderG),this.textLabelGroup.divG.attr("transform",n.makeTranslate(this._getTranslate()))),this.textLabelGroup},isSeriesAccumulated:function(){return!0}});return _.include(o),t("../ChartLibrary").register(i.PIE_CHART,_),_}),define("chart/Line",["require","../Constants","../utils/BaseUtils","../utils/QueryUtils","./Series","../utils/Class","../utils/BezierEasing","../utils/ColorUtils","../dom/DomUtils","../EffectHelper","../utils/PathGenerator","../ChartLibrary","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=(t("../utils/QueryUtils"),t("./Series")),r=t("../utils/Class"),a=t("../utils/BezierEasing"),o=t("../utils/ColorUtils"),s=t("../dom/DomUtils"),h=t("../EffectHelper"),l=t("../utils/PathGenerator"),u=2,c=800,d=250,f=.65,p="quad-in-out",g=a.css.swing,m=function(t){var e=t.indexFromLeft/t.series.points.length;return c*(.5>e?Math.sqrt(e/2):1-Math.sqrt(2-2*e)/2)},v=n.extend({doLayout:function(){var t,e=this,i=e.vanchart,n=e.xAxis,r=e.yAxis,a=e.options.connectNulls,o=n.scale.rangeBand?n.scale.rangeBand()/2:0,s=i.isInverted(),h=s?"posY":"posX",u=r.getStartPosValue(),c=[];if(this.options.large){var d={},f={};e.points.forEach(function(e){t=e.options;var i=n.scale(n.getAxisValue(t.x,e))+o,a=r.scale(r.getAxisValue(t.y,e)+t.y0-u),h=r.scale(t.y0);isFinite(a)||(e.isNull=!0),s?(e.posX=a,e.posY=i,e.posX0=h):(e.posX=i,e.posY=a,e.posY0=h),d[e.posX]&&f[e.posY]||(d[e.posX]=!0,f[e.posY]=!0,c.push(e))},this)}else c=e.points;var p=!0,g=[];e.y0=Number.MAX_VALUE,e.y=-Number.MAX_VALUE,c.forEach(function(i,l){if(t=i.options,this.options.large)c=i.posX,d=i.posY;else{var c=n.scale(n.getAxisValue(t.x,i))+o,d=r.scale(r.getAxisValue(t.y,i)+t.y0-u),f=r.scale(t.y0);s?(i.posX=d,i.posY=c,i.posX0=f):(i.posX=c,i.posY=d,i.posY0=f)}i.indexFromLeft=l,(!a||a&&!i.isNull)&&(g.length>0&&(p=p&&g[g.length-1][h]<=(s?d:c)),g.push(i)),Math.abs(t.y0)e.y&&(e.y=Math.abs(t.y+t.y0))},this),p||(g.sort(function(t,e){return t[h]-e[h]}),g.forEach(function(t,e){t.indexFromLeft=e}));var m=l.line().interpolate(e.interpolate).x(function(t){return t.posX}).y(function(t){return t.posY}).defined(function(t){return!t.isNull}),v=l.area().interpolate(e.interpolate);v=s?v.y(function(t){return t.posY}).x0(function(t){var i=e._getPreviousStackingPoint(t);return i?i.posX:t.posX0}).x1(function(t){return t.posX}):v.x(function(t){return t.posX}).y0(function(t){var i=e._getPreviousStackingPoint(t);return i?i.posY:t.posY0}).y1(function(t){return t.posY}),v=v.defined(function(t){return!t.isNull}),this.linePath=m(g),this.areaPath=v(g),this.dataBands=this._calculateDataBands()},_getPreviousStackingPoint:function(t){if(i.hasDefined(t.series.stack))for(var e=t.points,n=0,r=e.length;r>n;n++){var a=e[n].series;if(a.stack==t.series.stack&&a.visible&&e[n+1]==t)return e[n]}},_calculateDataBands:function(){var t=this.vanchart.bounds,e=this,i=this.options.bands||[],n=e.color,r=e.opacity,a=e.fillColor,o=e.fillColorOpacity,s=e.yAxis,h=s.scale.domain(),l=s.isHorizontal(),u=t.width,c=t.height,d=[];if(d.push({clipBounds:{x:0,y:0,width:u,height:c},color:n,fillColor:a,fillColorOpacity:o}),!i||!i.length)return d;for(var f=0,p=i.length;p>f;f++){var g=Math.max(h[0],i[f].from),m=Math.min(h[1],i[f].to);g=s.scale(g),m=s.scale(m);var v={x:0,y:Math.min(g,m),width:u,height:Math.abs(g-m)};l&&(v={x:Math.min(g,m),y:0,width:Math.abs(g-m),height:c}),d.push({clipBounds:v,color:i[f].color||n,opacity:i[f].opacity||r,fillColor:i[f].fillColor||a,fillColorOpacity:i[f].fillColorOpacity||o})}return d},_getFixedPos:function(t){var e=t.options.marker.radius||4.5,i=this.vanchart.bounds,n=i.x+t.posX+e,r=i.y+t.posY+e;return[n,r]},_calculateLabelPos:function(t){var n=this,r=this.vanchart.isInverted(),a=(n.points.length,this.vanchart.bounds);n.points.forEach(function(o,s){var h=o.options.dataLabels;if(h&&h.enabled){var l,c,d,f=h.align==e.TOP,p=o.labelDim,g=u;if(!p)return;var m=o.options.marker;m&&m.symbol&&(g+=m.radius||4.5),r?(c=f?o.posX+g:o.posX-g-p.width,d=o.posY-p.height/2,0>=d?d=o.posY:d+p.height>=a.height&&(d=o.posY-p.height)):(c=o.posX-p.width/2,d=f?o.posY-g-p.height:o.posY+g,0>=c?c=o.posX:c+p.width>=a.width&&(c=o.posX-p.width)),l={x:c,y:d},h.autoAdjust&&(l=n._calculateAutoLabelPos(o,l,!r,t)),l&&(o.labelPos=l,t.addBounds(i.makeBounds(o.labelPos,o.labelDim)))}})},getTrendLineXYValues:function(t){return this._getNormalTrendLineXYValues(t)},getAttrs:function(t){return{transform:i.makeTranslate([t.posX,t.posY])}},_getMoreLabelDefaultCenter:function(t,e){return{centerX:t.posX+t.options.marker.radius/2,centerY:t.posY-e.height/2-t.options.marker.radius/2}},effectAnimation:function(t){h.markerEffectAnimation(t)},getDefaultEffectTime:function(){return h.MARKER_EFFECT_TIME},getHighLightStyle:function(){},getDataToDraw:function(){return this.points.filter(function(t){return t.options.marker&&t.options.marker.symbol})},getTextDataToDraw:function(){return this.points},_updatePointGraphicStyle:function(t){this._updateMarker(t)},updatePointGraphic:function(t){this._updateMarkerPointGraphic(t)},_createPointGraphic:function(t){return t.graphic=this._createMarker(t.options.marker)},onPointPress:function(){var t=this,e=t.series;e._onMarkerPressed(t)},onPointPressUp:function(){var t=this,e=t.series;e._updateMarker(t)},_onPointMouseOver:function(t){t.series._onMarkerMouseOver(t)},_onPointMouseOut:function(t){t.series._onMarkerMouseOut(t)},getPointInitAttr:function(t){return{transform:"translate("+t.posX+","+t.posY+") scale(0.01)"}},getPointInitAnimationAttr:function(t){return[{delay:m(t),ease:"ease-out-in",duration:150,attr:{transform:"translate("+t.posX+","+t.posY+") scale(1.5)"}},{duration:150,ease:"ease-out-in",attr:{transform:"translate("+t.posX+","+t.posY+") scale(1)"}}]},getPointUpdateAnimationAttr:function(t){return{ease:g,duration:d,attr:{transform:"translate("+t.posX+","+t.posY+")"}}},getClosestPoint:function(t){var e,i=this.vanchart.isInverted(),n=i?"y":"x",r=i?"posY":"posX",a=Number.MAX_VALUE,o=this.vanchart.hoverSeries,s=this.vanchart.bounds,h=s[n]-(i?t.y:t.x);return o.points.forEach(function(t){var i=Math.abs(t[r]+h);a>i&&!t.isNull&&(e=t,a=i)}),e},_onSeriesMouseOver:function(t){n.prototype._onSeriesMouseOver.call(this,t),this.dataBandsGraphic.forEach(function(t){t._onSeriesMouseOver()}),i.toFront(this.group.node())},_onSeriesMouseOut:function(t){this.dataBandsGraphic.forEach(function(t){t._onSeriesMouseOut()}),this.defaultMarker&&this.defaultMarker.remove(),this.defaultMarker=null},drawPoints:function(){n.prototype.drawPoints.call(this);for(var t=this.dataBandsGraphic.length-1;t>=0;t--)this.dataBandsGraphic[t].toBack()},drawSeries:function(){var t,e,i=this,n=this.vanchart,r=(n.renderer,this.dataBands);for(this.defaultMarker&&this.defaultMarker.remove(),this.defaultMarker=null,this.dataBandsGraphic=this.dataBandsGraphic||[],t=r.length,e=this.dataBandsGraphic.length;e>t;t++)this.dataBandsGraphic[t].remove(),this.dataBandsGraphic[t]=null;for(t=0,e=r.length;e>t;t++)this.dataBandsGraphic[t]?this.dataBandsGraphic[t].refresh(r[t]):this.dataBandsGraphic[t]=new _(r[t],i);this.dataBandsGraphic.length=r.length}}),_=r.extend({initialize:function(t,e){this.series=e,this.refresh(t)},refresh:function(t){this.options=t,this.render()},render:function(){var t=this.options,n=this.series,r=n.group,a=n.vanchart,o=a.renderer,s=this._getLineStyle(n,t),h=this._getAreaStyle(n,t),l=i.isSupportSVG(),u=t.clipBounds,f=n.type==e.AREA_CHART,m=!this.linePath||this.linePath.removed();return this.clipRect?o.updateClip(this.clipRect,u):this.clipRect=o.createClip({x:u.x,y:u.y,width:u.width,height:u.height}),n.visible?(this.linePath=this.linePath||o.path().attr("d",n.linePath).addTo(r),this.linePath.style(s),this.linePath.isLineChart=!0,l&&o.clip(this.linePath,this.clipRect),f&&(this.areaPath=this.areaPath||o.path().attr("d",n.areaPath),this.areaPath.style(h).addTo(r),this.areaPath.isLineChart=!0,l&&o.clip(this.areaPath,this.clipRect)),void(m?(this.linePath.attr("d",n.linePath),this.areaPath&&this.areaPath.attr("d",n.areaPath),l&&this.clipRect.rect.attr(a.isInverted()?"height":"width",0).animate({ease:p,duration:c,attr:u})):(this.linePath.animate({ease:g,duration:d,attr:{d:n.linePath}}),this.areaPath&&this.areaPath.animate({ease:g,duration:d,attr:{d:n.areaPath}}),l&&this.clipRect.rect.animate({ease:g,duration:d,attr:u})))):(this.linePath&&this.linePath.remove(),this.areaPath&&this.areaPath.remove(),void(this.linePath=this.areaPath=null))},toBack:function(){s.toBack(this.linePath&&this.linePath.node()),s.toBack(this.areaPath&&this.areaPath.node())},_getAreaStyle:function(t,i){var n,r,a=t.vanchart.highlightTarget;return a?(n=i.fillColor,r=a==t.name?1:.3):(n=this._getFillFilter(i.fillColor,t),r=t.vanchart.options.style==e.STYLE_GRADUAL?1:i.fillColorOpacity),{fill:n,"fill-opacity":r}},_getLineStyle:function(t,e){var i=e.opacity,n=t.vanchart.highlightTarget;return n&&(i=n==t.name?1:.3),{fill:"none",stroke:e.color,"stroke-width":t.options.lineWidth,"stroke-opacity":i}},_getFillFilter:function(t,n){if(i.isSupportSVG()){var r=n.vanchart,a=r.renderer,o=n.vanchart.options;if(o.style==e.STYLE_GRADUAL){var s,h,l,u;s=h=l=u="0%";var c=Math.abs(n.y)/Math.abs(n.y-n.y0)||0;r.isInverted()===!0?(s=100*(1-c)+"%",l="100%"):h=100*c+"%";var d={x1:s,y1:h,x2:l,y2:u},f={offset:"0%","stop-color":t,"stop-opacity":0},p={offset:"100%","stop-color":t,"stop-opacity":.8};return this.colorGradient?a.updateColorGradient(this.colorGradient,d,[f,p]):this.colorGradient=a.colorGradient(d,[f,p]),"url(#"+i.stamp(this.colorGradient)+")"}}return t},_onSeriesMouseOver:function(){this.linePath.style({stroke:o.getHighLightColor(this.options.color),"stroke-width":this.series.options.lineWidth+1}),this.series.type==e.AREA_CHART&&this.areaPath.style({fill:o.getHighLightColor(this.options.fillColor),"fill-opacity":0===this.options.fillColorOpacity?0:f})},_onSeriesMouseOut:function(){this.linePath&&this.linePath.style(this._getLineStyle(this.series,this.options)),this.areaPath&&this.areaPath.style(this._getAreaStyle(this.series,this.options))},remove:function(){this.linePath&&this.linePath.remove(),this.areaPath&&this.areaPath.remove(),this.clipRect&&this.clipRect.remove(),this.linePath=this.areaPath=this.clipRect=null}});return t("../ChartLibrary").register(e.LINE_CHART,v),t("../ChartLibrary").register(e.AREA_CHART,v),v}),define("chart/Radar",["require","./Series","../utils/BaseUtils","../utils/QueryUtils","../utils/BoundsManager"],function(t){var e=t("./Series"),i=t("../utils/BaseUtils"),n=(t("../utils/QueryUtils"),t("../utils/BoundsManager"),e.extend({refresh:function(t,i){return e.prototype.refresh.call(this,t,i),this.columnType=this.options.columnType,this.stack=this.columnType?"radar-column"+this.options.stack:this.options.stack,this},_getAxisTypes:function(){return["angleAxis","radiusAxis","polar"]},getBaseAxisType:function(){return"angleAxis"},_bindAxis:function(){var t=this,e=t.options,i=t.vanchart;t._getAxisTypes().forEach(function(n){if(i[n]){var r=i[n](e.polar);r&&(r.series.push(t),t[n]=r)}})},_getDefaultFillColorOpacity:function(){return this.options.columnType?1:.15},_getTranslate:function(){return this.getCenter()},getCenter:function(){return this.polar&&this.polar.center},getRadius:function(){return this.polar&&this.polar.radius},doLayout:function(){var t=this,e=t.polar,i=e.radiusAxis,n=e.angleAxis,r=(this.getCenter(),this.getRadius(),n.piece),a=i.scale,o=n.scale,s=i.indicator,h=function(t){return isNaN(a(t))?0:a(t)};t.points.sort(function(t,e){return o(t.category)-o(e.category)});var l;t.points.forEach(function(e){l=e.options;var n=e.category,a=l.y0,u=e.value+l.y0;e.innerRadius=s?t._cateValueScale(n,a):h(a),e.outerRadius=s?t._cateValueScale(n,u):h(u),e.animateInitRadius=i.getStartPos(),e.radian=o(e.category)*r;var c=t._getArcPoint(e.outerRadius,e.radian);e.posX=c[0],e.posY=c[1],this._calcLabelPos(e)},this),t.pathSegment=t._getPathSegment(t.points,t.options.connectNulls)},_calculateLabelPos:function(){},getTargetKey:function(){return"y"},_createGroup:function(t,e){return t.group().addTo(e.seriesGroup)},_getPathSegment:function(t,e){var i=this,n=i.polar,r=n.angleAxis,a=r.scale;t=[].concat(t),t.sort(function(t,e){return a(t.category)-a(e.category)});var o=[],s=[];if(e)o.push(s),t.forEach(function(t){t.isNull||s.push([t.posX,t.posY])});else{for(var h=0,l=t.length,u=l-1;u>0;u--){var c=t[u],d=t[u-1];!c.isNull&&d.isNull&&(h=u)}for(var u=0;l>u;u++){var f=t[(u+h)%l];f.isNull&&s.length?(s.length>1&&o.push(s),s=[]):f.isNull||s.push([f.posX,f.posY])}s.length&&o.push(s)}return o},_getRadarSeriesPath:function(t,e,n){var r="",a=[];if(1===t.length){a=t[0];var o=a.length==this.angleAxis.getCategoryCount()||e;n=!o&&n,r=n?"M0,0":"";for(var s=0,h=a.length;h>s;s++){var l=s||n?"L":"M";r+=l+i.dealFloatPrecision(a[s][0])+","+i.dealFloatPrecision(a[s][1])}r+=o||n?"Z":""}else t.forEach(function(t){r+=n?"M0,0":"",t.forEach(function(t,e){r+=(e||n?"L":"M")+i.dealFloatPrecision(t[0])+","+i.dealFloatPrecision(t[1])}),r+=n?"Z":""});return r},_getInitPathSegment:function(t){var e=[];return t.forEach(function(t){var i=[];e.push(i),t.forEach(function(){i.push([0,0])})}),e},_cateValueScale:function(t,e){var i,n=this,r=n.radiusAxis,a=r._cateScale;return r._cateDomain.forEach(function(e){e.name===t&&(i=e.domain)}),a.domain(i),isNaN(a(e))?0:a(e)}}));return n}),define("chart/LineRadar",["require","../utils/BaseUtils","../dom/DomUtils","../EffectHelper","../utils/Interpolator","../Constants","./Radar","../ChartLibrary"],function(t){var e=t("../utils/BaseUtils"),i=t("../dom/DomUtils"),n=t("../EffectHelper"),r=t("../utils/Interpolator"),a=t("../Constants"),o=t("./Radar"),s=500,h="back-out",l=500,u="exp-out",c="radar-top",d="radar-bottom",f="radar-left",p="radar-right",g=8,m=o.extend({columnType:!1,_calcLabelPos:function(t){if(t.labelDim){var e=this.polar.angleAxis._getPolarPosition(t.category),i=this._getArcPoint(t.outerRadius+g,t.radian),n=t.labelDim;switch(e){case c:t.labelPos={x:-n.width/2,y:i[1]-n.height};break;case p:t.labelPos={x:i[0],y:i[1]-n.height/2};break;case d:t.labelPos={x:-n.width/2,y:i[1]};break;case f:t.labelPos={x:i[0]-n.width,y:i[1]-n.height/2}}}},_getMoreLabelDefaultCenter:function(t,e){return{centerX:t.posX+t.options.marker.radius/2,centerY:t.posY-e.height/2-t.options.marker.radius/2}},drawPoints:function(){o.prototype.drawPoints.call(this),i.toBack(this.radarPath&&this.radarPath.node())},drawSeries:function(){this.defaultMarker&&this.defaultMarker.remove(),this.defaultMarker=null;var t=this,e=t.vanchart,i=e.renderer,n=t.fillColor&&t.fillColorOpacity,a=this._getRadarPathStyle();t.visible?(this.radarPath=this.radarPath||i.path().addTo(t.group),this.radarPath.style(a),this.radarPath.animate({duration:s,ease:h,attrTween:{d:function(){var e=!!this._pathSegment_;if(e&&this._pathSegment_.length==t.pathSegment.length)for(var i=this._pathSegment_,a=0,o=i.length;o>a&&e;a++)i[a].length!=t.pathSegment[a].length&&(e=!1);var s=e?this._pathSegment_:t._getInitPathSegment(t.pathSegment),h=r.interpolateArray(s,t.pathSegment);return this._pathSegment_=t.pathSegment,function(e){return t._getRadarSeriesPath(h(e),t.options.connectNulls,n)}}}})):(this.radarPath&&this.radarPath.animate({duration:l,ease:u,attrTween:{d:function(){var e=t._getInitPathSegment(t.pathSegment),i=r.interpolateArray(t.pathSegment,e);return function(e){return t._getRadarSeriesPath(i(e),t.options.connectNulls,n)}}}}).remove(),this.radarPath=null)},_getRadarPathStyle:function(){var t=this,e=t.fillColor&&t.fillColorOpacity,i=t.fillColorOpacity,n=t.opacity,r=t.vanchart.highlightTarget;return r&&(i=r==t.name?1:.3,n=r==t.name?1:.3),{fill:e?t.fillColor:"none","fill-opacity":i,stroke:t.color,"stroke-width":t.options.lineWidth,"stroke-opacity":n}},getStyle:function(){return{}},effectAnimation:function(t){n.markerEffectAnimation(t)},getDefaultEffectTime:function(){return n.MARKER_EFFECT_TIME},_createPointGraphic:function(t){return t.graphic=this._createMarker(t.options.marker)},_updatePointGraphicStyle:function(t){this._updateMarker(t)},getDataToDraw:function(){return this.points.filter(function(t){return t.options.marker&&t.options.marker.symbol})},getTextDataToDraw:function(){return this.points},onPointPress:function(){var t=this,e=t.series;e._onMarkerPressed(t)},onPointPressUp:function(){var t=this,e=t.series;e._updateMarker(t)},_calculateLabelPos:function(){},_getFixedPos:function(t){var e,i,n=isNaN(t.options.marker.radius)?4.5:t.options.marker.radius,r=this.getCenter();return e=r[0]+t.posX+n,i=r[1]+t.posY+n,[e,i]},_onSeriesMouseOver:function(t){o.prototype._onSeriesMouseOver.call(this,t);var i=this;i.radarPath&&i.radarPath.style({"stroke-width":i.options.lineWidth+1}),e.toFront(i.group.node())},_onSeriesMouseOut:function(){var t=this;this.defaultMarker&&this.defaultMarker.remove(),this.defaultMarker=null,t.radarPath&&t.radarPath.style(t._getRadarPathStyle())},_onPointMouseOver:function(t){t.series._onMarkerMouseOver(t)},_onPointMouseOut:function(t){t.series._onMarkerMouseOut(t)},getPointInitAttr:function(){return{transform:"translate(0, 0) scale(0.01)"}},getPointInitAnimationAttr:function(t){return{duration:s,ease:h,attr:{transform:"translate("+t.posX+","+t.posY+") scale(1)"}}},getPointUpdateAnimationAttr:function(t){return{ease:h,duration:s,attr:{transform:"translate("+t.posX+","+t.posY+") scale(1)"}}},updatePointGraphic:function(t){this._updateMarkerPointGraphic(t)},getClosestPoint:function(t){var e,i=this.getCenter(),n=Number.MAX_VALUE;return this.points.forEach(function(r){var a=r.posX+i[0]-t.x,o=r.posY+i[1]-t.y,s=Math.sqrt(a*a+o*o);n>s&&!r.isNull&&(e=r,n=s)}),e}});return t("../ChartLibrary").register(a.LINE_RADAR,m),m}),define("chart/ColumnRadar",["require","../EffectHelper","../utils/Interpolator","../utils/PathGenerator","../Constants","./Radar","../ChartLibrary"],function(t){var e=t("../EffectHelper"),i=t("../utils/Interpolator"),n=t("../utils/PathGenerator"),r=t("../Constants"),a=t("./Radar"),o=500,s="back-out",h=500,l="exp-out",u=6,c=.35,d="radar-top",f="radar-bottom",p="radar-left",g="radar-right",m=8,v=a.extend({columnType:!0,_calcLabelPos:function(t){if(t.labelDim){var e=this.polar.angleAxis._getPolarPosition(t.category),i=this._getArcPoint(t.outerRadius-m,t.radian),n=t.labelDim;switch(e){case d:t.labelPos={x:-n.width/2,y:i[1]};break;case g:t.labelPos={x:i[0]-n.width,y:i[1]-n.height/2};break;case f:t.labelPos={x:-n.width/2,y:i[1]-n.height};break;case p:t.labelPos={x:i[0],y:i[1]-n.height/2}}}},_getMoreLabelDefaultCenter:function(t){var e=this._getArcPoint(t.outerRadius/2,t.radian);return{centerX:e[0],centerY:e[1]}},effectAnimation:function(t){e.areaStyleEffectAnimation(t)},getDefaultEffectTime:function(){return e.AREA_STYLE_EFFECT_TIME},getStyle:function(t){return{fill:t.color,"fill-opacity":t.opacity,stroke:t.borderColor,"stroke-width":t.options.borderWidth,"stroke-opacity":1}},getHighLightStyle:function(t){return{stroke:t.mouseOverColor||t.color,fill:t.color,"fill-opacity":1,"stroke-width":u,"stroke-opacity":c}},getPressedStyle:function(t){return{fill:t.clickColor,"fill-opacity":t.clickOpacity}},getPointGraphicKey:function(){return"path"},_getRadarColumnPath:function(t,e,i){var r=.375*this.polar.angleAxis.piece,a=i-r,o=i+r,s=n.arc().innerRadius(t).outerRadius(e).startAngle(a).endAngle(o);return s()},getPointInitAnimationAttr:function(t){var e=this;return{ease:s,duration:o,attrTween:{d:function(){this._innerRadius_=t.innerRadius,this._outerRadius_=t.outerRadius;var n=i(t.animateInitRadius,t.innerRadius),r=i(t.animateInitRadius,t.outerRadius);return function(i){return e._getRadarColumnPath(n(i),r(i),t.radian)}}}}},getPointUpdateAnimationAttr:function(t){var e=this;return{ease:l,duration:h,attrTween:{d:function(){var n=i(this._innerRadius_,t.innerRadius),r=i(this._outerRadius_,t.outerRadius);return this._innerRadius_=t.innerRadius,this._outerRadius_=t.outerRadius,function(i){return e._getRadarColumnPath(n(i),r(i),t.radian)}}}}},getPointDropAnimationAttr:function(t){var e=this;return{ease:l,duration:h,attrTween:{d:function(){var n=i(t.outerRadius,t.innerRadius);return function(i){return e._getRadarColumnPath(t.innerRadius,n(i),t.radian)}}}}},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);t.graphic.animate({duration:100,ease:"ease-out-in",style:i})},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);t.graphic.animate({duration:100,ease:"ease-out-in",style:i})},_getFixedPos:function(t,e){var i=t.radian,n=this.getCenter(),r=t.posX+n[0],a=t.posY+n[1];return i=Math.PI&&i<3*Math.PI/2?r-=e.width:i>=3*Math.PI/2&&i<2*Math.PI&&(a-=e.height,r-=e.width),[r,a]}});return t("../ChartLibrary").register(r.COLUMN_RADAR,v),v}),define("chart/Bubble",["require","./Series","../utils/BaseUtils","../Constants","../utils/QueryUtils","../ComponentLibrary","../EffectHelper","../ChartLibrary"],function(t){var e=t("./Series"),i=t("../utils/BaseUtils"),n=t("../Constants"),r=(t("../utils/QueryUtils"),t("../ComponentLibrary"),t("../EffectHelper")),a=500,o=500,s=300,h=300,l=e.extend({doLayout:function(){this._calculateBubblePosition()},useCanvas:function(){return this.options.large},getTargetKey:function(){return"size"},isNullValue:function(t){var e=t.options;return this.vanchart.isMap()?"-"==e.size||i.hasNotDefined(e.size):"-"==e.x||"-"==e.y||"-"==e.size||i.hasNotDefined(e.size)},_getPointKey:function(t){var e=t.options||t;return this.vanchart.isMap()?t.name:""+e.x+e.y},_calculateLabelPos:function(){},_calculateMinMax4Radius:function(){for(var t=this,e=t.points,i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=0,a=e.length;a>r;r++){var o=e[r],s=o.getTargetValue();o.visible&&!o.isNull&&(0>s&&!o.options.displayNegative||o.options.minSize||o.options.maxSize||(n=Math.max(n,isNaN(s)?0:Math.abs(s)),i=Math.min(i,isNaN(s)?0:Math.abs(s))))}t.seriesAbsMinValue=i,t.seriesAbsMaxValue=n},_calculateBubbleRadius:function(){var t=this,e=t.options,r=Math.max(t.maxSize,t.minSize),a=Math.min(t.minSize,t.maxSize),o=e.sizeBy==n.SIZE_BY_AREA,s=this.seriesAbsMaxValue,h=this.seriesAbsMinValue;if(!this._sizeByCurrentSeries()){var l=this._calculateChartMinMax();s=i.pick(l.max,l[1]),h=i.pick(l.min,l[0])}var u=s-h,c=o?(r*r-a*a)/u:(r-a)/u;c=isFinite(c)?c:0;var d=i.pick(this.vanchart.scale,1),f=this.getTargetKey();this.points.forEach(function(t){var e=c*(Math.abs(t.value)-h),i=o?Math.sqrt(a*a+e):a+e;if(t.options.minSize||t.options.maxSize){var n=isNaN(t.options.minSize)?t.options.maxSize:t.options.minSize;i=o?2*Math.sqrt(n):n}i=t[f]<0&&!t.options.displayNegative?0:i,t.radius=i/2*d})},_sizeByCurrentSeries:function(){return i.hasDefined(this.options.minSize)&&i.hasDefined(this.options.maxSize)},_calculateChartMinMax:function(){var t=this.vanchart.seriesOfType(this.type),e=Number.MAX_VALUE,i=-e;return t.forEach(function(t){t._sizeByCurrentSeries()||(e=Math.min(e,t.seriesAbsMinValue),i=Math.max(i,t.seriesAbsMaxValue))}),{min:e,max:i}},_calculateBubblePosition:function(){var t=this.vanchart.isInverted(),e=this.xAxis,i=this.yAxis;this.points.forEach(function(n){var r=n.options,a=e.scale.rangeBand?e.scale.rangeBand()/2:0,o=e.scale(e.getAxisValue(r.x))+a,s=i.scale(i.getAxisValue(r.y));n.posX=t?s:o,n.posY=t?o:s;var h=n.labelDim&&!n.isNull&&!(n.getTargetValue()<0&&!r.displayNegative);h&&r.dataLabels&&r.dataLabels.enabled&&(n.labelPos={x:n.posX-n.labelDim.width/2,y:n.posY-n.labelDim.height/2})})},getTrendLineXYValues:function(t){return this._getNormalTrendLineXYValues(t)},_getFixedPos:function(t){var e,i=this.vanchart,n=i.bounds,r=t.radius||0;if(i.isMap()){var a=t.getLatLng();if(!a)return;e=i.latLngToContainerPoint(a)}else e={x:n.x+t.posX,y:n.y+t.posY};return r=(r+1)/1.414,[e.x+r,e.y+r]},_getMoreLabelDefaultCenter:function(t){return{centerX:t.posX,centerY:t.posY}},getPointGraphicKey:function(){return"circle"},effectAnimation:function(t){r.bubbleEffectAnimation(t,this.vanchart.isMap())},getDefaultEffectTime:function(){return r.MARKER_EFFECT_TIME},getPointInitAttr:function(t){return{transform:i.makeTranslate([t.posX,t.posY]),r:0}},getPointInitAnimationAttr:function(t){return{delay:t.delayTime||0,ease:"bounce",duration:this.state==n.STATE_TO_SHOW?h:a,attr:{r:t.radius}}},getPointUpdateAnimationAttr:function(t){return{ease:"back-out",duration:o,attr:{r:t.radius,transform:i.makeTranslate({x:t.posX,y:t.posY})}}},getPointDropAnimationAttr:function(){return{ease:"back-in",duration:s,attr:{r:0}}},_getShadowFilter:function(){var t=this,e=t.vanchart,n=e.renderer;return e.bubbleShadowFilter=e.bubbleShadowFilter||n.createDropShadowFilter(0,0,.2,2),"url(#"+i.stamp(e.bubbleShadowFilter)+")"},getStyle:function(t){var e=t.series,n={stroke:t.color,"stroke-opacity":1,"stroke-width":0,fill:t.color,"fill-opacity":t.opacity};return t.options.shadow&&!i.isMS&&(n.filter=e._getShadowFilter()),n},getHighLightStyle:function(t){return{stroke:t.mouseOverColor,"stroke-opacity":.35,"stroke-width":6,fill:t.mouseOverColor,"fill-opacity":1}},getPressedStyle:function(t){return{stroke:t.mouseOverColor,"stroke-opacity":.35,"stroke-width":6,fill:t.clickColor,"fill-opacity":t.clickOpacity}},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);e.vanchart.isLargeMode()||t.graphic.interrupt(n.SELECT_ANIMATION).transition(n.SELECT_ANIMATION).animate({ease:"back-out",duration:200,style:i})},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);e.vanchart.isLargeMode()||t.graphic.interrupt(n.SELECT_ANIMATION).transition(n.SELECT_ANIMATION).animate({ - ease:"back-out",duration:0,style:i})}});return t("../ChartLibrary").register(n.BUBBLE_CHART,l),l}),define("chart/Scatter",["require","./Series","../utils/BaseUtils","../Constants","../utils/QueryUtils","../ComponentLibrary","../EffectHelper","../utils/PathGenerator","../ChartLibrary"],function(t){var e=t("./Series"),i=t("../utils/BaseUtils"),n=t("../Constants"),r=(t("../utils/QueryUtils"),t("../ComponentLibrary"),t("../EffectHelper")),a=t("../utils/PathGenerator"),o=300,s=500,h=2,l=e.extend({doLayout:function(){var t=this.vanchart.isInverted(),e=this.xAxis,i=this.yAxis;this.points.forEach(function(n){var r=e.scale.rangeBand?e.scale.rangeBand()/2:0,a=e.scale(e.getAxisValue(n.options.x))+r,o=i.scale(i.getAxisValue(n.options.y));n.posX=t?o:a,n.posY=t?a:o,n.labelDim&&(n.labelPos={x:n.posX-n.labelDim.width/2,y:n.posY-n.options.marker.radius-h-n.labelDim.height})});var n=this,r=a.line().interpolate(n.interpolate).x(function(t){return t.posX}).y(function(t){return t.posY}).defined(function(t){return!t.isNull});this.points.sort(function(t,e){return t.posX-e.posX}),this.linePath=r(this.points)},useCanvas:function(){return this.options.large},getTargetKey:function(){return"size"},isNullValue:function(t){var e=t.options;return this.vanchart.isMap()?"-"==e.size||i.hasNotDefined(e.size):"-"==e.x||"-"==e.y||i.hasNotDefined(e.y)},_calculateLabelPos:function(t){},getTrendLineXYValues:function(t){return this._getNormalTrendLineXYValues(t)},_getFixedPos:function(t){var e,i=this.vanchart,n=i.bounds,r=t.options.marker&&t.options.marker.radius||0;if("vanChartMap"==i.vanChartType){var a=t.getLatLng();if(!a)return;e=i.latLngToContainerPoint(a)}else e={x:n.x+t.posX,y:n.y+t.posY};return r=(r+1)/1.414,[e.x+r,e.y+r]},_animateEnd:function(){this._showLabels(),this._drawEffectPoints();var t=this,e=t.vanchart,n=e.renderer;t.group||(t.group=t._createGroup(n,e).attr("transform",i.makeTranslate(t._getTranslate())).attr("class",t.className+" "+t.type)),t.lineGraphic=t.lineGraphic||n.path({d:t.linePath}).addTo(t.group).style({fill:"none","pointer-events":"none","stroke-width":t.options.lineWidth,stroke:t.color})},_getMoreLabelDefaultCenter:function(t,e){return{centerX:t.posX+t.options.marker.radius/2,centerY:t.posY-e.height/2-t.options.marker.radius/2}},effectAnimation:function(t){r.markerEffectAnimation(t,this.vanchart.isMap())},getDefaultEffectTime:function(){return r.MARKER_EFFECT_TIME},_getPointKey:function(t){var e=t.options||t;return this.vanchart.isMap()?t.name:""+e.x+e.y},getAttrs:function(t){return{transform:i.makeTranslate({x:t.posX,y:t.posY})}},_updatePointGraphicStyle:function(t){this._updateMarker(t)},_createPointGraphic:function(t){return t.graphic=this._createMarker(t.options.marker)},getPointInitAttr:function(t){return{transform:"translate("+t.posX+","+t.posY+") scale(0.01)"}},getPointInitAnimationAttr:function(t){return{delay:t.delayTime,ease:"back-out",duration:o,attr:{transform:"translate("+t.posX+","+t.posY+") scale(1)"}}},getPointUpdateAnimationAttr:function(t){return{ease:"back-out",duration:s,attr:{transform:"translate("+t.posX+","+t.posY+") scale(1)"}}},getPointDropAnimationAttr:function(t){return{ease:"back-in",duration:o,attr:{transform:"translate("+t.posX+","+t.posY+") scale(0)"}}},drawSeries:function(){var t=this;t.visible&&t.lineGraphic&&t.lineGraphic.animate({duration:s,ease:"back-out",d:t.linePath}),t.visible||t.lineGraphic&&t.lineGraphic.remove()},getStyle:function(t){var e=t.options.marker,i=this._isHollowMarker(e.symbol);return i?{fill:"none",stroke:e.fillColor,"stroke-opacity":e.fillColorOpacity,"stroke-width":2}:{fill:e.fillColor,"fill-opacity":e.fillColorOpacity,stroke:"none"}},_onPointMouseOver:function(t){var e=t.series;e.vanchart.isLargeMode()||e._onMarkerMouseOver(t)},_onPointMouseOut:function(t){var e=t.series;e.vanchart.isLargeMode()||e._onMarkerMouseOut(t)}});return t("../ChartLibrary").register(n.SCATTER_CHART,l),l}),define("chart/Gauge",["require","../Constants","../utils/BaseUtils","./Series","../utils/QueryUtils","../utils/BoundsManager","../utils/ColorUtils","../component/FormattedText"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=t("./Series"),r=(t("../utils/QueryUtils"),t("../utils/BoundsManager"),t("../utils/ColorUtils")),a=t("../component/FormattedText"),o=n.extend({DEFAULT_PADDING:5,LINE_GAP:.3,VERTICAL_GAP:.3,HORIZONTAL_GAP:.8,ANIMATION_TIME:1e3,EASE_TYPE:"quad-out",refresh:function(t,e){return n.prototype.refresh.call(this,t,e),t=this.options,this.gaugeType=t.style,this.center=null,t.center&&(this.center=[this._getPercentValue(t.center[0],this.vanchart.width),this._getPercentValue(t.center[1],this.vanchart.height)]),i.convertToREMUseDefault16PX(t.seriesLabel&&t.seriesLabel.style),i.convertToREMUseDefault16PX(t.valueLabel&&t.valueLabel.style),i.convertToREMUseDefault16PX(t.percentageLabel&&t.percentageLabel.style),this},doLayout:function(){var t=this._calculateGaugeBounds(),e=this,i=e.options;if(!t&&!i.radius&&!e.center)throw new Error("gauge has no bounds");this.bounds=t,this._calculatePercentage(),e.defaultBands=(i.bands||[]).concat(e._getDefaultBands(e.gaugeAxis.scale.domain())),e.points.forEach(function(t){var i=e._getColorFromBands(t.getTargetValue(),e.defaultBands);i&&(i=r.getStandardColorAndOpacity(i),t.color=i.hex,t.opacity=i.alpha),t.mouseOverColor=r.getHighLightColor(t.color),t.clickColor=r.getClickColor(t.color)}),this._doLayout()},_doLayout:function(){this._dealPercentLabel(),this._dealValueLabel(),this._fixCenterAndRadius()},calculateLabelInfo:function(t){},_createGroup:function(t,e){return t.group().addTo(e.seriesGroup)},_getAxisTypes:function(){return["gaugeAxis"]},getDataToDraw:function(){return[]},_calculatePercentage:function(){if(this.points.length){var t=this.gaugeAxis,e=t.scale.domain(),i=this.points;i.forEach(function(t){t.points=i,t.percentage=(t.value-e[0])/(e[1]-e[0])})}},_calculateLabelPos:function(){},_getTranslate:function(){return[Math.round(this.centerX),Math.round(this.centerY)]},_validPoint:function(){var t=this.points.filter(function(t){return!t.isNull});return t[0]||this.points[0]},_dealSeriesLabel:function(){var t=this,e=t.options;if(t.seriesLabelContent="",t.seriesLabelDim={width:0,height:0},e.seriesLabel&&e.seriesLabel.enabled){var i=e.seriesLabel.style,n=t._validPoint();a.dataLabelGenerator(n,e.seriesLabel);var r=n.labelContent,o=n.labelDim;t.seriesLabelContent=r&&r[0]?r[0].text:"",t.seriesLabelStyle=i,t.seriesLabelDim=o}},_dealPercentLabel:function(){var t=this,e=t.options,n=e.percentageLabel;t.percentageLabelContent="",t.percentageLabelDim={width:0,height:0};var r=t.points[0];if(r&&!r.isNull&&n&&n.enabled){var o=i.clone(n.style);o.color||(o.color=r.color),a.dataLabelGenerator(r,n);var s=r.labelContent,h=r.labelDim;t.percentageLabelContent=s&&s[0]?s[0].text:"",t.percentageLabelStyle=o,t.percentageLabelDim=h}},_dealValueLabel:function(){var t=this,e=t.options,n=e.valueLabel,r=n.style,o=n.useHtml,s=n.formatter;if(t.valueLabelContent="",t.valueLabelDim={width:0,height:0},n&&n.enabled){for(var h=[],l=0,u=t.points.length;u>l;l++){var c=t.points[l];if(!c.isNull){var d=a.calculateSingleLineLabelContent(s,c),f=i.getTextDimension(d,r,o);h.push({labelContent:d,labelDim:f,labelStyle:r})}}t.valueLabelContent=h}},_getDefaultBands:function(t){var e=this.options.color,n=[];if(e)n.push({from:t[0],to:t[1],color:e});else{var r=t[0],a=t[1],o=i.accDiv(a-r,3),s=i.accAdd(r,o),h=i.accAdd(s,o),l=this.vanchart.options.colors;n=[{from:r,to:s,color:l[0]},{from:s,to:h,color:l[1]},{from:h,to:a,color:l[2]}]}return n},_getColorFromBands:function(t,e){if(e&&e.length)for(var i=0,n=e.length;n>i;i++){var r=e[i],a=Math.min(r.from,r.to),o=Math.max(r.from,r.to);if(t>=a&&o>=t)return r.color}},_calculateGaugeBounds:function(){for(var t=this.vanchart.seriesOfType(e.GAUGE_CHART),i=this.vanchart.bounds,n=0,r=0,a=t.length;a>r;r++)t[r].center&&t[r].options.radius&&n++;for(var o=this.options.layout==e.HORIZONTAL_LAYOUT,s=o?"width":"height",h=i[s]/Math.max(1,t.length-n),r=0,a=t.length;a>r;r++)if(t[r]==this&&!this.center)return o?{x:i.x+r*h,y:i.y,width:h,height:i.height}:{x:i.x,y:i.y+r*h,width:i.width,height:h};return{x:0,y:0,width:0,height:0}},_getFixedPos:function(t,e){var i,n,r=t.series,a=r.style;return"pointer_semi"==a?(i=r.centerX-e.width/2,n=r.centerY+.14*r.radius+10):(i=r.centerX+r.radius+10,n=r.centerY-e.height/2),[i,n]},_animateEnd:function(){},_getPointTextLabelGroup:function(){if(!this.textGraphicGroup){var t=this.vanchart,e=(t.seriesTextRenderGroup,t.seriesTextDivGroup);this.textGraphicGroup=t.renderer.vgroup(),this.textGraphicGroup.renderG.addTo(this.group),e.append(this.textGraphicGroup.divG)}return this.textGraphicGroup.divG.attr("transform",i.makeTranslate(this._getTranslate())),this.textGraphicGroup},_drawGaugeLabels:function(t){var e=this,i=e.vanchart;e._removeNormalLabels(t);var n=0;i._needShowMoreLabel()&&e.visible&&(e._drawDiffMoreLabels(),n=1e3),i.setTimeout(e.className+"more_label_animate",function(){i._removeChangeDataState(e),e._clearMoreLabels(),e._drawNormalLabels(t)},n)},_drawDiffMoreLabels:function(){var t=this.points[0];t&&!t.isNull&&this._showAndExitMoreLabel(t,0,0)},_removeNormalLabels:function(t){for(var e=t.labels||[],i=0,n=e.length;n>i;i++)e[i]&&e[i].remove(),e[i]=null},_drawNormalLabels:function(t){var e=this,n=e.options,a=e.vanchart,o=a.renderer;if(t.labels=[],e.seriesLabelContent&&e._drawLabel(t,e.seriesLabelContent,e.seriesLabelPos,e.seriesLabelDim,e.seriesLabelStyle,n.seriesLabel.useHtml),e.percentageLabelContent&&e._drawLabel(t,e.percentageLabelContent,e.percentageLabelPos,e.percentageLabelDim,e.percentageLabelStyle,n.percentageLabel.useHtml),e.valueLabelContent&&e.valueLabelContent.length){if(e.valueLabelBackground){var s=i.rectSubPixelOpt(e.valueLabelBackground,0);s.rx=s.rx=.02*e.radius;var h=e.options.valueLabel;t.labels.push(t.append(o.rect(s).style({fill:h.backgroundColor,"fill-opacity":r.getColorOpacity(h.backgroundColor),filter:"url(#"+i.stamp(e.innerFilter)+")"})))}for(var l=0,u=e.valueLabelContent.length;u>l;l++){var h=e.valueLabelContent[l];e._drawLabel(t,h.labelContent,h.labelPos,h.labelDim,h.labelStyle,n.valueLabel.useHtml)}}},_drawLabel:function(t,e,n,r,a,o){if(n){var s=this,h=s.vanchart,l=h.renderer,u=i.getTextHeight(a);t.labels.push(t.append(l.vtext(o).attr({x:n.x,y:n.y,dy:.85*u}).textContent(e).style(a)))}},_onSinglePointerTap:function(t){this.points&&1===this.points.length&&this.points[0].onClick(t.srcEvent)},_onSeriesMouseOver:function(t){this.points&&1===this.points.length&&this.vanchart.showTooltip(this.points[0],t)},_onSeriesMouseOut:function(){this.vanchart.hideTooltip()},getClosestPoint:function(){return 1===this.points.length?this.points[0]:null},_getStroke:function(t){return i.isSupportSVG()?"url(#"+i.stamp(t)+")":t},getEvents:function(){return{mousemove:this._onSeriesMouseOver,mouseout:this._onSeriesMouseOut,tap:this._onSinglePointerTap,press:this.onSeriesPress,pressup:this.onSeriesPressUp}},isSupportLegendHighlight:function(){return!1},isSeriesAccumulated:function(){return!0}});return o}),define("chart/PointerGauge",["require","../Constants","../utils/BaseUtils","../utils/ColorUtils","../utils/BoundsManager","../utils/PathGenerator","../utils/Interpolator","../utils/Scale","./Gauge","../ChartLibrary","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=t("../utils/ColorUtils"),r=t("../utils/BoundsManager"),a=t("../utils/PathGenerator"),o=t("../utils/Interpolator"),s=t("../utils/Scale"),h=t("./Gauge"),l=150,u=90,c=h.extend({gaugeType:e.POINTER_GAUGE,_doLayout:function(){this._dealSeriesLabel(),this._dealValueLabel(),"pointer"==this.options.style?this._fixPointerCenter():this._fixPointerSemiCenter()},_drawDiffMoreLabels:function(){var t=this,e=t.points,n=i.getTextHeight(t._getMoreLabelStyle()),r=n*e.length+n/2*(e.length-1),a=Math.max(0,(t.radius-r)/2),o="pointer"==t.options.style?a:-t.radius+a;e.forEach(function(e){t._showAndExitMoreLabel(e,0,o+n/2),o+=n+n/2})},getDataToDraw:function(){return this.points},_fixPointerCenter:function(){var t=this,i=t.options,n=i.radius,r=t.center,a=i.seriesLabel.align||e.BOTTOM;if(r)t.centerX=r[0],t.centerY=r[1],t.radius=n;else{var o=t.bounds,s=20+t.seriesLabelDim.height,h=o.height-s,l=o.x+o.width/2,u=o.y+o.height/2;if(n=n||Math.min(o.width,h)/2-t.DEFAULT_PADDING,a==e.BOTTOM){if(u+n+s>o.y+o.height){var c=o.height-(2*n+s);c>=0&&(u=o.y+n+c/2)}}else if(u-n-s=0&&(u=o.y+n+s+c/2)}t.centerX=l,t.centerY=u,t.radius=n}if(t.seriesLabelContent){var d=t.seriesLabelDim;t.seriesLabelPos={x:-d.width/2,y:a==e.BOTTOM?n+20:-n-20-d.height}}t.valueLabelContent&&this._dealValueLabelContent(t,n)},_fixPointerSemiCenter:function(){var t=this,i=t.options,n=i.radius,r=i.seriesLabel.align;if(t.center)t.centerX=t.center[0],t.centerY=t.center[1],t.radius=n;else{var a=t.bounds,o=20+t.seriesLabelDim.height,s=a.height-o;n=n||Math.min(a.width/2,s/1.14)-t.DEFAULT_PADDING;var h=a.x+a.width/2,l=a.y+a.height/2+n/2;if(r==e.BOTTOM){if(l+.14*n+o>a.y+a.height){var u=a.height-(1.14*n+o);u>=0&&(l=a.y+n+u/2)}}else if(l-n-o=0&&(l=a.y+n+o+u/2)}t.centerX=h,t.centerY=l,t.radius=n}if(t.seriesLabelContent){var c=t.seriesLabelDim;t.seriesLabelPos={x:-c.width/2,y:r==e.BOTTOM?.14*n+20:-n-20-c.height}}t.valueLabelContent&&this._dealSemiValueLabelContent(t,n)},_dealValueLabelContent:function(t,e){for(var n=t.options,r=t.gaugeAxis,a=r.options,o=r.scale.domain(),h=s.linear().domain(o).range([i.toRadian(-150),i.toRadian(150)]),l=i.getTextHeight(a.labelStyle),u=.16*e+l/2,c=n.valueLabel.style,d=n.valueLabel.useHtml,f=i.getTextHeight(c),p=this._getPointerTickBoundsManager(r,e,h,l),g=p.heightBoundsManager,m=p.widthBoundsManager,v=0,_=u,y=Number.MAX_VALUE,x=0,b=t.valueLabelContent.length;b>x;x++){var T=t.valueLabelContent[x],A=Math.min(-T.labelDim.width/2-f/4,y),C={x:A,y:_,width:2*Math.abs(A),height:u+f*(1+this.LINE_GAP)-_},L=T.labelContent,P=!1;if(!t._boundsInCircle(C))break;if(g.isOverlapped(C))break;for(;m.isOverlapped(C)&&L.length;){L=L.substr(0,Math.floor(.9*L.length));var M=i.getTextDimension(L+"...",c,d);A=Math.min(-M.width/2-f/4,y),C={x:A,y:_,width:2*Math.abs(A),height:u+f*(1+this.LINE_GAP)-_},P=!0}P&&(T.labelContent=L+"...",T.labelDim=i.getTextDimension(T.labelContent,c,d),A=Math.min(-T.labelDim.width/2-f/4,y)),T.labelPos={x:-T.labelDim.width/2,y:u+f/2},u+=f*(1+this.LINE_GAP),y=A,v++}t.valueLabelContent.length=v,t.valueLabelBackground={x:y,y:_,width:2*Math.abs(y),height:f*(1+this.LINE_GAP)*v+f}},_dealSemiValueLabelContent:function(t,e){for(var n=t.options,r=t.gaugeAxis,a=r.options,o=r.scale.domain(),h=s.linear().domain(o).range([i.toRadian(-90),i.toRadian(90)]),l=n.valueLabel.style,u=n.valueLabel.useHtml,c=i.getTextHeight(l),d=i.getTextHeight(a.labelStyle),f=-(.11*e+d/2)-c,p=this._getPointerTickBoundsManager(r,e,h,d),g=p.heightBoundsManager,m=p.widthBoundsManager,v=0,_=f,y=Number.MAX_VALUE,x=0,b=t.valueLabelContent.length;b>x;x++){var T=t.valueLabelContent[x];_-=c*(1+this.LINE_GAP);var A=Math.min(-T.labelDim.width/2-c/4,y),C={x:A,y:_,width:2*Math.abs(A),height:f-_},L=T.labelContent,P=!1;if(!t._boundsInCircle(C)){_+=c*(1+this.LINE_GAP);break}if(g.isOverlapped(C)){_+=c*(1+this.LINE_GAP);break}for(;m.isOverlapped(C)&&L.length;){L=L.substr(0,Math.floor(.9*L.length));var M=i.getTextDimension(L+"...",l,u);A=Math.min(-M.width/2-c/4,y),C={x:A,y:_,width:2*Math.abs(A),height:f-_},P=!0}P&&(T.labelContent=L+"...",T.labelDim=i.getTextDimension(T.labelContent,l,u),A=Math.min(-T.labelDim.width/2-c/4,y)),y=A,v++}t.valueLabelContent.length=v;for(var x=0;v>x;x++){var T=t.valueLabelContent[x];T.labelPos={x:-T.labelDim.width/2,y:_+c/2+x*c*(1+this.LINE_GAP)}}t.valueLabelBackground={x:y,y:_,width:2*Math.abs(y),height:c*(1+this.LINE_GAP)*v+c}},_boundsInCircle:function(t){for(var e=this.radius,i=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x,y:t.y+t.height},{x:t.x+t.width,y:t.y+t.height}],n=0;4>n;n++){var r=i[n],a=Math.abs(r.x),o=Math.abs(r.y);if(Math.pow(a*a+o*o,.5)>e)return!1}return!0},_getPointerTickBoundsManager:function(t,e,i,n){var a=new r,o=new r,s=.84*e,h=t.tickData,l=this,u=.5*n;h.forEach(function(t){var e=i(t.tickValue),n=l._getPointerTickCenter(t,s,i);l._addToBoundsManager(e,{x:n.x-t.tickDim.width/2-u,y:n.y-t.tickDim.height/2-u,width:t.tickDim.width+u,height:t.tickDim.height+u},a,o)});var c=t.getMinorTickData()||[],d=.85*e,f=.1*e;return c.forEach(function(t){var e,n,r=i(t),s=l._getArcPoint(d,r);r-Math.PI/4&&t3*-Math.PI/4)&&n.addBounds(e),i.addBounds(e)},_getPointerTickCenter:function(t,e,i){var n,r,a=i(t.tickValue),o=this._getArcPoint(e,a),s=o[0],h=o[1],l=t.tickDim,u=Math.atan(l.width/l.height);if(Math.abs(a)=u&&a<=Math.PI-u){var c=l.width/2;n=s-c,r=h-c*h/s}else if(a>=u-Math.PI&&-u>=a){var c=l.width/2;n=s+c,r=h+c*h/s}else{var c=l.height/2;n=s-c*s/h,r=h-c}return{x:n,y:r}},drawSeries:function(){var t=this,e=t.vanchart,i=e.renderer,n=t.group;this.backgruondPath||(this.backgruondPath=i.path().addTo(n),this.hingePath=i.path().addTo(n),this.labelGroup=this._getPointTextLabelGroup(),this.axisGroup=this.labelGroup,this.needleGroup=i.group().addTo(n),this.pointerHingePath=i.path().addTo(n)),e.registerInteractiveTarget(this,n),this.labelGroup=this._getPointTextLabelGroup(),this.dropFilter||(this.dropFilter=i.createDropShadowFilter(0,2,.1,2),this.innerFilter=i.createInnerShadowFilter(0,2,.1,2)),"pointer"==this.options.style?this._drawPointer(180,.16,.07):this._drawPointer(98,.11,.055)},onSeriesPress:function(){var t=a.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0),e="pointer"==this.options.style?.16:.11,i="pointer"==this.options.style?.07:.055;t.outerRadius(e*this.radius*1.25),this.hingePath.attr("d",t()),t.outerRadius(i*this.radius*1.25),this.pointerHingePath.attr("d",t())},onSeriesPressUp:function(){var t=a.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0),e="pointer"==this.options.style?.16:.11,i="pointer"==this.options.style?.07:.055;t.outerRadius(e*this.radius),this.hingePath.attr("d",t()),t.outerRadius(i*this.radius),this.pointerHingePath.attr("d",t())},_getScale:function(){var t=this,e=t.options.style,n="pointer"==e?l:u,r=t.gaugeAxis.scale.domain();return s.linear().domain(r).range([i.toRadian(-n),i.toRadian(n)])},getStyle:function(t){var e=t.options;return{fill:e.needle,"fill-opacity":n.getColorOpacity(e.needle)}},getPointGraphicKey:function(){return"path"},_getPointGraphicGroup:function(){return this.needleGroup},getPointInitAnimationAttr:function(t){var e=t.series,n=e._getScale();return{duration:e.ANIMATION_TIME,ease:e.EASE_TYPE,attrTween:{d:function(){var r=this._current_||n.domain()[0];this._current_=i.getValueInDomain(t.value,n.domain());var a=o(r,this._current_);return function(t){return e._getArrowPath(a(t))}}}}},getPointUpdateAnimationAttr:function(t){return this.getPointInitAnimationAttr(t)},_getArrowPath:function(t){var e=this._getScale()(t),i=this.radius,n=this._getArcPoint(.9*i,e),r=this._getArcPoint(.02*i,e+Math.PI/2),a=this._getArcPoint(.02*i,e-Math.PI/2);return"M"+n[0]+","+n[1]+"L"+r[0]+","+r[1]+"L"+a[0]+","+a[1]+"Z"},_drawPointer:function(t,e,r){var o=this,s=o.options,h=o.radius,l=a.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0),u=a.arc().startAngle(i.toRadian(-t)).endAngle(i.toRadian(t)).innerRadius(0).outerRadius(h).toCenter(!1);o.backgruondPath.attr("d",u()).style({fill:s.paneBackgroundColor,"fill-opacity":n.getColorOpacity(s.paneBackgroundColor),filter:"url(#"+i.stamp(o.dropFilter)+")"}),l.outerRadius(e*h),o.hingePath.attr("d",l()).style({fill:s.hingeBackgroundColor,"fill-opacity":n.getColorOpacity(s.hingeBackgroundColor),filter:"url(#"+i.stamp(o.innerFilter)+")"}),this._drawPointerTicks(),this._drawGaugeLabels(o.labelGroup),l.outerRadius(r*h),o.pointerHingePath.attr("d",l()).style({fill:s.hinge,"fill-opacity":n.getColorOpacity(s.hinge),filter:"url(#"+i.stamp(o.dropFilter)+")"})},_drawPointerTicks:function(){var t=this,e=t.defaultBands,n=t.vanchart,r=t.gaugeAxis,a=n.renderer,o=this.axisGroup,s=r.getTickData(),h=r.getMinorTickData(),l=r.options,u=l.labelStyle,c=l.useHtml,d=.95*t.radius,f=.84*t.radius,p=this._getScale();this.ticks=this.ticks||[];var g,m,v=r._bindData(this.ticks,s,function(t){return p(t.tickValue)}),_=[];for(v.exit.map(function(t){t.text&&t.text.remove(),t.remove()}),_=v.enter.map(function(t){var e=o.append(a.line().datum(t));return i.hasDefined(t.tickContent)&&(e.text=o.append(a.vtext(c))),e}),this.ticks=_=_.concat(v.update),g=0,m=_.length;m>g;g++){var y=_[g],x=y.datum(),b=p(x.tickValue),T=t._getArcPoint(d,b),A=t._getArcPoint(d-.1*t.radius,b),C=t._getColorFromBands(x.tickValue,e);y.attr("x1",T[0]).attr("y1",T[1]).attr("x2",A[0]).attr("y2",A[1]).style({stroke:C,"stroke-width":1});var L=t._getPointerTickCenter(x,f,p);y.text&&y.text.textContent(x.tickContent).style(u).attr({x:L.x-x.tickDim.width/2,y:L.y-x.tickDim.height/2,dy:".85em"})}this.minorTics=this.minorTics||[];var g,m,v=r._bindData(this.minorTics,h),_=[];for(g=0,m=v.exit.length;m>g;g++)v.exit[g].remove();for(g=0,m=v.enter.length;m>g;g++)_.push(o.append(a.line().datum(v.enter[g])));for(this.minorTics=_=_.concat(v.update),g=0,m=_.length;m>g;g++){var P=_[g],M=P.datum(),b=p(M),T=t._getArcPoint(d,b),A=t._getArcPoint(d-.05*t.radius,b),C=t._getColorFromBands(M,e);P.attr("x1",T[0]).attr("y1",T[1]).attr("x2",A[0]).attr("y2",A[1]).style({stroke:C,"stroke-width":1})}}});return t("../ChartLibrary").register(e.POINTER_GAUGE,c),t("../ChartLibrary").register(e.POINTER_SEMI_GAUGE,c),c}),define("chart/SlotGauge",["require","../Constants","../utils/ColorUtils","../utils/BaseUtils","../utils/PathGenerator","../utils/Scale","./Gauge","../utils/Interpolator","../component/FormattedText","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/ColorUtils"),n=t("../utils/BaseUtils"),r=t("../utils/PathGenerator"),a=t("../utils/Scale"),o=t("./Gauge"),s=t("../utils/Interpolator"),h=t("../component/FormattedText"),l=o.extend({gaugeType:e.SLOT_GAUGE,_getFixedPos:function(t,e){var i=t.series,n=i.centerX+1.08*i.radius+10,r=i.centerY-e.height/2;return[n,r]},_dealValueLabel:function(){var t=this,e=t.options,i=t.points[0];if(i&&!i.isNull){for(var r=e.valueLabel,a=r.useHtml,o=r.formatter,s=h.createMultiLineLabelContent(o,i),l=r.style,u=[],c=0,d=s.length;d>c;c++)u.push({labelContent:s[c],labelStyle:l,labelDim:n.getTextDimension(s[c],l,a)});t.valueLabelContent=u}},_fixCenterAndRadius:function(){var t=this,e=t.options,i=e.radius;if(t.center)t.centerX=t.center[0],t.centerY=t.center[1],t.radius=i;else{var r=t.bounds;i||(i=Math.min(r.width/2,r.height/2),i=i/1.08-t.DEFAULT_PADDING);var a=r.x+r.width/2,o=r.y+r.height/2;t.centerX=a,t.centerY=o,t.radius=i}if(t.percentageLabelContent&&t.valueLabelContent&&t.valueLabelContent.length>0){t.percentageLabelPos={x:-t.percentageLabelDim.width/2,y:-t.percentageLabelDim.height*(1+t.LINE_GAP)};for(var s=0,h=0,l=t.valueLabelContent.length;l>h;h++){var u=t.valueLabelContent[h];u.labelPos={x:-u.labelDim.width/2,y:s},s+=u.labelDim.height*(1+t.LINE_GAP)}}else if(t.percentageLabelContent)t.percentageLabelPos={x:-t.percentageLabelDim.width/2,y:-t.percentageLabelDim.height/2};else if(t.valueLabelContent&&t.valueLabelContent.length>0)for(var c=n.getTextHeight(e.valueLabel.style),d=t.valueLabelContent.length,f=c*d+c*(d-1)/2,s=-f/2,h=0;d>h;h++){var u=t.valueLabelContent[h];u.labelPos={x:-u.labelDim.width/2,y:s},s+=c*(1+t.LINE_GAP)}},drawSeries:function(){var t=this,e=t.options,o=t.points[0],h=t.vanchart,l=h.renderer,u=t.group;this.backgruondPath||(this.backgruondPath=l.path().addTo(u),this.slotBackground=l.path().addTo(u),this.needlePath=l.circle().addTo(u)),this.labelGroup=this._getPointTextLabelGroup(),this.innderShadow||(this.innderShadow=l.createInnerShadowFilter(0,2,.05,0),this.dropShadow=l.createDropShadowFilter(0,2,.05,0));var c=r.arc().startAngle(n.toRadian(-135)).endAngle(n.toRadian(135)).innerRadius(0).outerRadius(t.radius).toCenter(!1).closePath(!1),d=r.arc().startAngle(n.toRadian(-135)).endAngle(n.toRadian(135)).innerRadius(0).outerRadius(t.radius).toCenter(!1).closePath(!1),f=t.gaugeAxis.scale.domain(),p=a.linear().domain(f).range([n.toRadian(-135),n.toRadian(135)]);if(t.backgruondPath.attr("d",d()).style({fill:"none",stroke:e.slotBackgroundColor,"stroke-linecap":"round","stroke-width":.16*t.radius,filter:"url(#"+n.stamp(this.innderShadow)+")"}),o&&!o.isNull){var g=p(f[0]),m=p(n.getValueInDomain(o.value,f)),v=n.toDegree(m-g),_=(t._getColorFromBands(f[0],t.defaultBands),o.color);t.slotBackground.style({fill:"none",stroke:i.colorToHex(_),"stroke-linecap":"round","stroke-width":.16*t.radius});var y=this._getArcPoint(t.radius,g);if(t.needlePath.attr("cx",y[0]).attr("cy",y[1]).attr("r",.048*t.radius).style({fill:e.needle,"fill-opacity":i.getColorOpacity(e.needle),filter:"url(#"+n.stamp(this.dropShadow)+")"}),t.vanchart.renderer.isAnimation)t.slotBackground.animate({duration:t.ANIMATION_TIME,ease:t.EASE_TYPE,attrTween:{d:function(){this._lastRadian_=this._lastRadian_||g;var t=s(this._lastRadian_,m);return this._lastRadian_=m,function(e){return c.endAngle(t(e))()}}}}),t.needlePath.animate({duration:t.ANIMATION_TIME,ease:t.EASE_TYPE,attrTween:{transform:function(){this._lastRotate_=this._lastRotate_||0;var t=s(this._lastRotate_,v);return this._lastRotate_=v,function(e){return"rotate("+t(e)+")"}}}});else{var x=c.endAngle(m)(),b=t._getArcPoint(t.radius,m),T=b[0],A=b[1],C=.008*t.radius;if(Math.abs(m-g)<1e-6){var c="a"+C+","+C+" 0 1,0 ";x="M"+(T-C)+","+A+c+2*C+",0 "+c+2*-C+",0 "}t.slotBackground.attr("d",x),t.needlePath.attr({cx:b[0],cy:b[1]})}this._drawGaugeLabels(this.labelGroup)}},_onSeriesMouseOver:function(t){o.prototype._onSeriesMouseOver.call(this,t);var e=this.points[0];if(e){var n=i.getHighLightColor(e.color),r=i.getHighLightColor(this.options.needle);this.slotBackground.style({stroke:i.colorToHex(n)}),this.needlePath.style({fill:r})}},_onSeriesMouseOut:function(t){o.prototype._onSeriesMouseOut.call(this,t);var e=this.points[0];e&&(this.slotBackground.style({stroke:e.color}),this.needlePath.style({fill:e.options.needle}))},onSeriesPress:function(){var t=this.points[0];if(t){var e=i.getColorWithDivider(t.color,1/.95),n=i.getColorWithDivider(this.options.needle,1/.95);this.slotBackground.style({stroke:i.colorToHex(e)}),this.needlePath.style({fill:n})}},onSeriesPressUp:function(){this._onSeriesMouseOver()}});return t("../ChartLibrary").register(e.SLOT_GAUGE,l),l}),define("chart/RingGauge",["require","../Constants","../utils/ColorUtils","../utils/BaseUtils","./Gauge","../utils/PathGenerator","../utils/Interpolator","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/ColorUtils"),n=t("../utils/BaseUtils"),r=t("./Gauge"),a=t("../utils/PathGenerator"),o=t("../utils/Interpolator"),s=r.extend({gaugeType:e.RING_GAUGE,_fixCenterAndRadius:function(){var t,e,i=this,n=i.options,r=n.radius;if(i.center)t=i.center[0],e=i.center[1];else{var a=i.bounds;r=r||Math.min(a.width/2,a.height/2)-i.DEFAULT_PADDING,t=a.x+a.width/2,e=a.y+a.height/2}i.centerX=t,i.centerY=e,i.radius=r;var o=0,s=i.valueLabelContent?i.valueLabelContent[0]:null;i.percentageLabelContent&&s?o=i.percentageLabelDim.height*(1+i.LINE_GAP)+s.labelDim.height:i.percentageLabelContent?o=i.percentageLabelDim.height:s&&(o=s.labelDim.height);var h=-o/2;i.percentageLabelContent&&(i.percentageLabelPos={x:-i.percentageLabelDim.width/2,y:h},h+=i.percentageLabelDim.height*(1+i.LINE_GAP)),s&&(s.labelPos={x:-s.labelDim.width/2,y:h})},drawSeries:function(){var t=this,e=t.options,r=t.vanchart,s=r.renderer,h=t.group;if(this.backgruondPath||(this.backgruondPath=s.path().addTo(h),this.ringPath=s.path().addTo(h),this.innerBackgroundPath=s.path().addTo(h),this.innerStroke=s.path().addTo(h),this.outerStroke=s.path().addTo(h)),this.labelGroup=this._getPointTextLabelGroup(),!this.colorGradient){var l={x1:"0%",y1:"0%",x2:"0%",y2:"100%"},u={offset:"0%","stop-color":"#ffffff"},c={offset:"100%","stop-color":"#dddddd"};this.colorGradient=s.colorGradient(l,[u,c]),u["stop-color"]="#dddddd",c["stop-color"]="#ffffff",this.clickedGradient=s.colorGradient(l,[u,c]),n.isSupportSVG()||(this.colorGradient="#ffffff",this.clickedGradient="#dddddd")}var d=a.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0).outerRadius(t.radius),f=t.gaugeAxis.scale.domain(),p=(t._getColorFromBands(f[0],t.defaultBands),.8*t.radius),g=p+2,m=p-1.5;this.backgruondPath.attr("d",d()).style({fill:e.paneBackgroundColor,"fill-opacity":i.getColorOpacity(e.paneBackgroundColor)});var v=t.points[0];if(v){var _=a.arc().startAngle(0).innerRadius(0).outerRadius(t.radius),y=v.color,x=Math.max(v.percentage,0),b=2*Math.PI*x*(e.clockwise?1:-1);this.ringPath.style({fill:i.colorToHex(y),"fill-opacity":i.getColorOpacity(y)}),this.ringPath.animate({duration:t.ANIMATION_TIME,ease:t.EASE_TYPE,attrTween:{d:function(){this._lastRadian_=this._lastRadian_||0;var t=o(this._lastRadian_,b);return this._lastRadian_=b,function(e){return _.endAngle(t(e))()}}}})}this.innerBackgroundPath.attr("d",d.outerRadius(p)()).style({fill:e.innerPaneBackgroundColor,"fill-opacity":i.getColorOpacity(e.innerPaneBackgroundColor)}),this.outerStroke.attr("d",d.outerRadius(g)()).style({fill:"none",stroke:"#000000","stroke-opacity":.05,"stroke-width":4}),this.innerStroke.attr("d",d.outerRadius(m)()).style({fill:"none",stroke:this._getStroke(this.colorGradient),"stroke-width":3}),this._drawGaugeLabels(this.labelGroup)},_onSeriesMouseOver:function(t){r.prototype._onSeriesMouseOver.call(this,t);var e=this.points[0];e&&(this.innerStroke.style({stroke:this._getStroke(this.colorGradient)}),this.ringPath.style({fill:e.mouseOverColor}))},_onSeriesMouseOut:function(t){r.prototype._onSeriesMouseOut.call(this,t);var e=this.points[0];e&&(this.innerStroke.style({stroke:this._getStroke(this.colorGradient)}),this.ringPath.style({fill:e.color}))},onSeriesPress:function(){var t=this.points[0];t&&(this.innerStroke.style({stroke:this._getStroke(this.clickedGradient)}),this.ringPath.style({fill:t.clickColor}))},onSeriesPressUp:function(){this._onSeriesMouseOver()}});return t("../ChartLibrary").register(e.RING_GAUGE,s),s}),define("chart/ThermometerGauge",["require","../Constants","../utils/ColorUtils","../utils/BaseUtils","../utils/Scale","./Gauge","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/ColorUtils"),n=t("../utils/BaseUtils"),r=t("../utils/Scale"),a=t("./Gauge"),o=6,s=4,h=5,l=.001,u=a.extend({gaugeType:e.THERMOMETER_GAUGE,_drawDiffMoreLabels:function(){function t(t,e){return t-e/2}var i=this.points[0];if(i&&!i.isNull){var n=this.gaugeAxis.scale.domain(),a=this.options.thermometerLayout==e.VERTICAL_LAYOUT,o=r.linear().domain(n).range(a?[this.radius,-this.radius]:[-this.radius,this.radius]),s=o(i.y),l=a?0-2*h:s,u=a?s:0-2*h;this._showAndExitMoreLabel(i,l,u,t,t)}},_fixCenterAndRadius:function(){var t=(this.points[0],this),i=t.options.thermometerLayout==e.HORIZONTAL_LAYOUT?this._fixHorizontalThermometerCenter():this._fixVerticalThermometerCenter(),n=i.centerX,r=i.centerY,a=i.radius,o=t.valueLabelContent?t.valueLabelContent[0]:null;if(t.percentageLabelContent&&(t.percentageLabelPos.x-=n,t.percentageLabelPos.y-=r,t.percentageLabelPos.y=Math.min(t.percentageLabelPos.y,a-t.percentageLabelDim.height)),o){o.labelPos.x-=n,o.labelPos.y-=r;var s=a-o.labelDim.height-o.labelPos.y;0>s&&(o.labelPos.y+=s,t.percentageLabelContent&&(t.percentageLabelPos.y+=s))}t.centerX=n,t.centerY=r,t.radius=a},_fixHorizontalThermometerCenter:function(){var t,i,n,r=this,a=r.options,l=r.gaugeAxis,u=a.percentageLabel,c=a.valueLabel,d=r.valueLabelContent?r.valueLabelContent[0]:null,f=r.options.radius,p=this._getThermometerSize();if(r.center)t=r.center[0],i=r.center[1],n=i;else{var g=r.bounds;n=g.y+(g.height-p)/2,t=g.x+g.width/2,f=f||g.width/2-l.getMaxTickWidth()-r.DEFAULT_PADDING}return(r.percentageLabelContent||d)&&(r.percentageLabelContent&&d&&u.align==e.TOP&&c.align==e.TOP?(r.center&&(n-=r.percentageLabelDim.height*(1+r.LINE_GAP), - n-=d.labelDim.height*(1+r.HORIZONTAL_GAP),n-=l.getTickHeight()+s+o+s+h),r.percentageLabelPos={x:-r.percentageLabelDim.width/2+t,y:n},n+=r.percentageLabelDim.height*(1+r.LINE_GAP),d.labelPos={x:-d.labelDim.width/2+t,y:n},n+=d.labelDim.height*(1+r.HORIZONTAL_GAP)):(r.percentageLabelContent&&u.align==e.TOP&&(r.center&&(n-=r.percentageLabelDim.height*(1+r.HORIZONTAL_GAP),n-=l.getTickHeight()+s+o+s+h),r.percentageLabelPos={x:-r.percentageLabelDim.width/2+t,y:n},n+=r.percentageLabelDim.height*(1+r.HORIZONTAL_GAP)),d&&c.align==e.TOP&&(r.center&&(n-=d.labelDim.height*(1+r.HORIZONTAL_GAP),n-=l.getTickHeight()+s+o+s+h),d.labelPos={x:-d.labelDim.width/2+t,y:n},n+=d.labelDim.height*(1+r.HORIZONTAL_GAP)))),r.center?n=i+5:(n+=l.getTickHeight()+s+o+s+2*h,i=n-5),(r.percentageLabelContent||d)&&(r.percentageLabelContent&&d&&u.align==e.BOTTOM&&c.align==e.BOTTOM?(n+=r.percentageLabelDim.height*r.HORIZONTAL_GAP,r.percentageLabelPos={x:-r.percentageLabelDim.width/2+t,y:n},n+=r.percentageLabelDim.height*(1+r.LINE_GAP),d.labelPos={x:-d.labelDim.width/2+t,y:n}):(r.percentageLabelContent&&u.align==e.BOTTOM&&(n+=r.percentageLabelDim.height*r.HORIZONTAL_GAP,r.percentageLabelPos={x:-r.percentageLabelDim.width/2+t,y:n}),d&&c.align==e.BOTTOM&&(n+=d.labelDim.height*r.HORIZONTAL_GAP,d.labelPos={x:-d.labelDim.width/2+t,y:n}))),{centerX:t,centerY:i,radius:f}},_fixVerticalThermometerCenter:function(){var t,i,a,l=this,u=l.options,c=l.gaugeAxis,d=u.percentageLabel,f=u.valueLabel,p=u.radius,g=l.points[0],m=c.scale.domain(),v=l.valueLabelContent?l.valueLabelContent[0]:null,_=this._getThermometerSize();if(l.center)t=l.center[0],i=l.center[1],a=t-2*h;else{var y=l.bounds;a=y.x+(y.width-_)/2,i=y.y+y.height/2,p=p||y.height/2-c.getTickHeight()-l.DEFAULT_PADDING}var x=r.linear().domain(m).range([p,-p]),b=i+x(n.getValueInDomain(g.value,m));return l.percentageLabelDim&&(b-=l.percentageLabelDim.height/3),(l.percentageLabelContent||v)&&(l.percentageLabelContent&&v&&d.align==e.LEFT&&f.align==e.LEFT?(l.center||(a+=Math.max(l.percentageLabelDim.width,v.labelDim.width),t=a+h),l.percentageLabelPos={x:a-l.percentageLabelDim.width,y:b},v.labelPos={x:a-v.labelDim.width,y:b+l.percentageLabelDim.height*(1+l.LINE_GAP)},a+=l.LINE_GAP*Math.max(l.percentageLabelDim.height,v.labelDim.height)):(l.percentageLabelContent&&d.align==e.LEFT&&(l.center&&(a-=l.percentageLabelDim.width+l.LINE_GAP*l.percentageLabelDim.height),l.percentageLabelPos={x:a,y:b},a+=l.percentageLabelDim.width+l.LINE_GAP*l.percentageLabelDim.height),v&&f.align==e.LEFT&&(l.center&&(a-=v.labelDim.width+l.LINE_GAP*v.labelDim.height),v.labelPos={x:a,y:b},a+=v.labelDim.width+l.LINE_GAP*v.labelDim.height))),l.center?a=t-h:t=a+h,a+=2*h+s+o+s+c.getMaxTickWidth(),(l.percentageLabelContent||v)&&(l.percentageLabelContent&&v&&d.align==e.RIGHT&&f.align==e.RIGHT?(a+=l.LINE_GAP*Math.max(l.percentageLabelDim.height,v.labelDim.height),l.percentageLabelPos={x:a,y:b},v.labelPos={x:a,y:b+l.percentageLabelDim.height*(1+l.LINE_GAP)}):(l.percentageLabelContent&&d.align==e.RIGHT&&(l.percentageLabelPos={x:a+l.LINE_GAP*l.percentageLabelDim.height,y:b}),v&&f.align==e.RIGHT&&(v.labelPos={x:a+l.LINE_GAP*v.labelDim.height,y:b}))),{centerX:t,centerY:i,radius:p}},_getThermometerSize:function(){var t=this,i=t.options,n=i.valueLabel,r=t.gaugeAxis,a=t.valueLabelContent?t.valueLabelContent[0]:null,l=i.percentageLabel;if(t.options.thermometerLayout==e.HORIZONTAL_LAYOUT){var u=0;return t.percentageLabelContent&&a?l.align==n.align&&(u+=t.percentageLabelDim.height+a.labelDim.height,u+=t.LINE_GAP*t.percentageLabelDim.height,u+=t.HORIZONTAL_GAP*(n.align==e.TOP?a.labelDim.height:t.percentageLabelDim.height)):t.percentageLabelContent?u+=(1+t.HORIZONTAL_GAP)*t.percentageLabelDim.height:a&&(u+=(1+t.HORIZONTAL_GAP)*a.labelDim.height),u+=2*h+s+o+s+r.getTickHeight()}var c=0;return t.percentageLabelContent&&a?l.align==n.align?(c+=Math.max(t.percentageLabelDim.width,a.labelDim.width),c+=t.VERTICAL_GAP*Math.max(t.percentageLabelDim.height,a.labelDim.height)):(c+=t.percentageLabelDim.width+a.labelDim.width,c+=t.VERTICAL_GAP*(t.percentageLabelDim.height+a.labelDim.height)):t.percentageLabelContent?c+=t.percentageLabelDim.width+t.VERTICAL_GAP*t.percentageLabelDim.height:a&&(c+=a.labelDim.width+t.VERTICAL_GAP*a.labelDim.height),c+=r.getMaxTickWidth(),c+=2*h+s+o+s},drawSeries:function(){var t=this,a=t.options,o=t.points[0],s=t.vanchart,u=s.renderer,c=t.group,d=t.gaugeAxis,f=d.scale.domain(),p=t.options.thermometerLayout==e.VERTICAL_LAYOUT,g=n.getValueInDomain(o.value,f),m=o.color,v=t.radius;if(!this.backgruondLine){this.backgruondLine=u.line().addTo(c),this.thermometerLine=u.line().addTo(c),this.needlePath=u.circle().addTo(c),this.axisGroup=u.group().addTo(c);var _=m,y=i.mixColorWithHSB(_,0,-.1,.1),x=i.getStandardColorAndOpacity(_).alpha;1>x&&(y=i.mixColorWithAlpha(y,x));var b="0%",T="0%";p?T="100%":b="100%";var A={offset:"0%","stop-color":p?_:y},C={offset:"100%","stop-color":p?y:_};this.colorGradient=u.colorGradient({x1:"0%",y1:"0%",x2:b,y2:T},[A,C]);var L=i.getColorWithDivider(_,1/.95),P=i.mixColorWithHSB(_,0,-.1,.1);A={offset:"0%","stop-color":p?L:P},C={offset:"100%","stop-color":p?P:L},this.clickedColorGradient=u.colorGradient({x1:"0%",y1:"0%",x2:b,y2:T},[A,C]);var M=i.getColorWithDivider(o.mouseOverColor,1/.95),w=i.mixColorWithHSB(o.mouseOverColor,0,-.1,.1);A={offset:"0%","stop-color":p?M:w},C={offset:"100%","stop-color":p?w:M},this.mouseOverColorGradient=u.colorGradient({x1:"0%",y1:"0%",x2:b,y2:T},[A,C]),n.isSupportSVG()||(this.colorGradient=_,this.clickedColorGradient=L,this.mouseOverColorGradient=M)}this.labelGroup=this._getPointTextLabelGroup();var E=r.linear().domain(f).range([-v,v]),S="x1",O="y1",b="x2",T="y2",k="cx",D="cy",R=E(g),B=-v;p&&(S="y1",O="x1",b="y2",T="x2",k="cy",D="cx",B=v,R=E.range([v,-v])(g));var I=n.pick(t.thermometerLine.node()._lastX_,B);if(t.thermometerLine.node()._lastX_=R,t.backgruondLine.attr(S,-v).attr(O,0).attr(b,v).attr(T,l).style({fill:"none",stroke:a.slotBackgroundColor,"stroke-width":2*h,"stroke-linecap":"round"}),!o.isNull){t.thermometerLine.attr(S,B).attr(O,0).attr(T,l).attr(b,I).style({stroke:t._getStroke(t.colorGradient),"stroke-width":2*h,"stroke-linecap":"round"}),t.needlePath.attr("r",.9*h).attr(k,I).attr(D,0).style({fill:a.needle,"fill-opacity":i.getColorOpacity(a.needle),"stroke-width":.6*h,stroke:t._needleStrokeColor(o)});var G={};G[b]=R,t.thermometerLine.animate({duration:t.ANIMATION_TIME,ease:t.EASE_TYPE,attr:G}),G={},G[k]=R,t.needlePath.animate({duration:t.ANIMATION_TIME,ease:t.EASE_TYPE,attr:G})}this._drawGaugeLabels(this.labelGroup),this._drawThermometerTicks(E)},_needleStrokeColor:function(t){return i.mixColorWithHSB(t.color,0,.1,-.1)},_drawThermometerTicks:function(t){var i=this,r=(i.options.bands,i.vanchart),a=i.gaugeAxis,o=r.renderer,s=this.labelGroup,h=a.getTickData(),l=a.getMinorTickData(),u=a.options,c=u.labelStyle,d=u.useHtml,f="x1",p="y1",g="x2",m="y2",v=-9,_=-15,y=-13,x=-19,b=function(t,e){return{x:e-t.tickDim.width/2,y:x-.85*t.tickDim.height,dy:"0.85em"}};i.options.thermometerLayout==e.VERTICAL_LAYOUT&&(f="y1",p="x1",g="y2",m="x2",v=9,_=15,y=13,x=19,b=function(t,e){return{x:x,y:e-t.tickDim.height/2,dy:".85em"}}),this.ticks=this.ticks||[];var T,A,C=a._bindData(this.ticks,h,function(e){return t(e.tickValue)}),L=[];for(C.exit.map(function(t){t.text&&t.text.remove(),t.remove()}),L=C.enter.map(function(t){var e=s.append(o.line().datum(t));return n.hasDefined(t.tickContent)&&(e.text=s.append(o.vtext(d))),e}),this.ticks=L=L.concat(C.update),T=0,A=L.length;A>T;T++){var P=L[T],M=P.datum(),w=n.lineSubPixelOpt(t(M.tickValue),1);P.attr(f,w).attr(p,v).attr(g,w).attr(m,_).style({stroke:u.tickColor,"stroke-width":u.tickWidth}),P.text&&P.text.textContent(M.tickContent).style(c).attr(b(M,w))}this.minorTics=this.minorTics||[];var T,A,C=a._bindData(this.minorTics,l),L=[];for(T=0,A=C.exit.length;A>T;T++)C.exit[T].remove();for(T=0,A=C.enter.length;A>T;T++)L.push(s.append(o.line().datum(C.enter[T])));for(this.minorTics=L=L.concat(C.update),T=0,A=L.length;A>T;T++){var E=L[T],S=E.datum(),w=n.lineSubPixelOpt(t(S),1);E.attr(f,w).attr(p,v).attr(g,w).attr(m,y).style({stroke:u.minorTickColor,"stroke-width":u.minorTickWidth})}},_getFixedPos:function(t,i){var n,r,a=t.series,l=a.options,u=a.options.thermometerLayout,c=a.percentageLabelContent,d=a.valueLabelContent;if(u==e.HORIZONTAL_LAYOUT){n=a.centerX-i.width/2;var f=a.centerY;if(r=f+h+10,c&&c.length&&l.percentageLabel.align==e.BOTTOM&&(r=f+a.percentageLabelPos.y+a.percentageLabelDim.height+10),d&&d.length&&l.valueLabel.align==e.BOTTOM){var p=a.valueLabelContent[0];r=f+p.labelPos.y+p.labelDim.height+10}}else{r=a.centerY-i.height/2;var g=a.gaugeAxis.getMaxTickWidth(),m=a.centerX;if(n=m+h+s+o+s+g+10,c&&c.length&&l.percentageLabel.align==e.RIGHT&&(n=m+a.percentageLabelPos.x+a.percentageLabelDim.width+10),d&&d.length&&l.valueLabel.align==e.RIGHT){var p=a.valueLabelContent[0];n=Math.max(n,m+p.labelPos.x+p.labelDim.width+10)}}return[n,r]},_onSeriesMouseOver:function(t){a.prototype._onSeriesMouseOver.call(this,t);var e=this.points[0];e&&(this.thermometerLine.style("stroke",this._getStroke(this.mouseOverColorGradient)),this.needlePath.style({stroke:i.getHighLightColor(i.mixColorWithHSB(e.color,0,.1,-.1)),fill:i.getHighLightColor(this.options.needle)}))},_onSeriesMouseOut:function(t){a.prototype._onSeriesMouseOut.call(this,t);var e=this.points[0];e&&(this.thermometerLine.style("stroke",this._getStroke(this.colorGradient)),this.needlePath.style({stroke:this._needleStrokeColor(e),fill:this.options.needle}))},onSeriesPress:function(){var t=this.points[0];t&&(this.thermometerLine.style("stroke",this._getStroke(this.clickedColorGradient)),this.needlePath.style({stroke:i.getClickColor(t.color),fill:i.getClickColor(this.options.needle)}))},onSeriesPressUp:function(){this._onSeriesMouseOver()}});return t("../ChartLibrary").register(e.THERMOMETER_GAUGE,u),u}),define("chart/TreeSeries",["require","./Series","../utils/BaseUtils","../utils/QueryUtils","../Constants","./Point","../dom/Evented"],function(t){var e=t("./Series"),i=t("../utils/BaseUtils"),n=(t("../utils/QueryUtils"),t("../Constants"),t("./Point")),r=(t("../dom/Evented"),e.extend({refresh:function(t,i){return e.prototype.refresh.call(this,t,i),this._refresh(),this._initChildren(),this},_initChildren:function(){this.traverseInitData(this.visitBefore,null),this.points=this.root.children,this.root.options.tooltip=null},_getPointKey:function(t){return t.name},getTargetKey:function(){return"value"},_getChildrenKey:function(){return"children"},traverseData:function(t,e,i){function r(o,s,h,l){o.children||(o.children=o.options[a._getChildrenKey()]);var u=o.children;if(o.parent=h,o.depth=s,o.level=s,o.height=0,o.ancestor=l,e&&e.call(a,o),u&&(c=u.length))for(var c,d=-1;++df;f++){var g,m=!1;o.children.forEach(function(t){var e=a._getPointKey(t);i.hasDefined(e)&&e==a._getPointKey(c[f])&&(t._lastValue=t[a.getTargetKey()],t.refresh(c[f]),m=!0,g=t,d.push(t))}),m||(g=new n(c[f],a),d.push(g)),0===h&&(u=g),g.index=f,r(g,c[f],h+1,o,u),o.height=Math.max(o.height,g.visible?g.height+1:0)}for(var v=0,_=o.children.length;_>v;)-1===i.indexOf(d,o.children[v])?(o.children[v].clearChild(),_--):v++;o.children=d}else for(var p=o.children.length;--p>-1;)o.children[p].clearChild();e&&e.call(a,o)}var a=this,o={children:this.options.data,name:this.name};this.root?this.root.refresh(o):this.root=new n(o,a),r(this.root,o,0,null,null)},visitBefore:function(t){1===t.depth&&(t.color=this.vanchart.getDefaultSeriesColor(t.name))},visitAfter:function(){},drawPoint:function(t,e){e=e||0;var i=t.isVisible(),n=t.graphic&&t.graphic.isVisible();i===n?t.graphic&&this._drawUpdatePoints(t,e):i&&!n?this._drawEnterPoints(t):!i&&n&&this._drawExitPoints(t)},_calculatePercentage:function(t,e){var i=0;t.forEach(function(t){i+=Math.abs(t[e])}),i=i>0?i:1,t.forEach(function(t){t.percentage=Math.abs(t[e])/i})},_onPointMouseOver:function(t){var e=t.series,i=e.vanchart,n=i.hoverPoint;n&&this._onPointMouseOut(n),t.depth&&(e.onPointMouseOver(t),i.hoverPoint=t)},_onPointMouseOut:function(t){var e=t.series;e.onPointMouseOut(t),e.vanchart.hideTooltip()},isSeriesAccumulated:function(){return!0},getLegendKey:function(t){for(var e=t.parent;e&&e.parent!=this.root;)e=e.parent;return e?e.name:""},isTreeSeries:function(){return!0}}));return r}),define("chart/MultiPie",["require","../Constants","../utils/BaseUtils","../utils/Scale","./TreeSeries","./PieSeries","../utils/QueryUtils","../utils/ColorUtils","../utils/BoundsManager","./Point","../utils/BezierEasing","../EffectHelper","../utils/PathGenerator","../utils/Interpolator","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=t("../utils/Scale"),r=t("./TreeSeries"),a=t("./PieSeries"),o=t("../utils/QueryUtils"),s=t("../utils/ColorUtils"),h=(t("../utils/BoundsManager"),t("./Point"),t("../utils/BezierEasing")),l=t("../EffectHelper"),u=t("../utils/PathGenerator"),c=t("../utils/Interpolator"),d=2/3,f=15,p=5,g=2*Math.PI,m=1e-10,v=1e3,_=300,y=400,x="bounce",b=h.css.swing,T=h.css.swing,A=r.extend(a).extend({arc:u.arc().startAngle(function(t){return t.x}).endAngle(function(t){return t.x+t.dx}).innerRadius(function(t){return t.y}).outerRadius(function(t){return t.y+t.dy}),_refresh:function(){this.chartInfo={rotate:0},this.sx=n.linear(),this.sy=n.linear()},visitAfter:function(t){var e=t.children,i=t.options.value;if(i=isNaN(i)?0:i,t.chSum=i,e&&(n=e.length)){var n,r=0,a=-1;for(this._calculatePercentage(e,"value");++a1?h*(1-d)/(s-1):0,o=s>1?h*d:h),n(t,c,p,p,a,l,o)},_setColor:function(t,i,n){if(t&&i&&n){if(t.options.color)t.color=t.options.color;else{var r,a,o=s.getRGBAColorArray(t.ancestor.color),h=s.rgb2hsb(o[0],o[1],o[2]),l=(t.depth-1)/n;i===e.GRADUAL_LIGHTER?(r=-h[1]*l,a=(1-h[2])*l):(r=(1-h[1])*l,a=-h[2]*l),t.color=s.mixColorWithHSB(t.ancestor.color,0,r,a)}if(t.options.mouseOverColor)t.mouseOverColor=t.options.mouseOverColor;else{var r,a;i===e.GRADUAL_LIGHTER?(r=.1,a=-.05):(r=-.1,a=.05),t.mouseOverColor=s.mixColorWithHSB(t.options.tooltip&&t.options.tooltip.enabled&&t.options.tooltip.shared?t.ancestor.color:t.color,0,r,a)}var u=s.getStandardColorAndOpacity(t.color,t.options.opacity);t.color=u.hex,t.opacity=u.alpha}},_calculateLabelPos:function(){var t=this,i=[],n=[];t.nodes.map(function(r){r.labelPos=null,r.dx=Math.PI&&r<3*Math.PI/2?o-=e.width:r>=3*Math.PI/2&&g>r&&(s-=e.height,o-=e.width),[o,s]},drillDown:function(t){function i(t){var e=t.children,n=t;if(e&&(r=e.length))for(var r,a=-1;++an.depth&&(n=o)}return n}if(this.drilldownNow!==t){for(var n,r=t;(n=r.parent)&&n.depth;)if(r=n,!n.name)return;this.drilldownNow=t;var a,s,h=this.chartInfo.radius,l=this.chartInfo.innerRadius;if(t.depth){var u=t.ancestor.parent.height;if(0===t.height)a=[t.parent._y,t._y,t._y+t._dy],s=[0,f,h];else if(t.height+t.depth!==u){var c=i(t);a=[t.parent._y,t._y,t._y+t._dy,c._y+c._dy,h],s=[0,f,h/2,h,h]}else a=[t.parent._y,t._y,t._y+t._dy,h],s=[0,f,h/2,h]}else a=[0,l,h],s=[0,l,h];var d=t.depth+t.height;this.sx.domain([t._x,t._x+t._dx]),this.sy.domain(a).range(s),this.nodes.map(function(t){t.depth&&t.dataLabels&&t.dataLabels.enabled&&t.dataLabels._align===e.OUTSIDE&&(t.depth===d?t.dataLabels.align=e.OUTSIDE:t.dataLabels.align=e.INSIDE,o.merge(t,this.calculateLabelInfo(t),!0)),t.x=this.safeAngle(t._x),t.dx=this.safeAngle(t._x+t._dx)-t.x,t.y=this.safeRadius(t._y),t.dy=this.safeRadius(t._y+t._dy)-t.y,t===this.drilldownNow.parent&&(t.dx=this.safeAngle(7))},this),this._calculateLabelPos(),this.drawDrillDown(t)}},safeAngle:function(t){return Math.max(this.startAngle,Math.min(this.endAngle,this.sx(t)))},safeRadius:function(t){return Math.max(0,this.sy(t))},_getTranslate:function(){return this.chartInfo.center},_getMoreLabelDefaultCenter:function(t,e){var i=t.rotate||0,n=i+t.x+t.dx/2,r=t.y+t.dy/2,a=this._getArcPoint(r,n);return{centerX:a[0],centerY:a[1]}},effectAnimation:function(t,e){l.areaStyleEffectAnimation(t,e)},getDefaultEffectTime:function(){return l.AREA_STYLE_EFFECT_TIME},getStyle:function(t){return{display:t.name||!t.depth?"":"none",fill:t.color,"fill-opacity":t.depth?t.opacity:0,stroke:t.options.borderColor,"stroke-opacity":t.options.borderOpacity,"stroke-width":t.options.borderWidth}},getAttrs:function(t){return{d:this.arc(t)}},getPointGraphicKey:function(){return"path"},getChartNodes:function(){return this.nodes},getCenter:function(){return this.center},getRadius:function(){return this.radius},getDrilldown:function(){return this.options.drilldown},_getPointGraphicGroup:function(){return this.wrapGroup||(this.wrapGroup=this.group.append(this.vanchart.renderer.group()),this.pathGroup=this.wrapGroup.append(this.vanchart.renderer.group()),this.drawRing()),this.pathGroup},drawRing:function(){this.ringPath||(this.ringPath=this.group.append(this.vanchart.renderer.path()),this.ringPath.attr({d:u.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(f).outerRadius(f+p)()}).style({display:"none",fill:"rgba(0,0,0,0.1)","pointer-events":"none"}))},drawDrillDown:function(t){var e=this,n=e.vanchart.renderer.isAnimation;e._removeDataLabels();var r=e.arc;if(n){var a=0;e.nodes.filter(function(t){return t.graphic}).map(function(i){i.graphic.transition().ease("cubic-in-out").each("start",function(){++a}).duration(v).style("fill",function(){return i.color}).attrTween("d",function(){var t=c(i._view,{x:i.x,y:i.y,dx:i.dx,dy:i.dy});return function(e){var n=t(e);return i._view=n,r(n)}}).attrTween("opacity",function(){return function(t){return i.depth&&i._view.y+i._view.dy>=f?1:0}}).each("end",function(){i.graphic.attr("opacity",i.depth&&i.dx&&i.y+i.dy>f?1:0),--a||(e._animateEnd(),e.ringPath.style("display",t&&t.depth?"":"none"))})}),t.depth||e.ringPath.transition().style("display","none")}else e.nodes.map(function(t){t.graphic.attr({d:r(t),opacity:t.depth&&t.dx&&t.y+t.dy>f?1:0})}),e._animateEnd(t),i.isSupportSVG()||e.root.graphic.style({fill:"rgba(0,0,0,0)"}),e.ringPath.style("display",t.depth?"":"none")},_animateEnd:function(){this.vanchart.renderer&&(this.ordered=this.orderType,this._showLabels(),this._drawEffectPoints())},_isOrderChanged:function(){return this.ordered!==this.orderType},initialAnimation:function(){this.wrapGroup.animate({duration:550,ease:"linear",attrTween:{transform:function(){var t=c(-180,0);return function(e){var i=t(e);return"rotate("+i+")"}}}}),this.pathGroup.animate([{duration:400,ease:"linear",attrTween:{transform:function(){var t=c(0,.9);return function(e){var i=t(e);return"scale("+i+")"}}}},{duration:1e3,ease:"elastic",attrTween:{transform:function(){var t=c(.9,1);return function(e){var i=t(e);return"scale("+i+")"}}}}])},getPointUpdateAnimationAttr:function(t){var e=this.arc,i=this._isOrderChanged(),n=i?T:x,r=i?y:v;return t.graphic.attr("opacity",t.depth?1:0),this.ringPath.style("display",this.drilldownNow.depth?"":"none"),{ease:n,duration:r,attrTween:{d:function(){var i=c(t._view,{x:t.x,y:t.y,dx:t.dx,dy:t.dy});return function(n){var r=i(n);return t._view=r,e(r)}}}}},getPointInitAnimationAttr:function(t){var e,i;i=this.initialAnimationMoving?{x:t.x,y:t.y,dx:t.dx,dy:t.dy}:{x:t.x1,y:t.y1,dx:t.dx1,dy:t.dy1},e=this.arc(i),t._view=i;var n={d:e,opacity:t.depth?1:0};return this.initialAnimationMoving?{attr:n}:(t.graphic.attr(n),this.getPointUpdateAnimationAttr(t))},getPointDropAnimationAttr:function(t){return this.getPointUpdateAnimationAttr(t)},onPointMouseOver:function(t){this._onState(t,!0)},onPointMouseOut:function(t){this._onState(t,!1)},_onState:function(t,e){if(t.options.tooltip&&t.options.tooltip.shared)for(var i,n=t;(i=n.parent)&&i.depth&&i.y+i.dy!==f;)n=i,i.series._onSingleState(i,e);t.series._onSingleState(t,e)},_onSingleState:function(t,n){var r=t.series,a=r.options.animation,o={},s={};t.depth&&t._view.y1+t._view.dy1===f?s={opacity:n?1:0}:o={"fill-opacity":n?1:t.opacity,fill:n?t.mouseOverColor:t.color},a?(t.graphic.style(o),t.graphic.interrupt(e.SELECT_ANIMATION).transition(e.SELECT_ANIMATION).duration(_).ease(b).attr(s)):(t.graphic.attr(s).style(o),t.depth||i.isSupportSVG()||t.graphic.style("fill","rgba(0,0,0,0)"))},onPointTap:function(t){this.getDrilldown()&&this.drillDown(t)},isSupportLegendHighlight:function(){return!1}});return A.prototype._calculateLabelPosWhenRadiusFixed=A.prototype._calculateLabelPos,t("../ChartLibrary").register(e.MULTIPIE_CHART,A),A}),define("chart/TreeMap",["require","../Constants","../utils/BaseUtils","./TreeSeries","../utils/QueryUtils","../utils/ColorUtils","../utils/BoundsManager","./Point","../EffectHelper","../vans/TreeMapLayout","../utils/Scale","../utils/Interpolator","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=t("./TreeSeries"),r=(t("../utils/QueryUtils"),t("../utils/ColorUtils")),a=(t("../utils/BoundsManager"),t("./Point"),t("../EffectHelper")),o=t("../vans/TreeMapLayout").treemapLayout,s=t("../utils/Scale"),h=t("../utils/Interpolator"),l=6,u=800,c="out-bounce",d=1e3,f=800,p=100,g=n.extend({nodes:[],root:null,zoomNow:null,sx:null,sy:null,zoom:null,_refresh:function(){this.sx=s.linear(),this.sy=s.linear()},visitBefore:function(t){this._setColor(t)},visitAfter:function(t){var e=t.children,i=t.options.value;if(i=isNaN(i)?0:i,t.chSum=i,e&&(n=e.length)){var n,r=0,a=-1;for(this._calculatePercentage(e,"value");++a1&&!t.options.children&&(t.options.color?t.color=t.options.color:t.color=t.ancestor.color,t.options.mouseOverColor?t.mouseOverColor=t.options.mouseOverColor:t.options.color?t.mouseOverColor=r.getHighLightColor(t.options.color):t.mouseOverColor=t.ancestor.mouseOverColor,t.options.clickColor?t.clickColor=t.options.clickColor:t.options.color?t.clickColor=r.getClickColor(t.options.color):t.clickColor=t.ancestor.clickColor);var e=r.getStandardColorAndOpacity(t.color,t.options.opacity);t.color=e.hex,t.opacity=e.alpha,t.borderColor=t.options.borderColor,t.borderOpacity=t.options.borderOpacity},_calculateLabelPos:function(){},_calcLabelPos:function(t){var n=t.options.dataLabels;if(n&&n.enabled){switch(n.align){case e.CENTER:n._align=e.CENTER,t.labelPos={x:t.x+(t.dx-t.labelDim.width)/2,y:t.y+(t.dy-t.labelDim.height)/2};break;case e.TOP:default:n._align=e.LEFT,t.labelPos={x:t.x+l,y:t.y+l}}var r={x:t.x,y:t.y,width:t.dx,height:t.dy},a={x:t.labelPos.x,y:t.labelPos.y,width:t.labelDim.width,height:t.labelDim.height};i.containsRect(r,a)||(t.labelPos=null)}},_getMoreLabelDefaultCenter:function(t,e){return{centerX:t.x+t.dx/2,centerY:t.y+t.dy/2}},effectAnimation:function(t){a.areaStyleEffectAnimation(t,t.x+t.dx/2,t.y+t.dy/2)},getDefaultEffectTime:function(){return a.AREA_STYLE_EFFECT_TIME},getPointGraphicKey:function(){return"rect"},_getFixedPos:function(t){var e=this.vanchart.bounds,i=e.x+t.x+t.dx,n=e.y+t.y;return[i,n]},zoomTo:function(t){t=this.zoomNow===t.parent?this.root:t.parent;var e=this.sx.domain([t.x,t.x+t.dx]),i=this.sy.domain([t.y,t.y+t.dy]),n=this.vanchart.bounds,r=n.width/t.dx,a=n.height/t.dy;this.nodes.map(function(t){t.dx=r*t._dx,t.dy=a*t._dy,t.x=e(t._x),t.y=i(t._y),this._calcLabelPos(t),t.clearPointEffect(),t.graphic.interrupt()},this),this.vanchart.fire("animationStart"),this.zoomNow=t},getChartNodes:function(){return this.nodes},getZoom:function(){return this.options.zoom},_getPointGraphicGroup:function(){return this.pathGroup||(this.pathGroup=this.group.append(this.vanchart.renderer.group())),this.pathGroup},initialAnimation:function(){var t=this._getPointGraphicGroup(),e=this.vanchart.bounds,i=e.width/2,n=e.height/2;t.animate({duration:u,ease:c,attrTween:{transform:function(){var t=h(0,1);return function(e){var r=t(e);return"matrix("+r+",0,0,"+r+","+(i-r*i)+","+(n-r*n)+")"}}}})},_pointExpandAttr:function(t){return{x:-t.dx/2,y:-t.dy/2,width:t.dx,height:t.dy,transform:"translate("+(t.x+t.dx/2)+","+(t.y+t.dy/2)+")"}},_pointContractAttr:function(t){return{x:0,y:0,width:0,height:0,transform:"translate("+t.vanishPos[0]+","+t.vanishPos[1]+")"}},getPointInitAttr:function(t){return this.initialAnimationMoving?this._pointExpandAttr(t):this._pointContractAttr(t)},getPointUpdateAnimationAttr:function(t){var e=this;return t.visible?{ease:"quad-in-out",duration:d,attr:this._pointExpandAttr(t)}:e.getPointDropAnimationAttr(t)},getPointInitAnimationAttr:function(t){return this.initialAnimationMoving?{}:this.getPointUpdateAnimationAttr(t)},getPointDropAnimationAttr:function(t){return{ease:"quad-in-out",duration:f,attr:{width:0,height:0,transform:"translate("+t.vanishPos[0]+","+t.vanishPos[1]+")"}}},onPointMouseOver:function(t){t.series._onState.call(t,!0)},onPointMouseOut:function(t){t.series._onState.call(t,!1)},_onState:function(t){var i=this,n=i.series,r=n.animation,a={"fill-opacity":t?1:i.opacity,fill:t?i.mouseOverColor:i.color};r?i.graphic.interrupt(e.SELECT_ANIMATION).transition(e.SELECT_ANIMATION).duration(p).style(a):i.graphic.style(a)},onPointTap:function(t){t.series.getZoom()&&t.series.zoomTo(t)}});t("../ChartLibrary").register(e.TREEMAP_CHART,g)}),define("chart/Funnel",["require","./Series","../utils/BaseUtils","../Constants","../utils/QueryUtils","../utils/BezierEasing","../EffectHelper","../component/FormattedText","../utils/ColorUtils","../ChartLibrary"],function(t){var e=t("./Series"),i=t("../utils/BaseUtils"),n=t("../Constants"),r=(t("../utils/QueryUtils"),t("../utils/BezierEasing")),a=t("../EffectHelper"),o=t("../component/FormattedText"),s=t("../utils/ColorUtils"),h=.03,l=.05,u=.03,c=.05,d=u+c,f=.4,p=6,g=.35,m=400,v=400,_=500,y=500,x=e.extend({_getAxisTypes:function(){return[]},getTargetKey:function(){return"value"},_getPointKey:function(t){return t.name},_calculatePercentage:function(){var t,e=this.points.filter(function(t){return t._bottomPoint=null,!t.isNull&&t.visible}),i=e.length;e.forEach(function(e,n){t?(t._bottomPoint=e,e.percentage=Math.abs(e.value/(t.value||1))):e.percentage=1,e.delayTime=m*Math.sqrt(n/i),t=e})},calculateLabelInfo:function(){},_outSideSpecialLabel:function(t){var e=t.labelContent;return e&&(e.nameLabelContent||e.valueLabelContent)},doLayout:function(){var t=this;t.points.forEach(function(t){o.dataLabelGenerator(t)}),this._calculatePosAndSize()},_calculateTotalValue:function(t,e){var i=0;return this.points.filter(t).forEach(function(t){i+=Math.abs(t[e])}),i},_calculateSeriesMaxValue:function(t,e){var i=0;return this.points.filter(t).forEach(function(t){i=Math.max(i,Math.abs(t[e]))}),i},_calculatePosAndSize:function(){var t=this,e=t.vanchart,i=e.bounds,n=function(t){return!t.isNull&&t.visible},r=t.getTargetKey(),a=i.width,o=i.height,s=a*(1-2*h),u=o*(1-2*l),c=t._calculateTotalLabelSize();s-=c.useWidth>0?c.useWidth+i.width*d:0,t.useCurveConnectorLine=!1;var f,p=t.points.filter(n),g=p.length; - if(!(1>g)){var m=p[0],v=p[g-1],_=m.labelDim?m.labelDim.height:0,y=v.labelDim?v.labelDim.height:0;if(t.options.useSameSlantAngle){var x=t._calculateTotalValue(n,r),b=Math.abs(m[r])*u/x,T=Math.abs(v[r])*u/x,A=Math.max(0,_-b)/2;u-=A,u-=Math.max(0,y-T)/2,p.forEach(function(e){e.posX=Math.round(A*s/2/u),e.width=Math.round(s-2*e.posX),e.posY=Math.round(A),e.height=Math.round(Math.abs(e[r])*u/x),A+=e.height,t._calculateInsideLabelPos(e,f),f=e})}else{var C=t._calculateSeriesMaxValue(n,r),L=u/g,P=Math.max(0,_-L)/2;u-=P,u-=Math.max(0,y-L)/2,p.forEach(function(e,i){e.width=Math.round(s*Math.abs(e[r])/C),e.posX=Math.round((s-e.width)/2),e.posY=Math.round(P+i*L),e.height=Math.round(L),t._calculateInsideLabelPos(e,f),f=e})}t._calculateOutSideLabelPos(n,c.useWidth,c.useHeight)}},_calculateInsideLabelPos:function(t,e){var i=t.options.dataLabels;i&&i.enabled&&(i.align==n.INSIDE?t.labelPos={x:t.posX+t.width/2-t.labelDim.width/2,y:t.posY+t.height/2-t.labelDim.height/2}:e&&(this.useCurveConnectorLine=this.useCurveConnectorLine||t.height+e.heightg){var a=t.labelContent,o=t.labelDim,h=o.height,l=r.useCurveConnectorLine?g:t.posY+t.height/2-h/2,c=t._bottomPoint,d=((c?c.width:0)-t.width)/4,m={x:p,y:l+h/2},v={x:p-s,y:l+h/2},_={x:t.posX+t.width+d,y:t.posY+t.height/2};if(t.labelPos={x:p,y:l,endPos:m,midPos:v,startPos:_},g+=t.labelDim.height+f,r._outSideSpecialLabel(t)){var y=a.nameLabelContent,x=a.valueLabelContent,b=o.nameValueGap,T=Math.min(e,r.maxValueLabelWidth);if(y){var A=y.dim,C=y.text,L=e-b-T;C=r._omitLabel(C,L,y.style),y.text=C,y.x=0,y.y=(h-A.height)/2}if(x){var P=x.dim,M=x.text;M=r._omitLabel(M,T,x.style),x.text=M,x.x=e-T,x.y=(h-P.height)/2}}}})},_omitLabel:function(t,e,n){for(var r=i.getTextDimension(t,n,!1),a=!1;r.width>e&&t.length;)t=t.substr(0,Math.floor(.9*t.length)),r=i.getTextDimension(t+"...",n,!1),a=!0;return a&&t&&(t+="..."),t},_calculateTotalLabelSize:function(){var t=this,e=t.vanchart,i=e.bounds,r=0,a=0;return t.points.filter(function(t){return!t.isNull&&t.visible&&t.options.dataLabels&&t.options.dataLabels.enabled}).forEach(function(e){e.options.dataLabels.align==n.OUTSIDE&&(r=+t.maxNameLabelWidth||+t.maxValueLabelWidth?Math.max(r,(t.maxNameLabelWidth||0)+(t.maxValueLabelWidth||0)+e.labelDim.nameValueGap):Math.max(r,e.labelDim.width),a+=e.labelDim.height)}),r=Math.min(r,i.width*f),{useWidth:r,useHeight:a}},_calculateLabelPos:function(){},_getFixedPos:function(t){var e=t.series._getTranslate();return[e[0]+t.posX+t.width/2,e[1]+t.posY+t.height/2]},_getMoreLabelDefaultCenter:function(t,e){return{centerX:t.posX+t.width/2,centerY:t.posY+t.height/2}},getFillFilter:function(t,e){var r=e.series,a=r.vanchart,o=a.options;if(o.style==n.STYLE_GRADUAL&&i.isSupportSVG()){var h=a.renderer,l={x1:"0%",y1:"0%",x2:"100%",y2:"0%"},u={offset:"0%","stop-color":s.getColorWithDivider(t,.9)},c={offset:"100%","stop-color":t};return e.colorGradient?h.updateColorGradient(e.colorGradient,l,[u,c]):e.colorGradient=h.colorGradient(l,[u,c]),"url(#"+i.stamp(e.colorGradient)+")"}return t},_getPointPath:function(t){var e=t._bottomPoint,i=-t.width/2+","+-t.height/2,n=t.width/2+","+-t.height/2;if(e){var r=e.width/2+","+t.height/2,a=-e.width/2+","+t.height/2;return"M"+i+"L"+n+"L"+r+"L"+a+"Z"}var o="0,"+t.height/2;return"M"+i+"L"+n+"L"+o+"L"+o+"Z"},getPointGraphicKey:function(){return"path"},getHighLightStyle:function(t){return{stroke:t.mouseOverColor||t.color,fill:t.series.getFillFilter(t.mouseOverColor||t.color,t),"fill-opacity":t.opacity,"stroke-width":p,"stroke-opacity":0===t.opacity?0:g}},getPressedStyle:function(t){return{stroke:t.clickColor||t.color,fill:t.series.getFillFilter(t.clickColor,t),"fill-opacity":t.clickOpacity,"stroke-width":p,"stroke-opacity":0===t.opacity?0:g}},effectAnimation:function(t){a.areaStyleEffectAnimation(t,t.posX+t.width/2,t.posY+t.height/2)},getDefaultEffectTime:function(){return a.AREA_STYLE_EFFECT_TIME},getPointInitAttr:function(t){return{transform:"translate("+(t.posX+t.width/2)+","+(t.posY+t.height/2)+") scale(0.01)"}},getPointInitAnimationAttr:function(t){var e=t.series,i=e.initialAnimationMoving;return{delay:i?t.delayTime:0,ease:i?r.css["ease-out-quart"]:r.css.swing,duration:i?v:y,attr:{d:e._getPointPath(t),transform:"translate("+(t.posX+t.width/2)+","+(t.posY+t.height/2)+") scale(1)"}}},getPointUpdateAnimationAttr:function(t){var e=t.series;return{ease:r.css.swing,duration:_,attr:{d:e._getPointPath(t),transform:"translate("+(t.posX+t.width/2)+","+(t.posY+t.height/2)+")"}}},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);t.graphic.interrupt(n.SELECT_ANIMATION).transition(n.SELECT_ANIMATION).animate({duration:200,ease:"back-out",style:i})},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);t.graphic.interrupt(n.SELECT_ANIMATION).transition(n.SELECT_ANIMATION).animate({duration:0,ease:"back-out",style:i})},_getTranslate:function(){var t=this.vanchart.bounds;return[t.x+t.width*h,t.y+t.height*l]},_updateDataLabels:function(){var t=this;t.getTextDataToDraw().forEach(function(e){t._outSideSpecialLabel(e)?t._createOutSideTextGraphic(e):t._createTextGraphic(e)})},_createOutSideTextGraphic:function(t){var e=t.series,n=t.options.dataLabels,r=function(t){return e.visible&&!t.isNull&&t.visible&&t.labelPos&&!isNaN(t.labelPos.x)&&!isNaN(t.labelPos.y)&&n&&n.enabled};if(r(t)){var a=e.vanchart,o=a.renderer,s=t.labelContent,h=t.labelPos.x,l=t.labelPos.y,u=n.useHtml,c=this._getPointTextLabelGroup(),d=o.vtext(u).attr("transform",i.makeTranslate([h,l])).style({"pointer-events":"none"}),f=function(t){if(t){var e=t.dim,i=t.text,r=t.style;o.vtspan(u).style({width:n.labelWidth+"px",height:n.labelHeight+"px"}).attr("y",t.y).attr("x",t.x).attr("dy",.85*e.height).attr("dx",0).textContent(i).style(r).addTo(d)}};f(s.nameLabelContent),f(s.valueLabelContent),t.textGraphic=c.append(d),t.labelPos.startPos&&(t.leadLine=c.append(this._getLeadLine(t)))}},isSeriesAccumulated:function(){return!0}});return t("../ChartLibrary").register(n.FUNNEL_CHART,x),x}),define("chart/WordCloud",["require","./Series","../Constants","../utils/BezierEasing","../EffectHelper","../utils/BaseUtils","../ChartLibrary"],function(t){var e=t("./Series"),i=t("../Constants"),n=t("../utils/BezierEasing"),r=(t("../EffectHelper"),t("../utils/BaseUtils")),a=800,o=600,s=320,h=320,l=e.extend({isNullValue:function(t){var e=t.options.value;return"-"==e||r.hasNotDefined(e)||r.hasNotDefined(t.name)},getTargetKey:function(){return"value"},_getPointKey:function(t){return t.name},doLayout:function(){},_calculateLabelPos:function(){},_getFixedPos:function(t,e){var i=t.word,n=t.labelDim,a=t.series._getTranslate(),o=n.width/2,s=n.height/2,h=r.toRadian(i.rotate),l=h===Math.PI/2?s:o*Math.cos(h)-s*Math.sin(h),u=o*Math.sin(h)+s*Math.cos(h),c=.35*n.height*Math.cos(h),d=.35*n.height*Math.sin(h);return r.isSupportSVG()?[a[0]+i.x+l+d,a[1]+i.y+u-c]:[a[0]+i.x+n.width,a[1]+i.y+n.height]},_getTranslate:function(){var t=this.vanchart.bounds;return[t.x+t.width/2,t.y+t.height/2]},effectAnimation:function(t){var e=t.word,i=t.series,r=i._getEffectTime(t);t.graphic.style("text-shadow","rgba(91,91,91,0.75) 0px 0px 0px").effectTransition().ease(n.css["ease-out-quint"]).duration(.5*r).style("font-size",1.2*e.size+"px").style("text-shadow","rgba(91,91,91,0.75) 3px 3px 5px").transition().ease(n.css["ease-in-quint"]).duration(.5*r).style("font-size",e.size+"px").style("text-shadow","rgba(91,91,91,0.75) 0px 0px 0px")},getDefaultEffectTime:function(){return 2e3},_showLabels:function(){},_getPointGraphicGroup:function(){return this.vanchart.group},_createPointGraphic:function(t){var e=this.getPointGraphicKey(t),i=this.vanchart.renderer;return t.graphic=i[e](),t.graphic.textContent(t.word.text),t.graphic},getPointGraphicKey:function(){return"text"},getStyle:function(t){var e=t.word;return e?{"font-size":e.size+"px","font-family":e.fontFamily,fill:t.color,"text-shadow":"","stroke-width":0,"stroke-opacity":1,"fill-opacity":t.opacity,filter:""}:{}},getHighLightStyle:function(t){function e(){for(var t=[0,15,35,50,65,85,1/0],e=[2,4,6,8,10,12],i=0,r=e.length;r>i;i++)if(n>t[i]&&n<=t[i+1])return e[i]}var i=t.word,n=i.size,a={"font-size":n+"px","font-family":i.fontFamily,fill:t.color,stroke:"white","stroke-opacity":1,"stroke-width":e(),"text-shadow":"rgba(91,91,91,0.75) 3px 3px 4px"};if(r.isMS){var o=t.series,s=o.vanchart,h=s.renderer;s.wordCloudShadowFilter=s.wordCloudShadowFilter||h.createDropShadowFilter(3,3,.75,4),a.filter="url(#"+r.stamp(s.wordCloudShadowFilter)+")"}return a},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t),n=e.vanchart,a=n.renderer;t.effectInterval&&(clearInterval(t.effectInterval),t.graphic.interrupt()),!t.mouseOverGraphic&&r.isSupportSVG()&&(t.mouseOverGraphic=a.text().attr("class","mouseOverGraphic").style("pointer-events","none").textContent(t.name).addTo(n.mouseOverGroup)),t.mouseOverGraphic&&t.mouseOverGraphic.attr(e.getPointInitAttr(t)).style(e.getStyle(t)).style("fill-opacity",1),t.graphic.style(i)},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);t.mouseOverGraphic&&t.mouseOverGraphic.style("fill-opacity",0),t.graphic.style(i),e.drawPointEffect(t)},_getInitFontSize:function(){var t=this,e=t.vanchart;return e.minFontSize/2+"px"},getPointInitAttr:function(t){var e=t.word;return e?{"text-anchor":"middle",transform:"translate("+[e.x,e.y]+")rotate("+e.rotate+")"}:{}},getPointInitStyle:function(){return{"font-size":this._getInitFontSize()}},getPointInitAnimationAttr:function(t){var e=t.series,i=e.initialAnimationMoving,r=t.word;return{ease:n.css["ease-out-quart"],duration:i?a:h,style:{"font-size":r.size+"px"}}},getPointUpdateAnimationAttr:function(t){var e=t.word;return{ease:n.css["ease-out-quart"],duration:o,style:{"font-size":e.size+"px"},attr:{transform:"translate("+[e.x,e.y]+")rotate("+e.rotate+")"}}},getPointDropAnimationAttr:function(t){return{ease:n.css["ease-in-quart"],duration:s,style:{"font-size":"0px"}}},isSeriesAccumulated:function(){return!0}});return t("../ChartLibrary").register(i.WORD_CLOUD_CHART,l),l}),define("chart/Structure",["require","./Series","./Point","../Constants","../utils/BezierEasing","../EffectHelper","../utils/BaseUtils","../ChartLibrary"],function(t){var e=t("./Series"),i=t("./Point"),n=t("../Constants"),r=(t("../utils/BezierEasing"),t("../EffectHelper"),t("../utils/BaseUtils")),a=e.extend({getTargetKey:function(){return"value"},_getPointKey:function(t,e,i){return e=t.parent||e,i=t.level||i||0,(e?e.name:"")+t.name+i},isNullValue:function(t){return!1},_dealData:function(t){function e(t,a,o,s){var c,d=n._getPointKey(a,t,o),f=s[d];if(f?(f._lastValue=f[n.getTargetKey()],f.moreLabelG&&f.moreLabelG.remove(),f.moreLabelG=null,f.refresh(a),c=f,s[d]=null):c=new i(a,n),c.level=o,u=Math.max(o,u),t&&(c.parent=t,t.children=t.children||[],-1==r.indexOf(t.children,c)&&t.children.push(c)),h.push(c),t&&l.push({source:t,target:c}),a.children){var s={};c.children&&c.children.forEach(function(t){s[n._getPointKey(t)]=t}),a.children.forEach(function(t){e(c,t,o+1,s)});for(var d in s)s[d]&&s[d].clearChild()}return c}var n=this,a=n.vanchart,o=t[0],s=a.ancestor;if(a.nodes&&a.nodes.forEach(function(t){t._events=null,t.graphic&&t.graphic.remove(),t.textGraphic&&t.textGraphic.remove(),t.textGraphic=t.graphic=null}),a.edges&&a.edges.forEach(function(t){t.linkGraphic&&t.linkGraphic.remove(),t.linkGraphic=null}),o){var h=[],l=[],u=0,c={};s&&(c[n._getPointKey(s)]=s),s=e(null,o,0,c);for(var d in c)c[d]&&c[d].remove();a.ancestor=s,a.maxLevel=u,a.nodes=h,a.edges=l,n.points=h}},doLayout:function(){},_calculateLabelPos:function(){},_getFixedPos:function(t,e){var i=this.vanchart,n=i.bounds,r=(t.radius+1)/1.414;return[n.x+t.posX+r,n.y+t.posY+r]},getStyle:function(t){var e=t.options;return{fill:t.color,"fill-opacity":e.fillColorOpacity,stroke:t.borderColor||t.color,"stroke-opacity":t.borderOpacity,"stroke-width":e.borderWidth}},getHighLightStyle:function(t){var e=t.options;return{fill:t.mouseOverColor||t.color,"fill-opacity":e.fillColorOpacity,"stroke-width":e.borderWidth,"stroke-opacity":t.borderOpacity,stroke:t.borderColor||t.color}},getPressedStyle:function(t){var e=t.options;return{fill:t.clickColor||t.color,"fill-opacity":e.fillColorOpacity,"stroke-width":e.borderWidth,"stroke-opacity":t.borderOpacity,stroke:t.borderColor||t.color}},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);t.options.image||t.graphic.nodeGraphic.animate({duration:200,ease:"back-out",style:i,attr:{r:t.radius+2}})},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);t.options.image||t.graphic.nodeGraphic.style(i).attr("r",t.radius)}});return t("../ChartLibrary").register(n.STRUCTURE_CHART,a),a}),define("chart/ForceBubble",["require","./Bubble","../Constants","../utils/BaseUtils","../EffectHelper","../ChartLibrary"],function(t){var e=t("./Bubble"),i=t("../Constants"),n=t("../utils/BaseUtils"),r=t("../EffectHelper"),a=e.extend({_calculateBubblePosition:function(){},_getFixedPos:function(t){var e=t.radius||0,i=this.vanchart.bounds,n=i.x+t.x+e,r=i.y+t.y+e;return[n,r]},_getAxisTypes:function(){return[]},getTargetKey:function(){return"y"},_getMoreLabelDefaultCenter:function(t){return{centerX:t.x,centerY:t.y}},isNullValue:function(t){var e=t.options;return"-"==e.x||"-"==e.y},_getPointKey:function(t){return""+(t.options?t.options.x:t.x)},effectAnimation:function(t){r.forceBubbleEffectAnimation(t,t)},getPointInitAttr:function(t){return{r:t.radius,transform:n.makeTranslate({x:0,y:0})}},getPointInitAnimationAttr:function(t){return{}},getPointUpdateAnimationAttr:function(t){return{r:t.radius,transform:n.makeTranslate({x:t.x,y:t.y})}},remove:function(){this.points.forEach(function(t){t.graphic&&(t.graphic.remove(),t.graphic=null)}),this.textGraphicGroup&&this.textGraphicGroup.remove(),this.group&&this.group.remove(),this.textGraphicGroup=this._canvas=this.group=null}});return t("../ChartLibrary").register(i.FORCE_BUBBLE_CHART,a),a}),define("chart/Map",["require","../Constants","../utils/BaseUtils","../utils/QueryUtils","./Series","../EffectHelper","../ChartLibrary","../ChartLibrary","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=(t("../utils/QueryUtils"),t("./Series")),r=t("../EffectHelper"),a=n.extend({initialize:function(t,e,i){n.prototype.initialize.call(this,t,e,i),this.on(this.getEvents(),this)},getTargetKey:function(){return"value"},_getPointKey:function(t){return t.name},effectAnimation:function(t){var i=this.type===e.POINT_MAP?r.pointMapEffectAnimation:r.areaMapEffectAnimation;t.layers.forEach(function(e){i(e,t)})},getDefaultEffectTime:function(){return this.type==e.POINT_MAP?r.POINT_MAP_EFFECT_TIME:r.AREA_STYLE_EFFECT_TIME},_getFixedPos:function(t){var i=t.series.vanchart,n=t.series.type,r=t.getLatLng();if(r){var a=i.latLngToContainerPoint(r);if(n==e.AREA_MAP){var o=0,s=0;return t.options.dataLabels&&t.labelDim&&t.labelPos&&(o=t.labelDim.width/2,s=t.labelDim.height/2),[a.x+o,a.y+s]}return[a.x,a.y]}},getHighLightStyle:function(t){return{stroke:t.borderColor,fill:t.mouseOverColor,"fill-opacity":t.opacity,"stroke-width":2,"stroke-opacity":t.borderOpacity,filter:this._getShadowFilter()}},getStyle:function(t){var e=t.series.vanchart.getCurrentGeo();return t.isNull?e.defaultAreaStyle():n.prototype.getStyle.call(this,t)},_getShadowFilter:function(){var t=this,e=t.vanchart,n=e.mapRenderer;return e.mapShadowFilter=e.mapShadowFilter||n.createDropShadowFilter(0,1,.5,2),"url(#"+i.stamp(e.mapShadowFilter)+")"},_onPointMouseOver:function(t){if(this.type==e.AREA_MAP){var i=t.series.vanchart;if(i.isMapPointVisible(t)&&t.layers){var n=this.getHighLightStyle(t);t.layers&&t.layers.forEach(function(t){t.setStyle(n)})}}},_onPointMouseOut:function(t){if(this.type==e.AREA_MAP){var i=t.series.vanchart;if(i.isMapPointVisible(t)&&t.layers){var n=this.getStyle(t);t.layers&&t.layers.forEach(function(t){t.setStyle(n)})}}}});return t("../ChartLibrary").register(e.POINT_MAP,a),t("../ChartLibrary").register(e.AREA_MAP,a),t("../ChartLibrary").register(e.HEAT_MAP,a),a}),define("chart/map/LineMapDataNormalizer",["require","../../utils/BaseUtils"],function(t){function e(t,e){var i=t.name||t,n=e.getFeaturesByName(i);return n&&n.length?n.map(function(t){return{name:i,lnglat:t.geometry.coordinates}}):void 0}function i(t,e,i,r){if(t&&e){var a=0,o=t[0]||t;do{var s=0,h=e[0]||e;do{var l={};n(l,i),l.from=o,l.to=h,r.push(l)}while(h=e[++s])}while(o=t[++a])}}var n=t("../../utils/BaseUtils").extend;return function(t,n){n._loadGeo();for(var r,a=[],o=-1;r=t[++o];){var s,h,l=r.from&&r.from.lnglat,u=r.to&&r.to.lnglat;l&&u?a.push(r):(s=l?r.from:e(r.from,n),h=u?r.to:e(r.to,n),i(s,h,r,a))}return a}}),define("chart/LineMap",["require","../Constants","../utils/BaseUtils","../utils/QueryUtils","../ComponentLibrary","./Series","./map/LineMapDataNormalizer","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=(t("../utils/QueryUtils"),t("../ComponentLibrary")),r=t("./Series"),a=t("./map/LineMapDataNormalizer"),o=6,s=Math.PI,h=r.extend({doLayout:i.emptyFn,_calculateLabelPos:i.emptyFn,_loadData:function(t){var e=this.vanchart.getComponent(n.GEO_COMPONENT);return a(t,e)},useCanvas:i.trueFn,getTargetKey:function(){return"value"},_getPointKey:function(t){return t=t.options||t,t.from.lnglat.join()+t.to.lnglat.join()},_getFixedPos:function(t,e){var n=i.computeArc(t.ax,t.ay,t.bx,t.by,t.curveness),r=(n[3]+n[4])/2;r%=2*s;var a=n[2]+o,h=a*Math.cos(r)+n[0],l=a*Math.sin(r)+n[1];return s/2>=r||(s>=r?h-=e.width:1.5*s>=r?(h-=e.width,l-=e.height):l-=e.height),[h,l]},remove:function(){this.points.map(function(t){t.remove()}),this.points=[]},isSupportLegendHighlight:function(){return!1}});return t("../ChartLibrary").register(e.LINE_MAP,h),h}),define("component/BaseAxis",["require","../Constants","../utils/BaseUtils","../utils/QueryUtils","../ComponentLibrary","../utils/BoundsManager","./Base","../utils/BezierEasing"],function(t){var e,i,n=t("../Constants"),r=t("../utils/BaseUtils"),a=(t("../utils/QueryUtils"),t("../ComponentLibrary")),o=(t("../utils/BoundsManager"),t("./Base")),s=t("../utils/BezierEasing"),h=400,l=s.css.swing,u=function(){return null==e&&(e=r.paddingConvertWithScale("0.1875rem")),e},c=5,d=function(){return null==i&&(i=r.paddingConvertWithScale("0.3125rem")),i},f=5,p=4,g=100,m=5,v="main",_="minor",y=15,x=o.extend({labelRotation:0,_refresh:function(){this.series=[],this.isRangePoints=!0,this.piece=null,this.forecast=[0,0],this._zoomDomain=this._dataDomain=this._domain=this._tickStart=this._step=0,this.initScale();var t=this.options,e=t.title;r.convertToREMUseDefault16PX(t.labelStyle),r.convertToREMUseDefault16PX(e&&e.style),t.tickPadding=isNaN(t.tickPadding)?6:t.tickPadding,t.tickLength=t.enableTick?isNaN(t.tickLength)?4:t.tickLength:0,t.minorTickLength=t.enableMinorTick?isNaN(t.minorTickLength)?2:t.minorTickLength:0},_calculateSize:function(t){var e=this.options;this.tickLabelLength=this._getTickLabelLength(t);var i=this._getAxisTitleLength();i+=i>0?d():0;var n=this.tickLabelLength+i,r=this.isHorizontal(),a=this.vanchart.isInverted();if(r){var o=a?e.maxWidth:e.maxHeight;n=o?Math.min(this._maxHeight(o),n):n}else{var o=a?e.maxHeight:e.maxWidth;n=o?Math.min(this._maxWidth(o),n):n}this._size=Math.round(n)},_recordAxisSize:function(){this.isOnZero()||(this.vanchart.axisSize[this.getPosition()]+=this._size)},calculateDomainFromData:function(t){if(!t){var e=this.series;if(this.byPercent=!1,!this._isBaseAxis())for(var i=0,n=e.length;n>i&&!this.byPercent;i++)this.byPercent=e[i].options.stackByPercent;t=this._getDomainFromData()}this.indicator&&this._calculateCateDomainData(),this._dataDomain=t;var r=this.vanchart.getComponent(a.ZOOM_COMPONENT),o=this._zoomDomain||r&&r.getZoomInitDomain(this);if(this._isBaseAxis()&&o){var s=parseFloat(o[0]),h=parseFloat(o[1]);if(!isNaN(s)&&!isNaN(h)){var l=s;s=Math.min(s,h),h=Math.max(l,h)}this._calculateNiceDomain(this._dataDomain[0],this._dataDomain[1],isNaN(s)?null:s,isNaN(h)?null:h)}else{var u=this.options;this._calculateNiceDomain(this._dataDomain[0],this._dataDomain[1],u.min,u.max)}this._calculateDateFormat&&this._calculateDateFormat()},_calculateNiceDomain:function(t,e,i,n){var r=this.options;return r.log?this._calculateLogNiceDomain(t,e,i,n):this.byPercent?this._calculatePercentValueDomain(t,e,i,n):this._calculateValueNiceDomain(t,e,i,n)},calculateDomainFromZoom:function(){var t=this._zoomDomain,e=this.options;if(this._isBaseAxis())this._calculateNiceDomain(this._dataDomain[0],this._dataDomain[1],t[0],t[1]);else{var i=r.hasDefined(e.min)?Math.max(e.min,t[0]):t[0],n=r.hasDefined(e.max)?Math.min(e.max,t[1]):t[1];if(i>n)return;var o=this.type==a.VALUE_AXIS_COMPONENT&&r.hasNotDefined(e.min),s=this.isLog()?1:0;i=o?Math.min(s,i):i,this._calculateNiceDomain(t[0],t[1],i,n)}},isCategory:function(){return this.type==a.CATEGORY_AXIS_COMPONENT},zoomRefresh:function(t){this._zoomDomain=t,this.calculateDomainFromZoom()},axisZoom:function(t,e){var i,n,o=this.type==a.DATE_AXIS_COMPONENT,s=o?1e3:1e-11,h=this.vanchart.bounds;this.isHorizontal()?(i=Math.min(t.x,e.x)-h.x,n=Math.max(t.x,e.x)-h.x,i=Math.max(i,0),n=Math.min(n,h.width)):(i=Math.min(t.y,e.y)-h.y,n=Math.max(t.y,e.y)-h.y,i=Math.max(i,0),n=Math.min(n,h.height));var l=this.scale.invert(i),u=this.scale.invert(n);o&&(l=r.date2int(l),u=r.date2int(u)),Math.abs(l-u)=15&&(i=Math.round(2*(i-m))),e=Math.max(e-p,0)+m,i=Math.max(i-g,0)+m,t[n.LEFT]=Math.max(t[n.LEFT]||0,e),t[n.RIGHT]=Math.max(t[n.RIGHT]||0,i)}else t[n.TOP]=Math.max(t[n.TOP]||0,i),t[n.BOTTOM]=Math.max(t[n.BOTTOM]||0,e)},updateAxisSizeAndBounds:function(){this._setComponentBounds(this.getPosition(),this._size)},fixScaleAndTickData:function(){this.scale.domain(this._domain).rangeRound(this._getRange()),this._updateOriginTickData(),this._calculateTickPosAndStep()},dealOnZero:function(){var t=this.options;if(t.onZero){var e=t.onZero===!0?0:t.onZero,i=this.componentType==a.X_AXIS_COMPONENT?a.Y_AXIS_COMPONENT:a.X_AXIS_COMPONENT;i=this.vanchart.getComponent(i).getAxis(e);var r,o,s,h,l=i.getZeroPos(),u=this.vanchart.bounds;this.isHorizontal()?(r=u.x,o=l+u.y-(this.getPosition()==n.TOP?this.bounds.height:0),s=u.width,h=this.bounds.height):(r=l+u.x-(this.getPosition()==n.LEFT?this.bounds.width:0),o=u.y,s=this.bounds.width,h=u.height),this.bounds={x:r,y:o,width:s,height:h}}},_getTickLabelLength:function(t){var e=this.options,i=0,n=0,r=this.isHorizontal();if(e.showLabel&&(i=isNaN(+e.tickPadding)?u():e.tickPadding),e.enableTick&&(i+=isNaN(+e.tickLength)?c:e.tickLength),t)t.forEach(function(t){var e=t.tickDim;n=Math.max(n,r?e.height:e.width)});else for(var a=this._getTickValues(),o=0,s=a.length;s>o;o++){var h=this._getTickDim(this._getTickContent(a[o],e.formatter));n=Math.max(r?h.height:h.width,n)}return i+(e.showLabel?n:0)},_getTickDim:function(t){var e=this.options,i=e.useHtml,n=e.labelRotation||0,a=e.labelStyle||{};return r.getTextDimensionWithRotation(t,a,i,n)},_updateOriginTickData:function(){var t=this._getTickValues(),e=this.options,i=e.formatter,n=e.useHtml;isNaN(e.labelRotation)?e.autoRotate?this.labelRotation=this.getLabelAutoRotation(t,e,i):this.labelRotation=0:this.labelRotation=e.labelRotation,this.tickData=[];for(var o=e.labelStyle||{},s=r.extend({writingMode:"tb-rl","writing-mode":"tb-rl","-webkit-writing-mode":"vertical-rl"},o),h=0,l=t.length;l>h;h++){var u=t[h],c=this._getTickContent(u,i);this.type===a.CATEGORY_AXIS_COMPONENT&&c&&(c=c.trim());var d,f,p=o,g=this.labelRotation;90===Math.abs(g)&&r.hasChn(c)&&(g=360,p=s),d=r.getTextDimension(c,p,n),f=r.getTextDimRotated(d,g),n&&(f.width=isNaN(parseFloat(e.labelWidth))?f.width:parseFloat(e.labelWidth),f.height=isNaN(parseFloat(e.labelHeight))?f.height:parseFloat(e.labelHeight)),this.tickData.push({tickValue:u,tickContent:c,tickDim:f,tickRectDim:d,labelRotation:g})}},_isBaseAxis:function(){return this.series.length?this.componentType==this.series[0].getBaseAxisType():!1},getLabelAutoRotation:function(){return 0},_getAxisTitleLength:function(){var t=this.options.title,e=0;if(t){var i,n;this.titleRotation=t.rotation,r.hasChn(t.text)&&90===Math.abs(t.rotation)&&(this.titleRotation=360,t.style=r.extend({writingMode:"tb-rl","writing-mode":"tb-rl","-webkit-writing-mode":"vertical-rl"},t.style)),i=r.getTextDimension(t.text,t.style,t.useHtml),n=r.getTextDimRotated(i,this.titleRotation),this.titleRectDim=i,this.titleDim=n,e=this.isHorizontal()?n.height:n.width}return e},getAxisTitleBounds:function(){var t=this.bounds,e=this.tickLabelLength+d(),i=this.getPosition(),r=t.x,a=t.y,o=t.width,s=t.height;switch(i){case n.LEFT:o-=e;break;case n.BOTTOM:a+=e,s-=e;break;case n.RIGHT:r+=e,o-=e;break;case n.TOP:s-=e}return{x:r,y:a,width:Math.max(o,0),height:Math.max(s,0)}},getTickLength:function(){var t=this.scale.range();return Math.abs(t[0]-t[1])/Math.max(this.tickData.length,1)},adjustDomain4Radius:function(){if(this.type===a.VALUE_AXIS_COMPONENT||this.type===a.DATE_AXIS_COMPONENT){var t=this._domain,e=this.type==a.DATE_AXIS_COMPONENT,i=this._getRange(),o=this._dataDomain,s=Math.max((t[0]+"").length,(t[1]+"").length);e&&(t=[r.int2date(t[0]),r.int2date(t[1])]);var h=this.scale.domain(t).range(i),l=this,u=this._isBaseAxis(),c=this.componentType===a.X_AXIS_COMPONENT?"x":"y",d=Number.MAX_VALUE,f=-Number.MAX_VALUE;if(this.series.map(function(t){if(t.visible&&((t.type===n.BUBBLE_CHART||t.type===n.SCATTER_CHART)&&t.points.map(function(t){var e=h(l.getAxisValue(t[c],t));if(t.visible&&!t.isNull&&!isNaN(e)){var i=r.pick(t.radius,t.options.marker&&t.options.marker.radius);d=Math.min(d,e-i),f=Math.max(f,e+i)}}),u&&(t.type===n.COLUMN_CHART||t.type===n.BAR_CHART||t.type===n.LINE_CHART||t.type===n.AREA_CHART))){var e=t.points;if(!e.length)return;var i,a=h(o[0]),s=h(o[1]),p=Math.min(a,s),g=Math.max(a,s);i=t.type===n.COLUMN_CHART||t.type===n.BAR_CHART?t.getSeriesOffsetAndWidth().width/2:e[0].options.marker&&e[0].options.marker.radius||1,isNaN(p)||(d=Math.min(d,p-i)),isNaN(g)||(f=Math.max(f,g+i))}}),d===Number.MAX_VALUE||f===-Number.MAX_VALUE)return;var p=h.invert(d),g=h.invert(f);e&&(p=r.date2int(p),g=r.date2int(g)),this.calculateDomainFromData([Math.min(Math.min(p,g),o[0]),Math.max(Math.max(p,g),o[1])]);var m=Math.max((this._domain[0]+"").length,(this._domain[1]+"").length);if(m>s)return!0}},_getRange:function(){return this._getPlotRange()},_getPlotRange:function(){var t=this.vanchart.bounds;return this.isHorizontal()?this.isAxisReversed()?[t.width,0]:[0,t.width]:this.isAxisReversed()?[0,t.height]:[t.height,0]},_getPlotBands:function(){var t=this.options.plotBands,e=this.scale,i=!(!e.rangeBand||!e.rangeBand());if("string"==typeof t){var n=t;t=[];for(var a=this._getTickValuesWithEndValue(),o=i?-1:0,s=a.length-1;s>o;s-=2)t.push({color:n,from:i?a[s]:a[s-1],to:a[s]})}else{t=t||[];for(var h=[],l=0,u=t.length;u>l;l++){var c=t[l];r.hasDefined(c.from)&&r.hasDefined(c.to)&&h.push(c)}t=h}return t},_getTickValuesWithEndValue:function(){var t=this._getTickValues(),e=this._domain[1],i=this.type==a.DATE_AXIS_COMPONENT;if(t.length){var n=t[t.length-1];i?r.date2int(n)n&&t.push(e)}return t},getTickData:function(){return this.tickData},getMinorTickData:function(){var t=[],e=this.options,i=this._step;if(this.options.enableMinorTick&&this.tickData.length)if(this.type==a.CATEGORY_AXIS_COMPONENT){var n=Math.round(this.getTickLength()/5),o=this.tickData.length;o=this.isRangePoints?o-1:o;for(var s=0;o>s;s++)for(var h=this.tickData[s].tickPos,l=1;5>l;l++)t.push(h+n*l)}else{for(var u=e.minorTickInterval?e.minorTickInterval:i/5,s=0,c=this.tickData.length;c-1>s;s++){var d=this.tickData[s].tickValue,f=this.tickData[s+1].tickValue,p=d instanceof Date&&f instanceof Date;d=p?r.date2int(d):d,f=p?r.date2int(f):f;for(var g=r.accAdd(d,u);f>g;g=r.accAdd(g,u))t.push(p?r.int2date(g):g)}var m=this.tickData[this.tickData.length-1].tickValue,v=this.scale.domain()[1],p=m instanceof Date&&v instanceof Date;if(m=p?r.date2int(m):m,v=p?r.date2int(v):v,v>m)for(var g=m+u;v>=g;g+=u)t.push(p?r.int2date(g):g);var _=this.tickData[0].tickValue,y=this.scale.domain()[0];if(p=_ instanceof Date&&y instanceof Date,_=p?r.date2int(_):_,y=p?r.date2int(y):y,_>y)for(g=_-u;g>=y;g-=u)t.push(p?r.int2date(g):g)}return t},getMaxTickWidth:function(){var t=0;return this.tickData.forEach(function(e){t=Math.max(t,e.tickDim.width)}),t},getTickHeight:function(){return this.options.labelStyle&&this.options.showLabel?r.getTextHeight(this.options.labelStyle):0},_calculateTickPosAndStep:function(){var t=this.options,e=this.scale,i=this.getTickLength(),n=e.rangeBand?e.rangeBand()/2:0;if(this.tickData.forEach(function(t){t.tickPos=e(t.tickValue),t.tickLabelPos=t.tickPos+n}),t.showLabel)if(t.step){var a=0;this.tickData.forEach(function(e){a++%t.step&&(e.tickContent="")})}else{var o,s=this.isHorizontal(),h=1,l=1,u=Math.abs(Math.abs(this.labelRotation)-(s?0:90)),c=u>=15&&90!==u;o=r.toRadian(u);var d,f,p,g,m=-1,v=Math.sin(o);this.tickData.forEach(function(t){if(""!==t.tickContent)if(c)g=t.tickRectDim.height,f=Math.abs(t.tickPos-d),p=(g+m)/2,f*v>p||-1===m?(h=1,d=t.tickPos,m=g):(h++,l=Math.max(l,h));else{var e=s?t.tickDim.width:t.tickDim.height;i&&(l=Math.max(l,Math.ceil(e/i)))}});var a=0;this.tickData.forEach(function(t){a++%l&&(t.tickContent="")})}else this.tickData.forEach(function(t){t.tickContent=""})},_getAxisOriginPoint:function(){var t,e,i=this.bounds,r=this.getPosition();switch(r){case n.TOP:t=i.x,e=i.y+i.height;break;case n.BOTTOM:t=i.x,e=i.y;break;case n.LEFT:t=i.x+i.width,e=i.y;break;case n.RIGHT:t=i.x,e=i.y}return{x:t,y:e}},getPosition:function(){var t=this.componentType==a.X_AXIS_COMPONENT?"bottom":"left",e=this.options.position||t;if(!this.vanchart.isInverted())return e;switch(e){case n.TOP:return n.RIGHT;case n.RIGHT:return n.BOTTOM;case n.BOTTOM:return n.LEFT;case n.LEFT:return n.TOP}},isAxisReversed:function(){return this.componentType===a.X_AXIS_COMPONENT&&this.vanchart.isInverted()?!this.options.reversed:this.options.reversed},isOnZero:function(){return this.options.onZero},getLineWidth:function(){return this.options.lineWidth},showArrow:function(){return this.options.showArrow},getTitleAlign:function(){var t=this.options.title;if(!t)return null;var e=t.align||"center";if(this.vanchart.isInverted())switch(e){case n.TOP:return n.RIGHT;case n.RIGHT:return n.BOTTOM;case n.BOTTOM:return n.LEFT;case n.LEFT:return n.TOP}return e},_calculateLogNiceDomain:function(t,e,i,n){var a=this.options,o=a.log,s=parseInt(r.pick(a.tickInterval,1));t=t>=1?1:t,t=0>=t?1:t,t=r.pick(i,t),e=r.pick(n,e),t=Math.pow(o,Math.floor(r.log(o,t))),e=Math.pow(o,Math.ceil(r.log(o,e))),this._domain=[t,e],this._tickStart=t,this._step=s},_calculatePercentValueDomain:function(t,e,i,n){var a=this.options,o=r.pick(i,0),s=r.pick(n,1),h=r.pick(a.tickInterval,.25); - this._domain=[o,s],this._tickStart=o,this._step=h},_calculateValueNiceDomain:function(t,e,i,n){var o=this.type==a.VALUE_AXIS_COMPONENT&&!this._isBaseAxis(),s=this.options;o&&(t>0?t=0:0>e&&(e=0)),t=r.hasDefined(i)?i:t,e=r.hasDefined(n)?n:e,t>=e&&(e=t+g*(this.type===a.DATE_AXIS_COMPONENT?1e3:1));var h=s.tickInterval||this._linearTickInterval(t,e),l=this._linearNiceDomain(t,e,h);t=r.hasDefined(i)?i:l[0],e=r.hasDefined(n)?n:l[1],t>=e&&(e=t+g*(this.type===a.DATE_AXIS_COMPONENT?1e3:1));var u=l[0];if(r.hasDefined(i)){var c=r.accMul(Math.ceil(r.accDiv(r.accAdd(i,-u),h)),h);u=r.accAdd(u,c)}this._domain=[t,e],this._tickStart=u,this._step=h},_linearTickInterval:function(t,e,i){i=i||this._getDefaultTickCount();var n=e-t,r=Math.pow(10,Math.floor(Math.log(n/i)/Math.LN10)),o=i/n*r;return.15>=o?r*=10:.35>=o?r*=5:.75>=o&&(r*=2),this.type===a.DATE_AXIS_COMPONENT&&(r=Math.max(r,1e3)),r},_linearNiceDomain:function(t,e,i){return t=r.accMul(Math.floor(t/i),i),e=r.accMul(Math.ceil(e/i),i),[t,e]},_getDefaultTickCount:function(){return this.vanchart.options.chartType==n.RADAR_CHART?p:f},getIndexByPosition:function(t){var e,i=this.getPlotBounds(),n=this.scale,o=n(this.isAxisReversed()?n.domain()[n.domain().length-1]:n.domain()[0]);e=this.isHorizontal()?t[0]-i.x-o:t[1]-i.y-o;var s;switch(this.type){case a.DATE_AXIS_COMPONENT:s=r.date2int(n.invert(e));break;default:s=n.invert(e)}return s=Math.round(s)},_valueInDomain:function(){return!0},render:function(){this.lastScale=this.scale&&this.scale.copy();var t=this.vanchart,e=t.renderer;this.axisGroup||(this.axisGroup=this.createComponentGroup(),e.clip(this.clipAxisGroup=this.createComponentGroup(),t.plotClip));var i=this.bounds,n={x:i.x,y:i.y,width:i.width,height:i.height};this.isHorizontal()?(n.x=0,n.width=t.width):(n.y=0,n.height=t.height),this.axisGroupClip?e.updateClip(this.axisGroupClip,n):(this.axisGroupClip=e.createClip(n),e.clip(this.axisGroup,this.axisGroupClip)),this.axisLineGroup||(this.axisLineGroup=e.group().addTo(t.seriesGroup)),0!==this.series.length&&(this._drawPlotBands(),this._drawGridLine(),this._drawTickLine(),this._drawTickLabel(),this._drawPlotLines(),this._drawAxisTitle(),this._drawAxisLine())},isLog:function(){return this.options.log},getZeroPos:function(){switch(this.type){case a.VALUE_AXIS_COMPONENT:return this.isLog()?this.scale(1):this.scale(0);case a.DATE_AXIS_COMPONENT:return this.scale(r.int2date(0));case a.CATEGORY_AXIS_COMPONENT:return 0}},_drawPlotBands:function(){var t,e,i,n,a,o=this._getPlotBands(),s=this.scale,u=s.rangeBand,c=u?s.rangeBand():0,d=this.vanchart.renderer,f=this.vanchart.bounds,p=this,g=p.isHorizontal(),m=0,v=0,_=f.width,y=f.height;for(this.plotBandsGroup||(this.plotBandsGroup=d.group().addTo(this.clipAxisGroup),this.plotBands=[]),this.plotBandsGroup.attr({transform:r.makeTranslate(f)}),t=o.length;tt;t++){var x=o[t],b=s(x.from),T=s(x.to);i=Math.min(b,T),n=Math.max(b+c,T+c),i=Math.max(g?m:v,i),n=Math.min(g?_:y,n),a=g?{x:i,y:v,width:Math.max(n-i,0),height:y}:{x:m,y:i,width:_,height:Math.max(n-i,0)},this.plotBands[t]=this.plotBands[t]||d.rect(a).addTo(this.plotBandsGroup),this.plotBands[t].style({fill:x.color}).animate({duration:h,ease:l,attr:a})}},_drawAxisLine:function(){var t=this.options,e=t.lineWidth,i=t.lineColor,n=this.getPlotBounds(),a=this._getAxisOriginPoint(),o="x1",s="y1",h="x2",l="y2",u=n.width,c=this.vanchart.renderer;this.isHorizontal()||(o="y1",s="x1",h="y2",l="x2",u=n.height);var d=r.lineSubPixelOpt(0,e);this.axisLine||(this.axisLine=c.line().addTo(this.axisLineGroup));var f={};if(f[o]=0,f[h]=u,f[s]=f[l]=d,f.transform=r.makeTranslate(a),this.axisLine.attr(f).style({stroke:i,"stroke-width":e}),this.showArrow()){this.arrowGroup||(this.arrowGroup=c.group().addTo(this.axisLineGroup));var p=this.arrowGroup.line||c.line().addTo(this.arrowGroup),g=this.arrowGroup.path||c.path().addTo(this.arrowGroup);this.arrowGroup.line=p,this.arrowGroup.path=g,this.isHorizontal()?(this.arrowGroup.attr("transform",r.makeTranslate([a.x+n.width,a.y])),p.attr({x1:0,y1:d,x2:6,y2:d}).style({stroke:i,"stroke-width":e}),g.attr({d:"M2,-4 L10,0 L2,4 L6,0 L2,-4"}).style({fill:i})):(this.arrowGroup.attr("transform",r.makeTranslate(a)),p.attr({x1:d,y1:0,x2:d,y2:-6}).style({stroke:i,"stroke-width":e}),g.attr({d:"M-4,-2 L0,-10 L4,-2 L0,-6 L-4,-2"}).style({fill:i}))}else this.arrowGroup&&this.arrowGroup.remove()},_drawGridLine:function(){var t=this.options,e=this.getPlotBounds(),i=this.getTickData(),o=this.scale,s=this.lastScale||o,u=t.gridLineColor,c=t.gridLineWidth;0===c&&(u="");var d=r.lineSubPixelOpt(0,c),f=this.vanchart.renderer,p="x1",g="y1",m="x2",v="y2",_=e.height;this.isHorizontal()||(p="y1",g="x1",m="y2",v="x2",_=e.width),this.gridLinesGroup||(this.gridLinesGroup=f.group().addTo(this.clipAxisGroup),this.gridLines=[]),this.gridLinesGroup.attr("transform",r.makeTranslate(e));for(var y=this.type==a.CATEGORY_AXIS_COMPONENT?[{tickPos:this.getPosition()==n.BOTTOM?e.width:e.height-1}]:[],x=this._bindData(this.gridLines,i.concat(y),function(t){return t.tickValue}),b=[],T=0,A=x.exit.length;A>T;T++){var C=x.exit[T].datum(),L=o(C.tickValue),P={};P[p]=L,P[m]=L,x.exit[T].animate({duration:h,ease:l,attr:P,style:{opacity:0}}).remove()}for(var T=0,A=x.enter.length;A>T;T++){var C=x.enter[T],M=f.line().style({stroke:u,"stroke-width":c}).addTo(this.gridLinesGroup),w=s(C.tickValue)+d,L=C.tickPos+d;w=isNaN(w)?L:w,M.attr(p,w).attr(m,w).attr(g,0).attr(v,_);var P={};P[p]=L,P[m]=L,P[g]=0,P[v]=_,M.animate({attr:P,duration:h,ease:l}),M.datum(C),b.push(M)}b=b.concat(x.update);for(var T=0,A=b.length;A>T;T++){var M=b[T].style({stroke:u,"stroke-width":c}),C=M.datum(),L=C.tickPos+d,P={};P[p]=L,P[m]=L,P[g]=0,P[v]=_,M.animate({attr:P,duration:h,ease:l})}this.gridLines=b},_drawTickLine:function(){function t(t,e,n){var o,s,h=m._bindData(t,e),l=[];for(o=0,s=h.exit.length;s>o;o++)h.exit[o].remove();for(o=0,s=h.enter.length;s>o;o++)l.push(g.line().datum(h.enter[o]).addTo(m.tickLinesGroup));for(l=l.concat(h.update),o=0,s=l.length;s>o;o++){var u,c=l[o].datum(),d={};u=r.hasDefined(c.tickPos)?c.tickPos:m.type==a.CATEGORY_AXIS_COMPONENT?c:m.scale(c);var f=i.x,p=i.y;m.isHorizontal()||(f=i.y,p=i.x),d[y]=u+n.det+f,d[b]=d[y],d[x]=p,d[T]=(A*n.tickLength||0)+p,l[o].attr(d).style({stroke:n.tickColor,"stroke-width":n.tickWidth})}return l}var e=this.options,i=this._getAxisOriginPoint(),o=this.getPosition(),s=this.getTickData(),h=e.enableTick?e.tickLength||0:0,l=e.tickWidth||1,u=e.tickColor,c=this.getMinorTickData(),d=e.enableMinorTick?e.minorTickLength||0:0,f=e.minorTickColor,p=e.minorTickWidth||1,g=this.vanchart.renderer,m=this,y="x1",x="y1",b="x2",T="y2";this.isHorizontal()||(y="y1",x="x1",b="y2",T="x2");var A=o==n.TOP||o==n.LEFT?-1:1,C=r.lineSubPixelOpt(0,l),L=r.lineSubPixelOpt(0,p);this.tickLinesGroup||(this.tickLinesGroup=g.group().addTo(this.axisGroup),this.tickLines={},this.tickLines[v]=[],this.tickLines[_]=[]),this.tickLines[v]=t(this.tickLines[v],s,{det:C,tickWidth:l,tickLength:h,tickColor:u}),this.tickLines[_]=t(this.tickLines[_],c,{det:L,tickWidth:p,tickLength:d,tickColor:f})},_drawPlotLines:function(){function t(t){return{stroke:t.color,"stroke-width":t.width,"stroke-dasharray":t.dataArray}}function e(t){return f.text().textContent(t.text).style(t.style).attr({x:t.textX,y:t.textY,"text-anchor":"left",dy:.85*t.textDim.height})}function i(t,i){i._textG&&(i._textG.remove(),i._textG=null),t.text&&t.textDim&&(i._textG=e(t).addTo(i))}var o=this.options.plotLines||[],s=(this.getPosition(),this.vanchart.bounds),h=this.scale,l=this.type==a.DATE_AXIS_COMPONENT,c=[],d=this,f=this.vanchart.renderer;o.forEach(function(t){if(!r.isEmpty(t.value)){var e,i,a,o,f=h(l?r.object2date(t.value):t.value)+(h.rangeBand?h.rangeBand()/2:0),p=r.lineSubPixelOpt(f,t.width);if(d.isHorizontal()){if(0>f||f>s.width)return;e=i=p,a=0,o=s.height}else{if(0>f||f>s.height)return;e=0,i=s.width,a=o=p}var g,m,v,_;if(t.label&&t.label.text&&t.label.style){_=t.label.style,v=t.label.text;var y=t.label.align,x=r.getTextDimension(v,_,t.label.useHtml);switch(y){case n.TOP:g=e-x.width,m=a;break;case n.BOTTOM:g=e-x.width,m=o-x.height;break;case n.LEFT:g=e,m=a-x.height-u();break;case n.RIGHT:g=i-x.width,m=o-x.height-u()}}c.push({color:t.color,line:{x1:e,y1:a,x2:i,y2:o},width:t.width,dataArray:n.DASH_TYPE[t.dashStyle],text:v,textDim:x,style:_,textX:g,textY:m})}}),this.plotLinesGroup||(this.plotLinesGroup=f.group().addTo(this.vanchart.backGroup),this.plotLines=[]),this.plotLinesGroup.attr("transform",r.makeTranslate(s));var p,g,m=this._bindData(this.plotLines,c);for(this.plotLines=[],p=0,g=m.exit.length;g>p;p++)m.exit[p].remove();for(p=0,g=m.enter.length;g>p;p++){var v=m.enter[p],_=f.group();this.plotLines.push(_),_._lineG=_.append(f.line(v.line).style(t(v))),i(v,_),_.addTo(this.plotLinesGroup)}for(p=0,g=m.update.length;g>p;p++){var _=m.update[p],v=_.datum();_._lineG.attr(v.line).style(t(v)),i(v,_),this.plotLines.push(_)}},_drawTickLabel:function(){this._drawSvgTickLabel()},_drawSvgTickLabel:function(){var t=this,e=this.vanchart,i=e.renderer,n=this.scale,a=this.lastScale||n,o=this.options,s=o.labelStyle,u=o.useHtml,c=this.getTickData().filter(function(t){return""!==t.tickContent});this.tickLabelsGroup||(this.tickLabelsGroup=i.vgroup().add(),this.axisGroup.append(this.tickLabelsGroup.renderG),this.tickLabels=[]);var d,f,p=this._bindData(this.tickLabels,c,function(t){return t.tickValue}),g=[],m={duration:h,ease:l,style:{opacity:0}};for(d=0,f=p.exit.length;f>d;d++){var v=p.exit[d].datum(),_=n(v.tickValue);p.exit[d].animate(r.extend({},m,t.isHorizontal()?{x:_}:{y:_}))}for(d=0,f=p.enter.length;f>d;d++){var v=p.enter[d],y=this._getLabelAttr(a,v),x=this.tickLabelsGroup.append(i.vtext(u).textContent(v.tickContent).style({opacity:0})),b=v.labelRotation%360?x.vRotate(v.labelRotation,!0).rotateStr:"";y.transform+=b,x.attr(y),x.datum(v),g.push(x)}for(g=g.concat(p.update),d=0,f=g.length;f>d;d++){var x=g[d],v=x.datum();x.textContent(v.tickContent).style(s);var y=this._getLabelAttr(n,v),T=this._valueInDomain(v.tickValue)?1:0;if(this.useHtmlLabel())x.attr(y).style({opacity:T}),x.vRotate(v.labelRotation);else{var b=v.labelRotation%360?x.vRotate(v.labelRotation,!0).rotateStr:"";y.transform+=b,x.animate({ease:l,duration:h,attr:y,style:{opacity:T}})}}this.tickLabels=g},_getLabelAttr:function(t,e){var i,a,o=this._getAxisOriginPoint(),s=t.rangeBand?t.rangeBand()/2:0,h=t(e.tickValue)+s,l=this.options,u=this.isHorizontal(),c=l.enableTick?l.tickLength:0,d=l.tickPadding+c||0,f=e.labelRotation||0,p=(l.labelStyle,l.useHtml),g=this.getPosition(),m=g==n.TOP||g==n.LEFT?-1:1,v=e.tickRectDim,_=e.tickDim,y=0,x=0,b=0,T=.85*v.height,A=r.toRadian(f);360===f&&(b=p||r.isMS?0:.85*v.width/2,T=0,a="tb-rl"),u?(i=Math.abs(f%90)<15?0:f>0?1:-1,x+=m*(_.height-v.height)/2,y+=m*i*(_.width-Math.abs(v.height*Math.sin(A)))/2,g===n.TOP&&(x-=v.height),x+=m*d,y+=o.x+h-v.width/2,x+=o.y):(i=Math.abs(f%90)>85?0:f>0?1:-1,y+=m*(_.width-v.width)/2,x+=m*i*(_.height-v.height*Math.cos(A))/2,g===n.LEFT&&(y-=v.width),y+=m*d,y+=o.x,x+=o.y+h-v.height/2);var C=p?"px":"",L="translate("+y+C+" "+x+C+")",P={transform:L,dy:T,dx:b,writingMode:a,"writing-mode":a};return p&&a&&(P["-webkit-writing-mode"]="vertical-rl"),P},_drawAxisTitle:function(){var t=this.options,e=t.title;if(!e||!e.text)return this.titleGroup&&this.titleGroup.remove(),void(this.titleGroup=null);var i=this.vanchart.renderer,a=this.axisGroup,o=e.useHtml,s=this.titleRotation,h=this.getTitleAlign(),l=e.text,u=e.style,c=this.titleDim,d=this.titleRectDim,f=this.getAxisTitleBounds();this.titleGroup||(this.titleGroup=i.vgroup().add(),a.append(this.titleGroup.renderG)),this.titleGroup.attr({transform:r.makeTranslate(f)});var p=this.titleGroup;p.text||(p.text=p.append(i.vtext(o)));var g=0,m=0,v=0,_=.85*d.height;switch(h){case n.TOP:m=0;break;case n.BOTTOM:m=f.height-c.height;break;case n.LEFT:g=0;break;case n.RIGHT:g=f.width-c.width;break;case n.CENTER:default:this.isHorizontal()?g=(f.width-c.width)/2:m=(f.height-c.height)/2}360===this.titleRotation?(v=o||r.isMS?0:.85*d.width/2,_=0):(g+=(c.width-d.width)/2,m+=(c.height-d.height)/2),p.text.textContent(l).attr({x:g,y:m,dy:_,dx:v}).style(u),s%360&&p.text.vRotate(s)},remove:function(){this.axisGroup&&this.axisGroup.remove(),this.clipAxisGroup&&this.clipAxisGroup.remove(),this.axisGroup=this.clipAxisGroup=null,this.axisLineGroup&&this.axisLineGroup.remove(),this.axisLineGroup=null,this.tickLabelsGroup&&this.tickLabelsGroup.remove(),this.tickLabelsGroup=null}});return x}),define("component/CategoryAxis",["require","./Base","./BaseAxis","../utils/BaseUtils","../Constants","../ComponentLibrary","../utils/Scale"],function(t){var e,i=(t("./Base"),t("./BaseAxis")),n=t("../utils/BaseUtils"),r=t("../Constants"),a=t("../ComponentLibrary"),o=t("../utils/Scale"),s=function(){return null==e&&(e=n.paddingConvertWithScale("0.1875rem")),e},h=i.extend({type:a.CATEGORY_AXIS_COMPONENT,initScale:function(){this.lastScale=this.scale,this.scale=o.ordinal()},calculateDomainFromData:function(){this._dataDomain=this._getDomainFromData();var t=this.vanchart.getComponent(a.ZOOM_COMPONENT);this._zoomDomain=this._zoomDomain||t&&t.getZoomDomain(this),this._domain=this._zoomDomain||this._dataDomain},calculateDomainFromZoom:function(){this._domain=this._zoomDomain},_getStartAndEndTick:function(){return[this._domain[0],this._domain[this._domain.length-1]]},_getDomainFromData:function(){var t=this.options,e=this.series,i=this,n={},a=t.categories||[];return a.forEach(function(t){n[t]=!0}),e.forEach(function(t){this.getTrendLineForecast(t);for(var e=0,o=t.points.length;o>e;e++){var s=t.points[e].category;n[s]||(n[s]=!0,a.push(s))}t.type!==r.AREA_CHART&&(i.isRangePoints=!1)},this),this.addTrendLineCategories(a)},setCategories:function(t){var e=this._dataDomain;this._dataDomain=this.addTrendLineCategories(t);var i=this.vanchart.getComponent(a.ZOOM_COMPONENT);if(this._isBaseAxis()&&i&&i.zoomToolEnabled()){i.updateRangeLeftAndRight(this,e,t);var n=i&&i.getZoomDomain(this);this._zoomDomain=n,this.calculateDomainFromZoom()}else this._domain=this._dataDomain,this._zoomDomain=null;this.fixScaleAndTickData()},addTrendLineCategories:function(t){function e(t,e){return Array.apply(null,Array(t)).map(e)}if(this.forecast&&(this.forecast[0]||this.forecast[1])){var i=0;t=e(-this.forecast[0],function(){return Array(2+i++).join(" ")}).concat(t).concat(e(this.forecast[1],function(){return Array(2+i++).join(" ")}))}return t},getOriginalCategories:function(){return this.forecast&&(this.forecast[0]||this.forecast[1])?this._dataDomain.slice(-this.forecast[0],this._dataDomain.length-this.forecast[1]):this._dataDomain},updateAxisSizeAndBounds:function(){this._updateOriginTickData(),this._calculateSize(this.tickData),this._setComponentBounds(this.getPosition(),this._size)},_getTickValuesWithEndValue:function(){return this._getTickValues()},fixScaleAndTickData:function(){this.scale.domain(this._dataDomain),this.isRangePoints?this.scale.rangePoints(this._getRange()):this.scale.rangeBands(this._getRange()),this._updateOriginTickData(),this._calculateTickPosAndStep()},_getRange:function(){var t=this._getPlotRange();if(this._dataDomain.length==this._domain.length)return t;var e,i=Math.abs(t[1]-t[0]);e=this.isRangePoints?i/Math.max(this._domain.length-1,1):i/this._domain.length;var r=n.indexOf(this._dataDomain,this._domain[0]),a=this._dataDomain.length-n.indexOf(this._dataDomain,this._domain[this._domain.length-1])-1;if(!(this.isAxisReversed()^this.isHorizontal())){var o=r;r=a,a=o}var s=-r*e,h=i+a*e;return this.isHorizontal()?this.isAxisReversed()?[h,s]:[s,h]:this.isAxisReversed()?[s,h]:[h,s]},getLabelAutoRotation:function(t,e,i){if(e.autoRotate&&!e.labelRotation){var r,a,o=this.vanchart.isInverted(),h=t.reduce(function(t,e){return n.getTextDimension(t).width>n.getTextDimension(e).width?t:e}),l=this._getTickContent(h,i),u=n.getTextDimensionWithRotation(l,e.labelStyle,e.useHtml,e.labelRotation),c=Math.max.apply(null,this._getPlotRange())/this._domain.length-s();o?(r=u.height,a=u.width):(r=u.width,a=u.height);var d=Math.sqrt(r*r+a*a);if(a>c)return-90;if(r>c){var f=Math.acos(c/d),p=Math.atan(a/r),g=f+p;return-n.toDegree(g)}}},getCategoryCount:function(){return this._dataDomain.length},indexOfLabel:function(t){return n.indexOf(this._dataDomain,t)},getTickLength:function(){var t=this.scale.domain(),e=this.scale.rangeExtent(),i=Math.abs(e[1]-e[0]);return this.isRangePoints&&t.length<=1?i:this.isRangePoints?i/(t.length-1):this.scale.rangeBand()},_getTickValues:function(){return this._domain},getCategories:function(){return this._dataDomain},axisZoom:function(t,e){var i,r,a=this.vanchart.bounds;this.isHorizontal()?(i=Math.min(t.x,e.x)-a.x,r=Math.max(t.x,e.x)-a.x):(i=Math.min(t.y,e.y)-a.y,r=Math.max(t.y,e.y)-a.y);var s=this.scale.domain(),h=this._getRange(),l=o.quantize().domain(h).range(s),u=n.indexOf(this._dataDomain,l(i)),c=n.indexOf(this._dataDomain,l(r));this.zoomRefresh(this._dataDomain.slice(Math.min(u,c),Math.max(u,c)+1))},getIndexByPosition:function(t){return this._getIndexByXYCoordinate(t)},_getIndexByXYCoordinate:function(t){var e,i=this.getPlotBounds(),n=this.scale,r=this.isHorizontal(),a=this.isAxisReversed()^!r,o=n(a?n.domain()[n.domain().length-1]:n.domain()[0]);e=r?t[0]-i.x-o:t[1]-i.y-o;var s,h=this.getCategories();if(h.length>1){var l=Math.abs(n(n.domain()[1])-n(n.domain()[0]));s=a?h.length-1-e/l:e/l}else s=0;return s=this.isRangePoints?Math.round(s):a?Math.ceil(s):Math.floor(s)},getPointsInCategory:function(t){var e=this.vanchart.bounds,i=this.scale.domain(),n=this._getRange(),r=o.quantize().domain(n).range(i),a=r(this.isHorizontal()?t.x-e.x:t.y-e.y);return this.vanchart.getValidPointsPara(a)},drawHighlightBackground:function(t){var e=t[0].category,i="line";t.map(function(t){var e=t.series;(e.type===r.BAR_CHART||e.type===r.COLUMN_CHART)&&(i="band")});var a=this.getPlotBounds(),o=this.isHorizontal(),s=this.scale,h=s.rangeBand?s.rangeBand():0,l=s(e),u=l+h,c=this.vanchart.renderer,d="x",f="y",p="width",g="height",m=a.height,v="x1",_="x2",y="y1",x="y2";switch(o||(d="y",f="x",p="height",g="width",m=a.width,v="y1",_="y2",y="x1",x="x2"),i){case"band":this.highlightBand||(this.highlightBand=c.rect().style({fill:"rgb(98,179,240)","fill-opacity":.2}).addTo(this.clipAxisGroup)),this.highlightBand.attr("transform",n.makeTranslate(a)).attr(d,l).attr(f,0).attr(p,Math.abs(l-u)).attr(g,m),this.highlightLine&&this.highlightLine.remove(),this.highlightLine=null;break;case"line":default:h&&(l=(l+u)/2),this.highlightLine||(this.highlightLine=c.line().style({stroke:"rgb(140,140,140)","stroke-width":1}).addTo(this.clipAxisGroup)),this.highlightLine.attr("transform",n.makeTranslate(a)).attr(v,l).attr(y,0).attr(_,l).attr(x,m),this.highlightBand&&this.highlightBand.remove(),this.highlightBand=null}},removeHighlightBackground:function(){this.highlightBand&&this.highlightBand.remove(),this.highlightLine&&this.highlightLine.remove(),this.highlightBand=null,this.highlightLine=null}});return a.register(a.CATEGORY_AXIS_COMPONENT,h),h}),define("component/ValueAxis",["require","./Base","./BaseAxis","../utils/BaseUtils","../utils/QueryUtils","../Constants","../ComponentLibrary","../utils/Scale"],function(t){var e=(t("./Base"),t("./BaseAxis")),i=t("../utils/BaseUtils"),n=(t("../utils/QueryUtils"),t("../Constants"),t("../ComponentLibrary")),r=t("../utils/Scale"),a=e.extend({type:n.VALUE_AXIS_COMPONENT,initScale:function(){this.lastScale=this.scale,this.scale=this.options.log?r.log().base(this.options.log):r.linear()},getAxisValue:function(t,e){return this.byPercent?e.percentage:+t},_valueInDomain:function(t){var e=this.scale.domain();return t>=Math.min(e[0],e[1])&&t<=Math.max(e[0],e[1])},_getDomainFromData:function(){for(var t=Number.MAX_VALUE,e=-t,i=!0,n=this.series,r={},a=!1,o=0,s=n.length;s>o&&!a;o++)a=n[o].visible;for(var o=0,s=n.length;s>o;o++)(n[o].visible||!a)&&(this._getSeriesValue(r,n[o]),this.getTrendLineForecast(n[o]));var h=0;for(var l in r){var u=r[l];h=u[1]-u[0]||0;for(var c=0,d=u.length;d>c;c++)isNaN(u[c])||this.options.log&&u[c]<=0||(t=Math.min(t,u[c]),e=Math.max(e,u[c]),i=!1)}return this._isBaseAxis()&&h&&this.forecast&&(t+=h*this.forecast[0],e+=h*this.forecast[1]),i&&(t=0,e=100),[t,e]},_getSeriesValue:function(t,e){var r=e.name||"",a=this.componentType==n.X_AXIS_COMPONENT?"x":"y";if(i.hasNotDefined(e.stack)||this._isBaseAxis())t[r]=t[r]||[],e.points.forEach(function(e){!e.isNull&&e.visible&&t[r].push(e.options[a])});else{var o=e.stack+e.type+"STACK_POSITIVE",s=e.stack+e.type+"STACK_NEGATIVE";t[o]=t[o]||[],t[s]=t[s]||[],e.points.forEach(function(e,i){if(!e.isNull&&e.visible){var n=+e.options[a];n>0?null!=t[o][i]&&void 0!=t[o][i]?t[o][i]+=n:t[o][i]=n:null!=t[s][i]&&void 0!=t[s][i]?t[s][i]+=n:t[s][i]=n}})}},getStartPos:function(){return this.scale(this.getStartPosValue())},getStartPosValue:function(){var t=this.options;return t.log&&1!==t.log?1:0},_getTickValues:function(){var t=[];if(this.options.log)for(var e,n=0;(e=this._tickStart*Math.pow(this.options.log,n))<=this._domain[1];)t.push(e),n+=this._step;else for(var r=this._tickStart;r<=this._domain[1];r=i.accAdd(r,this._step))t.push(r);return t}});return n.register(n.VALUE_AXIS_COMPONENT,a),a}),define("component/DateAxis",["require","./Base","./BaseAxis","../utils/BaseUtils","../Constants","../ComponentLibrary","../utils/Scale"],function(t){var e=(t("./Base"),t("./BaseAxis")),i=t("../utils/BaseUtils"),n=(t("../Constants"),t("../ComponentLibrary")),r=t("../utils/Scale"),a=1e3,o=60*a,s=60*o,h=24*s,l=31*h,u=12*l,c=e.extend({type:n.DATE_AXIS_COMPONENT,getAxisValue:function(t){return i.object2date(t)},fixScaleAndTickData:function(){var t=[i.int2date(this._domain[0]),i.int2date(this._domain[1])];this.scale.domain(t).rangeRound(this._getRange()),this._calculateDateFormat(),this._updateOriginTickData(),this._calculateTickPosAndStep()},_calculateDateFormat:function(){var t=this._step,e="Dyyyy";a>=t?e="Dss":o>=t?e="Dmm:ss":s>=t?e="Dhh:mm":h>=t?e="Ddd-hh":l>=t?e="DMM-dd":u>=t&&(e="Dyyyy-MM"),this.dateFormat=e},_getTickContent:function(t,e){function n(t){return window.FR&&window.FR.contentFormat(t,r)||t}var r=this.dateFormat;return e=e||n,i.format(t,e)},initScale:function(){this.lastScale=this.scale,this.scale=r.linear()},_getStartAndEndTick:function(){return[i.int2date(this._domain[0]),i.int2date(this._domain[1])]},_getTickValues:function(){for(var t=[],e=this._tickStart;e<=this._domain[1];e=i.accAdd(e,this._step))t.push(i.int2date(e));return t},_valueInDomain:function(t){var e=this.scale.domain();return t>=Math.min(e[0],e[1])&&t<=Math.max(e[0],e[1])},_getDomainFromData:function(){for(var t=Math.ceil(Number.MAX_VALUE),e=-t,n=this.series,r=!1,a=0,o=0,s=n.length;s>o;o++){var h=n[o],l=h[this.componentType];if(l==this&&h.visible){this.getTrendLineForecast(n[o]);var u=h.points;u.length>1&&(a=this.getValueFromData(u[1])-this.getValueFromData(u[0])||0);for(var o=0,s=u.length;s>o;o++){var c=this.getValueFromData(u[o]);c.getTime&&(r=!0,c=i.date2int(c),t=Math.min(t,c),e=Math.max(e,c))}}}return this._isBaseAxis()&&a&&this.forecast&&(t+=a*this.forecast[0],e+=a*this.forecast[1]),r||(t=e=(new Date).getTime()),e=t>=e?t+1e3:e,[t,e]},getValueFromData:function(t){var e=this.componentType==n.X_AXIS_COMPONENT?0:1,r=this.componentType==n.X_AXIS_COMPONENT?"x":"y",a=i.isArray(t)?t[e]:t[r];return i.object2date(a)}});return n.register(n.DATE_AXIS_COMPONENT,c),c}),define("component/Axis",["require","./Base","../utils/BaseUtils","../Constants","../ComponentLibrary","./CategoryAxis","./ValueAxis","./DateAxis"],function(t){var e=t("./Base"),i=t("../utils/BaseUtils"),n=t("../Constants"),r=t("../ComponentLibrary"),a=t("./CategoryAxis"),o=t("./ValueAxis"),s=t("./DateAxis"),h=e.extend({_refresh:function(){this._axisList=this._axisList||[];var t=this.options;t=i.isArray(t)?t:[t];for(var e=t.length,n=e;n=0;n--)if(t[n].axisIndex=n,this._axisList[n]&&this._axisList[n].type!=t[n].type&&(this._axisList[n].remove(),this._axisList[n]=null),this._axisList[n])this._axisList[n].refresh(t[n]);else{var h,l=t[n].type||r.VALUE_AXIS_COMPONENT;l==r.VALUE_AXIS_COMPONENT?h=o:l==r.CATEGORY_AXIS_COMPONENT?h=a:l==r.DATE_AXIS_COMPONENT&&(h=s),this._axisList[n]=new h(t[n],this.componentType,this.vanchart)}},doLayout:function(){for(var t=this._axisList.length,e=t-1;e>=0;e--)this._axisList[e].calculateDomainFromData(),this._axisList[e]._calculateSize(),this._axisList[e]._recordAxisSize()},reCalculateSize:function(){for(var t=this._axisList.length,e=t-1;e>=0;e--)this._axisList[e]._calculateSize(),this._axisList[e]._recordAxisSize()},updateAxisClip:function(){for(var t={},e=this._axisList.length,i=e-1;i>=0;i--)this._axisList[i].updateClipBounds(t);this._recordForPlotBounds(n.LEFT,t[n.LEFT]||0),this._recordForPlotBounds(n.RIGHT,t[n.RIGHT]||0),this._recordForPlotBounds(n.TOP,t[n.TOP]||0),this._recordForPlotBounds(n.BOTTOM,t[n.BOTTOM]||0)},updateAxisSizeAndBounds:function(){for(var t=this._axisList.length,e=t-1;e>=0;e--)this._axisList[e].updateAxisSizeAndBounds()},adjustDomain4Radius:function(){for(var t=!1,e=this._axisList.length,i=e-1;i>=0;i--)t=this._axisList[i].adjustDomain4Radius()||t;return t},fixBoundsByPlot:function(){for(var t=this.vanchart.bounds,e={},r=0,a=this._axisList.length;a>r;r++){var o=this._axisList[r],s=o.getPosition();o.isOnZero()?(l?o.bounds.width=t.width:o.bounds.height=t.height,o.fixScaleAndTickData()):(e[s]=e[s]||[],e[s].push(o))}for(var s in e)for(var h=e[s],l=s==n.TOP||s==n.BOTTOM,r=0,u=h.length;u>r;r++){var o=h[r],c=o.bounds,d=h[r-1]&&h[r-1].bounds||t;if(l){var f=s==n.TOP?d.y-c.height:d.y+d.height;o.bounds=i.makeBounds(d.x,f,d.width,c.height)}else{var p=s==n.LEFT?d.x-c.width:d.x+d.width;o.bounds=i.makeBounds(p,d.y,c.width,d.height)}o.fixScaleAndTickData()}},getAxis:function(t){return t>=this._axisList.length&&(t=0),this._axisList[t]},getAxisCount:function(){return this._axisList.length},axisZoom:function(t,e){this._axisList.forEach(function(i){i.axisZoom(t,e)})},dealOnZero:function(){this._axisList.forEach(function(t){t.dealOnZero()})},render:function(){for(var t=0,e=this._axisList.length;e>t;t++)this._axisList[t].render()}});return r.register(r.X_AXIS_COMPONENT,h),r.register(r.Y_AXIS_COMPONENT,h),h}),define("component/GaugeAxis",["require","../Constants","./Axis","../ComponentLibrary"],function(t){var e=(t("../Constants"),t("./Axis")),i=t("../ComponentLibrary"),n=e.extend({initAttributesWithSeries:function(){for(var t=this._axisList.length,e=t-1;e>=0;e--){var i=this._axisList[e];i.calculateDomainFromData(),i.scale.domain(i._domain),i._updateOriginTickData(),i.options.showLabel||i.tickData.forEach(function(t){t.tickContent=""})}},doLayout:function(){},render:function(){}});return i.register(i.GAUGE_AXIS_COMPONENT,n),n}),define("component/LegendItem",["require","../dom/Evented","../Constants","../utils/BaseUtils","./LegendIconFactory","../ComponentLibrary"],function(t){var e,i=t("../dom/Evented"),n=t("../Constants"),r=t("../utils/BaseUtils"),a=t("./LegendIconFactory"),o=t("../ComponentLibrary"),s=function(){return null==e&&(e=r.paddingConvertWithScale("0.5rem")),e},h=i.extend({initialize:function(t,e){this.legendX=0,this.legendY=0,this.legend=t,this.refresh(e)},refresh:function(t){this.options=t,t.renderItem=this},render:function(){var t=this.legend,e=t.vanchart,i=e.renderer,o=t.options.style;this.graphic||(this.graphic=t.legendItemsGroup.append(i.group()),this.options.isTrendLine||this.graphic.style({cursor:"pointer"})),e.registerInteractiveTarget(this,this.graphic);var h=this.graphic,l=this.options,u=l.visible?l.color:l.hiddenColor,c=a.getLegendIconSize(l.legendIconType),d=r.getTextDimension(l.itemName,o,t.options.useHtml),f=Math.max(c.height,d.height);this.graphic.attr({transform:r.makeTranslate([this.legendX,Math.round(this.legendY+f/2)])}),a.hasIcon(l.legendIconType)?(h.image&&h.image.remove(),h.image=null,h.path=h.path||i.path().addTo(h),h.path.attr("d",a.getLegendIconPath(l.legendIconType)).attr("transform",r.makeTranslate([0,-c.height/2])).style({fill:u,"fill-opacity":l.opacity}),l.series.type==n.BUBBLE_CHART&&h.path.style("stroke",u).style("stroke-width",1)):(h.path&&h.path.remove(),h.path=null,h.image=h.image||i.image().addTo(h),h.image.attr({x:0,y:-c.height/2,width:12,height:12,preserveAspectRatio:"none"}).imageContent(l.legendIconType));var p=r.isSupportSVG()?{dy:"0.32em"}:{};h.text=h.text||h.append(i.vtext()),h.text.textContent(l.itemName||"").style("margin-top","-0.7em").attr(p).attr("x",c.width+s()).style({cursor:this.options.isTrendLine?"default":"pointer","white-space":"nowrap"}).style(o).style({fill:l.visible?o.color:l.hiddenColor})},getEvents:function(){return this.options.isTrendLine?{}:{mouseover:this.onMouseOver,mouseout:this.onMouseOut,tap:this.onTap}},onMouseOver:function(){this.legend.options.hover?r.getFormatterFunction(this.legend.options.hover)():(this.graphic&&this.graphic.text&&this.graphic.text.style({fill:this.options.hoverColor}),this.legend.options.highlight&&(this.legend.highlighted=!0,this.legend.vanchart.makeLegendHighlight(this.options.itemName)))},onMouseOut:function(t){var e=this,i=e.legend,n=e.options,r=n.visible?i.options.style.color:n.hiddenColor;this.graphic&&this.graphic.text&&this.graphic.text.style({fill:r})},onTap:function(){if(this.legend.options.click)return void r.getFormatterFunction(this.legend.options.click)();for(var t=this.options.bindName,e=this.legend.vanchart,i=e.series,a={},s=0,h=i.length;h>s;s++){var l=i[s];if(l.isSeriesAccumulated()){var u="name";l.points.map(function(e){e[u]==t&&(e.visible=!e.visible)})}else l.name===t&&(l.visible=!l.visible,l.state=l.visible?n.STATE_TO_SHOW:n.STATE_TO_DROP,l._getAxisTypes().forEach(function(t){var e=l[t];!e||e._isBaseAxis()||a[r.stamp(e)]||(a[r.stamp(e)]=!0,e.calculateDomainFromData(),e.componentType===o.X_AXIS_COMPONENT||e.componentType===o.Y_AXIS_COMPONENT?e.adjustDomain4Radius():e.fixScaleAndTickData())}))}this.options.visible=!this.options.visible,this.options.pairLegendOpt&&(this.options.pairLegendOpt.visible=this.options.visible,this.options.pairLegendOpt.renderItem.render(),this.options.pairLegendOpt.renderItem.onMouseOut()),e.reRenderWholePlot()},remove:function(){this.graphic&&this.graphic.remove(),this.graphic=null}});return h}),define("component/Legend",["require","./Base","../utils/BaseUtils","../Constants","./LegendIconFactory","./LegendItem","../dom/Evented","../utils/BezierEasing","../ComponentLibrary"],function(t){var e,i,n,r,a=t("./Base"),o=t("../utils/BaseUtils"),s=t("../Constants"),h=t("./LegendIconFactory"),l=t("./LegendItem"),u=t("../dom/Evented"),c=t("../utils/BezierEasing"),d=t("../ComponentLibrary"),f=function(){return null==e&&(e=o.paddingConvertWithScale("0.312rem")),e},p=function(){return null==i&&(i=o.paddingConvertWithScale("0.5rem")),i},g=12,m=function(){return null==n&&(n=o.paddingConvertWithScale("0.25rem")),n},v=function(){return null==r&&(r=o.paddingConvertWithScale("1rem")),r},_="rgb(67,67,72)",y="rgb(204,204,204)",x=a.extend({doLayout:function(){return this.invisible()?void this.remove():(this.items=this.items||[],this.yPanEnabled=!1,this.xPanEnabled=!1,this.hasPages=!1,this._updateLegendItems(),void this._layoutLegendItemBounds())},_updateLegendItems:function(){var t,e,i=this.vanchart.series,n={},r={},a=this,o=this.vanchart,h=[];for(t=0,e=i.length;e>t;t++){var u=i[t],c=u.type;if(c!=s.GAUGE_CHART)if(u.isSeriesAccumulated()){var d="name";u.points.map(function(t){if(!n[t[d]]){var e={color:o.getDefaultSeriesColor(t[d]),opacity:t.opacity,bindName:t[d],itemName:t[d],visible:t.visible};a._mergeCommonLegendAttr(u,e),n[t[d]]=!0,h.push(e)}})}else{if(!n[u.name]){var f={color:u.color,opacity:u.opacity,bindName:u.name,itemName:u.name,visible:u.visible};a._mergeCommonLegendAttr(u,f),n[u.name]=f,h.push(f)}if(u.options.trendLine&&!r[u.name]){var f={isTrendLine:!0,color:u.options.trendLine.color,opacity:u.opacity,bindName:u.name,itemName:u.options.trendLine.name,visible:u.visible};a._mergeCommonLegendAttr(u,f), - f.legendIconType=void 0,n[u.name].pairLegendOpt=f,f.pairLegendOpt=n[u.name],r[u.name]=f,h.push(f)}}}for(t=h.length,e=this.items.length;e>t;t++)this.items[t].remove(),this.items[t]=null;for(t=0,e=h.length;e>t;t++)this.items[t]?this.items[t].refresh(h[t]):this.items[t]=new l(a,h[t]);this.items.length=h.length},_mergeCommonLegendAttr:function(t,e){var i=this.options,n=i.hiddenColor,r=i.hoverColor||i.style.color;o.extend(e,{series:t,hiddenColor:n,hoverColor:r,legendIconType:this._getLegendType(t),lineIndex:0})},_layoutLegendItemBounds:function(){var t=this.options,e=t.position||s.RIGHT;if(this.items.length)if(e==s.TOP||e==s.BOTTOM){var i=this._layoutHorizontalLegendItemBounds(),n=i.height,r=this._maxHeight();this.yPanEnabled=t.maxHeight&&n>r,this.maxYPan=-i.height+20;var a=(this.yPanEnabled?r:n)+2*f();this._setComponentBounds(e,a);var o=this.bounds.x+f(),h=this.bounds.y+f(),l=this.bounds.height-2*f()+2*(this.options.borderWidth||0),u=this.bounds.width-2*f(),c=i.width-2*f();o+=(u-c)/2,this.bounds={x:o,y:h,width:c,height:l}}else{var p=0;if((e==s.RIGHT||e==s.RIGHT_TOP)&&!this.isFloat){var v=this.vanchart.getComponent(d.TOOLBAR_COMPONENT);v&&(p=37);var _=this.vanchart.getComponent(d.TITLE_COMPONENT);_&&_.bounds&&!_.isFloat&&(p-=_.bounds.height)}var i=this._layoutVerticalLegendItemBounds(),n=i.width,y=this._maxWidth(),l=this.vanchart.bounds.height-(this.isFloat?0:2*f())-p;if(this.hasPages=i.height-m()>l,this.hasPages){l-=g+f(),this.pageIndex=this.pageIndex||0,this.translateMap=[0];for(var x=0,b=0,T=this.items.length;T>b;b++){var A=this.items[b].legendY;A-x>l&&(x=A-m(),this.translateMap.push(-A))}this.pageCount=this.translateMap.length,n=Math.max(n,this._getPageButtonWidth(this.pageCount))}this.yPanEnabled=this.hasPages,this.xPanEnabled=t.maxWidth&&n>y,this.maxYPan=-i.height+20,this.maxXPan=y-n;var C=(this.xPanEnabled?y:n)+(this.isFloat?0:2*f());this._setComponentBounds(e,C);var o=this.bounds.x+(this.isFloat?0:f()),h=this.bounds.y+(this.isFloat?0:f()),u=this.bounds.width-(this.isFloat?0:2*f()),l=this.bounds.height-(this.isFloat?0:2*f())-p,L=Math.min(i.height,l);h=Math.max(p,h),this.isFloat||e==s.RIGHT_TOP||(h+=Math.round((l-L)/2)),this.bounds={x:o,y:h,width:u,height:L}}},_getPageButtonWidth:function(t){var e={fontFamily:this.options.style.fontFamily||"Verdana",fontSize:"14px"},i=t+"/"+t,n=(f(),o.getTextDimension(i,e,!1));return 2*g+n.width},_layoutVerticalLegendItemBounds:function(){for(var t=0,e=f(),i=this.options.borderWidth||0,n=0,r=this.items.length;r>n;n++){var a=this.items[n],s=a.options,l=o.getTextDimension(s.itemName,this.options.style,this.options.useHtml),u=h.getLegendIconSize(this.items[n].legendIconType);t=Math.max(l.width+p()+u.width,t),a.legendX=f()+i/2,a.legendY=e,e+=Math.max(l.height,u.height)+m()}return{width:2*f()+t,height:e+f()}},_layoutHorizontalLegendItemBounds:function(){for(var t=this.vanchart.bounds,e=t.width-4*f(),i=f(),n=f(),r=i,a=[],s=[],l=0,u=0,c=this.items.length;c>u;u++){var d=this.items[u],g=d.options,m=h.getLegendIconSize(g.legendIconType),_=o.getTextDimension(g.itemName,this.options.style,this.options.useHtml),y=Math.min(m.width+p()+_.width,e-1);e>i+y?(d.legendX=i,d.legendY=n):(a.push({items:s,usedWidth:i}),l=0,i=f(),n+=Math.max(_.height,m.height),d.legendX=i,d.legendY=n,s=[]),s.push(d),l=Math.max(l,_.height),i+=y+v(),r=Math.max(i,r)}return a.push({items:s,usedWidth:i}),a.forEach(function(t){var e=t.usedWidth,i=t.items,n=Math.max((r-e)/2,0);i.forEach(function(t){t.legendX+=n})}),n+=l,{width:Math.round(r)+f(),height:Math.round(n)+f()}},render:function(){if(!this.invisible()&&this.items.length){var t=this.bounds,e=this,i=e.vanchart,n=i.renderer;this.legendGroup||(this.legendGroup=this.createComponentGroup(),this.backgroundGroup=n.group().addTo(this.legendGroup),this.clipGroup=n.group().addTo(this.legendGroup),this.legendItemsGroup=n.group().addTo(this.clipGroup),i.registerInteractiveTarget(this,this.legendGroup)),this.legendGroup.attr("transform",o.makeTranslate(t)),i._renderRectangleBackground(this.backgroundGroup,this.options,o.makeBounds(0,0,t.width,t.height));for(var r=0,a=this.items.length;a>r;r++)this.items[r].render();var s={x:0,y:0,width:t.width,height:t.height};this.hasPages?(s.height-=g,this.pageButton=this.pageButton||new b(e),this.pageButton.refresh()):this.pageButton&&(this.pageButton.remove(),this.pageButton=null),this.verticalClip?n.updateClip(this.verticalClip,s):(this.verticalClip=n.createClip(s),n.clip(this.clipGroup,this.verticalClip))}},getEvents:function(){return{mouseout:this.mouseOut,panstart:this.onPanStart,panmove:this.onPanMove,panend:this.onPanEnd}},mouseOut:function(){this.highlighted&&this.vanchart.cancelLegendHighlight()},onWheel:function(t){var e=t.srcEvent;e.preventDefault(),this.getLegendPos(),this.moveLegend(-e.deltaX,-e.deltaY)},onPanStart:function(t){this.initPos=t.containerPoint,this.getLegendPos()},onPanMove:function(t){var e=t.containerPoint.x-this.initPos.x,i=t.containerPoint.y-this.initPos.y;this.moveLegend(e,i)},onPanEnd:function(){this.vanchart.handler.panTarget=null},getLegendPos:function(){var t=this.legendItemsGroup.trans||[0,0];this.initTranslateX=t[0],this.initTranslateY=t[1]},moveLegend:function(t,e){var i=0,n=0;if(this.xPanEnabled&&(i=t+this.initTranslateX,i=Math.max(this.maxXPan,Math.min(0,i))),this.yPanEnabled&&(n=e+this.initTranslateY,n=Math.max(this.maxYPan,Math.min(0,n))),this.hasPages&&this.pageButton){for(var r=this.translateMap.length-1,a=0,s=this.translateMap.length-1;s>a;a++){var h=this.translateMap[a],l=this.translateMap[a+1];h>=n&&n>l&&(r=a)}this.pageIndex!=r&&(this.pageIndex=r,this.pageButton.updatePage())}this.legendItemsGroup.attr("transform",o.makeTranslate([i,n])),this.legendItemsGroup.trans=[i,n]},remove:function(){this.legendGroup&&this.legendGroup.remove(),this.legendGroup=null,this.items&&(this.items.length=0)}}),b=u.extend({initialize:function(t){this.legend=t},refresh:function(){var t=this.legend,e=t.vanchart,i=e.renderer,n=t.bounds,r=t._getPageButtonWidth(t.pageCount),a=n.height,s=a-g,h=(n.width-r)/2;this.pageGroup||(this.pageGroup=i.group().addTo(t.legendGroup),e.registerInteractiveTarget(this,this.pageGroup),this.leftButton=i.path().style({cursor:"pointer"}).addTo(this.pageGroup),this.rightButton=i.path().style({cursor:"pointer"}).addTo(this.pageGroup),this.pageText=i.text().style({fontFamily:t.options.style.fontFamily||"Verdana",fontSize:"14px"}).addTo(this.pageGroup));var l=r-g,u=h+(r-l)/2,c=h+(r+l)/2,d=h+r/2;this.pageGroup.attr("transform",o.makeTranslate([0,s])),this.leftButton.attr("d",this._prePageButtonPath(u)),this.rightButton.attr("d",this._nextPageButtonPath(c)),this.pageText.attr({x:d,y:"-.14em",dy:".85em"}).attr("text-anchor","middle"),this.updatePage()},remove:function(){this.pageGroup&&(this.pageGroup.remove(),this.pageGroup=null)},updatePage:function(){var t=this.legend,e=t.pageIndex,i=t.pageCount;this.leftButton.style({fill:0>=e?y:_}),this.rightButton.style({fill:i-1>e?_:y});var n=e+1+"/"+i;this.pageText.textContent(n),this.pageText.vMiddle()},_prePageButtonPath:function(t){var e=12,i=0,n=t-e/2,r=e/2*Math.sqrt(3),a=t+e/2,o=r;return"M"+t+","+i+"L"+n+","+r+"L"+a+","+o+"Z"},_nextPageButtonPath:function(t){var e=12,i=0,n=t-e/2,r=i,a=t+e/2,o=i,s=t,h=e/2*Math.sqrt(3);return"M"+n+","+r+"L"+a+","+o+"L"+s+","+h+"Z"},onTap:function(t){var e=t.srcEvent,i=e.target||e.srcElement,n=this.legend;if(this.leftButton.node()==i){if(n.pageIndex<=0)return;n.pageIndex--}else if(this.rightButton.node()==i){if(n.pageIndex==n.pageCount-1)return;n.pageIndex++}n.legendItemsGroup.animate({duration:500,ease:c.css.swing,attr:{transform:"translate(0,"+n.translateMap[n.pageIndex]+")"}}),n.legendItemsGroup.trans=[0,n.translateMap[n.pageIndex]],this.updatePage()},getEvents:function(){return{tap:this.onTap}}});return d.register(d.LEGEND_COMPONENT,x),x}),define("component/Zoom",["require","./Base","../utils/BaseUtils","../Constants","../ComponentLibrary","../utils/Scale","../utils/PathGenerator","../ComponentLibrary"],function(t){var e,i=t("./Base"),n=t("../utils/BaseUtils"),r=t("../Constants"),a=t("../ComponentLibrary"),o=t("../utils/Scale"),s=t("../utils/PathGenerator"),h=30,l=10,u="none",c="left-to-right",d="right-to-left",f=function(){return null==e&&(e=n.paddingConvertWithScale("0.3125rem")),e},p=i.extend({_refresh:function(){this.rangeLeftTop=this.rangeRightBottom=null},doLayout:function(){if(this.byAxisType=this.vanchart.chartType()==r.BAR_CHART?"yAxis":"xAxis",this.byAxis=this.vanchart[this.byAxisType](),this.zoomToolEnabled()){var t=this.vanchart.getComponent(a.DATA_SHEET_COMPONENT),e=0,i=this.byAxis.getPosition();(t||i==r.TOP||i==r.RIGHT||this.byAxis.isOnZero())&&(e=f()),this._setComponentBounds(this.byAxis.isHorizontal()?r.BOTTOM:r.LEFT,h+e)}},fixBoundsByPlot:function(){if(this.zoomToolEnabled()){for(var t,e=this.vanchart.components[this.byAxisType],i=e.getAxisCount(),o=0;i>o;o++){var s=e.getAxis(o),h=s.getPosition();(h==r.BOTTOM||h==r.LEFT)&&(t=s)}t=t||this.byAxis,h=t.getPosition();var l=this.vanchart.bounds;if(t.isHorizontal()){var u,c=this.vanchart.getComponent(a.DATA_SHEET_COMPONENT);u=c?c.bounds.y+c.bounds.height+f():t.isOnZero()||h==r.TOP?l.y+l.height+f():t.bounds.y+t.bounds.height,this.bounds=n.makeBounds(l.x,u,l.width,this.bounds.height)}else{var d;d=t.isOnZero()||h==r.RIGHT?l.x-this.bounds.width:t.bounds.x-this.bounds.width,this.bounds=n.makeBounds(d,l.y,this.bounds.width,l.height)}}},initToolDomain:function(t){var e=this.options.zoomTool;e.from=n.hasDefined(e.from)&&""!==e.from?e.from:null,e.to=n.hasDefined(e.to)&&""!==e.to?e.to:null,t.type===a.DATE_AXIS_COMPONENT&&(e.from=n.date2int(n.object2date(e.from)),e.to=n.date2int(n.object2date(e.to)))},getZoomInitDomain:function(t){var e=this.byAxis;if(this.zoomToolEnabled()&&e._isBaseAxis()&&t==e){var i=this.options.zoomTool;return this.initToolDomain(e),[i.from,i.to]}},getZoomDomain:function(t){var e=this.byAxis,i=t.isCategory()?e._dataDomain:e._domain;if(this.zoomToolEnabled()&&e._isBaseAxis()&&t==e){var r=this.options.zoomTool;this.initToolDomain(e);var a=n.pick(this.rangeLeftTop,r.from,i[0]),o=n.pick(this.rangeRightBottom,r.to,i[i.length-1]);return this._getValidDomain(a,o,i,e.isCategory())}},getMinAndMaxPos:function(){var t=this.getZoomDomain(this.byAxis),e=this.axisScale,i=e(t[0]),n=e(t[t.length-1]);return[Math.min(i,n),Math.max(i,n)+(e.rangeBand?e.rangeBand():0)]},updateRangeLeftAndRight:function(t,e,i){var r=n.indexOf(e,this.rangeLeftTop),a=n.indexOf(e,this.rangeRightBottom),o=i.slice(Math.min(r,a),Math.max(r,a)+1);t.isAxisReversed()^t.isHorizontal()?(this.rangeLeftTop=o[0],this.rangeRightBottom=o[o.length-1]):(this.rangeLeftTop=o[o.length-1],this.rangeRightBottom=o[0])},_getValidDomain:function(t,e,i,r){var a;if(r){var o=i.length-1,s=0;return t=n.indexOf(i,t),e=n.indexOf(i,e),t=Math.min(Math.max(t,s),o),e=Math.min(Math.max(e,s),o),t>e&&(a=e,e=t,t=a),i.slice(t,e+1)}return t=parseFloat(t),e=parseFloat(e),t>e&&(a=e,e=t,t=a),[t,e]},zoomToolEnabled:function(){var t=this.options;return this.vanchart.series.length&&t&&t.zoomTool&&t.zoomTool.enabled&&n.isSupportSVG()},_getAxisScale:function(){var t=this.byAxis,e=t.scale.copy();if(t.type==a.CATEGORY_AXIS_COMPONENT)e.rangeBand?e.rangeBands(t._getPlotRange()):e.range(t._getPlotRange());else{var i=t._dataDomain,r=this.getZoomDomain(t),o=Math.min(i[0],r[0]),s=Math.max(i[1],r[1]);t.type==a.DATE_AXIS_COMPONENT&&(o=n.int2date(o),s=n.int2date(s)),e.domain([o,s])}return e},render:function(){if(this.remove(),!this.zoomBarGroup&&this.zoomToolEnabled()){this.axisScale=this._getAxisScale();var t=this,e=t.bounds,i=t.vanchart,r=(i.renderer,this.getMinAndMaxPos()),a=this.byAxis.isVertical(),o=r[0],s=r[1];this.zoomBarGroup||(this.zoomBarGroup=this.createComponentGroup().attr("transform",n.makeTranslate(e)).style("cursor",a?"ns-resize ":"ew-resize"),i.registerInteractiveTarget(this,this.zoomBarGroup)),this._createLines(),this.leftTopRect=this._createSideRect(a,o,!0),this.rightBottomRect=this._createSideRect(a,s,!1),this.centerRect=this._createCenterRect(a,o,s),this.leftTopButton=this._createButton(a,o,!0),this.rightBottomButton=this._createButton(a,s,!1);var h=this.leftTopButton.pos,u=this.rightBottomButton.pos;this.rangeLeftTop=this._getValueByPosition(h),this.rangeRightBottom=this._getValueByPosition(u+l)}},_createLines:function(){var t=this.axisScale,e=this.byAxisType,i=this.vanchart,r=i.renderer,l=(i.series,t.rangeBand?t.rangeBand()/2:0),u=i.cateMap,c=[],d=Number.MAX_VALUE,f=-Number.MAX_VALUE,p=this.byAxis.isHorizontal(),g=this.byAxis.type===a.DATE_AXIS_COMPONENT;for(var m in u){var v=u[m];if(v[0].series[e]){var _=0;v.forEach(function(t){_+=t.getTargetValue()})}v[0].isNull||c.push({x:t(g?n.object2date(m):m)+l,y:_}),d=Math.min(d,_),f=Math.max(f,_)}var y=p?[h,0]:[0,h],x=o.linear().domain([d,f]).range(y),b=s.line().interpolate("linear").x(function(t){return p?t.x:x(t.y)}).y(function(t){return p?x(t.y):t.x});c.sort(function(t,e){return t.x-e.x}),this._line=this._line||r.path().style({fill:"none",stroke:"black","stroke-width":1}),this._line.attr("d",b(c)).addTo(this.zoomBarGroup),this._innerClip(this._line)},_createSideRect:function(t,e,i){var n=this.vanchart.renderer,r="x",a="y",o="width",s="height",l=this.bounds.width;t&&(r="y",a="x",o="height",s="width",l=this.bounds.height);var u,c;return i?(u=0,c=e):(u=e,c=Math.abs(l-u)),n.rect().attr(r,u).attr(a,0).attr(o,c).attr(s,h).style({fill:"rgba(220,221,221,0.4)"}).addTo(this.zoomBarGroup)},_createCenterRect:function(t,e,i){var n=this.vanchart.renderer,r="x",a="y",o="width",s="height";return t&&(r="y",a="x",o="height",s="width"),n.rect().attr(r,e+l).attr(a,0).attr(o,i-e-2*l).attr(s,h).style({fill:"rgba(255,255,255,0)",stroke:"#29ABE2","stroke-width":1}).addTo(this.zoomBarGroup)},_createButton:function(t,e,i){e=i?e:e-l;var n,r=this.vanchart.renderer,a=r.group().attr("transform",this._getButtonTranslate(t,e)),o={fill:"#FFFFFF",stroke:"#7ADAF4","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round","stroke-miterlimit":10};n=i?t?"M30,4v6H0L0,4C0,1.791,1.791,0,4,0h22C28.209,0,30,1.791,30,4z":"M4,30h6V0L4,0C1.791,0,0,1.791,0,4v22C0,28.209,1.791,30,4,30z":t?"M30,6V0H0v6c0,2.209,1.791,4,4,4h22C28.209,10,30,8.209,30,6z":"M6,30H0V0h6c2.209,0,4,1.791,4,4v22C10,28.209,8.209,30,6,30z",r.path().attr("d",n).style({fill:"#29ABE2"}).addTo(a);var s="x1",h="y1",u="x2",c="y2";return t&&(s="y1",h="x1",u="y2",c="x2"),r.line().attr(s,3).attr(h,11).attr(u,3).attr(c,18).style(o).addTo(a),r.line().attr(s,7).attr(h,11).attr(u,7).attr(c,18).style(o).addTo(a),a.pos=e,a.addTo(this.zoomBarGroup),a},_findDraggingTarget:function(t){for(var e,i=t.srcEvent,n=i.target||i.srcElement,r=this.byAxis.isHorizontal()?t.containerPoint.x-this.bounds.x:t.containerPoint.y-this.bounds.y,a=this._resizeable();n;){var o=this.leftTopButton.pos-r,s=r-(this.rightBottomButton.pos+l);if(o>0&&10>o&&a&&(e=this.leftTopButton),s>0&&10>s&&a&&(e=this.rightBottomButton),e)break;if(n==this.leftTopButton.node()&&a?e=this.leftTopButton:n==this.rightBottomButton.node()&&a?e=this.rightBottomButton:(n==this.centerRect.node()||n==this.zoomBarGroup.node())&&(e=this.centerRect),e)break;n=n.parentNode}return e},_panStart:function(t,e){this.target=e||this._findDraggingTarget(t),this.target&&(this.downPos=this.byAxis.isHorizontal()?t.containerPoint.x:t.containerPoint.y,this.initPos=this.target.pos,this.initTranslate=0)},_panContainerMove:function(t){if(this.target){var e=this.byAxis.isHorizontal()?t.containerPoint.x:t.containerPoint.y,i=e=0&&this.rightBottomButton.pos+l+n<=i){var s=this.leftTopButton.pos+n;this.leftTopButton.pos=s,this.leftTopButton.attr("transform",this._getButtonTranslate(o,s)),this.leftTopRect.attr(a,s);var h=this.rightBottomButton.pos+n;this.rightBottomButton.pos=h,this.rightBottomButton.attr("transform",this._getButtonTranslate(o,h)),this.rightBottomRect.attr(r,h+l).attr(a,i-(h+l)),this.centerRect.attr(r,s+l)}return this.initTranslate>0?c:d},_getValueByPosition:function(t){var e=this.byAxis,i=this.axisScale;switch(e.type){case a.CATEGORY_AXIS_COMPONENT:for(var r=i.domain(),o=i.range(),s=0,h=o.length-1;h>s;s++){if(t>=o[s]&&t=o[s+1])return r[s+1]}return o[0]>o[o.length-1]?r[0]:r[r.length-1];case a.DATE_AXIS_COMPONENT:return n.date2int(this.axisScale.invert(t));default:return this.axisScale.invert(t)}},_getButtonTranslate:function(t,e){var i=t?[0,e]:[e,0];return"translate("+i+")"},_zoomRefresh:function(t){var e,i=this.leftTopButton.pos,r=this.rightBottomButton.pos+l,o=this._getValueByPosition(i),s=this._getValueByPosition(r),h=this.vanchart,f=this.byAxis,p=f._dataDomain,g=n.indexOf,m=h.getComponent(a.DATA_SHEET_COMPONENT);if(f.isCategory()){if(t==u)e=this._getValidDomain(o,s,p,!0);else{var v=g(p,this.rangeLeftTop)-g(p,this.rangeRightBottom);if(v=Math.abs(v)+1,t==c&&s!=this.rangeRightBottom)if(f.isAxisReversed()^f.isHorizontal()){var _=g(p,s),y=_-v+1;o=p[y],s=p[_],e=p.slice(y,_+1)}else{var y=g(p,s),_=y+v-1;o=p[_],s=p[y],e=p.slice(y,_+1)}else if(t==d&&o!=this.rangeLeftTop)if(f.isAxisReversed()^f.isHorizontal()){var y=g(p,o),_=y+v-1;o=p[y],s=p[_],e=p.slice(y,_+1)}else{var _=g(p,o),y=_-v+1;o=p[_],s=p[y],e=p.slice(y,_+1)}else o=this.rangeLeftTop,s=this.rangeRightBottom}(this.rangeLeftTop!=o||this.rangeRightBottom!=s)&&(this.rangeLeftTop=o,this.rangeRightBottom=s,f.zoomRefresh(e),f.fixScaleAndTickData(),f.render(),m&&m.zoomRefresh(),h.reRenderSeries())}else e=this._getValidDomain(o,s,p,!1),this.rangeLeftTop=o,this.rangeRightBottom=s,f.zoomRefresh(e),f.fixScaleAndTickData(),f.render(),h.reRenderSeries()},_panEnd:function(){this.target=null},_resizeable:function(){return this.options&&this.options.zoomTool&&this.options.zoomTool.resize},getEvents:function(){return{panstart:this._panStart,panmove:this._panMove,panend:this._panEnd}},remove:function(){this.zoomBarGroup&&this.zoomBarGroup.remove(),this.zoomBarGroup=null}});return t("../ComponentLibrary").register(a.ZOOM_COMPONENT,p),p}),define("component/ToolbarIcon",["require","./Base","../utils/BaseUtils","../Constants","../dom/Evented"],function(t){function e(){return{fill:"black","fill-opacity":.05}}function i(){return{fill:"black","fill-opacity":.1}}function n(){return{fill:"black","fill-opacity":0}}function r(){return{fill:"black","fill-opacity":.05}}var a=2,o=32,s=(t("./Base"),t("../utils/BaseUtils")),h=t("../Constants"),l=t("../dom/Evented"),u=l.extend({initialize:function(t,e,i,n){this.iconType=t,this.toolbar=e,this.visible=n,this.pos=i,this.currentPos={x:i.x,y:i.y}},render:function(){var t=this.toolbar,i=t.vanchart,r=i.renderer,s=this;this.iconG||(this.iconG=r.group().style({cursor:"pointer"}).addTo(t.toolbarGroup)),i.registerInteractiveTarget(this,this.iconG),this.iconG.attr("transform","translate("+s.pos.x+","+s.pos.y+")").style({display:this.visible?"":"none"}),this.iconG.rect=this.iconG.rect||r.rect().attr("width",o).attr("height",o).attr("rx",a).attr("ry",a).addTo(this.iconG),this.iconG.rect.style(t.hidden?n():e()),this.iconG.path=this.iconG.path||this._getIconPathGraphic(i,r,s)},_getIconPathGraphic:function(t,e,i){switch(this.iconType){case h.REFRESH_ICON:return e.path().attr("d",i.getRefreshIconPath()).style({fill:"#FF9933"}).addTo(this.iconG);case h.SORT:return t.orderType==h.ASCENDING?e.path().attr("d",i.getDecreaseIconPath()).style({fill:"#33CCFF"}).addTo(this.iconG):e.path().attr("d",i.getIncreaseIconPath()).style({fill:"#33CCFF"}).addTo(this.iconG);case h.EXPORT_ICON:return e.path().attr("d",i.getExportIconPath()).style({fill:"#6666CC"}).addTo(this.iconG);case h.FULL_SCREEN_ICON:return t.vancharts.fullScreenFather?e.path().attr("d",i.getMinIconPath()).style({fill:"#33CC66"}).addTo(this.iconG):e.path().attr("d",i.getMaxIconPath()).style({fill:"#33CC66"}).addTo(this.iconG);case h.MENU_ICON:return e.path().attr("d",i.getMenuIconPath()).style({"stroke-width":2,stroke:"#AAAAAA"}).addTo(this.iconG)}},refreshMove:function(t,e){var i=this.pos,n=this.currentPos,r=n.x-t,a=r+e;this.iconG.animate({ease:"circle-out",duration:220,attr:{transform:"translate("+r+","+i.y+")"}}).transition({ease:"circle-in",duration:220,attr:{transform:"translate("+a+","+i.y+")"}}),this.currentPos.x=a},refreshMoveWithoutAnimation:function(t,e){var i=this.currentPos.x-t+e;this.iconG.attr("transform","translate("+i+","+this.pos.y+")"),this.currentPos.x=i},showIcon:function(){this.visible=!0,arguments.length?this._iconAnimation(arguments[0],arguments[1]):this.iconG.style({display:""})},hideIcon:function(){this.visible=!1,arguments.length?this._iconAnimation(arguments[0],arguments[1]):(this.iconG.style({display:"none"}),this.iconG.attr("transform","translate("+this.pos.x+","+this.pos.y+")"),this.currentPos.x=this.pos.x)},_iconAnimation:function(t,i){var r=this.iconG,a=this.pos,o=this.visible;s.isSupportSVG()?setTimeout(function(){r.style({display:o?"":"none"});var i=4*t,s=a.x-i;r.animate([{ease:"circle-out",duration:100,attr:{transform:"translate("+s+","+a.y+")"}},{ease:"circle-in",duration:100,attr:{transform:"translate("+a.x+","+a.y+")"}}]),r.rect.style(o?n():e()).animate({ease:"linear",duration:200,style:o?e():n()})},i):(r.attr("transform","translate("+a.x+","+a.y+")").style({display:o?"":"none"}),r.rect.style(o?e():n())),this.currentPos.x=this.pos.x},onMouseOver:function(){this.iconG.rect.style(this.toolbar.hidden?r():i())},onMouseOut:function(){this.iconG.rect.style(this.toolbar.hidden?n():e())},onTap:function(){var t=this.toolbar,e=t.vanchart,i=(e.renderer,this),n=e.getDivParentDom();switch(i.iconType){case h.REFRESH_ICON:e.clearAllEffects(),e.refreshRestore(),i.hideIcon();break;case h.SORT:e.orderType==h.ASCENDING?(e.orderType=h.DESCENDING,i.iconG.path.attr({d:i.getIncreaseIconPath()})):(e.orderType=h.ASCENDING,i.iconG.path.attr({d:i.getDecreaseIconPath()})),t.refreshEnabled()&&t.refreshIcon.showIcon(),e.orderData();break;case h.EXPORT_ICON:var r=this.toolbar.options.toImage;r&&r.imageUrl&&s.toPng(r.imageUrl);break;case h.FULL_SCREEN_ICON:e.vancharts.fullScreenFather?e.vancharts.hideLightBox(n,e.vancharts.fullScreenFather):e.vancharts.showLightBox(e);break;case h.MENU_ICON:t.showOrHide()}},getEvents:function(){return{mouseover:this.onMouseOver,mouseout:this.onMouseOut,tap:this.onTap}},getMaxIconPath:function(){return"M24,8v6.5L21.5,12l-3,3L17,13.5l3-3L17.5,8H24z M15,18.5l-3,3l2.5,2.5H8v-6.5l2.5,2.5l3-3L15,18.5z"},getMinIconPath:function(){return"M15,17v6.5L12.5,21l-3,3L8,22.5l3-3L8.5,17H15z M24,9.5l-3,3l2.5,2.5H17V8.5l2.5,2.5l3-3L24,9.5z"},getIncreaseIconPath:function(){return"M8,20h16v2H8V20z M10,16h2v3h-2V16z M13,14h2v5h-2V14z M16,12h2v7h-2V12z M19,9h2v10h-2V9z"},getDecreaseIconPath:function(){return"M8,20h16v2H8V20z M10,9h2v10h-2V9z M13,12h2v7h-2V12z M16,15h2v4h-2V15z M19,16h2v3h-2V16z"},getExportIconPath:function(){return"M22,8H8v16h16V10L22,8z M16,10h2v4h-2V10z M22,22H10V10h1v5h9v-5h1.171L22,10.829V22z"},getRefreshIconPath:function(){return"M21.656,10.344C20.209,8.896,18.209,8,16,8c-3.43,0-6.354,2.158-7.492,5.19l1.873,0.703C11.234,11.619,13.428,10,16,10c1.657,0,3.156,0.672,4.243,1.757L18,14h6V8L21.656,10.344z M16,22c-1.657,0-3.156-0.671-4.243-1.757L14,18H8v6l2.344-2.344C11.791,23.104,13.791,24,16,24c3.43,0,6.354-2.158,7.492-5.19l-1.873-0.703C20.766,20.381,18.572,22,16,22z"},getMenuIconPath:function(){return"M8,10L24,10 M8,15L24,15 M8,20L24,20"}});return u}),define("component/ToolBar",["require","./Base","../utils/BaseUtils","../Constants","./ToolbarIcon","../ComponentLibrary"],function(t){var e=t("./Base"),i=t("../utils/BaseUtils"),n=t("../Constants"),r=t("./ToolbarIcon"),a=t("../ComponentLibrary"),o=32,s=1,h=5,l=[n.GANTT_CHART,n.TREEMAP_CHART,n.WORD_CLOUD_CHART,n.FUNNEL_CHART,n.STRUCTURE_CHART,n.SCATTER_CHART,n.BUBBLE_CHART,n.FORCE_BUBBLE_CHART,n.AREA_MAP,n.POINT_MAP,n.LINE_MAP,n.HEAT_MAP],u=e.extend({doLayout:function(){var t=this.options,e=t.hidden,i=this.sortEnable()?["sort","toImage","fullScreen"]:["toImage","fullScreen"],a=[n.REFRESH_ICON];i.forEach(function(e){t[e]&&t[e].enabled&&a.push(e)}),e&&a.push(n.MENU_ICON);var l=o+s,u=a.length*l+h;if(this.startX=this.vanchart.width-u,!this.toolbarGroup){this.toolbarIcons=[],this.hidden=e;for(var c=0,d=a.length;d>c;c++){var f={x:c*l,y:h},p=a[c],g=!e;p==n.MENU_ICON?this.menuIcon=new r(p,this,f,!0):p==n.REFRESH_ICON?this.refreshIcon=new r(p,this,f,!1):this.toolbarIcons.push(new r(p,this,f,g))}this.isFloat=!0}},sortEnable:function(){var t,e=!0,i=this.vanchart.options,n=i.series;return i.chartType&&(t=i.chartType),n&&n.forEach(function(i){if(i.type){if(t&&t!=i.type)return void(e=!1);t=i.type}}),e&&-1==l.indexOf(t)},render:function(){this.vanchart.renderer;return this.toolbarGroup?void this.toolbarGroup.attr("transform",i.makeTranslate([this.startX,0])):(this.toolbarGroup=this.createComponentGroup().attr("transform",i.makeTranslate([this.startX,0])),this.toolbarIcons.forEach(function(t){t.render()}),this.menuIcon&&this.menuIcon.render(),void(this.refreshIcon&&this.refreshIcon.render()))},showOrHide:function(){this.hidden?this.show():this.hide(),this.hidden=!this.hidden},hide:function(){for(var t=this.toolbarIcons,e=t.length,i=[],n=0;e>n;n++)i.push(100+80*n);for(var n=0;e>n;n++){var r=e-n;t[n].hideIcon(r,i[n])}var a=4*(e+1),o=4*(e+1)+33*e;this.refreshIcon.visible&&this.refreshIcon.refreshMove(a,o)},show:function(){for(var t=[0],e=this.toolbarIcons,i=e.length,n=0;i-1>n;n++)t.push(100+80*n);for(var n=0;i>n;n++){var r=i-n;e[n].showIcon(r,t[n])}var a=4*(i+1)+33*i,o=4*(i+1);this.refreshIcon.visible&&this.refreshIcon.refreshMove(a,o)},showRefreshIconWhenZoom:function(){if(!this.refreshIcon.visible&&this.refreshEnabled())if(this.menuIcon)if(this.hidden){var t=this.toolbarIcons.length,e=4*(t+1),i=4*(t+1)+33*t;this.refreshIcon.refreshMoveWithoutAnimation(e,i),this.refreshIcon.showIcon()}else this.refreshIcon.showIcon();else this.refreshIcon.showIcon()},refreshEnabled:function(){return!(this.options.refresh&&this.options.refresh.enabled===!1)},getToolBarInitWidth:function(){return this.options.enabled?this.options.hidden?o+h:this.toolbarIcons.length*(o+s)-s+h:0},remove:function(){this.toolbarGroup&&this.toolbarGroup.remove(),this.toolbarGroup=null}});return a.register(a.TOOLBAR_COMPONENT,u),u}),define("component/RangeLegend",["require","./Base","../utils/BaseUtils","../Constants","../utils/ColorUtils","../ComponentLibrary"],function(t){var e,i=t("./Base"),n=t("../utils/BaseUtils"),r=t("../Constants"),a=(t("../utils/ColorUtils"),t("../ComponentLibrary")),o=function(){return null==e&&(e=n.paddingConvertWithScale("0.625rem")),e},s=i.extend({doLayout:function(){if(this.invisible())return void this.remove();var t=this.options,e=t.position||r.RIGHT,i=o()*(this.isFloat?2:4);if(e==r.TOP||e==r.BOTTOM?this._layoutHorizontal(e,i):this._layoutVertical(e,i),!this.isFloat){var n=this.options.borderWidth+2*o();if(this.bounds.x+=n/2,this.bounds.y+=n/2,this.bounds.width-=n,this.bounds.height-=n,e==r.BOTTOM){var s=this.vanchart.getComponent(a.ZOOM_COMPONENT);s&&s.zoomToolEnabled()&&s.bounds&&(this.bounds.y+=s.bounds.height||0)}if(e==r.RIGHT_TOP){var h=this.vanchart.getComponent(a.TOOLBAR_COMPONENT);h&&(this.bounds.y=Math.max(37,this.bounds.y))}}},_layoutHorizontal:function(t,e){var i=this.calculateHorizontalDim(),n=i.height+e;n=this.options.maxHeight?Math.min(n,this._maxHeight()):n,this._setComponentBounds(t,n);var r=i.width+e;this.isFloat||(this.bounds.x+=Math.max((this.bounds.width-r)/2,0)),this.bounds.width=r},_layoutVertical:function(t,e){var i=this.calculateVerticalDim(),n=i.width+e;n=this.options.maxWidth?Math.min(n,this._maxWidth()):n,this._setComponentBounds(t,n);var a=i.height+e;this.isFloat||t==r.RIGHT_TOP||(this.bounds.y+=Math.max((this.bounds.height-a)/2,0)),this.bounds.height=a},render:function(){if(!this.invisible()){var t=this.bounds,e=this,i=e.vanchart,r=i.renderer;this.group||(this.backgroundGroup=r.group().addTo(this.getComponentParentGroup()),this.group=r.vgroup().add(this.getComponentParentGroup()),this.legendGroup=this.group.append(r.vgroup()));var a;a=this.useHtmlLabel()?this.legendGroup.divG:this.legendGroup.renderG,i.registerInteractiveTarget(this,a),this._innerClip(this.group),this.group.attr("transform",n.makeTranslate(t)),i._renderRectangleBackground(this.backgroundGroup,this.options,t),this.renderBody(this.legendGroup,t)}},getEvents:function(){return{mouseout:this.mouseOut}},mouseOut:function(){this.highlighted&&this.vanchart.cancelLegendHighlight()},remove:function(){this.group&&this.group.remove(),this.group=null}});return s}),define("component/IntervalRangeLegend",["require","../utils/BaseUtils","../Constants","../utils/ColorUtils","../dom/EventObject","./RangeLegend","../ComponentLibrary"],function(t){var e,i,n,r=t("../utils/BaseUtils"),a=t("../Constants"),o=t("../utils/ColorUtils"),s=t("../dom/EventObject"),h=t("./RangeLegend"),l=t("../ComponentLibrary"),u=function(){return null==e&&(e=r.paddingConvertWithScale("0.625rem")),e},c=15,d=function(){return null==i&&(i=r.paddingConvertWithScale("0.3125rem")),i},f=25,p=function(){return null==n&&(n=r.paddingConvertWithScale("0.125rem")),n},g=h.extend({type:l.INTERVAL_RANGE_LEGEND,initAttributesWithSeries:function(){var t=this.options,e=t.range||{};if(!r.isArray(e)){var i=e.splitNumber||5,n=e.color||this.vanchart.options.colors[0],a=this.vanchart.isHeatMap()?["rgb(0,0,255)","rgb(0,255,0)","rgb(255,255,0)","rgb(255,0,0)"]:o.createColorsWithHsb(n,i),h=this.vanchart.getChartMinMaxValue(),l=r.calculateAutoMinMaxAndGap(h[0],h[1],i),u=l[0],c=l[2];if(e=[],this.vanchart.isHeatMap())for(var d=[0,.25,.55,.85,1],f=r.accMul(c,i),p=1;5>p;p++)e.push({from:r.accAdd(u,r.accMul(f,d[p-1])),to:r.accAdd(u,r.accMul(f,d[p])),color:a[p-1]});else for(var p=0;i>p;p++)e.push({from:r.accAdd(u,r.accMul(c,i-p-1)),to:r.accAdd(u,r.accMul(c,i-p)),color:a[p]})}this.items=this.items||[];for(var g=e.length,m=this.items.length,v=g;m>v;v++)this.items[v].graphic&&this.items[v].graphic.remove(),this.items[v]=null;for(var _=t.formatter,y=0;g>y;y++){var x=this.items[y]||new s(this.getItemEvents());this.items[y]=x;var b=e[y];x.from=b.from,x.to=b.to,x.color=b.color,x.label=this._getIntervalLabelContent(b.from,b.to,_),x.visible=!0,x.hiddenColor=t.hiddenColor,x.hoverColor=t.hoverColor,x.points=[],x.legend=this}this.items.length=g;var T=this,A=this.vanchart.series;this.items.sort(function(t,e){var i=Math.min(t.from,t.to),n=Math.min(e.from,e.to);return T.isHorizontal()?i-n:n-i});for(var p=0,C=A.length;C>p;p++){var L=A[p],P=L.getTargetKey(),M=L.points;M.forEach(function(t){var e=t[P],i=T._getPointItem(e);i&&(i.points.push(t),t._rangeItem=i)})}},_getMin:function(){var t=this.isHorizontal()?0:this.items.length-1;return this.items[t].from},_getMax:function(){var t=this.isHorizontal()?this.items.length-1:0;return this.items[t].to},_getGradient:function(){for(var t={0:"white"},e=this._getMin(),i=this._getMax(),n=i-e,r=this.items.length-1;r>=0;r--){ - var a=this.items[r];t[(a.to-e)/n]=a.color}return t},_getIntervalLabelContent:function(t,e,i){return i?r.format({from:t,to:e},i):t+"-"+e},_getPointItem:function(t){for(var e=0,i=this.items.length;i>e;e++){var n=this.items[e],r=Math.min(n.from,n.to),a=Math.max(n.from,n.to);if(t>=r&&a>=t)return n}},calculateHorizontalDim:function(){var t=this.items.length,e=0,i=0;if(t>0){var n=r.getTextDimension(this.items[0].label,this.options.style,this.options.useHtml),a=r.getTextDimension(this.items[t-1].label,this.options.style,this.options.useHtml),o=Math.max(0,n.width-f,a.width-f);e=t*f+(t-1)*p()+o,i=c+2*d()+2*n.height}return{width:e,height:i}},calculateVerticalDim:function(){var t=this.items.length,e=0,i=0,n=this.options.style,a=this;return this.items.forEach(function(t){var o=r.getTextDimension(t.label,n,a.options.useHtml);e=Math.max(e,o.width),i=Math.max(0,o.height-f)}),{width:e+c+d(),height:t*f+(t-1)*p()+i}},getColorWithSize:function(t){var e=this._getPointItem(t);return e&&e.color},renderBody:function(t,e){this.isHorizontal()?this._renderHorizontalInterval(t,e):this._renderVerticalInterval(t,e)},_renderHorizontalInterval:function(t,e){var i=this.items,n=(e.width-i.length*f-(i.length-1)*p())/2;t.attr("transform",r.makeTranslate([n,u()])),this._absX=e.x+n,this._absY=e.y+u();var a=this.options.style,o=this.vanchart,s=o.renderer,h=this.useHtmlLabel(),l=0,g=this;i.forEach(function(e,i){e.graphic=e.graphic||t.append(s.vgroup().style({cursor:"pointer"}));var n=e.graphic;o.registerInteractiveTarget(e,h?n.divG:n.renderG);var u=e.label,m=r.getTextDimension(u,a,g.options.useHtml),v=m.height,_=v+d(),y=_+c+d();n.rect=n.rect||n.append(s.rect()),n.rect.style(g._getItemIconStyle(e)).attr("rx",2).attr("ry",2).attr("x",l).attr("y",_).attr("width",f).attr("height",c);var x=l+f/2-m.width/2,b=i%2===0?0:y;g._renderItemLabel(e,n,x,b,m,i),l+=f+p()})},_renderVerticalInterval:function(t,e){var i=this.items,n=this.vanchart,a=(e.height-i.length*f-(i.length-1)*p())/2;t.attr("transform",r.makeTranslate([u(),a])),this._absX=e.x+u(),this._absY=e.y+a;var o=this.options.style,s=this.vanchart.renderer,h=this.useHtmlLabel(),l=0,g=this;i.forEach(function(e,i){e.graphic=e.graphic||t.append(s.vgroup().style({cursor:"pointer"}));var a=e.graphic;n.registerInteractiveTarget(e,h?a.divG:a.renderG);var u=r.getTextDimension(e.label,o,h);a.rect=a.rect||a.append(s.rect()),a.rect.style(g._getItemIconStyle(e)).attr("rx",2).attr("ry",2).attr("x",0).attr("y",l).attr("width",c).attr("height",f);var m=Math.round(c+d()),v=Math.round(l+f/2-u.height/2);g._renderItemLabel(e,a,m,v,u,i),l+=f+p()})},_renderItemLabel:function(t,e,i,n,a,o){var s=this,h=s.vanchart,l=h.renderer,u=s.options,c=t.label,d=u.style,f=this.useHtmlLabel(),p=t.visible?d.color:t.hiddenColor;d=r.extend({},d),d.color=p,e.text=e.text||e.append(l.vtext(f)),e.text.textContent(c).attr("dy",".88em").attr("transform",r.makeTranslate({x:i,y:n})).style(d)},_getItemIconStyle:function(t){return{fill:t.visible?t.color:t.hiddenColor,"fill-opacity":1,stroke:"none"}},getItemEvents:function(){return{mouseover:this.onItemMouseOver,mousemove:this.onItemMouseMove,mouseout:this.onItemMouseOut,tap:this.onItemTap}},onItemMouseOver:function(t){var e=this,i=e.legend,n=e.graphic&&e.graphic.text;i.useHtmlLabel()?n.style("color",o.colorToHex(e.hoverColor)):n.style({fill:e.hoverColor}),this.legend.options.highlight&&(this.legend.highlighted=!0,this.legend.vanchart.makeLegendHighlight(e))},onItemMouseMove:function(t){},onItemMouseOut:function(t){var e=this,i=e.legend,n=i.options,r=e.graphic&&e.graphic.text,a=n.style.color,s=e.visible?a:e.hiddenColor;i.useHtmlLabel()?r.style("color",o.colorToHex(s)):r.style({fill:s})},onItemTap:function(t){var e=this,i=e.legend,n=i.options,r=i.vanchart,s=e.graphic&&e.graphic.text,h=e.graphic&&e.graphic.rect;e.visible=!e.visible;var l=n.style.color,u=e.visible?e.color:e.hiddenColor,c=e.visible?l:e.hiddenColor;if(h.style({fill:u}),i.useHtmlLabel()?s.style("color",o.colorToHex(c)):s.style({fill:c}),e.points&&e.points.length>0){var d="vanChartMap"==r.vanChartType;e.points.forEach(function(t){var i=t.series.type===a.LINE_MAP;if((!d||d&&t.points&&t.points[0]==t||i)&&(t.visible=e.visible,d&&!i))for(var n=t.points,r=1,o=n.length;o>r;r++)n[r].visible=t.visible}),r.filterRender()}}});return l.register(l.INTERVAL_RANGE_LEGEND,g),g}),define("component/GradientRangeLegend",["require","../utils/BaseUtils","../Constants","../utils/ColorUtils","./RangeLegend","../ComponentLibrary","../utils/Scale","../utils/Interpolator"],function(t){var e,i,n=t("../utils/BaseUtils"),r=t("../Constants"),a=t("../utils/ColorUtils"),o=t("./RangeLegend"),s=t("../ComponentLibrary"),h=t("../utils/Scale"),l=t("../utils/Interpolator"),u=function(){return null==e&&(e=n.paddingConvertWithScale("0.625rem")),e},c=15,d=100,f=15,p=10,g=function(){return null==i&&(i=n.paddingConvertWithScale("0.3125rem")),i},m="M7.236,10H13c1.105,0,2-0.895,2-2V2c0-1.105-0.895-2-2-2L2.618,0C1.875,0,1.391,0.782,1.724,1.447l3.724,7.447C5.786,9.572,6.479,10,7.236,10z",v="M7.236,0L13,0c1.105,0,2,0.895,2,2v6c0,1.105-0.895,2-2,2H2.618c-0.743,0-1.227-0.782-0.894-1.447l3.724-7.447C5.786,0.428,6.479,0,7.236,0z",_="M0,7.236V13c0,1.105,0.895,2,2,2h6c1.105,0,2-0.895,2-2V2.618c0-0.743-0.782-1.227-1.447-0.894L1.106,5.447C0.428,5.786,0,6.479,0,7.236z",y="M10,7.236V13c0,1.105-0.895,2-2,2H2c-1.105,0-2-0.895-2-2L0,2.618c0-0.743,0.782-1.227,1.447-0.894l7.447,3.724C9.572,5.786,10,6.479,10,7.236z",x=o.extend({type:s.GradientRangeLegend,initAttributesWithSeries:function(){var t=this.options,e=t.range||{};this.valueAndColors=e.color||this._getDefaultValueAndColors();var i=e.min,r=e.max;if(n.hasNotDefined(i)&&n.hasNotDefined(r)){var a=this.vanchart.getChartMinMaxValue(),o=n.calculateAutoMinMaxAndGap(a[0],a[1],Math.max(2,this.valueAndColors.length-1));i=o[0],r=o[1]}this.min=n.pick(e.min,i),this.max=n.pick(e.max,r),this.minPos=0,this.maxPos=d,this.valueAndColors.sort(function(t,e){return t[0]-e[0]});for(var s=[],u=[],c=0,f=this.valueAndColors.length;f>c;c++)s[c]=this.valueAndColors[c][0],u[c]=this.valueAndColors[c][1];this.valueScale=h.linear().domain([this.min,this.max]).range([0,1]),this.colorScale=h.linear().domain(s).range(u).interpolate(l.interpolate).interpolate(l.interpolate)},_getMin:function(){return this.min},_getMax:function(){return this.max},_getGradient:function(){var t={};return this.valueAndColors.forEach(function(e){t[e[0]]=e[1]}),t},_getDefaultValueAndColors:function(){var t=a.createColorsWithHsb(this.vanchart.options.colors[0],3);return[[0,t[2]],[.5,t[1]],[1,t[0]]]},calculateHorizontalDim:function(){var t=n.getTextDimension(this._getGradientMinLabelContent(),this.options.style,this.options.useHtml),e=n.getTextDimension(this._getGradientMaxLabelContent(),this.options.style,this.options.useHtml),i=Math.max(t.width,e.width,p),r=d+2*i,a=c+f+g()+t.height;return{width:r,height:a}},calculateVerticalDim:function(){var t=n.getTextDimension(this._getGradientMinLabelContent(),this.options.style,this.options.useHtml),e=n.getTextDimension(this._getGradientMaxLabelContent(),this.options.style,this.options.useHtml),i=c+f+g()+Math.max(t.width,e.width),r=2*Math.max(t.height/2,p/2),a=d+2*r;return{width:i,height:a}},getColorWithSize:function(t){return t>=this.min&&t<=this.max?this.colorScale(this.valueScale(t)):null},_getGradientMinLabelContent:function(){return this._getGradientLabelWithFormatter(this.min)},_getGradientMaxLabelContent:function(){return this._getGradientLabelWithFormatter(this.max)},_getGradientLabelWithFormatter:function(t){var e=this.options.formatter;return e?n.format(t,e):t},_getGradientLabelContent:function(t){return this._getGradientLabelWithFormatter(this._gradientScale(t))},_gradientScale:function(t){var e=n.accDiv(n.accAdd(this.max,-this.min),d);return t=n.accMul(e,this.isHorizontal()?t:d-t),t=n.accAdd(t,this.min)},_getBarBackgroundStyle:function(){return{fill:"#eaeaea","stroke-width":0}},_getGradientFillColor:function(t,e){var i={x1:"0%",y1:t?"0%":"100%",x2:t?"100%":"0%",y2:"0%"},r=[];return this.valueAndColors.forEach(function(t){var e=t[0],i=t[1];r.push({offset:e,"stop-color":i})}),this._bar.colorGradient?e.updateColorGradient(this._bar.colorGradient,i,r):this._bar.colorGradient=e.colorGradient(i,r),"url(#"+n.stamp(this._bar.colorGradient)+")"},_updateHorizontalGradientClipRect:function(){var t=this,e=t.vanchart,i=e.renderer,n={x:this.minPos,y:0,width:this.maxPos-this.minPos,height:c};this._bar.clipG?i.updateClip(this._bar.clipG,n):(this._bar.clipG=i.createClip(n),i.clip(this._bar,this._bar.clipG))},_updateVerticalGradientClipRect:function(){var t=this,e=t.vanchart,i=e.renderer,n={x:0,y:this.minPos,width:c,height:this.maxPos-this.minPos};this._bar.clipG?i.updateClip(this._bar.clipG,n):(this._bar.clipG=i.createClip(n),i.clip(this._bar,this._bar.clipG))},renderBody:function(t,e){var i=this,r=i.vanchart,a=r.renderer,o=(r.bounds,i.isHorizontal()),s=o?(e.width-d)/2:u(),h=o?u():(e.height-d)/2;t.attr("transform",n.makeTranslate([s,h])),this._absX=e.x+s,this._absY=e.y+h,this._barBackground=this._barBackground||t.append(a.rect()),this._bar=this._bar||t.append(a.rect()),this._minButton=this._minButton||t.append(a.path().style({cursor:"pointer"})),this._maxButton=this._maxButton||t.append(a.path().style({cursor:"pointer"})),this._minLabel=this._minLabel||t.append(a.vtext(this.useHtmlLabel())),this._maxLabel=this._maxLabel||t.append(a.vtext(this.useHtmlLabel()));var l={rx:2,ry:2,x:0,y:0,width:o?d:c,height:o?c:d};this._barBackground.style(this._getBarBackgroundStyle()).attr(l),this._bar.attr(l).style({fill:this._getGradientFillColor(o,a),"stroke-width":0}),n.isSupportSVG()||a._updateGradientFill(this._bar,this._bar.colorGradient),this._minButton.attr("d",o?_:m),this._maxButton.attr("d",o?y:v),this._minLabel.attr("dy",".85em").style(this.options.style),this._maxLabel.attr("dy",".85em").style(this.options.style),this._updateMax(),this._updateMin()},_updateMin:function(){this.isHorizontal()?this._updateHorizontalMinBar():this._updateVerticalMinBar()},_updateMax:function(){this.isHorizontal()?this._updateHorizontalMaxBar():this._updateVerticalMaxBar()},_updateVerticalMinBar:function(){this._minButton.attr("transform","translate("+c+","+this.maxPos+")").style({fill:this.colorScale((d-this.maxPos)/d)});var t=this._getGradientLabelContent(this.maxPos),e=n.getTextDimension(t,this.options.style,!0),i=Math.round(c+f+g()),r=Math.round(this.maxPos+p/2-e.height/2);this._minLabel.textContent(t).attr("transform",n.makeTranslate({x:i,y:r})),this._updateVerticalGradientClipRect()},_updateHorizontalMinBar:function(){var t=this.minPos-p;this._minButton.attr("transform","translate("+t+","+c+")").style({fill:this.colorScale(this.minPos/d)});var e=this._getGradientLabelContent(this.minPos),i=n.getTextDimension(e,this.options.style,!0),r=Math.round(this.minPos-i.width),a=Math.round(c+f+g());this._minLabel.textContent(e).attr("transform",n.makeTranslate({x:r,y:a})),this._updateHorizontalGradientClipRect()},_updateVerticalMaxBar:function(){var t=this.minPos-p;this._maxButton.attr("transform","translate("+c+","+t+")").style({fill:this.colorScale((d-this.minPos)/d)});var e=this._getGradientLabelContent(this.minPos),i=n.getTextDimension(e,this.options.style,!0),r=Math.round(c+f+g()),a=Math.round(this.minPos-p/2-i.height/2);this._maxLabel.textContent(e).attr("transform",n.makeTranslate({x:r,y:a})),this._updateVerticalGradientClipRect()},_updateHorizontalMaxBar:function(){this._maxButton.attr("transform","translate("+this.maxPos+","+c+")").style({fill:this.colorScale(this.maxPos/d)});var t=this._getGradientLabelContent(this.maxPos),e=Math.round(this.maxPos),i=Math.round(c+f+g());this._maxLabel.textContent(t).attr("transform",n.makeTranslate({x:e,y:i})),this._updateHorizontalGradientClipRect()},getEvents:function(){return{panstart:this._panStart,panmove:this._panMove,panend:this._panEnd}},_panStart:function(t){var e=this.options.position;this.currentX=t.containerPoint.x,this.currentY=t.containerPoint.y,this.eventTarget=e==r.TOP||e==r.BOTTOM?this._findHorizontalTarget():this._findVerticalTarget()},_findHorizontalTarget:function(){var t=(this.maxPos-this.minPos)/5;return this.currentXthis._absX+this.maxPos-t?this._maxButton:void 0},_findVerticalTarget:function(){var t=(this.maxPos-this.minPos)/5;return this.currentYthis._absY+this.maxPos-t?this._minButton:void 0},_panMove:function(t){this.eventTarget==this._minButton?this._minButtonMove(this.currentX,this.currentY,t.containerPoint.x,t.containerPoint.y):this.eventTarget==this._maxButton&&this._maxButtonMove(this.currentX,this.currentY,t.containerPoint.x,t.containerPoint.y)},_minButtonMove:function(t,e,i,n){var r=0;if(this.isHorizontal()){var a=this.minPos;this.minPos+=Math.round(i-t),this.minPos=Math.max(this.minPos,0),this.minPos=Math.min(this.minPos,this.maxPos),r=this.minPos-a}else{var a=this.maxPos;this.maxPos+=Math.round(n-e),this.maxPos=Math.min(this.maxPos,d),this.maxPos=Math.max(this.maxPos,this.minPos),r=this.maxPos-a}Math.abs(r)>=1&&(this.currentX=i,this.currentY=n,this._updateMin(),this.refreshPoints())},_maxButtonMove:function(t,e,i,n){var r=0;if(this.isHorizontal()){var a=this.maxPos;this.maxPos+=Math.round(i-t),this.maxPos=Math.min(this.maxPos,d),this.maxPos=Math.max(this.maxPos,this.minPos),r=this.maxPos-a}else{var a=this.minPos;this.minPos+=Math.round(n-e),this.minPos=Math.max(this.minPos,0),this.minPos=Math.min(this.minPos,this.maxPos),r=this.minPos-a}Math.abs(r)>=1&&(this.currentX=i,this.currentY=n,this._updateMax(),this.refreshPoints())},_panEnd:function(t){this.eventTarget=null},refreshPoints:function(){for(var t,e=this._gradientScale(this.minPos),i=this._gradientScale(this.maxPos),n=this.vanchart,a=n.series,o=!1,s="vanChartMap"==n.vanChartType,h=0,l=a.length;l>h;h++){var u=a[h];u.points.forEach(function(n){var a=n.series.type===r.LINE_MAP;if(!s||s&&n.points&&n.points[0]==n||a){var h=n.visible,l=n.getTargetValue();if(n.visible=l>=e&&i>=l||l>=i&&e>=l,o=o||h!=n.visible,s&&!a){t=n.points;for(var u=1,c=t.length;c>u;u++)t[u].visible=n.visible}}})}o&&n.filterRender()}});return s.register(s.GradientRangeLegend,x),x}),define("component/Polar",["require","../Constants","../utils/BaseUtils","./Base","../ComponentLibrary"],function(t){var e=(t("../Constants"),t("../utils/BaseUtils")),i=t("./Base"),n=(t("../ComponentLibrary"),i.extend({_refresh:function(){this.series=[]},_isBaseAxis:function(){return!0},doLayout:function(){var t=this.options,i=t.radius,n=t.center;if(!n||0===n.length){var r=this.vanchart.bounds;n=[r.width/2+r.x,r.height/2+r.y]}this.setCenter(n),e.hasDefined(i)?this.setRadius(i):this.radius=null;var a=this.vanchart.options.plotOptions,o=a.radar&&a.radar.shape||a.shape;this.shape=o||this.shape},setRadius:function(t){t&&(this.radius=this._getPercentValue(t,Math.min(this.vanchart.width,this.vanchart.height)/2))},setCenter:function(t){t&&(this.center=[],this.center[0]=this._getPercentValue(t[0],this.vanchart.width),this.center[1]=this._getPercentValue(t[1],this.vanchart.height))},render:function(){var t=this.vanchart.renderer,e=this.radiusAxis,i={d:e._getRadiusGridPath(e.scale.domain()[1])};this.clip?t.updateClip(this.clip,i):this.clip=t.createClip(i,"path"),this.radiusAxis.render(),this.angleAxis.render()}}));return n}),define("component/AngleAxis",["require","./Base","./CategoryAxis","../utils/BaseUtils","../Constants","../ComponentLibrary","../utils/Scale","../utils/PathGenerator"],function(t){var e,i=(t("./Base"),t("./CategoryAxis")),n=t("../utils/BaseUtils"),r=(t("../Constants"),t("../ComponentLibrary"),t("../utils/Scale")),a=t("../utils/PathGenerator"),o=function(){return null==e&&(e=n.paddingConvertWithScale("0.625rem")),e},s="radar-top",h="radar-bottom",l="radar-left",u="radar-right",c=i.extend({_refresh:function(t){this.series=[],this.piece=null,this.initScale(),this.refreshPolar(t)},refreshPolar:function(t){this.polar=this.vanchart.polar(t.axisIndex),this.polar.angleAxis=this},doLayout:function(){this.calculateDomainFromData(),this.scale.domain(this._dataDomain).rangePoints([0,this._dataDomain.length-1]),this.piece=2*Math.PI/Math.max(this._dataDomain.length,1),this._updateOriginTickData(),this._updatePolarBounds(),this._calculateTickData()},fixScaleAndTickData:function(){this.scale.domain(this._dataDomain).rangePoints([0,this._dataDomain.length-1]),this._updateOriginTickData(),this._calculateTickData()},_calculateTickData:function(){var t,e=this.polar.radius;this.isBreakLabels&&(t=this._getTestBoundsAndRadius().testBounds),this.tickData.map(function(i){this._getCateLabelBounds(e,i,t)},this)},_getTestBoundsAndRadius:function(){var t=this.vanchart.bounds,e=this.polar.center,i=[e[1]-t.y,t.x+t.width-e[0],t.y+t.height-e[1],e[0]-t.x],n=Math.min.apply(null,i);n-=o();var r={x:-i[3],y:-i[0],width:t.width,height:t.height};return{testBounds:r,radius:n}},_updatePolarBounds:function(){if(!this.polar.radius){var t=this._getTestBoundsAndRadius(),e=t.radius,i=t.testBounds;this.options.showLabel&&(this._testRadius(e,i)||(e=this._findNiceRadius(i),this._testRadius(e,i))),this.polar.setRadius(e)}},getIndexByPosition:function(t){return this._getIndexByPolarCoordinate(t)},_getIndexByPolarCoordinate:function(t){var e=this.polar.center,i=this.polar.radius,r=this.isAxisReversed(),a=t[0]-e[0],o=e[1]-t[1];if(a*a+o*o>i*i)return-1;var s,h=n.getArcByPoint(a,o),l=this.getCategories();if(l.length>1){var u=2*Math.PI/l.length;s=r?l.length-1-h/u:h/u}else s=0;return s=Math.round(s),s%=l.length},getAngleGridLineData:function(){var t=[],e=this.polar.angleAxis,i=e.scale.domain(),r=this;return i.forEach(function(i){var a=e.scale(i)*e.piece,o=r.polar.radius;t.push(n.getArcPoint(o,a))}),t=t.length?t:[n.getArcPoint(this.polar.radius,0)]},getCateAngleGridLineData:function(){var t=this.getAngleGridLineData(),e=this.polar.angleAxis.scale.domain();return t.map(function(t,i){return{name:e[i],pos:t}})},_testRadius:function(t,e){for(var i=0,r=this.tickData.length;r>i;i++){var a=this.tickData[i],o=this._getCateLabelBounds(t,a);if(!n.containsRect(e,o))return!1}return!0},_getCateLabelBounds:function(t,e,i){var r,a=e.tickValue,c=e.tickRectDim,d=this.scale.domain(),f=d.indexOf(a),p=n.getArcPoint(t+o(),f*this.piece),g=this.options,m=this._getPolarPosition(a),v=n.extend({width:"","white-space":"","text-align":""},g.labelStyle);switch(m){case s:r={style:v,x:-c.width/2,y:-t-.65*c.height-o()};break;case u:if(r={style:v,x:p[0],y:p[1]-c.height/2},i&&this.isBreakLabels&&r.x+c.width>i.x+i.width){var _=i.x+i.width-p[0],y=n.extend({width:_+"px","white-space":"normal","text-align":"left"},g.labelStyle);c=n.getTextWrapDimension(e.tickContent,y),r={style:y,x:p[0],y:p[1]-c.height/2}}break;case h:r={style:v,x:-c.width/2,y:t+o()};break;case l:if(r={style:v,x:p[0]-c.width,y:p[1]-c.height/2},i&&this.isBreakLabels&&r.x0&&n>i?u:i==n?h:i>n?l:void 0},_findNiceRadius:function(t){var e=[-t.y,t.width+t.x,t.height+t.y,-t.x],i=Math.min.apply(null,e),n=i,r=this.scale.domain(),a=this;return this.tickData.forEach(function(t){if(t.tickContent){var i,o=t.tickValue,c=t.tickDim,d=r.indexOf(o),f=a._getPolarPosition(o);switch(f){case s:i=e[0]-c.height;break;case u:i=(e[1]-c.width)/Math.abs(Math.sin(d*a.piece));break;case h:i=e[2]-c.height;break;case l:i=(e[3]-c.width)/Math.abs(Math.sin(d*a.piece))}n=Math.min(n,i)}}),2*i/3>n&&(n=2*i/3,this.options.labelRotation||this.options.useHtml||(this.isBreakLabels=!0)),n-o()},getPointsInCategory:function(t){var e=this.polar.center,i=this.polar.radius,a=t.x-e[0],o=e[1]-t.y;if(a*a+o*o>i*i)return null;var s=n.getArcByPoint(a,o),h=this.scale.domain(),l=this.scale.rangeExtent(),u=r.quantize().domain(l).range(h),c=h.length,d=Math.round(s/(2*Math.PI)*c)%c,f=u(d);return this.vanchart.getValidPointsPara(f)},render:function(){var t=this.vanchart,e=t.renderer;this.axisGroup||(this.axisGroup=e.vgroup().add(t.backGroup)),this.axisGroup.attr("transform",n.makeTranslate(this.polar.center)),this._drawAxisLine(this.axisGroup),this._drawGridLine(this.axisGroup),this._drawTickLabel(this.axisGroup)},_drawAxisLine:function(t){var e=this.vanchart.renderer,i=this.polar.radiusAxis,n=this,r=n.options.lineWidth,a=n.options.lineColor,o=i.scale.domain()[1];this.axisLine||(this.axisLine=t.append(e.path())),this.axisLine.attr({d:i._getRadiusGridPath(o)}).style({fill:"none",stroke:a,"stroke-width":r})},_drawGridLine:function(t){var e=this.vanchart.renderer,i=this.polar.radiusAxis.options,n=i.lineWidth,r=i.lineColor;this.gridLinesGroup||(this.gridLinesGroup=t.append(e.group()),this.gridLines=[]);var a=this.gridLinesGroup,o=this.getAngleGridLineData(),s=this._bindData(this.gridLines,o);s.exit.map(function(t){t.remove()});var h=s.enter.map(function(t){return a.append(e.line()).datum(t)});this.gridLines=h.concat(s.update).map(function(t){var e=t.datum();return t.style({stroke:r,"stroke-width":n}).attr({x1:0,y1:0,x2:e[0],y2:e[1]})})},_drawTickLabel:function(t){this._drawSvgTickLabel(t)},_drawSvgTickLabel:function(t){var e=this.vanchart.renderer,i=this,n=i.options,r=this.isBreakLabels,a=n.useHtml||r,o=i.tickData;this.tickLabelsGroup||(this.tickLabelsGroup=t.append(e.vgroup()),this.tickLabels=[]),a&&this.tickLabels.length&&"div"!==this.tickLabels[0].type&&(this.tickLabels.map(function(t){t.remove()}),this.tickLabels=[]);var s=this.tickLabelsGroup,h=this._bindData(this.tickLabels,o,function(t){return t.tickValue});if(h.exit.map(function(t){t.remove()}),n.showLabel){var l=h.enter.map(function(t){return s.append(e.vtext(a).datum(t))});this.tickLabels=l.concat(h.update).filter(function(t){return t.datum().tickPos}).map(function(t){var e=t.datum(),i=e.tickPos.x,n=e.tickPos.y,r="div"===t.type?"px":"",a={transform:"translate("+i+r+" "+n+r+")",dy:"0.85em"};return t.textContent(e.tickContent).style(e.tickPos.style).attr(a),t.vRotate(e.labelRotation),t})}},drawHighlightBackground:function(t){var e=t[0].category,i=this.scale,r=this.series[0]&&this.series[0].options.columnType||!1,o=this.vanchart.renderer,s=i.domain(),h=this.polar.radius,l=i(e)/s.length*2*Math.PI;if(r){var u=1/s.length*2*Math.PI*.5,c=l-u,d=l+u,f=a.arc().innerRadius(0).outerRadius(h).startAngle(c).endAngle(d);this.highlightBand||(this.highlightBand=this.axisGroup.append(o.path().style({fill:"rgba(98,179,240,0.2)"}))),this.highlightBand.attr("d",f())}else{var p=n.getArcPoint(h,l);this.highlightLine||(this.highlightLine=this.axisGroup.append(o.line({stroke:"rgb(140,140,140)","stroke-width":"1"}))),this.highlightLine.attr("x2",p[0]).attr("y2",p[1])}},remove:function(){this.axisGroup&&this.axisGroup.remove(),this.axisGroup=null}});return c}),define("component/RadiusAxis",["require","./Base","./ValueAxis","../utils/BaseUtils","../Constants","../ComponentLibrary","../utils/PathGenerator","../utils/Interpolator","../utils/Scale"],function(t){var e,i=(t("./Base"),t("./ValueAxis")),n=t("../utils/BaseUtils"),r=t("../Constants"),a=t("../ComponentLibrary"),o=t("../utils/PathGenerator"),s=t("../utils/Interpolator"),h=t("../utils/Scale"),l=function(){return null==e&&(e=n.paddingConvertWithScale("0.125rem")),e},u=i.extend({_refresh:function(t){this.series=[],this.initScale(),this.refreshPolar(t)},refreshPolar:function(t){this.polar=this.vanchart.polar(t.axisIndex),this.polar.radiusAxis=this},doLayout:function(){var t=this.series;this.indicator=t.length&&t[0].options.indicator&&t[0].options.indicator.enabled,this.calculateDomainFromData(),this.scale.domain(this._domain).range([0,this.polar.radius]),this._initCateScale(this._domain,[0,this.polar.radius]),this._updateOriginTickData()},_initCateScale:function(t,e){var i=h.linear().domain(t).range(e);this._cateScale=i},_calculateCateDomainData:function(){var t,e=this,i=e.series,r=(i.vanchart,i.length&&i[0].options),o=r.indicator,s=this.type==a.VALUE_AXIS_COMPONENT&&!this._isBaseAxis(),h=Number.MAX_VALUE,l=-h,u={};this._cateDataDomain=[],o.data&&o.data.length&&(t=o.data.map(function(t){return{name:t.name,domain:[t.min,t.max]}}));for(var c=!1,d=0,f=i.length;f>d&&!c;d++)c=i[d].visible;i.forEach(function(t){if(t.visible||!c){var i=!(n.hasNotDefined(t.stack)||e._isBaseAxis());t.points.forEach(function(t){var e=t.category,n=t.value;!t.isNull&&t.visible&&(i?(u[e]=u[e]||[0,0],n>=0?u[e][1]+=n:u[e][0]+=n):(u[e]=u[e]||[h,l],u[e][0]=Math.min(u[e][0],n),u[e][1]=Math.max(u[e][1],n)))})}});for(key in u)this._cateDataDomain.push({useIndicator:!1,name:key,domain:u[key]});var p=function(t){s&&(t[0]>0?t[0]=0:t[1]<0&&(t[1]=0))};t&&t.forEach(function(t){var i=t.name,n=t.domain[0],r=t.domain[1];e._cateDataDomain.forEach(function(t){if(i===t.name){if(null==n&&null==r)return;if(null!=n&&null!=r&&n>=r)return;var e=t.domain[0],a=t.domain[1],o=n||(s&&e>0?0:e),h=r||(s&&0>a?0:a),l=!1,u=!1;n&&(l=!0),r&&(u=!0),l&&!u?h=o>=h?o+100:h:u&&!l&&(o=o>h?h-100:o),t.useIndicator=!0,t.domain=[o,h]}})}),this._cateDataDomain.forEach(function(t){t.useIndicator||p(t.domain)}),this._calculateCateNiceDomain(),this._updateCategoryTickData()},_calculateCateNiceDomain:function(){var t=this,e=t.series;e.vanchart;this._cateTickStart=[],this._cateStep=[],this._cateDomain=[];var i=!1,n=this._getDefaultTickCount();if(this._cateDataDomain.forEach(function(e){var r,a,o,s=e.name,h=e.domain,l=e.useIndicator;e.useIndicator?(i=!0,o=h[0],a=[h[0],h[1]],r=parseFloat((h[1]-h[0])/n)):(r=t._linearTickInterval(h[0],h[1]),a=t._linearNiceDomain(h[0],h[1],r),o=a[0]),t._cateTickStart.push(o),t._cateDomain.push({useIndicator:l,name:s,domain:a}),t._cateStep.push(r)}),!i){var r=this._getCateTickValues().map(function(t){return t.labels.length});n=Math.max.apply(Math,r)}this._cateDomain.forEach(function(e,i){var r=e.domain[0],a=e.domain[1],o=e.useIndicator;o||(_step=Math.ceil((a-r)/n),e.domain[1]=r+_step*n,t._cateStep[i]=_step)})},_updateCategoryTickData:function(){var t=this,e=this._getCateTickValues();this.cateTickData=[];for(var i=0,n=e.length;n>i;i++){for(var r=e[i].name,a=e[i].labels,o=[],s=0,h=a.length;h>s;s++)o.push(t._labelInfoFormatter(a[s]));t.cateTickData.push({name:r,tickData:o})}},_labelInfoFormatter:function(t){var e=this,i=this.options,r=i.formatter,o=i.useHtml,s=i.labelStyle||{},h=n.extend({writingMode:"tb-rl","writing-mode":"tb-rl","-webkit-writing-mode":"vertical-rl"},s),l=e._getTickContent(t,r);e.type===a.CATEGORY_AXIS_COMPONENT&&(l=l.trim());var u,c,d=s,f=e.labelRotation;return 90===Math.abs(f)&&n.hasChn(l)&&(f=360,d=h),u=n.getTextDimension(l,d,o),c=n.getTextDimRotated(u,f),o&&(c.width=isNaN(parseFloat(i.labelWidth))?c.width:parseFloat(i.labelWidth),c.height=isNaN(parseFloat(i.labelHeight))?c.height:parseFloat(i.labelHeight)),{tickValue:t,tickContent:l,tickDim:c,tickRectDim:u,labelRotation:f}},_getCateTickValues:function(){if(!this._cateDataDomain)return[];var t=[],e=this;return this._cateDomain.forEach(function(i,r){for(var a=[],o=e._cateTickStart[r],s=e._cateStep[r],h=i.domain[1];h>=o;o=n.accAdd(o,s))a.push(o);t.push({name:i.name,labels:a})}),t},fixScaleAndTickData:function(){this.scale.domain(this._domain).range([0,this.polar.radius]),this._updateOriginTickData()},getRadiusPlotBands:function(){var t=this._getPlotBands(),e=[],i=this;return t.forEach(function(t){e.push({path:i._getRadiusPlotBandsPath(t.from,t.to),color:t.color})}),e},_getRadiusPlotBandsPath:function(t,e){var i=this.polar.shape;if(i===r.POLYGON_RADAR)return this._getRadiusGridPath(Math.min(t,e))+this._getRadiusGridPath(Math.max(t,e),!0);var n=o.arc().startAngle(0).endAngle(2*Math.PI);return n.innerRadius(this.scale(Math.min(t,e))).outerRadius(this.scale(Math.max(t,e)))()},getPlotLines:function(){var t=this.options.plotLines||[],e=this,i=[];return t.forEach(function(t){var n,a,o;t.label&&t.label.text&&t.label.style&&(n=t.label.text,a=t.label.style,o=t.label.align),i.push({color:t.color,value:t.value,width:t.width,dataArray:r.DASH_TYPE[t.dashStyle],text:n,baseY:-e.scale(t.value),textAnchor:o==r.LEFT?"end":"start",style:a})}),i},_getRadiusGridPath:function(t,e){var i=this._getRadiusGridData(t,e);return this._getRadiusGridPathByData(i)},_getRadiusGridData:function(t,e,i){var a=i||this.scale,o=this.polar.angleAxis,s=this.polar.shape;if(s===r.POLYGON_RADAR){var h=[],l=o.scale,u=l.domain();return u.forEach(function(e){var i=l(e)*o.piece,r=a(t);h.push(n.getArcPoint(r,i))}),e&&h.reverse(),h}return a(t)},_getRadiusGridPathByData:function(t){if(n.isArray(t)){var e="";if(t.length){for(var i=0,r=t.length;r>i;i++){var a=i?"L":"M";e+=a+n.dealFloatPrecision(t[i][0])+","+n.dealFloatPrecision(t[i][1])}e+="Z"}return e}var s=o.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0);return s.outerRadius(t)()},render:function(){var t=this.vanchart,e=t.renderer;this.axisGroup||(this.axisGroup=e.vgroup().add(t.backGroup),e.clip(this.axisGroup.renderG,this.polar.clip)),this.axisGroup.attr("transform",n.makeTranslate(this.polar.center)),this._drawPlotBands(this.axisGroup),this.indicator?this._drawCateGridLine(this.axisGroup):this._drawGridLine(this.axisGroup),this._drawPlotLines(this.axisGroup),this._drawTickLabel(this.axisGroup)},_drawGridLine:function(t){var e=this.vanchart.renderer,i=this,n=i.lastScale||i.scale,r=i.options,a=i.getTickData(),o=r.gridLineColor,h=r.gridLineWidth;this.gridLinesGroup||(this.gridLinesGroup=t.append(e.group()),this.gridLines=[]);var l=this.gridLinesGroup,u=this._bindData(this.gridLines,a);u.exit.map(function(t){var e=t.datum(),r=i._getRadiusGridData(e.tickValue,!1,n),a=i._getRadiusGridData(e.tickValue);t.animate({attrTween:{d:function(){var t=s(r,a);return function(e){return i._getRadiusGridPathByData(t(e))}}}}).remove()});var c=u.enter.map(function(t){return l.append(e.path()).datum(t)});this.gridLines=c.concat(u.update).map(function(t){var e=t.datum(),r=i._getRadiusGridData(e.tickValue);t.style({fill:"none",stroke:o,"stroke-width":h,opacity:1});var a=i._getRadiusGridData(e.tickValue,!1,n);return t.animate({attrTween:{d:function(){var t=s(a,r);return function(e){return i._getRadiusGridPathByData(t(e))}}}}),t})},_drawCateGridLine:function(t){var e=this.vanchart.renderer,i=this,n=i.lastScale||i._cateScale,r=i.options,a=i.cateTickData[0].tickData,o=r.gridLineColor,h=r.gridLineWidth,l=i._cateDomain[0].domain;this.gridLinesGroup||(this.gridLinesGroup=t.append(e.group()),this.gridLines=[]);var u=this.gridLinesGroup,c=this._bindData(this.gridLines,a);c.exit.map(function(t){var e=t.datum(),r=i._getRadiusGridData(e.tickValue,!1,n),a=i._getRadiusGridData(e.tickValue,!1,n);t.animate({attrTween:{d:function(){var t=s(r,a);return function(e){return i._getRadiusGridPathByData(t(e))}}}}).remove()});var d=c.enter.map(function(t){return u.append(e.path()).datum(t)});this.gridLines=d.concat(c.update).map(function(t){var e=t.datum();n.domain(l);var r=i._getRadiusGridData(e.tickValue,!1,n);t.style({fill:"none",stroke:o,"stroke-width":h,opacity:1});var a=i._getRadiusGridData(e.tickValue,!1,n);return t.animate({attrTween:{d:function(){var t=s(a,r);return function(e){return i._getRadiusGridPathByData(t(e))}}}}),t})},_drawPlotLines:function(t){var e=this.vanchart.renderer,i=this.getPlotLines();this.plotLinesGroup||(this.plotLinesGroup=t.append(e.vgroup()),this.plotLines=[]);var n=this.plotLinesGroup,r=this._bindData(this.plotLines,i);r.exit.map(function(t){t.text&&t.text.remove(),t.remove()});var a=r.enter.map(function(t){var i=n.append(e.path().datum(t));return t.text&&(i.text=n.append(e.vtext())),i});this.plotLines=a.concat(r.update).map(function(t){var e=t.datum(),i=this._getRadiusGridPath(e.value);return t.style({fill:"none",stroke:e.color,"stroke-width":e.width,"stroke-dasharray":e.dataArray}).animate({attr:{d:i}}),t.text&&t.text.textContent(e.text).style(e.style).attr({y:e.baseY}),t},this)},_drawPlotBands:function(t){var e=this.vanchart.renderer,i=this.getRadiusPlotBands();this.plotBandsGroup||(this.plotBandsGroup=t.append(e.group()),this.plotBands=[]);var n=this.plotBandsGroup,r=this._bindData(this.plotBands,i); - r.exit.map(function(t){t.remove()});var a=r.enter.map(function(t){return n.append(e.path()).datum(t)});this.plotBands=a.concat(r.update).map(function(t){var e=t.datum();return t.style("fill",e.color).animate({attr:{d:e.path}}),t},this)},_drawTickLabel:function(t){this.indicator?this._drawCateSvgTickLabel(t):this._drawSvgTickLabel(t)},_drawSvgTickLabel:function(t){var e=this.vanchart.renderer,i=this,n=i.scale,r=i.lastScale||i.scale,a=i.options,o=i.getTickData().slice(0,-1),s=a.labelStyle,h=a.useHtml;this.tickLabelsGroup||(this.tickLabelsGroup=t.append(e.vgroup()),this.tickLabels=[]);var u=this.tickLabelsGroup,c=this._bindData(this.tickLabels,o,function(t){return t.tickValue});if(c.exit.map(function(t){t.remove()}),a.showLabel){var d=c.enter.map(function(t){return u.append(e.vtext(h).datum(t))});this.tickLabels=d.concat(c.update).map(function(t){var e=t.datum();t.textContent(e.tickContent).style(s);var i=-(e.tickRectDim.width+e.tickDim.width)/2-l(),a=-n(e.tickValue)-(e.tickRectDim.height+e.tickDim.height)/2,o={transform:"translate("+i+" "+a+")",dy:"0.85em"};if(h)t.attr(o),t.vRotate(e.labelRotation);else{var u=e.labelRotation%360?t.vRotate(e.labelRotation).rotateStr:"";o.transform+=u;var c=-(e.tickRectDim.width+e.tickDim.width)/2-l(),d=-r(e.tickValue)-(e.tickRectDim.height+e.tickDim.height)/2,f={transform:"translate("+c+" "+d+")",dy:"0.85em"};f.transform+=u,t.attr(f).animate({attr:o})}return t})}},_drawCateSvgTickLabel:function(t){var e=this.vanchart.renderer,i=this,n=i.lastScale||i._cateScale,r=i.options,a=(i.getTickData().slice(0,-1),r.labelStyle),o=r.useHtml;this.cateTickLabelsGroup||(this.cateTickLabelsGroup=t.append(e.vgroup()),this.cateTickLabels=[],this._cateDataDomain.forEach(function(){i.cateTickLabels.push([])}));var s=this.cateTickLabelsGroup,h=function(t,e){var i=t>=0?"RIGHT":"LEFT",n=e>=0?"BOTTOM":"TOP";return i+"_"+n},u=function(t,e,i,n,r,a,o){var s=l(),h=(n+a)/2,u=(r+o)/2;switch(t){case"LEFT_TOP":_x=e+s,_y=i+s;break;case"RIGHT_TOP":_x=e-h-s,_y=i+s;break;case"RIGHT_BOTTOM":_x=e+-h-s,_y=i-u-s;break;case"LEFT_BOTTOM":_x=e+s,_y=i-u-s}return{x:_x,y:_y}},c=this.series[0].angleAxis.getCateAngleGridLineData(),d=(this.cateTickData.map(function(t){return t.tickData.length}),n.domain()),f=n.range();this.cateTickData.forEach(function(t,l){var d,f=t.name,p=i._bindData(i.cateTickLabels[l],t.tickData,function(t){return t.tickValue});c.forEach(function(t){t.name==f&&(d=t.pos)}),p.exit.map(function(t){t.remove()});var g=d[0],m=d[1],v=h(g,m);if(r.showLabel){var _=p.enter.map(function(t){return s.append(e.vtext(o).datum(t))});i.cateTickLabels[l]=_.concat(p.update).map(function(t,e,r){var s=t.datum();t.textContent(s.tickContent).style(a),n.domain(i._cateDomain[l].domain),n.range([0,g]);var h=n(s.tickValue);n.range([0,m]);var c=n(s.tickValue),d=u(v,h,c,s.tickRectDim.width,s.tickRectDim.height,s.tickDim.width,s.tickDim.height),f=d.x,p=d.y,_={transform:"translate("+f+" "+p+")",dy:"0.85em"};if(o)t.attr(_),t.vRotate(s.labelRotation);else{var y=s.labelRotation%360?t.vRotate(s.labelRotation).rotateStr:"";_.transform+=y;var x=f,b=p,T={transform:"translate("+x+" "+b+")",dy:"0.85em"};T.transform+=y,t.attr(T).animate({attr:_})}return t})}}),n.range(f).domain(d)}});return u}),define("component/PolarAxis",["require","./Base","../utils/BaseUtils","../Constants","./Axis","./Polar","./AngleAxis","./RadiusAxis","../ComponentLibrary"],function(t){var e=(t("./Base"),t("../utils/BaseUtils")),i=(t("../Constants"),t("./Axis")),n=t("./Polar"),r=t("./AngleAxis"),a=t("./RadiusAxis"),o=t("../ComponentLibrary"),s=i.extend({_refresh:function(){this._axisList=this._axisList||[];var t=this.options;t=e.isArray(t)?t:[t];for(var i=t.length,s=i;s=0;s--)if(t[s].axisIndex=s,this._axisList[s]&&this._axisList[s].type!=t[s].type&&(this._axisList[s].remove(),this._axisList[s]=null),this._axisList[s])this._axisList[s].refresh(t[s]);else{var h;if(this.componentType===o.POLAR_COMPONENT)h=n;else{var l=t[s].type||o.VALUE_AXIS_COMPONENT;l==o.VALUE_AXIS_COMPONENT?h=a:l==o.CATEGORY_AXIS_COMPONENT&&(h=r)}this._axisList[s]=new h(t[s],this.componentType,this.vanchart)}},doLayout:function(){for(var t=this._axisList.length,e=t-1;e>=0;e--)this._axisList[e].doLayout()},render:function(){this._axisList.map(function(t){t.componentType===o.POLAR_COMPONENT&&t.render()})}});return o.register(o.RADIUS_AXIS_COMPONENT,s),o.register(o.ANGLE_AXIS_COMPONENT,s),o.register(o.POLAR_COMPONENT,s),s}),define("component/Title",["require","./Base","../utils/BaseUtils","../Constants","../ComponentLibrary"],function(t){var e,i=t("./Base"),n=t("../utils/BaseUtils"),r=t("../Constants"),a=t("../ComponentLibrary"),o=function(){return null==e&&(e=n.paddingConvertWithScale("0.3125rem")),e},s=i.extend({doLayout:function(){var t=this.options;if(t.text){var e,i=this.vanchart.bounds,s=i.width,h=i.height;if(this.isFloat)s-=this._floatX-i.x,h-=this._floatY-i.y;else{var l=this.vanchart.components[a.TOOLBAR_COMPONENT];this.initBarWidth=l&&l.getToolBarInitWidth()||0,s-=this.initBarWidth,"center"===t.align&&(s-=this.initBarWidth)}if(s-=2*o(),h-=2*o(),e=n.getTextDimension(t.text,t.style,t.useHtml),e.width>s){var u=n.clone(t.style);u.width=Math.max(s,0)+"px",e=n.getTextWrapDimension(t.text,u,t.useHtml)}else e.width+=.5;if(e.height=Math.min(this._maxHeight(),h,e.height),this.isFloat)this.bounds={x:this._floatX,y:this._floatY,width:e.width+2*o(),height:e.height+2*o()};else{var c=e.height+2*o();this._setComponentBounds(r.TOP,c)}if(this.isFloat)this.textBounds={x:o(),y:o(),width:e.width,height:e.height};else{var d;switch(t.align){case"right":d=s-e.width;break;case"center":d=this.bounds.width/2-e.width/2;break;case"left":default:d=this.bounds.x+o()}this.textBounds={x:d,y:o(),width:e.width,height:e.height}}if(t.useHtml)this.labels=[],this.labels.push({text:t.text,dim:e,style:t.style});else{var f=n.splitText(t.text,t.style,this.textBounds.width);this.labels=f.map(function(e){return{text:e,dim:n.getTextDimension(e,t.style,t.useHtml),style:t.style}})}}},render:function(){if(!this.textBounds||this.textBounds.width<0||this.textBounds.height<0)return void this.remove();var t=this.vanchart,e=t.renderer;this.titleGroup||(this.titleGroup=e.vgroup(),this.titleGroup.renderG.addTo(this.isFloat?t.frontGroup:t.backGroup),this.titleGroup.divG.add(),this.titleGroup.divG.style("pointer-events","auto")),this.titleGroup.attr("transform",n.makeTranslate([this.bounds.x,this.bounds.y])),this._innerClip(this.titleGroup),this.drawBackground(this.titleGroup.renderG),this.drawTitle(this.titleGroup)},drawBackground:function(t){var e=this.options,i=this.bounds;e.backgroundColor&&this.vanchart._renderRectangleBackground(t,e,{x:0,y:0,width:i.width,height:i.height})},drawTitle:function(t){this.text&&(this.text.remove(),this.text=null);var e=this.vanchart.renderer,i=this.options,a=this.textBounds,o=i.useHtml,s=i.align,h=e.vtext(o).attr({transform:n.makeTranslate([a.x,a.y]),width:a.width+"px","text-align":s,"white-space":"normal"});this.text=h;var l=o?{}:n.isMS?{dy:"1em"}:{"dominant-baseline":"central",dy:a.height/this.labels.length/2},u=0;this.labels.map(function(t){var i,n=t.dim;switch(s){case r.LEFT:i=0;break;case r.RIGHT:i=a.width-n.width;break;case r.CENTER:default:i=(a.width-n.width)/2}h.append(e.vtspan(o).attr({y:u,x:0,dx:i}).attr(l).textContent(t.text).style(t.style)),u+=n.height}),t.append(h)},remove:function(){this.titleGroup&&this.titleGroup.remove(),this._clip&&this._clip.remove(),this.titleGroup=this._clip=null}});return a.register(a.TITLE_COMPONENT,s),s}),define("utils/GeoUtils",["require","./Bounds"],function(t){function e(t,e){t&&l.hasOwnProperty(t.type)&&l[t.type](t,e)}function i(t,e){for(var i,n=-1,r=t.length;++nn;n++){var o=i[n].properties.center;o&&(o[0]*=e,o[1]*=e)}for(var s=r(t),n=0,a=s.length;a>n;n++)s[n][0]*=e,s[n][1]*=e}function o(t){var e=new s(r(t));return[[e.min.x,e.min.y],[e.max.x,e.max.y]]}var s=t("./Bounds"),h={Feature:function(t,i){e(t.geometry,i)},FeatureCollection:function(t,i){for(var n=t.features,r=-1,a=n.length;++rr;r++)e=i[r].style.zIndex,i[r]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!r.ielt9){n.setOpacity(this._container,this.options.opacity);var t=+new Date,e=!1,a=!1;for(var o in this._tiles){var s=this._tiles[o];if(s.current&&s.loaded){var h=Math.min(1,(t-s.loaded)/200);n.setOpacity(s.el,h),1>h?e=!0:(s.active&&(a=!0),s.active=!0)}}a&&!this._noPrune&&this._pruneTiles(),e&&(i.cancelAnimFrame(this._fadeFrame),this._fadeFrame=i.requestAnimFrame(this._updateOpacity,this))}},_initContainer:function(){this._container||(this._container=n.create("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var r in this._levels)this._levels[r].el.children.length||r===t?this._levels[r].el.style.zIndex=e-Math.abs(t-r):(n.remove(this._levels[r].el),this._removeTilesAtZoom(r),delete this._levels[r]);var a=this._levels[t],o=this._map;return a||(a=this._levels[t]={},a.el=n.create("div","leaflet-tile-container leaflet-zoom-animated",this._container),a.el.style.zIndex=e,a.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),a.zoom=t,this._setZoomTransform(a,o.getCenter(),o.getZoom()),i.falseFn(a.el.offsetWidth)),this._level=a,a}},_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||in?this._retainParent(r,o,s,n):!1)},_retainChildren:function(t,e,i,n){for(var r=2*t;2*t+2>r;r++)for(var o=2*e;2*e+2>o;o++){var s=new a(r,o);s.z=i+1;var h=this._tileCoordsToKey(s),l=this._tiles[h];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n>i+1&&this._retainChildren(r,o,i+1,n))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_setView:function(t,e,i,n){var r=Math.round(e);(void 0!==this.options.maxZoom&&r>this.options.maxZoom||void 0!==this.options.minZoom&&r1)return void this._setView(t,i);for(var f=r.min.y;f<=r.max.y;f++)for(var p=r.min.x;p<=r.max.x;p++){var g=new a(p,f);if(g.z=this._tileZoom,this._isValidTile(g)){var m=this._tiles[this._tileCoordsToKey(g)];m?m.current=!0:h.push(g)}}if(h.sort(function(t,e){return t.distanceTo(s)-e.distanceTo(s)}),0!==h.length){this._loading||(this._loading=!0,this.fire("loading"));var v=document.createDocumentFragment();for(p=0;pi.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return s.create(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToBounds:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),r=n.add(i),a=e.unproject(n,t.z),o=e.unproject(r,t.z);return this.options.noWrap||(a=e.wrapLatLng(a),o=e.wrapLatLng(o)),new s(a,o)},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new a(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(n.remove(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){n.addClass(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=i.falseFn,t.onmousemove=i.falseFn,r.ielt9&&this.options.opacity<1&&n.setOpacity(t,this.options.opacity),r.android&&!r.android23&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var r=this._getTilePos(t),a=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),i.bind(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&i.requestAnimFrame(i.bind(this._tileReady,this,t,null,o)),n.setPosition(o,r),this._tiles[a]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,a){if(this._map){e&&this.fire("tileerror",{error:e,tile:a,coords:t});var o=this._tileCoordsToKey(t);a=this._tiles[o],a&&(a.loaded=+new Date,this._map._fadeAnimated?(n.setOpacity(a.el,0),i.cancelAnimFrame(this._fadeFrame),this._fadeFrame=i.requestAnimFrame(this._updateOpacity,this)):(a.active=!0,this._pruneTiles()),e||(n.addClass(a.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:a.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),r.ielt9||!this._map._fadeAnimated?i.requestAnimFrame(this._pruneTiles,this):setTimeout(i.bind(this._pruneTiles,this),250)))}},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new a(this._wrapX?i.wrapNum(t.x,this._wrapX):t.x,this._wrapY?i.wrapNum(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new o(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});return h}),define("chart/map/layer/TileLayer",["require","./GridLayer","../../../utils/BaseUtils","../../../dom/DomUtils","../CRS","../../../dom/Browser"],function(t){var e=t("./GridLayer"),i=t("../../../utils/BaseUtils"),n=t("../../../dom/DomUtils"),r=t("../CRS"),a=t("../../../dom/Browser"),o="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",s=e.extend({options:{minZoom:0,maxZoom:18,maxNativeZoom:null,minNativeZoom:null,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,e=i.setOptions(this,e),e.detectRetina&&a.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split(""))},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Hammer.on(n,"load",i.bind(this._tileOnLoad,this,e,n)),Hammer.on(n,"error",i.bind(this._tileOnError,this,e,n)),this.options.crossOrigin&&(n.crossOrigin=""),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:a.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return i.template(this._url,i.extend(e,this.options))},_tileOnLoad:function(t,e){a.ielt9?setTimeout(i.bind(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&(e.src=n),t(i,e)},getTileSize:function(){var t=this._map,i=e.prototype.getTileSize.call(this),n=this._tileZoom+this.options.zoomOffset,r=this.options.minNativeZoom,a=this.options.maxNativeZoom;return null!==r&&r>n?i.divideBy(t.getZoomScale(r,n)).round():null!==a&&n>a?i.divideBy(t.getZoomScale(a,n)).round():i},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset,r=this.options.minNativeZoom,a=this.options.maxNativeZoom;return i&&(t=e-t),t+=n,null!==r&&r>t?r:null!==a&&t>a?a:t},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=i.falseFn,e.onerror=i.falseFn,e.complete||(e.src=o,n.remove(e)))}});return s.WMS=s.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var n=i.extend({},this.defaultWmsParams);for(var r in e)r in this.options||(n[r]=e[r]);e=i.setOptions(this,e),n.width=n.height=e.tileSize*(e.detectRetina&&a.retina?2:1),this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,s.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToBounds(t),n=this._crs.project(e.getNorthWest()),a=this._crs.project(e.getSouthEast()),o=(this._wmsVersion>=1.3&&this._crs===r.EPSG4326?[a.y,n.x,n.y,a.x]:[n.x,a.y,a.x,n.y]).join(","),h=s.prototype.getTileUrl.call(this,t);return h+i.getParamString(this.wmsParams,h,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+o},setParams:function(t,e){return i.extend(this.wmsParams,t),e||this.redraw(),this}}),s}),define("chart/map/layer/Control",["require","../../../utils/Class","../../../utils/BaseUtils","../../../dom/DomUtils"],function(t){var e=t("../../../utils/Class"),i=t("../../../utils/BaseUtils"),n=t("../../../dom/DomUtils"),r=e.extend({options:{position:"bottomleft"},initialize:function(t){i.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),r=t._controlCorners[i];return n.addClass(e,"leaflet-control"),-1!==i.indexOf("bottom")?r.insertBefore(e,r.firstChild):r.appendChild(e),this},remove:function(){return this._map?(n.remove(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}});return r.Attribution=r.extend({options:{position:"bottomright",prefix:""},initialize:function(t){i.setOptions(this,t),this._attributions={}},onAdd:function(t){return t.attributionControl=this,this._container=n.create("div","leaflet-control-attribution"),this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}}}),r.Zoom=r.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=n.create("div",e+" leaflet-bar"),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i.style.position="absolute",i.style.left=r._topLeft.x+"px",i.style.top=r._topLeft.y+"px",i.style["z-index"]=800,i.style["pointer-events"]="auto",i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,r,a){var o=n.create("a",i,r);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),Hammer.on(o,"mousedown dblclick",n.stopPropagation).on(o,"click",n.stop).on(o,"click",a.bind(this)).on(o,"click",this._refocusOnMap.bind(this)),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";n.removeClass(this._zoomInButton,e),n.removeClass(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&n.addClass(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&n.addClass(this._zoomInButton,e)}}),r}),define("chart/map/layer/FeatureGroup",["require","./../../../vector/shape/LayerGroup","../LatLngBounds"],function(t){var e=t("./../../../vector/shape/LayerGroup"),i=t("../LatLngBounds"),n=e.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),e.prototype.addLayer.call(this,t),this)},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),e.prototype.removeLayer.call(this,t),this):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new i;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}});return n}),define("utils/LineUtils",["require","./Point2D"],function(t){var e=t("./Point2D");return{simplify:function(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=this._reducePoints(t,i),t=this._simplifyDP(t,i)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0))},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,e){var i=t.length,n=typeof Uint8Array!=void 0+""?Uint8Array:Array,r=new n(i);r[0]=r[i-1]=1,this._simplifyDPStep(t,r,e,0,i-1);var a,o=[];for(a=0;i>a;a++)r[a]&&o.push(t[a]);return o},_simplifyDPStep:function(t,e,i,n,r){var a,o,s,h=0;for(o=n+1;r-1>=o;o++)s=this._sqClosestPointOnSegment(t[o],t[n],t[r],!0),s>h&&(a=o,h=s);h>i&&(e[a]=1,this._simplifyDPStep(t,e,i,n,a),this._simplifyDPStep(t,e,i,a,r))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,r=0,a=t.length;a>n;n++)this._sqDist(t[n],t[r])>e&&(i.push(t[n]),r=n);return a-1>r&&i.push(t[a-1]),i},clipSegment:function(t,e,i,n,r){var a,o,s,h=n?this._lastCode:this._getBitCode(t,i),l=this._getBitCode(e,i);for(this._lastCode=l;;){if(!(h|l))return[t,e];if(h&l)return!1;a=h||l,o=this._getEdgeIntersection(t,e,a,i,r),s=this._getBitCode(o,i),a===h?(t=o,h=s):(e=o,l=s)}},_getEdgeIntersection:function(t,i,n,r,a){var o,s,h=i.x-t.x,l=i.y-t.y,u=r.min,c=r.max;return 8&n?(o=t.x+h*(c.y-t.y)/l,s=c.y):4&n?(o=t.x+h*(u.y-t.y)/l,s=u.y):2&n?(o=c.x,s=t.y+l*(c.x-t.x)/h):1&n&&(o=u.x,s=t.y+l*(u.x-t.x)/h),new e(o,s,a)},_getBitCode:function(t,e){var i=0;return t.xe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,i,n,r){var a,o=i.x,s=i.y,h=n.x-o,l=n.y-s,u=h*h+l*l;return u>0&&(a=((t.x-o)*h+(t.y-s)*l)/u,a>1?(o=n.x,s=n.y):a>0&&(o+=h*a,s+=l*a)),h=t.x-o,l=t.y-s,r?h*h+l*l:new e(o,s)},clipPolygon:function(t,e,i){var n,r,a,o,s,h,l,u,c,d=[1,4,2,8];for(r=0,l=t.length;l>r;r++)t[r]._code=this._getBitCode(t[r],e);for(o=0;4>o;o++){for(u=d[o],n=[],r=0,l=t.length,a=l-1;l>r;a=r++)s=t[r],h=t[a],s._code&u?h._code&u||(c=this._getEdgeIntersection(h,s,u,e,i),c._code=this._getBitCode(c,e),n.push(c)):(h._code&u&&(c=this._getEdgeIntersection(h,s,u,e,i),c._code=this._getBitCode(c,e),n.push(c)),n.push(s));t=n}return t}}}),define("chart/map/layer/GeoJSON",["require","./FeatureGroup","../../../utils/BaseUtils","../../../utils/Point2D","../../../utils/Bounds","../LatLng","../LatLngBounds","../Marker","../../../vector/shape/Path","../../../utils/LineUtils"],function(t){var e=t("./FeatureGroup"),i=t("../../../utils/BaseUtils"),n=t("../../../utils/Point2D"),r=t("../../../utils/Bounds"),a=t("../LatLng"),o=t("../LatLngBounds"),s=(t("../Marker"), - t("../../../vector/shape/Path")),h=t("../../../utils/LineUtils"),l=e.extend({initialize:function(t,e){i.setOptions(this,e),this._layers={},this._featureLayerMap={},t&&this.addData(t)},addData:function(t){var e,n,r,a=i.isArray(t)?t:t.features;if(a){for(e=0,n=a.length;n>e;e++)r=a[e],(r.geometries||r.geometry||r.features||r.coordinates)&&this.addData(r);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var s=this.geometryToLayer(t,o);return s?(s.options=i.extend({},this.options),this._featureLayerMap[i.stamp(t)]=s,this.addLayer(s)):this},getLayerByFeature:function(t){return this._featureLayerMap[i.stamp(t)]},geometryToLayer:function(t,i){var n,r,a,o="Feature"===t.type?t.geometry:t,s=o?o.coordinates:null,h=[],l=i&&i.coordsToLatLng||this.coordsToLatLng;if(!s&&!o)return null;switch(o.type){case"Polygon":case"MultiPolygon":return n=this.coordsToLatLngs(s,"Polygon"===o.type?1:2,l),new c(n,i);case"GeometryCollection":for(r=0,a=o.geometries.length;a>r;r++){var u=this.geometryToLayer({geometry:o.geometries[r],type:"Feature",properties:t.properties},i);u&&h.push(u)}return new e(h)}},coordsToLatLng:function(t){return new a(t[1],t[0],t[2])},coordsToLatLngs:function(t,e,i){for(var n,r=[],a=0,o=t.length;o>a;a++)n=e?this.coordsToLatLngs(t[a],e-1,i):(i||this.coordsToLatLng)(t[a]),r.push(n);return r},latLngToCoords:function(t){return void 0!==t.alt?[t.lng,t.lat,t.alt]:[t.lng,t.lat]},latLngsToCoords:function(t,e,i){for(var n=[],r=0,a=t.length;a>r;r++)n.push(e?l.latLngsToCoords(t[r],e-1,i):l.latLngToCoords(t[r]));return!e&&i&&n.push(n[0]),n},asFeature:function(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}}),u=s.extend({initialize:function(t,e){i.setOptions(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,i,n=1/0,r=null,a=h._sqClosestPointOnSegment,o=0,s=this._parts.length;s>o;o++)for(var l=this._parts[o],u=1,c=l.length;c>u;u++){e=l[u-1],i=l[u];var d=a(t,e,i,!0);n>d&&(n=d,r=a(t,e,i))}return r&&(r.distance=Math.sqrt(n)),r},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,r,a,o,s=this._rings[0],h=s.length;if(!h)return null;for(t=0,e=0;h-1>t;t++)e+=s[t].distanceTo(s[t+1])/2;if(0===e)return this._map.layerPointToLatLng(s[0]);for(t=0,n=0;h-1>t;t++)if(r=s[t],a=s[t+1],i=r.distanceTo(a),n+=i,n>e)return o=(n-e)/i,this._map.layerPointToLatLng([a.x-o*(a.x-r.x),a.y-o*(a.y-r.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=a.create(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new o,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return u._flat(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=u._flat(t),n=0,r=t.length;r>n;n++)i?(e[n]=a.create(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new r;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t);var e=this._clickTolerance(),i=new n(e,e);this._bounds.isValid()&&t.isValid()&&(t.min._subtract(i),t.max._add(i),this._pxBounds=t)},_projectLatlngs:function(t,e,i){var n,r,o=t[0]instanceof a,s=t.length;if(o){for(r=[],n=0;s>n;n++)r[n]=this._map.latLngToLayerPoint(t[n]),i.extend(r[n]);e.push(r)}else for(n=0;s>n;n++)this._projectLatlngs(t[n],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t)){if(this.options.noClip)return void(this._parts=this._rings);var e,i,n,r,a,o,s,l=this._parts;for(e=0,n=0,r=this._rings.length;r>e;e++)for(s=this._rings[e],i=0,a=s.length;a-1>i;i++)o=h.clipSegment(s[i],s[i+1],t,i,!0),o&&(l[n]=l[n]||[],l[n].push(o[0]),(o[1]!==s[i+1]||i===a-2)&&(l[n].push(o[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;n>i;i++)t[i]=h.simplify(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._updatePoly()},_updatePoly:function(t){this._path.attr("d",this.pointsToPath(this._parts,t))},pointsToPath:function(t,e){var i,n,r,a,o,s,h="";for(i=0,r=t.length;r>i;i++){for(o=t[i],n=0,a=o.length;a>n;n++)s=o[n],h+=(n?"L":"M")+s.x+" "+s.y;h+=e?"z":""}return h||"M0 0"},_containsPoint:function(t,e){var i,n,r,a,o,s,l=this._clickTolerance();if(!this._pxBounds.contains(t))return!1;for(i=0,a=this._parts.length;a>i;i++)for(s=this._parts[i],n=0,o=s.length,r=o-1;o>n;r=n++)if((e||0!==n)&&h.pointToSegmentDistance(t,s[r],s[n])<=l)return!0;return!1}});u._flat=function(t){return!i.isArray(t[0])||"object"!=typeof t[0][0]&&"undefined"!=typeof t[0][0]};var c=u.extend({isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,r,a,o,s,h,l=this._rings[0],u=l.length;if(!u)return null;for(a=o=s=0,t=0,e=u-1;u>t;e=t++)i=l[t],n=l[e],r=i.y*n.x-n.y*i.x,o+=(i.x+n.x)*r,s+=(i.y+n.y)*r,a+=3*r;return h=0===a?l[0]:[o/a,s/a],this._map.layerPointToLatLng(h)},_convertLatLngs:function(t){var e=u.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof a&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){u.prototype._setLatLngs.call(this,t),u._flat(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return u._flat(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options["stroke-width"],i=new n(e,e);if(t=new r(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t)){if(this.options.noClip)return void(this._parts=this._rings);for(var a,o=0,s=this._rings.length;s>o;o++)a=h.clipPolygon(this._rings[o],t,!0),a.length&&this._parts.push(a)}},_updatePath:function(){this._updatePoly(!0)},_containsPoint:function(t){var e,i,n,r,a,o,s,h,l=!1;if(!this._pxBounds.contains(t))return!1;for(r=0,s=this._parts.length;s>r;r++)for(e=this._parts[r],a=0,h=e.length,o=h-1;h>a;o=a++)i=e[a],n=e[o],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(l=!l);return l||u.prototype._containsPoint.call(this,t,!0)}});return l}),define("utils/getJson",["require","./BaseUtils"],function(t){function e(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function i(t){return 1===t.length?function(e,i){t(null==e?i:null)}:t}function n(t,n,r,o){function s(){var t,i=c.status;(!i&&e(c)||i>=200&&300>i||304===i)&&(t=r.call(h,c),o(t))}var h={},l=a.dispatch("beforesend","progress","load","error"),u={},c=new XMLHttpRequest,d=null;return!this.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(t)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=s:c.onreadystatechange=function(){c.readyState>3&&s()},h.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?u[t]:(null==e?delete u[t]:u[t]=e+"",h)},h.mimeType=function(t){return arguments.length?(n=null==t?null:t+"",h):n},h.responseType=function(t){return arguments.length?(d=t,h):d},h.response=function(t){return r=t,h},["get","post"].forEach(function(t){h[t]=function(){return h.send.apply(h,[t].concat(a.toArray(arguments)))}}),h.send=function(e,i,r){if(2===arguments.length&&"function"==typeof i&&(r=i,i=null),c.open(e,t,!1),null==n||"accept"in u||(u.accept=n+",*/*"),c.setRequestHeader)for(var a in u)c.setRequestHeader(a,u[a]);return null!=n&&c.overrideMimeType&&c.overrideMimeType(n),null!=d&&(c.responseType=d),null!=r&&h.on("error",r).on("load",function(t){r(null,t)}),l.beforesend.call(h,c),c.send(null==i?null:i),h},h.abort=function(){return c.abort(),h},a.rebind(h,l,"on"),null==o?h:h.get(i(o))}function r(t){return JSON.parse(t.responseText)}var a=t("./BaseUtils");return function(t,e){return n(t,"application/json",r,e)}}),define("component/Geo",["require","./Base","../utils/BaseUtils","../utils/QueryUtils","../utils/GeoUtils","../Constants","../ComponentLibrary","../chart/map/layer/ImageOverlay","../chart/map/layer/TileLayer","../chart/map/layer/Control","../chart/map/layer/GeoJSON","../utils/getJson","../chart/map/CRS","../chart/map/LatLngBounds"],function(t){function e(t){var e;return t&&"object"==typeof t?e=t:window.FR&&window.FR.ajax?FR.ajax({type:"GET",url:t,dataType:"json",async:!1,success:function(t){e=t}}):f(t,function(t){e=t}),e}var i=t("./Base"),n=t("../utils/BaseUtils"),r=t("../utils/QueryUtils"),a=t("../utils/GeoUtils"),o=t("../Constants"),s=t("../ComponentLibrary"),h={},l=t("../chart/map/layer/ImageOverlay"),u=t("../chart/map/layer/TileLayer"),c=t("../chart/map/layer/Control"),d=t("../chart/map/layer/GeoJSON"),f=t("../utils/getJson"),p=t("../chart/map/CRS"),g=t("../chart/map/LatLngBounds"),m="Point",v="LineString",_="MultiLineString",y=i.extend({_refresh:function(){this._loaded=!1;var t=n.stamp(this.vanchart);h[t]=h[t]||{}},doLayout:function(){this._loadGeo();var t,e=this.vanchart,i=this.options;n.hasDefined(i.zoomListener)?t=i.zoomListener:n.hasDefined(i.zoomLevel)&&(t=i.zoomLevel);var r=i.viewCenter?[i.viewCenter[1],i.viewCenter[0]]:null;if(!isNaN(+t)&&r)e.setView(r,t);else{if(isNaN(+t))e.fitBounds(this._getFitBounds());else{e.fitBounds(this._getFitBounds(),{animate:!1});var r=e.getCenter();e.setView(r,t)}r&&e.panTo(r)}this._topLeft={x:0,y:e.bounds.y}},render:function(){var t=this.options,e=this.jsonData,i=n.stamp(this.vanchart),r=t.tileLayer||this.vanchart.options.geo.tileLayer,a=t.attribution||this.vanchart.options.geo.attribution||"",o=t.wmsUrl||this.vanchart.options.geo.wmsUrl,s=t.wmsLayer||this.vanchart.options.geo.wmsLayer,d=this._imageBackgroundLayer||this._tileLayer||this._wmsLayer;if(this._imageBackgroundLayer=this._tileLayer=this._wmsLayer=null,this._isImageMap()&&(t.imageUrl||e.imageString)){var f=t.imageUrl||"data:image/"+e.imageSuffix+";base64,"+e.imageString,p=[[0,0],[e.imageHeight*this.scale,e.imageWidth*this.scale]];this._imageBackgroundLayer=new l(f,p).addTo(this.vanchart)}else r?(this._attribution=h[i][a]||(new c.Attribution).addAttribution(a),h[i][a]=this._attribution,this._tileLayer=h[i][r]||new u(r),h[i][r]=this._tileLayer,h[i][r].addTo(this.vanchart),h[i][a].addTo(this.vanchart)):o&&(this._wmsLayer=h[i][o]||new u.WMS(o,{layers:s.join(",")}),h[i][o]=this._wmsLayer,h[i][o].addTo(this.vanchart));this.renderAreaFeatures(),t.control&&(t._topLeft=this._topLeft,this._zoomControl=new c.Zoom(t).addTo(this.vanchart));var g=this._imageBackgroundLayer||this._tileLayer||this._wmsLayer;d&&d!=g&&this.vanchart.removeLayer(d)},needsNullArea:function(){var t=this.vanchart;return t.isAreaMap()||t.isHeatMap()||t.seriesOfType(o.AREA_MAP).length},renderAreaFeatures:function(){if(this.needsNullArea()){var t=this.defaultAreaStyle();this.geoJsonLayer=this.geoJsonLayer||new d(this.jsonData,t),this.geoJsonLayer.addTo(this.vanchart)}},getLayerByFeature:function(t){return this.geoJsonLayer.getLayerByFeature(t)},defaultAreaStyle:function(){var t=this.vanchart.options.plotOptions,e=[t[o.AREA_MAP],t];return{fill:n.pick(r.queryList(e,"nullColor"),"#cccccc"),"fill-opacity":n.pick(r.queryList(e,"opacity"),.75),"stroke-width":n.pick(r.queryList(e,"borderWidth"),1),stroke:n.pick(r.queryList(e,"borderColor"),"#ffffff"),"stroke-opacity":n.pick(r.queryList(e,"borderOpacity"),1)}},geoName:function(){return this.options.name},_loadGeo:function(){if(this._loaded||this._dataUrl==this.options.data)return void(this._loaded=!0);this._loaded=!0,this._dataUrl=this.options.data,this.geoJsonLayer&&this.geoJsonLayer.remove(),this.geoJsonLayer=null;var t=this.options,i=this,n=this.vanchart;i._validPointName={},i._validAreaName={},i._extendedLineFeature=[],t.data?i.jsonData=e(t.data):i.jsonData={};for(var r=i.jsonData&&i.jsonData.features||[],o=0,s=r.length;s>o;o++){var h=r[o],l=h.geometry;l.type==m?(i._validPointName[h.properties.name]=i._validPointName[h.properties.name]||[],i._validPointName[h.properties.name].push(h)):l.type==v||l.type==_?i._extendedLineFeature.push(h):(i._validAreaName[h.properties.name]=i._validAreaName[h.properties.name]||[],i._validAreaName[h.properties.name].push(h))}if(this.scale=1,this._isImageMap()){var u=n.width,c=n.height,d=u/i.jsonData.imageWidth,f=c/i.jsonData.imageHeight;this.scale=Math.min(d,f),a.scaleGeo(i.jsonData,i.scale)}n.options.crs=this._isImageMap()?p.Simple:p.EPSG3857},getDataPointLngLat:function(t,e){if(!e||t.options.lnglat)return t.options.lnglat;var i=t.series&&t.series.type==o.AREA_MAP?e.properties.center:e.geometry.coordinates;if(!i)if(this._isImageMap()){var n=this.jsonData.imageWidth,r=0,s=this.jsonData.imageHeight,h=0,l=a.getAllPoints(e);l.forEach(function(t){isNaN(t[0])||isNaN(t[1])||(n=Math.min(n,t[0]),r=Math.max(r,t[0]),s=Math.min(s,t[1]),h=Math.max(h,t[1]))}),i=[(r+n)/2,(h+s)/2]}else{var u=a.bounds(e),c=(u[0][0]+u[1][0])/2,d=(u[0][1]+u[1][1])/2;i=[c,d]}return i},getZoomListener:function(){return this.options.zoomListener||this.options.zoomLevel},getFeaturesByName:function(t,e){return this._loadGeo(),this._validAreaName&&this._validPointName?e==o.AREA_MAP?this._validAreaName[t]:this._validPointName[t]:void 0},_isImageMap:function(){return this.jsonData&&this.jsonData.imageWidth},_getFitBounds:function(){function t(t){var a=t.lnglat||t.options.lnglat;if(a)e=!1;else{var o=i.getFeaturesByName(t.name,t.series.type);a=i.getDataPointLngLat(t,o&&o[0])}a&&(n=Math.min(n,a[0]),r=Math.max(r,a[0]),s=Math.min(s,a[1]),h=Math.max(h,a[1]))}var e=!0,i=this,n=180,r=-180,s=90,h=-90;if(this._isImageMap())n=this.jsonData.imageWidth*this.scale,r=0,s=this.jsonData.imageHeight*this.scale,h=0;else{for(var l=this.vanchart.series,u=0,c=l.length;c>u;u++)l[u].visible&&l[u].type!=o.AREA_MAP&&(l[u].type===o.LINE_MAP?l[u].points.forEach(function(e){t(e.options.from),t(e.options.to)}):l[u].points.forEach(t));if(e&&this.jsonData){var d=a.bounds(this.jsonData),f=d[0],p=d[1];return[[f[1],f[0]],[p[1],p[0]]]}}return[[s,n],[h,r]]},remove:function(){this.geoJsonLayer&&this.geoJsonLayer.remove(),this._imageBackgroundLayer&&this.vanchart.removeLayer(this._imageBackgroundLayer),this._attribution&&this._attribution.remove(),this._tileLayer&&this._tileLayer.remove(),this._wmsLayer&&this._wmsLayer.remove(),this._imageBackgroundLayer=this._attribution=this._tileLayer=this._wmsLayer},resize:function(){if(this._isImageMap()){var t=(this.options,this.jsonData),e=this.scale,i=this.vanchart,n=i.width,r=i.height,s=n/t.imageWidth,h=r/t.imageHeight;if(this.scale=Math.min(s,h),a.scaleGeo(t,this.scale/e),this._imageBackgroundLayer){var l=[[0,0],[t.imageHeight*this.scale,t.imageWidth*this.scale]];this._imageBackgroundLayer.setBounds(g.create(l))}this.geoJsonLayer&&(this.geoJsonLayer.remove(),this.geoJsonLayer=null,i.validPoints.forEach(function(t){t.series.type==o.AREA_MAP&&(t.layers=null)}))}}});return s.register(s.GEO_COMPONENT,y),y}),define("component/DrillTools",["require","./Base","../utils/BaseUtils","../utils/ColorUtils","../Constants","../ComponentLibrary"],function(t){var e=t("./Base"),i=t("../utils/BaseUtils"),n=t("../utils/ColorUtils"),r=t("../Constants"),a=t("../ComponentLibrary"),o=.417,s=.583,h=.25,l=.333,u=.1665,c=e.extend({_refresh:function(){this.iconData=[]},doLayout:function(){var t=i.getTextDimension("test",this.options.style);this._setComponentBounds(r.TOP,t.height*(2*u+1))},getBookMarkPath:function(t){var e=this.options.style,n=t.layerIndex,r=i.getTextDimension(t.geo.geoName(),e),a=(0===n?o:s)+h;a=r.height*a+r.width;var c=r.height*l,d=(1+2*u)*r.height,f=[0,0],p=[a,0],g=[a+c,d/2],m=[a,d],v=[0,d];return"M"+f+"L"+p+"L"+g+"L"+m+"L"+v+"Z"},isCurrent:function(t){var e=this.iconData[this.iconData.length-1];return e.series==t.series},textColor:function(t){return this.isCurrent(t)?this.options.currentColor:this.options.style.color},mouseOverColor:function(t){var e;if(!(e=this.options.mouseOverColor)){var i=this.textColor(t),r=n.getRGBAColorArray(i),a=n.rgb2hsb(r[0],r[1],r[2]),o=n.hsb2rgb(a[0],a[1]/2,(a[2]+1)/2);e=n.toColor(o,"rgb")}return e},leftPadding:function(t){return 0===t.layerIndex?o:s},calculateExitAnimation:function(t){for(var e=600,i=0,n=t.length;n>i;i++)t[i].time=e,e=Math.max(e-100,0);var r=0;for(i=n-1;i>=0;i--)t[i].time?(t[i].delay=r,r+=200):t[i].delay=0},getMarkPos:function(t){for(var e=0,i=0;i=0;a--){var o=this.iconData[a];if(this.drillItems[a]){var s=this.drillItems[a];s.path.attr({d:t.getBookMarkPath(o)}),s.text.style({fill:this.textColor(o)}).textContent(o.geo.geoName())}else o.aniStart=this.getMarkAnimationStartPos(o),o.aniEnd=this.getMarkPos(o),this.drillItems[a]=this._createItem(o)}var h=this.drillItems.splice(this.iconData.length,this.drillItems.length);this.calculateExitAnimation(h);for(var a=0,l=h.length;l>a;a++){var o=h[a];o.animate({duration:o.time,delay:o.delay,ease:"quad-in",attr:{transform:i.makeTranslate([o.datum().aniStart,0]),opacity:0}}).remove()}this.drillItems.length=this.iconData.length},_createItem:function(t){var e=this,n=e.vanchart,r=n.renderer,a=this.options,o=i.getTextDimension(t.geo.geoName(),a.style).height,s=r.group().style({cursor:"pointer"}).datum(t);return s.path=r.path({d:e.getBookMarkPath(t)}).style({fill:a.backgroundColor,filter:"url(#"+i.stamp(this.shadow)+")"}).addTo(s),s.text=r.text().attr({x:e.leftPadding(t)*o,y:u*o,dy:".85em"}).style(a.style).style({fill:this.textColor(t)}).textContent(t.geo.geoName()).addTo(s),s.attr("transform",i.makeTranslate([t.aniStart,0])).addTo(this.dToolsGroup).animate({duration:500,ease:"cubic-out",attr:{transform:i.makeTranslate([t.aniEnd,0])}}),i.toBack(s.node()),s},_findDrillTarget:function(t){for(var e,i=t.srcEvent,n=i.target||i.srcElement;n;){for(var r=this.drillItems.length-1;r>=0;r--)this.drillItems[r].node()==n&&(e=this.drillItems[r]);if(e||n==this.dToolsGroup.node())break;n=n.parentNode}return e},onTap:function(t){var e=this._findDrillTarget(t),n=this.drillItems.indexOf(e),r=this.vanchart.layerMap[n];if(e&&r){var r=e.datum();if(this.options.click&&r.drillUpDataPoint){var a=i.getFormatterFunction(this.options.click);a(r.drillUpDataPoint,t.srcEvent)}this.vanchart.drillUp(r)}},onMouseOver:function(t){var e=this._findDrillTarget(t);e&&e.text.style({fill:this.mouseOverColor(e.datum())})},onMouseOut:function(t){var e=this._findDrillTarget(t);e&&e.text.style({fill:this.textColor(e.datum())})},getEvents:function(){return{tap:this.onTap,mouseover:this.onMouseOver,mouseout:this.onMouseOut}},remove:function(){this.dToolsGroup&&this.dToolsGroup.remove(),this.dToolsGroup=null,this.iconData=this.drillItems=[]}});return a.register(a.DRILL_TOOLS,c),c}),define("component/DataSheet",["require","./Base","../utils/BaseUtils","../Constants","./LegendIconFactory","../ComponentLibrary","../utils/BezierEasing"],function(t){var e,i,n=t("./Base"),r=t("../utils/BaseUtils"),a=t("../Constants"),o=t("./LegendIconFactory"),s=t("../ComponentLibrary"),h=t("../utils/BezierEasing"),l=400,u=h.css.swing,c=function(){return null==e&&(e=r.paddingConvertWithScale("0.25rem")),e},d=function(){return null==i&&(i=r.paddingConvertWithScale("0.125rem")),i},f=18,p={color:"#666666",fontSize:"14px",fontFamily:"Verdana"},g=n.extend({doLayout:function(){this._recordForPlotBounds(a.LEFT,Math.round(this.getSeriesNameLength()))},reCalculateSize:function(){this.doLayout()},updateAxisSizeAndBounds:function(){this.maxCateLineHeight=this.maxSeriesLineHeight=null,this._setComponentBounds(a.BOTTOM,this._calculateLineHeight())},_calculateLineHeight:function(){this.calculateShowText();var t=this._categoryStyle(),e=0,i=r.getTextHeight(this._seriesStyle()),n=r.getTextHeight(this._valueStyle());this.maxCateLineHeight=2*c()+this.maxCateLine*r.getTextHeight(t)+(this.maxCateLine-1)*c(),this.maxSeriesLineHeight=[];for(var a=0,o=this.seriesNames.length;o>a;a++){var s=this.maxSeriesLine[a],h=2*c()+s*i+(s-1)*c(),l=this.maxValueLine[a],u=2*c()+l*n+(l-1)*c();this.maxSeriesLineHeight[a]=Math.max(h,u),e+=this.maxSeriesLineHeight[a]}return this.sheetHeight=Math.ceil(this.maxCateLineHeight+e),this.sheetHeight},calculateShowText:function(){this.maxCateLine=0,this.maxValueLine=[],this.showTextMap=this.showTextMap||{};var t=this.vanchart.xAxis(),e=t._dataDomain,i=t._domain,n=this._categoryStyle(),a=r.getTextHeight(n)+c(),o=this.vanchart.bounds.width/i.length,s=this;e.forEach(function(t){var e=r.splitText(t,n,o,c());if(s.maxCateLineHeight){var h=Math.min(parseInt(s.maxCateLineHeight/a,10),e.length);e=e.slice(0,h)}-1!=r.indexOf(i,t)&&(s.maxCateLine=Math.max(s.maxCateLine,e.length)),s.showTextMap[t]=s.showTextMap[t]||{},s.showTextMap[t].categoryArray=e});var h=this._valueStyle(),l=r.getTextHeight(h)+c(),u=this.options.formatter,d=this.vanchart.series;d.forEach(function(t,e){for(var n=t.points,a=0,d=n.length;d>a;a++){var f=n[a],p=f.getTargetValue(),g=f.category,m=f.isNull?"-":s._getTickContent(p,u),v=r.splitText(m,h,o,c());if(s.maxSeriesLineHeight&&s.maxSeriesLineHeight[e]){var _=Math.min(parseInt(s.maxSeriesLineHeight[e]/l,10),v.length);v=v.slice(0,_)}s.showTextMap[g].value=s.showTextMap[g].value||[],s.showTextMap[g].value[e]=s.showTextMap[g].value[e]||{},s.showTextMap[g].value[e].valueArray=v,-1!=r.indexOf(i,g)&&(s.maxValueLine[e]=Math.max(s.maxValueLine[e]||0,v.length))}})},fixBoundsByPlot:function(){var t=this.vanchart.bounds,e=this.vanchart.getComponent(s.X_AXIS_COMPONENT),i=t.y+t.height;e&&e._axisList.length&&e._axisList.forEach(function(t){t.getPosition()==a.BOTTOM&&(i=Math.max(i,t.bounds.y+t.bounds.height))}),this.bounds={x:t.x-this.maxSeriesWidth,y:i,width:this.maxSeriesWidth+t.width,height:this.sheetHeight}},getSeriesNameLength:function(){this.seriesNames=[],this.maxSeriesLine=[],this.seriesIconType=[];var t=this,e=t.vanchart,i=e.series,n=this._seriesStyle(),a=e.getChartBounds().width/4-(f+2*d()),s=0,h=0;return i.forEach(function(e){var i=r.getTextDimension(e.name,n,!1).width+2*c();if(i>a){var l=r.splitText(e.name,n,a,c());t.maxSeriesLine.push(l.length),t.seriesNames.push(l),s=a}else t.maxSeriesLine.push(1),t.seriesNames.push([e.name]),s=Math.max(i,s);var u=t._getLegendType(e);t.seriesIconType.push(u),h=Math.max(h,o.getLegendIconSize(u).width)}),this.maxSeriesWidth=Math.ceil(s+2*d()+h),this.maxSeriesWidth+c()},_categoryStyle:function(){var t=this.vanchart.xAxis(),e=t?t.options.labelStyle:p;return r.convertToREMUseDefault16PX(e)},_seriesStyle:function(){var t=this.vanchart.getComponent(s.LEGEND_COMPONENT),e=t?t.options.style:p;return r.convertToREMUseDefault16PX(e)},_valueStyle:function(){return r.convertToREMUseDefault16PX(this.options.style)},getTextPadding:function(){return c()},render:function(){if(this.remove(),this.vanchart.series.length){this.calculateShowText();var t=this.vanchart,e=this.bounds,i=t.renderer,n={x:this.maxSeriesWidth,y:0,width:e.width-this.maxSeriesWidth,height:e.height};this.animationClip=i.createClip(n),this.dataSheetGroup=this.createComponentGroup().attr("transform",r.makeTranslate(this.bounds)),this.animationGroup=i.group().addTo(this.dataSheetGroup),i.clip(this.animationGroup,this.animationClip),this._drawBaseTable(),this._drawTableContent()}},_drawBaseTable:function(){var t=this.options,e=this.maxSeriesWidth,i=this.maxCateLineHeight,n=this.vanchart,r=n.renderer,a=this.dataSheetGroup,o=this.bounds.width,s=this.bounds.height,h={fill:"none",stroke:t.borderColor,"stroke-width":t.borderWidth};r.path().attr("d","M"+e+",0L"+o+",0L"+o+" "+s+"L0,"+s+"L0,"+i).style(h).addTo(a);for(var l=0,u=this.seriesNames.length;u>l;l++)r.line().attr("x1",0).attr("y1",i).attr("x2",o).attr("y2",i).style(h).addTo(a),i+=this.maxSeriesLineHeight[l];this._drawSeries()},_drawTableContent:function(){for(var t=this.vanchart,e=t.xAxis(),i=t.renderer,n=e._domain,a=e._dataDomain,o=this.getPlotBounds().width,s=o/n.length,h=-r.indexOf(a,n[0])*s+this.maxSeriesWidth,c={fill:"none",stroke:this.options.borderColor,"stroke-width":this.options.borderWidth},d=0,f=a.length;f>d;d++){var p=this.showTextMap[a[d]],g=h+s*d;this._drawCategory(p,g,s),this._drawValues(p,g,s);var m={x1:g,y1:0,x2:g,y2:this.bounds.height};p._line=p._line||i.line(m).style(c).addTo(this.animationGroup),p._line.animate({duration:l,ease:u,attr:{x1:g,x2:g}})}},zoomRefresh:function(){this.calculateShowText(),this._drawTableContent()},_drawCategory:function(t,e,i){var n=t.categoryArray,a=this.vanchart.renderer;t._category=t._category||[];for(var o,s,h=this._categoryStyle(),c=r.getTextHeight(h),d=this.getTextPadding(),f=this._getStartY(n,h,this.maxCateLineHeight),p=0;pc;c++)t.value.push({valueArray:[""]})}for(var f,p,g=0;gp;p++){for(var m=i[p],v=this.maxSeriesLineHeight[p],_=h+this._getStartY(m,l,v)+.85*u,y=0;ya;a++){var h=n[a],l=h.options.trendLine;if(l&&h.visible){var u;switch(l.type){case r.LINEAR:u=i.linear;break;case r.LOGARITHMIC:u=i.logarithmic;break;case r.POLYNOMIAL:u=i.polynomial;break;default:case r.EXPONENTIAL:u=i.exponential}var c=h.getTrendLineXYValues(h);if(!(c[0].length<=1)){var d,f,p=e(c[2]);p?(f=c[0],d=c[1]):(d=c[0],f=c[1]);var g=u(d,f,this.extendXs(d,l.period)),m=o.line().interpolate("cardinal");p&&m.x(function(t){return t[1]}).y(function(t){return t[0]});var v={d:m(g),trendLine:l};t.push(v)}}}this.trendLines=t},extendXs:function(t,e){function i(t,e){return Array.apply(null,Array(t)).map(e)}if(e&&2===e.length&&t.length>1){var n=t[1]-t[0];return i(-e[0],function(e,i){return t[0]-(i+1)*n}).reverse().concat(t).concat(i(e[1],function(e,i){return t[t.length-1]+(i+1)*n}))}return t},linear:function(t,e,n){var r,a,o,s,h=i(t,e);return r=n[0],o=h[0]*r+h[1],a=n[n.length-1],s=h[0]*a+h[1],[[r,o],[a,s]]},logarithmic:function(t,e,n){var r=[],a=[],o=Math.min.apply(null,n);t.map(function(t,i){0>=o&&(t+=-o+1),r.push(Math.log(t)),a.push(e[i])});var s=i(r,a);return n.map(function(t){var e=t;return 0>=o&&(t+=-o+1),[e,s[0]*Math.log(t)+s[1]]})},exponential:function(t,e,n){var r=[],a=[],o=Math.min.apply(null,e);t.map(function(t,i){0>=o&&(e[i]+=-o+1),r.push(t),a.push(Math.log(e[i]))});var s=i(r,a),h=s[0];return s[0]=Math.exp(s[1]),s[1]=h,n.map(function(t){var e=s[0]*Math.exp(t*s[1]);return 0>=o&&(e-=-o+1),[t,e]})},polynomial:function(t,e,i){var n=Math.min(t.length-1,6);n++;for(var r,a=[],o=[],s=0;n>s;s++)a[s]=[],o[s]=[];var s,h,l,u,c=[],d=[],f=[];for(s=0;n>s;s++)for(h=0;hu;u++)r*=t[h];a[s][h]=r}for(s=0;n>s;s++)for(l=0;n>l;l++){for(r=0,h=0;hs;s++){for(r=0,h=0;hs;s++)o[s][0]=o[s][0]/o[0][0];for(s=1;n>s;s++)for(h=s;n>h;h++){var p=0;for(l=0;s>l;l++)p+=o[l][h]*o[s][l];if(o[s][h]=o[s][h]-p,h+1!=n){var g=0;for(l=0;s>l;l++)g+=o[l][s]*o[h+1][l];o[h+1][s]=(o[h+1][s]-g)/o[s][s]}}for(d[0]=c[0],s=1;n>s;s++){for(r=0,h=0;s>h;h++)r+=o[s][h]*d[h];d[s]=c[s]-r}for(f[n-1]=d[n-1]/o[n-1][n-1],s=n-2;s>=0;s--){for(r=0,h=s+1;n>h;h++)r+=o[s][h]*f[h];f[s]=(d[s]-r)/o[s][s]}return i.map(function(t){return[t,f.reduce(function(e,i,n){return e+i*Math.pow(t,n)},0)]})},_renderTrendLine:function(){this.calcTrendLines();var t=this.trendLines,e=this.bounds,i=this.renderer;if(!this.trendLineGroup){if(!this.trendLines||!this.trendLines.length)return;this.trendLineGroup=this.seriesGroup.append(i.group()),i.clip(this.trendLineGroup,this.plotClip)}this.trendLineGroup.trendLines=this.trendLineGroup.trendLines||[];for(var a=this.trendLineGroup.trendLines,o=0,s=t.length;s>o;o++){var h=t[o],l={d:h.d},u={fill:"none",stroke:h.trendLine.color,"stroke-width":h.trendLine.width,"stroke-dasharray":r.DASH_TYPE[h.trendLine.dashStyle]};a[o]?a[o].attr(l).style(u):a[o]=i.path(l).style(u).addTo(this.trendLineGroup),a[o].attr("transform",n.makeTranslate(e))}for(var o=t.length;o