(function(){"use strict";$.extend(u8.Base.Widgets.GridModel.prototype,{toResultSet:function(l){l=l||{};var e=this.getColumnCount();var t=this.columns||[];if(l.columnFilter!==null){t=t.filter(l.columnFilter||u8._.neq("visible",false))}var r=0;t=t.map(l.columnProjector||function(l){return{alias:"Root",label:l.label,fieldId:r++,visible:l.visible}});var o=l.formatCells!==false;var a=[];var i=this.getRowCount();for(var s=0;s<i;s++){var u=[];for(var n=0;n<e;n++){var v=this.getColumn(n);var c=this.getCellData(s,v);if(o&&v.cellFormatter){c=v.cellFormatter(c)}u.push(c)}a.push({uids:[null],values:u})}var f=[{label:l.label||"",alias:"Root",infoAreaId:null}];return new u8.Crm.ResultSet({columns:t,recordsPerRow:f,rows:a})}})})();