-
Notifications
You must be signed in to change notification settings - Fork 5
/
u-grid.min.js
12 lines (12 loc) · 127 KB
/
u-grid.min.js
1
2
3
4
5
6
7
8
9
10
11
12
/**
* tinper-neoui-grid v3.1.6
* grid
* author : yonyou FED
* homepage : https://github.com/iuap-design/tinper-neoui-grid#readme
* bugs : https://github.com/iuap-design/tinper-neoui-grid/issues
**/
!function(t){function i(o){if(e[o])return e[o].exports;var n=e[o]={exports:{},id:o,loaded:!1};return t[o].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}var e={};return i.m=t,i.c=e,i.p="",i(0)}([function(t,i,e){"use strict";var o=e(1),n=e(6),s=e(8),r=$.fn.grid;$.fn.grid=function(t){var i=$(this).data("gridComp");return i||$(this).data("gridComp",i=new s.gridComp(this,t)),i},$.fn.grid.gridComp=s.gridComp,$.fn.grid.gridCompColumn=n.column,$.fn.grid.dataSource=o.dataSource,$.fn.grid.noConflict=function(){return $.fn.grid=r,this}},function(t,i,e){"use strict";function o(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0,i.dataSource=void 0;var n=e(2),s=e(3),r=e(5),d=function l(t,i){o(this,l),this.init(t,i),this.sortRows()},a=d.prototype;a.init=n.init,a.sortRows=n.sortRows,a.basicSortRows=n.basicSortRows,a.treeSortRows=n.treeSortRows,a.getSumValue=n.getSumValue,a.basicSortRows=s.re_basicSortRows,a.treeSortRows=r.re_treeSortRows,a.pushChildRows=r.pushChildRows,i.dataSource=d},function(t,i){"use strict";i.__esModule=!0;var e=function(t,i){this.defaults={},this.gridComp=i,this.options=$.extend({},this.defaults,t),this.rows=new Array,this.hasParentRows=new Array,this.nothasParentRows=new Array},o=function(t,i){this.gridComp.options.showTree?this.treeSortRows(t,i):this.basicSortRows(t,i),this.gridComp.eidtRowIndex=-1},n=function(t,i){var e=this,o="";t&&(o=this.gridComp.getColumnByField(t).options.dataType),this.rows=new Array,this.options.values&&$.each(this.options.values,function(t){var i={};i.value=this,i.valueIndex=t,e.rows.push(i)})},s=function(t,i){this.basicSortRows(t,i)},r=function(t,i,e){var o=null;if(i.options.sumCol&&$.each(this.rows,function(n){var s=$(this.value).attr(t);"Int"==i.options.dataType?(s=e.getInt(s,0),o+=parseInt(s)):(s=e.getFloat(s,0),o=e.accAdd(o,parseFloat(s)))}),"Float"==i.options.dataType&&i.options.precision){var n={};n.value=o,n.precision=i.options.precision,o=e.DicimalFormater(n)}return null!=o&&void 0!=o&&"null"!=o&&"undefined"!=o?o+"":""};i.init=e,i.sortRows=o,i.basicSortRows=n,i.treeSortRows=s,i.getSumValue=r},function(module,exports,__webpack_require__){"use strict";exports.__esModule=!0,exports.re_basicSortRows=exports.sortRowsByPrio=exports.re_deleteOneRowTree=exports.canSortable=exports.sort_initGridEventFun=exports.sort_initEventFun=void 0;var _gridCompEvent=__webpack_require__(4),sort_initEventFun=function(){var t=this;$("#"+this.options.id).on("mouseup",function(i){if($(i.target).closest("#"+t.options.id+"_header").length>0){if(t.mouseUpX=i.clientX,t.mouseUpY=i.clientY,t.mouseDownX==t.mouseUpX&&t.mouseDownY==t.mouseUpY){t.columnClickX=i.clientX,t.columnClickY=i.clientY;var e=$(i.target).closest("th")[0];$(i.target).hasClass("u-grid-header-columnmenu")||t.canSortable(i,e)}}else $(i.target).closest("#"+t.options.id+"_content").length>0})},sort_initGridEventFun=function(){},canSortable=function(t,i){var e=this,o=$(i),n=o.attr("field"),s=this.getColumnAttr("sortable",n);if(s){if(t.ctrlKey){var r=[];$(".u-grid-header-sort-priority").each(function(t,i){var e,o=$(i),n=parseInt(o.text()),s=o.closest("th").attr("field");o.parent().hasClass("uf-caretarrowup")?e="asc":o.parent().hasClass("uf-caretdown")&&(e="desc"),r[n-1]={field:s,sortType:e}});var d;if((d=o.find(".uf-caretarrowup")).length>0){var a=parseInt(d.find(".u-grid-header-sort-priority").text());r[a-1].sortType="desc",d.removeClass("uf-caretarrowup").addClass("uf-caretdown")}else if((d=o.find(".uf-caretdown")).length>0){for(var a=parseInt(d.find(".u-grid-header-sort-priority").text()),l=a;l<r.length;l++){var h=$("[field="+r[l].field+"]").find(".u-grid-header-sort-priority");h.text(parseInt(h.text())-1)}r.splice(a-1,1),d.remove()}else r.push({field:n,sortType:"asc"}),o.first().first().append('<span class="uf uf-caretarrowup u-grid-header-sort-span" ></span>');this.dataSourceObj.sortRowsByPrio(r)}else $(".uf-caretarrowup").parent().parent().parent()[0]==i?($(".uf-caretarrowup").remove(),$(i.firstChild.firstChild)[0].insertAdjacentHTML("beforeEnd",'<span class="uf uf-caretdown u-grid-header-sort-span" ></span>'),"function"==typeof this.options.onSortFun?this.options.onSortFun(n,"asc"):this.dataSourceObj.sortRows(n,"asc")):$(".uf-caretdown").parent().parent().parent()[0]==i?($(".uf-caretdown").remove(),"function"==typeof this.options.onSortFun?this.options.onSortFun():this.dataSourceObj.sortRows()):($(".uf-caretarrowup").remove(),$(".uf-caretdown").remove(),$(i.firstChild.firstChild)[0].insertAdjacentHTML("beforeEnd",'<span class="uf uf-caretarrowup u-grid-header-sort-span"></span>'),"function"==typeof this.options.onSortFun?this.options.onSortFun(n,"desc"):this.dataSourceObj.sortRows(n,"desc"));e.repairContent(),e.afterGridDivsCreate()}},re_deleteOneRowTree=function(){this.options.showTree&&this.dataSourceObj.sortRows()},sortRowsByPrio=function sortRowsByPrio(prioArray,cancelSort){var oThis=this;cancelSort&&(this.rows=new Array,this.options.values&&$.each(this.options.values,function(t){var i={};i.value=this,i.valueIndex=t,oThis.rows.push(i)}));var evalStr=function t(i){return i==prioArray.length-1?"by(prioArray["+i+"].field, prioArray["+i+"].sortType)":"by(prioArray["+i+"].field, prioArray["+i+"].sortType,"+t(i+1)+")"},by=function(t,i,e){arguments.callee;return function(o,n){var s=$(o.value).attr(t),r=$(n.value).attr(t),d=oThis.gridComp.getColumnByField(t).options.dataType;if("Float"==d)return s=parseFloat(s),r=parseFloat(r),isNaN(s)?1:isNaN(r)?-1:s==r&&e?e():"asc"==i?s-r:r-s;if("Int"==d)return s=parseInt(s),r=parseInt(r),isNaN(s)?1:isNaN(r)?-1:s==r&&e?e():"asc"==i?s-r:r-s;s=oThis.gridComp.getString(s,""),r=oThis.gridComp.getString(r,"");try{var a=s.localeCompare(r);return 0===a&&e?e():0===a?0:"asc"==i?a:-a}catch(l){return 0}}};this.rows.sort(eval(evalStr(0)))},re_basicSortRows=function(t,i){var e=this,o="";t&&(o=this.gridComp.getColumnByField(t).options.dataType),"asc"==i?this.rows.sort(function(i,n){var s=$(n.value).attr(t),r=$(i.value).attr(t);if("Float"==o)return s=parseFloat(s),r=parseFloat(r),isNaN(s)?1:isNaN(r)?-1:s-r;if("Int"==o)return s=parseInt(s),r=parseInt(r),isNaN(s)?1:isNaN(r)?-1:s-r;s=e.gridComp.getString(s,""),r=e.gridComp.getString(r,"");try{return s.localeCompare(r)}catch(d){return 0}}):"desc"==i?this.rows.sort(function(i,n){var s=$(i.value).attr(t),r=$(n.value).attr(t);if("Float"==o)return s=parseFloat(s),r=parseFloat(r),isNaN(s)?1:isNaN(r)?-1:s-r;if("Int"==o)return s=parseInt(s),r=parseInt(r),isNaN(s)?1:isNaN(r)?-1:s-r;s=e.gridComp.getString(s,""),r=e.gridComp.getString(r,"");try{return s.localeCompare(r)}catch(d){return 0}}):(this.rows=new Array,this.options.values&&$.each(this.options.values,function(t){var i={};i.value=this,i.valueIndex=t,e.rows.push(i)}))};exports.sort_initEventFun=sort_initEventFun,exports.sort_initGridEventFun=sort_initGridEventFun,exports.canSortable=canSortable,exports.re_deleteOneRowTree=re_deleteOneRowTree,exports.sortRowsByPrio=sortRowsByPrio,exports.re_basicSortRows=re_basicSortRows},function(t,i){"use strict";i.__esModule=!0;var e=function(){var t=this;$("#"+this.options.id).on("mousedown",function(i){$(i.target).closest("#"+t.options.id+"_header").length>0?(t.mouseDownX=i.clientX,t.mouseDownY=i.clientY):$(i.target).closest("#"+t.options.id+"_content").length>0})},o=function(){var t=this;this.initContentDivEventFun(),$("#"+this.options.id+"_header_multi_input").on("click",function(i){this.hasChecked?(t.setAllRowUnSelect(),this.hasChecked=!1):(t.setAllRowSelect(),this.hasChecked=!0)})},n=function(){var t=this;$("#"+t.options.id+"_content .u-grid-content-left").on("click",function(i){var e=$(i.target).closest(".u-grid-checkbox-outline");if(e.length>0){var o=$(e.parent()),n=$(".u-grid-content-multiSelect",o.parent()).index(o);e.hasClass("is-checked")?t.setRowUnselect(n):t.setRowSelect(n)}}),$("#"+this.options.id+"_content_div").on("scroll",function(i){t.scrollLeft=this.scrollLeft,t.scrollTop=this.scrollTop,$("#"+t.options.id+"_header_table").css("left",t.leftW-t.scrollLeft+t.fixedWidth+"px"),$("#"+t.options.id+"_noRowsShow").css("left",t.scrollLeft+"px"),$("#"+t.options.id+"_edit_form").css("left",t.scrollLeft+"px"),$("#"+t.options.id+"_content_multiSelect").css("top",-t.scrollTop+"px"),$("#"+t.options.id+"_content_numCol").css("top",-t.scrollTop+"px"),$("#"+t.options.id+"_content_fixed_div").css("top",-t.scrollTop+"px"),t.editClose()}),$("#"+this.options.id+"_content_tbody").on("click",function(i){"function"==typeof t.options.onDblClickFun?t.isDblEvent("tbodyClick",t.dblClickFun,i,t.clickFun,i):t.clickFun(i)}),$("#"+this.options.id+"_content_fixed_tbody").on("click",function(i){"function"==typeof t.options.onDblClickFun?t.isDblEvent("tbodyClick",t.dblClickFun,i,t.clickFun,i):t.clickFun(i)}),$("#"+this.options.id+"_content").on("mousemove",function(i){var e=$(i.target).closest("tr"),o=$(i.target).closest("div"),n=-1;e.length>0?n=$("tr",e.parent()).index(e):o.length>0&&(o.hasClass("u-grid-content-multiSelect")||o.hasClass("u-grid-content-num"))&&(n=$("div",o.parent()).index(o)),t.trHoverFun(n)}),$("#"+this.options.id+"_content").on("mouseout",function(i){if($("#"+t.options.id+"_content_tbody").find("tr").removeClass("u-grid-move-bg"),$("#"+t.options.id+"_content_fixed_tbody").find("tr").removeClass("u-grid-move-bg"),t.options.multiSelect&&$("#"+t.options.id+"_content_multiSelect").find("div").removeClass("u-grid-move-bg"),t.options.showNumCol&&$("#"+t.options.id+"_content_numCol").find("div").removeClass("u-grid-move-bg"),"function"==typeof t.options.onContentOut){var e={};e.gridObj=t;var o=$(i.target).closest("tr");if(o.length>0&&!o.is(".u-grid-content-sum-row")){var n=$('tr[role="row"]',o.parent()).index(o);e.rowObj=t.dataSourceObj.rows[n],e.rowIndex=n}t.options.onContentOut(e)}})};i.initEventFun=e,i.initGridEventFun=o,i.initContentDivEventFun=n},function(t,i){"use strict";i.__esModule=!0;var e=function(t,i){return i.showTree&&(t.sortable=!1),t},o=function(){this.options.showTree&&(this.options.showNumCol=!1)},n=function(t){var i=this,e=$(t.target),o=e.closest("td");if(o.length>0){var n=o.parent(),s=this.getTrIndex(n),r=i.dataSourceObj.rows[s];if(r){var d=i.getChildRowIndex(r);if(e.hasClass("uf-minusbutton")||e.hasClass("uf-addsquarebutton2")){var a=o.find(".uf-minusbutton"),l=o.find(".uf-addsquarebutton2");if(a.length>0){if(a.removeClass("uf-minusbutton").addClass("uf-addsquarebutton2"),d.length>0){var h=i.getAllChildRowIndex(r);$.each(h,function(){var t=$('tr[role="row"]:eq('+parseInt(this)+")",n.parent());t.css("display","none"),$("#"+i.options.id+"_content_multiSelect >div:nth-child("+(parseInt(this)+1)+")").css("display","none"),$(".uf-minusbutton",t).removeClass("uf-minusbutton").addClass("uf-addsquarebutton2")})}"form"==this.options.editType&&($("#"+this.options.id+"_multiSelect_edit").remove(null,!0),$("#"+this.options.id+"_numCol_edit").remove(null,!0),$("#"+this.options.id+"_edit_tr").remove(null,!0),$("#"+this.options.id+"_edit_tr1").remove(null,!0))}else l.length>0&&(l.removeClass("uf-addsquarebutton2").addClass("uf-minusbutton"),d.length>0&&$.each(d,function(){var t=$('tr[role="row"]:eq('+parseInt(this)+")",n.parent());t.css("display","");$("#"+i.options.id+"_content_multiSelect >div:nth-child("+(parseInt(this)+1)+")")[0];$("#"+i.options.id+"_content_multiSelect >div:nth-child("+(parseInt(this)+1)+")").css("display","")}));this.resetLeftHeight()}}}},s=function(t,i,e){var o,n=this,s=this.dataSourceObj.rows.length;if(this.options.showTree){this.hasParent=!1,this.hasChildF=!1;var r=this.options.keyField,d=this.options.parentKeyField,a=this.getString($(t).attr(r),"");e.keyValue=a;var l=this.getString($(t).attr(d),"");e.parentKeyValue=l;var h;if($.each(this.dataSourceObj.rows,function(t){var o=this.value,s=n.getString($(o).attr(r),""),u=n.getString($(o).attr(d),"");if(s==l){n.hasParent=!0,n.addRowParentIndex=t,h=n.getAllChildRow(this).length;var c=this.level;if(e.level=c+1,i=n.addRowParentIndex+h+1,!n.options.needTreeSort)return!1}if(u==a&&(n.hasChildF=!0),n.hasParent&&n.hasChildF)return!1}),this.hasParent||(e.level=0,i!=s&&(i=s)),this.hasParent){var u=$("#"+this.options.id+"_content_div").find("tbody").find('tr[role="row"]').eq(n.addRowParentIndex);if(h>0){var c=$(".uf-addsquarebutton2",u);c.length>0||(o="block")}else{this.options.autoExpand&&(o="block");var p=$("div:eq(0)",u),c=$(".uf-addsquarebutton2",u),f=$(".uf-minusbutton",u);if(this.options.autoExpand)var m='<span class="uf u-grid-content-tree-span uf-minusbutton"></span>';else var m='<span class="uf u-grid-content-tree-span uf-addsquarebutton2"></span>';if(p.length>0&&0==c.length&&0==f.length){p[0].insertAdjacentHTML("afterBegin",m);var w=parseInt(p[0].style.left);s=w-16,(s>0||0==s)&&(p[0].style.left=s+"px")}c.length>0&&c.removeClass("uf-addsquarebutton2").addClass("uf-minusbutton")}}}return{index:i,displayFlag:o}},r=function(t){if(this.hasChildF)this.dataSourceObj.sortRows(),this.repairContent();else{if(this.hasParent){var i=this.dataSourceObj.rows[this.addRowParentIndex];i.hasChild=!0,i.childRow.push(t),i.childRowIndex.push(t.valueIndex),t.parentRow=i,t.parentRowIndex=this.addRowParentIndex}t.hasChild=!1,t.childRow=new Array,t.childRowIndex=new Array}},d=function(t,i,e,o){var n=this,s=this.options.keyField,r=this.options.parentKeyField;if(this.options.showTree&&(i==s||i==r)){var d=!1,a=!1;if($.each(this.dataSourceObj.rows,function(t){var o=this.value,l=n.getString($(o).attr(s),""),h=n.getString($(o).attr(r),"");i==s&&e==h&&(a=!0),i==r&&e==l&&(d=!0)}),a||d){var l=$(this.dataSourceObj.rows[t].value);this.deleteOneRow(t),this.addOneRow(l[0])}}return!this.options.showTree||i!=s&&i!=r||!a&&!d||(t=this.getRowIndexByValue(i,e)),t},a=function(t){return t.allChildRow=new Array,this.getAllChildRowFun(t,t.allChildRow),t.allChildRow},l=function(t){var i=[];return t.childRow&&t.childRow.length>0&&$.each(t.childRow,function(){i.push(this.valueIndex)}),i},h=function(t){return t.allChildRowIndex=new Array,this.getAllChildRowIndexFun(t,t.allChildRowIndex),t.allChildRowIndex},u=function(t,i){var e=this;t.childRow.length>0&&(Array.prototype.push.apply(i,t.childRow),$.each(t.childRow,function(){e.getAllChildRowFun(this,i)}))},c=function(t,i){var e=this;t.childRow.length>0&&(Array.prototype.push.apply(i,this.getChildRowIndex(t)),$.each(t.childRow,function(){e.getAllChildRowIndexFun(this,i)}))},p=function(t){var i=this.getRowIndexByValue(this.options.keyField,t);this.expandNodeByIndex(i)},f=function(t){for(var i,e=this.getRowByIndex(t),o=!1,n=new Array,s=e;!o;){if(""==s.parentKeyValue){o=!0;break}i=s.parentRowIndex,s=s.parentRow;var r=$("#"+this.options.id+"_content_div").find("tbody").find('tr[role="row"]').eq(i),d=$(".uf-addsquarebutton2",r);if(!(d.length>0)){o=!0;break}n.push(i)}if(n.length>0)for(var a=n.length-1;a>-1;a--){var l=n[a],r=$("#"+this.options.id+"_content_div").find("tbody").find('tr[role="row"]').eq(l),d=$(".uf-addsquarebutton2",r);d.click()}var h=$("#"+this.options.id+"_content_div").find("tbody").find('tr[role="row"]').eq(t),d=$(".uf-addsquarebutton2",h),u=$(".u-grid-content-td-div",h);d.length>0?d.click():u.click()},m=function(t,i){var e=this,o=new Array;if(this.rows=new Array,this.hasParentRows=new Array,this.nothasParentRows=new Array,this.options.values){$.each(this.options.values,function(t){var i={},o=$(this),n=e.gridComp.options.keyField,s=e.gridComp.options.parentKeyField,r=e.gridComp.getString(o.attr(n),""),d=e.gridComp.getString(o.attr(s),"");i.valueIndex=t,i.value=this,i.keyValue=r,i.parentKeyValue=d,""==d?e.nothasParentRows.push(i):e.hasParentRows.push(i),e.rows.push(i)}),$.each(this.hasParentRows,function(t){var i=this.parentKeyValue,n=!1;$.each(e.rows,function(){this.keyValue==i&&(n=!0)}),n||(o.push(this),e.nothasParentRows.push(this))}),$.each(o,function(){var t=e.hasParentRows.indexOf(this);e.hasParentRows.splice(t,1)}),e.rows=new Array;var n=0;$.each(this.nothasParentRows,function(t){this.level=n,e.rows.push(this),e.pushChildRows(this,n)})}},w=function(t,i){var e=t.keyValue,o=this,n=parseInt(i)+1,s=!1,r=new Array,d=new Array,a=new Array;$.each(this.hasParentRows,function(t){if(this&&this.parentKeyValue==e){s=!0,this.level=n,o.rows.push(this),r.push(this);var i=parseInt(o.rows.length-1);d.push(i),a.push(this),o.pushChildRows(this,n)}}),$.each(a,function(){var t=o.hasParentRows.indexOf(this);o.hasParentRows.splice(t,1)}),t.hasChild=s,t.childRow=r,t.childRowIndex=d};i.re_initTree=e,i.re_initOptionsTree=o,i.re_clickFunTree=n,i.re_addOneRowTree=s,i.re_addOneRowTreeHasChildF=r,i.re_updateValueAtTree=d,i.getAllChildRow=a,i.re_getChildRowIndex=l,i.getAllChildRowIndex=h,i.getAllChildRowFun=u,i.getAllChildRowIndexFun=c,i.expandNode=p,i.expandNodeByIndex=f,i.re_treeSortRows=m,i.pushChildRows=w},function(t,i,e){"use strict";function o(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0,i.column=void 0;var n=e(7),s=e(5),r=function a(t,i){o(this,a),this.init(t,i)},d=r.prototype;d.init=n.init,d.initTree=n.initTree,d.getBooleanOptions=n.getBooleanOptions,d.initTree=s.re_initTree,i.column=r},function(module,exports){"use strict";exports.__esModule=!0;var init=function init(options,gridComp){var gridOptions=gridComp.options;this.gridGetBoolean=gridComp.getBoolean,this.defaults={width:"200",sortable:!0,canDrag:!0,fixed:!1,visible:!0,canVisible:!0,sumCol:!1,editable:!0,editFormShow:!0,autoExpand:!1,editType:"text",dataType:"String",format:"YYYY-MM-DD hh:mm:ss",headerLevel:1,hiddenLevel:1};var gridDefault={sortable:gridOptions.sortable,canDrag:gridOptions.canDrag,width:gridOptions.columnWidth};"Date"==options.dataType&&(this.defaults.format="YYYY-MM-DD"),options=this.initTree(options,gridOptions),this.options=$.extend({},this.defaults,gridDefault,options),this.getBooleanOptions();try{"string"==typeof this.options.renderType&&(this.options.renderType=eval(this.options.renderType))}catch(e){}try{"string"==typeof this.options.editType&&(this.options.editType=eval(this.options.editType))}catch(e){}this.options.width=this.options.width,this.firstColumn=!1},initTree=function(t){return t},getBooleanOptions=function(){this.options.sortable=this.gridGetBoolean(this.options.sortable),this.options.canDrag=this.gridGetBoolean(this.options.canDrag),this.options.fixed=this.gridGetBoolean(this.options.fixed),this.options.visible=this.gridGetBoolean(this.options.visible),this.options.canVisible=this.gridGetBoolean(this.options.canVisible),this.options.sumCol=this.gridGetBoolean(this.options.sumCol),this.options.editable=this.gridGetBoolean(this.options.editable),this.options.editFormShow=this.gridGetBoolean(this.options.editFormShow),this.options.autoExpand=this.gridGetBoolean(this.options.autoExpand)};exports.init=init,exports.initTree=initTree,exports.getBooleanOptions=getBooleanOptions},function(t,i,e){"use strict";function o(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0,i.gridComp=void 0;var n=e(9),s=e(11),r=e(4),d=e(12),a=e(13),l=e(14),h=e(15),u=e(16),c=e(17),p=e(18),f=e(19),m=e(20),w=e(21),v=e(22),g=e(23),C=e(24),_=e(25),b=e(26),y=e(27),x=e(28),R=e(29),$=e(3),S=e(30),F=e(31),T=e(5),I=function q(t,i){o(this,q),this.init(t,i),this.initGrid()};I.prototype.formatWidth=m.formatWidth,I.prototype.swapEle=m.swapEle,I.prototype.getString=m.getString,I.prototype.getInt=m.getInt,I.prototype.getFloat=m.getFloat,I.prototype.cloneObj=m.cloneObj,I.prototype.DicimalFormater=m.DicimalFormater,I.prototype.accAdd=m.accAdd,I.prototype.getTrIndex=m.getTrIndex,I.prototype.getDataTableRowIdByRow=m.getDataTableRowIdByRow,I.prototype.updateLastRowFlag=f.updateLastRowFlag,I.prototype.updateNumColLastRowFlag=f.updateNumColLastRowFlag,I.prototype.columnsVisibleFun=f.columnsVisibleFun,I.prototype.resetThVariable=f.resetThVariable,I.prototype.resetThVariableDrag=f.resetThVariableDrag,I.prototype.resetThVariableHeaderLevel=f.resetThVariableHeaderLevel,I.prototype.headerFirstClassFun=f.headerFirstClassFun,I.prototype.setRenderType=f.setRenderType,I.prototype.setShowHeader=f.setShowHeader,I.prototype.setColumnPrecision=f.setColumnPrecision,I.prototype.setMultiSelect=f.setMultiSelect,I.prototype.setShowNumCol=f.setShowNumCol,I.prototype.isGridShow=f.isGridShow,I.prototype.getBoolean=f.getBoolean,I.prototype.isDblEvent=p.isDblEvent,I.prototype.dblClickFun=p.dblClickFun,I.prototype.clickFun=p.clickFun,I.prototype.clickFunTree=p.clickFunTree,I.prototype.clickFunEdit=p.clickFunEdit,I.prototype.createDivs=n.createDivs,I.prototype.repaintDivs=n.repaintDivs,I.prototype.createGridDivs=n.createGridDivs,I.prototype.repaintGridDivs=n.repaintGridDivs,I.prototype.createColumnMenu=n.createColumnMenu,I.prototype.createHeader=n.createHeader,I.prototype.createHeaderTable=n.createHeaderTable,I.prototype.createHeaderTableFixed=n.createHeaderTableFixed,I.prototype.createHeaderDrag=n.createHeaderDrag,I.prototype.createColgroup=n.createColgroup,I.prototype.createThead=n.createThead,I.prototype.createContent=n.createContent,I.prototype.createContentSumRow=n.createContentSumRow,I.prototype.createContentLeft=n.createContentLeft,I.prototype.createContentLeftMultiSelectRow=n.createContentLeftMultiSelectRow,I.prototype.createContentLeftNumColRow=n.createContentLeftNumColRow,I.prototype.createContentTable=n.createContentTable,I.prototype.createContentTableFixed=n.createContentTableFixed,I.prototype.createNoRowsDiv=n.createNoRowsDiv,I.prototype.createContentRows=n.createContentRows,I.prototype.createContentRowsSumRow=n.createContentRowsSumRow,I.prototype.createContentOneRow=n.createContentOneRow,I.prototype.createContentOneRowForIE=n.createContentOneRowForIE,I.prototype.repaintRow=n.repaintRow,I.prototype.createContentOneRowTd=n.createContentOneRowTd,I.prototype.createContentOneRowTdForIE=n.createContentOneRowTdForIE,I.prototype.repairContent=n.repairContent,I.prototype.trHoverFun=s.trHoverFun,I.prototype.setIntervalFun=s.setIntervalFun,I.prototype.editorRowChangeFun=s.editorRowChangeFun,I.prototype.afterGridDivsCreate=s.afterGridDivsCreate,I.prototype.countRowHeight=s.countRowHeight,I.prototype.noRowsShowFun=s.noRowsShowFun,I.prototype.afterRepaintGrid=s.afterRepaintGrid,I.prototype.resetScrollLeft=s.resetScrollLeft,I.prototype.hideEditMenu=s.hideEditMenu,I.prototype.resetLeftHeight=s.resetLeftHeight,I.prototype.initEventFun=r.initEventFun,I.prototype.initGridEventFun=r.initGridEventFun,I.prototype.initContentDivEventFun=r.initContentDivEventFun,I.prototype.getColumnAttr=d.getColumnAttr,I.prototype.getColumnByField=d.getColumnByField,I.prototype.getIndexOfColumn=d.getIndexOfColumn,I.prototype.getVisibleIndexOfColumn=d.getVisibleIndexOfColumn,I.prototype.getNextVisibleInidexOfColumn=d.getNextVisibleInidexOfColumn,I.prototype.getSelectRows=d.getSelectRows,I.prototype.getSelectRowsIndex=d.getSelectRowsIndex,I.prototype.getFocusRow=d.getFocusRow,I.prototype.getFocusRowIndex=d.getFocusRowIndex,I.prototype.getAllRows=d.getAllRows,I.prototype.getRowByIndex=d.getRowByIndex,I.prototype.getRowIndexByValue=d.getRowIndexByValue,I.prototype.getChildRowIndex=d.getChildRowIndex,I.prototype.getColumnByVisibleIndex=d.getColumnByVisibleIndex,I.prototype.init=a.init,I.prototype.getBooleanOptions=a.getBooleanOptions,I.prototype.initDefault=a.initDefault,I.prototype.initGrid=a.initGrid,I.prototype.destroySelf=a.destroySelf,I.prototype.initOptions=a.initOptions,I.prototype.initOptionsTree=a.initOptionsTree,I.prototype.initVariable=a.initVariable,I.prototype.initDataSourceVariable=a.initDataSourceVariable,I.prototype.initWidthVariable=a.initWidthVariable,I.prototype.initGridCompColumn=a.initGridCompColumn,I.prototype.initGridCompColumnVar=a.initGridCompColumnVar,I.prototype.initGridCompColumnFun=a.initGridCompColumnFun,I.prototype.initGridCompColumnColumnMenuFun=a.initGridCompColumnColumnMenuFun,I.prototype.initGridCompColumnHeaderLevelFun=a.initGridCompColumnHeaderLevelFun,I.prototype.initGridCompColumnLoacl=a.initGridCompColumnLoacl,I.prototype.initGridHiddenLevelColumn=a.initGridHiddenLevelColumn,I.prototype.initGridCompFixedColumn=a.initGridCompFixedColumn,I.prototype.setRequired=a.setRequired,I.prototype.initDataSource=a.initDataSource,I.prototype.addOneRow=l.addOneRow,I.prototype.addOneRowTree=l.addOneRowTree,I.prototype.addOneRowTreeHasChildF=l.addOneRowTreeHasChildF,I.prototype.editClose=l.editClose,I.prototype.addRows=l.addRows,I.prototype.createContentOneRowFixed=l.createContentOneRowFixed,I.prototype.updateEditRowIndex=l.updateEditRowIndex,I.prototype.deleteOneRow=l.deleteOneRow,I.prototype.repairSumRow=l.repairSumRow,I.prototype.deleteOneRowTree=l.deleteOneRowTree,I.prototype.deleteRows=l.deleteRows,I.prototype.updateRow=l.updateRow,I.prototype.updateValueAt=l.updateValueAt,I.prototype.updateValueAtTree=l.updateValueAtTree,I.prototype.updateValueAtEdit=l.updateValueAtEdit,I.prototype.setRowSelect=l.setRowSelect,I.prototype.setRowUnselect=l.setRowUnselect,I.prototype.setAllRowSelect=l.setAllRowSelect,I.prototype.setAllRowUnSelect=l.setAllRowUnSelect,I.prototype.setRowFocus=l.setRowFocus,I.prototype.setRowUnFocus=l.setRowUnFocus,I.prototype.resetNumCol=l.resetNumCol,I.prototype.renderTypeFun=h.renderTypeFun,I.prototype.renderTypeByColumn=h.renderTypeByColumn,I.prototype.renderTypeSumRow=h.renderTypeSumRow,I.prototype.getRenderOverFlag=h.getRenderOverFlag,I.prototype.setColumnVisibleByColumn=u.setColumnVisibleByColumn,I.prototype.setColumnVisibleByIndex=u.setColumnVisibleByIndex,I.prototype.setCoulmnWidthByField=u.setCoulmnWidthByField,I.prototype.setColumnWidth=u.setColumnWidth,I.prototype.setDataSource=u.setDataSource,I.prototype.setDataSourceFun1=u.setDataSourceFun1,I.prototype.widthChangeFun=c.widthChangeFun,I.prototype.widthChangeGridFun=c.widthChangeGridFun,I.prototype.widthChangeGridFunFixed=c.widthChangeGridFunFixed,I.prototype.widthChangeGridFunOverWidthHidden=c.widthChangeGridFunOverWidthHidden,I.prototype.heightChangeFun=c.heightChangeFun,I.prototype.contentWidthChange=c.contentWidthChange,I.prototype.noScrollWidthReset=c.noScrollWidthReset;var O=I.prototype,A=O.initGridCompColumn,W=O.initEventFun,E=O.initGridEventFun;O.initGridCompColumnColumnMenuFun=w.re_initGridCompColumnColumnMenuFun,O.initGridCompColumn=function(){A.apply(this,arguments),w.colMenu_initGridCompColumn.apply(this,arguments)},O.createColumnMenu=w.re_createColumnMenu,O.initEventFun=function(){W.apply(this,arguments),w.colMenu_initEventFun.apply(this,arguments)},O.initGridEventFun=function(){E.apply(this,arguments),w.colMenu_initGridEventFun.apply(this,arguments)},"undefined"==typeof O.saveGridCompColumnArrToLocal&&(O.saveGridCompColumnArrToLocal=function(){}),"undefined"==typeof O.clearLocalData&&(O.clearLocalData=function(){});var M=O.initEventFun,L=O.initGridEventFun;O.createHeaderDrag=v.re_createHeaderDrag,O.initEventFun=function(){M.apply(this,arguments),v.drag_initEventFun.apply(this,arguments)},O.initGridEventFun=function(){L.apply(this,arguments),v.drag_initGridEventFun.apply(this,arguments)},O.dragStart=v.dragStart,O.dragFun=v.dragFun,O.dragEnd=v.dragEnd,"undefined"==typeof O.saveGridCompColumnArrToLocal&&(O.saveGridCompColumnArrToLocal=function(){}),O.headerThDrag=v.headerThDrag,O.resetThVariableDrag=v.re_resetThVariableDrag;var j=O.initEventFun;O.hideEditMenu=g.re_hideEditMenu,O.clickFunEdit=g.re_clickFunEdit,O.editRowFun=g.editRowFun,O.editRowIndexFun=g.editRowIndexFun,O.editRow=g.editRow,O.editClose=g.re_editClose,O.editCell=g.editCell,O.nextEditShow=g.nextEditShow,O.editValueChange=g.editValueChange,"undefined"==typeof O.formEditCell&&(O.formEditCell=function(){}),O.updateEditRowIndex=g.re_updateEditRowIndex,O.updateValueAtEdit=g.re_updateValueAtEdit,O.setEditType=g.setEditType,O.setEditable=g.setEditable,O.initEventFun=function(){j.apply(this,arguments),g.edit_initEventFun.apply(this,arguments)},O.setGridEditType=g.setGridEditType,O.setGridEditTypeAndEditRow=g.setGridEditTypeAndEditRow;var H=O.initDefault,D=O.setRequired;O.initDefault=function(){H.apply(this,arguments),C.editForm_initDefault.apply(this,arguments)},O.setRequired=function(){D.apply(this,arguments),C.editForm_setRequired.apply(this,arguments)},O.editorRowChangeFun=C.re_editorRowChangeFun,O.formEditCell=C.formEditCell;var G=O.columnsVisibleFun;O.initGridCompFixedColumn=_.re_initGridCompFixedColumn,O.columnsVisibleFun=function(){G.apply(this,arguments),_.fixed_columnsVisibleFun.apply(this,arguments)},O.createHeaderTableFixed=_.re_createHeaderTableFixed,O.createContentTableFixed=_.re_createContentTableFixed,O.createContentOneRowFixed=_.re_createContentOneRowFixed,O.widthChangeGridFunFixed=_.re_widthChangeGridFunFixed,O.createFromDivs=b.createFromDivs,O.createFromContent=b.createFromContent,O.createFormContentRows=b.createFormContentRows,O.widthChangeFormFun=O,O.resetThVariableHeaderLevel=y.re_resetThVariableHeaderLevel,O.initGridCompColumnHeaderLevelFun=y.re_initGridCompColumnHeaderLevelFun,O.getLevelTitleByField=y.getLevelTitleByField,O.initGridCompColumnLoacl=x.re_initGridCompColumnLoacl,O.getLocalData=x.getLocalData,O.saveLocalData=x.saveLocalData,O.clearLocalData=x.clearLocalData,O.saveGridCompColumnArrToLocal=x.saveGridCompColumnArrToLocal,O.getGridCompColumnArrFromLocal=x.getGridCompColumnArrFromLocal,O.initGridHiddenLevelColumn=R.re_initGridHiddenLevelColumn,O.widthChangeGridFunOverWidthHidden=R.re_widthChangeGridFunOverWidthHidden;var k=O.initEventFun,B=O.initGridEventFun;O.initEventFun=function(){k.apply(this,arguments),$.sort_initEventFun.apply(this,arguments)},O.initGridEventFun=function(){B.apply(this,arguments),$.sort_initGridEventFun.apply(this,arguments)},O.canSortable=$.canSortable,O.deleteOneRowTree=$.re_deleteOneRowTree,O.sortRowsByPrio=$.sortRowsByPrio,O.createContentRowsSumRow=S.re_createContentRowsSumRow,O.createContentSumRow=S.re_createContentSumRow,O.createSumRow=S.createSumRow,O.createSumRowForIE=S.createSumRowForIE,O.repairSumRow=S.re_repairSumRow,O.renderSumRow=S.renderSumRow,O.renderTypeSumRow=S.re_renderTypeSumRow;var V=O.initEventFun,N=O.initGridEventFun;O.initEventFun=function(){V.apply(this,arguments),F.swap_initEventFun.apply(this,arguments)},O.initGridEventFun=function(){N.apply(this,arguments),F.swap_initGridEventFun.apply(this,arguments)},O.swapColumnStart=F.swapColumnStart,O.swapColumnFun=F.swapColumnFun,O.swapColumnEnd=F.swapColumnEnd,O.initOptionsTree=T.re_initOptionsTree,O.clickFunTree=T.re_clickFunTree,O.addOneRowTree=T.re_addOneRowTree,O.addOneRowTreeHasChildF=T.re_addOneRowTreeHasChildF,O.updateValueAtTree=T.re_updateValueAtTree,O.getAllChildRow=T.getAllChildRow,O.getChildRowIndex=T.re_getChildRowIndex,O.getAllChildRowIndex=T.getAllChildRowIndex,O.getAllChildRowFun=T.getAllChildRowFun,O.getAllChildRowIndexFun=T.getAllChildRowIndexFun,O.expandNode=T.expandNode,O.expandNodeByIndex=T.expandNodeByIndex,i.gridComp=I},function(t,i,e){"use strict";i.__esModule=!0,i.repairContent=i.createContentOneRowTdForIE=i.createContentOneRowTd=i.repaintRow=i.createContentOneRowForIE=i.createContentOneRow=i.createContentRowsSumRow=i.createContentRows=i.createNoRowsDiv=i.createContentTableFixed=i.createContentTable=i.createContentLeftNumColRow=i.createContentLeftMultiSelectRow=i.createContentLeft=i.createContentSumRow=i.createContent=i.createThead=i.createColgroup=i.createHeaderDrag=i.createHeaderTableFixed=i.createHeaderTable=i.createHeader=i.createColumnMenu=i.repaintGridDivs=i.createGridDivs=i.repaintDivs=i.createDivs=void 0;var o=e(10),n=function(){var t="",i="",e="";this.ele.innerHTML="",i+=this.options.width?"width:"+this.options.width+";":"width:auto;",i+=this.options.height?"height:"+this.options.height+";":"height:auto;",""!=i&&(t='style="'+i+'"'),o.gridBrowser.isMobile&&(e="u-grid-mobile");var n='<div id="'+this.options.id+'" data-role="grid" class="u-grid '+e+'" '+t+">";n+="</div>",this.ele.insertAdjacentHTML("afterBegin",n);var n='<div id="'+this.options.id+'_top" class="u-grid-top"></div>';document.body.appendChild($(n)[0]),this.initEventFun(),this.widthChangeFun()},s=function(){this.repaintGridDivs(),this.realtimeTableRows=null},r=function(){if(!this.createGridFlag){$("#"+this.options.id)[0]&&($("#"+this.options.id)[0].innerHTML="");var t='<div id="'+this.options.id+'_grid" class="u-grid-grid">';
t+=this.createHeader(),t+=this.createContent(),t+="</div>",$("#"+this.options.id)[0]&&$("#"+this.options.id).html(t),$(document.body).append(this.createColumnMenu()),this.initGridEventFun(),this.headerFirstClassFun(),this.showType="grid",this.afterGridDivsCreate(),this.createGridFlag=!0,this.realtimeTableRows=null}},d=function(){$("#"+this.options.id+"_grid").remove(null,!0),this.showType="",this.wholeWidth=0,this.createGridFlag=!1,this.columnsVisibleFun(),this.widthChangeFun(),this.realtimeTableRows=null},a=function(){return""},l=function(){var t="",i="";this.options.showHeader||(i='style="display:none;"');var e='<div class="u-grid-header" id="'+this.options.id+'_header" '+i+'><div class="u-grid-header-wrap" id="'+this.options.id+'_header_wrap" data-role="resizable" '+t+">";return this.options.columnMenu&&(e+='<div class="u-grid-header-columnmenu uf uf-reorderoption"></div>'),(this.options.multiSelect||this.options.showNumCol)&&(e+='<div id="'+this.options.id+'_header_left" class="u-grid-header-left" style="width:'+this.leftW+'px;">',this.options.multiSelect&&(e+=o.gridBrowser.isIE8?'<div class="u-grid-header-multi-select" style="width:'+this.multiSelectWidth+'px;"><span class="u-grid-checkbox-outline" id="'+this.options.id+'_header_multi_input"><span class="u-grid-checkbox-tick-outline"></span></span></div>':'<div class="u-grid-header-multi-select checkbox check-success" style="width:'+this.multiSelectWidth+'px;"><span class="u-grid-checkbox-outline" id="'+this.options.id+'_header_multi_input"><span class="u-grid-checkbox-tick-outline"></span></span></div>'),this.options.showNumCol&&(e+='<div class="u-grid-header-num" style="width:'+this.numWidth+'px;"></div>'),e+="</div>"),e+=this.createHeaderTableFixed(),e+=this.createHeaderTable(),e+="</div>",e+=this.createHeaderDrag(),e+="</div>"},h=function(t){var i,e,o;"fixed"==t?(i=parseInt(this.leftW),e="absolute;width:"+this.fixedWidth+"px;z-index:11;background:#F9F9F9;",o="fixed_"):(i=parseInt(this.leftW)+parseInt(this.fixedWidth),e="relative;",o="",this.contentMinWidth>0&&(e+="width:"+this.contentMinWidth+"px;"));var n='<table role="grid" id="'+this.options.id+"_header_"+o+'table" style="position:'+e+";left:"+i+'px;">';return n+=this.createColgroup(t),n+='<thead role="rowgroup" id="'+this.options.id+"_header_"+o+'thead">',n+=this.createThead(t),n+="</thead></table>"},c=function(){return""},p=function(){return""},f=function(t){var i,e=this,o="<colgroup>";return i="fixed"==t?this.gridCompColumnFixedArr:this.gridCompColumnArr,$.each(i,function(){this.options.visible&&(o+="<col",o+=' style="width:'+e.formatWidth(this.options.width)+'"',o+=">")}),o+="</colgroup>"},m=function(t){var i,e=0,o="";this.options.maxHeaderLevel>1&&(o='style="height:'+(this.headerHeight-1)+'px;"');var n='<tr role="row" '+o+">";return i="fixed"==t?this.gridCompColumnFixedArr:this.gridCompColumnArr,$.each(i,function(t){var i=e,o="";0==this.options.visible?(i=-1,o='style="display:none;"'):e++,n+='<th role="columnheader" data-filed="'+this.options.field+'" rowspan="1" class="u-grid-header-th" '+o+'field="'+this.options.field+'" index="'+t+'" visibleIndex="'+i+'"><div style="position:relative;">';var s="";this.options.headerColor&&(s='style="color:'+this.options.headerColor+'"'),n+='<div class="u-grid-header-link" field="'+this.options.field+'" '+s+">"+this.options.title+"</div>",n+="</div></th>"}),n+="</tr>"},w=function(){var t="",i="",e="";if(this.countContentHeight){var o=$("#"+this.options.id)[0].offsetHeight;this.wholeHeight=o,o>0&&(this.contentHeight=parseInt(o)-this.exceptContentHeight-1>0?parseInt(o)-this.exceptContentHeight-1:0,this.contentHeight>0&&(t='style="height:'+this.contentHeight+'px;"'))}var n='<div id="'+this.options.id+'_content" class="u-grid-content" '+t+">";return(this.options.showNumCol||this.options.multiSelect)&&(n+=this.createContentLeft(),this.contentWidth>this.contentMinWidth||(i="display:none;",e="bottom:0px;"),n+=this.createContentSumRow(e),u.isIOS&&(i+="width:0px;"),n+='<div class="u-grid-content-left-bottom" id="'+this.options.id+'_content_left_bottom" style="width:'+(this.leftW+this.fixedWidth)+"px;"+i+'">',n+="</div>"),n+=this.createContentTableFixed(),n+=this.createContentTable(),n+="</div>"},v=function(){return""},g=function(){var t,i=this,e="",o=0;return this.options.multiSelect&&(e+='<div class="u-grid-content-left" id="'+this.options.id+'_content_multiSelect" style="width:'+this.multiSelectWidth+"px;"+t+'">',this.dataSourceObj.rows&&$.each(this.dataSourceObj.rows,function(t){e+=i.createContentLeftMultiSelectRow(this)}),e+="</div>",o+=this.multiSelectWidth),this.options.showNumCol&&(e+='<div class="u-grid-content-left" id="'+this.options.id+'_content_numCol" style="width:'+this.numWidth+"px;left:"+o+"px;"+t+'">',this.dataSourceObj.rows&&$.each(this.dataSourceObj.rows,function(t,o){e+=i.createContentLeftNumColRow(t,o.value)}),e+="</div>"),e},C=function(t,i){var e="";!this.options.autoExpand&&t.level>0&&"block"!=i&&(e="display:none;");var n=t.value["$_#_@_id"];n||(n=setTimeout(function(){}));var s=t.value,r=this.selectRows,d=E(s,r);if(o.gridBrowser.isIE8)var a='<div style="width:'+this.multiSelectWidth+"px;"+e+'" class="u-grid-content-multiSelect " ><span class="u-grid-checkbox-outline" id="checkbox'+n+'" value="1"><span class="u-grid-checkbox-tick-outline"></span></span></div>';else if(d)var a='<div style="width:'+this.multiSelectWidth+"px;"+e+'" class="u-grid-content-multiSelect checkbox check-success u-grid-content-sel-row" ><span class="u-grid-checkbox-outline is-checked" id="checkbox'+n+'" value="1"><span class="u-grid-checkbox-tick-outline"></span></span></div>';else var a='<div style="width:'+this.multiSelectWidth+"px;"+e+'" class="u-grid-content-multiSelect checkbox check-success" ><span class="u-grid-checkbox-outline" id="checkbox'+n+'" value="1"><span class="u-grid-checkbox-tick-outline"></span></span></div>';return a},_=function(t){var i,e=this.dataSourceObj.rows[t],o=e.value,n=this.selectRows,s=E(o,n);return i=s?'<div style="width:'+this.numWidth+'px;" class="u-grid-content-num u-grid-content-sel-row">'+(t+1)+"</div>":'<div style="width:'+this.numWidth+'px;" class="u-grid-content-num">'+(t+1)+"</div>"},b=function(t){var i,e,o,n,s,r;n=this.countContentHeight&&parseInt(this.contentHeight)>0?"height:"+this.contentHeight+"px;":"","fixed"==t?(i=parseInt(this.leftW),e="fixed_",s="fixed-",o='style="position:absolute;width:'+this.fixedWidth+"px;left:"+i+"px;"+n+'"',r='style="width:'+this.fixedWidth+'px;"'):(i=parseInt(this.leftW)+parseInt(this.fixedWidth,0),e="",s="",o='style="position:relative;left:'+i+"px;"+n,this.contentMinWidth>0&&(o+="width:"+this.contentMinWidth+"px;"),this.options.noScroll&&(o+="overflow-x:hidden;"),o+='"',r="",this.contentMinWidth>0&&(r=this.contentWidth>0?'style="min-width:'+this.contentMinWidth+"px;width:"+this.contentWidth+'px;"':'style="min-width:'+this.contentMinWidth+'px;"'));var d='<div id="'+this.options.id+"_content_"+e+'div" class="u-grid-content-'+s+'div" '+o+">";return d+='<div style="height:30px;position:absolute;top:-30px;width:100%;z-index:-1;"></div><table role="grid" id="'+this.options.id+"_content_"+e+'table" '+r+">",d+=this.createColgroup(t),d+='<thead role="rowgroup" id="'+this.options.id+"_content_"+e+'thead" style="display:none">',d+=this.createThead(t),d+="</thead>",d+=this.createContentRows(t),d+="</table>","fixed"!=t&&(d+=this.createNoRowsDiv()),d+="</div>"},y=function(){return""},x=function(){var t="",i="";this.contentMinWidth>0&&(t+='style="width:'+this.contentMinWidth+'px;"'),this.contentWidth>0&&(i+='style="width:'+this.contentWidth+'px;"');var e='<div class="u-grid-noRowsDiv"'+i+' id="'+this.options.id+'_noRows"></div>';return e+='<div class="u-grid-noRowsShowDiv"'+t+' id="'+this.options.id+'_noRowsShow">'+this.transMap.ml_no_rows+"</div>"},R=function(t){var i,e=this,o="";return i="fixed"==t?"fixed_":"",this.dataSourceObj.rows&&(o+='<tbody role="rowgroup" id="'+this.options.id+"_content_"+i+'tbody">',$.each(this.dataSourceObj.rows,function(i){o+=e.createContentOneRow(this,t)}),o+=this.createContentRowsSumRow(t),o+="</tbody>"),o},S=function(){return""},F=function(t,i,e){var o="";!this.options.autoExpand&&t.level>0&&"block"!=e&&(o='style="display:none"');var n=t.value,s=this.selectRows,r=E(n,s),d="";return d=r?'<tr role="row" class="u-grid-content-sel-row" '+o+">":'<tr role="row" '+o+">",d+=this.createContentOneRowTd(t,i),d+="</tr>"},T=function(t,i,e,o,n){var s=t.insertRow(i+1);s.setAttribute("role","row"),!this.options.autoExpand&&s.level>0&&"block"!=n&&(s.style.display="none"),this.createContentOneRowTdForIE(s,e,o)},I=function(t){var i=$("#"+this.options.id+"_content_tbody").find('tr[role="row"]')[t],e=$("#"+this.options.id+"_content_fixed_tbody").find('tr[role="row"]')[t],n=this.dataSourceObj.rows[t],s=$(i),r=this.getTrIndex(s);if(o.gridBrowser.isIE8||o.gridBrowser.isIE9){var d=$("#"+this.options.id+"_content_table")[0],a=$("#"+this.options.id+"_content_fixed_table")[0],l=i.className,h=e.className;d.deleteRow(t+1),a.deleteRow(t+1);var i=d.insertRow(t+1);u.addClass(i,l);var e=a.insertRow(t+1);u.addClass(e,h),this.createContentOneRowTdForIE(i,n),this.createContentOneRowTdForIE(e,n,"fixed")}else i.innerHTML=this.createContentOneRowTd(n),e&&(e.innerHTML=this.createContentOneRowTd(n,"fixed"));var c={};c.begin=r,c.length=1,this.renderTypeFun(c)},O=function(t,i){var e,o=this,n="",s=t.value;return e="fixed"==i?this.gridCompColumnFixedArr:this.gridCompColumnArr,$.each(e,function(){var i=this.options.field,e=$(s).attr(i);e=o.getString(e,""),"object"==$.type(e)&&(e=e.showValue);var r=(this.options.renderType,""),d="",a="",l="";if(o.options.showTree&&this.firstColumn){var h=parseInt(o.treeLeft)*parseInt(t.level);r='style="position:relative;',t.hasChild?d=o.options.autoExpand?'<span class=" uf uf-minusbutton u-grid-content-tree-span"></span>':'<span class=" uf uf-addsquarebutton2 u-grid-content-tree-span"></span>':h+=16,r+="left:"+h+'px;"'}this.options.visible||(l='style="display:none;"'),this.options.icon&&(a='<span class="'+this.options.icon+'"></span>'),n+='<td role="rowcell" '+l+' ><div class="u-grid-content-td-div" '+r+">"+d+a+"<span>"+e.replace(/\</g,"<").replace(/\>/g,">")+"</span></div></td>"}),n},A=function(t,i,e){var o,n=this,s=i.value;o="fixed"==e?this.gridCompColumnFixedArr:this.gridCompColumnArr,$.each(o,function(){var e=this.options.field,o=$(s).attr(e),o=n.getString(o,"");"object"==$.type(o)&&(o=o.showValue);var r=(this.options.renderType,""),d="",a="",l="",h=t.insertCell();if(h.setAttribute("role","rowcell"),n.options.showTree&&this.firstColumn){var u=parseInt(n.treeLeft)*parseInt(i.level);r='style="position:relative;',i.hasChild?d=n.options.autoExpand?'<span class=" uf uf-minusbutton u-grid-content-tree-span"></span>':'<span class=" uf uf-addsquarebutton2 u-grid-content-tree-span"></span>':u+=18,r+="left:"+u+'px;"'}this.options.visible||(h.style.display="none"),this.options.icon&&(a='<span class="'+this.options.icon+'"></span>'),l+='<div class="u-grid-content-td-div" '+r+">"+d+a+"<span>"+o.replace(/\</g,"<").replace(/\>/g,">")+"</span></div>",h.insertAdjacentHTML("afterBegin",l)})},W=function(){var t=$("#"+this.options.id+"_content").parent();if($("#"+this.options.id+"_content").remove(null,!0),t[0]){var i=this.createContent();t[0].insertAdjacentHTML("beforeEnd",i),this.renderTypeFun(),this.initContentDivEventFun(),$("#"+this.options.id+"_content_div")[0]&&($("#"+this.options.id+"_content_div")[0].scrollLeft=this.scrollLeft),$("#"+this.options.id+"_content_edit_menu").css("display","none")}this.realtimeTableRows=null},E=function(t,i){for(var e=i.length,o=JSON.stringify(t),n=0,s=0;s<e;s++){var r=JSON.stringify(i[s]);n+=o==r?1:0}return n>0};i.createDivs=n,i.repaintDivs=s,i.createGridDivs=r,i.repaintGridDivs=d,i.createColumnMenu=a,i.createHeader=l,i.createHeaderTable=h,i.createHeaderTableFixed=c,i.createHeaderDrag=p,i.createColgroup=f,i.createThead=m,i.createContent=w,i.createContentSumRow=v,i.createContentLeft=g,i.createContentLeftMultiSelectRow=C,i.createContentLeftNumColRow=_,i.createContentTable=b,i.createContentTableFixed=y,i.createNoRowsDiv=x,i.createContentRows=R,i.createContentRowsSumRow=S,i.createContentOneRow=F,i.createContentOneRowForIE=T,i.repaintRow=I,i.createContentOneRowTd=O,i.createContentOneRowTdForIE=A,i.repairContent=W},function(t,i){"use strict";i.__esModule=!0;var e,o={},n=navigator.userAgent,s=n.toLowerCase();if((e=s.match(/msie ([\d.]+)/))&&(o.isIE=!0),o.isIE){var r=document.documentMode;null==r||(8==r?o.isIE8=!0:9==r&&(o.isIE9=!0))}(s.indexOf("Android")>-1||s.indexOf("android")>-1||s.indexOf("Adr")>-1||s.indexOf("adr")>-1)&&(o.isAndroid=!0),o.isAndroid&&(window.screen.width>=768&&window.screen.width<1024&&(o.isAndroidPAD=!0),window.screen.width<=768&&(o.isAndroidPhone=!0)),s.match(/iphone/i)&&(o.isIOS=!0,o.isIphone=!0),(o.isIphone||o.isAndroidPhone)&&(o.isMobile=!0),i.gridBrowser=o},function(t,i){"use strict";i.__esModule=!0;var e=function(t){var i=this;if($("#"+i.options.id+"_content_tbody").find("tr").removeClass("u-grid-move-bg"),$("#"+i.options.id+"_content_fixed_tbody").find("tr").removeClass("u-grid-move-bg"),i.options.multiSelect&&$("#"+i.options.id+"_content_multiSelect").find("div").removeClass("u-grid-move-bg"),i.options.showNumCol&&$("#"+i.options.id+"_content_numCol").find("div").removeClass("u-grid-move-bg"),t>-1){var e=$("#"+i.options.id+"_content_tbody").find("tr").eq(t);if(e[0].id&&e[0].id==i.options.id+"_edit_tr")return;if($("#"+i.options.id+"_content_tbody").find("tr").eq(t).addClass("u-grid-move-bg"),$("#"+i.options.id+"_content_fixed_tbody").find("tr").eq(t).addClass("u-grid-move-bg"),i.options.multiSelect&&$("#"+i.options.id+"_content_multiSelect").find("div").eq(t).addClass("u-grid-move-bg"),i.options.showNumCol&&$("#"+i.options.id+"_content_numCol").find("div").eq(t).addClass("u-grid-move-bg"),"function"==typeof i.options.onRowHover&&!e.is(".u-grid-content-sum-row")){var o={};o.gridObj=i,o.rowObj=i.dataSourceObj.rows[t],o.rowIndex=t,i.options.onRowHover(o)}}},o=function(t){this.widthChangeFun(),this.heightChangeFun(),this.editorRowChangeFun()},n=function(){},s=function(){this.columnsVisibleFun(),this.resetThVariable(),this.countRowHeight(),this.noRowsShowFun(),this.renderTypeFun(),this.resetScrollLeft(),this.hideEditMenu(),this.resetLeftHeight(),"function"==typeof this.options.afterCreate&&this.options.afterCreate.call(this)},r=function(){$("#"+this.options.id+"_content_tbody tr")[0]&&(this.rowHeight=$("#"+this.options.id+"_content_tbody tr")[0].offsetHeight)},d=function(){if(this.options.showNumCol||this.options.multiSelect)for(var t=$("#"+this.options.id+"_content_tbody tr"),i=$("#"+this.options.id+"_content_numCol div"),e=$("#"+this.options.id+"_content_multiSelect > div"),o=0;o<t.length;o++){var n=t[o].offsetHeight;i[o]&&(i[o].style.height=n+"px"),e[o]&&(e[o].style.height=n+"px")}},a=function(){this.dataSourceObj.rows&&this.dataSourceObj.rows.length>0?($("#"+this.options.id+"_noRowsShow").css("display","none"),$("#"+this.options.id+"_noRows").css("display","none")):($("#"+this.options.id+"_noRowsShow").css("display","block"),$("#"+this.options.id+"_noRows").css("display","block"))},l=function(){this.resetScrollLeft(),this.hideEditMenu()},h=function(){if($("#"+this.options.id+"_content_div")[0])try{$("#"+this.options.id+"_content_div")[0].scrollLeft=this.scrollLeft}catch(t){}},u=function(){};i.trHoverFun=e,i.setIntervalFun=o,i.editorRowChangeFun=n,i.afterGridDivsCreate=s,i.countRowHeight=r,i.noRowsShowFun=a,i.afterRepaintGrid=l,i.resetScrollLeft=h,i.hideEditMenu=u,i.resetLeftHeight=d},function(t,i){"use strict";i.__esModule=!0;var e=function(t,i){for(var e=0;e<this.gridCompColumnArr.length;e++)if(this.gridCompColumnArr[e].options.field==i)return $(this.gridCompColumnArr[e].options).attr(t);return""},o=function(t){for(var i=0;i<this.gridCompColumnArr.length;i++)if(this.gridCompColumnArr[i].options.field==t)return this.gridCompColumnArr[i];return null},n=function(t){for(var i=-1,e=0;e<this.gridCompColumnArr.length;e++)if(this.gridCompColumnArr[e]==t){i=e;break}return i},s=function(t){for(var i=-1,e=0,o=0;o<this.gridCompColumnArr.length;o++){if(this.gridCompColumnArr[o]==t){"none"!=$("#"+this.options.id+"_header").find("th").eq(o).css("display")&&(i=e);break}"none"!=$("#"+this.options.id+"_header").find("th").eq(o).css("display")&&e++}return i},r=function(t){for(var i=-1,e=!1,o=0,n=0;n<this.gridCompColumnArr.length;n++){if(this.gridCompColumnArr[n]==t&&("none"!=$("#"+this.options.id+"_header").find("th").eq(n).css("display")&&o++,e=!0),1==e&&"none"!=$("#"+this.options.id+"_header").find("th").eq(n).css("display")){i=o;break}"none"!=$("#"+this.options.id+"_header").find("th").eq(n).css("display")&&o++}return i},d=function(){return this.selectRows},a=function(){return this.selectRowsIndex},l=function(){return this.focusRow},h=function(){return this.focusRowIndex},u=function(){var t=this;return this.allRows=new Array,this.dataSourceObj.rows&&$.each(this.dataSourceObj.rows,function(){t.allRows.push(this.value)}),this.allRows},c=function(t){return this.dataSourceObj.rows[t]},p=function(t,i){var e=-1;return $.each(this.dataSourceObj.rows,function(o){var n=$(this.value).attr(t);n==i&&(e=o)}),e},f=function(t){var i=[];return $.each(t.childRow,function(){i.push(this.valueIndex)}),i},m=function(t){for(var i=-1,e=0;e<this.gridCompColumnArr.length;e++){var o=this.gridCompColumnArr[e];if("none"!=$("#"+this.options.id+"_header").find("th").eq(e).css("display")&&i++,i==t)return o}return null};i.getColumnAttr=e,i.getColumnByField=o,i.getIndexOfColumn=n,i.getVisibleIndexOfColumn=s,i.getNextVisibleInidexOfColumn=r,i.getSelectRows=d,i.getSelectRowsIndex=a,i.getFocusRow=l,i.getFocusRowIndex=h,i.getAllRows=u,i.getRowByIndex=c,i.getRowIndexByValue=p,i.getChildRowIndex=f,i.getColumnByVisibleIndex=m},function(t,i,e){"use strict";i.__esModule=!0,i.initDataSource=i.setRequired=i.initGridCompFixedColumn=i.initGridHiddenLevelColumn=i.initGridCompColumnLoacl=i.initGridCompColumnHeaderLevelFun=i.initGridCompColumnColumnMenuFun=i.initGridCompColumnFun=i.initGridCompColumnVar=i.initGridCompColumn=i.initWidthVariable=i.initDataSourceVariable=i.initVariable=i.initOptionsTree=i.initOptions=i.destroySelf=i.initGrid=i.initDefault=i.getBooleanOptions=i.init=void 0;var o=(e(10),e(1)),n=e(6),s=function(t,i){this.dataSource=o.dataSource,this.gridCompColumn=n.column,this.ele=t[0],this.$ele=t,this.initDefault(),this.options=$.extend({},this.defaults,i),this.getBooleanOptions(),this.transDefault={ml_show_column:"显示/隐藏列",ml_clear_set:"清除设置",ml_no_rows:"无数据",ml_sum:"合计:",ml_close:"关闭"},this.transMap=$.extend({},this.transDefault,i.transMap),this.gridCompColumnFixedArr=new Array,this.gridCompColumnArr=new Array,this.countContentHeight=!0,this.minColumnWidth=80,this.scrollBarHeight=16,this.numWidth=this.options.numWidth||40,this.multiSelectWidth=this.options.multiSelectWidth||40,this.basicGridCompColumnArr=new Array,this.columnMenuWidth=160,this.columnMenuHeight=33,this.gridCompColumnFixedArr=new Array,this.gridCompLevelColumn=new Array,this.headerHeight=44*parseInt(this.options.maxHeaderLevel)+1,this.gridCompHiddenLevelColumnArr=new Array,this.treeLeft=10,this.overWidthVisibleColumnArr=new Array},r=function(){this.options.cancelFocus=this.getBoolean(this.options.cancelFocus),this.options.showHeader=this.getBoolean(this.options.showHeader),this.options.showNumCol=this.getBoolean(this.options.showNumCol),this.options.multiSelect=this.getBoolean(this.options.multiSelect),this.options.columnMenu=this.getBoolean(this.options.columnMenu),this.options.canDrag=this.getBoolean(this.options.canDrag),this.options.overWidthHiddenColumn=this.getBoolean(this.options.overWidthHiddenColumn),this.options.sortable=this.getBoolean(this.options.sortable),this.options.showSumRow=this.getBoolean(this.options.showSumRow),this.options.canSwap=this.getBoolean(this.options.canSwap),this.options.showTree=this.getBoolean(this.options.showTree),this.options.autoExpand=this.getBoolean(this.options.autoExpand),this.options.needTreeSort=this.getBoolean(this.options.needTreeSort),this.options.needLocalStorage=this.getBoolean(this.options.needLocalStorage),this.options.noScroll=this.getBoolean(this.options.noScroll),this.options.cancelSelect=this.getBoolean(this.options.cancelSelect),this.options.contentSelect=this.getBoolean(this.options.contentSelect),this.options.contentFocus=this.getBoolean(this.options.contentFocus)},d=function(){this.defaults={id:(new Date).valueOf(),editType:"default",cancelFocus:!0,cancelSelect:!0,showHeader:!0,showNumCol:!1,multiSelect:!1,columnMenu:!0,canDrag:!0,formMaxWidth:300,maxHeaderLevel:1,overWidthHiddenColumn:!1,sortable:!0,showSumRow:!1,canSwap:!0,showTree:!1,autoExpand:!0,needTreeSort:!1,needLocalStorage:!1,noScroll:!1,contentSelect:!0,contentFocus:!0}},a=function(){if(this.options.columns&&0!=this.options.columns.length){var t=this;this.initOptions(),this.initVariable(),this.initWidthVariable(),this.initGridCompColumn(),this.initDataSource(),this.createDivs(),this.inte=setInterval(function(){t.setIntervalFun.call(t)},300)}},l=function(){clearInterval(this.inte),this.$ele.data("gridComp",null),this.ele.innerHTML="",this.showTree="",this.showType=""},h=function(){this.options.width=this.formatWidth(this.options.width),this.options.height=this.formatWidth(this.options.height),"100%"!=this.options.height&&this.options.height||(this.countContentHeight=!1),this.initOptionsTree(),this.leftW=0,this.options.showNumCol&&(this.leftW+=this.numWidth),this.options.multiSelect&&(this.leftW+=this.multiSelectWidth),this.exceptContentHeight=0,this.options.showHeader&&(this.exceptContentHeight+=this.headerHeight),this.fixedWidth=0,this.options.maxHeaderLevel>1&&(this.options.canSwap=!1);var t=window.location.href,i=t.indexOf("?");i>0&&(t=t.substring(0,i)),this.localStorageId=this.options.id+t},u=function(){},c=function(){this.initDataSourceVariable(),this.mouseUpX="mouseUpX",this.mouseUpY="mouseUpY",this.mouseDownX="mouseDownX",this.mouseDownY="mouseDownY",this.mouseMoveX="mouseMoveX",this.mouseMoveY="mouseMoveY",this.scrollLeft=0,this.scrollTop=0,this.showType="",this.createGridFlag=!1,this.columnClickX=0,this.columnClickY=0,this.columnMenuMove=!1,this.firstColumn=!0,this.lastVisibleColumn=null,this.lastVisibleColumnWidth=0,this.columnMenuMove=!1,this.createColumnMenuFlag=!1,this.menuColumnsHeight=0,this.createFormFlag=!1,this.$sd_storageData=null},p=function(){this.selectRows=new Array,this.selectRowsObj=new Array,this.selectRowsIndex=new Array,this.allRows=new Array,this.eidtRowIndex=-1},f=function(){this.wholeWidth=0,this.wholeHeight=0,this.rowHeight=0,this.contentRealWidth=0,this.contentWidth=0,this.contentMinWidth=0,this.contentHeight=0,this.fixedRealWidth=0,this.fixedWidth=0},m=function(){var t=this;this.initGridCompColumnVar(),this.options.columns&&$.each(this.options.columns,function(i){t.initGridCompColumnFun(this)}),this.initGridCompColumnLoacl(),this.initGridHiddenLevelColumn(),this.initGridCompFixedColumn(),this.columnsVisibleFun()},w=function(){this.gridCompColumnArr=new Array,this.basicGridCompColumnArr=new Array,this.gridCompColumnFixedArr=new Array,this.gridCompLevelColumn=new Array,this.gridCompHiddenLevelColumnArr=new Array},v=function(t){var i=new n.column(t,this),e=i.options.width+"";e.indexOf("%")>0?this.options.noScroll="true":i.options.width=parseInt(i.options.width),i.options.optionsWidth=i.options.width,i.options.realWidth=i.options.width,this.gridCompColumnArr.push(i),this.initGridCompColumnColumnMenuFun(t),this.initGridCompColumnHeaderLevelFun(t)},g=function(t){},C=function(t){},_=function(t){},b=function(){},y=function(){},x=function(t,i){},R=function(){this.dataSourceObj=new o.dataSource(this.options.dataSource,this)};i.init=s,i.getBooleanOptions=r,i.initDefault=d,i.initGrid=a,i.destroySelf=l,i.initOptions=h,i.initOptionsTree=u,i.initVariable=c,i.initDataSourceVariable=p,i.initWidthVariable=f,i.initGridCompColumn=m,i.initGridCompColumnVar=w,i.initGridCompColumnFun=v,i.initGridCompColumnColumnMenuFun=g,i.initGridCompColumnHeaderLevelFun=C,i.initGridCompColumnLoacl=_,i.initGridHiddenLevelColumn=b,i.initGridCompFixedColumn=y,i.setRequired=x,i.initDataSource=R},function(t,i){"use strict";i.__esModule=!0;var e=function(t,i){var e="none",o={},n=this.dataSourceObj.rows.length,s=!1;o.value=t,e;var r=this.addOneRowTree(t,i,o);if(i=r.index,e=r.displayFlag,0!=i&&(i&&i>0?n<i&&(i=n):i=0),n==i&&(s=!0),o.valueIndex=i,o.value=t,this.dataSourceObj.rows.splice(i,0,o),this.dataSourceObj.rows.length>i+1&&$.each(this.dataSourceObj.rows,function(t){t>i&&(this.valueIndex=this.valueIndex+1)}),"grid"==this.showType){this.editClose(),this.updateEditRowIndex("+",i);try{var d=this.createContentOneRow(o,"normal",e);if(s)$("#"+this.options.id+"_content_tbody")[0].insertAdjacentHTML("beforeEnd",d);else{var a=$("#"+this.options.id+"_content_tbody").find('tr[role="row"]')[i],l=$("#"+this.options.id+"_content_tbody")[0];a?a.insertAdjacentHTML("beforeBegin",d):l&&l.insertAdjacentHTML("afterBegin",d)}if($("#"+this.options.id+"_content_fixed_div").length>0){var d=this.createContentOneRow(o,"fixed",e);if(s)$("#"+this.options.id+"_content_fixed_tbody")[0].insertAdjacentHTML("beforeEnd",d);else{var a=$("#"+this.options.id+"_content_fixed_tbody").find('tr[role="row"]')[i];a?a.insertAdjacentHTML("beforeBegin",d):$("#"+this.options.id+"_content_fixed_tbody")[0]&&$("#"+this.options.id+"_content_fixed_tbody")[0].insertAdjacentHTML("afterBegin",d)}}}catch(h){var u=$("#"+this.options.id+"_content_div table")[0];u&&this.createContentOneRowForIE(u,i,o,"normal",e);var c=$("#"+this.options.id+"_content_fixed_div table")[0];c&&this.createContentOneRowForIE(c,i,o,"fixed",e)}if(this.options.multiSelect){var d=this.createContentLeftMultiSelectRow(o,e);if(s)$("#"+this.options.id+"_content_multiSelect")[0].insertAdjacentHTML("beforeEnd",d);else{var p=$("#"+this.options.id+"_content_multiSelect").find("div")[i];p?p.insertAdjacentHTML("beforeBegin",d):$("#"+this.options.id+"_content_multiSelect")[0].insertAdjacentHTML("afterBegin",d)}}if(this.options.showNumCol){var d=this.createContentLeftNumColRow(n,t);if(s)$("#"+this.options.id+"_content_numCol")[0].insertAdjacentHTML("beforeEnd",d);else{var p=$("#"+this.options.id+"_content_numCol").find("div")[i];p?p.insertAdjacentHTML("beforeBegin",d):$("#"+this.options.id+"_content_numCol")[0].insertAdjacentHTML("afterBegin",d)}this.resetNumCol(),this.updateNumColLastRowFlag()}this.repairSumRow(),this.noRowsShowFun(),this.updateLastRowFlag();var f={};f.begin=i,f.length=1,this.renderTypeFun(f)}var n=0;this.options.showTree?(this.dataSourceObj.options.values?n=this.dataSourceObj.options.values.length:this.dataSourceObj.options.values=new Array,this.dataSourceObj.options.values.splice(i,0,t),this.addOneRowTreeHasChildF(o)):(this.dataSourceObj.options.values||(this.dataSourceObj.options.values=new Array),this.dataSourceObj.options.values.splice(i,0,t))},o=function(t,i){return i},n=function(){},s=function(){},r=function(t,i){if(this.options.showTree)for(var e=t.length,o=0;o<e;o++)this.addOneRow(t[o],e);else{this.editClose();var n="",s="",r="",d="",a=this,e=this.dataSourceObj.rows.length,l=!1;0!=i&&(i&&i>0?e<i&&(i=e):i=0),e==i&&(l=!0);var h=new Array;if($.each(t,function(t){var e={};e.value=this,e.valueIndex=i+t,h.push(e),a.dataSourceObj.rows.splice(i+t,0,e),a.updateEditRowIndex("+",i+t)}),this.dataSourceObj.rows.length>i+t.length&&$.each(this.dataSourceObj.rows,function(e){e>i+t.length-1&&(this.valueIndex=this.valueIndex+t.length)}),"grid"==this.showType&&$("#"+this.options.id+"_content_div tbody")[0]){$.each(h,function(t,i){n+=a.createContentOneRow(this),d+=a.createContentOneRowFixed(this),a.options.multiSelect&&(s+=a.createContentLeftMultiSelectRow(this)),a.options.showNumCol&&(r+=a.createContentLeftNumColRow(e+t,i.value))});try{l?$("#"+this.options.id+"_content_div tbody")[0].insertAdjacentHTML("beforeEnd",n):$("#"+this.options.id+"_content_div").find("tbody").find('tr[role="row"]')[i]?$("#"+this.options.id+"_content_div").find("tbody").find('tr[role="row"]')[i].insertAdjacentHTML("beforeBegin",n):$("#"+this.options.id+"_content_div tbody")[0]&&$("#"+this.options.id+"_content_div tbody")[0].insertAdjacentHTML("afterBegin",n),l?$("#"+this.options.id+"_content_fixed_div tbody")[0].insertAdjacentHTML("beforeEnd",d):$("#"+this.options.id+"_content_fixed_div").find("tbody").find('tr[role="row"]')[i]?$("#"+this.options.id+"_content_fixed_div").find("tbody").find('tr[role="row"]')[i].insertAdjacentHTML("beforeBegin",d):$("#"+this.options.id+"_content_fixed_div tbody")[0]&&$("#"+this.options.id+"_content_fixed_div tbody")[0].insertAdjacentHTML("afterBegin",d)}catch(u){var c=$("#"+this.options.id+"_content_div table")[0],p=$("#"+this.options.id+"_content_fixed_div table")[0];c&&p&&$.each(h,function(t){a.createContentOneRowForIE(c,i+t,this),a.createContentOneRowForIE(p,i+t,this,"fixed")})}if(this.options.multiSelect)if(l)$("#"+this.options.id+"_content_multiSelect")[0].insertAdjacentHTML("beforeEnd",s);else{var f=$("#"+this.options.id+"_content_multiSelect").find("div")[i];f?f.insertAdjacentHTML("beforeBegin",s):$("#"+this.options.id+"_content_multiSelect")[0].insertAdjacentHTML("afterBegin",s)}if(this.options.showNumCol){if(l)$("#"+this.options.id+"_content_numCol")[0].insertAdjacentHTML("beforeEnd",r);else{var f=$("#"+this.options.id+"_content_numCol").find("div")[i];f?f.insertAdjacentHTML("beforeBegin",r):$("#"+this.options.id+"_content_numCol")[0].insertAdjacentHTML("afterBegin",r)}this.resetNumCol(),this.updateNumColLastRowFlag()}this.repairSumRow(),this.noRowsShowFun();var m={};m.begin=i,m.length=t.length,this.renderTypeFun(m)}this.dataSourceObj.options.values||(this.dataSourceObj.options.values=new Array),$.each(t,function(t){a.dataSourceObj.options.values.splice(i+t,0,this)}),this.updateLastRowFlag()}},d=function(t){return""},a=function(t,i,e){},l=function(t){var i=this;t=parseInt(t);var e=this.dataSourceObj.rows[t];if(e){var o=e.value;if("grid"==this.showType&&this.editClose(),this.dataSourceObj.rows.splice(t,1),this.updateEditRowIndex("-",t),this.selectRows&&$.each(this.selectRows,function(e){this==o?(i.selectRows.splice(e,1),i.selectRowsObj.splice(e,1),i.selectRowsIndex.splice(e,1)):i.selectRowsIndex[e]>t&&(i.selectRowsIndex[e]=i.selectRowsIndex[e]-1)}),this.focusRow&&(this.focusRow==o?(this.focusRow=null,this.focusRowObj=null,this.focusRowIndex=null):this.focusRowIndex>t&&(this.focusRowIndex=this.focusRowIndex-1)),"grid"==this.showType&&($("#"+this.options.id+"_content_div tbody tr:eq("+t+")").remove(),$("#"+this.options.id+"_content_fixed_div tbody tr:eq("+t+")").remove(),$("#"+this.options.id+"_content_multiSelect >div:eq("+t+")").remove(),$("#"+this.options.id+"_content_numCol >.u-grid-content-num:eq("+t+")").remove(),this.resetNumCol(),this.repairSumRow(),this.noRowsShowFun(),this.updateNumColLastRowFlag()),this.dataSourceObj.options.values){var n=this.dataSourceObj.options.values.indexOf(o);this.dataSourceObj.options.values.splice(n,1)}if(this.deleteOneRowTree(),"function"==typeof this.options.onRowDelete){var s={};if(s.gridObj=this,s.index=t,s.row=e,!this.options.onRowDelete(s))return}}},h=function(){},c=function(){},p=function(t){var i=this,e=new Array;$.each(t,function(i){e.push(t[i])}),e.sort(function(t,i){return i-t}),$.each(e,function(t){i.deleteOneRow(this)})},f=function(t,i){if(t>-1&&t<this.dataSourceObj.rows.length&&(this.dataSourceObj.rows[t].value=i,this.dataSourceObj.options.values[this.dataSourceObj.rows[t].valueIndex]=i,"grid"==this.showType)){var e={};e.begin=t,e.length=1,this.renderTypeFun(e),this.repairSumRow()}},m=function(t,i,e,o){if(t>-1&&t<this.dataSourceObj.rows.length){var n=$(this.dataSourceObj.rows[t].value).attr(i),s=t;if("undefined"==typeof e&&(e=""),n!=e||o){if($(this.dataSourceObj.rows[t].value).attr(i,e),$(this.dataSourceObj.options.values[this.dataSourceObj.rows[t].valueIndex]).attr(i,e),"grid"==this.showType){var r={};r.field=i,r.begin=t,r.length=1,this.renderTypeFun(r),s=this.updateValueAtTree(t,i,e,o),this.updateValueAtEdit(t,i,e,o),
this.repairSumRow()}if("function"==typeof this.options.onValueChange){var r={};r.gridObj=this,r.rowIndex=s,r.field=i,r.oldValue=n,r.newValue=e,this.options.onValueChange(r)}this.resetLeftHeight()}}},w=function(t,i,e,o){return t},v=function(t,i,e,o){},g=function(t,i){var e,o,n,s;if(!this.dataSourceObj.rows[t])return!0;if("grid"==this.showType&&(o=i&&i.contentTrs?i.contentTrs[t]:this.$ele.find("#"+this.options.id+'_content_tbody tr[role="row"]')[t]),this.dataSourceObj.rows[t].checked&&u.hasClass(o,"u-grid-content-sel-row"))return!0;if(e=i&&i.multiSelectDivs?i.multiSelectDivs[t]:this.$ele.find("#"+this.options.id+"_content_multiSelect").children()[t],"function"==typeof this.options.onBeforeRowSelected){var r={};if(r.gridObj=this,r.rowObj=this.dataSourceObj.rows[t],r.rowIndex=t,!this.options.onBeforeRowSelected(r)){if(this.options.multiSelect){var d=e.children[0];d.checked=!1}return!1}}if(this.options.multiSelect){if("grid"==this.showType){var d=e.children[0];$(d).addClass("is-checked")}}else this.selectRowsObj&&this.selectRowsObj.length>0&&$.each(this.selectRowsObj,function(){this.checked=!1}),this.selectRows=new Array,this.selectRowsObj=new Array,this.selectRowsIndex=new Array,"grid"==this.showType&&($("#"+this.options.id+"_content_tbody tr").removeClass("u-grid-content-sel-row"),$("#"+this.options.id+"_content_tbody tr a").removeClass("u-grid-content-sel-row"),$("#"+this.options.id+"_content_fixed_tbody tr").removeClass("u-grid-content-sel-row"),$("#"+this.options.id+"_content_fixed_tbody tr a").removeClass("u-grid-content-sel-row"),this.options.multiSelect&&$("#"+this.options.id+"_content_multiSelect div").removeClass("u-grid-content-sel-row"),this.options.showNumCol&&$("#"+this.options.id+"_content_numCol div").removeClass("u-grid-content-sel-row"));if("grid"==this.showType){$(o).addClass("u-grid-content-sel-row"),n=i&&i.fixContentTrs?i.fixContentTrs[t]:this.$ele.find("#"+this.options.id+'_content_fixed_tbody tr[role="row"]')[t],$(n).addClass("u-grid-content-sel-row");var a=t;this.eidtRowIndex>-1&&this.eidtRowIndex<t&&"form"==this.options.editType&&a++,this.options.multiSelect&&(a!=t&&(e=this.$ele.find("#"+this.options.id+"_content_multiSelect").children()[a]),$(e).addClass("u-grid-content-sel-row")),this.options.showNumCol&&(s=i&&i.numColDivs?i.numColDivs[a]:this.$ele.find("#"+this.options.id+"_content_numCol").children()[a],$(s).addClass("u-grid-content-sel-row"))}if(this.selectRows.push(this.dataSourceObj.rows[t].value),this.selectRowsObj.push(this.dataSourceObj.rows[t]),this.selectRowsIndex.push(t),this.dataSourceObj.rows[t].checked=!0,this.selectRows.length==this.dataSourceObj.rows.length&&$("#"+this.options.id+"_header_multi_input").addClass("is-checked"),"function"==typeof this.options.onRowSelected){var r={};r.gridObj=this,r.rowObj=this.dataSourceObj.rows[t],r.rowIndex=t,this.options.onRowSelected(r)}return!0},C=function(t){var i=this;if(!this.dataSourceObj.rows[t])return!0;if(!this.dataSourceObj.rows[t].checked)return!0;if("function"==typeof this.options.onBeforeRowUnSelected){var e={};if(e.gridObj=this,e.rowObj=this.dataSourceObj.rows[t],e.rowIndex=t,!this.options.onBeforeRowUnSelected(e))return this.options.multiSelect&&($("#"+this.options.id+"_content_multiSelect input:eq("+t+")")[0].checked=!0),!1}this.options.multiSelect&&$("#"+this.options.id+"_content_multiSelect .u-grid-checkbox-outline:eq("+t+")").removeClass("is-checked");var o=t;if(this.eidtRowIndex>-1&&this.eidtRowIndex<t&&"form"==this.options.editType&&o++,$("#"+this.options.id+"_content_tbody tr:eq("+o+")").removeClass("u-grid-content-sel-row"),$("#"+this.options.id+"_content_tbody tr:eq("+o+") a").removeClass("u-grid-content-sel-row"),$("#"+this.options.id+"_content_fixed_tbody tr:eq("+o+")").removeClass("u-grid-content-sel-row"),$("#"+this.options.id+"_content_fixed_tbody tr:eq("+o+") a").removeClass("u-grid-content-sel-row"),this.options.multiSelect&&$("#"+this.options.id+"_content_multiSelect >div:eq("+o+")").removeClass("u-grid-content-sel-row"),this.options.showNumCol&&$("#"+this.options.id+"_content_numCol >div:eq("+o+")").removeClass("u-grid-content-sel-row"),$.each(this.selectRows,function(e){this==i.dataSourceObj.rows[t].value&&(i.selectRows.splice(e,1),i.selectRowsObj.splice(e,1),i.selectRowsIndex.splice(e,1))}),this.dataSourceObj.rows[t].checked=!1,$("#"+this.options.id+"_header_multi_input").removeClass("is-checked"),"function"==typeof this.options.onRowUnSelected){var e={};e.gridObj=this,e.rowObj=this.dataSourceObj.rows[t],e.rowIndex=t,this.options.onRowUnSelected(e)}return!0},_=function(){if($("#"+this.options.id+"_header_multi_input").addClass("is-checked"),"function"==typeof this.options.onBeforeAllRowSelected){var t={};if(t.gridObj=this,t.rowObjs=this.dataSourceObj.rows,!this.options.onBeforeAllRowSelected(t))return}var i=this.$ele.find("#"+this.options.id+"_content_multiSelect").children(),e=this.$ele.find("#"+this.options.id+"_content_numCol").children(),o=this.$ele.find("#"+this.options.id+'_content_tbody tr[role="row"]'),n=this.$ele.find("#"+this.options.id+'_content_fixed_tbody tr[role="row"]');this.$ele.find("#"+this.options.id+'_content_tbody tr[role="row"]');for(var s=0;s<this.dataSourceObj.rows.length;s++)this.setRowSelect(s,{multiSelectDivs:i,numColDivs:e,contentTrs:o,fixContentTrs:n});if("function"==typeof this.options.onAllRowSelected){var t={};t.gridObj=this,t.rowObjs=this.dataSourceObj.rows,this.options.onAllRowSelected(t)}},b=function(){if($("#"+this.options.id+"_header_multi_input").removeClass("is-checked"),"function"==typeof this.options.onBeforeAllRowUnSelected){var t={};if(t.gridObj=this,t.rowObjs=this.dataSourceObj.rows,!this.options.onBeforeAllRowUnSelected(t))return}for(var i=0;i<this.dataSourceObj.rows.length;i++)this.setRowUnselect(i);if("function"==typeof this.options.onAllRowUnSelected){var t={};t.gridObj=this,t.rowObjs=this.dataSourceObj.rows,this.options.onAllRowUnSelected(t)}},y=function(t){if(this.dataSourceObj.rows[t].focus)return!0;if(!this.dataSourceObj.rows[t])return!0;if("function"==typeof this.options.onBeforeRowFocus){var i={};if(i.gridObj=this,i.rowObj=this.dataSourceObj.rows[t],i.rowIndex=t,!this.options.onBeforeRowFocus(i))return!1}$("#"+this.options.id+"_content_tbody tr").removeClass("u-grid-content-focus-row"),$("#"+this.options.id+"_content_tbody tr a").removeClass("u-grid-content-focus-row"),$("#"+this.options.id+"_content_fixed_tbody tr").removeClass("u-grid-content-focus-row"),$("#"+this.options.id+"_content_fixed_tbody tr a").removeClass("u-grid-content-focus-row"),this.options.multiSelect&&$("#"+this.options.id+"_content_multiSelect").find("div").removeClass("u-grid-content-focus-row"),this.options.showNumCol&&$("#"+this.options.id+"_content_numCol").find("div").removeClass("u-grid-content-focus-row"),this.focusRowObj&&(this.focusRowObj.focus=!1),$("#"+this.options.id+'_content_tbody tr[role="row"]:eq('+t+")").addClass("u-grid-content-focus-row"),$("#"+this.options.id+'_content_tbody tr[role="row"]:eq('+t+") a").addClass("u-grid-content-focus-row"),$("#"+this.options.id+'_content_fixed_tbody tr[role="row"]:eq('+t+")").addClass("u-grid-content-focus-row"),$("#"+this.options.id+'_content_fixed_tbody tr[role="row"]:eq('+t+") a").addClass("u-grid-content-focus-row");var e=t;if(this.eidtRowIndex>-1&&this.eidtRowIndex<t&&"form"==this.options.editType&&e++,this.options.multiSelect&&$("#"+this.options.id+"_content_multiSelect >div:eq("+e+")").addClass("u-grid-content-focus-row"),this.options.showNumCol&&$("#"+this.options.id+"_content_numCol >div:eq("+e+")").addClass("u-grid-content-focus-row"),this.focusRow=this.dataSourceObj.rows[t].value,this.focusRowObj=this.dataSourceObj.rows[t],this.focusRowIndex=t,this.dataSourceObj.rows[t].focus=!0,"function"==typeof this.options.onRowFocus){var i={};i.gridObj=this,i.rowObj=this.dataSourceObj.rows[t],i.rowIndex=t,this.options.onRowFocus(i)}return!0},x=function(t){if(!this.dataSourceObj.rows[t])return!0;if("function"==typeof this.options.onBeforeRowUnFocus){var i={};if(i.gridObj=this,i.rowObj=this.dataSourceObj.rows[t],i.rowIndex=t,!this.options.onBeforeRowUnFocus(i))return!1}if(!this.dataSourceObj.rows[t].focus)return!0;var e=t;if(this.eidtRowIndex>-1&&this.eidtRowIndex<t&&"form"==this.options.editType&&e++,$("#"+this.options.id+"_content_tbody tr:eq("+e+")").removeClass("u-grid-content-focus-row"),$("#"+this.options.id+"_content_tbody tr:eq("+e+") a").removeClass("u-grid-content-focus-row"),$("#"+this.options.id+"_content_fixed_tbody tr:eq("+e+")").removeClass("u-grid-content-focus-row"),$("#"+this.options.id+"_content_fixed_tbody tr:eq("+e+") a").removeClass("u-grid-content-focus-row"),this.options.multiSelect&&$("#"+this.options.id+"_content_multiSelect >div:eq("+e+")").removeClass("u-grid-content-focus-row"),this.options.showNumCol&&$("#"+this.options.id+"_content_numCol >div:eq("+e+")").removeClass("u-grid-content-focus-row"),this.dataSourceObj.rows[t].focus=!1,this.focusRow=null,this.focusRowObj=null,this.focusRowIndex=null,"function"==typeof this.options.onRowUnFocus){var i={};i.gridObj=this,i.rowObj=this.dataSourceObj.rows[t],i.rowIndex=t,this.options.onRowUnFocus(i)}return this.options.multiSelect||this.setRowUnselect(t),!0},R=function(){var t=$("#"+this.options.id+"_content_numCol >.u-grid-content-num");$.each(t,function(t){this.innerHTML=t+1+""})};i.addOneRow=e,i.addOneRowTree=o,i.addOneRowTreeHasChildF=n,i.editClose=s,i.addRows=r,i.createContentOneRowFixed=d,i.updateEditRowIndex=a,i.deleteOneRow=l,i.repairSumRow=h,i.deleteOneRowTree=c,i.deleteRows=p,i.updateRow=f,i.updateValueAt=m,i.updateValueAtTree=w,i.updateValueAtEdit=v,i.setRowSelect=g,i.setRowUnselect=C,i.setAllRowSelect=_,i.setAllRowUnSelect=b,i.setRowFocus=y,i.setRowUnFocus=x,i.resetNumCol=R},function(t,i){"use strict";i.__esModule=!0;var e=function(t){if(this.isGridShow()){if("undefined"==typeof t)var i=null,e=null,o="";else var i="undefined"==typeof t.begin?null:t.begin,e="undefined"==typeof t.length?null:t.length,o="undefined"==typeof t.field?"":t.field;var n=this,i=parseInt(i),e=parseInt(e),s=i;if(e>0&&(s=parseInt(i+e-1)),""==o)this.gridCompColumnFixedArr&&$.each(this.gridCompColumnFixedArr,function(t){n.renderTypeByColumn(this,t,i,e,!0)}),$.each(this.gridCompColumnArr,function(t){n.renderTypeByColumn(this,t,i,e,!1)});else{var r=!1;this.gridCompColumnFixedArr&&$.each(this.gridCompColumnFixedArr,function(t){if(this.options.field==o)return n.renderTypeByColumn(this,t,i,e,!0),void(r=!0)}),r||$.each(this.gridCompColumnArr,function(t){if(this.options.field==o)return void n.renderTypeByColumn(this,t,i,e,!1)})}}},o=function(t,i,e,o,n){var s=this,r=t.options.renderType,d=(t.options.sumCol,t.options.sumRenderType,t.options.dataType),a=t.options.precision,l=(t.options.format,t.options.field),h=e,c=n===!0?"_content_fixed_tbody":"_content_tbody",p=this.getVisibleIndexOfColumn(t);o>0&&(h=parseInt(e+o-1)),this.realtimeTableRows=document.getElementById(s.options.id+c).children;for(var f=-1,m=0;m<s.realtimeTableRows.length;m++)"row"!=s.realtimeTableRows[m].getAttribute("role")&&(f=m);$.each(s.dataSourceObj.rows,function(o){if(e>=0&&o>=e&&o<=h||isNaN(e)){s.editColIndex==p&&s.eidtRowIndex==o&&"default"==s.options.editType&&(s.editColIndex=-1,s.eidtRowIndex=-1);var n=o;f!=-1&&o>=f&&n++;var c=s.realtimeTableRows[n],m=c.children[i];if(s.iconSpan)var w=s.iconSpan;if(m){if(m.children[0].innerHTML.indexOf("u-grid-content-tree-span")!=-1)var v=m.children[0].children[1];else var v=m.children[0];if(v){var g=$(this.value).attr(l);if("function"==typeof r||"Date"==d||"Datetime"==d||"Int"==d||"Float"==d)if(v.innerHTML="","function"==typeof r){g=s.getString(g,"");var C={};C.value=g,C.element=v,C.gridObj=s,C.row=this,C.gridCompColumn=t,C.rowIndex=o,r.call(s,C)}else if("Date"==d||"Datetime"==d)null!=g&&void 0!=g&&"null"!=g&&"undefined"!=g&&""!=g||(g=""),g="Date"==d?u.dateRender(g):u.dateTimeRender(g),v.innerHTML=g,v.title=g;else if("Int"==d)g=parseInt(g),g?(v.innerHTML=g,v.title=g):(v.innerHTML="",v.title="");else if("Float"==d){if(a){var _={};_.value=g,_.precision=a,g=s.DicimalFormater(_)}else g=parseFloat(g);g?(v.innerHTML=g,v.title=g):(v.innerHTML="",v.title="")}else{g=s.getString(g,"");var b=g.replace(/\</g,"<");b=b.replace(/\>/g,">"),v.title=g,g=g.replace(/\</g,"<"),g=g.replace(/\>/g,">"),v.innerHTML=g}else{g=s.getString(g,"");var b=g.replace(/\</g,"<");b=b.replace(/\>/g,">"),v.title=g,g=g.replace(/\</g,"<"),g=g.replace(/\>/g,">"),0==i&&w&&(g=w+=g),v.innerHTML=g}var C={span:v,column:t},y=s.getRenderOverFlag(C);y&&$(v).addClass("u-grid-content-td-div-over")}}}}),this.renderTypeSumRow(t,i,e,o,n)},n=function(t){var i=t.span,e=i.offsetHeight,o=(i.offsetWidth,$(i).clone()[0]),n=!1;t.span.parentNode.appendChild(o),o.style.height="",o.style.maxHeight="999999px";var s=o.offsetHeight;return s>e&&(n=!0),t.span.parentNode.removeChild(o),n},s=function(t,i,e,o,n){};i.renderTypeFun=e,i.renderTypeByColumn=o,i.renderTypeSumRow=s,i.getRenderOverFlag=n},function(t,i){"use strict";i.__esModule=!0;var e=function(t,i){var e=this.getIndexOfColumn(t);this.setColumnVisibleByIndex(e,i)},o=function(t,i){if(t>=0){var e=this.gridCompColumnArr[t],o=this.getVisibleIndexOfColumn(e);if(0==e.options.visible&&i){var n="<col";e.options.width&&(n+=' style="width:'+this.formatWidth(e.options.width)+'"'),n+=">",$("#"+this.options.id+"_header th:eq("+t+")").css("display",""),$("#"+this.options.id+"_content th:eq("+t+")").css("display",""),$("td:eq("+t+")",$("#"+this.options.id+"_content tbody tr")).css("display","");var s=this.getNextVisibleInidexOfColumn(e);if(s==-1)try{$("#"+this.options.id+"_header col:last")[0].insertAdjacentHTML("afterEnd",n),$("#"+this.options.id+"_content col:last")[0].insertAdjacentHTML("afterEnd",n)}catch(r){$("#"+this.options.id+"_header col:last").after(n),$("#"+this.options.id+"_content col:last").after(n)}else try{$("#"+this.options.id+"_header col:eq("+s+")")[0].insertAdjacentHTML("beforeBegin",n),$("#"+this.options.id+"_content col:eq("+s+")")[0].insertAdjacentHTML("beforeBegin",n)}catch(r){$("#"+this.options.id+"_header col:eq("+s+")").before(n),$("#"+this.options.id+"_content col:eq("+s+")").before(n)}var d=this.contentWidth+parseInt(e.options.width)}if(1==e.options.visible&&!i){$("#"+this.options.id+"_header th:eq("+t+")").css("display","none"),$("#"+this.options.id+"_header col:eq("+o+")").remove(),$("#"+this.options.id+"_content th:eq("+t+")").css("display","none"),$("#"+this.options.id+"_content col:eq("+o+")").remove(),$("td:eq("+t+")",$("#"+this.options.id+"_content tbody tr")).css("display","none");var d=this.contentWidth-parseInt(e.options.width)}e.options.visible=i,this.columnsVisibleFun();var a=this.contentWidthChange(d);this.lastVisibleColumn.options.width=this.lastVisibleColumnWidth,this.contentWidth=a,this.resetThVariable(),this.saveGridCompColumnArrToLocal()}},n=function(t,i){var e=this.getColumnByField(t);this.setColumnWidth(e,i)},s=function(t,i){if(t!=this.lastVisibleColumn&&(i>this.minColumnWidth||i==this.minColumnWidth)){var e=this.getVisibleIndexOfColumn(t),o=t.options.width,n=i-o,s=this.contentWidth+n;this.contentWidth=this.contentWidthChange(s),$("#"+this.options.id+"_header_table col:eq("+e+")").css("width",i+"px"),$("#"+this.options.id+"_content_table col:eq("+e+")").css("width",i+"px"),t.options.width=i,t.options.realWidth=i,this.resetThVariable(),this.saveGridCompColumnArrToLocal()}},r=function(t){this.initDataSourceVariable(),this.options.dataSource=t,this.initDataSource(),this.repairContent(),this.afterGridDivsCreate()},d=function(t){var i={};if(t.values){var e=new Array;$.each(t.values,function(){if(t.fields){var i={},o=this;$.each(t.fields,function(t){$(i).attr(this,o[t])}),e.push(i)}})}$(i).attr("values",e),this.setDataSource(i)};i.setColumnVisibleByColumn=e,i.setColumnVisibleByIndex=o,i.setCoulmnWidthByField=n,i.setColumnWidth=s,i.setDataSource=r,i.setDataSourceFun1=d},function(t,i){"use strict";i.__esModule=!0;var e=function(){var t=this;if($("#"+this.options.id)[0]){var i=$("#"+this.options.id).width();this.wholeWidth!=i&&this.$ele.data("gridComp")==this&&(this.wholeWidth=i,i>this.options.formMaxWidth&&("form"==this.showType||""==this.showType||!$("#"+this.options.id+"_content_div tbody")[0])||this.options.overWidthHiddenColumn||this.options.noScroll?t.widthChangeGridFun():i>0&&i<this.options.formMaxWidth&&("grid"==this.showType||""==this.showType),i>this.options.formMaxWidth&&(this.contentMinWidth=parseInt(this.wholeWidth)-parseInt(this.leftW)-parseInt(this.fixedWidth),this.contentMinWidth<0&&(this.contentMinWidth=0),setTimeout(function(){$("#"+t.options.id+"_header_wrap").css("max-width",t.wholeWidth+"px"),$("#"+t.options.id+"_content_div").css("width",t.contentMinWidth+"px"),$("#"+t.options.id+"_content_table").css("min-width",t.contentMinWidth+"px"),$("#"+t.options.id+"_content_table").css("width",t.contentMinWidth+"px"),$("#"+t.options.id+"_header_table").css("min-width",t.contentMinWidth+"px"),$("#"+t.options.id+"_header_table").css("width",t.contentMinWidth+"px"),$("#"+t.options.id+"_noRowsShow").css("width",t.contentMinWidth+"px"),t.columnsVisibleFun(),t.contentRealWidth<t.contentMinWidth?t.contentWidth=t.contentMinWidth:t.contentWidth=t.contentRealWidth,$("#"+t.options.id+"_noRows").css("width",t.contentWidth+"px"),"function"==typeof t.options.afterCreate&&t.options.afterCreate.call(t)},300)),$("#"+t.options.id+"_header_table").css("width",t.contentMinWidth+"px"),$("#"+t.options.id+"_edit_form").css("width",t.contentMinWidth+"px"),this.preWholeWidth=i,this.resetLeftHeight())}},o=function(){var t=parseInt(this.wholeWidth/2);if(this.noScrollWidthReset(),this.widthChangeGridFunFixed(t),this.widthChangeGridFunOverWidthHidden(),this.contentMinWidth=parseInt(this.wholeWidth)-parseInt(this.leftW)-parseInt(this.fixedWidth),this.contentMinWidth<0&&(this.contentMinWidth=0),this.contentRealWidth<this.contentMinWidth){this.contentWidth=this.contentMinWidth;var i=this.lastVisibleColumn.options.width;this.lastVisibleColumnWidth=i+(this.contentMinWidth-this.contentRealWidth),this.lastVisibleColumn.options.width=this.lastVisibleColumnWidth}else this.contentWidth=this.contentRealWidth;this.createGridFlag=!1,this.createGridDivs(),$("#"+this.options.id+"_form").css("display","none"),$("#"+this.options.id+"_grid").css("display","block")},n=function(){if(this.options.noScroll){if(this.hasNoScrollRest)for(var t=0;t<this.gridCompColumnArr.length;t++){var i=this.gridCompColumnArr[t],e=i.options.width,o=parseInt(e/this.preWholeWidth*this.wholeWidth);this.setColumnWidth(i,o)}else for(var t=0;t<this.gridCompColumnArr.length;t++){var i=this.gridCompColumnArr[t],e=i.options.width+"";if(e.indexOf("%")>0)var o=parseInt(e.replace("%","")*this.wholeWidth/100);else var o=e;o<this.minColumnWidth&&(o=this.minColumnWidth),this.setColumnWidth(i,o)}this.hasNoScrollRest=!0}},s=function(t){},r=function(){},d=function(){if(this.countContentHeight){var t=this.wholeHeight,i=$("#"+this.options.id)[0].offsetHeight;if(this.wholeHeight=i,t!=i&&i>0){var e=i-1-this.exceptContentHeight>0?i-1-this.exceptContentHeight:0;$("#"+this.options.id+"_content").css("height",e+"px"),$("#"+this.options.id+"_content_div").css("height",e+"px")}}},a=function(t){if(t<this.contentMinWidth){var i=parseInt(this.lastVisibleColumn.options.width);this.lastVisibleColumnWidth=i+(this.contentMinWidth-t),$("#"+this.options.id+"_header_table col:last").css("width",this.lastVisibleColumnWidth+"px"),$("#"+this.options.id+"_content_table col:last").css("width",this.lastVisibleColumnWidth+"px"),t=this.contentMinWidth}if(t>this.contentMinWidth){var e=this.overWidthVisibleColumnArr.length;if(e>0){for(var o=0;o<e;o++){var n=this.overWidthVisibleColumnArr[o],s=this.getVisibleIndexOfColumn(n),r=parseInt(n.options.width),d=n.options.realWidth;$("#"+this.options.id+"_header_table col:eq("+s+")").css("width",d+"px"),$("#"+this.options.id+"_content_table col:eq("+s+")").css("width",d+"px"),t-=r-d,n.options.width=n.options.realWidth}if(t<this.contentMinWidth){var i=parseInt(this.lastVisibleColumn.options.width);this.lastVisibleColumnWidth=i+(this.contentMinWidth-t),$("#"+this.options.id+"_header_table col:last").css("width",this.lastVisibleColumnWidth+"px"),$("#"+this.options.id+"_content_table col:last").css("width",this.lastVisibleColumnWidth+"px"),this.lastVisibleColumn.options.width=this.lastVisibleColumnWidth,t=this.contentMinWidth}}t>this.contentMinWidth?($("#"+this.options.id+"_content_left_bottom").css("display","block"),$("#"+this.options.id+"_content_left_sum_bottom").css("bottom",16)):($("#"+this.options.id+"_content_left_bottom").css("display","none"),$("#"+this.options.id+"_content_left_sum_bottom").css("bottom",0))}else $("#"+this.options.id+"_content_left_bottom").css("display","none"),$("#"+this.options.id+"_content_left_sum_bottom").css("bottom",0);return this.options.noScroll||($("#"+this.options.id+"_content_table").css("width",t+"px"),$("#"+this.options.id+"_noRows").css("width",t+"px")),t};i.widthChangeFun=e,i.widthChangeGridFun=o,i.widthChangeGridFunFixed=s,i.widthChangeGridFunOverWidthHidden=r,i.heightChangeFun=d,i.contentWidthChange=a,i.noScrollWidthReset=n},function(t,i){"use strict";i.__esModule=!0;var e=function(t,i,e,o,n){if(null!=this.currentEventName&&this.currentEventName==t)i.call(this,e),this.currentEventName=null,this.cleanCurrEventName&&clearTimeout(this.cleanCurrEventName);else{var s=this;this.cleanCurrEventName&&clearTimeout(this.cleanCurrEventName),this.currentEventName=t,this.cleanCurrEventName=setTimeout(function(){s.currentEventName=null,o.call(s,n)},250)}},o=function(t){if("function"==typeof this.options.onDblClickFun){var i=$(t.target).closest("tr");if(i[0].id==this.options.id+"_edit_tr")return;var e=0;i.length>0&&(e=this.getTrIndex(i));var o={};o.gridObj=this,o.rowObj=this.dataSourceObj.rows[e],o.rowIndex=e,this.options.onDblClickFun(o)}},n=function(t){var i=this,e=$(t.target).closest("tr");if(!(e.length>0&&e[0].id==this.options.id+"_edit_tr")){var o=this.getTrIndex(e);if("function"==typeof this.options.onBeforeClickFun){var n={};if(n.gridObj=this,n.rowObj=this.dataSourceObj.rows[o],n.rowIndex=o,n.e=t,!this.options.onBeforeClickFun(n))return}if(this.clickFunTree(t),e.length>0){var s=i.dataSourceObj.rows[o];if(s){if(i.options.rowClickBan)return;i.getChildRowIndex(s);!i.options.contentFocus&&i.options.multiSelect||(i.dataSourceObj.rows[o].focus&&i.options.cancelFocus?i.setRowUnFocus(o):i.dataSourceObj.rows[o].focus||i.setRowFocus(o)),!i.options.contentSelect&&i.options.multiSelect||(i.dataSourceObj.rows[o].checked&&i.options.cancelSelect?i.setRowUnselect(o):i.dataSourceObj.rows[o].checked||i.setRowSelect(o)),this.clickFunEdit(t,o)}}}},s=function(t){},r=function(t){};i.isDblEvent=e,i.dblClickFun=o,i.clickFun=n,i.clickFunTree=s,i.clickFunEdit=r},function(t,i){"use strict";i.__esModule=!0;var e=function(){return},o=function(){return},n=function(){var t=this,i=0;this.firstColumn=!0,this.overWidthVisibleColumnArr=new Array,$.each(this.gridCompColumnArr,function(){this.options.visible&&(i+=parseInt(this.options.width),this.options.width>this.options.realWidth&&t.overWidthVisibleColumnArr.push(this),this.firstColumn=t.firstColumn,t.firstColumn=!1,t.lastVisibleColumn=this,t.lastVisibleColumnWidth=this.options.width)}),this.contentRealWidth=i},s=function(){if("grid"==this.showType){var t=this;this.contentWidth=0,$("#"+this.options.id+"_header_table th",this.$ele).each(function(i){var e=t.gridCompColumnArr[i],o=0;e.options.visible&&(o=parseInt(e.options.width)),this.attrLeftTotalWidth=t.contentWidth,t.contentWidth+=o,t.resetThVariableDrag(this,e,o),this.gridCompColumn=e,this.attrWidth=o,this.attrRightTotalWidth=t.contentWidth}),t.resetThVariableHeaderLevel()}},r=function(t,i){},d=function(){},a=function(){$("#"+this.options.id+"_grid .u-grid-header-th-first").removeClass("u-grid-header-th-first"),$("#"+this.options.id+"_grid").find("th").eq(0).addClass("u-grid-header-th-first")},l=function(t,i){var e=this.getColumnByField(t);e.options.renderType=i;var o=this.getIndexOfColumn(e);this.renderTypeByColumn(e,o)},h=function(t){this.options.showHeader=t,t?$("#"+this.options.id+"_header").css("display","block"):$("#"+this.options.id+"_header").css("display","none")},u=function(t,i){var e=this.getColumnByField(t);e.options.precision=i,this.renderTypeFun(),this.options.showSumRow&&this.repairSumRow()},c=function(t){var i=this.options.multiSelect;i!=t&&(this.options.multiSelect=t,this.initGrid())},p=function(t){var i=this.options.showNumCol;i!=t&&(this.options.showNumCol=t,this.initGrid())},f=function(){return"grid"==this.showType},m=function(t){return"true"===t||t===!0};i.updateLastRowFlag=e,i.updateNumColLastRowFlag=o,i.columnsVisibleFun=n,i.resetThVariable=s,i.resetThVariableDrag=r,i.resetThVariableHeaderLevel=d,i.headerFirstClassFun=a,i.setRenderType=l,i.setShowHeader=h,i.setColumnPrecision=u,i.setMultiSelect=c,i.setShowNumCol=p,i.isGridShow=f,i.getBoolean=m},function(t,i,e){"use strict";i.__esModule=!0,i.getDataTableRowIdByRow=i.getTrIndex=i.accAdd=i.DicimalFormater=i.cloneObj=i.getFloat=i.getInt=i.getString=i.swapEle=i.formatWidth=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n=e(10),s=function(t){return t?(t+"").indexOf("%")>0?t:parseInt(t)+"px":""},r=function(t,i){var e=t.next(),o=i.prev();i.insertBefore(e),t.insertAfter(o)},d=function(t,i){return null!==t&&void 0!==t&&"null"!==t&&"undefined"!==t&&""!==t||(t=i),n.gridBrowser.isIE8?[t].join(""):t+""},a=function(t,i){return(null===t||void 0===t||"null"===t||"undefined"===t||""===t||isNaN(t))&&(t=i),t},l=function(t,i){return(null===t||void 0===t||"null"===t||"undefined"===t||""===t||isNaN(t))&&(t=i),t},h=function(t){var i;if("object"==("undefined"==typeof t?"undefined":o(t)))if(null===t)i=null;else if(t instanceof Array){i=[];for(var e=0,n=t.length;e<n;e++)i.push(this.cloneObj(t[e]))}else{i={};for(var s in t)i[s]=this.cloneObj(t[s])}else i=t;return i},u=function(t){for(var i=t.value+"",e=t.precision,o=0;o<i.length;o++)if("-0123456789.".indexOf(i.charAt(o))==-1)return"";return c(i,e)},c=function(t,i){if(null==t||isNaN(t))return"";var e=parseFloat(t),o=(e*Math.pow(10,i)/Math.pow(10,i)).toFixed(i);return"NaN"==o?"":o},p=function(t,i){var e,o,n;try{e=t.toString().split(".")[1].length}catch(s){e=0}try{o=i.toString().split(".")[1].length}catch(s){o=0}return n=Math.pow(10,Math.max(e,o)),(t*n+i*n)/n},f=function(t){return $('tr[id!="'+this.options.id+'_edit_tr"]',t.parent()).index(t)},m=function(t){return t.value["$_#_@_id"]};String.prototype.substrCH=function(t){for(var i=0,e=0;i<t&&e<this.length;){var o=this.charCodeAt(e);if(o>256&&i==t-1)break;i+=o>256?2:1,e+=1}return this.substr(0,e)},i.formatWidth=s,i.swapEle=r,i.getString=d,i.getInt=a,i.getFloat=l,i.cloneObj=h,i.DicimalFormater=u,i.accAdd=p,i.getTrIndex=f,i.getDataTableRowIdByRow=m},function(t,i,e){"use strict";i.__esModule=!0,i.colMenu_initGridEventFun=i.colMenu_initEventFun=i.re_createColumnMenu=i.colMenu_initGridCompColumn=i.re_initGridCompColumnColumnMenuFun=void 0;var o=(e(4),e(13),function(t){var i=new this.gridCompColumn(t,this);i.options.realWidth=i.options.width,this.basicGridCompColumnArr.push(i)}),n=function(){this.menuColumnsHeight=this.gridCompColumnArr.length*this.columnMenuHeight},s=function(){var t=this,i='<div class="u-grid-column-menu" id="'+this.options.id+'_column_menu">';return i+='<ul data-role="menu" role="menubar" class="u-grid-column-menu-ul" id="'+this.options.id+'_column_menu_ul">',i+='<li class="u-grid-column-menu-li" role="menuitem">',i+='<div class="u-grid-column-menu-div1" id="'+this.options.id+'_clearSet">',i+='<span class="u-grid-column-menu-span">'+this.transMap.ml_clear_set+"</span>",i+="</div></li>",i+='<div class="u-grid-column-menu-columns" id="'+this.options.id+'_column_menu_columns">',i+='<ul data-role="menu" role="menubar" class="u-grid-column-menu-columns-ul" id="'+this.options.id+'_column_menu_columns_ul">',$.each(this.gridCompColumnArr,function(e){if(""!=t.getString(this.options.title,"")){i+='<li class="u-grid-column-menu-columns-li" role="menuitem" index="'+e+'">',i+='<div class="u-grid-column-menu-columns-div1">';var o="";this.options.visible&&(o=" checked"),this.options.canVisible||(o+=' style="display:none;"'),i+='<div class="u-grid-column-menu-columns-div2"><input type="checkbox" '+o+"><label></label></div>",i+='<span class="u-grid-column-menu-columns-span">'+this.options.title+"</span>",i+="</div></li>"}}),i+="</ul></div>",i+="</ul></div>"},r=function(){var t=this;$("#"+this.options.id).on("mouseup",function(i){if($(i.target).closest("#"+t.options.id+"_header").length>0){if(t.mouseUpX=i.clientX,t.mouseUpY=i.clientY,t.mouseDownX==t.mouseUpX&&t.mouseDownY==t.mouseUpY){t.columnClickX=i.clientX,t.columnClickY=i.clientY;$(i.target).closest("th")[0];if($(i.target).hasClass("u-grid-header-columnmenu")){$("#"+t.options.id+"_column_menu").css("display","block");var e=i.clientX-160;e<0&&(e=0);var o=i.clientY+10;$("#"+t.options.id+"_column_menu").css("left",e),$("#"+t.options.id+"_column_menu").css("top",o);var n=($(window).width(),$(window).height()),s=t.menuColumnsHeight;t.menuColumnsHeight+o+34>n?(s=n-o-34,$("#"+t.options.id+"_column_menu_columns").css("height",s+"px")):$("#"+t.options.id+"_column_menu_columns").css("height",""),t.ele.createColumnMenuFlag=!0}}}else $(i.target).closest("#"+t.options.id+"_content").length>0}),$(document).on("click",function(){0==t.columnMenuMove&&0==t.ele.createColumnMenuFlag&&t.ele.offsetWidth>0&&$("#"+t.options.id+"_column_menu").css("display","none"),t.ele.createColumnMenuFlag=!1}),$(document).on("scroll",function(){0==t.columnMenuMove&&0==t.ele.createColumnMenuFlag&&t.ele.offsetWidth>0&&$("#"+t.options.id+"_column_menu").css("display","none"),t.ele.createColumnMenuFlag=!1})},d=function(){var t=this;$("#"+this.options.id+"_column_menu_ul").off("mousemove"),$("#"+this.options.id+"_column_menu_ul").on("mousemove",function(i){t.columnMenuMove=!0}),$("#"+this.options.id+"_column_menu_ul").off("mouseout"),$("#"+this.options.id+"_column_menu_ul").on("mouseout",function(i){t.columnMenuMove=!1}),$("#"+this.options.id+"_clearSet").off("click"),$("#"+this.options.id+"_clearSet").on("click",function(i){t.clearLocalData(),t.initGridCompColumn(),t.hasNoScrollRest=!1,t.noScrollWidthReset(),t.dataSourceObj.sortRows(),t.repaintGridDivs(),"function"==typeof t.options.onClearSetFun&&t.options.onClearSetFun(t)}),$("#"+this.options.id+"_column_menu_columns_ul li input").off("click"),$("#"+this.options.id+"_column_menu_columns_ul li input").on("click",function(i){var e=$(this).closest("li").attr("index");if(t.gridCompColumnArr[e].options.visible){$(this)[0].checked=!1;var o=$("input:checked",$("#"+t.options.id+"_column_menu_columns_ul")).length;if(0==o)return void($(this)[0].checked=!0);if(8==document.documentMode){var n=$("#"+t.options.id+"_column_menu_columns")[0].scrollTop,s=$("#"+t.options.id+"_column_menu_columns")[0].style.top;t.gridCompColumnArr[e].options.visible=!1,t.repaintGridDivs(),$("#"+t.options.id+"_column_menu").css("display","block"),$("#"+t.options.id+"_column_menu").css("right","0px"),$("#"+t.options.id+"_column_menu").css("top",s),$("#"+t.options.id+"_column_menu_columns")[0].scrollTop=n}else t.setColumnVisibleByIndex(e,!1),t.gridCompColumnArr[e].options.visible=!1}else if($(this)[0].checked=!0,8==document.documentMode){var n=$("#"+t.options.id+"_column_menu_columns")[0].scrollTop,s=$("#"+t.options.id+"_column_menu_columns")[0].style.top;t.gridCompColumnArr[e].options.visible=!0,t.repaintGridDivs(),$("#"+t.options.id+"_column_menu").css("display","block"),$("#"+t.options.id+"_column_menu").css("right","0px"),$("#"+t.options.id+"_column_menu").css("top",s),$("#"+t.options.id+"_column_menu_columns")[0].scrollTop=n}else t.setColumnVisibleByIndex(e,!0),t.gridCompColumnArr[e].options.visible=!0;t.saveGridCompColumnArrToLocal(),i.stopPropagation()}),$("#"+this.options.id+"_column_menu_columns_ul li").off("click"),$("#"+this.options.id+"_column_menu_columns_ul li").on("click",function(i){
var e=$(this).attr("index"),o=t.gridCompColumnArr[e];if(!o.options.canVisible)return!1;if(o.options.visible){$("input",$(this))[0].checked=!1;var n=$("input:checked",$("#"+t.options.id+"_column_menu_columns_ul")).length;if(0==n)return void($("input",$(this))[0].checked=!0);t.setColumnVisibleByIndex(e,!1),t.gridCompColumnArr[e].options.visible=!1}else $("input",$(this))[0].checked=!0,t.setColumnVisibleByIndex(e,!0),t.gridCompColumnArr[e].options.visible=!0;t.saveGridCompColumnArrToLocal()})};i.re_initGridCompColumnColumnMenuFun=o,i.colMenu_initGridCompColumn=n,i.re_createColumnMenu=s,i.colMenu_initEventFun=r,i.colMenu_initGridEventFun=d},function(t,i,e){"use strict";i.__esModule=!0,i.re_resetThVariableDrag=i.headerThDrag=i.dragEnd=i.dragFun=i.dragStart=i.drag_initGridEventFun=i.drag_initEventFun=i.re_createHeaderDrag=void 0;var o=(e(4),function(){return'<div class="u-grid-header-resize-handle" id="'+this.options.id+'_resize_handle"><div class="u-grid-header-resize-handle-inner"></div></div>'}),n=function(){var t=this;$("#"+this.options.id).on("mousemove",function(i){if($(i.target).closest("#"+t.options.id+"_header").length>0){var e=$(i.target).closest("th")[0];t.headerThDrag(i,e)}t.dragFun(i),i.stopPropagation()}),$("#"+this.options.id+"_top").on("mousemove",function(i){t.dragFun(i),i.stopPropagation()}),$("#"+this.options.id).on("mouseup",function(i){t.dragEnd(i)}),$("#"+this.options.id+"_top").on("mouseup",function(i){t.dragEnd(i)})},s=function(){var t=this;$("#"+this.options.id+"_resize_handle").on("mousedown",function(i){return t.dragStart(i),!1})},r=function(t){this.dragFlag=!0,this.dragW=null,this.dragStartX=t.clientX},d=function(t){if(this.dragFlag){var i=$("#"+this.options.id+"_resize_handle")[0].nowTh,e=$(i),o=e.attr("index"),n=this.gridCompColumnArr[o],s=this.getVisibleIndexOfColumn(n);if(i&&n!=this.lastVisibleColumn){this.dragEndX=t.clientX;var r=parseInt(this.dragEndX)-parseInt(this.dragStartX),d=parseInt(i.attrWidth)+parseInt(r),a=parseInt(this.contentWidth)+parseInt(r);if(d>this.minColumnWidth){if(this.options.noScroll){var l=this.getNextVisibleInidexOfColumn(n);if(l>-1){var h=this.getColumnByVisibleIndex(l);(!this.dragNextClomunWidth||this.dragNextClomunWidth<0)&&(this.dragNextClomunWidth=h.options.width)}var u=parseInt(this.dragNextClomunWidth)-parseInt(r);if(!(u>this.minColumnWidth))return void $("#"+this.options.id+"_top").css("display","block")}this.options.noScroll||(this.dragW=this.contentWidthChange(a)),$("#"+this.options.id+"_header_table col:eq("+s+")").css("width",d+"px"),$("#"+this.options.id+"_content_table col:eq("+s+")").css("width",d+"px"),n.options.width=d,n.options.realWidth=d,this.options.noScroll&&($("#"+this.options.id+"_header_table col:eq("+l+")").css("width",u+"px"),$("#"+this.options.id+"_content_table col:eq("+l+")").css("width",u+"px"),h.options.width=u,h.options.realWidth=u)}}$("#"+this.options.id+"_top").css("display","block")}},a=function(t){this.dragFlag&&(this.resetThVariable(),this.saveGridCompColumnArrToLocal()),this.dragNextClomunWidth=-1,this.lastVisibleColumn.options.width=this.lastVisibleColumnWidth,this.dragW&&(this.contentWidth=this.dragW),$("#"+this.options.id+"_resize_handle")[0].nowTh=null,this.dragFlag=!1,$("#"+this.options.id+"_top").css("display","none")},l=function(t,i){if(!this.dragFlag&&!this.swapColumnFlag&&i&&i.gridCompColumn&&i.gridCompColumn.options.canDrag&&$("#"+this.options.id+"_resize_handle")[0].nowTh!=i){$(i);$("#"+this.options.id+"_resize_handle").css("left",i.attrRightTotalWidth-this.scrollLeft-4+this.leftW+this.fixedWidth),$("#"+this.options.id+"_resize_handle")[0].nowTh=i}},h=function(t,i,e){!$("#"+this.options.id+"_resize_handle")[0].nowTh&&i.options.canDrag&&($("#"+this.options.id+"_resize_handle").css("left",e-4+this.leftW),$("#"+this.options.id+"_resize_handle")[0].nowTh=t)};i.re_createHeaderDrag=o,i.drag_initEventFun=n,i.drag_initGridEventFun=s,i.dragStart=r,i.dragFun=d,i.dragEnd=a,i.headerThDrag=l,i.re_resetThVariableDrag=h},function(t,i,e){"use strict";i.__esModule=!0,i.setGridEditTypeAndEditRow=i.setGridEditType=i.edit_initEventFun=i.setEditable=i.setEditType=i.re_updateValueAtEdit=i.re_updateEditRowIndex=i.editValueChange=i.nextEditShow=i.editCell=i.re_editClose=i.editRow=i.editRowIndexFun=i.editRowFun=i.re_clickFunEdit=i.re_hideEditMenu=void 0;var o=(e(4),function(){$("#"+this.options.id+"_content_edit_menu").css("display","none")}),n=function(t,i){var e=$(t.target).closest("tr"),o=$(t.target).closest("td"),n=o.index();if(this.options.editable&&(this.eidtRowIndex!=i||"default"==this.options.editType&&this.editColIndex!=n)){if(this.editClose(),"function"==typeof this.options.onBeforeEditFun){var s={};if(s.gridObj=this,s.rowObj=this.dataSourceObj.rows[i],s.rowIndex=i,s.colIndex=n,s.$tr=e,s.e=t,!this.options.onBeforeEditFun(s))return void(this.eidtRowIndex!=-1&&this.editClose())}this.editRowFun(e,n)}},s=function(t,i){this.eidtRowIndex!=-1&&this.editClose();var e="number"==typeof t?t:this.getTrIndex(t);this.eidtRowIndex=e,this.editColIndex=i,this.editRow(t,i)},r=function(t){this.eidtRowIndex!=-1&&this.editClose(),this.eidtRowIndex=t,this.editColIndex=0,this.editRow()},d=function(t,i){if(!(i<0)){var e=this,o=!1;t&&t.parents("table").attr("id").indexOf("_fixed_")>-1&&(o=!0),t=t||$("#"+this.options.id+'_content_tbody tr[role="row"]:eq('+this.eidtRowIndex+")"),i=i||0;var n=this.dataSourceObj.rows[this.eidtRowIndex].value;if(this.editRowObj=this.cloneObj(n),"default"==this.options.editType){var s=o?this.gridCompColumnFixedArr[i]:this.gridCompColumnArr[i];if(s.options.editable){var r=$("td:eq("+i+")",t)[0],d=s.options.field,a=$(n).attr(d);a=e.getString(a,"");var l={};l.td=r,l.value=a,l.field=d,l.editType=s.options.editType,l.rowObj=e.editRowObj,l.$tr=t,l.colIndex=i,e.editCell(l)}$("#"+this.options.id+"_content_edit_menu").css("display","block"),$("#"+this.options.id+"_content_edit_menu_cancel").css("marginLeft","10px");var h=$("tr:visible",t.parent()).index(t);this.rowHeight=t.height();this.rowHeight*(h+1)+this.headerHeight+1}else if("form"==this.options.editType)if("function"==typeof this.options.formEditRenderFun){if(this.fixedWidth>0)var u=$("#"+this.options.id+"_content_fixed_table")[0];else var u=$("#"+this.options.id+"_content_table")[0];var c=u.insertRow(this.eidtRowIndex+2);c.id=this.options.id+"_edit_tr";var p=c.insertCell();p.id=this.options.id+"_edit_td",p.style.borderBottom="0px",p.style.background="#fff";var f=parseInt(this.contentMinWidth)+parseInt(this.fixedWidth),m='<div id="'+this.options.id+'_edit_form" class="u-grid-edit-form" style="width:'+f+'px;float:left;">';m+="</div>",p.innerHTML=m;var l={};l.grid=gridObj,l.element=$("#"+this.options.id+"_edit_form")[0],l.editRowObj=this.editRowObj,this.options.formEditRenderFun.call(this,l);var m='<div style="position:relative;float:left;width:100%;height:40px;"></div>';$("#"+this.options.id+"_edit_form")[0].insertAdjacentHTML("beforeEnd",m);var w=$("#"+this.options.id+"_edit_td")[0].offsetHeight,v=$("#"+this.options.id+"_edit_form").css("background-color");if(this.options.multiSelect){var g=$("#"+this.options.id+"_content_multiSelect > div").eq(this.eidtRowIndex),m='<div class="grid_open_edit" id="'+this.options.id+'_multiSelect_edit" style="background-color:'+v+";float:left;position:relative;width:"+this.multiSelectWidth+"px;height:"+w+'px"></div>';g[0].insertAdjacentHTML("afterEnd",m)}if(this.options.showNumCol){var g=$("#"+this.options.id+"_content_numCol > .u-grid-content-num").eq(this.eidtRowIndex),m='<div id="'+this.options.id+'_numCol_edit" style="background-color:'+v+";float:left;position:relative;width:"+this.numWidth+'px;"></div>';g[0].insertAdjacentHTML("afterEnd",m)}if($("#"+this.options.id+"_content_edit_menu").css("display","block"),this.fixedWidth>0){var C=$("#"+this.options.id+"_content_table")[0],_=C.insertRow(this.eidtRowIndex+2);_.id=this.options.id+"_edit_tr1"}}else{if(this.fixedWidth>0)var u=$("#"+this.options.id+"_content_fixed_table")[0];else var u=$("#"+this.options.id+"_content_table")[0];var c=u.insertRow(this.eidtRowIndex+2);c.id=this.options.id+"_edit_tr";var p=c.insertCell();p.id=this.options.id+"_edit_td",p.style.borderBottom="0px";var f=parseInt(this.contentMinWidth)+parseInt(this.fixedWidth),m='<div id="'+this.options.id+'_edit_form" class="u-grid-edit-form" style="width:'+f+'px;float:left;">';if($.each(this.gridCompColumnFixedArr,function(t){var i=!1;if(this.options.editFormShow&&(this.options.editable||!this.options.editable&&e.options.noneEditableFormShow)&&(i=!0),i){var o=this.options.field,s=$(n).attr(o);s=e.getString(s,"");var r=this.options.title,d=this.options.headerColor;m+=e.formEditCell(s,o,r,this.options.required,d)}}),$.each(this.gridCompColumnArr,function(t){var i=!1;if(this.options.editFormShow&&(this.options.editable||!this.options.editable&&e.options.noneEditableFormShow)&&(i=!0),i){var o=this.options.field,s=$(n).attr(o);s=e.getString(s,"");var r=this.options.title,d=this.options.headerColor;m+=e.formEditCell(s,o,r,this.options.required,d)}}),m+="</div>",p.innerHTML=m,$.each(this.gridCompColumnFixedArr,function(o){var s=!1;if(this.options.editFormShow&&(this.options.editable||!this.options.editable&&e.options.noneEditableFormShow)&&(s=!0),s){var r=this.options.field,d=$("#"+e.options.id+"_edit_"+r)[0],a=$(n).attr(r);this.options.title;a=e.getString(a,"");var l={};l.td=d,d.innerHTML='<div class="u-grid-content-td-div" title=""></div>',l.value=a,l.field=r,l.editType=this.options.editType,l.rowObj=e.editRowObj,l.$tr=t,l.colIndex=i,m+=e.editCell(l)}}),$.each(this.gridCompColumnArr,function(o){var s=!1;if(this.options.editFormShow&&(this.options.editable||!this.options.editable&&e.options.noneEditableFormShow)&&(s=!0),s){var r=this.options.field,d=$("#"+e.options.id+"_edit_"+r)[0],a=$(n).attr(r);this.options.title;a=e.getString(a,"");var l={};l.td=d,d.innerHTML='<div class="u-grid-content-td-div" title=""></div>',l.value=a,l.field=r,l.editType=this.options.editType,l.rowObj=e.editRowObj,l.$tr=t,l.colIndex=i,m+=e.editCell(l)}}),"function"==typeof this.options.renderEditMemu)this.options.renderEditMemu.apply(this,[$("#"+this.options.id+"_edit_form")[0],this.eidtRowIndex,this.dataSourceObj.rows.length]);else{var m='<div id="'+this.options.id+'_content_edit_menu" style="position:relative;float:left;width:100%;height:40px;"><button type="button" class="u-grid-content-edit-menu-button u-grid-content-edit-menu-button-ok" id="'+this.options.id+'_content_edit_menu_close">'+this.transMap.ml_close+"</button></div>";$("#"+this.options.id+"_edit_form")[0].insertAdjacentHTML("beforeEnd",m),$("#"+this.options.id+"_content_edit_menu_close").on("click",function(t){e.editClose()})}var w=$("#"+this.options.id+"_edit_td")[0].offsetHeight,v=$("#"+this.options.id+"_edit_form").css("background-color");if(this.options.multiSelect){var g=$("#"+this.options.id+"_content_multiSelect > div").eq(this.eidtRowIndex),m='<div class="grid_open_edit " id="'+this.options.id+'_multiSelect_edit" style="background-color:'+v+";float:left;position:relative;width:"+this.multiSelectWidth+"px;height:"+w+'px"></div>';g[0].insertAdjacentHTML("afterEnd",m)}if(this.options.showNumCol){var g=$("#"+this.options.id+"_content_numCol > .u-grid-content-num").eq(this.eidtRowIndex),m='<div id="'+this.options.id+'_numCol_edit" style="background-color:'+v+";float:left;position:relative;width:"+this.numWidth+'px;"></div>';g[0].insertAdjacentHTML("afterEnd",m)}if($("#"+this.options.id+"_content_edit_menu").css("display","block"),this.fixedWidth>0){var C=$("#"+this.options.id+"_content_table")[0],_=C.insertRow(this.eidtRowIndex+2);_.id=this.options.id+"_edit_tr1"}}}},a=function(){var t=this.dataSourceObj.rows[this.eidtRowIndex];if(this.editComp&&this.editComp.hide&&this.editComp.hide(),this.editComp&&this.editComp.comp&&this.editComp.comp.hide&&this.editComp.comp.hide(),$("#"+this.options.id+"_placeholder_div").remove(),t){if("form"!=this.options.editType){var i={};i.begin=this.eidtRowIndex,i.length=1,this.renderTypeFun(i)}$("#"+this.options.id+"_content_edit_menu").css("display","none"),this.repairSumRow(),this.noRowsShowFun(),this.updateLastRowFlag(),this.eidtRowIndex=-1,$("#"+this.options.id+"_multiSelect_edit").remove(null,!0),$("#"+this.options.id+"_numCol_edit").remove(null,!0),$("#"+this.options.id+"_edit_tr").remove(null,!0),$("#"+this.options.id+"_edit_tr1").remove(null,!0)}},l=function(t){var i=t.td,e=t.value,o=t.field,n=t.editType,s=t.rowObj,r=t.$tr,d=t.colIndex,a=this;if(0==t.colIndex)try{this.iconSpan=$(i).find(".uf")[0].outerHTML}catch(l){}else this.iconSpan=null;var t={};if(t.td=i,t.field=o,t.$tr=r,t.colIndex=d,a.newEditObj=t,"text"==n)"default"==this.options.editType?i.innerHTML='<div class="u-grid-content-td-div" style="position: relative; left: 0px;"><div class="eType-input"><input id="'+this.options.id+"_edit_field_"+o+'" type="text" value="'+e+'" field="'+o+'" style="width:100%;margin:0px;min-height:20px;font-size:12px;color:#444"></div></div>':i.innerHTML='<div class="u-grid-content-td-div" style="position: relative; left: 0px;"><div class="eType-input"><input id="'+this.options.id+"_edit_field_"+o+'" type="text" value="'+e+'" field="'+o+'"></div></div>',$("input",$(i)).on("blur",function(){a.editValueChange(o,this.value)});else if("function"==typeof n){var t={},h=$(".u-grid-content-td-div",$(i));if(h.removeClass("u-grid-content-td-div-over"),t.gridObj=this,t.element=h[0],"default"==this.options.editType){var c=t.element.offsetHeight,p='<div id="'+this.options.id+'_placeholder_div" class="u-grid-edit-placeholder-div" style="height:'+c+'px;"></div>';h[0].innerHTML=p,t.element=$("#"+this.options.id+"_placeholder_div")[0]}t.value=e,t.field=o,t.rowObj=s,n.call(this,t)}$("input",$(i)).off("keydown"),$("input",$(i)).on("keydown",function(t){if("form"==a.options.editType);else{t.keyCode;13!=t.keyCode&&9!=t.keyCode||(this.blur(),setTimeout(function(){a.nextEditShow()},100),u.stopEvent(t))}}),"default"==this.options.editType&&$("input:first",$(i)).focus()},h=function(){var t=this.newEditObj,i=t.td,e=t.$tr,o=parseInt(t.colIndex)+1;if(0==$(i).next("td").length){var n=e.next("tr");if(!(n.length>0))return;e=n,o=0,e.click()}this.editRowFun(e,o)},c=function(t,i){this.eidtRowIndex>-1&&this.eidtRowIndex<this.dataSourceObj.rows.length&&this.updateValueAt(this.eidtRowIndex,t,i)},p=function(t,i,e){this.eidtRowIndex<0||("-"==t?i<this.eidtRowIndex?this.eidtRowIndex--:i==this.eidtRowIndex&&(this.eidtRowIndex=-1):"+"==t&&(void 0===e&&(e=1),i<=this.eidtRowIndex&&(this.eidtRowIndex+=e)))},f=function(t,i,e,o){this.eidtRowIndex==t&&$("#"+this.options.id+"_edit_field_"+i).length>0&&("checkbox"==$("#"+this.options.id+"_edit_field_"+i)[0].type?"Y"==e||"true"==e||e===!0?$("#"+this.options.id+"_edit_field_"+i)[0].checked=!0:$("#"+this.options.id+"_edit_field_"+i)[0].checked=!1:$("#"+this.options.id+"_edit_field_"+i)[0].value=e)},m=function(t,i){var e=this.getColumnByField(t);e.options.editType=i},w=function(t){this.options.editable=t,this.editClose()},v=function(){var t=this;$(document).on("click",function(i){if(t.options.editable&&"default"==t.options.editType){var e=$(i.target),o=!0;o=!($(i.target).closest(".u-grid-content-td-div").length>0)&&o;var n=t.options.customEditPanelClass;if(n){var s=n.split(",");$.each(s,function(){o=!(e.closest("."+this).length>0)&&o})}"grid-for-edit"==e.attr("role")&&(o=!1),o&&t.editClose()}}),u.on(document,"scroll",function(){t.editClose()})},g=function(t){this.options.editType=t},C=function(t,i,e){this.options.editType=t;var o=$("#"+this.options.id+"_content_tbody"),n=$("tr:eq("+i+")",o);this.editRowFun(n,e)};i.re_hideEditMenu=o,i.re_clickFunEdit=n,i.editRowFun=s,i.editRowIndexFun=r,i.editRow=d,i.re_editClose=a,i.editCell=l,i.nextEditShow=h,i.editValueChange=c,i.re_updateEditRowIndex=p,i.re_updateValueAtEdit=f,i.setEditType=m,i.setEditable=w,i.edit_initEventFun=v,i.setGridEditType=g,i.setGridEditTypeAndEditRow=C},function(t,i,e){"use strict";i.__esModule=!0,i.formEditCell=i.re_editorRowChangeFun=i.editForm_setRequired=i.editForm_initDefault=void 0;var o=(e(13),function(){this.defaults=$.extend(!0,{},this.defaults,{noneEditableFormShow:!0})}),n=function(t,i){var e=this;$.each(this.gridCompColumnArr,function(o){this.options.field==t&&(this.options.required=i,i?$("#"+e.options.id+"_edit_"+this.options.field).parent().find(".u-grid-edit-mustFlag").show():$("#"+e.options.id+"_edit_"+this.options.field).parent().find(".u-grid-edit-mustFlag").hide())})},s=function(){if($("#"+this.options.id+"_edit_form").length>0){var t=$("#"+this.options.id+"_edit_form")[0].offsetHeight;$("#"+this.options.id+"_numCol_edit").css("height",t),$("#"+this.options.id+"_multiSelect_edit").css("height",t)}},r=function(t,i,e,o,n){var s=e+"";s.lengthb()>28&&(s=s.substrCH(26)+"...");var r='<div class="u-grid-edit-whole-div"><div class="u-grid-edit-label"><div title="'+e+'" style="color:'+n+'">'+s+'<span style="color:red;'+(o?"":"display: none")+'" class="u-grid-edit-mustFlag">*</span></div></div>';return r+='<div id="'+this.options.id+"_edit_"+i+'" class="u-grid-edit-div"></div>',r+="</div>"};i.editForm_initDefault=o,i.editForm_setRequired=n,i.re_editorRowChangeFun=s,i.formEditCell=r},function(t,i,e){"use strict";i.__esModule=!0,i.re_widthChangeGridFunFixed=i.re_createContentOneRowFixed=i.re_createContentTableFixed=i.re_createHeaderTableFixed=i.fixed_columnsVisibleFun=i.re_initGridCompFixedColumn=void 0;var o=(e(19),function(){var t=this;$.each(this.gridCompColumnArr,function(i){1==this.options.fixed&&t.gridCompColumnFixedArr.push(this)}),$.each(this.gridCompColumnFixedArr,function(i){for(var i=t.gridCompColumnArr.length;i>-1;i--)if(t.gridCompColumnArr[i]==this){t.gridCompColumnArr.splice(i,1);break}})}),n=function(){var t=this,i=0;$.each(this.gridCompColumnFixedArr,function(){this.options.visible&&(i+=parseInt(this.options.width),this.firstColumn=t.firstColumn,t.firstColumn=!1)}),this.fixedRealWidth=i},s=function(){return this.createHeaderTable("fixed")},r=function(){return this.createContentTable("fixed")},d=function(t){return this.createContentOneRow(t,"fixed")},a=function(t){this.fixedRealWidth>t?this.fixedWidth=t:this.fixedWidth=this.fixedRealWidth};i.re_initGridCompFixedColumn=o,i.fixed_columnsVisibleFun=n,i.re_createHeaderTableFixed=s,i.re_createContentTableFixed=r,i.re_createContentOneRowFixed=d,i.re_widthChangeGridFunFixed=a},function(t,i){"use strict";i.__esModule=!0;var e=function(){if(!this.createFormFlag){var t='<div id="'+this.options.id+'_form" class="u-grid-form">';t+=this.createFromContent(),$("#"+this.options.id)[0].insertAdjacentHTML("afterBegin",t),this.createFormFlag=!0}},o=function(){var t='<div class="u-grid-form-content" id="'+this.options.id+'_form_content" class="u-grid-content">';return t+='<table role="grid" id="'+this.options.id+'_form_content_table">',t+=this.createFormContentRows(),t+="</table>"},n=function(){var t=this,i="";return this.dataSourceObj.rows&&(i+='<tbody role="rowgroup" id="'+this.options.id+'_form_content_tbody">',$.each(this.dataSourceObj.rows,function(){i+='<tr role="row"><td role="rowcell">';var e=this.value;$.each(t.gridCompColumnArr,function(){var t=this.options.field,o=this.options.title,n=$(e).attr(t);i+="<div>"+o+":</div>",i+="<div>"+n+"</div>"}),i+="</td></tr>"}),i+="</tbody>"),i},s=function(){this.createFromDivs(),$("#"+this.options.id+"_grid").css("display","none"),$("#"+this.options.id+"_form").css("display","block"),this.showType="form","function"==typeof this.options.afterCreate&&this.options.afterCreate.call(this)};i.createFromDivs=e,i.createFromContent=o,i.createFormContentRows=n,i.widthChangeFormFun=s},function(t,i){"use strict";i.__esModule=!0;var e=function(){var t=this,i="",e=0;$("#"+this.options.id+"_header_table th",this.$ele).each(function(o){var n=t.gridCompColumnArr[o],s=t.getString(n.options.parentHeader,""),r=0;if(n.options.visible&&(r=parseInt(n.options.width)),""!=i&&s!=i&&$("#"+t.options.id+i).css("width",e-1+"px"),""!=s){var d=t.getLevelTitleByField(s);if(s!=i&&(e=0,!t.parentFlag)){var a='<div id="'+t.options.id+s+'" class="u-gird-parent"><div class="u-grid-header-link" title="'+d+'">'+d+"</div></div>";this.insertAdjacentHTML("afterBegin",a)}e+=r}i=s}),""!=i&&$("#"+t.options.id+i).css("width",e-1+"px"),this.parentFlag=!0},o=function(t){if(t.headerLevel>1){this.gridCompLevelColumn.push(t);var i=this.gridCompColumnArr.length;this.gridCompColumnArr.length=i-1,this.basicGridCompColumnArr&&this.basicGridCompColumnArr.length>0&&(this.basicGridCompColumnArr.length=i-1)}},n=function(){if(this.options.overWidthHiddenColumn){this.gridCompHiddenLevelColumnArr=this.gridCompColumnArr.slice(0),this.gridCompHiddenLevelColumnArr.sort(function(t,i){var e=t.options.hiddenLevel,o=i.options.hiddenLevel;return e>o?-1:1})}},s=function(t){for(var i=0;i<this.gridCompLevelColumn.length;i++){var e=this.gridCompLevelColumn[i].field;if(e==t)return this.gridCompLevelColumn[i].title}return""};i.re_resetThVariableHeaderLevel=e,i.re_initGridCompColumnHeaderLevelFun=o,i.initGridHiddenLevelColumn=n,i.getLevelTitleByField=s},function(module,exports){"use strict";exports.__esModule=!0;var re_initGridCompColumnLoacl=function(){var t=this,i=this.getGridCompColumnArrFromLocal();null!=i&&(this.gridCompColumnArr=i,$.each(this.gridCompColumnArr,function(){for(var i=this.options.field,e=0;e<t.options.columns.length;e++){var o=t.options.columns[e];if(o.field==i){var n=$.extend({},o,this.options);this.options=n,this.options.realWidth=this.options.width;break}}}))},getLocalData=function getLocalData(){if(!this.options.needLocalStorage)return null;if(null==window.localStorage)return null;if(null!=this.$sd_storageData)return this.$sd_storageData;if(null==window.localStorage.getItem(this.localStorageId))try{window.localStorage.setItem(this.localStorageId,"{}")}catch(e){return null}var storageDataStr=window.localStorage.getItem(this.localStorageId);return"undefined"==typeof JSON?this.$sd_storageData=eval("("+storageDataStr+")"):this.$sd_storageData=JSON.parse(storageDataStr),this.$sd_storageData},saveLocalData=function(){if(!this.options.needLocalStorage)return null;var t=this;this.saveSettimeout&&clearTimeout(this.saveSettimeout),this.saveSettimeout=setTimeout(function(){if(null!=t.$sd_storageData&&null!=window.localStorage){var i=JSON.stringify(t.$sd_storageData);try{window.localStorage.setItem(t.localStorageId,i)}catch(e){}}},200)},clearLocalData=function(){return this.options.needLocalStorage?(this.saveSettimeout&&clearTimeout(this.saveSettimeout),window.localStorage.setItem(this.localStorageId,"{}"),void(this.$sd_storageData={})):null},saveGridCompColumnArrToLocal=function(){if(!this.options.needLocalStorage)return null;var t=this.getLocalData();t.gridCompColumnArr=this.gridCompColumnArr.concat(this.gridCompColumnFixedArr),this.saveLocalData()},getGridCompColumnArrFromLocal=function(){if(!this.options.needLocalStorage)return null;var t=this.getLocalData();return null==t?null:null==t.gridCompColumnArr?null:t.gridCompColumnArr};exports.re_initGridCompColumnLoacl=re_initGridCompColumnLoacl,exports.getLocalData=getLocalData,exports.saveLocalData=saveLocalData,exports.clearLocalData=clearLocalData,exports.saveGridCompColumnArrToLocal=saveGridCompColumnArrToLocal,exports.getGridCompColumnArrFromLocal=getGridCompColumnArrFromLocal},function(t,i){"use strict";i.__esModule=!0;var e=function(){if(this.options.overWidthHiddenColumn){this.gridCompHiddenLevelColumnArr=this.gridCompColumnArr.slice(0),this.gridCompHiddenLevelColumnArr.sort(function(t,i){var e=t.options.hiddenLevel,o=i.options.hiddenLevel;return e>o?-1:1})}},o=function(){if(this.options.overWidthHiddenColumn){this.lastVisibleColumn.options.width=this.lastVisibleColumn.options.realWidth;var t=parseInt(this.wholeWidth)-parseInt(this.leftW),i=parseInt(this.fixedWidth)+parseInt(this.contentRealWidth);if(i>t){for(var e=0;e<this.gridCompHiddenLevelColumnArr.length;e++){var o=this.gridCompHiddenLevelColumnArr[e];if(o.options.visible&&(o.options.visible=!1,i=parseInt(i)-parseInt(o.options.width)),!(i>t))break}this.columnsVisibleFun()}else{for(var e=this.gridCompHiddenLevelColumnArr.length-1;e>-1;e--){var o=this.gridCompHiddenLevelColumnArr[e];if(!o.options.visible){if(i=parseInt(i)+parseInt(o.options.width),i>t)break;o.options.visible=!0}}this.columnsVisibleFun()}}};i.re_initGridHiddenLevelColumn=e,i.re_widthChangeGridFunOverWidthHidden=o},function(t,i){"use strict";i.__esModule=!0;var e=function(t){var i="";return this.options.showSumRow&&this.dataSourceObj.rows&&this.dataSourceObj.rows.length>0&&(i+=this.createSumRow(t)),i},o=function(t){var i="";return i},n=function(t){if(this.options.showSumRow){var i,e,o=this;"fixed"==t?(i="fixed_",e=this.gridCompColumnFixedArr):(i="",e=this.gridCompColumnArr);var n=parseInt(this.wholeHeight)-this.exceptContentHeight-48-this.scrollBarHeight;n=n>0?n:0;var s='<tr role="row" class="u-grid-content-sum-row" id="'+this.options.id+"_content_"+i+'sum_row" style="top:'+n+'px;">';return $.each(e,function(){var t=this.options.field,i=this.options.precision,e=this.options.dataType,n=o.dataSourceObj.getSumValue(t,this,o);if("float"==e){var r={};r.value=n,r.precision=i?i:2,n=o.DicimalFormater(r)}var d="";this.options.visible||(d='style="display:none;"'),s+='<td role="rowcell" title="'+n+'" '+d+">",this.firstColumn&&(s+='<div class="u-gird-centent-sum-div"><span>'+o.transMap.ml_sum+"</span></div>");var a="";"integer"!=this.options.dataType&&"float"!=this.options.dataType||(a='style="text-align: right;"'),s+='<div class="u-grid-content-td-div" '+a+'><span value="'+n+'">'+n+"</span></div></td>"}),s+="</tr>"}},s=function(t,i){if(this.options.showSumRow){var e,o,n=this;"fixed"==i?(e="fixed_",o=this.gridCompColumnFixedArr):(e="",o=this.gridCompColumnArr);var s=parseInt(this.wholeHeight)-this.exceptContentHeight-48-this.scrollBarHeight;s=s>0?s:0;var r=t.insertRow();r.row="row",r.className="u-grid-content-sum-row",r.id=this.options.id+"_content_"+e+"sum_row",r.style.top=s+"px",$.each(o,function(){var t=this.options.field,i=this.options.precision,e=this.options.dataType,o=n.dataSourceObj.getSumValue(t,this,n);if("float"==e){var s={};s.value=o,s.precision=i?i:2,o=n.DicimalFormater(s)}var d=r.insertCell();d.role="rowcell",d.title=o;var a="";"integer"!=this.options.dataType&&"float"!=this.options.dataType||(a='style="text-align: right;"');var l='<div class="u-grid-content-td-div" '+a+">";this.firstColumn&&(l+='<div class="u-gird-centent-sum-div"><span>'+n.transMap.ml_sum+"</span></div>"),l+='<span value="'+o+'">'+o+"</span></div>",d.insertAdjacentHTML("afterBegin",l)})}},r=function(){if(this.options.showSumRow){$("#"+this.options.id+"_content_div tbody .u-grid-content-sum-row").remove(),$("#"+this.options.id+"_content_fixed_div tbody .u-grid-content-sum-row").remove();try{if(this.dataSourceObj.rows&&this.dataSourceObj.rows.length>0){var t=this.createSumRow();$("#"+this.options.id+"_content_div tbody")[0].insertAdjacentHTML("beforeEnd",t);var t=this.createSumRow("fixed");$("#"+this.options.id+"_content_fixed_div tbody")[0]&&$("#"+this.options.id+"_content_fixed_div tbody")[0].insertAdjacentHTML("beforeEnd",t)}}catch(i){var e=$("#"+this.options.id+"_content_div table")[0];$("#"+this.options.id+"_content_fixed_div table")[0];this.createSumRowForIE(e),this.createSumRowForIE(e,"fixed")}this.renderSumRow()}},d=function(){var t=this;$.each(this.gridCompColumnFixedArr,function(i){var e=this.options.sumCol,o=this.options.sumRenderType,n="fixed_";if(e){var s=$("#"+t.options.id+"_content_"+n+"sum_row").find("td").eq(i).find("span"),r=s[s.length-1];if(r)if("function"==typeof o){var d=$(r).attr("value"),a={};a.value=d,a.element=r,a.gridObj=t,a.gridCompColumn=this,o.call(t,a)}else"integer"!=dataType&&"float"!=dataType||(r.style.textAlign="right")}}),$.each(this.gridCompColumnArr,function(i){var e=this.options.sumCol,o=this.options.dataType,n=this.options.sumRenderType,s="";if(e){var r=$("#"+t.options.id+"_content_"+s+"sum_row").find("td").eq(i).find("span"),d=r[r.length-1];if(d)if("function"==typeof n){var a=$(d).attr("value"),l={};l.value=a,l.element=d,l.gridObj=t,l.gridCompColumn=this,n.call(t,l)}else"integer"!=o&&"float"!=o||(d.style.textAlign="right")}})},a=function(t,i,e,o,n){var s=this,r=t.options.sumCol,d=t.options.sumRenderType,a=t.options.dataType,l=n===!0?"fixed_":"";if(r){var h=$("#"+this.options.id+"_content_"+l+"sum_row").find("td").eq(i).find("span"),u=h[h.length-1];if(u)if("function"==typeof d){var c=$(u).attr("value"),p={};p.value=c,p.element=u,p.gridObj=s,p.gridCompColumn=t,d.call(s,p)}else"integer"!=a&&"float"!=a||(u.style.textAlign="right")}};i.re_createContentRowsSumRow=e,i.re_createContentSumRow=o,i.createSumRow=n,i.createSumRowForIE=s,i.re_repairSumRow=r,i.renderSumRow=d,i.re_renderTypeSumRow=a},function(t,i,e){"use strict";i.__esModule=!0,i.swapColumnEnd=i.swapColumnFun=i.swapColumnStart=i.swap_initGridEventFun=i.swap_initEventFun=void 0;var o=(e(4),function(){var t=this;$("#"+this.options.id).on("mousedown",function(i){if($(i.target).closest("#"+t.options.id+"_header").length>0){var e=$(i.target).closest("th")[0];t.options.canSwap&&t.swapColumnStart(i,e),i.preventDefault()}else $(i.target).closest("#"+t.options.id+"_content").length>0}),$("#"+this.options.id).on("mousemove",function(i){t.mouseMoveX=i.clientX,t.mouseMoveY=i.clientY,t.mouseMoveX==t.mouseDownX&&t.mouseDownY==t.mouseMoveY||"mouseDownX"==t.mouseDownX||!t.options.canSwap||(t.swapColumnFlag=!0),t.swapColumnFun(i),i.stopPropagation()}),$("#"+this.options.id+"_top").on("mousemove",function(i){t.mouseMoveX=i.clientX,t.mouseMoveY=i.clientY,t.mouseMoveX==t.mouseDownX&&t.mouseDownY==t.mouseMoveY||"mouseDownX"==t.mouseDownX||!t.options.canSwap||(t.swapColumnFlag=!0),t.swapColumnFun(i),i.stopPropagation()}),$("#"+this.options.id).on("mouseup",function(i){t.mouseUpX=i.clientX,t.mouseUpY=i.clientY,t.swapColumnEnd(i),t.mouseUpX="mouseUpX",t.mouseUpY="mouseUpY",t.mouseDownX="mouseDownX",t.mouseDownY="mouseDownY",t.mouseMoveX="mouseMoveX",t.mouseMoveY="mouseMoveY"}),$("#"+this.options.id+"_top").on("mouseup",function(i){t.mouseUpX=i.clientX,t.mouseUpY=i.clientY,t.swapColumnEnd(i),t.mouseUpX="mouseUpX",t.mouseUpY="mouseUpY",t.mouseDownX="mouseDownX",t.mouseDownY="mouseDownY",t.mouseMoveX="mouseMoveX",t.mouseMoveY="mouseMoveY"})}),n=function(){},s=function(t,i){this.options.canSwap&&(this.swapColumnEle=i,this.swapColumnStartX=t.clientX,this.swapColumnStartY=t.clientY)},r=function(t){if(this.options.canSwap){var i=this;if(this.swapColumnFlag){var e=this.swapColumnEle;if(!e)return;var o=$(e);if(!e.gridCompColumn)return;var n=e.gridCompColumn;if(0==$("#"+this.options.id+"_clue").length){var s=$('<div class="u-grid u-grid-header-drag-clue" id="'+this.options.id+'_clue" />').css({width:e.scrollWidth+"px",left:e.attrLeftTotalWidth-i.scrollLeft+i.leftW+i.fixedWidth+"px",top:"0px",paddingLeft:o.css("paddingLeft"),paddingRight:o.css("paddingRight"),lineHeight:o.height()+"px",paddingTop:o.css("paddingTop"),paddingBottom:o.css("paddingBottom")}).html(n.options.title||n.options.field).prepend('<span class="uf uf-bancirclesymbol u-grid-header-drag-status" />');try{$("#"+this.options.id)[0].insertAdjacentElement("afterBegin",s[0])}catch(t){$("#"+this.options.id)[0].insertBefore(s[0],$("#"+this.options.id)[0].firstChild)}s.on("mousemove",function(){t.stopPropagation()})}this.swapColumnEndX=t.clientX,this.swapColumnEndY=t.clientY;var r=this.swapColumnEndX-this.swapColumnStartX,d=this.swapColumnEndY-this.swapColumnStartY;if($("#"+this.options.id+"_clue").css({left:e.attrLeftTotalWidth+r-i.scrollLeft+i.leftW+i.fixedWidth+"px",top:d+"px"}),0==$("#"+this.options.id+"_swap_top").length){var s=$('<span class="uf uf-sortdown u-grid-header-swap-tip-span" id="'+this.options.id+'_swap_top"/>');s.css({top:o.height()-6+"px"});var a=$('<span class="uf uf-sortup u-grid-header-swap-tip-span" id="'+this.options.id+'_swap_down" />');a.css({top:"6px"});try{$("#"+this.options.id)[0].insertAdjacentElement("afterBegin",s[0]),$("#"+this.options.id)[0].insertAdjacentElement("afterBegin",a[0])}catch(t){$("#"+this.options.id)[0].insertBefore(s[0],$("#"+this.options.id)[0].firstChild),
$("#"+this.options.id)[0].insertBefore(a[0],$("#"+this.options.id)[0].firstChild)}}this.canSwap=!1,$("#"+this.options.id+"_header_table th").each(function(e){var o=$(this).offset().left,n=o+parseInt(this.attrWidth);if(0==e&&t.clientX<o)i.swapColumnEle!=this&&(i.swapToColumnEle="LeftEle",$("#"+i.options.id+"_swap_top").css({left:-i.scrollLeft-3+i.leftW+i.fixedWidth+"px",display:"block"}),$("#"+i.options.id+"_swap_down").css({left:-i.scrollLeft-3+i.leftW+i.fixedWidth+"px",display:"block"})),i.canSwap=!0;else if(o<t.clientX&&t.clientX<n&&i.swapColumnEle!=this&&parseInt($(this).attr("index"))+1!=parseInt($(i.swapColumnEle).attr("index")))return i.swapToColumnEle!=this&&(i.swapToColumnEle=this,$("#"+i.options.id+"_swap_top").css({left:this.attrRightTotalWidth-i.scrollLeft-3+i.leftW+i.fixedWidth+"px",display:"block"}),$("#"+i.options.id+"_swap_down").css({left:this.attrRightTotalWidth-i.scrollLeft-3+i.leftW+i.fixedWidth+"px",display:"block"})),i.canSwap=!0,!1}),this.canSwap?$(".u-grid-header-drag-status").removeClass("uf-bancirclesymbol").addClass("uf-plussigninablackcircle"):($("#"+this.options.id+"_swap_top").css("display","none"),$("#"+this.options.id+"_swap_down").css("display","none"),$(".u-grid-header-drag-status").removeClass("uf-plussigninablackcircle").addClass("uf-bancirclesymbol"),this.swapToColumnEle=null),$("#"+this.options.id+"_top").css("display","block")}}},d=function(t){if(this.options.canSwap){if(this.swapColumnFlag){if(this.swapToColumnEle){var i=this.swapColumnEle,e=this.swapToColumnEle,o=$(i).attr("index"),n=$(e).attr("index"),s=this.gridCompColumnArr[o];this.gridCompColumnArr.splice(parseInt(n)+1,0,s),o<n?this.gridCompColumnArr.splice(o,1):this.gridCompColumnArr.splice(parseInt(o)+1,1),this.saveGridCompColumnArrToLocal(),this.repaintGridDivs()}$("#"+this.options.id+"_clue").remove(),$("#"+this.options.id+"_swap_top").css("display","none"),$("#"+this.options.id+"_swap_down").css("display","none")}this.swapColumnFlag=!1,$("#"+this.options.id+"_top").css("display","none")}};i.swap_initEventFun=o,i.swap_initGridEventFun=n,i.swapColumnStart=s,i.swapColumnFun=r,i.swapColumnEnd=d}]);