<!DOCTYPE html>
<html ng-app="myApp">

  <head lang="en">
    <meta charset="utf-8" />
    <title>Custom Plunker</title>
    <link  rel="stylesheet" href="ag-grid.css" />
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.js"></script>
    <script src="http://code.angularjs.org/1.2.15/angular.js"></script>
    <script  src="ag-grid.min.js"></script>
    <link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="style.css" />
    
    <script type="text/javascript" src="main.js"></script>
  </head>

  <body ng-controller="MyCtrl">
    <div class="gridStyle" ag-grid="gridOptions"></div>
  </body>

</html>
/*style.css*/
.gridStyle {
    border: 1px solid rgb(212,212,212);
    width: 1000px; 
    height: 200px
}

.container {
 margin-top: 20px; 
}

.ngGrid {
  width: 800px;
}
.ag-header-cell {
	background: none repeat scroll 0 0 #53555A;
	border: 1px solid #DDDDDD;
	color: #FFFFFF;
	font-weight: lighter;
	line-height: 15px;
}

.ag-header-cell-grouped{
	background: none repeat scroll 0 0 #53555A;
	border: 1px solid #DDDDDD;
	color: #FFFFFF;
	font-weight: lighter;
	line-height: 15px;
}


.ag-row:hover {
    background-color: #FFA500;
    cursor: pointer;
}
// main.js
var app = angular.module('myApp', ['agGrid']);
app.controller('MyCtrl', ['$scope', '$http',
function($scope, $http) {
var myData =[{"athlete":"Michael Phelps","age":23,"country":"United States","year":2008,"date":"24/08/2008","sport":"Swimming","gold":8,"silver":0,"bronze":0,"total":8},
  
  {"athlete":"Natalie Coughlin","age":25,"country":"United States","year":2008,"sport":"Swimming",selected: true},
  {"athlete":"Aleksey Nemov","age":24,"country":"Russia","year":2000,"sport":"Gymnastics",selected: true},
  {"athlete":"Gary Hall Jr.","age":25,"country":"United States","year":2000,"sport":"Swimming",selected: false},
  {"athlete":"Michael Klim","age":23,"country":"Australia","year":2000,"sport":"Swimming",selected: true},
  {"athlete":"Susie O'Neill","age":27,"country":"Australia","year":2000,"sport":"Swimming",selected: false},
  {"athlete":"Jenny Thompson","age":27,"country":"United States","year":2000,"sport":"Swimming",selected: true},
  {"athlete":"Aliya Mustafina","age":17,"country":"Russia","year":2012,"sport":"Gymnastics",selected: false},
  {"athlete":"Shawn Johnson","age":16,"country":"United States","year":2008,"sport":"Gymnastics",selected: true},
  {"athlete":"Brittany Elmslie","age":18,"country":"Australia","year":2012,"sport":"Swimming",selected: false}];

var columnDefs = [
        {headerName: "Age", field: "age", width: 90, checkboxSelection: true},
        {headerName: "Country", field: "country", width: 120,checkboxSelection: true},
        {headerName: "Year", field: "year", width: 90},
        {headerName: "Selected", field: "selected", width: 110, cellRenderer: customCellRenderer}
    ];
    
    function customCellRenderer(params) {
      var cellTemplate="";
      cellTemplate = '<input type="checkbox" ng-model="selected">';
      return cellTemplate;
    };


$scope.gridOptions = {
        columnDefs: columnDefs,
        rowData: myData,
        rowSelection: 'multiple',
        groupKeys: ['country','sport'],
        groupSelectsChildren: true,
        suppressRowClickSelection: true,
        groupColumnDef: {headerName: "Athlete", field: "athlete", width: 200,
            cellRenderer: {
                renderer: "group"
            }}
    };
}]);
var ag;!function(e){var t;!function(e){var t=function(){function t(e){this.type=e}return t.prototype.toString=function(){var e="ColumnChangeEvent {type: "+this.type;return this.column&&(e+=", column: "+this.column.colId),this.columnGroup&&(e+=", columnGroup: "+this.columnGroup.name),this.fromIndex&&(e+=", fromIndex: "+this.fromIndex),this.toIndex&&(e+=", toIndex: "+this.toIndex),this.pinnedColumnCount&&(e+=", pinnedColumnCount: "+this.pinnedColumnCount),e+="}"},t.prototype.withColumn=function(e){return this.column=e,this},t.prototype.withColumnGroup=function(e){return this.columnGroup=e,this},t.prototype.withFromIndex=function(e){return this.fromIndex=e,this},t.prototype.withPinnedColumnCount=function(e){return this.pinnedColumnCount=e,this},t.prototype.withToIndex=function(e){return this.toIndex=e,this},t.prototype.getFromIndex=function(){return this.fromIndex},t.prototype.getToIndex=function(){return this.toIndex},t.prototype.getPinnedColumnCount=function(){return this.pinnedColumnCount},t.prototype.getType=function(){return this.type},t.prototype.getColumn=function(){return this.column},t.prototype.getColumnGroup=function(){return this.columnGroup},t.prototype.isPivotChanged=function(){return this.type===e.Events.EVENT_COLUMN_PIVOT_CHANGE||this.type===e.Events.EVENT_COLUMN_EVERYTHING_CHANGED},t.prototype.isValueChanged=function(){return this.type===e.Events.EVENT_COLUMN_VALUE_CHANGE||this.type===e.Events.EVENT_COLUMN_EVERYTHING_CHANGED},t.prototype.isIndividualColumnResized=function(){return this.type===e.Events.EVENT_COLUMN_RESIZED&&void 0!==this.column&&null!==this.column},t}();e.ColumnChangeEvent=t}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,i=/([^\s,]+)/g,o=function(){function e(){}return e.iterateObject=function(e,t){for(var i=Object.keys(e),o=0;o<i.length;o++){var n=i[o],r=e[n];t(n,r)}},e.cloneObject=function(e){for(var t={},i=Object.keys(e),o=0;o<i.length;o++){var n=i[o],r=e[n];t[n]=r}return t},e.map=function(e,t){for(var i=[],o=0;o<e.length;o++){var n=e[o],r=t(n);i.push(r)}return i},e.forEach=function(e,t){if(e)for(var i=0;i<e.length;i++){var o=e[i];t(o,i)}},e.filter=function(e,t){var i=[];return e.forEach(function(e){t(e)&&i.push(e)}),i},e.assign=function(t,i){e.iterateObject(i,function(e,i){t[e]=i})},e.getFunctionParameters=function(e){var o=e.toString().replace(t,""),n=o.slice(o.indexOf("(")+1,o.indexOf(")")).match(i);return null===n?[]:n},e.find=function(e,t,i){if(null===e||void 0===e)return null;for(var o=0;o<e.length;o++)if(e[o][t]===i)return e[o];return null},e.toStrings=function(e){return this.map(e,function(e){return void 0!==e&&null!==e&&e.toString?e.toString():null})},e.iterateArray=function(e,t){for(var i=0;i<e.length;i++){var o=e[i];t(o,i)}},e.isNode=function(e){return"object"==typeof Node?e instanceof Node:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},e.isElement=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName},e.isNodeOrElement=function(e){return this.isNode(e)||this.isElement(e)},e.addChangeListener=function(e,t){e.addEventListener("changed",t),e.addEventListener("paste",t),e.addEventListener("input",t),e.addEventListener("keydown",t),e.addEventListener("keyup",t)},e.makeNull=function(e){return null===e||void 0===e||""===e?null:e},e.removeAllChildren=function(e){if(e)for(;e.hasChildNodes();)e.removeChild(e.lastChild)},e.removeElement=function(e,t){this.removeFromParent(e.querySelector(t))},e.removeFromParent=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},e.isVisible=function(e){return null!==e.offsetParent},e.loadTemplate=function(e){var t=document.createElement("div");return t.innerHTML=e,t.firstChild},e.querySelectorAll_addCssClass=function(e,t,i){for(var o=e.querySelectorAll(t),n=0;n<o.length;n++)this.addCssClass(o[n],i)},e.querySelectorAll_removeCssClass=function(e,t,i){for(var o=e.querySelectorAll(t),n=0;n<o.length;n++)this.removeCssClass(o[n],i)},e.querySelectorAll_replaceCssClass=function(e,t,i,o){for(var n=e.querySelectorAll(t),r=0;r<n.length;r++)this.removeCssClass(n[r],i),this.addCssClass(n[r],o)},e.addOrRemoveCssClass=function(e,t,i){i?this.addCssClass(e,t):this.removeCssClass(e,t)},e.addCssClass=function(e,t){if(e.className&&e.className.length>0){var i=e.className.split(" ");i.indexOf(t)<0&&(i.push(t),e.className=i.join(" "))}else e.className=t},e.offsetHeight=function(e){return e&&e.clientHeight?e.clientHeight:0},e.offsetWidth=function(e){return e&&e.clientWidth?e.clientWidth:0},e.removeCssClass=function(e,t){if(e.className&&e.className.length>0){var i=e.className.split(" "),o=i.indexOf(t);o>=0&&(i.splice(o,1),e.className=i.join(" "))}},e.removeFromArray=function(e,t){e.indexOf(t)>=0&&e.splice(e.indexOf(t),1)},e.defaultComparator=function(e,t){var i=null===e||void 0===e,o=null===t||void 0===t;return i&&o?0:i?-1:o?1:t>e?-1:e>t?1:0},e.formatWidth=function(e){return"number"==typeof e?e+"px":e},e.useRenderer=function(e,t,i){var o=t(i);if("string"==typeof o){var n=document.createElement("span");n.innerHTML=o,e.appendChild(n)}else this.isNodeOrElement(o)&&e.appendChild(o)},e.createIcon=function(e,t,i,o){var n,r=document.createElement("span");if(i&&i.colDef.icons&&(n=i.colDef.icons[e]),!n&&t.getIcons()&&(n=t.getIcons()[e]),n){var s;if("function"==typeof n)s=n();else{if("string"!=typeof n)throw"icon from grid options needs to be a string or a function";s=n}if("string"==typeof s)r.innerHTML=s;else{if(!this.isNodeOrElement(s))throw"iconRenderer should return back a string or a dom object";r.appendChild(s)}}else r.appendChild(o());return r},e.addStylesToElement=function(e,t){Object.keys(t).forEach(function(i){e.style[i]=t[i]})},e.getScrollbarWidth=function(){var e=document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.msOverflowStyle="scrollbar",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var i=document.createElement("div");i.style.width="100%",e.appendChild(i);var o=i.offsetWidth;return e.parentNode.removeChild(e),t-o},e.isKeyPressed=function(e,t){var i=e.which||e.keyCode;return i===t},e.setVisible=function(e,t){e.style.display=t?"inline":"none"},e.isBrowserIE=function(){return this.isIE},e.isBrowserSafari=function(){return this.isSafari},e.isSafari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,e.isIE=!1||!!document.documentMode,e}();e.Utils=o}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=function(){function e(){}return e.STEP_EVERYTHING=0,e.STEP_FILTER=1,e.STEP_SORT=2,e.STEP_MAP=3,e.ASC="asc",e.DESC="desc",e.ROW_BUFFER_SIZE=20,e.MIN_COL_WIDTH=10,e.SUM="sum",e.MIN="min",e.MAX="max",e.KEY_TAB=9,e.KEY_ENTER=13,e.KEY_BACKSPACE=8,e.KEY_DELETE=46,e.KEY_ESCAPE=27,e.KEY_SPACE=32,e.KEY_DOWN=40,e.KEY_UP=38,e.KEY_LEFT=37,e.KEY_RIGHT=39,e}();e.Constants=t}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Constants,i=function(){function e(t,i){this.colDef=t,this.actualWidth=i,this.visible=!t.hide,this.sort=t.sort,this.sortedAt=t.sortedAt,this.colId=t.colId?t.colId:t.field?t.field:""+e.colIdSequence++}return e.prototype.isGreaterThanMax=function(e){return this.colDef.maxWidth>=t.MIN_COL_WIDTH?e>this.colDef.maxWidth:!1},e.prototype.getMinimumWidth=function(){return this.colDef.minWidth>t.MIN_COL_WIDTH?this.colDef.minWidth:t.MIN_COL_WIDTH},e.prototype.setMinimum=function(){this.actualWidth=this.getMinimumWidth()},e.colIdSequence=0,e}();e.Column=i}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=function(){function e(e,t){this.allColumns=[],this.displayedColumns=[],this.expandable=!1,this.expanded=!1,this.pinned=e,this.name=t}return e.prototype.getMinimumWidth=function(){var e=0;return this.displayedColumns.forEach(function(t){e+=t.getMinimumWidth()}),e},e.prototype.addColumn=function(e){this.allColumns.push(e)},e.prototype.calculateExpandable=function(){for(var e=!1,t=!1,i=!1,o=0,n=this.allColumns.length;n>o;o++){var r=this.allColumns[o];"open"===r.colDef.headerGroupShow?(e=!0,i=!0):"closed"===r.colDef.headerGroupShow?(t=!0,i=!0):(e=!0,t=!0)}this.expandable=e&&t&&i},e.prototype.calculateActualWidth=function(){var e=0;this.displayedColumns.forEach(function(t){e+=t.actualWidth}),this.actualWidth=e},e.prototype.calculateDisplayedColumns=function(){if(this.displayedColumns=[],!this.expandable)return void(this.displayedColumns=this.allColumns);for(var e=0,t=this.allColumns.length;t>e;e++){var i=this.allColumns[e];switch(i.colDef.headerGroupShow){case"open":this.expanded&&this.displayedColumns.push(i);break;case"closed":this.expanded||this.displayedColumns.push(i);break;default:this.displayedColumns.push(i)}}},e.prototype.addToVisibleColumns=function(e){for(var t=0;t<this.displayedColumns.length;t++){var i=this.displayedColumns[t];e.push(i)}},e}();e.ColumnGroup=t}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){function t(e){return e===!0||"true"===e}var i=25,o=e.Constants,n=function(){function e(){}return e.prototype.init=function(e,t){this.gridOptions=e,this.headerHeight=e.headerHeight,this.groupHeaders=e.groupHeaders,this.rowHeight=e.rowHeight,this.floatingTopRowData=e.floatingTopRowData,this.floatingBottomRowData=e.floatingBottomRowData,t.addGlobalListener(this.globalEventHandler.bind(this)),this.rowHeight||(this.rowHeight=i),this.checkForDeprecated()},e.prototype.isRowSelection=function(){return"single"===this.gridOptions.rowSelection||"multiple"===this.gridOptions.rowSelection},e.prototype.isRowDeselection=function(){return t(this.gridOptions.rowDeselection)},e.prototype.isRowSelectionMulti=function(){return"multiple"===this.gridOptions.rowSelection},e.prototype.getContext=function(){return this.gridOptions.context},e.prototype.isVirtualPaging=function(){return t(this.gridOptions.virtualPaging)},e.prototype.isShowToolPanel=function(){return t(this.gridOptions.showToolPanel)},e.prototype.isToolPanelSuppressPivot=function(){return t(this.gridOptions.toolPanelSuppressPivot)},e.prototype.isToolPanelSuppressValues=function(){return t(this.gridOptions.toolPanelSuppressValues)},e.prototype.isRowsAlreadyGrouped=function(){return t(this.gridOptions.rowsAlreadyGrouped)},e.prototype.isGroupSelectsChildren=function(){return t(this.gridOptions.groupSelectsChildren)},e.prototype.isGroupHidePivotColumns=function(){return t(this.gridOptions.groupHidePivotColumns)},e.prototype.isGroupIncludeFooter=function(){return t(this.gridOptions.groupIncludeFooter)},e.prototype.isGroupSuppressBlankHeader=function(){return t(this.gridOptions.groupSuppressBlankHeader)},e.prototype.isSuppressRowClickSelection=function(){return t(this.gridOptions.suppressRowClickSelection)},e.prototype.isSuppressCellSelection=function(){return t(this.gridOptions.suppressCellSelection)},e.prototype.isSuppressMultiSort=function(){return t(this.gridOptions.suppressMultiSort)},e.prototype.isGroupSuppressAutoColumn=function(){return t(this.gridOptions.groupSuppressAutoColumn)},e.prototype.isForPrint=function(){return t(this.gridOptions.forPrint)},e.prototype.isSuppressHorizontalScroll=function(){return t(this.gridOptions.suppressHorizontalScroll)},e.prototype.isUnSortIcon=function(){return t(this.gridOptions.unSortIcon)},e.prototype.isSuppressMenuHide=function(){return t(this.gridOptions.suppressMenuHide)},e.prototype.getRowStyle=function(){return this.gridOptions.rowStyle},e.prototype.getRowClass=function(){return this.gridOptions.rowClass},e.prototype.getRowStyleFunc=function(){return this.gridOptions.getRowStyle},e.prototype.getRowClassFunc=function(){return this.gridOptions.getRowClass},e.prototype.getHeaderCellRenderer=function(){return this.gridOptions.headerCellRenderer},e.prototype.getApi=function(){return this.gridOptions.api},e.prototype.isEnableColResize=function(){return t(this.gridOptions.enableColResize)},e.prototype.isSingleClickEdit=function(){return t(this.gridOptions.singleClickEdit)},e.prototype.getGroupDefaultExpanded=function(){return this.gridOptions.groupDefaultExpanded},e.prototype.getGroupKeys=function(){return this.gridOptions.groupKeys},e.prototype.getGroupAggFunction=function(){return this.gridOptions.groupAggFunction},e.prototype.getGroupAggFields=function(){return this.gridOptions.groupAggFields},e.prototype.getRowData=function(){return this.gridOptions.rowData},e.prototype.isGroupUseEntireRow=function(){return t(this.gridOptions.groupUseEntireRow)},e.prototype.getGroupColumnDef=function(){return this.gridOptions.groupColumnDef},e.prototype.isGroupSuppressRow=function(){return t(this.gridOptions.groupSuppressRow)},e.prototype.isAngularCompileRows=function(){return t(this.gridOptions.angularCompileRows)},e.prototype.isAngularCompileFilters=function(){return t(this.gridOptions.angularCompileFilters)},e.prototype.isAngularCompileHeaders=function(){return t(this.gridOptions.angularCompileHeaders)},e.prototype.isDebug=function(){return t(this.gridOptions.debug)},e.prototype.getColumnDefs=function(){return this.gridOptions.columnDefs},e.prototype.getDatasource=function(){return this.gridOptions.datasource},e.prototype.getRowBuffer=function(){return this.gridOptions.rowBuffer},e.prototype.isEnableSorting=function(){return t(this.gridOptions.enableSorting)||t(this.gridOptions.enableServerSideSorting)},e.prototype.isEnableCellExpressions=function(){return t(this.gridOptions.enableCellExpressions)},e.prototype.isEnableServerSideSorting=function(){return t(this.gridOptions.enableServerSideSorting)},e.prototype.isEnableFilter=function(){return t(this.gridOptions.enableFilter)||t(this.gridOptions.enableServerSideFilter)},e.prototype.isEnableServerSideFilter=function(){return this.gridOptions.enableServerSideFilter},e.prototype.isSuppressScrollLag=function(){return t(this.gridOptions.suppressScrollLag)},e.prototype.getIcons=function(){return this.gridOptions.icons},e.prototype.getIsScrollLag=function(){return this.gridOptions.isScrollLag},e.prototype.getSortingOrder=function(){return this.gridOptions.sortingOrder},e.prototype.getSlaveGrids=function(){return this.gridOptions.slaveGrids},e.prototype.getGroupRowRenderer=function(){return this.gridOptions.groupRowRenderer},e.prototype.getRowHeight=function(){return this.rowHeight},e.prototype.getHeaderHeight=function(){return"number"==typeof this.headerHeight?this.headerHeight:this.groupHeaders?50:25},e.prototype.setHeaderHeight=function(e){this.headerHeight=e},e.prototype.isGroupHeaders=function(){return t(this.groupHeaders)},e.prototype.setGroupHeaders=function(e){this.groupHeaders=e},e.prototype.getFloatingTopRowData=function(){return this.floatingTopRowData},e.prototype.setFloatingTopRowData=function(e){this.floatingTopRowData=e},e.prototype.getFloatingBottomRowData=function(){return this.floatingBottomRowData},e.prototype.setFloatingBottomRowData=function(e){this.floatingBottomRowData=e},e.prototype.isExternalFilterPresent=function(){return"function"==typeof this.gridOptions.isExternalFilterPresent?this.gridOptions.isExternalFilterPresent():!1},e.prototype.doesExternalFilterPass=function(e){return"function"==typeof this.gridOptions.doesExternalFilterPass?this.gridOptions.doesExternalFilterPass(e):!1},e.prototype.getGroupRowInnerRenderer=function(){return this.gridOptions.groupRowInnerRenderer},e.prototype.getColWidth=function(){return"number"!=typeof this.gridOptions.colWidth||this.gridOptions.colWidth<o.MIN_COL_WIDTH?200:this.gridOptions.colWidth},e.prototype.checkForDeprecated=function(){var e=this.gridOptions;e.suppressUnSort&&console.warn("ag-grid: as of v1.12.4 suppressUnSort is not used. Please use sortOrder instead."),e.suppressDescSort&&console.warn("ag-grid: as of v1.12.4 suppressDescSort is not used. Please use sortOrder instead.")},e.prototype.getPinnedColCount=function(){return this.isForPrint()?0:this.gridOptions.pinnedColumnCount?Number(this.gridOptions.pinnedColumnCount):0},e.prototype.getLocaleTextFunc=function(){if(this.gridOptions.localeTextFunc)return this.gridOptions.localeTextFunc;var e=this;return function(t,i){var o=e.gridOptions.localeText;return o&&o[t]?o[t]:i}},e.prototype.globalEventHandler=function(e,t){var i=this.getCallbackForEvent(e);"function"==typeof this.gridOptions[i]&&this.gridOptions[i](t)},e.prototype.getCallbackForEvent=function(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substr(1)},e}();e.GridOptionsWrapper=n}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=function(){function e(){}return e.prototype.init=function(e){this.logging=e.isDebug()},e.prototype.create=function(e){return new i(e,this.logging)},e}();e.LoggerFactory=t;var i=function(){function e(e,t){this.name=e,this.logging=t}return e.prototype.log=function(e){this.logging&&console.log(this.name+" "+e)},e}();e.Logger=i}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=function(){function e(){}return e.EVENT_COLUMN_EVERYTHING_CHANGED="columnEverythingChanged",e.EVENT_COLUMN_PIVOT_CHANGE="columnPivotChanged",e.EVENT_COLUMN_VALUE_CHANGE="columnValueChanged",e.EVENT_COLUMN_MOVED="columnMoved",e.EVENT_COLUMN_VISIBLE="columnVisible",e.EVENT_COLUMN_GROUP_OPENED="columnGroupOpened",e.EVENT_COLUMN_RESIZED="columnResized",e.EVENT_COLUMN_PINNED_COUNT_CHANGED="columnPinnedCountChanged",e.EVENT_MODEL_UPDATED="modelUpdated",e.EVENT_CELL_CLICKED="cellClicked",e.EVENT_CELL_DOUBLE_CLICKED="cellDoubleClicked",e.EVENT_CELL_CONTEXT_MENU="cellContextMenu",e.EVENT_CELL_VALUE_CHANGED="cellValueChanged",e.EVENT_CELL_FOCUSED="cellFocused",e.EVENT_ROW_SELECTED="rowSelected",e.EVENT_SELECTION_CHANGED="selectionChanged",e.EVENT_BEFORE_FILTER_CHANGED="beforeFilterChanged",e.EVENT_AFTER_FILTER_CHANGED="afterFilterChanged",e.EVENT_FILTER_MODIFIED="filterModified",e.EVENT_BEFORE_SORT_CHANGED="beforeSortChanged",e.EVENT_AFTER_SORT_CHANGED="afterSortChanged",e.EVENT_VIRTUAL_ROW_REMOVED="virtualRowRemoved",e.EVENT_ROW_CLICKED="rowClicked",e.EVENT_READY="ready",e}();e.Events=t}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i=function(){function e(){this.allListeners={},this.globalListeners=[]}return e.prototype.getListenerList=function(e){var t=this.allListeners[e];return t||(t=[],this.allListeners[e]=t),t},e.prototype.addEventListener=function(e,t){var i=this.getListenerList(e);i.indexOf(t)<0&&i.push(t)},e.prototype.addGlobalListener=function(e){this.globalListeners.push(e)},e.prototype.removeEventListener=function(e,i){var o=this.getListenerList(e);t.removeFromArray(o,i)},e.prototype.removeGlobalListener=function(e){t.removeFromArray(this.globalListeners,e)},e.prototype.dispatchEvent=function(e,t){t||(t={});var i=this.getListenerList(e);i.forEach(function(e){e(t)}),this.globalListeners.forEach(function(i){i(e,t)})},e}();e.EventService=i}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=function(){function t(){this.consuming=!1}return t.prototype.init=function(t,i,o,n,r){this.gridOptionsWrapper=t,this.columnController=i,this.gridPanel=o,this.eventService=r,this.logger=n.create("MasterSlaveService"),r.addEventListener(e.Events.EVENT_COLUMN_MOVED,this.fireColumnEvent.bind(this)),r.addEventListener(e.Events.EVENT_COLUMN_VISIBLE,this.fireColumnEvent.bind(this)),r.addEventListener(e.Events.EVENT_COLUMN_GROUP_OPENED,this.fireColumnEvent.bind(this)),r.addEventListener(e.Events.EVENT_COLUMN_RESIZED,this.fireColumnEvent.bind(this)),r.addEventListener(e.Events.EVENT_COLUMN_PINNED_COUNT_CHANGED,this.fireColumnEvent.bind(this))},t.prototype.fireEvent=function(e){if(!this.consuming){var t=this.gridOptionsWrapper.getSlaveGrids();t&&t.forEach(function(t){if(t.api){var i=t.api.__getMasterSlaveService();e(i)}})}},t.prototype.onEvent=function(e){this.consuming=!0,e(),this.consuming=!1},t.prototype.fireColumnEvent=function(e){this.fireEvent(function(t){t.onColumnEvent(e)})},t.prototype.fireHorizontalScrollEvent=function(e){this.fireEvent(function(t){t.onScrollEvent(e)})},t.prototype.onScrollEvent=function(e){var t=this;this.onEvent(function(){t.gridPanel.setHorizontalScrollPosition(e)})},t.prototype.onColumnEvent=function(t){var i=this;this.onEvent(function(){var o,n=t.getColumn();if(n&&(o=i.columnController.getColumn(n.colId)),!n||o){var r,s=t.getColumnGroup();if(s&&(r=i.columnController.getColumnGroup(s.name)),!s||r)switch(t.getType()){case e.Events.EVENT_COLUMN_MOVED:i.logger.log("onColumnEvent-> processing "+t+" fromIndex = "+t.getFromIndex()+", toIndex = "+t.getToIndex()),i.columnController.moveColumn(t.getFromIndex(),t.getToIndex());break;case e.Events.EVENT_COLUMN_VISIBLE:i.logger.log("onColumnEvent-> processing "+t+" visible = "+n.visible),i.columnController.setColumnVisible(o,n.visible);break;case e.Events.EVENT_COLUMN_GROUP_OPENED:i.logger.log("onColumnEvent-> processing "+t+" expanded = "+s.expanded),i.columnController.columnGroupOpened(r,s.expanded);break;case e.Events.EVENT_COLUMN_RESIZED:i.logger.log("onColumnEvent-> processing "+t+" actualWidth = "+n.actualWidth),i.columnController.setColumnWidth(o,n.actualWidth);break;case e.Events.EVENT_COLUMN_PINNED_COUNT_CHANGED:i.logger.log("onColumnEvent-> processing "+t),i.columnController.setPinnedColumnCount(t.getPinnedColumnCount())}}})},t}();e.MasterSlaveService=t}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i=e.Constants,o=function(){function e(e){this._columnController=e}return e.prototype.sizeColumnsToFit=function(e){this._columnController.sizeColumnsToFit(e)},e.prototype.hideColumns=function(e,t){this._columnController.hideColumns(e,t)},e.prototype.columnGroupOpened=function(e,t){this._columnController.columnGroupOpened(e,t)},e.prototype.getColumnGroup=function(e){return this._columnController.getColumnGroup(e)},e.prototype.getDisplayNameForCol=function(e){return this._columnController.getDisplayNameForCol(e)},e.prototype.getColumn=function(e){return this._columnController.getColumn(e)},e.prototype.setState=function(e){return this._columnController.setState(e)},e.prototype.getState=function(){return this._columnController.getState()},e.prototype.isPinning=function(){return this._columnController.isPinning()},e.prototype.getVisibleColAfter=function(e){return this._columnController.getVisibleColAfter(e)},e.prototype.getVisibleColBefore=function(e){return this._columnController.getVisibleColBefore(e)},e.prototype.setColumnVisible=function(e,t){this._columnController.setColumnVisible(e,t)},e.prototype.getAllColumns=function(){return this._columnController.getAllColumns()},e.prototype.getDisplayedColumns=function(){return this._columnController.getDisplayedColumns()},e.prototype.getPivotedColumns=function(){return this._columnController.getPivotedColumns()},e.prototype.getValueColumns=function(){return this._columnController.getValueColumns()},e.prototype.moveColumn=function(e,t){this._columnController.moveColumn(e,t)},e.prototype.movePivotColumn=function(e,t){this._columnController.movePivotColumn(e,t)},e.prototype.setColumnAggFunction=function(e,t){this._columnController.setColumnAggFunction(e,t)},e.prototype.setColumnWidth=function(e,t){this._columnController.setColumnWidth(e,t)},e.prototype.removeValueColumn=function(e){this._columnController.removeValueColumn(e)},e.prototype.addValueColumn=function(e){this._columnController.addValueColumn(e)},e.prototype.removePivotColumn=function(e){this._columnController.removePivotColumn(e)},e.prototype.setPinnedColumnCount=function(e){this._columnController.setPinnedColumnCount(e)},e.prototype.addPivotColumn=function(e){this._columnController.addPivotColumn(e)},e.prototype.getHeaderGroups=function(){return this._columnController.getHeaderGroups()},e.prototype.hideColumn=function(e,t){this._columnController.hideColumns([e],t)},e}();e.ColumnApi=o;var n=function(){function n(){this.setupComplete=!1}return n.prototype.init=function(e,t,i,o,n,r,s){this.gridOptionsWrapper=i,this.angularGrid=e,this.selectionRendererFactory=t,this.expressionService=o,this.valueService=n,this.masterSlaveController=r,this.eventService=s,this.pinnedColumnCount=i.getPinnedColCount(),this.pinnedColumnCount>0||(this.pinnedColumnCount=0)},n.prototype.getColumnApi=function(){return new o(this)},n.prototype.isSetupComplete=function(){return this.setupComplete},n.prototype.getHeaderGroups=function(){return this.columnGroups},n.prototype.getPinnedContainerWidth=function(){return this.getTotalColWidth(!0)},n.prototype.addPivotColumn=function(t){if(this.allColumns.indexOf(t)<0)return void console.warn("not a valid column: "+t);if(this.pivotColumns.indexOf(t)>=0)return void console.warn("column is already a value column");this.pivotColumns.push(t),this.updateModel();var i=new e.ColumnChangeEvent(e.Events.EVENT_COLUMN_PIVOT_CHANGE);this.eventService.dispatchEvent(e.Events.EVENT_COLUMN_PIVOT_CHANGE,i)},n.prototype.setPinnedColumnCount=function(t){if("number"!=typeof t)return void console.warn("ag-Grid: setPinnedColumnCount: count must be a number");if(0>t)return void console.warn("ag-Grid: setPinnedColumnCount: count must be zero or greater");this.pinnedColumnCount=t,this.updateModel();var i=new e.ColumnChangeEvent(e.Events.EVENT_COLUMN_PINNED_COUNT_CHANGED).withPinnedColumnCount(t);this.eventService.dispatchEvent(e.Events.EVENT_COLUMN_PINNED_COUNT_CHANGED,i)},n.prototype.removePivotColumn=function(i){if(this.pivotColumns.indexOf(i)<0)return void console.warn("column not a pivot");t.removeFromArray(this.pivotColumns,i),this.updateModel();var o=new e.ColumnChangeEvent(e.Events.EVENT_COLUMN_PIVOT_CHANGE);this.eventService.dispatchEvent(e.Events.EVENT_COLUMN_PIVOT_CHANGE,o)},n.prototype.addValueColumn=function(t){if(this.allColumns.indexOf(t)<0)return void console.warn("not a valid column: "+t);if(this.valueColumns.indexOf(t)>=0)return void console.warn("column is already a value column");t.aggFunc||(t.aggFunc=i.SUM),this.valueColumns.push(t);var o=new e.ColumnChangeEvent(e.Events.EVENT_COLUMN_VALUE_CHANGE);this.eventService.dispatchEvent(e.Events.EVENT_COLUMN_VALUE_CHANGE,o)},n.prototype.removeValueColumn=function(i){if(this.valueColumns.indexOf(i)<0)return void console.warn("column not a value");t.removeFromArray(this.valueColumns,i);var o=new e.ColumnChangeEvent(e.Events.EVENT_COLUMN_VALUE_CHANGE);this.eventService.dispatchEvent(e.Events.EVENT_COLUMN_VALUE_CHANGE,o)},n.prototype.doesColumnExistInGrid=function(e){var t=this.allColumns.indexOf(e)>=0,i=this.visibleColumns.indexOf(e)>=0;return t||i},n.prototype.setColumnWidth=function(t,i){if(!this.doesColumnExistInGrid(t))return void console.warn("column does not exist");if(i<t.getMinimumWidth()&&(i=t.getMinimumWidth()),t.isGreaterThanMax(i)&&(i=t.colDef.maxWidth),t.actualWidth!==i){t.actualWidth=i,this.updateGroupWidthsAfterColumnResize(t);var o=new e.ColumnChangeEvent(e.Events.EVENT_COLUMN_RESIZED).withColumn(t);this.eventService.dispatchEvent(e.Events.EVENT_COLUMN_RESIZED,o)}},n.prototype.updateGroupWidthsAfterColumnResize=function(e){this.columnGroups&&this.columnGroups.forEach(function(t){t.displayedColumns.indexOf(e)>=0&&t.calculateActualWidth()})},n.prototype.setColumnAggFunction=function(t,i){t.aggFunc=i;var o=new e.ColumnChangeEvent(e.Events.EVENT_COLUMN_VALUE_CHANGE);this.eventService.dispatchEvent(e.Events.EVENT_COLUMN_VALUE_CHANGE,o)},n.prototype.movePivotColumn=function(t,i){var o=this.pivotColumns[t];this.pivotColumns.splice(t,1),this.pivotColumns.splice(i,0,o);var n=new e.ColumnChangeEvent(e.Events.EVENT_COLUMN_PIVOT_CHANGE);this.eventService.dispatchEvent(e.Events.EVENT_COLUMN_PIVOT_CHANGE,n)},n.prototype.moveColumn=function(t,i){var o=this.allColumns[t];this.allColumns.splice(t,1),this.allColumns.splice(i,0,o),this.updateModel();var n=new e.ColumnChangeEvent(e.Events.EVENT_COLUMN_MOVED).withFromIndex(t).withToIndex(i);this.eventService.dispatchEvent(e.Events.EVENT_COLUMN_MOVED,n)},n.prototype.getBodyContainerWidth=function(){return this.getTotalColWidth(!1)},n.prototype.getValueColumns=function(){return this.valueColumns},n.prototype.getPivotedColumns=function(){return this.pivotColumns},n.prototype.getDisplayedColumns=function(){return this.displayedColumns},n.prototype.getAllColumns=function(){return this.allColumns},n.prototype.setColumnVisible=function(t,i){t.visible=i,this.updateModel();var o=new e.ColumnChangeEvent(e.Events.EVENT_COLUMN_VISIBLE).withColumn(t);this.eventService.dispatchEvent(e.Events.EVENT_COLUMN_VISIBLE,o)},n.prototype.getVisibleColBefore=function(e){var t=this.visibleColumns.indexOf(e);return t>0?this.visibleColumns[t-1]:null},n.prototype.getVisibleColAfter=function(e){var t=this.visibleColumns.indexOf(e);return t<this.visibleColumns.length-1?this.visibleColumns[t+1]:null},n.prototype.isPinning=function(){return this.visibleColumns&&this.visibleColumns.length>0&&this.visibleColumns[0].pinned},n.prototype.getState=function(){if(!this.allColumns||this.allColumns.length<0)return[];for(var e=[],t=0;t<this.allColumns.length;t++){var i=this.allColumns[t],o=this.pivotColumns.indexOf(i),n={colId:i.colId,hide:!i.visible,aggFunc:i.aggFunc?i.aggFunc:null,width:i.actualWidth,pivotIndex:o>=0?o:null};e.push(n)}return e},n.prototype.setState=function(o){var n=this.allColumns;this.allColumns=[],this.pivotColumns=[],this.valueColumns=[];var r=this;t.forEach(o,function(e){var o=t.find(n,"colId",e.colId);if(!o)return void console.warn("ag-grid: column "+e.colId+" not found");o.visible=e.hide?!1:!0,o.actualWidth=e.width>=i.MIN_COL_WIDTH?e.width:o.actualWidth;var s=[i.MIN,i.MAX,i.SUM].indexOf(e.aggFunc)>=0;s?(o.aggFunc=e.aggFunc,r.valueColumns.push(o)):o.aggFunc=null,"number"==typeof e.pivotIndex&&e.pivotIndex>=0&&r.pivotColumns.push(o),r.allColumns.push(o),n.splice(n.indexOf(o),1)}),t.forEach(n,function(e){e.visible=!1,e.aggFunc=null,r.allColumns.push(e)}),this.pivotColumns.sort(function(e,t){return e.pivotIndex-t.pivotIndex}),this.updateModel();var s=new e.ColumnChangeEvent(e.Events.EVENT_COLUMN_EVERYTHING_CHANGED);this.eventService.dispatchEvent(e.Events.EVENT_COLUMN_EVERYTHING_CHANGED,s)},n.prototype.getColumns=function(e){var t=this,i=[];return e&&e.forEach(function(e){var o=t.getColumn(e);o&&i.push(o)}),i},n.prototype.getColumn=function(e){if(!e)return null;for(var t=[this.allColumns,this.visibleColumns],i=0;i<t.length;i++){var o=t[i];if(o)for(var n=0;n<o.length;n++){var r=o[n].colDef===e,s=o[n].colId===e;if(r||s)return o[n]}}},n.prototype.getDisplayNameForCol=function(e){var t=e.colDef,i=t.headerValueGetter;if(!i)return t.displayName?(console.warn("ag-grid: Found displayName "+t.displayName+", please use headerName instead, displayName is deprecated."),t.displayName):t.headerName;var o={colDef:t,api:this.gridOptionsWrapper.getApi(),context:this.gridOptionsWrapper.getContext()};return"function"==typeof i?i(o):"string"==typeof i?this.expressionService.evaluate(i,o):void console.warn("ag-grid: headerValueGetter must be a function or a string")},n.prototype.getColumnGroup=function(e){if(!e)return null;if(this.columnGroups)for(var t=0;t<this.columnGroups.length;t++)if(this.columnGroups[t].name===e)return this.columnGroups[t]},n.prototype.onColumnsChanged=function(){var t=this.gridOptionsWrapper.getColumnDefs();this.checkForDeprecatedItems(t),this.createColumns(t),this.createPivotColumns(),this.createValueColumns(),this.updateModel();var i=new e.ColumnChangeEvent(e.Events.EVENT_COLUMN_EVERYTHING_CHANGED);this.eventService.dispatchEvent(e.Events.EVENT_COLUMN_EVERYTHING_CHANGED,i),this.setupComplete=!0},n.prototype.checkForDeprecatedItems=function(e){if(e)for(var t=0;t<e.length;t++){var i=e[t];void 0!==i.group&&(console.warn("ag-grid: "+i.field+" colDef.group is deprecated, please use colDef.headerGroup"),i.headerGroup=i.group),void 0!==i.groupShow&&(console.warn("ag-grid: "+i.field+" colDef.groupShow is deprecated, please use colDef.headerGroupShow"),i.headerGroupShow=i.groupShow)}},n.prototype.columnGroupOpened=function(t,i){t.expanded=i,this.updateGroups(),this.updateDisplayedColumns();var o=new e.ColumnChangeEvent(e.Events.EVENT_COLUMN_GROUP_OPENED).withColumnGroup(t);

this.eventService.dispatchEvent(e.Events.EVENT_COLUMN_GROUP_OPENED,o)},n.prototype.hideColumns=function(t,i){var o=this,n=[];this.allColumns.forEach(function(e){var o=e.colId,r=t.indexOf(o)>=0,s=!i;r&&e.visible!==s&&(e.visible=s,n.push(e))}),n.length>0&&(this.updateModel(),n.forEach(function(t){var i=new e.ColumnChangeEvent(e.Events.EVENT_COLUMN_VISIBLE).withColumn(t);o.eventService.dispatchEvent(e.Events.EVENT_COLUMN_VISIBLE,i)}))},n.prototype.updateModel=function(){this.updateVisibleColumns(),this.updatePinnedColumns(),this.buildGroups(),this.updateGroups(),this.updateDisplayedColumns()},n.prototype.updateDisplayedColumns=function(){if(this.gridOptionsWrapper.isGroupHeaders()){this.displayedColumns=[];for(var e=0;e<this.columnGroups.length;e++){var t=this.columnGroups[e];t.addToVisibleColumns(this.displayedColumns)}}else this.displayedColumns=this.visibleColumns},n.prototype.sizeColumnsToFit=function(i){function o(e){t.removeFromArray(l,e),s.push(e)}function n(e){for(var t=0,i=0;i<e.length;i++)t+=e[i].actualWidth;return t}var r=this;if(!(0>=i||0===this.displayedColumns.length)){for(var s=t.filter(this.displayedColumns,function(e){return e.colDef.suppressSizeToFit===!0}),l=t.filter(this.displayedColumns,function(e){return e.colDef.suppressSizeToFit!==!0}),a=l.slice(0),d=!1;!d;){d=!0;var u=i-n(s);if(0>=u)l.forEach(function(e){e.setMinimum(),r.updateGroupWidthsAfterColumnResize(e)});else for(var h=u/n(l),p=u,c=l.length-1;c>=0;c--){var g=l[c],f=Math.round(g.actualWidth*h);if(f<g.getMinimumWidth())g.setMinimum(),o(g),d=!1;else if(g.isGreaterThanMax(f))g.actualWidth=g.colDef.maxWidth,o(g),d=!1;else{var v=0===c;v?g.actualWidth=p:(p-=f,g.actualWidth=f)}this.updateGroupWidthsAfterColumnResize(g)}}a.forEach(function(t){var i=new e.ColumnChangeEvent(e.Events.EVENT_COLUMN_RESIZED).withColumn(t);r.eventService.dispatchEvent(e.Events.EVENT_COLUMN_RESIZED,i)})}},n.prototype.buildGroups=function(){if(!this.gridOptionsWrapper.isGroupHeaders())return void(this.columnGroups=null);var t=null;this.columnGroups=[];var i=this,o=!0;this.visibleColumns.forEach(function(n){var r=o&&!n.pinned;n.pinned||(o=!1);var s=t&&n.colDef.headerGroup!==t.name,l=t&&!t.name,a=null===t,d=a||r||s||l;if(d){var u=n.pinned;t=new e.ColumnGroup(u,n.colDef.headerGroup),i.columnGroups.push(t)}t.addColumn(n)})},n.prototype.updateGroups=function(){if(this.gridOptionsWrapper.isGroupHeaders())for(var e=0;e<this.columnGroups.length;e++){var t=this.columnGroups[e];t.calculateExpandable(),t.calculateDisplayedColumns(),t.calculateActualWidth()}},n.prototype.updateVisibleColumns=function(){this.visibleColumns=[];var t=this.pivotColumns.length>0&&!this.gridOptionsWrapper.isGroupSuppressAutoColumn()&&!this.gridOptionsWrapper.isGroupUseEntireRow()&&!this.gridOptionsWrapper.isGroupSuppressRow(),i=this.gridOptionsWrapper.getLocaleTextFunc();if(t){var o=this.gridOptionsWrapper.getGroupColumnDef();o||(o={headerName:i("group","Group"),cellRenderer:{renderer:"group"}});var n=this.calculateColInitialWidth(o),r=new e.Column(o,n);this.visibleColumns.push(r)}for(var s=0;s<this.allColumns.length;s++){var l=this.allColumns[s],a=this.pivotColumns.indexOf(l)>=0&&this.gridOptionsWrapper.isGroupHidePivotColumns();l.visible&&!a&&(l.index=this.visibleColumns.length,this.visibleColumns.push(this.allColumns[s]))}},n.prototype.updatePinnedColumns=function(){for(var e=0;e<this.visibleColumns.length;e++){var t=e<this.pinnedColumnCount;this.visibleColumns[e].pinned=t}},n.prototype.createColumns=function(t){if(this.allColumns=[],t)for(var i=0;i<t.length;i++){var o=t[i],n=this.calculateColInitialWidth(o),r=new e.Column(o,n);this.allColumns.push(r)}},n.prototype.createPivotColumns=function(){this.pivotColumns=[];var e=this.gridOptionsWrapper.getGroupKeys();if(e&&!(e.length<=0))for(var t=0;t<e.length;t++){var i=e[t],o=this.getColumn(i);o||(o=this.createDummyColumn(i)),this.pivotColumns.push(o)}},n.prototype.createValueColumns=function(){this.valueColumns=[];for(var e=0;e<this.allColumns.length;e++){var t=this.allColumns[e];t.colDef.aggFunc&&(t.aggFunc=t.colDef.aggFunc,this.valueColumns.push(t))}},n.prototype.createDummyColumn=function(t){var i={field:t,headerName:t,hide:!1},o=this.gridOptionsWrapper.getColWidth(),n=new e.Column(i,o);return n},n.prototype.calculateColInitialWidth=function(e){return e.width?e.width<i.MIN_COL_WIDTH?i.MIN_COL_WIDTH:e.width:this.gridOptionsWrapper.getColWidth()},n.prototype.getTotalColWidth=function(e){var t=0,i="boolean"!=typeof e;return this.displayedColumns.forEach(function(o){var n=i||o.pinned===e;n&&(t+=o.actualWidth)}),t},n}();e.ColumnController=n}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t="\r\n",i=function(){function e(e,t,i,o){this.rowController=e,this.columnController=t,this.grid=i,this.valueService=o}return e.prototype.exportDataAsCsv=function(e){var t=this.getDataAsCsv(e),i=e&&e.fileName&&0!==e.fileName.length,o=i?e.fileName:"export.csv";if(window.navigator.msSaveOrOpenBlob){var n=[t],r=new Blob(n);window.navigator.msSaveOrOpenBlob(r,o)}else{var s="data:text/plain;charset=utf-8,"+encodeURIComponent(t),l=document.createElement("a");l.href=s,l.download=o,document.body.appendChild(l),l.click(),document.body.removeChild(l)}},e.prototype.getDataAsCsv=function(e){var i=this;if(!this.grid.isUsingInMemoryModel())return console.log("ag-Grid: getDataAsCsv not available when doing virtual pagination"),"";var o="",n=e&&e.skipGroups,r=e&&e.skipHeader,s=e&&e.skipFooters,l=this.columnController.getDisplayedColumns();return l&&0!==l.length?(r||(l.forEach(function(e,t){var n=i.columnController.getDisplayNameForCol(e);(null===n||void 0===n)&&(n=""),0!=t&&(o+=","),o+='"'+i.escape(n)+'"'}),o+=t),this.rowController.forEachNodeAfterFilterAndSort(function(e){n&&e.group||s&&e.footer||(l.forEach(function(t,n){var r;r=e.group&&0===n?i.createValueForGroupNode(e):i.valueService.getValue(t.colDef,e.data,e),(null===r||void 0===r)&&(r=""),0!=n&&(o+=","),o+='"'+i.escape(r)+'"'}),o+=t)}),o):""},e.prototype.createValueForGroupNode=function(e){for(var t=[e.key];e.parent;)e=e.parent,t.push(e.key);return t.reverse().join(" -> ")},e.prototype.escape=function(e){if(null===e||void 0===e)return"";var t;return"string"==typeof e?t=e:"function"==typeof e.toString?t=e.toString():(console.warn("known value type during csv conversio"),t=""),t.replace('"','""')},e}();e.CsvCreator=i}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=function(){function e(){this.expressionToFunctionCache={}}return e.prototype.init=function(e){this.logger=e.create("ExpressionService")},e.prototype.evaluate=function(e,t){try{var i=this.createExpressionFunction(e),o=i(t.value,t.context,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue);return o}catch(n){return this.logger.log("Processing of the expression failed"),this.logger.log("Expression = "+e),this.logger.log("Exception = "+n),null}},e.prototype.createExpressionFunction=function(e){if(this.expressionToFunctionCache[e])return this.expressionToFunctionCache[e];var t=this.createFunctionBody(e),i=new Function("x, ctx, node, data, colDef, rowIndex, api, getValue",t);return this.expressionToFunctionCache[e]=i,i},e.prototype.createFunctionBody=function(e){return e.indexOf("return")>=0?e:"return "+e+";"},e}();e.ExpressionService=t}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i='<div><div><select class="ag-filter-select" id="filterType"><option value="1">[CONTAINS]</option><option value="2">[EQUALS]</option><option value="3">[STARTS WITH]</option><option value="4">[ENDS WITH]</option></select></div><div><input class="ag-filter-filter" id="filterText" type="text" placeholder="[FILTER...]"/></div><div class="ag-filter-apply-panel" id="applyPanel"><button type="button" id="applyButton">[APPLY FILTER]</button></div></div>',o=1,n=2,r=3,s=4,l=function(){function e(){}return e.prototype.init=function(e){this.filterParams=e.filterParams,this.applyActive=this.filterParams&&1==this.filterParams.apply,this.filterChangedCallback=e.filterChangedCallback,this.filterModifiedCallback=e.filterModifiedCallback,this.localeTextFunc=e.localeTextFunc,this.valueGetter=e.valueGetter,this.createGui(),this.filterText=null,this.filterType=o,this.createApi()},e.prototype.onNewRowsLoaded=function(){var e=this.filterParams&&"keep"===this.filterParams.newRowsAction;e||(this.api.setType(o),this.api.setFilter(null))},e.prototype.afterGuiAttached=function(){this.eFilterTextField.focus()},e.prototype.doesFilterPass=function(e){if(!this.filterText)return!0;var t=this.valueGetter(e);if(!t)return!1;var i=t.toString().toLowerCase();switch(this.filterType){case o:return i.indexOf(this.filterText)>=0;case n:return i===this.filterText;case r:return 0===i.indexOf(this.filterText);case s:var l=i.indexOf(this.filterText);return l>=0&&l===i.length-this.filterText.length;default:return console.warn("invalid filter type "+this.filterType),!1}},e.prototype.getGui=function(){return this.eGui},e.prototype.isFilterActive=function(){return null!==this.filterText},e.prototype.createTemplate=function(){return i.replace("[FILTER...]",this.localeTextFunc("filterOoo","Filter...")).replace("[EQUALS]",this.localeTextFunc("equals","Equals")).replace("[CONTAINS]",this.localeTextFunc("contains","Contains")).replace("[STARTS WITH]",this.localeTextFunc("startsWith","Starts with")).replace("[ENDS WITH]",this.localeTextFunc("endsWith","Ends with")).replace("[APPLY FILTER]",this.localeTextFunc("applyFilter","Apply Filter"))},e.prototype.createGui=function(){this.eGui=t.loadTemplate(this.createTemplate()),this.eFilterTextField=this.eGui.querySelector("#filterText"),this.eTypeSelect=this.eGui.querySelector("#filterType"),t.addChangeListener(this.eFilterTextField,this.onFilterChanged.bind(this)),this.eTypeSelect.addEventListener("change",this.onTypeChanged.bind(this)),this.setupApply()},e.prototype.setupApply=function(){var e=this;this.applyActive?(this.eApplyButton=this.eGui.querySelector("#applyButton"),this.eApplyButton.addEventListener("click",function(){e.filterChangedCallback()})):t.removeElement(this.eGui,"#applyPanel")},e.prototype.onTypeChanged=function(){this.filterType=parseInt(this.eTypeSelect.value),this.filterChanged()},e.prototype.onFilterChanged=function(){var e=t.makeNull(this.eFilterTextField.value);e&&""===e.trim()&&(e=null);var i;i=null!==e&&void 0!==e?e.toLowerCase():null,this.filterText!==i&&(this.filterText=i,this.filterChanged())},e.prototype.filterChanged=function(){this.filterModifiedCallback(),this.applyActive||this.filterChangedCallback()},e.prototype.createApi=function(){var e=this;this.api={EQUALS:n,CONTAINS:o,STARTS_WITH:r,ENDS_WITH:s,setType:function(t){e.filterType=t,e.eTypeSelect.value=t},setFilter:function(i){i=t.makeNull(i),i?(e.filterText=i.toLowerCase(),e.eFilterTextField.value=i):(e.filterText=null,e.eFilterTextField.value=null)},getType:function(){return e.filterType},getFilter:function(){return e.filterText},getModel:function(){return e.isFilterActive()?{type:e.filterType,filter:e.filterText}:null},setModel:function(e){e?(this.setType(e.type),this.setFilter(e.filter)):this.setFilter(null)}}},e.prototype.getApi=function(){return this.api},e}();e.TextFilter=l}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i='<div><div><select class="ag-filter-select" id="filterType"><option value="1">[EQUALS]</option><option value="2">[LESS THAN]</option><option value="3">[GREATER THAN]</option></select></div><div><input class="ag-filter-filter" id="filterText" type="text" placeholder="[FILTER...]"/></div><div class="ag-filter-apply-panel" id="applyPanel"><button type="button" id="applyButton">[APPLY FILTER]</button></div></div>',o=1,n=2,r=3,s=function(){function e(){}return e.prototype.init=function(e){this.filterParams=e.filterParams,this.applyActive=this.filterParams&&1==this.filterParams.apply,this.filterChangedCallback=e.filterChangedCallback,this.filterModifiedCallback=e.filterModifiedCallback,this.localeTextFunc=e.localeTextFunc,this.valueGetter=e.valueGetter,this.createGui(),this.filterNumber=null,this.filterType=o,this.createApi()},e.prototype.onNewRowsLoaded=function(){var e=this.filterParams&&"keep"===this.filterParams.newRowsAction;e||(this.api.setType(o),this.api.setFilter(null))},e.prototype.afterGuiAttached=function(){this.eFilterTextField.focus()},e.prototype.doesFilterPass=function(e){if(null===this.filterNumber)return!0;var t=this.valueGetter(e);if(!t&&0!==t)return!1;var i;switch(i="number"==typeof t?t:parseFloat(t),this.filterType){case o:return i===this.filterNumber;case n:return i<this.filterNumber;case r:return i>this.filterNumber;default:return console.warn("invalid filter type "+this.filterType),!1}},e.prototype.getGui=function(){return this.eGui},e.prototype.isFilterActive=function(){return null!==this.filterNumber},e.prototype.createTemplate=function(){return i.replace("[FILTER...]",this.localeTextFunc("filterOoo","Filter...")).replace("[EQUALS]",this.localeTextFunc("equals","Equals")).replace("[LESS THAN]",this.localeTextFunc("lessThan","Less than")).replace("[GREATER THAN]",this.localeTextFunc("greaterThan","Greater than")).replace("[APPLY FILTER]",this.localeTextFunc("applyFilter","Apply Filter"))},e.prototype.createGui=function(){this.eGui=t.loadTemplate(this.createTemplate()),this.eFilterTextField=this.eGui.querySelector("#filterText"),this.eTypeSelect=this.eGui.querySelector("#filterType"),t.addChangeListener(this.eFilterTextField,this.onFilterChanged.bind(this)),this.eTypeSelect.addEventListener("change",this.onTypeChanged.bind(this)),this.setupApply()},e.prototype.setupApply=function(){var e=this;this.applyActive?(this.eApplyButton=this.eGui.querySelector("#applyButton"),this.eApplyButton.addEventListener("click",function(){e.filterChangedCallback()})):t.removeElement(this.eGui,"#applyPanel")},e.prototype.onTypeChanged=function(){this.filterType=parseInt(this.eTypeSelect.value),this.filterChanged()},e.prototype.filterChanged=function(){this.filterModifiedCallback(),this.applyActive||this.filterChangedCallback()},e.prototype.onFilterChanged=function(){var e=t.makeNull(this.eFilterTextField.value);e&&""===e.trim()&&(e=null);var i;i=null!==e&&void 0!==e?parseFloat(e):null,this.filterNumber!==i&&(this.filterNumber=i,this.filterChanged())},e.prototype.createApi=function(){var e=this;this.api={EQUALS:o,LESS_THAN:n,GREATER_THAN:r,setType:function(t){e.filterType=t,e.eTypeSelect.value=t},setFilter:function(i){i=t.makeNull(i),null!==i&&"number"!=typeof i&&(i=parseFloat(i)),e.filterNumber=i,e.eFilterTextField.value=i},getType:function(){return e.filterType},getFilter:function(){return e.filterNumber},getModel:function(){return e.isFilterActive()?{type:e.filterType,filter:e.filterNumber}:null},setModel:function(e){e?(this.setType(e.type),this.setFilter(e.filter)):this.setFilter(null)}}},e.prototype.getApi=function(){return this.api},e}();e.NumberFilter=s}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i=function(){function e(e,t,i,o){this.colDef=e,this.rowModel=t,this.valueGetter=i,this.doesRowPassOtherFilters=o,this.filterParams=this.colDef.filterParams,this.usingProvidedSet=this.filterParams&&this.filterParams.values,this.showingAvailableOnly=this.filterParams&&!this.filterParams.suppressRemoveEntries,this.createAllUniqueValues(),this.createAvailableUniqueValues(),this.displayedValues=this.availableUniqueValues,this.miniFilter=null,this.selectedValuesMap={},this.selectEverything()}return e.prototype.refreshAfterNewRowsLoaded=function(e,t){this.createAllUniqueValues(),this.createAvailableUniqueValues();var i=Object.keys(this.selectedValuesMap);this.selectedValuesMap={},this.processMiniFilter(),e?this.setModel(i,t):this.selectEverything()},e.prototype.refreshAfterAnyFilterChanged=function(){this.showingAvailableOnly&&(this.createAvailableUniqueValues(),this.processMiniFilter())},e.prototype.createAllUniqueValues=function(){this.allUniqueValues=t.toStrings(this.usingProvidedSet?this.filterParams.values:this.getUniqueValues(!1)),this.allUniqueValues.sort(this.colDef.comparator?this.colDef.comparator:t.defaultComparator)},e.prototype.createAvailableUniqueValues=function(){var e=!this.showingAvailableOnly||this.usingProvidedSet;return e?void(this.availableUniqueValues=this.allUniqueValues):(this.availableUniqueValues=t.toStrings(this.getUniqueValues(!0)),void this.availableUniqueValues.sort(this.colDef.comparator?this.colDef.comparator:t.defaultComparator))},e.prototype.getUniqueValues=function(e){function t(e){o.hasOwnProperty(e)||(n.push(e),o[e]=1)}var i=this,o={},n=[];return this.rowModel.forEachNode(function(o){if(!o.group){var n=i.valueGetter(o);if((""===n||void 0===n)&&(n=null),e&&!i.doesRowPassOtherFilters(o))return;if(null!=n&&Array.isArray(n))for(var r=0;r<n.length;r++)t(n[r]);else t(n)}}),n},e.prototype.setMiniFilter=function(e){return e=t.makeNull(e),this.miniFilter===e?!1:(this.miniFilter=e,this.processMiniFilter(),!0)},e.prototype.getMiniFilter=function(){return this.miniFilter},e.prototype.processMiniFilter=function(){if(null===this.miniFilter)return void(this.displayedValues=this.availableUniqueValues);this.displayedValues=[];for(var e=this.miniFilter.toUpperCase(),t=0,i=this.availableUniqueValues.length;i>t;t++){var o=this.availableUniqueValues[t];null!==o&&o.toString().toUpperCase().indexOf(e)>=0&&this.displayedValues.push(o)}},e.prototype.getDisplayedValueCount=function(){return this.displayedValues.length},e.prototype.getDisplayedValue=function(e){return this.displayedValues[e]},e.prototype.selectEverything=function(){for(var e=this.allUniqueValues.length,t=0;e>t;t++){var i=this.allUniqueValues[t];this.selectedValuesMap[i]=null}this.selectedValuesCount=e},e.prototype.isFilterActive=function(){return this.allUniqueValues.length!==this.selectedValuesCount},e.prototype.selectNothing=function(){this.selectedValuesMap={},this.selectedValuesCount=0},e.prototype.getUniqueValueCount=function(){return this.allUniqueValues.length},e.prototype.getUniqueValue=function(e){return this.allUniqueValues[e]},e.prototype.unselectValue=function(e){void 0!==this.selectedValuesMap[e]&&(delete this.selectedValuesMap[e],this.selectedValuesCount--)},e.prototype.selectValue=function(e){void 0===this.selectedValuesMap[e]&&(this.selectedValuesMap[e]=null,this.selectedValuesCount++)},e.prototype.isValueSelected=function(e){return void 0!==this.selectedValuesMap[e]},e.prototype.isEverythingSelected=function(){return this.allUniqueValues.length===this.selectedValuesCount},e.prototype.isNothingSelected=function(){return 0===this.allUniqueValues.length},e.prototype.getModel=function(){if(!this.isFilterActive())return null;var e=[];return t.iterateObject(this.selectedValuesMap,function(t){e.push(t)}),e},e.prototype.setModel=function(e,t){if(e&&!t){this.selectNothing();for(var i=0;i<e.length;i++){var o=e[i];this.allUniqueValues.indexOf(o)>=0?this.selectValue(e[i]):console.warn("Value "+o+" is not a valid value for filter")}}else this.selectEverything()},e}();e.SetFilterModel=i}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i='<div><div class="ag-filter-header-container"><input class="ag-filter-filter" type="text" placeholder="[SEARCH...]"/></div><div class="ag-filter-header-container"><label><input id="selectAll" type="checkbox" class="ag-filter-checkbox"/>([SELECT ALL])</label></div><div class="ag-filter-list-viewport"><div class="ag-filter-list-container"><div id="itemForRepeat" class="ag-filter-item"><label><input type="checkbox" class="ag-filter-checkbox" filter-checkbox="true"/><span class="ag-filter-value"></span></label></div></div></div><div class="ag-filter-apply-panel" id="applyPanel"><button type="button" id="applyButton">[APPLY FILTER]</button></div></div>',o=20,n=function(){function n(){}return n.prototype.init=function(t){this.filterParams=t.filterParams,this.rowHeight=this.filterParams&&this.filterParams.cellHeight?this.filterParams.cellHeight:o,this.applyActive=this.filterParams&&1==this.filterParams.apply,this.model=new e.SetFilterModel(t.colDef,t.rowModel,t.valueGetter,t.doesRowPassOtherFilter),this.filterChangedCallback=t.filterChangedCallback,this.filterModifiedCallback=t.filterModifiedCallback,this.valueGetter=t.valueGetter,this.rowsInBodyContainer={},this.colDef=t.colDef,this.localeTextFunc=t.localeTextFunc,this.filterParams&&(this.cellRenderer=this.filterParams.cellRenderer),this.createGui(),this.addScrollListener(),this.createApi()},n.prototype.afterGuiAttached=function(){this.drawVirtualRows()},n.prototype.isFilterActive=function(){return this.model.isFilterActive()},n.prototype.doesFilterPass=function(e){if(this.model.isEverythingSelected())return!0;if(this.model.isNothingSelected())return!1;var i=this.valueGetter(e);if(i=t.makeNull(i),Array.isArray(i)){for(var o=0;o<i.length;o++)if(this.model.isValueSelected(i[o]))return!0;return!1}return this.model.isValueSelected(i)},n.prototype.getGui=function(){return this.eGui},n.prototype.onNewRowsLoaded=function(){var e=this.filterParams&&"keep"===this.filterParams.newRowsAction,t=this.eSelectAll&&this.eSelectAll.checked&&!this.eSelectAll.indeterminate;this.model.refreshAfterNewRowsLoaded(e,t),this.setContainerHeight(),this.refreshVirtualRows()},n.prototype.onAnyFilterChanged=function(){this.model.refreshAfterAnyFilterChanged(),this.setContainerHeight(),this.refreshVirtualRows()},n.prototype.createTemplate=function(){return i.replace("[SELECT ALL]",this.localeTextFunc("selectAll","Select All")).replace("[SEARCH...]",this.localeTextFunc("searchOoo","Search...")).replace("[APPLY FILTER]",this.localeTextFunc("applyFilter","Apply Filter"))},n.prototype.createGui=function(){var e=this;this.eGui=t.loadTemplate(this.createTemplate()),this.eListContainer=this.eGui.querySelector(".ag-filter-list-container"),this.eFilterValueTemplate=this.eGui.querySelector("#itemForRepeat"),this.eSelectAll=this.eGui.querySelector("#selectAll"),this.eListViewport=this.eGui.querySelector(".ag-filter-list-viewport"),this.eMiniFilter=this.eGui.querySelector(".ag-filter-filter"),this.eListContainer.style.height=this.model.getUniqueValueCount()*this.rowHeight+"px",this.setContainerHeight(),this.eMiniFilter.value=this.model.getMiniFilter(),t.addChangeListener(this.eMiniFilter,function(){e.onMiniFilterChanged()}),t.removeAllChildren(this.eListContainer),this.eSelectAll.onclick=this.onSelectAll.bind(this),this.model.isEverythingSelected()?(this.eSelectAll.indeterminate=!1,this.eSelectAll.checked=!0):this.model.isNothingSelected()?(this.eSelectAll.indeterminate=!1,this.eSelectAll.checked=!1):this.eSelectAll.indeterminate=!0,this.setupApply()},n.prototype.setupApply=function(){var e=this;this.applyActive?(this.eApplyButton=this.eGui.querySelector("#applyButton"),this.eApplyButton.addEventListener("click",function(){e.filterChangedCallback()})):t.removeElement(this.eGui,"#applyPanel")},n.prototype.setContainerHeight=function(){this.eListContainer.style.height=this.model.getDisplayedValueCount()*this.rowHeight+"px"},n.prototype.drawVirtualRows=function(){var e=this.eListViewport.scrollTop,t=e+this.eListViewport.offsetHeight,i=Math.floor(e/this.rowHeight),o=Math.floor(t/this.rowHeight);this.ensureRowsRendered(i,o)},n.prototype.ensureRowsRendered=function(e,t){for(var i=this,o=Object.keys(this.rowsInBodyContainer),n=e;t>=n;n++)if(o.indexOf(n.toString())>=0)o.splice(o.indexOf(n.toString()),1);else if(this.model.getDisplayedValueCount()>n){var r=this.model.getDisplayedValue(n);i.insertRow(r,n)}this.removeVirtualRows(o)},n.prototype.removeVirtualRows=function(e){var t=this;e.forEach(function(e){var i=t.rowsInBodyContainer[e];t.eListContainer.removeChild(i),delete t.rowsInBodyContainer[e]})},n.prototype.insertRow=function(e,i){var o=this,n=this.eFilterValueTemplate.cloneNode(!0),r=n.querySelector(".ag-filter-value");if(this.cellRenderer){var s=this.cellRenderer({value:e});t.isNode(s)?r.appendChild(s):r.innerHTML=s}else{var l="("+this.localeTextFunc("blanks","Blanks")+")",a=null===e?l:e;r.innerHTML=a}var d=n.querySelector("input");d.checked=this.model.isValueSelected(e),d.onclick=function(){o.onCheckboxClicked(d,e)},n.style.top=this.rowHeight*i+"px",this.eListContainer.appendChild(n),this.rowsInBodyContainer[i]=n},n.prototype.onCheckboxClicked=function(e,t){var i=e.checked;i?(this.model.selectValue(t),this.model.isEverythingSelected()?(this.eSelectAll.indeterminate=!1,this.eSelectAll.checked=!0):this.eSelectAll.indeterminate=!0):(this.model.unselectValue(t),this.model.isNothingSelected()?(this.eSelectAll.indeterminate=!1,this.eSelectAll.checked=!1):this.eSelectAll.indeterminate=!0),this.filterChanged()},n.prototype.filterChanged=function(){this.filterModifiedCallback(),this.applyActive||this.filterChangedCallback()},n.prototype.onMiniFilterChanged=function(){var e=this.model.setMiniFilter(this.eMiniFilter.value);e&&(this.setContainerHeight(),this.refreshVirtualRows())},n.prototype.refreshVirtualRows=function(){this.clearVirtualRows(),this.drawVirtualRows()},n.prototype.clearVirtualRows=function(){var e=Object.keys(this.rowsInBodyContainer);this.removeVirtualRows(e)},n.prototype.onSelectAll=function(){var e=this.eSelectAll.checked;e?this.model.selectEverything():this.model.selectNothing(),this.updateAllCheckboxes(e),this.filterChanged()},n.prototype.updateAllCheckboxes=function(e){for(var t=this.eListContainer.querySelectorAll("[filter-checkbox=true]"),i=0,o=t.length;o>i;i++)t[i].checked=e},n.prototype.addScrollListener=function(){var e=this;this.eListViewport.addEventListener("scroll",function(){e.drawVirtualRows()})},n.prototype.getApi=function(){return this.api},n.prototype.createApi=function(){var e=this.model,t=this;this.api={setMiniFilter:function(t){e.setMiniFilter(t)},getMiniFilter:function(){return e.getMiniFilter()},selectEverything:function(){t.eSelectAll.indeterminate=!1,t.eSelectAll.checked=!0,e.selectEverything()},isFilterActive:function(){return e.isFilterActive()},selectNothing:function(){t.eSelectAll.indeterminate=!1,t.eSelectAll.checked=!1,e.selectNothing()},unselectValue:function(i){e.unselectValue(i),t.refreshVirtualRows()},selectValue:function(i){e.selectValue(i),t.refreshVirtualRows()},isValueSelected:function(t){return e.isValueSelected(t)},isEverythingSelected:function(){return e.isEverythingSelected()},isNothingSelected:function(){return e.isNothingSelected()},getUniqueValueCount:function(){return e.getUniqueValueCount()},getUniqueValue:function(t){return e.getUniqueValue(t)},getModel:function(){return e.getModel()},setModel:function(i){e.setModel(i),t.refreshVirtualRows()}}},n}();e.SetFilter=n}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i=function(){function i(){}return i.prototype.init=function(e){this.ePopupParent=e},i.prototype.positionPopup=function(e,t,i){var o=e.getBoundingClientRect(),n=this.ePopupParent.getBoundingClientRect(),r=o.left-n.left,s=o.top-n.top+o.height;if(i>0){var l=n.right-n.left,a=l-i;r>a&&(r=a),0>r&&(r=0)}t.style.left=r+"px",t.style.top=s+"px"},i.prototype.addAsModalPopup=function(i,o){function n(t){var i=t.which||t.keyCode;i===e.Constants.KEY_ESCAPE&&r(null)}function r(e){e&&e===u||(d.ePopupParent.removeChild(i),l.removeEventListener("keydown",n),l.removeEventListener("click",r),i.removeEventListener("click",s))}function s(e){u=e}var l=document.body;if(!l)return void console.warn("ag-grid: could not find the body of the document, document.body is empty");var a=t.isVisible(i);if(!a){this.ePopupParent.appendChild(i);var d=this;setTimeout(function(){o&&l.addEventListener("keydown",n),l.addEventListener("click",r),i.addEventListener("click",s)},0);var u=null;return r}},i}();e.PopupService=i}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i=function(){function i(){}return i.prototype.init=function(e,t,i,o,n,r,s){this.$compile=i,this.$scope=o,this.gridOptionsWrapper=t,this.grid=e,this.allFilters={},this.columnController=n,this.popupService=r,this.valueService=s,this.columnController=n,this.quickFilter=null},i.prototype.setFilterModel=function(e){var i=this;if(e){var o=Object.keys(e);t.iterateObject(this.allFilters,function(n,r){t.removeFromArray(o,n);var s=e[n];i.setModelOnFilterWrapper(r.filter,s)}),t.iterateArray(o,function(t){var o=i.columnController.getColumn(t);if(!o)return void console.warn("Warning ag-grid setFilterModel - no column found for colId "+t);var n=i.getOrCreateFilterWrapper(o);i.setModelOnFilterWrapper(n.filter,e[t])})}else t.iterateObject(this.allFilters,function(e,t){i.setModelOnFilterWrapper(t.filter,null)});this.grid.onFilterChanged()},i.prototype.setModelOnFilterWrapper=function(e,t){if("function"!=typeof e.getApi)return void console.warn("Warning ag-grid - filter missing getApi method, which is needed for getFilterModel");var i=e.getApi();return"function"!=typeof i.setModel?void console.warn("Warning ag-grid - filter API missing setModel method, which is needed for setFilterModel"):void i.setModel(t)},i.prototype.getFilterModel=function(){var e={};return t.iterateObject(this.allFilters,function(t,i){if("function"!=typeof i.filter.getApi)return void console.warn("Warning ag-grid - filter missing getApi method, which is needed for getFilterModel");var o=i.filter.getApi();if("function"!=typeof o.getModel)return void console.warn("Warning ag-grid - filter API missing getModel method, which is needed for getFilterModel");var n=o.getModel();n&&(e[t]=n)}),e},i.prototype.setRowModel=function(e){this.rowModel=e},i.prototype.isAdvancedFilterPresent=function(){var e=!1;return t.iterateObject(this.allFilters,function(t,i){i.filter.isFilterActive||console.error("Filter is missing method isFilterActive"),i.filter.isFilterActive()&&(e=!0)}),e},i.prototype.isAnyFilterPresent=function(){return this.isQuickFilterPresent()||this.advancedFilterPresent||this.externalFilterPresent},i.prototype.isFilterPresentForCol=function(e){var t=this.allFilters[e];if(!t)return!1;t.filter.isFilterActive||console.error("Filter is missing method isFilterActive");var i=t.filter.isFilterActive();return i},i.prototype.doesFilterPass=function(e,t){for(var i=e.data,o=Object.keys(this.allFilters),n=0,r=o.length;r>n;n++){var s=o[n],l=this.allFilters[s];if(void 0!==l&&l.filter!==t){l.filter.doesFilterPass||console.error("Filter is missing method doesFilterPass");var a={node:e,data:i};if(!l.filter.doesFilterPass(a))return!1}}return!0},i.prototype.setQuickFilter=function(e){return(void 0===e||""===e)&&(e=null),this.quickFilter!==e?this.gridOptionsWrapper.isVirtualPaging()?void console.warn("ag-grid: cannot do quick filtering when doing virtual paging"):((void 0===e||""===e)&&(e=null),null!==e&&(e=e.toUpperCase()),this.quickFilter=e,!0):!1},i.prototype.onFilterChanged=function(){this.advancedFilterPresent=this.isAdvancedFilterPresent(),this.externalFilterPresent=this.gridOptionsWrapper.isExternalFilterPresent(),t.iterateObject(this.allFilters,function(e,t){t.filter.onAnyFilterChanged&&t.filter.onAnyFilterChanged()})},i.prototype.isQuickFilterPresent=function(){return null!==this.quickFilter},i.prototype.doesRowPassOtherFilters=function(e,t){return this.doesRowPassFilter(t,e)},i.prototype.doesRowPassFilter=function(e,t){return this.isQuickFilterPresent()&&(e.quickFilterAggregateText||this.aggregateRowForQuickFilter(e),e.quickFilterAggregateText.indexOf(this.quickFilter)<0)?!1:this.externalFilterPresent&&!this.gridOptionsWrapper.doesExternalFilterPass(e)?!1:this.advancedFilterPresent&&!this.doesFilterPass(e,t)?!1:!0},i.prototype.aggregateRowForQuickFilter=function(e){var t="",i=this;this.columnController.getAllColumns().forEach(function(o){var n=e.data,r=i.valueService.getValue(o.colDef,n,e);r&&""!==r&&(t=t+r.toString().toUpperCase()+"_")}),e.quickFilterAggregateText=t},i.prototype.refreshDisplayedValues=function(){this.rowModel.getTopLevelNodes||console.error("ag-Grid: could not find getTopLevelNodes on rowModel. you cannot use setFilter whendoing virtualScrolling as the filter has no way of getting the full set of values to display. Either stop using this filter type, or provide the filter with a set of values (see the docson configuring the setFilter).");

for(var e=this.rowModel.getTopLevelNodes(),t=Object.keys(this.allFilters),i=0,o=t.length;o>i;i++){var n=t[i],r=this.allFilters[n];if(void 0!==r&&"function"==typeof r.filter.setFilteredDisplayValues){for(var s=new Array,l=0;l<e.length;l++)this.doesFilterPass(e[l],i)&&s.push(e[l]);r.filter.setFilteredDisplayValues(s)}}},i.prototype.onNewRowsLoaded=function(){var e=this;Object.keys(this.allFilters).forEach(function(t){var i=e.allFilters[t].filter;i.onNewRowsLoaded&&i.onNewRowsLoaded()})},i.prototype.createValueGetter=function(e){var t=this;return function(i){return t.valueService.getValue(e.colDef,i.data,i)}},i.prototype.getFilterApi=function(e){var t=this.getOrCreateFilterWrapper(e);return t&&"function"==typeof t.filter.getApi?t.filter.getApi():void 0},i.prototype.getOrCreateFilterWrapper=function(e){var t=this.allFilters[e.colId];return t||(t=this.createFilterWrapper(e),this.allFilters[e.colId]=t,this.refreshDisplayedValues()),t},i.prototype.createFilterWrapper=function(i){var o=i.colDef,n={column:i,filter:null,scope:null,gui:null};"function"==typeof o.filter?(this.gridOptionsWrapper.isAngularCompileFilters()&&(n.scope=this.$scope.$new()),this.assertMethodHasNoParameters(o.filter),n.filter=new o.filter):n.filter="text"===o.filter?new e.TextFilter:"number"===o.filter?new e.NumberFilter:new e.SetFilter;var r=this.grid.onFilterChanged.bind(this.grid),s=this.grid.onFilterModified.bind(this.grid),l=this.doesRowPassOtherFilters.bind(this,n.filter),a=o.filterParams,d={colDef:o,rowModel:this.rowModel,filterChangedCallback:r,filterModifiedCallback:s,filterParams:a,localeTextFunc:this.gridOptionsWrapper.getLocaleTextFunc(),valueGetter:this.createValueGetter(i),doesRowPassOtherFilter:l,context:this.gridOptionsWrapper.getContext,$scope:n.scope};if(!n.filter.init)throw"Filter is missing method init";if(n.filter.init(d),!n.filter.getGui)throw"Filter is missing method getGui";var u=document.createElement("div");u.className="ag-filter";var h=n.filter.getGui();if(t.isNodeOrElement(h))u.appendChild(h);else{var p=document.createElement("span");p.innerHTML=h,u.appendChild(p)}return n.gui=n.scope?this.$compile(u)(n.scope)[0]:u,n},i.prototype.assertMethodHasNoParameters=function(e){var i=t.getFunctionParameters(e);i.length>0&&(console.warn("ag-grid: It looks like your filter is of the old type and expecting parameters in the constructor."),console.warn("ag-grid: From ag-grid 1.14, the constructor should take no parameters and init() used instead."))},i.prototype.showFilter=function(e,t){var i=this.getOrCreateFilterWrapper(e);this.popupService.positionPopup(t,i.gui,200);var o=this.popupService.addAsModalPopup(i.gui,!0);if(i.filter.afterGuiAttached){var n={hidePopup:o,eventSource:t};i.filter.afterGuiAttached(n)}},i}();e.FilterManager=i}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=function(){function e(){this.templateCache={},this.waitingCallbacks={}}return e.prototype.init=function(e){this.$scope=e},e.prototype.getTemplate=function(e,t){var i=this.templateCache[e];if(i)return i;var o=this.waitingCallbacks[e],n=this;if(!o){o=[],this.waitingCallbacks[e]=o;var r=new XMLHttpRequest;r.onload=function(){n.handleHttpResult(this,e)},r.open("GET",e),r.send()}return t&&o.push(t),null},e.prototype.handleHttpResult=function(e,t){if(200!==e.status||null===e.response)return void console.warn("Unable to get template error "+e.status+" - "+t);this.templateCache[t]=e.response;for(var i=this.waitingCallbacks[t],o=0;o<i.length;o++){var n=i[o];n()}if(this.$scope){var r=this;setTimeout(function(){r.$scope.$apply()},0)}},e}();e.TemplateService=t}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){function t(e,t){"boolean"==typeof t?(e.checked=t,e.indeterminate=!1):e.indeterminate=!0}var i=function(){function e(){}return e.prototype.init=function(e,t){this.angularGrid=e,this.selectionController=t},e.prototype.createSelectionCheckbox=function(e,i){var o=document.createElement("input");o.type="checkbox",o.name="name",o.className="ag-selection-checkbox",t(o,this.selectionController.isNodeSelected(e));var n=this;return o.onclick=function(e){e.stopPropagation()},o.onchange=function(){var e=o.checked;e?n.selectionController.selectIndex(i,!0):n.selectionController.deselectIndex(i)},this.angularGrid.addVirtualRowListener(i,{rowSelected:function(e){t(o,e)},rowRemoved:function(){}}),o},e}();e.SelectionRendererFactory=i}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(t){var i=(e.grid.Utils,function(){function e(){this.id=e.idSequence++}return e.prototype.getId=function(){return this.id},e.prototype.addElementAttachedListener=function(e){this.elementAttachedListeners||(this.elementAttachedListeners=[]),this.elementAttachedListeners.push(e)},e.prototype.fireElementAttached=function(e){if(this.elementAttachedListeners)for(var t=0;t<this.elementAttachedListeners.length;t++){var i=this.elementAttachedListeners[t];i(e)}},e.prototype.elementAttached=function(e){this.fireElementAttached(e)},e.prototype.toHtmlString=function(){return null},e.idSequence=0,e}());t.VElement=i}(t=e.vdom||(e.vdom={}))}(ag||(ag={}));var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);i.prototype=t.prototype,e.prototype=new i},ag;!function(e){var t;!function(t){var i=e.grid.Utils,o=function(e){function o(t){e.call(this),this.style={},this.type=t}return __extends(o,e),o.prototype.getElement=function(){return this.element},o.prototype.setInnerHtml=function(e){this.bound?this.element.innerHTML=e:this.innerHtml=e},o.prototype.addStyles=function(e){var t=this;e&&(this.bound||this.style||(this.style={}),i.iterateObject(e,function(e,i){if(t.bound){var o=t.element.style;o[e]=i}else t.style[e]=i}))},o.prototype.attachEventListeners=function(e){if(this.eventListeners)for(var t=0;t<this.eventListeners.length;t++){var i=this.eventListeners[t];e.addEventListener(i.event,i.listener)}},o.prototype.addClass=function(e){this.bound?i.addCssClass(this.element,e):(this.classes||(this.classes=[]),this.classes.push(e))},o.prototype.removeClass=function(e){if(this.bound)i.removeCssClass(this.element,e);else{if(!this.classes)return;for(;this.classes.indexOf(e)>=0;)i.removeFromArray(this.classes,e)}},o.prototype.addClasses=function(e){if(e&&!(e.length<=0))if(this.bound)for(var t=0;t<e.length;t++)i.addCssClass(this.element,e[t]);else{this.classes||(this.classes=[]);for(var o=0;o<e.length;o++)this.classes.push(e[o])}},o.prototype.toHtmlString=function(){var e="";return e+="<"+this.type+' v_element_id="'+this.getId()+'" ',e+=this.toHtmlStringClasses(),e+=this.toHtmlStringAttributes(),e+=this.toHtmlStringStyles(),e+=">",this.innerHtml&&(e+=this.innerHtml),e+=this.toHtmlStringChildren(),e+="</"+this.type+">"},o.prototype.toHtmlStringChildren=function(){if(!this.children)return"";for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toHtmlString();return e},o.prototype.toHtmlStringAttributes=function(){if(!this.attributes)return"";var e="";return i.iterateObject(this.attributes,function(t,i){e+=" "+t+'="'+i+'"'}),e},o.prototype.toHtmlStringClasses=function(){return this.classes?' class="'+this.classes.join(" ")+'"':""},o.prototype.toHtmlStringStyles=function(){var e=' style="',t=!1;return i.iterateObject(this.style,function(i,o){e+=" "+i+": "+o+";",t=!0}),e+='"',t?e:""},o.prototype.appendChild=function(e){this.bound?i.isNodeOrElement(e)?this.element.appendChild(e):console.error("cannot appendChild with virtual child to already bound VHTMLElement"):(this.children||(this.children=[]),this.children.push(i.isNodeOrElement(e)?new t.VWrapperElement(e):e))},o.prototype.setAttribute=function(e,t){this.bound&&console.error("cannot setAttribute to already bound VHTMLElement"),this.attributes||(this.attributes={}),this.attributes[e]=t},o.prototype.addEventListener=function(e,t){this.bound&&console.error("cannot addEventListener to already bound VHTMLElement"),this.eventListeners||(this.eventListeners=[]);var i=new n(e,t);this.eventListeners.push(i)},o.prototype.elementAttached=function(t){e.prototype.elementAttached.call(this,t),this.element=t,this.attachEventListeners(t),this.fireElementAttachedToChildren(t),this.bound=!0},o.prototype.fireElementAttachedToChildren=function(e){if(this.children)for(var t=0;t<this.children.length;t++){var i=this.children[t],o=e.querySelector('[v_element_id="'+i.getId()+'"]');i.elementAttached(o)}},o}(t.VElement);t.VHtmlElement=o;var n=function(){function e(e,t){this.event=e,this.listener=t}return e}()}(t=e.vdom||(e.vdom={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=function(e){function t(t){e.call(this),this.wrappedElement=t}return __extends(t,e),t.prototype.toHtmlString=function(){return'<span v_element_id="'+this.getId()+'"></span>'},t.prototype.elementAttached=function(e){var t=e.parentNode;t.insertBefore(this.wrappedElement,e),t.removeChild(e)},t}(e.VElement);e.VWrapperElement=t}(t=e.vdom||(e.vdom={}))}(ag||(ag={}));var ag;!function(e){var t;!function(t){var i=t.Utils,o=function(){function o(e,t,i,o,n,r,s,l,a,d,u,h,p,c,g,f){this.isFirstColumn=!1,this.isFirstColumn=e,this.column=t,this.rowRenderer=o,this.gridOptionsWrapper=n,this.expressionService=r,this.selectionRendererFactory=s,this.selectionController=l,this.cellRendererMap=d,this.$compile=i,this.templateService=a,this.columnController=c,this.valueService=g,this.eventService=f,this.checkboxSelection=this.column.colDef.checkboxSelection&&!u.floating,this.node=u,this.rowIndex=h,this.scope=p,this.data=this.getDataForRow(),this.value=this.getValue(),this.setupComponents()}return o.prototype.getColumn=function(){return this.column},o.prototype.getValue=function(){return this.valueService.getValue(this.column.colDef,this.data,this.node)},o.prototype.getVGridCell=function(){return this.vGridCell},o.prototype.getDataForRow=function(){if(this.node.footer)return this.node.data;if(this.node.group){var e=this.gridOptionsWrapper.isGroupIncludeFooter(),t=this.gridOptionsWrapper.isGroupSuppressBlankHeader();return this.node.expanded&&e&&!t?void 0:this.node.data}return this.node.data},o.prototype.setupComponents=function(){this.vGridCell=new e.vdom.VHtmlElement("div"),this.vGridCell.setAttribute("col",void 0!==this.column.index&&null!==this.column.index?this.column.index.toString():""),this.vGridCell.setAttribute("colId",this.column.colId),this.gridOptionsWrapper.isSuppressCellSelection()||this.node.floating||this.vGridCell.setAttribute("tabindex","-1"),this.addClasses(),this.addCellClickedHandler(),this.addCellDoubleClickedHandler(),this.addCellContextMenuHandler(),this.node.floating||this.addCellNavigationHandler(),this.vGridCell.addStyles({width:this.column.actualWidth+"px"}),this.createParentOfValue(),this.populateCell(),this.eCheckbox&&this.setSelected(this.selectionController.isNodeSelected(this.node))},o.prototype.startEditing=function(e){var o=this,n=this;this.editingCell=!0,i.removeAllChildren(this.vGridCell.getElement());var r=document.createElement("input");r.type="text",i.addCssClass(r,"ag-cell-edit-input");var s=e!==t.Constants.KEY_BACKSPACE&&e!==t.Constants.KEY_DELETE,l=this.getValue();s&&null!==l&&void 0!==l&&(r.value=l),r.style.width=this.column.actualWidth-14+"px",this.vGridCell.appendChild(r),r.focus(),r.select();var a=function(){n.stopEditing(r,a)};r.addEventListener("blur",a),r.addEventListener("keypress",function(e){var i=e.which||e.keyCode;i===t.Constants.KEY_ENTER&&(o.stopEditing(r,a),o.focusCell(!0))}),r.addEventListener("keydown",function(e){var i=e.which||e.keyCode;i===t.Constants.KEY_ESCAPE&&(o.stopEditing(r,a,!0),o.focusCell(!0))}),r.addEventListener("keydown",function(e){var i=e.which||e.keyCode;return i==t.Constants.KEY_TAB?(n.stopEditing(r,a),n.rowRenderer.startEditingNextCell(n.rowIndex,n.column,e.shiftKey),e.preventDefault(),!1):void 0})},o.prototype.focusCell=function(e){this.rowRenderer.focusCell(this.vGridCell.getElement(),this.rowIndex,this.column.index,this.column.colDef,e)},o.prototype.stopEditing=function(e,o,n){void 0===n&&(n=!1),this.editingCell=!1;var r=e.value,s=this.column.colDef;if(e.removeEventListener("blur",o),!n){var l={node:this.node,data:this.node.data,oldValue:this.node.data[s.field],newValue:r,rowIndex:this.rowIndex,colDef:s,api:this.gridOptionsWrapper.getApi(),context:this.gridOptionsWrapper.getContext()};s.newValueHandler?s.newValueHandler(l):this.node.data[s.field]=r,this.value=this.getValue(),l.newValue=this.value,"function"==typeof s.onCellValueChanged&&s.onCellValueChanged(l),this.eventService.dispatchEvent(t.Events.EVENT_CELL_VALUE_CHANGED,l)}i.removeAllChildren(this.vGridCell.getElement()),this.checkboxSelection&&this.vGridCell.appendChild(this.vCellWrapper.getElement()),this.refreshCell()},o.prototype.createParams=function(){var e={node:this.node,data:this.node.data,value:this.value,rowIndex:this.rowIndex,colDef:this.column.colDef,$scope:this.scope,context:this.gridOptionsWrapper.getContext(),api:this.gridOptionsWrapper.getApi()};return e},o.prototype.createEvent=function(e,t){var i=this.createParams();return i.event=e,i.eventSource=t,i},o.prototype.addCellDoubleClickedHandler=function(){var e=this,i=this.column.colDef;this.vGridCell.addEventListener("dblclick",function(o){var n=e.createEvent(o,this);e.eventService.dispatchEvent(t.Events.EVENT_CELL_DOUBLE_CLICKED,n),"function"==typeof i.onCellDoubleClicked&&i.onCellDoubleClicked(n),!e.gridOptionsWrapper.isSingleClickEdit()&&e.isCellEditable()&&e.startEditing()})},o.prototype.addCellContextMenuHandler=function(){var e=this,i=this.column.colDef;this.vGridCell.addEventListener("contextmenu",function(o){var n=e.createEvent(o,this);e.eventService.dispatchEvent(t.Events.EVENT_CELL_CONTEXT_MENU,n),i.onCellContextMenu&&i.onCellContextMenu(n)})},o.prototype.isCellEditable=function(){if(this.editingCell)return!1;if(this.node.group)return!1;var e=this.column.colDef;if("boolean"==typeof e.editable)return e.editable;if("function"==typeof e.editable){var t=this.createParams(),i=e.editable;return i(t)}return!1},o.prototype.addCellClickedHandler=function(){var e=this.column.colDef,i=this;this.vGridCell.addEventListener("click",function(o){i.node.floating||i.focusCell(!1);var n=i.createEvent(o,this);i.eventService.dispatchEvent(t.Events.EVENT_CELL_CLICKED,n),e.onCellClicked&&e.onCellClicked(n),i.gridOptionsWrapper.isSingleClickEdit()&&i.isCellEditable()&&i.startEditing()})},o.prototype.populateCell=function(){this.putDataIntoCell(),this.addStylesFromCollDef(),this.addClassesFromCollDef(),this.addClassesFromRules()},o.prototype.addStylesFromCollDef=function(){var e=this.column.colDef;if(e.cellStyle){var t;if("function"==typeof e.cellStyle){var i={value:this.value,data:this.node.data,node:this.node,colDef:e,column:this.column,$scope:this.scope,context:this.gridOptionsWrapper.getContext(),api:this.gridOptionsWrapper.getApi()},o=e.cellStyle;t=o(i)}else t=e.cellStyle;t&&this.vGridCell.addStyles(t)}},o.prototype.addClassesFromCollDef=function(){var e=this,t=this.column.colDef;if(t.cellClass){var i;if("function"==typeof t.cellClass){var o={value:this.value,data:this.node.data,node:this.node,colDef:t,$scope:this.scope,context:this.gridOptionsWrapper.getContext(),api:this.gridOptionsWrapper.getApi()},n=t.cellClass;i=n(o)}else i=t.cellClass;"string"==typeof i?this.vGridCell.addClass(i):Array.isArray(i)&&i.forEach(function(t){e.vGridCell.addClass(t)})}},o.prototype.addClassesFromRules=function(){var e=this.column.colDef,t=e.cellClassRules;if("object"==typeof t&&null!==t)for(var i={value:this.value,data:this.node.data,node:this.node,colDef:e,rowIndex:this.rowIndex,api:this.gridOptionsWrapper.getApi(),context:this.gridOptionsWrapper.getContext()},o=Object.keys(t),n=0;n<o.length;n++){var r,s=o[n],l=t[s];"string"==typeof l?r=this.expressionService.evaluate(l,i):"function"==typeof l&&(r=l(i)),r?this.vGridCell.addClass(s):this.vGridCell.removeClass(s)}},o.prototype.addCellNavigationHandler=function(){var e=this;this.vGridCell.addEventListener("keydown",function(i){if(!e.editingCell&&i.target===e.vGridCell.getElement()){var o=i.which||i.keyCode,n=o===t.Constants.KEY_DOWN||o===t.Constants.KEY_UP||o===t.Constants.KEY_LEFT||o===t.Constants.KEY_RIGHT;if(n)return i.preventDefault(),void e.rowRenderer.navigateToNextCell(o,e.rowIndex,e.column);var r=e.isKeycodeForStartEditing(o);if(r&&e.isCellEditable())return e.startEditing(o),void i.preventDefault();var s=o===t.Constants.KEY_SPACE;if(s&&e.gridOptionsWrapper.isRowSelection()){var l=e.selectionController.isNodeSelected(e.node);return l?e.selectionController.deselectNode(e.node):e.selectionController.selectNode(e.node,!0),void i.preventDefault()}}})},o.prototype.isKeycodeForStartEditing=function(e){return e===t.Constants.KEY_ENTER||e===t.Constants.KEY_BACKSPACE||e===t.Constants.KEY_DELETE},o.prototype.createSelectionCheckbox=function(){this.eCheckbox=document.createElement("input"),this.eCheckbox.type="checkbox",this.eCheckbox.name="name",this.eCheckbox.className="ag-selection-checkbox",this.eCheckbox.addEventListener("click",function(e){e.stopPropagation()});var e=this;this.checkboxOnChangeListener=function(){var t=e.eCheckbox.checked;t?e.selectionController.selectIndex(e.rowIndex,!0):e.selectionController.deselectIndex(e.rowIndex)},this.eCheckbox.onchange=this.checkboxOnChangeListener},o.prototype.setSelected=function(e){this.eCheckbox&&(this.eCheckbox.onchange=null,"boolean"==typeof e?(this.eCheckbox.checked=e,this.eCheckbox.indeterminate=!1):this.eCheckbox.indeterminate=!0,this.eCheckbox.onchange=this.checkboxOnChangeListener)},o.prototype.createParentOfValue=function(){this.checkboxSelection?(this.vCellWrapper=new e.vdom.VHtmlElement("span"),this.vCellWrapper.addClass("ag-cell-wrapper"),this.vGridCell.appendChild(this.vCellWrapper),this.createSelectionCheckbox(),this.vCellWrapper.appendChild(new e.vdom.VWrapperElement(this.eCheckbox)),this.vSpanWithValue=new e.vdom.VHtmlElement("span"),this.vSpanWithValue.addClass("ag-cell-value"),this.vCellWrapper.appendChild(this.vSpanWithValue),this.vParentOfValue=this.vSpanWithValue):(this.vGridCell.addClass("ag-cell-value"),this.vParentOfValue=this.vGridCell)},o.prototype.isVolatile=function(){return this.column.colDef["volatile"]},o.prototype.refreshCell=function(){i.removeAllChildren(this.vParentOfValue.getElement()),this.value=this.getValue(),this.populateCell(),this.checkboxSelection&&this.setSelected(this.selectionController.isNodeSelected(this.node)),this.gridOptionsWrapper.isAngularCompileRows()&&this.$compile(this.vGridCell.getElement())(this.scope)},o.prototype.putDataIntoCell=function(){var e=this.column.colDef;if(e.template)this.vParentOfValue.setInnerHtml(e.template);else if(e.templateUrl){var t=this.templateService.getTemplate(e.templateUrl,this.refreshCell.bind(this,!0));t&&this.vParentOfValue.setInnerHtml(t)}else e.floatingCellRenderer&&this.node.floating?this.useCellRenderer(e.floatingCellRenderer):e.cellRenderer?this.useCellRenderer(e.cellRenderer):void 0!==this.value&&null!==this.value&&""!==this.value&&this.vParentOfValue.setInnerHtml(this.value.toString())},o.prototype.useCellRenderer=function(e){var t,o=this.column.colDef,n={value:this.value,valueGetter:this.getValue,data:this.node.data,node:this.node,colDef:o,column:this.column,$scope:this.scope,rowIndex:this.rowIndex,api:this.gridOptionsWrapper.getApi(),context:this.gridOptionsWrapper.getContext(),refreshCell:this.refreshCell.bind(this),eGridCell:this.vGridCell};if("object"==typeof e&&null!==e){var r=e;if(t=this.cellRendererMap[r.renderer],!t)throw"Cell renderer "+e+" not found, available are "+Object.keys(this.cellRendererMap)}else{if("function"!=typeof e)throw"Cell Renderer must be String or Function";t=e}var s=t(n);i.isNodeOrElement(s)?this.vParentOfValue.appendChild(s):this.vParentOfValue.setInnerHtml(s)},o.prototype.addClasses=function(){this.vGridCell.addClass("ag-cell"),this.vGridCell.addClass("ag-cell-no-focus"),this.vGridCell.addClass("cell-col-"+this.column.index),this.node.group&&this.node.footer&&this.vGridCell.addClass("ag-footer-cell"),this.node.group&&!this.node.footer&&this.vGridCell.addClass("ag-group-cell")},o}();t.RenderedCell=o}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(t){var i=t.Utils,o=function(){function o(e,t,i,o,n,r,s,l,a,d,u,h,p,c,g,f,v){this.renderedCells={},this.gridOptionsWrapper=e,this.valueService=t,this.parentScope=i,this.angularGrid=o,this.expressionService=r,this.columnController=n,this.cellRendererMap=s,this.selectionRendererFactory=l,this.$compile=a,this.templateService=d,this.selectionController=u,this.rowRenderer=h,this.eBodyContainer=p,this.ePinnedContainer=c,this.pinning=n.isPinning(),this.eventService=v;var C=this.gridOptionsWrapper.isGroupUseEntireRow(),m=g.group&&C;this.vBodyRow=this.createRowContainer(),this.pinning&&(this.vPinnedRow=this.createRowContainer()),this.rowIndex=f,this.node=g,this.scope=this.createChildScopeOrNull(g.data),m||this.drawNormalRow(),this.addDynamicStyles(),this.addDynamicClasses();var y=this.rowIndex.toString();this.node.floatingBottom?y="fb-"+y:this.node.floatingTop&&(y="ft-"+y),this.vBodyRow.setAttribute("row",y),this.pinning&&this.vPinnedRow.setAttribute("row",y),this.gridOptionsWrapper.isForPrint()||(this.vBodyRow.style.top=this.gridOptionsWrapper.getRowHeight()*this.rowIndex+"px",this.pinning&&(this.vPinnedRow.style.top=this.gridOptionsWrapper.getRowHeight()*this.rowIndex+"px")),this.vBodyRow.style.height=this.gridOptionsWrapper.getRowHeight()+"px",this.pinning&&(this.vPinnedRow.style.height=this.gridOptionsWrapper.getRowHeight()+"px"),m&&this.createGroupRow(),this.bindVirtualElement(this.vBodyRow),this.pinning&&this.bindVirtualElement(this.vPinnedRow),this.scope&&(this.$compile(this.vBodyRow.getElement())(this.scope),this.pinning&&this.$compile(this.vPinnedRow.getElement())(this.scope)),this.eBodyContainer.appendChild(this.vBodyRow.getElement()),this.pinning&&this.ePinnedContainer.appendChild(this.vPinnedRow.getElement())}return o.prototype.onRowSelected=function(e){i.iterateObject(this.renderedCells,function(t,i){i.setSelected(e)})},o.prototype.softRefresh=function(){i.iterateObject(this.renderedCells,function(e,t){t.isVolatile()&&t.refreshCell()})},o.prototype.getRenderedCellForColumn=function(e){return this.renderedCells[e.index]},o.prototype.getCellForCol=function(e){var t=this.renderedCells[e.index];return t?t.getVGridCell().getElement():null},o.prototype.destroy=function(){this.destroyScope(),this.pinning&&this.ePinnedContainer.removeChild(this.vPinnedRow.getElement()),this.eBodyContainer.removeChild(this.vBodyRow.getElement())},o.prototype.destroyScope=function(){this.scope&&(this.scope.$destroy(),this.scope=null)},o.prototype.isDataInList=function(e){return e.indexOf(this.node.data)>=0},o.prototype.isNodeInList=function(e){return e.indexOf(this.node)>=0},o.prototype.isGroup=function(){return this.node.group===!0},o.prototype.drawNormalRow=function(){for(var e=this.columnController.getDisplayedColumns(),i=0;i<e.length;i++){var o=e[i],n=0===i,r=new t.RenderedCell(n,o,this.$compile,this.rowRenderer,this.gridOptionsWrapper,this.expressionService,this.selectionRendererFactory,this.selectionController,this.templateService,this.cellRendererMap,this.node,this.rowIndex,this.scope,this.columnController,this.valueService,this.eventService),s=r.getVGridCell();o.pinned?this.vPinnedRow.appendChild(s):this.vBodyRow.appendChild(s),this.renderedCells[o.index]=r}},o.prototype.bindVirtualElement=function(e){var t=e.toHtmlString(),o=i.loadTemplate(t);e.elementAttached(o)},o.prototype.createGroupRow=function(){var e=this.createGroupSpanningEntireRowCell(!1);if(this.pinning){this.vPinnedRow.appendChild(e);var t=this.createGroupSpanningEntireRowCell(!0);this.vBodyRow.appendChild(t)}else this.vBodyRow.appendChild(e)},o.prototype.createGroupSpanningEntireRowCell=function(e){var t;if(e)t=document.createElement("span");else{var o=this.gridOptionsWrapper.getGroupRowRenderer();o||(o={renderer:"group",innerRenderer:this.gridOptionsWrapper.getGroupRowInnerRenderer()});var n={node:this.node,data:this.node.data,rowIndex:this.rowIndex,api:this.gridOptionsWrapper.getApi(),colDef:{cellRenderer:o}};t=this.cellRendererMap.group(n)}return this.node.footer?i.addCssClass(t,"ag-footer-cell-entire-row"):i.addCssClass(t,"ag-group-cell-entire-row"),t},o.prototype.setMainRowWidth=function(e){this.vBodyRow.addStyles({width:e+"px"})},o.prototype.createChildScopeOrNull=function(e){if(this.gridOptionsWrapper.isAngularCompileRows()){var t=this.parentScope.$new();return t.data=e,t}return null},o.prototype.addDynamicStyles=function(){var e=this.gridOptionsWrapper.getRowStyle();e&&("function"==typeof e?console.log("ag-Grid: rowStyle should be a string or an array, not be a function, use getRowStyle() instead"):(this.vBodyRow.addStyles(e),this.pinning&&this.vPinnedRow.addStyles(e)));var t=this.gridOptionsWrapper.getRowStyleFunc();if(t){var i={data:this.node.data,node:this.node,api:this.gridOptionsWrapper.getApi(),context:this.gridOptionsWrapper.getContext(),$scope:this.scope},o=t(i);this.vBodyRow.addStyles(o),this.pinning&&this.vPinnedRow.addStyles(o)}},o.prototype.createRowContainer=function(){var t=new e.vdom.VHtmlElement("div"),i=this;return t.addEventListener("click",function(e){i.angularGrid.onRowClicked(e,Number(this.getAttribute("row")),i.node)}),t},o.prototype.getRowNode=function(){return this.node},o.prototype.getRowIndex=function(){return this.rowIndex},o.prototype.refreshCells=function(e){if(e){var t=this.columnController.getColumns(e);i.iterateObject(this.renderedCells,function(e,i){var o=i.getColumn();t.indexOf(o)>=0&&i.refreshCell()})}},o.prototype.addDynamicClasses=function(){var e=[];e.push("ag-row"),e.push(this.rowIndex%2==0?"ag-row-even":"ag-row-odd"),this.selectionController.isNodeSelected(this.node)&&e.push("ag-row-selected"),this.node.group?(e.push("ag-row-group"),e.push("ag-row-level-"+this.node.level),!this.node.footer&&this.node.expanded&&e.push("ag-row-group-expanded"),this.node.footer||this.node.expanded||e.push("ag-row-group-contracted"),this.node.footer&&e.push("ag-row-footer")):e.push(this.node.parent?"ag-row-level-"+(this.node.parent.level+1):"ag-row-level-0");var t=this.gridOptionsWrapper.getRowClass();t&&("function"==typeof t?console.warn("ag-Grid: rowClass should not be a function, please use getRowClass instead"):"string"==typeof t?e.push(t):Array.isArray(t)&&t.forEach(function(t){e.push(t)}));var i=this.gridOptionsWrapper.getRowClassFunc();if(i){var o={node:this.node,data:this.node.data,rowIndex:this.rowIndex,context:this.gridOptionsWrapper.getContext(),api:this.gridOptionsWrapper.getApi()},n=i(o);n&&("string"==typeof n?e.push(n):Array.isArray(n)&&n.forEach(function(t){e.push(t)}))}this.vBodyRow.addClasses(e),this.pinning&&this.vPinnedRow.addClasses(e)},o}();t.RenderedRow=o}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){function t(e,t){var o=i(t),r=document.createElementNS(n,"polygon");return r.setAttribute("points",e),o.appendChild(r),o}function i(e){var t=document.createElementNS(n,"svg");return e>0?(t.setAttribute("width",e),t.setAttribute("height",e)):(t.setAttribute("width","10"),t.setAttribute("height","10")),t}function o(e){var t=i(),o=document.createElementNS(n,"circle");return o.setAttribute("cx","5"),o.setAttribute("cy","5"),o.setAttribute("r","5"),o.setAttribute("stroke","black"),o.setAttribute("stroke-width","2"),e?o.setAttribute("fill","black"):o.setAttribute("fill","none"),t.appendChild(o),t}var n="http://www.w3.org/2000/svg",r=function(){function e(){}return e.getInstance=function(){return this.theInstance||(this.theInstance=new e),this.theInstance},e.prototype.createFilterSvg=function(){var e=i(),t=document.createElementNS(n,"polygon");return t.setAttribute("points","0,0 4,4 4,10 6,10 6,4 10,0"),t.setAttribute("class","ag-header-icon"),e.appendChild(t),e},e.prototype.createColumnShowingSvg=function(){return o(!0)},e.prototype.createColumnHiddenSvg=function(){return o(!1)},e.prototype.createMenuSvg=function(){var e=document.createElementNS(n,"svg"),t="12";return e.setAttribute("width",t),e.setAttribute("height",t),["0","5","10"].forEach(function(i){var o=document.createElementNS(n,"rect");o.setAttribute("y",i),o.setAttribute("width",t),o.setAttribute("height","2"),o.setAttribute("class","ag-header-icon"),e.appendChild(o)}),e},e.prototype.createArrowUpSvg=function(){return t("0,10 5,0 10,10")},e.prototype.createArrowLeftSvg=function(){return t("10,0 0,5 10,10")},e.prototype.createArrowDownSvg=function(){return t("0,0 5,10 10,0")},e.prototype.createArrowRightSvg=function(){return t("0,0 10,5 0,10")},e.prototype.createSmallArrowDownSvg=function(){return t("0,0 3,6 6,0",6)},e.prototype.createArrowUpDownSvg=function(){var e=i(),t=document.createElementNS(n,"polygon");t.setAttribute("points","0,4 5,0 10,4"),e.appendChild(t);var o=document.createElementNS(n,"polygon");return o.setAttribute("points","0,6 5,10 10,6"),e.appendChild(o),e},e}();e.SvgFactory=r}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){function t(e,t,r){function s(e,t){function i(){u(r,s,t)}var r=h(!0),s=h(!1);e.appendChild(r),e.appendChild(s),r.addEventListener("click",i),s.addEventListener("click",i),e.addEventListener("dblclick",i),l(r,s,t.node.expanded),t.eGridCell&&t.eGridCell.addEventListener("keydown",function(e){o.isKeyPressed(e,n.KEY_ENTER)&&(i(),e.preventDefault())})}function l(e,t,i){o.setVisible(e,!i),o.setVisible(t,i)}function a(e,t,i){o.useRenderer(e,i,t)}function d(t){return e.isGroupIncludeFooter()?t.rowIndex:t.rowIndex+1}function u(e,t,i){i.node.expanded=!i.node.expanded;var o=d(i);i.api.onGroupExpandedOrCollapsed(o),l(e,t,i.node.expanded)}function h(t){var n;return n=t?o.createIcon("groupContracted",e,null,i.createArrowRightSvg):o.createIcon("groupExpanded",e,null,i.createArrowDownSvg),o.addCssClass(n,"ag-group-expand"),n}function p(e,t){var i,n=c(t);if(t.colDef&&t.colDef.cellRenderer&&t.colDef.cellRenderer.footerValueGetter){var s=t.colDef.cellRenderer.footerValueGetter,l=o.cloneObject(t);l.value=n,"function"==typeof s?i=s(l):"string"==typeof s?i=r.evaluate(s,l):console.warn("ag-Grid: footerValueGetter should be either a function or a string (expression)")}else i="Total "+n;var a=document.createTextNode(i);e.appendChild(a)}function c(e){var t=e.colDef.cellRenderer;if(t&&t.keyMap&&"object"==typeof t.keyMap&&null!==e.colDef.cellRenderer){var i=t.keyMap[e.node.key];return i?i:e.node.key}return e.node.key}function g(e,t){var i=c(t),n=t.api.getColumnDef(t.node.field);n&&"function"==typeof n.cellRenderer?(t.value=i,o.useRenderer(e,n.cellRenderer,t)):e.appendChild(document.createTextNode(i));var r=t.colDef.cellRenderer&&t.colDef.cellRenderer.suppressCount;!r&&t.node.allChildrenCount>=0&&e.appendChild(document.createTextNode(" ("+t.node.allChildrenCount+")"))}function f(e,t){if(t.value){var i=document.createTextNode(" "+t.value);e.appendChild(i)}}return function(e){var i=document.createElement("span"),o=e.node,n=o.group&&!o.footer;n&&s(i,e);var r=e.colDef&&e.colDef.cellRenderer&&e.colDef.cellRenderer.checkbox&&!o.footer;if(r){var l=t.createSelectionCheckbox(o,e.rowIndex);i.appendChild(l)}e.colDef&&e.colDef.cellRenderer&&e.colDef.cellRenderer.innerRenderer?a(i,e,e.colDef.cellRenderer.innerRenderer):o.footer?p(i,e):o.group?g(i,e):f(i,e);var d=e.colDef&&e.colDef.cellRenderer&&e.colDef.cellRenderer.suppressPadding;if(!d&&(o.footer||o.level>0)){var u;u=e.colDef&&e.colDef.cellRenderer&&e.colDef.cellRenderer.padding>=0?e.colDef.cellRenderer.padding:10;var h=o.level*u;o.footer?h+=10:o.group||(h+=5),i.style.paddingLeft=h+"px"}return i}}var i=e.SvgFactory.getInstance(),o=e.Utils,n=e.Constants;e.groupCellRendererFactory=t}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i=function(){function i(){this.renderedTopFloatingRows=[],this.renderedBottomFloatingRows=[]}return i.prototype.init=function(t,i,o,n,r,s,l,a,d,u,h,p){this.columnModel=t,this.gridOptionsWrapper=i,this.angularGrid=n,this.selectionRendererFactory=r,this.gridPanel=o,this.$compile=s,
this.$scope=l,this.selectionController=a,this.expressionService=d,this.templateService=u,this.valueService=h,this.findAllElements(o),this.eventService=p,this.cellRendererMap={group:e.groupCellRendererFactory(i,r,d),"default":function(e){return e.value}},this.renderedRows={}},i.prototype.setRowModel=function(e){this.rowModel=e},i.prototype.onIndividualColumnResized=function(e){var t=e.actualWidth+"px",i=".cell-col-"+e.index;this.eParentsOfRows.forEach(function(e){for(var o=e.querySelectorAll(i),n=0;n<o.length;n++){var r=o[n];r.style.width=t}})},i.prototype.setMainRowWidths=function(){var e=this.columnModel.getBodyContainerWidth()+"px";this.eAllBodyContainers.forEach(function(t){for(var i=t.querySelectorAll(".ag-row"),o=0;o<i.length;o++)i[o].style.width=e})},i.prototype.findAllElements=function(e){this.eBodyContainer=e.getBodyContainer(),this.ePinnedColsContainer=e.getPinnedColsContainer(),this.eFloatingTopContainer=e.getFloatingTopContainer(),this.eFloatingTopPinnedContainer=e.getPinnedFloatingTop(),this.eFloatingBottomContainer=e.getFloatingBottomContainer(),this.eFloatingBottomPinnedContainer=e.getPinnedFloatingBottom(),this.eBodyViewport=e.getBodyViewport(),this.eParentsOfRows=e.getRowsParent(),this.eAllBodyContainers=[this.eBodyContainer,this.eFloatingBottomContainer,this.eFloatingTopContainer],this.eAllPinnedContainers=[this.ePinnedColsContainer,this.eFloatingBottomPinnedContainer,this.eFloatingTopPinnedContainer]},i.prototype.refreshAllFloatingRows=function(){this.refreshFloatingRows(this.renderedTopFloatingRows,this.gridOptionsWrapper.getFloatingTopRowData(),this.eFloatingTopPinnedContainer,this.eFloatingTopContainer,!0),this.refreshFloatingRows(this.renderedBottomFloatingRows,this.gridOptionsWrapper.getFloatingBottomRowData(),this.eFloatingBottomPinnedContainer,this.eFloatingBottomContainer,!1)},i.prototype.refreshFloatingRows=function(t,i,o,n,r){var s=this;t.forEach(function(e){e.destroy()}),t.length=0;var l=this.columnModel.getDisplayedColumns();if(l&&0!=l.length){var a=this.columnModel.getBodyContainerWidth();i&&i.forEach(function(i,l){var d={data:i,floating:!0,floatingTop:r,floatingBottom:!r},u=new e.RenderedRow(s.gridOptionsWrapper,s.valueService,s.$scope,s.angularGrid,s.columnModel,s.expressionService,s.cellRendererMap,s.selectionRendererFactory,s.$compile,s.templateService,s.selectionController,s,n,o,d,l,s.eventService);u.setMainRowWidth(a),t.push(u)})}},i.prototype.refreshView=function(e){if(!this.gridOptionsWrapper.isForPrint()){var t=this.rowModel.getVirtualRowCount(),i=this.gridOptionsWrapper.getRowHeight()*t;this.eBodyContainer.style.height=i+"px",this.ePinnedColsContainer.style.height=i+"px"}this.refreshAllVirtualRows(e),this.refreshAllFloatingRows()},i.prototype.softRefreshView=function(){t.iterateObject(this.renderedRows,function(e,t){t.softRefresh()})},i.prototype.refreshRows=function(e){if(e&&0!=e.length){var i=[];t.iterateObject(this.renderedRows,function(t,o){var n=o.getRowNode();e.indexOf(n)>=0&&i.push(t)}),this.removeVirtualRow(i),this.drawVirtualRows()}},i.prototype.refreshCells=function(e,i){e&&0!=e.length&&t.iterateObject(this.renderedRows,function(t,o){var n=o.getRowNode();e.indexOf(n)>=0&&o.refreshCells(i)})},i.prototype.rowDataChanged=function(e){var t=[],i=this.renderedRows;Object.keys(i).forEach(function(o){var n=i[o];n.isDataInList(e)&&t.push(o)}),this.removeVirtualRow(t),this.drawVirtualRows()},i.prototype.refreshAllVirtualRows=function(e){var t=Object.keys(this.renderedRows);this.removeVirtualRow(t,e),this.drawVirtualRows()},i.prototype.refreshGroupRows=function(){var e=[],t=this;Object.keys(this.renderedRows).forEach(function(i){var o=t.renderedRows[i];o.isGroup()&&e.push(i)}),this.removeVirtualRow(e),this.ensureRowsRendered()},i.prototype.removeVirtualRow=function(e,t){var i=this,o="number"==typeof t?t:-1;e.forEach(function(e){e>=o&&(i.unbindVirtualRow(e),i.focusedCell&&i.focusedCell.rowIndex==e&&(i.focusedCell=null))})},i.prototype.unbindVirtualRow=function(t){var i=this.renderedRows[t];i.destroy();var o={node:i.getRowNode(),rowIndex:t};this.eventService.dispatchEvent(e.Events.EVENT_VIRTUAL_ROW_REMOVED,o),this.angularGrid.onVirtualRowRemoved(t),delete this.renderedRows[t]},i.prototype.drawVirtualRows=function(){var t,i,o=this.rowModel.getVirtualRowCount();if(this.gridOptionsWrapper.isForPrint())t=0,i=o;else{var n=this.eBodyViewport.scrollTop,r=n+this.eBodyViewport.offsetHeight;t=Math.floor(n/this.gridOptionsWrapper.getRowHeight()),i=Math.floor(r/this.gridOptionsWrapper.getRowHeight());var s=this.gridOptionsWrapper.getRowBuffer()||e.Constants.ROW_BUFFER_SIZE;t-=s,i+=s,0>t&&(t=0),i>o-1&&(i=o-1)}this.firstVirtualRenderedRow=t,this.lastVirtualRenderedRow=i,this.ensureRowsRendered()},i.prototype.getFirstVirtualRenderedRow=function(){return this.firstVirtualRenderedRow},i.prototype.getLastVirtualRenderedRow=function(){return this.lastVirtualRenderedRow},i.prototype.ensureRowsRendered=function(){for(var e=this.columnModel.getBodyContainerWidth(),t=this,i=Object.keys(this.renderedRows),o=this.firstVirtualRenderedRow;o<=this.lastVirtualRenderedRow;o++)if(i.indexOf(o.toString())>=0)i.splice(i.indexOf(o.toString()),1);else{var n=this.rowModel.getVirtualRow(o);n&&t.insertRow(n,o,e)}this.removeVirtualRow(i),this.gridOptionsWrapper.isAngularCompileRows()&&setTimeout(function(){t.$scope.$apply()},0)},i.prototype.insertRow=function(t,i,o){var n=this.columnModel.getDisplayedColumns();if(n&&0!=n.length){var r=new e.RenderedRow(this.gridOptionsWrapper,this.valueService,this.$scope,this.angularGrid,this.columnModel,this.expressionService,this.cellRendererMap,this.selectionRendererFactory,this.$compile,this.templateService,this.selectionController,this,this.eBodyContainer,this.ePinnedColsContainer,t,i,this.eventService);r.setMainRowWidth(o),this.renderedRows[i]=r}},i.prototype.getRenderedNodes=function(){var e=this.renderedRows;return Object.keys(e).map(function(t){return e[t].getRowNode()})},i.prototype.getIndexOfRenderedNode=function(e){for(var t=this.renderedRows,i=Object.keys(t),o=0;o<i.length;o++){var n=i[o];if(t[n].getRowNode()===e)return t[n].getRowIndex()}return-1},i.prototype.navigateToNextCell=function(e,t,i){for(var o,n,r={rowIndex:t,column:i};!n;){if(r=this.getNextCellToFocus(e,r),!r)return;o=this.renderedRows[r.rowIndex],n=o.getCellForCol(r.column)}this.gridPanel.ensureIndexVisible(o.getRowIndex()),this.focusCell(n,r.rowIndex,r.column.index,r.column.colDef,!0)},i.prototype.getNextCellToFocus=function(t,i){var o,n,r=i.rowIndex,s=i.column;switch(t){case e.Constants.KEY_UP:if(r===this.firstVirtualRenderedRow)return null;o=r-1,n=s;break;case e.Constants.KEY_DOWN:if(r===this.lastVirtualRenderedRow)return null;o=r+1,n=s;break;case e.Constants.KEY_RIGHT:var l=this.columnModel.getVisibleColAfter(s);if(!l)return null;o=r,n=l;break;case e.Constants.KEY_LEFT:var a=this.columnModel.getVisibleColBefore(s);if(!a)return null;o=r,n=a}return{rowIndex:o,column:n}},i.prototype.onRowSelected=function(e,t){this.renderedRows[e]&&this.renderedRows[e].onRowSelected(t)},i.prototype.focusCell=function(i,o,n,r,s){this.gridOptionsWrapper.isSuppressCellSelection()||(this.eParentsOfRows.forEach(function(e){t.querySelectorAll_replaceCssClass(e,".ag-cell-focus","ag-cell-focus","ag-cell-no-focus");var i='[row="'+o+'"] [col="'+n+'"]';t.querySelectorAll_replaceCssClass(e,i,"ag-cell-no-focus","ag-cell-focus")}),this.focusedCell={rowIndex:o,colIndex:n,node:this.rowModel.getVirtualRow(o),colDef:r},s&&i.focus(),this.eventService.dispatchEvent(e.Events.EVENT_CELL_FOCUSED,this.focusedCell))},i.prototype.getFocusedCell=function(){return this.focusedCell},i.prototype.setFocusedCell=function(e,t){var i=this.renderedRows[e],o=this.columnModel.getDisplayedColumns()[t];if(i&&o){var n=i.getCellForCol(o);this.focusCell(n,e,t,o.colDef,!0)}},i.prototype.startEditingNextCell=function(e,t,i){for(var o=this.firstVirtualRenderedRow,n=this.lastVirtualRenderedRow,r=e,s=this.columnModel.getDisplayedColumns(),l=t;;){var a=s.indexOf(l);if(i){if(l=s[a-1],l||(l=s[s.length-1],r--),o>r)return}else if(l=s[a+1],l||(l=s[0],r++),r>n)return;var d=this.renderedRows[r],u=d.getRenderedCellForColumn(l);if(u.isCellEditable())return u.startEditing(),void u.focusCell(!1)}},i}();e.RowRenderer=i}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i=0,o=1,n=2,r=3,s=function(){function s(){}return s.prototype.init=function(e,t,i,o,n,r){this.eParentsOfRows=t.getRowsParent(),this.angularGrid=e,this.gridOptionsWrapper=i,this.$scope=o,this.rowRenderer=n,this.eventService=r,this.initSelectedNodesById(),this.selectedRows=[]},s.prototype.initSelectedNodesById=function(){this.selectedNodesById={}},s.prototype.getSelectedNodesById=function(){return this.selectedNodesById},s.prototype.getSelectedRows=function(){return this.selectedRows},s.prototype.getSelectedNodes=function(){for(var e=[],t=Object.keys(this.selectedNodesById),i=0;i<t.length;i++){var o=t[i],n=this.selectedNodesById[o];e.push(n)}return e},s.prototype.getBestCostNodeSelection=function(){function e(t){for(var n=0,r=t.length;r>n;n++){var s=t[n];o.isNodeSelected(s)?i.push(s):s.group&&s.children&&e(s.children)}}if("function"!=typeof this.rowModel.getTopLevelNodes)throw"selectAll not available when rows are on the server";var t=this.rowModel.getTopLevelNodes(),i=[],o=this;return e(t),i},s.prototype.setRowModel=function(e){this.rowModel=e},s.prototype.deselectAll=function(){this.initSelectedNodesById(),this.syncSelectedRowsAndCallListener()},s.prototype.selectAll=function(){function e(o){if(o)for(var n=0;n<o.length;n++){var r=o[n];r.group?(e(r.children),i&&(t[r.id]=r)):t[r.id]=r}}if("function"!=typeof this.rowModel.getTopLevelNodes)throw"selectAll not available when rows are on the server";var t=this.selectedNodesById,i=!this.gridOptionsWrapper.isGroupSelectsChildren(),o=this.rowModel.getTopLevelNodes();e(o),this.syncSelectedRowsAndCallListener()},s.prototype.selectNode=function(e,t,i){var o,n=this.gridOptionsWrapper.isRowSelectionMulti()&&t;o=e.footer?e.sibling:e;var r=!1,s=!1;n||(r=this.doWorkOfDeselectAllNodes()),s=this.gridOptionsWrapper.isGroupSelectsChildren()&&o.group?this.recursivelySelectAllChildren(o):this.doWorkOfSelectNode(o,i),(r||s)&&this.syncSelectedRowsAndCallListener(i),this.updateGroupParentsIfNeeded()},s.prototype.recursivelySelectAllChildren=function(e,t){var i=!1;if(e.children)for(var o=0;o<e.children.length;o++){var n=e.children[o];n.group?this.recursivelySelectAllChildren(n)&&(i=!0):this.doWorkOfSelectNode(n,t)&&(i=!0)}return i},s.prototype.recursivelyDeselectAllChildren=function(e){if(e.children)for(var t=0;t<e.children.length;t++){var i=e.children[t];i.group?this.recursivelyDeselectAllChildren(i):this.deselectRealNode(i)}},s.prototype.doWorkOfSelectNode=function(t,i){if(this.selectedNodesById[t.id])return!1;if(this.selectedNodesById[t.id]=t,this.addCssClassForNode_andInformVirtualRowListener(t),t.group&&t.expanded&&t.sibling&&this.addCssClassForNode_andInformVirtualRowListener(t.sibling),!i){var o={node:t};this.eventService.dispatchEvent(e.Events.EVENT_ROW_SELECTED,o)}return!0},s.prototype.addCssClassForNode_andInformVirtualRowListener=function(e){var i=this.rowRenderer.getIndexOfRenderedNode(e);i>=0&&(this.eParentsOfRows.forEach(function(e){t.querySelectorAll_addCssClass(e,'[row="'+i+'"]',"ag-row-selected")}),this.angularGrid.onVirtualRowSelected(i,!0))},s.prototype.doWorkOfDeselectAllNodes=function(e){for(var t,i=Object.keys(this.selectedNodesById),o=0;o<i.length;o++){var n=i[o],r=this.selectedNodesById[n];r!==e&&(this.deselectRealNode(r),t=!0)}return t},s.prototype.deselectRealNode=function(e){this.removeCssClassForNode(e),e.group&&e.expanded&&e.sibling&&this.removeCssClassForNode(e.sibling),delete this.selectedNodesById[e.id]},s.prototype.removeCssClassForNode=function(e){var i=this.rowRenderer.getIndexOfRenderedNode(e);i>=0&&(this.eParentsOfRows.forEach(function(e){t.querySelectorAll_removeCssClass(e,'[row="'+i+'"]',"ag-row-selected")}),this.angularGrid.onVirtualRowSelected(i,!1))},s.prototype.deselectIndex=function(e){var t=this.rowModel.getVirtualRow(e);this.deselectNode(t)},s.prototype.deselectNode=function(e){e&&(this.gridOptionsWrapper.isGroupSelectsChildren()&&e.group?this.recursivelyDeselectAllChildren(e):this.deselectRealNode(e)),this.syncSelectedRowsAndCallListener(),this.updateGroupParentsIfNeeded()},s.prototype.selectIndex=function(e,t,i){var o=this.rowModel.getVirtualRow(e);this.selectNode(o,t,i)},s.prototype.syncSelectedRowsAndCallListener=function(t){var i=this.selectedRows,o=i.length;i.length=0;for(var n=Object.keys(this.selectedNodesById),r=0;r<n.length;r++)if(void 0!==this.selectedNodesById[n[r]]){var s=this.selectedNodesById[n[r]];i.push(s.data)}var l=0===o&&0===i.length;if(!l&&!t){var a={selectedNodesById:this.selectedNodesById,selectedRows:this.selectedRows};this.eventService.dispatchEvent(e.Events.EVENT_SELECTION_CHANGED,a)}var d=this;this.$scope&&setTimeout(function(){d.$scope.$apply()},0)},s.prototype.recursivelyCheckIfSelected=function(e){var t=!1,s=!1;if(e.children)for(var l=0;l<e.children.length;l++){var a,d=e.children[l];if(d.group)switch(a=this.recursivelyCheckIfSelected(d)){case i:t=!0;break;case o:s=!0;break;case n:t=!0,s=!0}else this.isNodeSelected(d)?t=!0:s=!0;if(t&&s)return n}return t?i:s?o:r},s.prototype.isNodeSelected=function(e){if(!this.gridOptionsWrapper.isGroupSelectsChildren()||!e.group)return void 0!==this.selectedNodesById[e.id];var t=this.recursivelyCheckIfSelected(e);switch(t){case i:return!0;case o:return!1;default:return void 0}},s.prototype.updateGroupParentsIfNeeded=function(){if(this.gridOptionsWrapper.isGroupSelectsChildren())for(var e=this.rowRenderer.getFirstVirtualRenderedRow(),i=this.rowRenderer.getLastVirtualRenderedRow(),o=e;i>=o;o++){var n=this.rowModel.getVirtualRow(o);if(n.group){var r=this.isNodeSelected(n);this.angularGrid.onVirtualRowSelected(o,r),this.eParentsOfRows.forEach(function(e){r?t.querySelectorAll_addCssClass(e,'[row="'+o+'"]',"ag-row-selected"):t.querySelectorAll_removeCssClass(e,'[row="'+o+'"]',"ag-row-selected")})}}},s}();e.SelectionController=s}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i=function(){function e(e){this.eRoot=e}return e.prototype.getERoot=function(){return this.eRoot},e.prototype.destroy=function(){},e.prototype.refreshFilterIcon=function(){},e.prototype.refreshSortIcon=function(){},e.prototype.onDragStart=function(){},e.prototype.onDragging=function(e){},e.prototype.onIndividualColumnResized=function(e){},e.prototype.addDragHandler=function(e){var t=this;e.addEventListener("mousedown",function(e){t.onDragStart(),t.eRoot.style.cursor="col-resize",t.dragStartX=e.clientX;var i={};i.mousemove=function(e){var i=e.clientX,o=i-t.dragStartX;t.onDragging(o)},i.mouseup=function(){t.stopDragging(i)},i.mouseleave=function(){t.stopDragging(i)},t.eRoot.addEventListener("mousemove",i.mousemove),t.eRoot.addEventListener("mouseup",i.mouseup),t.eRoot.addEventListener("mouseleave",i.mouseleave)})},e.prototype.stopDragging=function(e){this.eRoot.style.cursor="";var i=this;t.iterateObject(e,function(e,t){i.eRoot.removeEventListener(e,t)})},e}();e.RenderedHeaderElement=i}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i=e.Constants,o=e.SvgFactory.getInstance(),n=function(e){function n(t,i,o,n,r,s,l,a,d){e.call(this,d),this.column=t,this.parentGroup=i,this.gridOptionsWrapper=o,this.parentScope=n,this.filterManager=r,this.columnController=s,this.$compile=l,this.angularGrid=a,this.setupComponents()}return __extends(n,e),n.prototype.getGui=function(){return this.eHeaderCell},n.prototype.destroy=function(){this.childScope&&this.childScope.$destroy()},n.prototype.createScope=function(){this.gridOptionsWrapper.isAngularCompileHeaders()&&(this.childScope=this.parentScope.$new(),this.childScope.colDef=this.column.colDef,this.childScope.colIndex=this.column.index,this.childScope.colDefWrapper=this.column)},n.prototype.addAttributes=function(){this.eHeaderCell.setAttribute("col",void 0!==this.column.index&&null!==this.column.index?this.column.index.toString():""),this.eHeaderCell.setAttribute("colId",this.column.colId)},n.prototype.addClasses=function(){t.addCssClass(this.eHeaderCell,"ag-header-cell"),this.gridOptionsWrapper.isGroupHeaders()?t.addCssClass(this.eHeaderCell,"ag-header-cell-grouped"):t.addCssClass(this.eHeaderCell,"ag-header-cell-not-grouped")},n.prototype.addMenu=function(){var e=this.gridOptionsWrapper.isEnableFilter()&&!this.column.colDef.suppressMenu;if(e){var i=t.createIcon("menu",this.gridOptionsWrapper,this.column,o.createMenuSvg);t.addCssClass(i,"ag-header-icon"),i.setAttribute("class","ag-header-cell-menu-button");var n=this;i.onclick=function(){n.filterManager.showFilter(n.column,this)},this.eHeaderCell.appendChild(i),this.gridOptionsWrapper.isSuppressMenuHide()||(i.style.opacity="0",this.eHeaderCell.onmouseenter=function(){i.style.opacity="1"},this.eHeaderCell.onmouseleave=function(){i.style.opacity="0"}),i.style.transition="opacity 0.5s, border 0.2s";var r=i.style;r["-webkit-transition"]="opacity 0.5s, border 0.2s"}},n.prototype.addSortIcons=function(e){var i=this.gridOptionsWrapper.isEnableSorting()&&!this.column.colDef.suppressSorting;i&&(this.eSortAsc=t.createIcon("sortAscending",this.gridOptionsWrapper,this.column,o.createArrowUpSvg),this.eSortDesc=t.createIcon("sortDescending",this.gridOptionsWrapper,this.column,o.createArrowDownSvg),t.addCssClass(this.eSortAsc,"ag-header-icon ag-sort-ascending-icon"),t.addCssClass(this.eSortDesc,"ag-header-icon ag-sort-descending-icon"),e.appendChild(this.eSortAsc),e.appendChild(this.eSortDesc),(this.column.colDef.unSortIcon||this.gridOptionsWrapper.isUnSortIcon())&&(this.eSortNone=t.createIcon("sortUnSort",this.gridOptionsWrapper,this.column,o.createArrowUpDownSvg),t.addCssClass(this.eSortNone,"ag-header-icon ag-sort-none-icon"),e.appendChild(this.eSortNone)),this.eSortAsc.style.display="none",this.eSortDesc.style.display="none",this.addSortHandling(e))},n.prototype.setupComponents=function(){if(this.eHeaderCell=document.createElement("div"),this.createScope(),this.addClasses(),this.addAttributes(),this.addHeaderClassesFromCollDef(),this.column.colDef.headerTooltip&&(this.eHeaderCell.title=this.column.colDef.headerTooltip),this.gridOptionsWrapper.isEnableColResize()&&!this.column.colDef.suppressResize){var e=document.createElement("div");e.className="ag-header-cell-resize",this.eHeaderCell.appendChild(e),this.addDragHandler(e)}this.addMenu();var i=document.createElement("div");i.className="ag-header-cell-label",this.addSortIcons(i),this.eFilterIcon=t.createIcon("filter",this.gridOptionsWrapper,this.column,o.createFilterSvg),t.addCssClass(this.eFilterIcon,"ag-header-icon"),i.appendChild(this.eFilterIcon);var n;this.column.colDef.headerCellRenderer?n=this.column.colDef.headerCellRenderer:this.gridOptionsWrapper.getHeaderCellRenderer()&&(n=this.gridOptionsWrapper.getHeaderCellRenderer());var r=this.columnController.getDisplayNameForCol(this.column);if(n)this.useRenderer(r,n,i);else{var s=document.createElement("span");s.className="ag-header-cell-text",s.innerHTML=r,i.appendChild(s)}this.eHeaderCell.appendChild(i),this.eHeaderCell.style.width=t.formatWidth(this.column.actualWidth),this.refreshFilterIcon(),this.refreshSortIcon()},n.prototype.useRenderer=function(e,i,o){var n,r={colDef:this.column.colDef,$scope:this.childScope,context:this.gridOptionsWrapper.getContext(),value:e,api:this.gridOptionsWrapper.getApi(),eHeaderCell:this.eHeaderCell},s=i(r);if(t.isNodeOrElement(s))n=s;else{var l=document.createElement("span");l.innerHTML=s,n=l}if(this.gridOptionsWrapper.isAngularCompileHeaders()){var a=this.$compile(n)(this.childScope)[0];o.appendChild(a)}else o.appendChild(n)},n.prototype.refreshFilterIcon=function(){if(this.eFilterIcon){var e=this.filterManager.isFilterPresentForCol(this.column.colId),t=e?"inline":"none";this.eFilterIcon.style.display=t}},n.prototype.refreshSortIcon=function(){var e=this.column.sort===i.ASC,o=this.column.sort===i.DESC,n=this.column.sort!==i.DESC&&this.column.sort!==i.ASC;this.eSortAsc&&t.setVisible(this.eSortAsc,e),this.eSortDesc&&t.setVisible(this.eSortDesc,o),this.eSortNone&&t.setVisible(this.eSortNone,n)},n.prototype.getNextSortDirection=function(){var e;if(e=this.column.colDef.sortingOrder?this.column.colDef.sortingOrder:this.gridOptionsWrapper.getSortingOrder()?this.gridOptionsWrapper.getSortingOrder():n.DEFAULT_SORTING_ORDER,!Array.isArray(e)||e.length<=0)return void console.warn("ag-grid: sortingOrder must be an array with at least one element, currently it's "+e);var t,i=e.indexOf(this.column.sort),o=0>i,r=i==e.length-1;return t=o||r?e[0]:e[i+1],n.DEFAULT_SORTING_ORDER.indexOf(t)<0?(console.warn("ag-grid: invalid sort type "+t),null):t},n.prototype.addSortHandling=function(e){var t=this;e.addEventListener("click",function(e){t.column.sort=t.getNextSortDirection(),t.column.sortedAt=t.column.sort?(new Date).valueOf():null;var i=!t.gridOptionsWrapper.isSuppressMultiSort()&&e.shiftKey;i||t.columnController.getAllColumns().forEach(function(e){e!==t.column&&(e.sort=null)}),t.angularGrid.onSortingChanged()})},n.prototype.onDragStart=function(){this.startWidth=this.column.actualWidth},n.prototype.onDragging=function(e){var t=this.startWidth+e;this.columnController.setColumnWidth(this.column,t)},n.prototype.onIndividualColumnResized=function(e){if(this.column===e){var t=e.actualWidth+"px";this.eHeaderCell.style.width=t}},n.prototype.addHeaderClassesFromCollDef=function(){if(this.column.colDef.headerClass){var e;if("function"==typeof this.column.colDef.headerClass){var i={colDef:this.column.colDef,$scope:this.childScope,context:this.gridOptionsWrapper.getContext(),api:this.gridOptionsWrapper.getApi()},o=this.column.colDef.headerClass;e=o(i)}else e=this.column.colDef.headerClass;"string"==typeof e?t.addCssClass(this.eHeaderCell,e):Array.isArray(e)&&e.forEach(function(e){t.addCssClass(this.eHeaderCell,e)})}},n.DEFAULT_SORTING_ORDER=[i.ASC,i.DESC,null],n}(e.RenderedHeaderElement);e.RenderedHeaderCell=n}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i=e.Constants,o=e.SvgFactory.getInstance(),n=function(n){function r(e,t,i,o,r,s,l,a){n.call(this,o),this.children=[],this.columnController=i,this.columnGroup=e,this.gridOptionsWrapper=t,this.parentScope=s,this.filterManager=l,this.$compile=a,this.angularGrid=r,this.setupComponents()}return __extends(r,n),r.prototype.getGui=function(){return this.eHeaderGroup},r.prototype.destroy=function(){this.children.forEach(function(e){e.destroy()})},r.prototype.refreshFilterIcon=function(){this.children.forEach(function(e){e.refreshFilterIcon()})},r.prototype.refreshSortIcon=function(){this.children.forEach(function(e){e.refreshSortIcon()})},r.prototype.onIndividualColumnResized=function(e){this.isColumnInOurDisplayedGroup(e)&&(this.children.forEach(function(t){t.onIndividualColumnResized(e)}),this.setWidthOfGroupHeaderCell())},r.prototype.setupComponents=function(){var t=this;this.eHeaderGroup=document.createElement("div"),this.eHeaderGroup.className="ag-header-group",this.eHeaderGroupCell=document.createElement("div");var i=["ag-header-group-cell"];i.push(this.columnGroup.name?"ag-header-group-cell-with-group":"ag-header-group-cell-no-group"),this.eHeaderGroupCell.className=i.join(" "),this.gridOptionsWrapper.isEnableColResize()&&(this.eHeaderCellResize=document.createElement("div"),this.eHeaderCellResize.className="ag-header-cell-resize",this.eHeaderGroupCell.appendChild(this.eHeaderCellResize),this.addDragHandler(this.eHeaderCellResize));var o=this.columnGroup.name;if(o&&""!==o){var n=document.createElement("div");n.className="ag-header-group-cell-label",this.eHeaderGroupCell.appendChild(n);var r=document.createElement("span");r.className="ag-header-group-text",r.innerHTML=o,n.appendChild(r),this.columnGroup.expandable&&this.addGroupExpandIcon(n)}this.eHeaderGroup.appendChild(this.eHeaderGroupCell),this.columnGroup.displayedColumns.forEach(function(i){var o=new e.RenderedHeaderCell(i,t,t.gridOptionsWrapper,t.parentScope,t.filterManager,t.columnController,t.$compile,t.angularGrid,t.getERoot());t.children.push(o),t.eHeaderGroup.appendChild(o.getGui())}),this.setWidthOfGroupHeaderCell()},r.prototype.isColumnInOurDisplayedGroup=function(e){return this.columnGroup.displayedColumns.indexOf(e)>=0},r.prototype.setWidthOfGroupHeaderCell=function(){this.eHeaderGroupCell.style.width=t.formatWidth(this.columnGroup.actualWidth)},r.prototype.addGroupExpandIcon=function(e){var i;i=this.columnGroup.expanded?t.createIcon("headerGroupOpened",this.gridOptionsWrapper,null,o.createArrowLeftSvg):t.createIcon("headerGroupClosed",this.gridOptionsWrapper,null,o.createArrowRightSvg),i.className="ag-header-expand-icon",e.appendChild(i);var n=this;i.onclick=function(){var e=!n.columnGroup.expanded;n.columnController.columnGroupOpened(n.columnGroup,e)}},r.prototype.onDragStart=function(){var e=this;this.groupWidthStart=this.columnGroup.actualWidth,this.childrenWidthStarts=[],this.columnGroup.displayedColumns.forEach(function(t){e.childrenWidthStarts.push(t.actualWidth)}),this.minWidth=this.columnGroup.getMinimumWidth()},r.prototype.onDragging=function(e){var t=this,o=this.groupWidthStart+e;o<this.minWidth&&(o=this.minWidth);var n=o/this.groupWidthStart,r=o,s=this.columnGroup.displayedColumns;s.forEach(function(e,o){var l,a=o!==s.length-1;if(a){var d=t.childrenWidthStarts[o];l=d*n,l<i.MIN_COL_WIDTH&&(l=i.MIN_COL_WIDTH),r-=l}else l=r;t.columnController.setColumnWidth(e,l)})},r}(e.RenderedHeaderElement);e.RenderedHeaderGroupCell=n}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i=function(){function i(){this.headerElements=[]}return i.prototype.init=function(e,t,i,o,n,r,s){this.gridOptionsWrapper=e,this.columnController=t,this.angularGrid=o,this.filterManager=n,this.$scope=r,this.$compile=s,this.findAllElements(i)},i.prototype.findAllElements=function(e){this.ePinnedHeader=e.getPinnedHeader(),this.eHeaderContainer=e.getHeaderContainer(),this.eRoot=e.getRoot()},i.prototype.refreshHeader=function(){t.removeAllChildren(this.ePinnedHeader),t.removeAllChildren(this.eHeaderContainer),this.headerElements.forEach(function(e){e.destroy()}),this.headerElements=[],this.gridOptionsWrapper.isGroupHeaders()?this.insertHeadersWithGrouping():this.insertHeadersWithoutGrouping()},i.prototype.insertHeadersWithGrouping=function(){var t=this,i=this.columnController.getHeaderGroups();i.forEach(function(i){var o=new e.RenderedHeaderGroupCell(i,t.gridOptionsWrapper,t.columnController,t.eRoot,t.angularGrid,t.$scope,t.filterManager,t.$compile);t.headerElements.push(o);var n=i.pinned?t.ePinnedHeader:t.eHeaderContainer;n.appendChild(o.getGui())})},i.prototype.insertHeadersWithoutGrouping=function(){var t=this;this.columnController.getDisplayedColumns().forEach(function(i){var o=new e.RenderedHeaderCell(i,null,t.gridOptionsWrapper,t.$scope,t.filterManager,t.columnController,t.$compile,t.angularGrid,t.eRoot);t.headerElements.push(o);var n=i.pinned?t.ePinnedHeader:t.eHeaderContainer;n.appendChild(o.getGui())})},i.prototype.updateSortIcons=function(){this.headerElements.forEach(function(e){e.refreshSortIcon()})},i.prototype.updateFilterIcons=function(){this.headerElements.forEach(function(e){e.refreshFilterIcon()})},i.prototype.onIndividualColumnResized=function(e){this.headerElements.forEach(function(t){t.onIndividualColumnResized(e)})},i}();e.HeaderRenderer=i}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=function(){function e(){}return e.prototype.init=function(e){this.valueService=e},e.prototype.group=function(e,t,i){var o={level:-1,children:[],_childrenMap:{}},n=[];n.push(o);var r,s,l,a,d,u,h,p=t.length-1,c=-1;for(r=0;r<e.length;r++)for(l=e[r],a=l.data,l.level=p+1,s=0;s<t.length;s++){var g=t[s];u=this.valueService.getValue(g.colDef,a,l),0===s&&(d=o),h=d._childrenMap[u],h||(h={group:!0,field:g.colId,id:c--,key:u,expanded:this.isExpanded(i,s),children:[],parent:d===o?null:d,allChildrenCount:0,level:d.level+1,_childrenMap:{}},d._childrenMap[u]=h,d.children.push(h),n.push(h)),h.allChildrenCount++,s==p?(l.parent=h===o?null:h,h.children.push(l)):d=h}for(r=0;r<n.length;r++)delete n[r]._childrenMap;return o.children},e.prototype.isExpanded=function(e,t){return"number"==typeof e?e>t:e===!0||"true"===e},e}();e.GroupCreator=t}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i=e.Constants,o=function(){function o(){this.createModel()}return o.prototype.init=function(e,t,i,o,n,r,s,l){this.gridOptionsWrapper=e,this.columnController=t,this.angularGrid=i,this.filterManager=o,this.$scope=n,this.groupCreator=r,this.valueService=s,this.eventService=l,this.allRows=null,this.rowsAfterGroup=null,this.rowsAfterFilter=null,this.rowsAfterSort=null,this.rowsAfterMap=null},o.prototype.createModel=function(){var e=this;this.model={getTopLevelNodes:function(){return e.rowsAfterGroup},getVirtualRow:function(t){return e.rowsAfterMap[t]},getVirtualRowCount:function(){return e.rowsAfterMap?e.rowsAfterMap.length:0},forEachInMemory:function(t){e.forEachInMemory(t)},forEachNode:function(t){e.forEachNode(t)},forEachNodeAfterFilter:function(t){e.forEachNodeAfterFilter(t)},forEachNodeAfterFilterAndSort:function(t){e.forEachNodeAfterFilterAndSort(t)}}},o.prototype.getModel=function(){return this.model},o.prototype.forEachInMemory=function(e){console.warn("ag-Grid: please use forEachNode instead of forEachInMemory, method is same, I just renamed it, forEachInMemory is deprecated"),this.forEachNode(e)},o.prototype.forEachNode=function(e){this.recursivelyWalkNodesAndCallback(this.rowsAfterGroup,e)},o.prototype.forEachNodeAfterFilter=function(e){this.recursivelyWalkNodesAndCallback(this.rowsAfterFilter,e)},o.prototype.forEachNodeAfterFilterAndSort=function(e){this.recursivelyWalkNodesAndCallback(this.rowsAfterSort,e)},o.prototype.recursivelyWalkNodesAndCallback=function(e,t){if(e)for(var i=0;i<e.length;i++){var o=e[i];t(o),o.group&&o.children&&this.recursivelyWalkNodesAndCallback(o.children,t)}},o.prototype.updateModel=function(t){var o=this;switch(t){case i.STEP_EVERYTHING:case i.STEP_FILTER:this.doFilter(),this.doAggregate();case i.STEP_SORT:this.doSort();case i.STEP_MAP:this.doGroupMapping()}this.eventService.dispatchEvent(e.Events.EVENT_MODEL_UPDATED),this.$scope&&setTimeout(function(){o.$scope.$apply()},0)},o.prototype.defaultGroupAggFunctionFactory=function(e,t){function o(e,t,o){for(var n=null,r=0;r<e.length;r++){var s=e[r],l=s.data[o];if("number"==typeof l)switch(t){case i.SUM:n+=l;break;case i.MIN:null===n?n=l:n>l&&(n=l);break;case i.MAX:null===n?n=l:l>n&&(n=l)}}return n}return function(n){var r={};if(t)for(var s=0;s<t.length;s++){var l=t[s];r[l]=o(n,i.SUM,l)}if(e)for(var a=0;a<e.length;a++){var d=e[a],u=d.colDef.field;r[u]=o(n,d.aggFunc,u)}return r}},o.prototype.doAggregate=function(){var e=this.gridOptionsWrapper.getGroupAggFunction();if("function"==typeof e)return void this.recursivelyCreateAggData(this.rowsAfterFilter,e,0);var t=this.columnController.getValueColumns(),i=this.gridOptionsWrapper.getGroupAggFields();if(t&&t.length>0||i&&i.length>0){var o=this.defaultGroupAggFunctionFactory(t,i);this.recursivelyCreateAggData(this.rowsAfterFilter,o,0)}else this.gridOptionsWrapper.isRowsAlreadyGrouped()||this.recursivelyClearAggData(this.rowsAfterFilter)},o.prototype.expandOrCollapseAll=function(e,t){var i=this;null===t&&(t=this.rowsAfterGroup),t&&t.forEach(function(t){t.group&&(t.expanded=e,i.expandOrCollapseAll(e,t.children))})},o.prototype.recursivelyClearAggData=function(e){for(var t=0,i=e.length;i>t;t++){var o=e[t];o.group&&(this.recursivelyClearAggData(o.childrenAfterFilter),o.data=null)}},o.prototype.recursivelyCreateAggData=function(e,t,i){for(var o=0,n=e.length;n>o;o++){var r=e[o];if(r.group){this.recursivelyCreateAggData(r.childrenAfterFilter,t,i++);var s=t(r.childrenAfterFilter,i);r.data=s,r.sibling&&(r.sibling.data=s)}}},o.prototype.doSort=function(){var e;if(this.gridOptionsWrapper.isEnableServerSideSorting())e=!1;
else{var t=[];this.columnController.getAllColumns().forEach(function(e){if(e.sort){var o=e.sort===i.ASC;t.push({inverter:o?1:-1,sortedAt:e.sortedAt,column:e})}}),t.length>0&&(e=!0)}var o=this.rowsAfterFilter?this.rowsAfterFilter.slice(0):null;e?(t.sort(function(e,t){return e.sortedAt-t.sortedAt}),this.sortList(o,t)):this.recursivelyResetSort(o),this.rowsAfterSort=o},o.prototype.recursivelyResetSort=function(e){if(e){for(var t=0,i=e.length;i>t;t++){var o=e[t];o.group&&o.children&&(o.childrenAfterSort=o.childrenAfterFilter,this.recursivelyResetSort(o.children))}this.updateChildIndexes(e)}},o.prototype.sortList=function(e,i){function o(e,i,o,n){var r=l.valueService.getValue(o.colDef,e.data,e),s=l.valueService.getValue(o.colDef,i.data,i);return o.colDef.comparator?o.colDef.comparator(r,s,e,i,n):t.defaultComparator(r,s)}for(var n=0,r=e.length;r>n;n++){var s=e[n];s.group&&s.children&&(s.childrenAfterSort=s.childrenAfterFilter.slice(0),this.sortList(s.childrenAfterSort,i))}var l=this;e.sort(function(e,t){for(var n=0,r=i.length;r>n;n++){var s=i[n],l=o(e,t,s.column,-1===s.inverter);if(0!==l)return l*s.inverter}return 0}),this.updateChildIndexes(e)},o.prototype.updateChildIndexes=function(e){for(var t=0;t<e.length;t++){var i=e[t];i.firstChild=0===t,i.lastChild=t===e.length-1,i.childIndex=t}},o.prototype.onPivotChanged=function(){this.doPivoting(),this.updateModel(i.STEP_EVERYTHING)},o.prototype.doPivoting=function(){var e,t=this.columnController.getPivotedColumns(),i=this.gridOptionsWrapper.isRowsAlreadyGrouped(),o=!i&&t.length>0;if(o){var n=this.gridOptionsWrapper.isGroupSuppressRow()||this.gridOptionsWrapper.getGroupDefaultExpanded();e=this.groupCreator.group(this.allRows,t,n)}else e=this.allRows;this.rowsAfterGroup=e},o.prototype.doFilter=function(){var e;e=this.gridOptionsWrapper.isEnableServerSideFilter()?!1:this.filterManager.isAnyFilterPresent();var t;e?t=this.filterItems(this.rowsAfterGroup):(t=this.rowsAfterGroup,this.recursivelyResetFilter(this.rowsAfterGroup)),this.rowsAfterFilter=t},o.prototype.filterItems=function(e){for(var t=[],i=0,o=e.length;o>i;i++){var n=e[i];n.group?(n.childrenAfterFilter=this.filterItems(n.children),n.childrenAfterFilter.length>0&&(n.allChildrenCount=this.getTotalChildCount(n.childrenAfterFilter),t.push(n))):this.filterManager.doesRowPassFilter(n)&&t.push(n)}return t},o.prototype.recursivelyResetFilter=function(e){if(e)for(var t=0,i=e.length;i>t;t++){var o=e[t];o.group&&o.children&&(o.childrenAfterFilter=o.children,this.recursivelyResetFilter(o.children),o.allChildrenCount=this.getTotalChildCount(o.childrenAfterFilter))}},o.prototype.setAllRows=function(e,t){var i;if(this.gridOptionsWrapper.isRowsAlreadyGrouped())i=e,this.recursivelyCheckUserProvidedNodes(i,null,0);else{var i=[];if(e)for(var o=0;o<e.length;o++){var n={};n.data=e[o],i.push(n)}}var r=t?t:0;this.recursivelyAddIdToNodes(i,r),this.allRows=i,this.columnController.isSetupComplete()&&this.doPivoting()},o.prototype.recursivelyAddIdToNodes=function(e,t){if(e){for(var i=0;i<e.length;i++){var o=e[i];o.id=t++,o.group&&o.children&&(t=this.recursivelyAddIdToNodes(o.children,t))}return t}},o.prototype.recursivelyCheckUserProvidedNodes=function(e,t,i){if(e)for(var o=0;o<e.length;o++){var n=e[o];t&&(n.parent=t),n.level=i,n.group&&n.children&&this.recursivelyCheckUserProvidedNodes(n.children,n,i+1)}},o.prototype.getTotalChildCount=function(e){for(var t=0,i=0,o=e.length;o>i;i++){var n=e[i];n.group?t+=n.allChildrenCount:t++}return t},o.prototype.doGroupMapping=function(){var e=[];this.addToMap(e,this.rowsAfterSort),this.rowsAfterMap=e},o.prototype.addToMap=function(e,t){if(t)for(var i=this.gridOptionsWrapper.isGroupSuppressRow(),o=0;o<t.length;o++){var n=t[o];if((!i||i&&!n.group)&&e.push(n),n.group&&n.expanded&&(this.addToMap(e,n.childrenAfterSort),this.gridOptionsWrapper.isGroupIncludeFooter())){var r=this.createFooterNode(n);e.push(r)}}},o.prototype.createFooterNode=function(e){var t={};return Object.keys(e).forEach(function(i){t[i]=e[i]}),t.footer=!0,t.sibling=e,e.sibling=t,t},o}();e.InMemoryRowController=o}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i=!1,o=function(){function e(){}return e.prototype.init=function(e,t,i){this.rowRenderer=e,this.datasourceVersion=0,this.gridOptionsWrapper=t,this.angularGrid=i},e.prototype.setDatasource=function(e){this.datasource=e,e&&this.reset()},e.prototype.reset=function(){"number"==typeof this.datasource.rowCount&&this.datasource.rowCount>=0?(this.virtualRowCount=this.datasource.rowCount,this.foundMaxRow=!0):(this.virtualRowCount=0,this.foundMaxRow=!1),this.datasourceVersion++,this.pageCache={},this.pageCacheSize=0,this.pageLoadsInProgress=[],this.pageLoadsQueued=[],this.pageAccessTimes={},this.accessTime=0,this.maxConcurrentDatasourceRequests="number"==typeof this.datasource.maxConcurrentRequests&&this.datasource.maxConcurrentRequests>0?this.datasource.maxConcurrentRequests:2,this.maxPagesInCache="number"==typeof this.datasource.maxPagesInCache&&this.datasource.maxPagesInCache>0?this.datasource.maxPagesInCache:null,this.pageSize=this.datasource.pageSize,this.overflowSize=this.datasource.overflowSize,this.doLoadOrQueue(0)},e.prototype.createNodesFromRows=function(e,t){var i=[];if(t)for(var o=0,n=t.length;n>o;o++){var r=e*this.pageSize+o;i.push({data:t[o],id:r})}return i},e.prototype.removeFromLoading=function(e){var t=this.pageLoadsInProgress.indexOf(e);this.pageLoadsInProgress.splice(t,1)},e.prototype.pageLoadFailed=function(e){this.removeFromLoading(e),this.checkQueueForNextLoad()},e.prototype.pageLoaded=function(e,t,i){this.putPageIntoCacheAndPurge(e,t),this.checkMaxRowAndInformRowRenderer(e,i),this.removeFromLoading(e),this.checkQueueForNextLoad()},e.prototype.putPageIntoCacheAndPurge=function(e,t){this.pageCache[e]=this.createNodesFromRows(e,t),this.pageCacheSize++,i&&console.log("adding page "+e);var o=this.maxPagesInCache&&this.maxPagesInCache<this.pageCacheSize;if(o){var n=this.findLeastRecentlyAccessedPage(Object.keys(this.pageCache));i&&console.log("purging page "+n+" from cache "+Object.keys(this.pageCache)),delete this.pageCache[n],this.pageCacheSize--}},e.prototype.checkMaxRowAndInformRowRenderer=function(e,t){if(this.foundMaxRow)this.rowRenderer.refreshAllVirtualRows();else{if("number"==typeof t&&t>=0)this.virtualRowCount=t,this.foundMaxRow=!0;else{var i=(e+1)*this.pageSize+this.overflowSize;this.virtualRowCount<i&&(this.virtualRowCount=i)}this.rowRenderer.refreshView()}},e.prototype.isPageAlreadyLoading=function(e){var t=this.pageLoadsInProgress.indexOf(e)>=0||this.pageLoadsQueued.indexOf(e)>=0;return t},e.prototype.doLoadOrQueue=function(e){this.isPageAlreadyLoading(e)||(this.pageLoadsInProgress.length<this.maxConcurrentDatasourceRequests?this.loadPage(e):this.addToQueueAndPurgeQueue(e))},e.prototype.addToQueueAndPurgeQueue=function(e){i&&console.log("queueing "+e+" - "+this.pageLoadsQueued),this.pageLoadsQueued.push(e);var t=this.maxPagesInCache&&this.maxPagesInCache<this.pageLoadsQueued.length;if(t){var o=this.findLeastRecentlyAccessedPage(this.pageLoadsQueued);i&&console.log("de-queueing "+e+" - "+this.pageLoadsQueued);var n=this.pageLoadsQueued.indexOf(o);this.pageLoadsQueued.splice(n,1)}},e.prototype.findLeastRecentlyAccessedPage=function(e){var t=-1,i=Number.MAX_VALUE,o=this;return e.forEach(function(e){var n=o.pageAccessTimes[e];i>n&&(i=n,t=e)}),t},e.prototype.checkQueueForNextLoad=function(){if(this.pageLoadsQueued.length>0){var e=this.pageLoadsQueued[0];this.pageLoadsQueued.splice(0,1),i&&console.log("dequeueing "+e+" - "+this.pageLoadsQueued),this.loadPage(e)}},e.prototype.loadPage=function(e){function i(t,i){l.requestIsDaemon(a)||l.pageLoaded(e,t,i)}function o(){l.requestIsDaemon(a)||l.pageLoadFailed(e)}this.pageLoadsInProgress.push(e);var n,r=e*this.pageSize,s=(e+1)*this.pageSize,l=this,a=this.datasourceVersion;this.gridOptionsWrapper.isEnableServerSideSorting()&&(n=this.angularGrid.getSortModel());var d;this.gridOptionsWrapper.isEnableServerSideFilter()&&(d=this.angularGrid.getFilterModel());var u={startRow:r,endRow:s,successCallback:i,failCallback:o,sortModel:n,filterModel:d},h=t.getFunctionParameters(this.datasource.getRows);h.length>1&&(console.warn("ag-grid: It looks like your paging datasource is of the old type, taking more than one parameter."),console.warn("ag-grid: From ag-grid 1.9.0, now the getRows takes one parameter. See the documentation for details.")),this.datasource.getRows(u)},e.prototype.requestIsDaemon=function(e){return this.datasourceVersion!==e},e.prototype.getVirtualRow=function(e){if(e>this.virtualRowCount)return null;var t=Math.floor(e/this.pageSize),i=this.pageCache[t];if(this.pageAccessTimes[t]=this.accessTime++,i){var o=e%this.pageSize;return i[o]}return this.doLoadOrQueue(t),{data:{},id:e}},e.prototype.forEachNode=function(e){for(var t=Object.keys(this.pageCache),i=0;i<t.length;i++)for(var o=t[i],n=this.pageCache[o],r=0;r<n.length;r++){var s=n[r];e(s)}},e.prototype.getModel=function(){var e=this;return{getVirtualRow:function(t){return e.getVirtualRow(t)},getVirtualRowCount:function(){return e.virtualRowCount},forEachInMemory:function(t){e.forEachNode(t)},forEachNode:function(t){e.forEachNode(t)},forEachNodeAfterFilter:function(e){console.warn("forEachNodeAfterFilter - does not work with virtual pagination")},forEachNodeAfterFilterAndSort:function(e){console.warn("forEachNodeAfterFilterAndSort - does not work with virtual pagination")}}},e}();e.VirtualPageRowController=o}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i='<div class="ag-paging-panel"><span id="pageRowSummaryPanel" class="ag-paging-row-summary-panel"><span id="firstRowOnPage"></span> [TO] <span id="lastRowOnPage"></span> [OF] <span id="recordCount"></span></span><span class="ag-paging-page-summary-panel"><button class="ag-paging-button" id="btFirst">[FIRST]</button><button class="ag-paging-button" id="btPrevious">[PREVIOUS]</button>[PAGE] <span id="current"></span> [OF] <span id="total"></span><button class="ag-paging-button" id="btNext">[NEXT]</button><button class="ag-paging-button" id="btLast">[LAST]</button></span></div>',o=function(){function e(){}return e.prototype.init=function(e,t){this.gridOptionsWrapper=t,this.angularGrid=e,this.setupComponents(),this.callVersion=0},e.prototype.setDatasource=function(e){this.datasource=e,e&&this.reset()},e.prototype.reset=function(){this.datasource.pageSize&&"number"!=typeof this.datasource.pageSize&&console.warn("datasource.pageSize should be a number"),this.pageSize=this.datasource.pageSize,"number"==typeof this.datasource.rowCount&&this.datasource.rowCount>=0?(this.rowCount=this.datasource.rowCount,this.foundMaxRow=!0,this.calculateTotalPages()):(this.rowCount=0,this.foundMaxRow=!1,this.totalPages=null),this.currentPage=0,this.ePageRowSummaryPanel.style.visibility="hidden",this.setTotalLabels(),this.loadPage()},e.prototype.setTotalLabels=function(){if(this.foundMaxRow)this.lbTotal.innerHTML=this.totalPages.toLocaleString(),this.lbRecordCount.innerHTML=this.rowCount.toLocaleString();else{var e=this.gridOptionsWrapper.getLocaleTextFunc()("more","more");this.lbTotal.innerHTML=e,this.lbRecordCount.innerHTML=e}},e.prototype.calculateTotalPages=function(){this.totalPages=Math.floor((this.rowCount-1)/this.pageSize)+1},e.prototype.pageLoaded=function(e,t){var i=this.currentPage*this.pageSize;this.angularGrid.setRows(e,i),!this.foundMaxRow&&"number"==typeof t&&t>=0&&(this.foundMaxRow=!0,this.rowCount=t,this.calculateTotalPages(),this.setTotalLabels(),this.currentPage>this.totalPages&&(this.currentPage=this.totalPages-1,this.loadPage())),this.enableOrDisableButtons(),this.updateRowLabels()},e.prototype.updateRowLabels=function(){var e,t;this.isZeroPagesToDisplay()?(e=0,t=0):(e=this.pageSize*this.currentPage+1,t=e+this.pageSize-1,this.foundMaxRow&&t>this.rowCount&&(t=this.rowCount)),this.lbFirstRowOnPage.innerHTML=e.toLocaleString(),this.lbLastRowOnPage.innerHTML=t.toLocaleString(),this.ePageRowSummaryPanel.style.visibility=null},e.prototype.loadPage=function(){function e(e,t){s.isCallDaemon(r)||s.pageLoaded(e,t)}function i(){s.isCallDaemon(r)||s.angularGrid.setRows([])}this.enableOrDisableButtons();var o=this.currentPage*this.datasource.pageSize,n=(this.currentPage+1)*this.datasource.pageSize;this.lbCurrent.innerHTML=(this.currentPage+1).toLocaleString(),this.callVersion++;var r=this.callVersion,s=this;this.angularGrid.showLoadingPanel(!0);var l;this.gridOptionsWrapper.isEnableServerSideSorting()&&(l=this.angularGrid.getSortModel());var a;this.gridOptionsWrapper.isEnableServerSideFilter()&&(a=this.angularGrid.getFilterModel());var d={startRow:o,endRow:n,successCallback:e,failCallback:i,sortModel:l,filterModel:a},u=t.getFunctionParameters(this.datasource.getRows);u.length>1&&(console.warn("ag-grid: It looks like your paging datasource is of the old type, taking more than one parameter."),console.warn("ag-grid: From ag-grid 1.9.0, now the getRows takes one parameter. See the documentation for details.")),this.datasource.getRows(d)},e.prototype.isCallDaemon=function(e){return e!==this.callVersion},e.prototype.onBtNext=function(){this.currentPage++,this.loadPage()},e.prototype.onBtPrevious=function(){this.currentPage--,this.loadPage()},e.prototype.onBtFirst=function(){this.currentPage=0,this.loadPage()},e.prototype.onBtLast=function(){this.currentPage=this.totalPages-1,this.loadPage()},e.prototype.isZeroPagesToDisplay=function(){return this.foundMaxRow&&0===this.totalPages},e.prototype.enableOrDisableButtons=function(){var e=0===this.currentPage;this.btPrevious.disabled=e,this.btFirst.disabled=e;var t=this.isZeroPagesToDisplay(),i=this.foundMaxRow&&this.currentPage===this.totalPages-1,o=i||t;this.btNext.disabled=o;var n=!this.foundMaxRow||t||this.currentPage===this.totalPages-1;this.btLast.disabled=n},e.prototype.createTemplate=function(){var e=this.gridOptionsWrapper.getLocaleTextFunc();return i.replace("[PAGE]",e("page","Page")).replace("[TO]",e("to","to")).replace("[OF]",e("of","of")).replace("[OF]",e("of","of")).replace("[FIRST]",e("first","First")).replace("[PREVIOUS]",e("previous","Previous")).replace("[NEXT]",e("next","Next")).replace("[LAST]",e("last","Last"))},e.prototype.getGui=function(){return this.eGui},e.prototype.setupComponents=function(){this.eGui=t.loadTemplate(this.createTemplate()),this.btNext=this.eGui.querySelector("#btNext"),this.btPrevious=this.eGui.querySelector("#btPrevious"),this.btFirst=this.eGui.querySelector("#btFirst"),this.btLast=this.eGui.querySelector("#btLast"),this.lbCurrent=this.eGui.querySelector("#current"),this.lbTotal=this.eGui.querySelector("#total"),this.lbRecordCount=this.eGui.querySelector("#recordCount"),this.lbFirstRowOnPage=this.eGui.querySelector("#firstRowOnPage"),this.lbLastRowOnPage=this.eGui.querySelector("#lastRowOnPage"),this.ePageRowSummaryPanel=this.eGui.querySelector("#pageRowSummaryPanel");var e=this;this.btNext.addEventListener("click",function(){e.onBtNext()}),this.btPrevious.addEventListener("click",function(){e.onBtPrevious()}),this.btFirst.addEventListener("click",function(){e.onBtFirst()}),this.btLast.addEventListener("click",function(){e.onBtLast()})},e}();e.PaginationController=o}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i=function(){function e(e){this.sizeChangeListners=[],this.isLayoutPanel=!0,this.fullHeight=!e.north&&!e.south;var i;e.dontFill?(i='<div style="position: relative;"><div id="north"></div><div id="centerRow"><div id="west"></div><div id="east"></div><div id="center"></div></div><div id="south"></div><div id="overlay" style="position: absolute; height: 100%; width: 100%; top: 0px; left: 0px;"></div></div>',this.layoutActive=!1):(i=this.fullHeight?'<div style="height: 100%; overflow: auto; position: relative;"><div id="west" style="height: 100%; float: left;"></div><div id="east" style="height: 100%; float: right;"></div><div id="center" style="height: 100%;"></div><div id="overlay" style="position: absolute; height: 100%; width: 100%; top: 0px; left: 0px;"></div></div>':'<div style="height: 100%; position: relative;"><div id="north"></div><div id="centerRow" style="height: 100%; overflow: hidden;"><div id="west" style="height: 100%; float: left;"></div><div id="east" style="height: 100%; float: right;"></div><div id="center" style="height: 100%;"></div></div><div id="south"></div><div id="overlay" style="position: absolute; height: 100%; width: 100%; top: 0px; left: 0px;"></div></div>',this.layoutActive=!0),this.eGui=t.loadTemplate(i),this.id="borderLayout",e.name&&(this.id+="_"+e.name),this.eGui.setAttribute("id",this.id),this.childPanels=[],e&&this.setupPanels(e),this.setOverlayVisible(!1)}return e.prototype.addSizeChangeListener=function(e){this.sizeChangeListners.push(e)},e.prototype.fireSizeChanged=function(){this.sizeChangeListners.forEach(function(e){e()})},e.prototype.setupPanels=function(e){this.eNorthWrapper=this.eGui.querySelector("#north"),this.eSouthWrapper=this.eGui.querySelector("#south"),this.eEastWrapper=this.eGui.querySelector("#east"),this.eWestWrapper=this.eGui.querySelector("#west"),this.eCenterWrapper=this.eGui.querySelector("#center"),this.eOverlayWrapper=this.eGui.querySelector("#overlay"),this.eCenterRow=this.eGui.querySelector("#centerRow"),this.eNorthChildLayout=this.setupPanel(e.north,this.eNorthWrapper),this.eSouthChildLayout=this.setupPanel(e.south,this.eSouthWrapper),this.eEastChildLayout=this.setupPanel(e.east,this.eEastWrapper),this.eWestChildLayout=this.setupPanel(e.west,this.eWestWrapper),this.eCenterChildLayout=this.setupPanel(e.center,this.eCenterWrapper),this.setupPanel(e.overlay,this.eOverlayWrapper)},e.prototype.setupPanel=function(e,t){return t?e?e.isLayoutPanel?(this.childPanels.push(e),t.appendChild(e.getGui()),e):(t.appendChild(e),null):(t.parentNode.removeChild(t),null):void 0},e.prototype.getGui=function(){return this.eGui},e.prototype.doLayout=function(){if(!t.isVisible(this.eGui))return!1;var e=!1,i=[this.eNorthChildLayout,this.eSouthChildLayout,this.eEastChildLayout,this.eWestChildLayout],o=this;if(t.forEach(i,function(t){var i=o.layoutChild(t);i&&(e=!0)}),this.layoutActive){var n=this.layoutHeight(),r=this.layoutWidth();(n||r)&&(e=!0)}var s=this.layoutChild(this.eCenterChildLayout);return s&&(e=!0),e&&this.fireSizeChanged(),e},e.prototype.layoutChild=function(e){return e?e.doLayout():!1},e.prototype.layoutHeight=function(){return this.fullHeight?this.layoutHeightFullHeight():this.layoutHeightNormal()},e.prototype.layoutHeightFullHeight=function(){var e=t.offsetHeight(this.eGui);return 0>e&&(e=0),this.centerHeightLastTime!==e?(this.centerHeightLastTime=e,!0):!1},e.prototype.layoutHeightNormal=function(){var e=t.offsetHeight(this.eGui),i=t.offsetHeight(this.eNorthWrapper),o=t.offsetHeight(this.eSouthWrapper),n=e-i-o;return 0>n&&(n=0),this.centerHeightLastTime!==n?(this.eCenterRow.style.height=n+"px",this.centerHeightLastTime=n,!0):!1},e.prototype.getCentreHeight=function(){return this.centerHeightLastTime},e.prototype.layoutWidth=function(){var e=t.offsetWidth(this.eGui),i=t.offsetWidth(this.eEastWrapper),o=t.offsetWidth(this.eWestWrapper),n=e-i-o;0>n&&(n=0),this.eCenterWrapper.style.width=n+"px"},e.prototype.setEastVisible=function(e){this.eEastWrapper&&(this.eEastWrapper.style.display=e?"":"none"),this.doLayout()},e.prototype.setOverlayVisible=function(e){this.eOverlayWrapper&&(this.eOverlayWrapper.style.display=e?"":"none"),this.doLayout()},e.prototype.setSouthVisible=function(e){this.eSouthWrapper&&(this.eSouthWrapper.style.display=e?"":"none"),this.doLayout()},e}();e.BorderLayout=i}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t='<div>\n                <!-- header -->\n                <div class="ag-header">\n                    <div class="ag-pinned-header"></div><div class="ag-header-viewport"><div class="ag-header-container"></div></div>\n                </div>\n                <!-- floating top -->\n                <div class="ag-floating-top">\n                    <div class="ag-pinned-floating-top"></div><div class="ag-floating-top-viewport"><div class="ag-floating-top-container"></div></div>\n                </div>\n                <!-- floating bottom -->\n                <div class="ag-floating-bottom">\n                    <div class="ag-pinned-floating-bottom"></div><div class="ag-floating-bottom-viewport"><div class="ag-floating-bottom-container"></div></div>\n                </div>\n                <!-- body -->\n                <div class="ag-body">\n                    <div class="ag-pinned-cols-viewport">\n                        <div class="ag-pinned-cols-container"></div>\n                    </div>\n                    <div class="ag-body-viewport-wrapper">\n                        <div class="ag-body-viewport">\n                            <div class="ag-body-container"></div>\n                        </div>\n                    </div>\n                </div>\n            </div>',i='<div>\n                <!-- header -->\n                <div class="ag-header-container"></div>\n                <!-- floating top -->\n                <div class="ag-floating-top-container"></div>\n                <!-- body -->\n                <div class="ag-body-container"></div>\n                <!-- floating bottom -->\n                <div class="ag-floating-bottom-container"></div>\n            </div>',o='<div class="ag-loading-panel"><div class="ag-loading-wrapper"><span class="ag-loading-center">[LOADING...]</span></div></div>',n=e.Utils,r=function(){function r(){this.scrollLagCounter=0}return r.prototype.init=function(e,t,i,o){this.gridOptionsWrapper=e,this.forPrint=this.gridOptionsWrapper.isForPrint(),this.setupComponents(),this.scrollWidth=n.getScrollbarWidth(),this.columnModel=t,this.rowRenderer=i,this.masterSlaveService=o,this.sizeHeaderAndBody()},r.prototype.getLayout=function(){return this.layout},r.prototype.setupComponents=function(){this.forPrint?(this.eRoot=n.loadTemplate(i),n.addCssClass(this.eRoot,"ag-root ag-no-scrolls")):(this.eRoot=n.loadTemplate(t),n.addCssClass(this.eRoot,"ag-root ag-scrolls")),this.findElements(),this.layout=new e.BorderLayout({overlay:n.loadTemplate(this.createTemplate()),center:this.eRoot,dontFill:this.forPrint,name:"eGridPanel"}),this.layout.addSizeChangeListener(this.onBodyHeightChange.bind(this)),this.addScrollListener(),this.gridOptionsWrapper.isSuppressHorizontalScroll()&&(this.eBodyViewport.style.overflowX="hidden")},r.prototype.getPinnedFloatingTop=function(){return this.ePinnedFloatingTop},r.prototype.getFloatingTopContainer=function(){return this.eFloatingTopContainer},r.prototype.getPinnedFloatingBottom=function(){return this.ePinnedFloatingBottom},r.prototype.getFloatingBottomContainer=function(){return this.eFloatingBottomContainer},r.prototype.createTemplate=function(){var e=this.gridOptionsWrapper.getLocaleTextFunc();return o.replace("[LOADING...]",e("loadingOoo","Loading..."))},r.prototype.ensureIndexVisible=function(e){var t=this.rowModel.getVirtualRowCount();if("number"!=typeof e||0>e||e>=t)return void console.warn("invalid row index for ensureIndexVisible: "+e);var i=this.gridOptionsWrapper.getRowHeight(),o=i*e,n=o+i,r=this.eBodyViewport.scrollTop,s=this.eBodyViewport.offsetHeight,l=this.eBodyViewport.clientWidth<this.eBodyViewport.scrollWidth;l&&(s-=this.scrollWidth);var a=r+s,d=r>o,u=n>a;if(d)this.eBodyViewport.scrollTop=o;else if(u){var h=n-s;this.eBodyViewport.scrollTop=h}},r.prototype.ensureColIndexVisible=function(e){if("number"!=typeof e)return void console.warn("col index must be a number: "+e);var t=this.columnModel.getDisplayedColumns();if("number"!=typeof e||0>e||e>=t.length)return void console.warn("invalid col index for ensureColIndexVisible: "+e+", should be between 0 and "+(t.length-1));var i=t[e],o=this.gridOptionsWrapper.getPinnedColCount();if(o>e)return void console.warn("invalid col index for ensureColIndexVisible: "+e+", scrolling to a pinned col makes no sense");for(var n=0,r=o;e>r;r++)n+=t[r].actualWidth;var s=n+i.actualWidth,l=this.eBodyViewport.scrollLeft,a=this.eBodyViewport.offsetWidth,d=this.eBodyViewport.clientHeight<this.eBodyViewport.scrollHeight;d&&(a-=this.scrollWidth);var u=l+a,h=l>n,p=s>u;if(h)this.eBodyViewport.scrollLeft=n;else if(p){var c=s-a;this.eBodyViewport.scrollLeft=c}},r.prototype.showLoading=function(e){this.layout.setOverlayVisible(e)},r.prototype.getWidthForSizeColsToFit=function(){var e=this.eBody.clientWidth,t=this.eBodyViewport.clientHeight<this.eBodyViewport.scrollHeight;return t&&(e-=this.scrollWidth),e},r.prototype.setRowModel=function(e){this.rowModel=e},r.prototype.getBodyContainer=function(){return this.eBodyContainer},r.prototype.getBodyViewport=function(){return this.eBodyViewport},r.prototype.getPinnedColsContainer=function(){return this.ePinnedColsContainer},r.prototype.getHeaderContainer=function(){return this.eHeaderContainer},r.prototype.getRoot=function(){return this.eRoot},r.prototype.getPinnedHeader=function(){return this.ePinnedHeader},r.prototype.getRowsParent=function(){return this.eParentsOfRows},r.prototype.queryHtmlElement=function(e){return this.eRoot.querySelector(e)},r.prototype.findElements=function(){this.forPrint?(this.eHeaderContainer=this.queryHtmlElement(".ag-header-container"),this.eBodyContainer=this.queryHtmlElement(".ag-body-container"),this.eFloatingTopContainer=this.queryHtmlElement(".ag-floating-top-container"),this.eFloatingBottomContainer=this.queryHtmlElement(".ag-floating-bottom-container"),this.eParentsOfRows=[this.eBodyContainer,this.eFloatingTopContainer,this.eFloatingBottomContainer]):(this.eBody=this.queryHtmlElement(".ag-body"),this.eBodyContainer=this.queryHtmlElement(".ag-body-container"),this.eBodyViewport=this.queryHtmlElement(".ag-body-viewport"),this.eBodyViewportWrapper=this.queryHtmlElement(".ag-body-viewport-wrapper"),this.ePinnedColsContainer=this.queryHtmlElement(".ag-pinned-cols-container"),this.ePinnedColsViewport=this.queryHtmlElement(".ag-pinned-cols-viewport"),this.ePinnedHeader=this.queryHtmlElement(".ag-pinned-header"),this.eHeader=this.queryHtmlElement(".ag-header"),this.eHeaderContainer=this.queryHtmlElement(".ag-header-container"),this.eFloatingTop=this.queryHtmlElement(".ag-floating-top"),this.ePinnedFloatingTop=this.queryHtmlElement(".ag-pinned-floating-top"),this.eFloatingTopContainer=this.queryHtmlElement(".ag-floating-top-container"),this.eFloatingBottom=this.queryHtmlElement(".ag-floating-bottom"),this.ePinnedFloatingBottom=this.queryHtmlElement(".ag-pinned-floating-bottom"),this.eFloatingBottomContainer=this.queryHtmlElement(".ag-floating-bottom-container"),this.eParentsOfRows=[this.eBody,this.eFloatingTop,this.eFloatingBottom],this.ePinnedColsViewport.addEventListener("mousewheel",this.mouseWheelListener.bind(this)),this.ePinnedColsViewport.addEventListener("DOMMouseScroll",this.mouseWheelListener.bind(this)))},r.prototype.mouseWheelListener=function(e){var t;if(e.deltaY&&0!=e.deltaX)t=e.deltaY;else if(e.wheelDelta&&0!=e.wheelDelta)t=-e.wheelDelta;else{if(!e.detail||0==e.detail)return;t=20*e.detail}var i=this.eBodyViewport.scrollTop+t;return this.eBodyViewport.scrollTop=i,e.preventDefault(),!1},r.prototype.setBodyContainerWidth=function(){var e=this.columnModel.getBodyContainerWidth()+"px";this.eBodyContainer.style.width=e,this.forPrint||(this.eFloatingBottomContainer.style.width=e,this.eFloatingTopContainer.style.width=e)},r.prototype.setPinnedColContainerWidth=function(){if(!this.forPrint){var e=this.columnModel.getPinnedContainerWidth()+"px";this.ePinnedColsContainer.style.width=e,this.ePinnedFloatingBottom.style.width=e,this.ePinnedFloatingTop.style.width=e,this.eBodyViewportWrapper.style.marginLeft=e}},r.prototype.showPinnedColContainersIfNeeded=function(){if(!this.forPrint){var e=this.columnModel.isPinning();e?(this.ePinnedHeader.style.display="inline-block",this.ePinnedColsViewport.style.display="inline"):(this.ePinnedHeader.style.display="none",this.ePinnedColsViewport.style.display="none")}},r.prototype.onBodyHeightChange=function(){this.sizeHeaderAndBody()},r.prototype.sizeHeaderAndBody=function(){this.forPrint?this.sizeHeaderAndBodyForPrint():this.sizeHeaderAndBodyNormal()},r.prototype.sizeHeaderAndBodyNormal=function(){var e=this.layout.getCentreHeight();if(e){var t=this.gridOptionsWrapper.getHeaderHeight();this.eHeader.style.height=t+"px";var i=0;this.gridOptionsWrapper.getFloatingTopRowData()&&(i=this.gridOptionsWrapper.getFloatingTopRowData().length);var o=0;this.gridOptionsWrapper.getFloatingBottomRowData()&&(o=this.gridOptionsWrapper.getFloatingBottomRowData().length);var n=this.gridOptionsWrapper.getRowHeight(),r=i*n,s=t+r,l=o*n,a=e-l,d=e-t-l-r;this.eBody.style.paddingTop=s+"px",this.eBody.style.paddingBottom=l+"px",this.eFloatingTop.style.top=t+"px",this.eFloatingTop.style.height=r+"px",this.eFloatingBottom.style.height=l+"px",this.eFloatingBottom.style.top=a+"px",this.ePinnedColsViewport.style.height=d+"px"}},r.prototype.sizeHeaderAndBodyForPrint=function(){var e=this.gridOptionsWrapper.getHeaderHeight()+"px";this.eHeaderContainer.style.height=e},r.prototype.setHorizontalScrollPosition=function(e){this.eBodyViewport.scrollLeft=e},r.prototype.addScrollListener=function(){var e=this;if(!this.forPrint){var t=-1,i=-1;this.eBodyViewport.addEventListener("scroll",function(){var o=e.eBodyViewport.scrollLeft,n=e.eBodyViewport.scrollTop;o!==t&&(t=o,e.scrollHeader(o)),n!==i&&(i=n,e.scrollPinned(n),e.requestDrawVirtualRows()),e.masterSlaveService.fireHorizontalScrollEvent(o)}),this.ePinnedColsViewport.addEventListener("scroll",function(){e.ePinnedColsViewport.scrollTop=0})}},r.prototype.requestDrawVirtualRows=function(){var e,t=this;if(e=this.gridOptionsWrapper.isSuppressScrollLag()?!1:this.gridOptionsWrapper.getIsScrollLag()?this.gridOptionsWrapper.getIsScrollLag()():n.isBrowserIE()||n.isBrowserSafari()){this.scrollLagCounter++;var i=this.scrollLagCounter;setTimeout(function(){t.scrollLagCounter===i&&t.rowRenderer.drawVirtualRows()},50)}else this.rowRenderer.drawVirtualRows()},r.prototype.scrollHeader=function(e){this.eHeaderContainer.style.left=-e+"px",this.eFloatingBottomContainer.style.left=-e+"px",this.eFloatingTopContainer.style.left=-e+"px"},r.prototype.scrollPinned=function(e){this.ePinnedColsContainer.style.top=-e+"px"},r}();e.GridPanel=r}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i=function(){function e(){document.addEventListener("mouseup",this.stopDragging.bind(this))}return e.getInstance=function(){return this.theInstance||(this.theInstance=new e),this.theInstance},e.prototype.stopDragging=function(){this.dragItem&&(this.setDragCssClasses(this.dragItem.eDragSource,!1),this.dragItem=null)},e.prototype.setDragCssClasses=function(e,i){t.addOrRemoveCssClass(e,"ag-dragging",i),t.addOrRemoveCssClass(e,"ag-not-dragging",!i)},e.prototype.addDragSource=function(e,t){this.setDragCssClasses(e,!1),e.addEventListener("mousedown",this.onMouseDownDragSource.bind(this,e,t))},e.prototype.onMouseDownDragSource=function(e,t){this.dragItem&&this.stopDragging();var i;t.getData&&(i=t.getData());var o;t.getContainerId&&(o=t.getContainerId()),this.dragItem={eDragSource:e,data:i,containerId:o},this.setDragCssClasses(this.dragItem.eDragSource,!0)},e.prototype.addDropTarget=function(e,t){var i=!1,o=!1,n=this;e.addEventListener("mouseover",function(){i||(i=!0,o=n.dragItem?t.acceptDrag(n.dragItem):!1)}),e.addEventListener("mouseout",function(){o&&t.noDrop(),i=!1,o=!1}),e.addEventListener("mouseup",function(){o&&n.dragItem&&t.drop(n.dragItem)})},e}();e.DragAndDropService=i}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t,i=e.Utils,o=e.DragAndDropService.getInstance(),n='<div class="ag-list-selection"><div><div ag-repeat class="ag-list-item"></div></div></div>';!function(e){e[e.NOT_DROP_TARGET=0]="NOT_DROP_TARGET",e[e.DROP_TARGET_ABOVE=1]="DROP_TARGET_ABOVE",e[e.DROP_TARGET_BELOW=2]="DROP_TARGET_BELOW"}(t||(t={}));var r=function(){function e(){this.readOnly=!1,
this.setupComponents(),this.uniqueId="CheckboxSelection-"+Math.random(),this.modelChangedListeners=[],this.itemSelectedListeners=[],this.itemMovedListeners=[],this.beforeDropListeners=[],this.dragSources=[],this.setupAsDropTarget()}return e.prototype.setReadOnly=function(e){this.readOnly=e},e.prototype.setEmptyMessage=function(e){this.emptyMessage=e,this.refreshView()},e.prototype.getUniqueId=function(){return this.uniqueId},e.prototype.addStyles=function(e){i.addStylesToElement(this.eGui,e)},e.prototype.addCssClass=function(e){i.addCssClass(this.eGui,e)},e.prototype.addDragSource=function(e){this.dragSources.push(e)},e.prototype.addModelChangedListener=function(e){this.modelChangedListeners.push(e)},e.prototype.addItemSelectedListener=function(e){this.itemSelectedListeners.push(e)},e.prototype.addItemMovedListener=function(e){this.itemMovedListeners.push(e)},e.prototype.addBeforeDropListener=function(e){this.beforeDropListeners.push(e)},e.prototype.fireItemMoved=function(e,t){for(var i=0;i<this.itemMovedListeners.length;i++)this.itemMovedListeners[i](e,t)},e.prototype.fireModelChanged=function(){for(var e=0;e<this.modelChangedListeners.length;e++)this.modelChangedListeners[e](this.model)},e.prototype.fireItemSelected=function(e){for(var t=0;t<this.itemSelectedListeners.length;t++)this.itemSelectedListeners[t](e)},e.prototype.fireBeforeDrop=function(e){for(var t=0;t<this.beforeDropListeners.length;t++)this.beforeDropListeners[t](e)},e.prototype.setupComponents=function(){this.eGui=i.loadTemplate(n),this.eFilterValueTemplate=this.eGui.querySelector("[ag-repeat]"),this.eListParent=this.eFilterValueTemplate.parentNode,i.removeAllChildren(this.eListParent)},e.prototype.setModel=function(e){this.model=e,this.refreshView()},e.prototype.getModel=function(){return this.model},e.prototype.setCellRenderer=function(e){this.cellRenderer=e},e.prototype.refreshView=function(){i.removeAllChildren(this.eListParent),this.model&&this.model.length>0?this.insertRows():this.insertBlankMessage()},e.prototype.insertRows=function(){for(var e=0;e<this.model.length;e++){var t=this.model[e],o=this.eFilterValueTemplate.cloneNode(!0);if(this.cellRenderer){var n={value:t};i.useRenderer(o,this.cellRenderer,n)}else o.innerHTML=t;o.addEventListener("click",this.fireItemSelected.bind(this,t)),this.addDragAndDropToListItem(o,t),this.eListParent.appendChild(o)}},e.prototype.insertBlankMessage=function(){if(this.emptyMessage){var e=document.createElement("div");e.style.color="grey",e.style.padding="4px",e.style.textAlign="center",e.innerHTML=this.emptyMessage,this.eListParent.appendChild(e)}},e.prototype.setupAsDropTarget=function(){o.addDropTarget(this.eGui,{acceptDrag:this.externalAcceptDrag.bind(this),drop:this.externalDrop.bind(this),noDrop:this.externalNoDrop.bind(this)})},e.prototype.externalAcceptDrag=function(e){var t=this.dragSources.indexOf(e.containerId)>=0;if(!t)return!1;var i=this.model.indexOf(e.data)>=0;return i?!1:(this.eGui.style.backgroundColor="lightgreen",!0)},e.prototype.externalDrop=function(e){var t=e.data;this.fireBeforeDrop(t),this.readOnly||this.addItemToList(t),this.eGui.style.backgroundColor=""},e.prototype.externalNoDrop=function(){this.eGui.style.backgroundColor=""},e.prototype.addItemToList=function(e){this.model.push(e),this.refreshView(),this.fireModelChanged()},e.prototype.addDragAndDropToListItem=function(e,t){var i=this;o.addDragSource(e,{getData:function(){return t},getContainerId:function(){return i.uniqueId}}),o.addDropTarget(e,{acceptDrag:function(o){return i.internalAcceptDrag(t,o,e)},drop:function(e){i.internalDrop(t,e.data)},noDrop:function(){i.internalNoDrop(e)}})},e.prototype.internalAcceptDrag=function(e,i,o){var n=i.data!==e&&i.containerId===this.uniqueId;return n&&(this.dragAfterThisItem(e,i.data)?this.setDropCssClasses(o,t.DROP_TARGET_ABOVE):this.setDropCssClasses(o,t.DROP_TARGET_BELOW)),n},e.prototype.internalDrop=function(e,t){var i=this.model.indexOf(t),o=this.model.indexOf(e);this.readOnly?this.fireItemMoved(i,o):(this.model.splice(i,1),this.model.splice(o,0,t),this.refreshView(),this.fireModelChanged())},e.prototype.internalNoDrop=function(e){this.setDropCssClasses(e,t.NOT_DROP_TARGET)},e.prototype.dragAfterThisItem=function(e,t){return this.model.indexOf(e)<this.model.indexOf(t)},e.prototype.setDropCssClasses=function(e,o){i.addOrRemoveCssClass(e,"ag-not-drop-target",o===t.NOT_DROP_TARGET),i.addOrRemoveCssClass(e,"ag-drop-target-above",o===t.DROP_TARGET_ABOVE),i.addOrRemoveCssClass(e,"ag-drop-target-below",o===t.DROP_TARGET_BELOW)},e.prototype.getGui=function(){return this.eGui},e}();e.AgList=r}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i=e.SvgFactory.getInstance(),o=function(){function o(t,i,o){this.gridOptionsWrapper=i,this.setupComponents(),this.columnController=t,o.addEventListener(e.Events.EVENT_COLUMN_EVERYTHING_CHANGED,this.columnsChanged.bind(this)),o.addEventListener(e.Events.EVENT_COLUMN_MOVED,this.columnsChanged.bind(this)),o.addEventListener(e.Events.EVENT_COLUMN_VISIBLE,this.columnsChanged.bind(this))}return o.prototype.columnsChanged=function(){this.cColumnList.setModel(this.columnController.getAllColumns())},o.prototype.getDragSource=function(){return this.cColumnList.getUniqueId()},o.prototype.columnCellRenderer=function(e){function o(){h.columnController.setColumnVisible(n,!n.visible)}var n=e.value,r=this.columnController.getDisplayNameForCol(n),s=document.createElement("span"),l=document.createElement("span");t.addCssClass(l,"ag-visible-icons");var a=t.createIcon("columnVisible",this.gridOptionsWrapper,n,i.createColumnShowingSvg),d=t.createIcon("columnHidden",this.gridOptionsWrapper,n,i.createColumnHiddenSvg);l.appendChild(a),l.appendChild(d),a.style.display=n.visible?"":"none",d.style.display=n.visible?"none":"",s.appendChild(l);var u=document.createElement("span");u.innerHTML=r,s.appendChild(u),n.visible||t.addCssClass(s,"ag-column-not-visible"),l.addEventListener("click",o);var h=this;return s},o.prototype.setupComponents=function(){this.cColumnList=new e.AgList,this.cColumnList.setCellRenderer(this.columnCellRenderer.bind(this)),this.cColumnList.addStyles({height:"100%",overflow:"auto"}),this.cColumnList.addItemMovedListener(this.onItemMoved.bind(this)),this.cColumnList.setReadOnly(!0);var t=this.gridOptionsWrapper.getLocaleTextFunc(),i=t("columns","Columns"),o=document.createElement("div");o.innerHTML='<div style="text-align: center;">'+i+"</div>",this.layout=new e.BorderLayout({center:this.cColumnList.getGui(),north:o})},o.prototype.onItemMoved=function(e,t){this.columnController.moveColumn(e,t)},o.prototype.getGui=function(){return this.eRootPanel.getGui()},o}();e.ColumnSelectionPanel=o}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i=e.SvgFactory.getInstance(),o=function(){function o(t,i,o,n){this.gridOptionsWrapper=o,this.setupComponents(),this.columnController=t,this.inMemoryRowController=i,n.addEventListener(e.Events.EVENT_COLUMN_EVERYTHING_CHANGED,this.columnsChanged.bind(this)),n.addEventListener(e.Events.EVENT_COLUMN_PIVOT_CHANGE,this.columnsChanged.bind(this))}return o.prototype.columnsChanged=function(){this.cColumnList.setModel(this.columnController.getPivotedColumns())},o.prototype.addDragSource=function(e){this.cColumnList.addDragSource(e)},o.prototype.columnCellRenderer=function(e){var o=e.value,n=this.columnController.getDisplayNameForCol(o),r=document.createElement("span"),s=t.createIcon("columnRemoveFromGroup",this.gridOptionsWrapper,o,i.createArrowUpSvg);t.addCssClass(s,"ag-visible-icons"),r.appendChild(s);var l=this;s.addEventListener("click",function(){l.columnController.removePivotColumn(o)});var a=document.createElement("span");return a.innerHTML=n,r.appendChild(a),r},o.prototype.setupComponents=function(){var t=this.gridOptionsWrapper.getLocaleTextFunc(),i=t("pivotedColumns","Pivoted Columns"),o=t("pivotedColumnsEmptyMessage","Drag columns from above to pivot");this.cColumnList=new e.AgList,this.cColumnList.setCellRenderer(this.columnCellRenderer.bind(this)),this.cColumnList.addBeforeDropListener(this.onBeforeDrop.bind(this)),this.cColumnList.addItemMovedListener(this.onItemMoved.bind(this)),this.cColumnList.setEmptyMessage(o),this.cColumnList.addStyles({height:"100%",overflow:"auto"}),this.cColumnList.setReadOnly(!0);var n=document.createElement("div");n.style.paddingTop="10px",n.innerHTML='<div style="text-align: center;">'+i+"</div>",this.layout=new e.BorderLayout({center:this.cColumnList.getGui(),north:n})},o.prototype.onBeforeDrop=function(e){this.columnController.addPivotColumn(e)},o.prototype.onItemMoved=function(e,t){this.columnController.movePivotColumn(e,t)},o}();e.GroupSelectionPanel=o}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i=e.SvgFactory.getInstance(),o=function(){function o(e){this.popupService=e,this.setupComponents(),this.itemSelectedListeners=[]}return o.prototype.setWidth=function(e){this.eValue.style.width=e+"px",this.agList.addStyles({width:e+"px"})},o.prototype.addItemSelectedListener=function(e){this.itemSelectedListeners.push(e)},o.prototype.fireItemSelected=function(e){for(var t=0;t<this.itemSelectedListeners.length;t++)this.itemSelectedListeners[t](e)},o.prototype.setupComponents=function(){this.eGui=document.createElement("span"),this.eValue=document.createElement("span"),this.eGui.appendChild(this.eValue),this.agList=new e.AgList,this.eValue.addEventListener("click",this.onClick.bind(this)),this.agList.addItemSelectedListener(this.itemSelected.bind(this)),this.agList.addCssClass("ag-popup-list"),t.addStylesToElement(this.eValue,{border:"1px solid darkgrey",display:"inline-block",paddingLeft:2}),t.addStylesToElement(this.eGui,{position:"relative"}),this.agList.addStyles({display:"inline-block",position:"absolute",top:0,left:0,backgroudColor:"white"})},o.prototype.itemSelected=function(e){this.setSelected(e),this.hidePopupCallback&&this.hidePopupCallback(),this.fireItemSelected(e)},o.prototype.onClick=function(){var e=this.agList.getGui();this.popupService.positionPopup(this.eGui,e,-1),this.hidePopupCallback=this.popupService.addAsModalPopup(e,!0)},o.prototype.getGui=function(){return this.eGui},o.prototype.setSelected=function(e){this.selectedItem=e,this.refreshView()},o.prototype.setCellRenderer=function(e){this.agList.setCellRenderer(e),this.cellRenderer=e},o.prototype.refreshView=function(){if(t.removeAllChildren(this.eValue),this.selectedItem)if(this.cellRenderer){var e={value:this.selectedItem};t.useRenderer(this.eValue,this.cellRenderer,e)}else this.eValue.appendChild(document.createTextNode(this.selectedItem));var o=i.createSmallArrowDownSvg();o.style["float"]="right",o.style.marginTop="6",o.style.marginRight="2",this.eValue.appendChild(o)},o.prototype.setModel=function(e){this.agList.setModel(e)},o}();e.AgDropdownList=o}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.SvgFactory.getInstance(),i=e.Constants,o=e.Utils,n=function(){function n(t,i,o,n){this.popupService=o,this.gridOptionsWrapper=i,this.setupComponents(),this.columnController=t,n.addEventListener(e.Events.EVENT_COLUMN_EVERYTHING_CHANGED,this.columnsChanged.bind(this)),n.addEventListener(e.Events.EVENT_COLUMN_VALUE_CHANGE,this.columnsChanged.bind(this))}return n.prototype.getLayout=function(){return this.layout},n.prototype.columnsChanged=function(){this.cColumnList.setModel(this.columnController.getValueColumns())},n.prototype.addDragSource=function(e){this.cColumnList.addDragSource(e)},n.prototype.cellRenderer=function(n){var r=n.value,s=this.columnController.getDisplayNameForCol(r),l=document.createElement("span"),a=o.createIcon("columnRemoveFromGroup",this.gridOptionsWrapper,r,t.createArrowUpSvg);o.addCssClass(a,"ag-visible-icons"),l.appendChild(a);var d=this;a.addEventListener("click",function(){d.columnController.removeValueColumn(r)});var u=new e.AgDropdownList(this.popupService);u.setModel([i.SUM,i.MIN,i.MAX]),u.setSelected(r.aggFunc),u.setWidth(45),u.addItemSelectedListener(function(e){d.columnController.setColumnAggFunction(r,e)}),l.appendChild(u.getGui());var h=document.createElement("span");return h.innerHTML=s,h.style.paddingLeft="2px",l.appendChild(h),l},n.prototype.setupComponents=function(){var t=this.gridOptionsWrapper.getLocaleTextFunc(),i=t("valueColumns","Value Columns"),o=t("valueColumnsEmptyMessage","Drag columns from above to create values");this.cColumnList=new e.AgList,this.cColumnList.setCellRenderer(this.cellRenderer.bind(this)),this.cColumnList.setEmptyMessage(o),this.cColumnList.addStyles({height:"100%",overflow:"auto"}),this.cColumnList.addBeforeDropListener(this.beforeDropListener.bind(this)),this.cColumnList.setReadOnly(!0);var n=document.createElement("div");n.style.paddingTop="10px",n.innerHTML='<div style="text-align: center;">'+i+"</div>",this.layout=new e.BorderLayout({center:this.cColumnList.getGui(),north:n})},n.prototype.beforeDropListener=function(e){this.columnController.addValueColumn(e)},n}();e.ValuesSelectionPanel=n}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=function(){function e(){this.isLayoutPanel=!0,this.childPanels=[],this.eGui=document.createElement("div"),this.eGui.style.height="100%"}return e.prototype.addPanel=function(e,t){var i;e.isLayoutPanel?(this.childPanels.push(e),i=e.getGui()):i=e,t&&(i.style.height=t),this.eGui.appendChild(i)},e.prototype.getGui=function(){return this.eGui},e.prototype.doLayout=function(){for(var e=0;e<this.childPanels.length;e++)this.childPanels[e].doLayout()},e}();e.VerticalStack=t}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=e.Utils,i=function(){function i(){this.layout=new e.VerticalStack}return i.prototype.init=function(i,o,n,r,s){var l=n.isToolPanelSuppressPivot(),a=n.isToolPanelSuppressValues(),d=!l,u=!l&&!a,h=new e.ColumnSelectionPanel(i,n,s),p=l?"100%":"50%";this.layout.addPanel(h.layout,p);var c=h.getDragSource();if(u){var g=new e.ValuesSelectionPanel(i,n,r,s);this.layout.addPanel(g.getLayout(),"25%"),g.addDragSource(c)}if(d){var f=new e.GroupSelectionPanel(i,o,n,s),v=u?"25%":"50%";this.layout.addPanel(f.layout,v),f.addDragSource(c)}var C=this.layout.getGui();t.addCssClass(C,"ag-tool-panel-container")},i}();e.ToolPanel=i}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=function(){function t(t,i,o,n,r,s,l,a,d,u,h,p){this.grid=t,this.rowRenderer=i,this.headerRenderer=o,this.filterManager=n,this.columnController=r,this.inMemoryRowController=s,this.selectionController=l,this.gridOptionsWrapper=a,this.gridPanel=d,this.valueService=u,this.masterSlaveService=h,this.eventService=p,this.csvCreator=new e.CsvCreator(this.inMemoryRowController,this.columnController,this.grid,this.valueService)}return t.prototype.__getMasterSlaveService=function(){return this.masterSlaveService},t.prototype.getDataAsCsv=function(e){return this.csvCreator.getDataAsCsv(e)},t.prototype.exportDataAsCsv=function(e){this.csvCreator.exportDataAsCsv(e)},t.prototype.setDatasource=function(e){this.grid.setDatasource(e)},t.prototype.onNewDatasource=function(){console.log("ag-Grid: onNewDatasource deprecated, please use setDatasource()"),this.grid.setDatasource()},t.prototype.setRowData=function(e){this.grid.setRows(e)},t.prototype.setRows=function(e){console.log("ag-Grid: setRows deprecated, please use setRowData()"),this.grid.setRows(e)},t.prototype.onNewRows=function(){console.log("ag-Grid: onNewRows deprecated, please use setRowData()"),this.grid.setRows()},t.prototype.setFloatingTopRowData=function(e){this.gridOptionsWrapper.setFloatingTopRowData(e),this.gridPanel.onBodyHeightChange(),this.refreshView()},t.prototype.setFloatingBottomRowData=function(e){this.gridOptionsWrapper.setFloatingBottomRowData(e),this.gridPanel.onBodyHeightChange(),this.refreshView()},t.prototype.onNewCols=function(){console.error("ag-Grid: deprecated, please call setColumnDefs instead providing a list of the defs"),this.grid.setColumnDefs()},t.prototype.setColumnDefs=function(e){this.grid.setColumnDefs(e)},t.prototype.unselectAll=function(){console.error("unselectAll deprecated, call deselectAll instead"),this.deselectAll()},t.prototype.refreshRows=function(e){this.rowRenderer.refreshRows(e)},t.prototype.refreshCells=function(e,t){this.rowRenderer.refreshCells(e,t)},t.prototype.rowDataChanged=function(e){this.rowRenderer.rowDataChanged(e)},t.prototype.refreshView=function(){this.rowRenderer.refreshView()},t.prototype.softRefreshView=function(){this.rowRenderer.softRefreshView()},t.prototype.refreshGroupRows=function(){this.rowRenderer.refreshGroupRows()},t.prototype.refreshHeader=function(){this.headerRenderer.refreshHeader(),this.headerRenderer.updateFilterIcons()},t.prototype.isAnyFilterPresent=function(){return this.filterManager.isAnyFilterPresent()},t.prototype.isAdvancedFilterPresent=function(){return this.filterManager.isAdvancedFilterPresent()},t.prototype.isQuickFilterPresent=function(){return this.filterManager.isQuickFilterPresent()},t.prototype.getModel=function(){return this.grid.getRowModel()},t.prototype.onGroupExpandedOrCollapsed=function(t){this.grid.updateModelAndRefresh(e.Constants.STEP_MAP,t)},t.prototype.expandAll=function(){this.inMemoryRowController.expandOrCollapseAll(!0,null),this.grid.updateModelAndRefresh(e.Constants.STEP_MAP)},t.prototype.collapseAll=function(){this.inMemoryRowController.expandOrCollapseAll(!1,null),this.grid.updateModelAndRefresh(e.Constants.STEP_MAP)},t.prototype.addVirtualRowListener=function(e,t){this.grid.addVirtualRowListener(e,t)},t.prototype.setQuickFilter=function(e){this.grid.onQuickFilterChanged(e)},t.prototype.selectIndex=function(e,t,i){this.selectionController.selectIndex(e,t,i)},t.prototype.deselectIndex=function(e){this.selectionController.deselectIndex(e)},t.prototype.selectNode=function(e,t,i){this.selectionController.selectNode(e,t,i)},t.prototype.deselectNode=function(e){this.selectionController.deselectNode(e)},t.prototype.selectAll=function(){this.selectionController.selectAll(),this.rowRenderer.refreshView()},t.prototype.deselectAll=function(){this.selectionController.deselectAll(),this.rowRenderer.refreshView()},t.prototype.recomputeAggregates=function(){this.inMemoryRowController.doAggregate(),this.rowRenderer.refreshGroupRows()},t.prototype.sizeColumnsToFit=function(){if(this.gridOptionsWrapper.isForPrint())return void console.warn("ag-grid: sizeColumnsToFit does not work when forPrint=true");var e=this.gridPanel.getWidthForSizeColsToFit();this.columnController.sizeColumnsToFit(e)},t.prototype.showLoading=function(e){this.grid.showLoadingPanel(e)},t.prototype.isNodeSelected=function(e){return this.selectionController.isNodeSelected(e)},t.prototype.getSelectedNodesById=function(){return this.selectionController.getSelectedNodesById()},t.prototype.getSelectedNodes=function(){return this.selectionController.getSelectedNodes()},t.prototype.getSelectedRows=function(){return this.selectionController.getSelectedRows()},t.prototype.getBestCostNodeSelection=function(){return this.selectionController.getBestCostNodeSelection()},t.prototype.getRenderedNodes=function(){return this.rowRenderer.getRenderedNodes()},t.prototype.ensureColIndexVisible=function(e){this.gridPanel.ensureColIndexVisible(e)},t.prototype.ensureIndexVisible=function(e){this.gridPanel.ensureIndexVisible(e)},t.prototype.ensureNodeVisible=function(e){this.grid.ensureNodeVisible(e)},t.prototype.forEachInMemory=function(e){console.warn("ag-Grid: please use forEachNode instead of forEachInMemory, method is same, I just renamed it, forEachInMemory is deprecated"),this.forEachNode(e)},t.prototype.forEachNode=function(e){this.grid.getRowModel().forEachNode(e)},t.prototype.forEachNodeAfterFilter=function(e){this.grid.getRowModel().forEachNodeAfterFilter(e)},t.prototype.forEachNodeAfterFilterAndSort=function(e){this.grid.getRowModel().forEachNodeAfterFilterAndSort(e)},t.prototype.getFilterApiForColDef=function(e){return console.warn("ag-grid API method getFilterApiForColDef deprecated, use getFilterApi instead"),this.getFilterApi(e)},t.prototype.getFilterApi=function(e){var t=this.columnController.getColumn(e);return this.filterManager.getFilterApi(t)},t.prototype.getColumnDef=function(e){var t=this.columnController.getColumn(e);return t?t.colDef:null},t.prototype.onFilterChanged=function(){this.grid.onFilterChanged()},t.prototype.setSortModel=function(e){this.grid.setSortModel(e)},t.prototype.getSortModel=function(){return this.grid.getSortModel()},t.prototype.setFilterModel=function(e){this.filterManager.setFilterModel(e)},t.prototype.getFilterModel=function(){return this.grid.getFilterModel()},t.prototype.getFocusedCell=function(){return this.rowRenderer.getFocusedCell()},t.prototype.setFocusedCell=function(e,t){this.grid.setFocusedCell(e,t)},t.prototype.setHeaderHeight=function(e){this.gridOptionsWrapper.setHeaderHeight(e),this.gridPanel.onBodyHeightChange()},t.prototype.setGroupHeaders=function(e){this.gridOptionsWrapper.setGroupHeaders(e),this.columnController.onColumnsChanged(),this.gridPanel.onBodyHeightChange()},t.prototype.showToolPanel=function(e){this.grid.showToolPanel(e)},t.prototype.isToolPanelShowing=function(){return this.grid.isToolPanelShowing()},t.prototype.hideColumn=function(e,t){console.warn("ag-Grid: hideColumn deprecated - use hideColumn on columnApi instead eg api.columnApi.hideColumn()"),this.columnController.hideColumns([e],t)},t.prototype.hideColumns=function(e,t){console.warn("ag-Grid: hideColumns deprecated - use hideColumns on columnApi instead eg api.columnApi.hideColumns()"),this.columnController.hideColumns(e,t)},t.prototype.getColumnState=function(){return console.warn("ag-Grid: getColumnState deprecated - use getColumnState on columnApi instead eg api.columnApi.getState()"),this.columnController.getState()},t.prototype.setColumnState=function(e){console.warn("ag-Grid: setColumnState deprecated - use setColumnState on columnApi instead eg api.columnApi.setState()"),this.columnController.setState(e)},t.prototype.doLayout=function(){this.grid.doLayout()},t.prototype.getValue=function(e,t,i){return this.valueService.getValue(e,t,i)},t.prototype.addEventListener=function(e,t){this.eventService.addEventListener(e,t)},t.prototype.addGlobalListener=function(e){this.eventService.addGlobalListener(e)},t.prototype.removeEventListener=function(e,t){this.eventService.removeEventListener(e,t)},t.prototype.removeGlobalListener=function(e){this.eventService.removeGlobalListener(e)},t.prototype.refreshPivot=function(){this.grid.refreshPivot()},t}();e.GridApi=t}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=function(){function e(){}return e.prototype.init=function(e,t,i){this.gridOptionsWrapper=e,this.expressionService=t,this.columnController=i},e.prototype.getValue=function(e,t,i){var o,n=this.gridOptionsWrapper.isEnableCellExpressions(),r=e.field;if(o=e.valueGetter?this.executeValueGetter(e.valueGetter,t,e,i):r&&t?t[r]:void 0,n&&"string"==typeof o&&0===o.indexOf("=")){var s=o.substring(1);o=this.executeValueGetter(s,t,e,i)}return o},e.prototype.executeValueGetter=function(e,t,i,o){var n=this.gridOptionsWrapper.getContext(),r=this.gridOptionsWrapper.getApi(),s={data:t,node:o,colDef:i,api:r,context:n,getValue:this.getValueCallback.bind(this,t,o)};return"function"==typeof e?e(s):"string"==typeof e?this.expressionService.evaluate(e,s):void 0},e.prototype.getValueCallback=function(e,t,i){var o=this.columnController.getColumn(i);return o?this.getValue(o.colDef,e,t):null},e}();e.ValueService=t}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=function(){function t(t,i,o,n,r,s){void 0===o&&(o=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===s&&(s=null),this.virtualRowCallbacks={},this.gridOptions=i,this.setupComponents(n,r,t,o),this.gridOptions.api=new e.GridApi(this,this.rowRenderer,this.headerRenderer,this.filterManager,this.columnController,this.inMemoryRowController,this.selectionController,this.gridOptionsWrapper,this.gridPanel,this.valueService,this.masterSlaveService,this.eventService),this.gridOptions.columnApi=this.columnController.getColumnApi();var l=this;n&&n.$watch(s,function(e){l.onQuickFilterChanged(e)});var a=this.gridOptionsWrapper.isForPrint();a||window.addEventListener("resize",this.doLayout.bind(this)),this.inMemoryRowController.setAllRows(this.gridOptionsWrapper.getRowData()),this.setupColumns(),this.updateModelAndRefresh(e.Constants.STEP_EVERYTHING);var d=!this.gridOptionsWrapper.getRowData()&&!this.gridOptionsWrapper.isVirtualPaging();this.showLoadingPanel(d),this.gridOptionsWrapper.getDatasource()&&this.setDatasource(),this.doLayout(),this.finished=!1,this.periodicallyDoLayout();var u={api:i.api};this.eventService.dispatchEvent(e.Events.EVENT_READY,u)}return t.prototype.getRowModel=function(){return this.rowModel},t.prototype.periodicallyDoLayout=function(){if(!this.finished){var e=this;setTimeout(function(){e.doLayout(),e.periodicallyDoLayout()},500)}},t.prototype.setupComponents=function(t,i,o,n){var r=new e.EventService,s=new e.GridOptionsWrapper,l=new e.SelectionController,a=new e.FilterManager,d=new e.SelectionRendererFactory,u=new e.ColumnController,h=new e.RowRenderer,p=new e.HeaderRenderer,c=new e.InMemoryRowController,g=new e.VirtualPageRowController,f=new e.ExpressionService,v=new e.TemplateService,C=new e.GridPanel,m=new e.PopupService,y=new e.ValueService,E=new e.GroupCreator,w=new e.MasterSlaveService,R=new e.LoggerFactory;s.init(this.gridOptions,r),R.init(s),C.init(s,u,h,w),v.init(t),f.init(R),l.init(this,C,s,t,h,r),a.init(this,s,i,t,u,m,y),d.init(this,l),u.init(this,d,s,f,y,w,r),h.init(u,s,C,this,d,i,t,l,f,v,y,r),p.init(s,u,C,this,a,t,i),c.init(s,u,this,a,t,E,y,r),g.init(h,s,this),y.init(s,f,u),E.init(y),w.init(s,u,C,R,r),n&&r.addGlobalListener(n);var S=null,O=null;s.isForPrint()||(O=new e.ToolPanel,S=O.layout,O.init(u,c,s,m,r));var A=c.getModel();l.setRowModel(A),a.setRowModel(A),h.setRowModel(A),C.setRowModel(A);var b=null,T=null;s.isForPrint()||(b=new e.PaginationController,b.init(this,s),T=b.getGui()),this.rowModel=A,this.usingInMemoryModel=!0,this.selectionController=l,this.columnController=u,this.inMemoryRowController=c,this.virtualPageRowController=g,this.rowRenderer=h,this.headerRenderer=p,this.paginationController=b,this.filterManager=a,this.toolPanel=O,this.gridPanel=C,this.valueService=y,this.masterSlaveService=w,this.eventService=r,this.gridOptionsWrapper=s,this.eRootPanel=new e.BorderLayout({center:C.getLayout(),east:S,south:T,dontFill:s.isForPrint(),name:"eRootPanel"}),m.init(this.eRootPanel.getGui()),this.eRootPanel.setSouthVisible(!1),this.showToolPanel(s.isShowToolPanel()),o.appendChild(this.eRootPanel.getGui()),r.addEventListener(e.Events.EVENT_COLUMN_EVERYTHING_CHANGED,this.onColumnChanged.bind(this)),r.addEventListener(e.Events.EVENT_COLUMN_GROUP_OPENED,this.onColumnChanged.bind(this)),r.addEventListener(e.Events.EVENT_COLUMN_MOVED,this.onColumnChanged.bind(this)),r.addEventListener(e.Events.EVENT_COLUMN_PINNED_COUNT_CHANGED,this.onColumnChanged.bind(this)),r.addEventListener(e.Events.EVENT_COLUMN_PIVOT_CHANGE,this.onColumnChanged.bind(this)),r.addEventListener(e.Events.EVENT_COLUMN_RESIZED,this.onColumnChanged.bind(this)),r.addEventListener(e.Events.EVENT_COLUMN_VALUE_CHANGE,this.onColumnChanged.bind(this)),r.addEventListener(e.Events.EVENT_COLUMN_VISIBLE,this.onColumnChanged.bind(this))},t.prototype.onColumnChanged=function(e){e.isPivotChanged()&&this.inMemoryRowController.onPivotChanged(),e.isValueChanged()&&this.inMemoryRowController.doAggregate(),e.isIndividualColumnResized()?this.onIndividualColumnResized(e.getColumn()):this.refreshHeaderAndBody(),this.gridPanel.showPinnedColContainersIfNeeded()},t.prototype.refreshPivot=function(){this.inMemoryRowController.onPivotChanged(),this.refreshHeaderAndBody()},t.prototype.getEventService=function(){return this.eventService},t.prototype.onIndividualColumnResized=function(e){this.headerRenderer.onIndividualColumnResized(e),this.rowRenderer.onIndividualColumnResized(e),e.pinned?this.updatePinnedColContainerWidthAfterColResize():this.updateBodyContainerWidthAfterColResize()},t.prototype.showToolPanel=function(e){return this.toolPanel?(this.toolPanelShowing=e,void this.eRootPanel.setEastVisible(e)):void(this.toolPanelShowing=!1)},t.prototype.isToolPanelShowing=function(){return this.toolPanelShowing},t.prototype.isUsingInMemoryModel=function(){return this.usingInMemoryModel},t.prototype.setDatasource=function(e){e&&(this.gridOptions.datasource=e);var t=this.gridOptionsWrapper.getDatasource();this.doingVirtualPaging=this.gridOptionsWrapper.isVirtualPaging()&&t,this.doingPagination=t&&!this.doingVirtualPaging;var i;this.doingVirtualPaging?(this.paginationController.setDatasource(null),this.virtualPageRowController.setDatasource(t),this.rowModel=this.virtualPageRowController.getModel(),this.usingInMemoryModel=!1,i=!1):this.doingPagination?(this.paginationController.setDatasource(t),this.virtualPageRowController.setDatasource(null),this.rowModel=this.inMemoryRowController.getModel(),this.usingInMemoryModel=!0,i=!0):(this.paginationController.setDatasource(null),this.virtualPageRowController.setDatasource(null),this.rowModel=this.inMemoryRowController.getModel(),this.usingInMemoryModel=!0,i=!1),this.selectionController.setRowModel(this.rowModel),this.filterManager.setRowModel(this.rowModel),this.rowRenderer.setRowModel(this.rowModel),this.gridPanel.setRowModel(this.rowModel),this.eRootPanel.setSouthVisible(i),this.rowRenderer.refreshView(),this.doLayout()},t.prototype.refreshHeaderAndBody=function(){this.headerRenderer.refreshHeader(),this.headerRenderer.updateFilterIcons(),this.headerRenderer.updateSortIcons(),this.gridPanel.setBodyContainerWidth(),this.gridPanel.setPinnedColContainerWidth(),this.rowRenderer.refreshView()},t.prototype.setFinished=function(){window.removeEventListener("resize",this.doLayout),this.finished=!0},t.prototype.onQuickFilterChanged=function(e){var t=this.filterManager.setQuickFilter(e);t&&this.onFilterChanged()},t.prototype.onFilterModified=function(){this.eventService.dispatchEvent(e.Events.EVENT_FILTER_MODIFIED)},t.prototype.onFilterChanged=function(){this.eventService.dispatchEvent(e.Events.EVENT_BEFORE_FILTER_CHANGED),this.filterManager.onFilterChanged(),this.headerRenderer.updateFilterIcons(),this.gridOptionsWrapper.isEnableServerSideFilter()?this.setDatasource():this.updateModelAndRefresh(e.Constants.STEP_FILTER),this.eventService.dispatchEvent(e.Events.EVENT_AFTER_FILTER_CHANGED)},t.prototype.onRowClicked=function(t,i,o){var n={node:o,data:o.data,event:t,rowIndex:i};if(this.eventService.dispatchEvent(e.Events.EVENT_ROW_CLICKED,n),!o.group&&!o.floating){var r=this.gridOptionsWrapper,s=this.selectionController;if(r.isRowSelection()&&!r.isSuppressRowClickSelection()){var l=t.ctrlKey||t.metaKey,a=l&&s.isNodeSelected(o)&&r.isRowDeselection();if(a)s.deselectNode(o);else{var d=l;s.selectNode(o,d)}}}},t.prototype.showLoadingPanel=function(e){this.gridPanel.showLoading(e)},t.prototype.setupColumns=function(){this.columnController.onColumnsChanged(),this.gridPanel.showPinnedColContainersIfNeeded()},t.prototype.updateModelAndRefresh=function(e,t){this.inMemoryRowController.updateModel(e),this.rowRenderer.refreshView(t)},t.prototype.setRows=function(t,i){t&&(this.gridOptions.rowData=t),this.inMemoryRowController.setAllRows(this.gridOptionsWrapper.getRowData(),i),this.selectionController.deselectAll(),this.filterManager.onNewRowsLoaded(),this.updateModelAndRefresh(e.Constants.STEP_EVERYTHING),this.headerRenderer.updateFilterIcons(),this.showLoadingPanel(!1)},t.prototype.ensureNodeVisible=function(e){if(this.doingVirtualPaging)throw"Cannot use ensureNodeVisible when doing virtual paging, as we cannot check rows that are not in memory";for(var t=this.rowModel.getVirtualRowCount(),i="function"==typeof e,o=-1,n=0;t>n;n++){var r=this.rowModel.getVirtualRow(n);if(i){if(e(r)){o=n;break}}else if(e===r||e===r.data){
o=n;break}}o>=0&&this.gridPanel.ensureIndexVisible(o)},t.prototype.getFilterModel=function(){return this.filterManager.getFilterModel()},t.prototype.setFocusedCell=function(e,t){this.gridPanel.ensureIndexVisible(e),this.gridPanel.ensureColIndexVisible(t);var i=this;setTimeout(function(){i.rowRenderer.setFocusedCell(e,t)},10)},t.prototype.getSortModel=function(){var e,t=this.columnController.getAllColumns(),i=[];for(e=0;e<t.length;e++)t[e].sort&&i.push(t[e]);i.sort(function(e,t){return e.sortedAt-t.sortedAt});var o=[];for(e=0;e<i.length;e++){var n={colId:i[e].colId,sort:i[e].sort};o.push(n)}return o},t.prototype.setSortModel=function(e){if(!this.gridOptionsWrapper.isEnableSorting())return void console.warn("ag-grid: You are setting the sort model on a grid that does not have sorting enabled");for(var t=null!==e&&void 0!==e&&e.length>0,i=this.columnController.getAllColumns(),o=0;o<i.length;o++){var n=i[o],r=null,s=-1;if(t&&!n.colDef.suppressSorting)for(var l=0;l<e.length;l++){var a=e[l];"string"==typeof a.colId&&"string"==typeof n.colId&&a.colId===n.colId&&(r=a.sort,s=l)}r?(n.sort=r,n.sortedAt=s):(n.sort=null,n.sortedAt=null)}this.onSortingChanged()},t.prototype.onSortingChanged=function(){this.eventService.dispatchEvent(e.Events.EVENT_BEFORE_SORT_CHANGED),this.headerRenderer.updateSortIcons(),this.gridOptionsWrapper.isEnableServerSideSorting()?this.setDatasource():this.updateModelAndRefresh(e.Constants.STEP_SORT),this.eventService.dispatchEvent(e.Events.EVENT_AFTER_SORT_CHANGED)},t.prototype.addVirtualRowListener=function(e,t){this.virtualRowCallbacks[e]||(this.virtualRowCallbacks[e]=[]),this.virtualRowCallbacks[e].push(t)},t.prototype.onVirtualRowSelected=function(e,t){this.virtualRowCallbacks[e]&&this.virtualRowCallbacks[e].forEach(function(e){"function"==typeof e.rowSelected&&e.rowSelected(t)}),this.rowRenderer.onRowSelected(e,t)},t.prototype.onVirtualRowRemoved=function(e){this.virtualRowCallbacks[e]&&this.virtualRowCallbacks[e].forEach(function(e){"function"==typeof e.rowRemoved&&e.rowRemoved()}),delete this.virtualRowCallbacks[e]},t.prototype.setColumnDefs=function(t){t&&(this.gridOptions.columnDefs=t),this.setupColumns(),this.updateModelAndRefresh(e.Constants.STEP_EVERYTHING),this.doLayout()},t.prototype.updateBodyContainerWidthAfterColResize=function(){this.rowRenderer.setMainRowWidths(),this.gridPanel.setBodyContainerWidth()},t.prototype.updatePinnedColContainerWidthAfterColResize=function(){this.gridPanel.setPinnedColContainerWidth()},t.prototype.doLayout=function(){var e=this.eRootPanel.doLayout();e&&this.rowRenderer.drawVirtualRows()},t}();e.Grid=t}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(e){var t=function(){function e(){}return e.copyAttributesToGridOptions=function(t,i){"object"!=typeof t&&(t={});var o=t;return e.SIMPLE_PROPERTIES.concat(e.WITH_IMPACT_OTHER_PROPERTIES).forEach(function(e){"undefined"!=typeof i[e]&&(o[e]=i[e])}),e.SIMPLE_BOOLEAN_PROPERTIES.concat(e.WITH_IMPACT_BOOLEAN_PROPERTIES).forEach(function(t){"undefined"!=typeof i[t]&&(o[t]=e.toBoolean(i[t]))}),e.SIMPLE_NUMBER_PROPERTIES.concat(e.WITH_IMPACT_NUMBER_PROPERTIES).forEach(function(t){"undefined"!=typeof i[t]&&(o[t]=e.toNumber(i[t]))}),t},e.processOnChange=function(t,i,o){if(o._initialised&&t){var n=i;e.SIMPLE_PROPERTIES.forEach(function(e){t[e]&&(n[e]=t[e].currentValue)}),e.SIMPLE_BOOLEAN_PROPERTIES.forEach(function(i){t[i]&&(n[i]=e.toBoolean(t[i].currentValue))}),e.SIMPLE_NUMBER_PROPERTIES.forEach(function(i){t[i]&&(n[i]=e.toNumber(t[i].currentValue))}),t.showToolPanel&&o.api.showToolPanel(o.showToolPanel),t.quickFilterText&&o.api.setQuickFilter(o.quickFilterText),t.rowData&&o.api.setRows(o.rowData),t.floatingTopRowData&&o.api.setFloatingTopRowData(o.floatingTopRowData),t.floatingBottomRowData&&o.api.setFloatingBottomRowData(o.floatingBottomRowData),t.columnDefs&&o.api.setColumnDefs(o.columnDefs),t.datasource&&o.api.setDatasource(o.datasource),t.pinnedColumnCount&&o.columnApi.setPinnedColumnCount(o.pinnedColumnCount),t.pinnedColumnCount&&o.columnApi.setPinnedColumnCount(o.pinnedColumnCount),t.groupHeaders&&o.api.setGroupHeaders(o.groupHeaders),t.headerHeight&&o.api.setHeaderHeight(o.headerHeight),t.groupKeys&&(o.gridOptions.groupKeys=o.groupKeys),t.groupAggFunction&&(o.gridOptions.groupAggFunction=o.groupAggFunction),t.groupAggFields&&(o.gridOptions.groupAggFields=o.groupAggFields)}},e.toBoolean=function(e){return"boolean"==typeof e?e:"string"==typeof e?"TRUE"===e.toUpperCase()||""==e:!1},e.toNumber=function(e){return"number"==typeof e?e:"string"==typeof e?Number(e):void 0},e.SIMPLE_PROPERTIES=["sortingOrder","icons","localeText","localeTextFunc","groupColumnDef","context","rowStyle","rowClass","headerCellRenderer","groupDefaultExpanded","slaveGrids","rowSelection"],e.SIMPLE_NUMBER_PROPERTIES=["rowHeight","rowBuffer","colWidth"],e.SIMPLE_BOOLEAN_PROPERTIES=["virtualPaging","toolPanelSuppressPivot","toolPanelSuppressValues","rowsAlreadyGrouped","suppressRowClickSelection","suppressCellSelection","suppressHorizontalScroll","debug","enableColResize","enableCellExpressions","enableSorting","enableServerSideSorting","enableFilter","enableServerSideFilter","angularCompileRows","angularCompileFilters","angularCompileHeaders","groupSuppressAutoColumn","groupSelectsChildren","groupHidePivotColumns","groupIncludeFooter","groupUseEntireRow","groupSuppressRow","groupSuppressBlankHeader","forPrint","suppressMenuHide","rowDeselection","unSortIcon","suppressMultiSort","suppressScrollLag","singleClickEdit"],e.WITH_IMPACT_NUMBER_PROPERTIES=["pinnedColumnCount","headerHeight"],e.WITH_IMPACT_BOOLEAN_PROPERTIES=["groupHeaders","showToolPanel"],e.WITH_IMPACT_OTHER_PROPERTIES=["rowData","floatingTopRowData","floatingBottomRowData","groupKeys","groupAggFields","columnDefs","datasource","quickFilterText"],e.CALLBACKS=["groupRowInnerRenderer","groupRowRenderer","groupAggFunction","isScrollLag","isExternalFilterPresent","doesExternalFilterPass","getRowClass","getRowStyle","headerCellRenderer"],e.ALL_PROPERTIES=e.SIMPLE_PROPERTIES.concat(e.SIMPLE_NUMBER_PROPERTIES).concat(e.SIMPLE_BOOLEAN_PROPERTIES).concat(e.WITH_IMPACT_NUMBER_PROPERTIES).concat(e.WITH_IMPACT_BOOLEAN_PROPERTIES).concat(e.WITH_IMPACT_OTHER_PROPERTIES),e}();e.ComponentUtil=t}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(t){function i(){n.annotations=[new o.Component({selector:"ag-grid-ng2",events:["modelUpdated","cellClicked","cellDoubleClicked","cellContextMenu","cellValueChanged","cellFocused","rowSelected","selectionChanged","beforeFilterChanged","afterFilterChanged","filterModified","beforeSortChanged","afterSortChanged","virtualRowRemoved","rowClicked","ready","columnEverythingChanged","columnPivotChanged","columnValueChanged","columnMoved","columnVisible","columnGroupOpened","columnResized","columnPinnedCountChanged"],properties:["gridOptions"].concat(t.ComponentUtil.SIMPLE_PROPERTIES).concat(t.ComponentUtil.SIMPLE_BOOLEAN_PROPERTIES).concat(t.ComponentUtil.SIMPLE_NUMBER_PROPERTIES).concat(t.ComponentUtil.WITH_IMPACT_OTHER_PROPERTIES).concat(t.ComponentUtil.WITH_IMPACT_BOOLEAN_PROPERTIES).concat(t.ComponentUtil.WITH_IMPACT_NUMBER_PROPERTIES).concat(t.ComponentUtil.CALLBACKS),compileChildren:!1,lifecycle:[o.LifecycleEvent.onInit,o.LifecycleEvent.onChange]}),new o.View({template:"",encapsulation:o.ViewEncapsulation.None})],n.parameters=[[o.ElementRef]]}var o,n=function(){function i(e){this.elementDef=e,this._initialised=!1,this.modelUpdated=new o.EventEmitter,this.cellClicked=new o.EventEmitter,this.cellDoubleClicked=new o.EventEmitter,this.cellContextMenu=new o.EventEmitter,this.cellValueChanged=new o.EventEmitter,this.cellFocused=new o.EventEmitter,this.rowSelected=new o.EventEmitter,this.selectionChanged=new o.EventEmitter,this.beforeFilterChanged=new o.EventEmitter,this.afterFilterChanged=new o.EventEmitter,this.filterModified=new o.EventEmitter,this.beforeSortChanged=new o.EventEmitter,this.afterSortChanged=new o.EventEmitter,this.virtualRowRemoved=new o.EventEmitter,this.rowClicked=new o.EventEmitter,this.ready=new o.EventEmitter,this.columnEverythingChanged=new o.EventEmitter,this.columnPivotChanged=new o.EventEmitter,this.columnValueChanged=new o.EventEmitter,this.columnMoved=new o.EventEmitter,this.columnVisible=new o.EventEmitter,this.columnGroupOpened=new o.EventEmitter,this.columnResized=new o.EventEmitter,this.columnPinnedCountChanged=new o.EventEmitter}return i.prototype.onInit=function(){this.gridOptions=t.ComponentUtil.copyAttributesToGridOptions(this.gridOptions,this);var i=this.elementDef.nativeElement,o=this.globalEventListener.bind(this);this._agGrid=new e.grid.Grid(i,this.gridOptions,o),this.api=this.gridOptions.api,this.columnApi=this.gridOptions.columnApi,this._initialised=!0},i.prototype.onChange=function(e){t.ComponentUtil.processOnChange(e,this.gridOptions,this)},i.prototype.globalEventListener=function(e,i){var o;switch(e){case t.Events.EVENT_COLUMN_GROUP_OPENED:o=this.columnGroupOpened;break;case t.Events.EVENT_COLUMN_EVERYTHING_CHANGED:o=this.columnEverythingChanged;break;case t.Events.EVENT_COLUMN_MOVED:o=this.columnMoved;break;case t.Events.EVENT_COLUMN_PINNED_COUNT_CHANGED:o=this.columnPinnedCountChanged;break;case t.Events.EVENT_COLUMN_PIVOT_CHANGE:o=this.columnPivotChanged;break;case t.Events.EVENT_COLUMN_RESIZED:o=this.columnResized;break;case t.Events.EVENT_COLUMN_VALUE_CHANGE:o=this.columnValueChanged;break;case t.Events.EVENT_COLUMN_VISIBLE:o=this.columnVisible;break;case t.Events.EVENT_MODEL_UPDATED:o=this.modelUpdated;break;case t.Events.EVENT_CELL_CLICKED:o=this.cellClicked;break;case t.Events.EVENT_CELL_DOUBLE_CLICKED:o=this.cellDoubleClicked;break;case t.Events.EVENT_CELL_CONTEXT_MENU:o=this.cellContextMenu;break;case t.Events.EVENT_CELL_VALUE_CHANGED:o=this.cellValueChanged;break;case t.Events.EVENT_CELL_FOCUSED:o=this.cellFocused;break;case t.Events.EVENT_ROW_SELECTED:o=this.rowSelected;break;case t.Events.EVENT_SELECTION_CHANGED:o=this.selectionChanged;break;case t.Events.EVENT_BEFORE_FILTER_CHANGED:o=this.beforeFilterChanged;break;case t.Events.EVENT_AFTER_FILTER_CHANGED:o=this.afterFilterChanged;break;case t.Events.EVENT_AFTER_SORT_CHANGED:o=this.afterSortChanged;break;case t.Events.EVENT_BEFORE_SORT_CHANGED:o=this.beforeSortChanged;break;case t.Events.EVENT_FILTER_MODIFIED:o=this.filterModified;break;case t.Events.EVENT_VIRTUAL_ROW_REMOVED:o=this.virtualRowRemoved;break;case t.Events.EVENT_ROW_CLICKED:o=this.rowClicked;break;case t.Events.EVENT_READY:o=this.ready;break;default:return void console.log("ag-Grid: AgGridNg2 - unknown event type: "+e)}o.next(i)},i}();t.AgGridNg2=n,window.ng&&window.ng.Component?(o=window.ng,i()):window.System&&window.System["import"]&&window.System["import"]("angular2/angular2").then(function(e){o=e,i()})}(t=e.grid||(e.grid={}))}(ag||(ag={}));var ag;!function(e){var t;!function(t){function i(e){if("string"==typeof e){var t=e.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()});return t}return e}if(document.registerElement){var o=Object.create(HTMLElement.prototype);t.ComponentUtil.ALL_PROPERTIES.forEach(function(e){Object.defineProperty(o,e,{set:function(t){this.__agGridSetProperty(e,t)},get:function(){return this.__agGridGetProperty(e)}})}),o.__agGridSetProperty=function(e,t){this.__attributes||(this.__attributes={}),this.__attributes[e]=t;var i={};i[e]={currentValue:t},this.onChange(i)},o.onChange=function(e){t.ComponentUtil.processOnChange(e,this.gridOptions,this)},o.__agGridGetProperty=function(e){return this.__attributes||(this.__attributes={}),this.__attributes[e]},o.setGridOptions=function(i){var o=this.globalEventListener.bind(this);this._gridOptions=t.ComponentUtil.copyAttributesToGridOptions(i,this),this._agGrid=new e.grid.Grid(this,this._gridOptions,o),this.api=i.api,this.columnApi=i.columnApi,this._initialised=!0},o.createdCallback=function(){for(var e=0;e<this.attributes.length;e++){var t=this.attributes[e];this.setPropertyFromAttribute(t)}},o.setPropertyFromAttribute=function(e){var o=i(e.nodeName),n=e.nodeValue;t.ComponentUtil.ALL_PROPERTIES.indexOf(o)>=0&&(this[o]=n)},o.attachedCallback=function(e){},o.detachedCallback=function(e){},o.attributeChangedCallback=function(e){var t=this.attributes[e];this.setPropertyFromAttribute(t)},o.globalEventListener=function(e,t){var i=e.toLowerCase(),o=new Event(i),n=o;n.agGridDetails=t,this.dispatchEvent(o);var r="on"+i;"function"==typeof this[r]&&this[r](o)},document.registerElement("ag-grid",{prototype:o})}}(t=e.grid||(e.grid={}))}(ag||(ag={})),function(){function e(e,t,i,o){var n,r,s=o.agGrid;if(r=s+".quickFilterText",n=t.$eval(s),!n)return void console.warn("WARNING - grid options for ag-Grid not found. Please ensure the attribute ag-grid points to a valid object on the scope");var l=e[0],a=new ag.grid.Grid(l,n,null,t,i,r);t.$on("$destroy",function(){a.setFinished()})}function t(e,t){var i;if("string"==typeof e){if(i=document.querySelector(e),!i)return void console.warn("WARNING - was not able to find element "+e+" in the DOM, Angular Grid initialisation aborted.")}else i=e;new ag.grid.Grid(i,t)}var i=this,o=window.angular;if("undefined"!=typeof o&&"undefined"!=typeof o.module&&"undefined"!==o.directive){var n=o.module("agGrid",[]);n.directive("agGrid",function(){return{restrict:"A",controller:["$element","$scope","$compile","$attrs",e],scope:!0}})}"undefined"!=typeof exports&&("undefined"!=typeof module&&module.exports&&(exports=module.exports=t),exports.angularGrid=t),i.agGridGlobalFunc=t}.call(window);
ag-grid-ng2 {
  display: inline-block;
}
.ag-root {
  font-size: 14px;
  cursor: default;
/* set to relative, so absolute popups appear relative to this */
  position: relative;
/* disable user mouse selection */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
/* was getting some 'should be there' scrolls, this sorts it out */
  overflow: hidden;
}
.ag-no-scrolls {
  white-space: nowrap;
  display: inline-block;
}
.ag-scrolls {
  height: 100%;
}
.ag-popup-backdrop {
  position: fixed;
  left: 0px;
  top: 0px;
  width: 100%;
  height: 100%;
}
.ag-header {
  position: absolute;
  top: 0px;
  left: 0px;
  white-space: nowrap;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  overflow: hidden;
  width: 100%;
}
.ag-pinned-header {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  display: inline-block;
  overflow: hidden;
  height: 100%;
}
.ag-header-viewport {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  display: inline-block;
  overflow: hidden;
  height: 100%;
}
.ag-scrolls .ag-header-container {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  position: relative;
  white-space: nowrap;
  height: 100%;
}
.ag-no-scrolls .ag-header-container {
  white-space: nowrap;
}
.ag-header-cell {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  vertical-align: bottom;
  text-align: center;
  display: inline-block;
}
.ag-header-cell-grouped {
  height: 50%;
}
.ag-header-cell-not-grouped {
  height: 100%;
}
.ag-header-group {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  display: inline-block;
  height: 100%;
}
.ag-header-group-cell {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  text-align: center;
  height: 50%;
  -o-text-overflow: ellipsis;
  text-overflow: ellipsis;
  overflow: hidden;
}
.ag-header-group-cell-label {
  -o-text-overflow: ellipsis;
  text-overflow: ellipsis;
  overflow: hidden;
}
.ag-header-cell-label {
  -o-text-overflow: ellipsis;
  text-overflow: ellipsis;
  overflow: hidden;
}
.ag-header-cell-resize {
  height: 100%;
  width: 4px;
  float: right;
  cursor: col-resize;
}
.ag-header-cell-menu-button {
  float: right;
}
.ag-loading-panel {
  display: table;
  width: 100%;
  height: 100%;
}
.ag-loading-wrapper {
  display: table-cell;
  vertical-align: middle;
  text-align: center;
}
.ag-body {
  height: 100%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
.ag-floating-top {
  position: absolute;
  left: 0px;
  width: 100%;
  white-space: nowrap;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  overflow: hidden;
}
.ag-pinned-floating-top {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  display: inline-block;
  overflow: hidden;
  height: 100%;
  position: relative;
}
.ag-floating-top-viewport {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  display: inline-block;
  overflow: hidden;
  height: 100%;
}
.ag-floating-top-container {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  position: relative;
  white-space: nowrap;
}
.ag-floating-bottom {
  position: absolute;
  left: 0px;
  width: 100%;
  white-space: nowrap;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  overflow: hidden;
}
.ag-pinned-floating-bottom {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  display: inline-block;
  overflow: hidden;
  height: 100%;
  position: relative;
}
.ag-floating-bottom-viewport {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  display: inline-block;
  overflow: hidden;
  height: 100%;
}
.ag-floating-bottom-container {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  position: relative;
  white-space: nowrap;
}
.ag-pinned-cols-viewport {
  float: left;
  position: absolute;
  overflow: hidden;
}
.ag-pinned-cols-container {
  display: inline-block;
  position: relative;
}
.ag-body-viewport-wrapper {
  height: 100%;
}
.ag-body-viewport {
  overflow: auto;
  height: 100%;
}
.ag-scrolls .ag-body-container {
  position: relative;
  display: inline-block;
}
.ag-scrolls .ag-row {
  white-space: nowrap;
  position: absolute;
  width: 100%;
}
.agile-gird-row:hover {
  background-color: #f0f8ff;
}
.ag-cell {
  display: inline-block;
  white-space: nowrap;
  height: 100%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -o-text-overflow: ellipsis;
  text-overflow: ellipsis;
  overflow: hidden;
  float: left;
}
.ag-group-cell-entire-row {
  width: 100%;
  display: inline-block;
  white-space: nowrap;
  height: 100%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -o-text-overflow: ellipsis;
  text-overflow: ellipsis;
  overflow: hidden;
}
.ag-footer-cell-entire-row {
  width: 100%;
  display: inline-block;
  white-space: nowrap;
  height: 100%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -o-text-overflow: ellipsis;
  text-overflow: ellipsis;
  overflow: hidden;
}
.ag-large .ag-root {
  font-size: 20px;
}
.ag-filter {
  position: absolute;
  z-index: 100;
}
.ag-filter-list-viewport {
  overflow-x: auto;
  height: 200px;
  width: 200px;
}
.ag-filter-list-container {
  position: relative;
  overflow: hidden;
}
.ag-filter-item {
  -o-text-overflow: ellipsis;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  position: absolute;
}
.ag-filter-filter {
  width: 170px;
  margin: 4px;
}
.ag-filter-select {
  width: 110px;
  margin: 4px 4px 0px 4px;
}
.ag-no-vertical-scroll .ag-scrolls {
  height: unset;
}
.ag-no-vertical-scroll .ag-body {
  height: unset;
}
.ag-no-vertical-scroll .ag-body-viewport-wrapper {
  height: unset;
}
.ag-no-vertical-scroll .ag-body-viewport {
  height: unset;
}
.ag-list-selection {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: default;
}
.ag-tool-panel-container {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: default;
  width: 200px;
}