text: /*!
  * ui-grid - v3.0.0-rc.20-b2fdba9 - 2015-03-22
  * Copyright (c) 2015 ; License: MIT
  */
  !function(){"use strict";angular.module("ui.grid.i18n",[]),angular.module("ui.grid",["ui.grid.i18n"])}(),function(){"use strict";angular.module("ui.grid").constant("uiGridConstants",{LOG_DEBUG_MESSAGES:!0,LOG_WARN_MESSAGES:!0,LOG_ERROR_MESSAGES:!0,CUSTOM_FILTERS:/CUSTOM_FILTERS/g,COL_FIELD:/COL_FIELD/g,MODEL_COL_FIELD:/MODEL_COL_FIELD/g,TOOLTIP:/title=\"TOOLTIP\"/g,DISPLAY_CELL_TEMPLATE:/DISPLAY_CELL_TEMPLATE/g,TEMPLATE_REGEXP:/<.+>/,FUNC_REGEXP:/(\([^)]*\))?$/,DOT_REGEXP:/\./g,APOS_REGEXP:/'/g,BRACKET_REGEXP:/^(.*)((?:\s*\[\s*\d+\s*\]\s*)|(?:\s*\[\s*"(?:[^"\\]|\\.)*"\s*\]\s*)|(?:\s*\[\s*'(?:[^'\\]|\\.)*'\s*\]\s*))(.*)$/,COL_CLASS_PREFIX:"ui-grid-col",events:{GRID_SCROLL:"uiGridScroll",COLUMN_MENU_SHOWN:"uiGridColMenuShown",ITEM_DRAGGING:"uiGridItemDragStart",COLUMN_HEADER_CLICK:"uiGridColumnHeaderClick"},keymap:{TAB:9,STRG:17,CTRL:17,CTRLRIGHT:18,CTRLR:18,SHIFT:16,RETURN:13,ENTER:13,BACKSPACE:8,BCKSP:8,ALT:18,ALTR:17,ALTRIGHT:17,SPACE:32,WIN:91,MAC:91,FN:null,PG_UP:33,PG_DOWN:34,UP:38,DOWN:40,LEFT:37,RIGHT:39,ESC:27,DEL:46,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123},ASC:"asc",DESC:"desc",filter:{STARTS_WITH:2,ENDS_WITH:4,EXACT:8,CONTAINS:16,GREATER_THAN:32,GREATER_THAN_OR_EQUAL:64,LESS_THAN:128,LESS_THAN_OR_EQUAL:256,NOT_EQUAL:512,SELECT:"select",INPUT:"input"},aggregationTypes:{sum:2,count:4,avg:8,min:16,max:32},CURRENCY_SYMBOLS:["ƒ","$","£","$","¤","¥","៛","₩","₱","฿","₫"],scrollDirection:{UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",NONE:"none"},dataChange:{ALL:"all",EDIT:"edit",ROW:"row",COLUMN:"column",OPTIONS:"options"},scrollbars:{NEVER:0,ALWAYS:1}})}(),angular.module("ui.grid").directive("uiGridCell",["$compile","$parse","gridUtil","uiGridConstants",function(a,b,c,d){var e={priority:0,scope:!1,require:"?^uiGrid",compile:function(){return{pre:function(b,e,f,g){function h(){var a=b.col.compiledElementFn;a(b,function(a){e.append(a)})}if(g&&b.col.compiledElementFn)h();else if(g&&!b.col.compiledElementFn)b.col.getCompiledElementFn().then(function(a){a(b,function(a){e.append(a)})});else{var i=b.col.cellTemplate.replace(d.MODEL_COL_FIELD,"row.entity."+c.preEval(b.col.field)).replace(d.COL_FIELD,"grid.getCellValue(row, col)"),j=a(i)(b);e.append(j)}},post:function(a,b){var c=a.col.getColClass(!1);b.addClass(c);var e,f=function(){var c=b;e&&(c.removeClass(e),e=null),e=angular.isFunction(a.col.cellClass)?a.col.cellClass(a.grid,a.row,a.col,a.rowRenderIndex,a.colRenderIndex):a.col.cellClass,c.addClass(e)};a.col.cellClass&&f();var g=a.grid.registerDataChangeCallback(f,[d.dataChange.COLUMN,d.dataChange.EDIT]),h=function(d,g){if(d!==g){(e||a.col.cellClass)&&f();var h=a.col.getColClass(!1);h!==c&&(b.removeClass(c),b.addClass(h),c=h)}},i=a.$watch("col",h),j=a.$watch("row",h),k=function(){g(),i(),j()};a.$on("$destroy",k),b.on("$destroy",k)}}}};return e}]),function(){angular.module("ui.grid").service("uiGridColumnMenuService",["i18nService","uiGridConstants","gridUtil",function(a,b,c){var d={initialize:function(a,b){a.grid=b.grid,b.columnMenuScope=a,a.menuShown=!1},setColMenuItemWatch:function(a){var b=a.$watch("col.menuItems",function(b){"undefined"!=typeof b&&b&&angular.isArray(b)?(b.forEach(function(b){"undefined"!=typeof b.context&&b.context||(b.context={}),b.context.col=a.col}),a.menuItems=a.defaultMenuItems.concat(b)):a.menuItems=a.defaultMenuItems});a.$on("$destroy",b)},sortable:function(a){return a.grid.options.enableSorting&&"undefined"!=typeof a.col&&a.col&&a.col.enableSorting?!0:!1},isActiveSort:function(a,b){return"undefined"!=typeof a.col&&"undefined"!=typeof a.col.sort&&"undefined"!=typeof a.col.sort.direction&&a.col.sort.direction===b},suppressRemoveSort:function(a){return a.col&&a.col.suppressRemoveSort?!0:!1},hideable:function(a){return"undefined"!=typeof a.col&&a.col&&a.col.colDef&&a.col.colDef.enableHiding===!1?!1:!0},getDefaultMenuItems:function(c){return[{title:a.getSafeText("sort.ascending"),icon:"ui-grid-icon-sort-alt-up",action:function(a){a.stopPropagation(),c.sortColumn(a,b.ASC)},shown:function(){return d.sortable(c)},active:function(){return d.isActiveSort(c,b.ASC)}},{title:a.getSafeText("sort.descending"),icon:"ui-grid-icon-sort-alt-down",action:function(a){a.stopPropagation(),c.sortColumn(a,b.DESC)},shown:function(){return d.sortable(c)},active:function(){return d.isActiveSort(c,b.DESC)}},{title:a.getSafeText("sort.remove"),icon:"ui-grid-icon-cancel",action:function(a){a.stopPropagation(),c.unsortColumn()},shown:function(){return d.sortable(c)&&"undefined"!=typeof c.col&&"undefined"!=typeof c.col.sort&&"undefined"!=typeof c.col.sort.direction&&null!==c.col.sort.direction&&!d.suppressRemoveSort(c)}},{title:a.getSafeText("column.hide"),icon:"ui-grid-icon-cancel",shown:function(){return d.hideable(c)},action:function(a){a.stopPropagation(),c.hideColumn()}}]},getColumnElementPosition:function(a,b,d){var e={};return e.left=d[0].offsetLeft,e.top=d[0].offsetTop,e.parentLeft=d[0].offsetParent.offsetLeft,e.offset=0,b.grid.options.offsetLeft&&(e.offset=b.grid.options.offsetLeft),e.height=c.elementHeight(d,!0),e.width=c.elementWidth(d,!0),e},repositionMenu:function(a,b,d,e,f){var g=e[0].querySelectorAll(".ui-grid-menu"),h=b.renderContainer?b.renderContainer:"body",i=(b.grid.renderContainers[h],c.closestElm(f,".ui-grid-render-container")),j=i.getBoundingClientRect().left-a.grid.element[0].getBoundingClientRect().left,k=i.querySelectorAll(".ui-grid-viewport")[0].scrollLeft,l=b.lastMenuWidth?b.lastMenuWidth:a.lastMenuWidth?a.lastMenuWidth:170,m=b.lastMenuPaddingRight?b.lastMenuPaddingRight:a.lastMenuPaddingRight?a.lastMenuPaddingRight:10;if(0!==g.length){var n=g[0].querySelectorAll(".ui-grid-menu-mid");0===n.length||angular.element(n).hasClass("ng-hide")||(l=c.elementWidth(g,!0),a.lastMenuWidth=l,b.lastMenuWidth=l,m=parseInt(c.getStyles(angular.element(g)[0]).paddingRight,10),a.lastMenuPaddingRight=m,b.lastMenuPaddingRight=m)}var o=d.left+j-k+d.parentLeft+d.width-l+m;o<d.offset&&(o=d.offset),e.css("left",o+"px"),e.css("top",d.top+d.height+"px")}};return d}]).directive("uiGridColumnMenu",["$timeout","gridUtil","uiGridConstants","uiGridColumnMenuService",function(a,b,c,d){var e={priority:0,scope:!0,require:"?^uiGrid",templateUrl:"ui-grid/uiGridColumnMenu",replace:!0,link:function(b,e,f,g){var h=this;d.initialize(b,g),b.defaultMenuItems=d.getDefaultMenuItems(b),b.menuItems=b.defaultMenuItems,d.setColMenuItemWatch(b),b.showMenu=function(a,c,f){b.col=a;var g=d.getColumnElementPosition(b,a,c);b.menuShown?(b.colElement=c,b.colElementPosition=g,b.hideThenShow=!0,b.$broadcast("hide-menu",{originalEvent:f})):(h.shown=b.menuShown=!0,d.repositionMenu(b,a,g,e,c),b.colElement=c,b.colElementPosition=g,b.$broadcast("show-menu",{originalEvent:f}))},b.hideMenu=function(a){b.menuShown=!1,a||b.$broadcast("hide-menu")},b.$on("menu-hidden",function(){b.hideThenShow?(delete b.hideThenShow,d.repositionMenu(b,b.col,b.colElementPosition,e,b.colElement),b.$broadcast("show-menu"),b.menuShown=!0):b.hideMenu(!0)}),b.$on("menu-shown",function(){a(function(){d.repositionMenu(b,b.col,b.colElementPosition,e,b.colElement),delete b.colElementPosition,delete b.columnElement},200)}),b.sortColumn=function(a,c){a.stopPropagation(),b.grid.sortColumn(b.col,c,!0).then(function(){b.grid.refresh(),b.hideMenu()})},b.unsortColumn=function(){b.col.unsort(),b.grid.refresh(),b.hideMenu()},b.hideColumn=function(){b.col.colDef.visible=!1,b.grid.refresh(),b.hideMenu(),b.grid.api.core.notifyDataChange(c.dataChange.COLUMN),b.grid.api.core.raise.columnVisibilityChanged(b.col)}},controller:["$scope",function(a){var b=this;a.$watch("menuItems",function(a){b.menuItems=a})}]};return e}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridFooterCell",["$timeout","gridUtil","uiGridConstants","$compile",function(a,b,c,d){var e={priority:0,scope:{col:"=",row:"=",renderIndex:"="},replace:!0,require:"^uiGrid",compile:function(){return{pre:function(a,b){var c=d(a.col.footerCellTemplate)(a);b.append(c)},post:function(a,b,d,e){a.grid=e.grid,b.addClass(a.col.getColClass(!1));var f,g=function(){var c=b;f&&(c.removeClass(f),f=null),f=angular.isFunction(a.col.footerCellClass)?a.col.footerCellClass(a.grid,a.row,a.col,a.rowRenderIndex,a.colRenderIndex):a.col.footerCellClass,c.addClass(f)};a.col.footerCellClass&&g();var h=a.grid.registerDataChangeCallback(g,[c.dataChange.COLUMN]);a.$on("$destroy",h)}}}};return e}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridFooter",["$templateCache","$compile","uiGridConstants","gridUtil","$timeout",function(a,b,c,d){var e="ui-grid/ui-grid-footer";return{restrict:"EA",replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:!0,compile:function(){return{pre:function(a,c,f,g){var h=g[0],i=g[1];a.grid=h.grid,a.colContainer=i.colContainer,i.footer=c;var j=a.grid.options.footerTemplate?a.grid.options.footerTemplate:e;d.getTemplate(j).then(function(d){var e=angular.element(d),f=b(e)(a);if(c.append(f),i){var g=c[0].getElementsByClassName("ui-grid-footer-viewport")[0];g&&(i.footerViewport=g)}})},post:function(a,b,c,e){{var f=e[0],g=e[1];f.grid}d.disableAnimations(b),g.footer=b;var h=b[0].getElementsByClassName("ui-grid-footer-viewport")[0];h&&(g.footerViewport=h)}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridGridFooter",["$templateCache","$compile","uiGridConstants","gridUtil","$timeout",function(a,b,c,d){var e="ui-grid/ui-grid-grid-footer";return{restrict:"EA",replace:!0,require:"^uiGrid",scope:!0,compile:function(){return{pre:function(a,c,f,g){a.grid=g.grid;var h=a.grid.options.gridFooterTemplate?a.grid.options.gridFooterTemplate:e;d.getTemplate(h).then(function(d){var e=angular.element(d),f=b(e)(a);c.append(f)})},post:function(){}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridGroupPanel",["$compile","uiGridConstants","gridUtil",function(a,b,c){var d="ui-grid/ui-grid-group-panel";return{restrict:"EA",replace:!0,require:"?^uiGrid",scope:!1,compile:function(){return{pre:function(b,e){var f=b.grid.options.groupPanelTemplate||d;c.getTemplate(f).then(function(c){var d=angular.element(c),f=a(d)(b);e.append(f)})},post:function(a,b){b.bind("$destroy",function(){})}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridHeaderCell",["$compile","$timeout","$window","$document","gridUtil","uiGridConstants","ScrollEvent",function(a,b,c,d,e,f){var g=500,h={priority:0,scope:{col:"=",row:"=",renderIndex:"="},require:["?^uiGrid","^uiGridRenderContainer"],replace:!0,compile:function(){return{pre:function(b,c){var d=a(b.col.headerCellTemplate)(b);c.append(d)},post:function(a,c,d,h){function i(b){var c=!1;b.shiftKey&&(c=!0),j.grid.sortColumn(a.col,c).then(function(){j.columnMenuScope&&j.columnMenuScope.hideMenu(),j.grid.refresh()})}var j=h[0],k=h[1];a.grid=j.grid,a.renderContainer=j.grid.renderContainers[k.containerId];var l=a.col.getColClass(!1);c.addClass(l),a.menuShown=!1,a.asc=f.ASC,a.desc=f.DESC;var m,n=(angular.element(c[0].querySelectorAll(".ui-grid-header-cell-menu")),angular.element(c[0].querySelectorAll(".ui-grid-cell-contents"))),o=function(){var d=c;m&&(d.removeClass(m),m=null),m=angular.isFunction(a.col.headerCellClass)?a.col.headerCellClass(a.grid,a.row,a.col,a.rowRenderIndex,a.colRenderIndex):a.col.headerCellClass,d.addClass(m);var h=a.grid.renderContainers.right?a.grid.renderContainers.right:a.grid.renderContainers.body;a.isLastCol=a.col===h.visibleColumnCache[h.visibleColumnCache.length-1],a.sortable=j.grid.options.enableSorting&&a.col.enableSorting?!0:!1,a.filterable=j.grid.options.enableFiltering&&a.col.enableFiltering?!0:!1,a.colMenu=a.col.grid.options&&a.col.grid.options.enableColumnMenus!==!1&&a.col.colDef&&a.col.colDef.enableColumnMenu!==!1?!0:!1;var k=e.isTouchEnabled()?"touchstart":"mousedown";if(a.sortable||a.colMenu){var l,o=0;n.on(k,function(d){d.stopPropagation(),"undefined"!=typeof d.originalEvent&&void 0!==d.originalEvent&&(d=d.originalEvent),d.button&&0!==d.button||(o=(new Date).getTime(),l=b(function(){},g),l.then(function(){a.colMenu&&j.columnMenuScope.showMenu(a.col,c,d)}),j.fireEvent(f.events.COLUMN_HEADER_CLICK,{event:d,columnName:a.col.colDef.name}))});var p=e.isTouchEnabled()?"touchend":"mouseup";n.on(p,function(){b.cancel(l)}),a.$on("$destroy",function(){n.off("mousedown touchstart")})}else n.off(k);var q=e.isTouchEnabled()?"touchend":"click";a.sortable?(n.on(q,function(a){a.stopPropagation(),b.cancel(l);var c=(new Date).getTime(),d=c-o;d>g||i(a)}),a.$on("$destroy",function(){b.cancel(l)})):n.off(q);var r=[];a.filterable?(a.col.filters.forEach(function(b,c){r.push(a.$watch("col.filters["+c+"].term",function(a,b){a!==b&&(j.grid.api.core.raise.filterChanged(),j.grid.refresh(!0))}))}),a.$on("$destroy",function(){r.forEach(function(a){a()})})):r.forEach(function(a){a()})};a.$watch("col",function(b,d){if(b!==d){var e=a.col.getColClass(!1);e!==l&&(c.removeClass(l),c.addClass(e),l=e)}}),o();var p=a.grid.registerDataChangeCallback(o,[f.dataChange.COLUMN]);a.$on("$destroy",p),a.toggleMenu=function(b){b.stopPropagation(),j.columnMenuScope.menuShown&&j.columnMenuScope.col===a.col?j.columnMenuScope.hideMenu():j.columnMenuScope.showMenu(a.col,c)}}}}};return h}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridHeader",["$templateCache","$compile","uiGridConstants","gridUtil","$timeout",function(a,b,c,d){var e="ui-grid/ui-grid-header",f="ui-grid/ui-grid-no-header";return{restrict:"EA",replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:!0,compile:function(){return{pre:function(a,c,g,h){function i(){k.header=k.colContainer.header=c;var a=c[0].getElementsByClassName("ui-grid-header-canvas");k.headerCanvas=a.length>0?k.colContainer.headerCanvas=a[0]:null}var j=h[0],k=h[1];a.grid=j.grid,a.colContainer=k.colContainer,i();var l;l=a.grid.options.showHeader?a.grid.options.headerTemplate?a.grid.options.headerTemplate:e:f,d.getTemplate(l).then(function(d){var e=angular.element(d),f=b(e)(a);if(c.replaceWith(f),c=f,i(),k){var g=c[0].getElementsByClassName("ui-grid-header-viewport")[0];g&&(k.headerViewport=g)}a.grid.queueRefresh()})},post:function(a,b,c,e){function f(){var a=h.colContainer.getViewportWidth()-i.scrollbarWidth,b=h.colContainer.visibleColumnCache,c=0,e=0,f=0,g=a,j=!1,k=function(b){return"manual"===b.widthType?+b.width:"percent"===b.widthType?parseInt(b.width.replace(/%/g,""),10)*a/100:"auto"===b.widthType?(0===f&&(f=parseInt(g/e,10)),b.width.length*f):void 0};b.forEach(function(a){a.widthType=null,isFinite(+a.width)?a.widthType="manual":d.endsWith(a.width,"%")?(a.widthType="percent",j=!0):angular.isString(a.width)&&-1!==a.width.indexOf("*")&&(a.widthType="auto",e+=a.width.length,j=!0)});var l=["manual","percent","auto"];if(b.filter(function(a){return a.visible&&a.widthType}).sort(function(a,b){return l.indexOf(a.widthType)-l.indexOf(b.widthType)}).forEach(function(a){var b=k(a);a.minWidth&&(b=Math.max(b,a.minWidth)),a.maxWidth&&(b=Math.min(b,a.maxWidth)),a.drawnWidth=Math.floor(b),c+=a.drawnWidth,g-=a.drawnWidth}),j&&g>0&&c>0&&a>c){var m=function(a){g>0&&("auto"===a.widthType||"percent"===a.widthType)&&(a.drawnWidth=a.drawnWidth+1,c+=1,g--)},n=0;do n=g,b.forEach(m);while(g>0&&g!==n)}c=Math.max(c,a);var o="";return b.forEach(function(a){o+=a.getColClassDefinition()}),b.length>0&&(b[b.length-1].headerWidth=b[b.length-1].drawnWidth-30),h.colContainer.canvasWidth=parseInt(c,10),o}var g=e[0],h=e[1],i=g.grid;d.disableAnimations(b),h.header=b;var j=b[0].getElementsByClassName("ui-grid-header-viewport")[0];j&&(h.headerViewport=j),g&&g.grid.registerStyleComputation({priority:5,func:f})}}}}}])}(),function(){angular.module("ui.grid").service("uiGridGridMenuService",["gridUtil","i18nService","uiGridConstants",function(a,b,c){var d={initialize:function(a,b){b.gridMenuScope=a,a.grid=b,a.registeredMenuItems=[],a.$on("$destroy",function(){a.grid&&a.grid.gridMenuScope&&(a.grid.gridMenuScope=null),a.grid&&(a.grid=null),a.registeredMenuItems&&(a.registeredMenuItems=null)}),a.registeredMenuItems=[],b.api.registerMethod("core","addToGridMenu",d.addToGridMenu),b.api.registerMethod("core","removeFromGridMenu",d.removeFromGridMenu)},addToGridMenu:function(b,c){angular.isArray(c)?b.gridMenuScope?(b.gridMenuScope.registeredMenuItems=b.gridMenuScope.registeredMenuItems?b.gridMenuScope.registeredMenuItems:[],b.gridMenuScope.registeredMenuItems=b.gridMenuScope.registeredMenuItems.concat(c)):a.logError("Asked to addToGridMenu, but gridMenuScope not present. Timing issue? Please log issue with ui-grid"):a.logError("addToGridMenu: menuItems must be an array, and is not, not adding any items")},removeFromGridMenu:function(b,c){var d=-1;b&&b.gridMenuScope&&b.gridMenuScope.registeredMenuItems.forEach(function(b,e){b.id===c&&(d>-1?a.logError("removeFromGridMenu: found multiple items with the same id, removing only the last"):d=e)}),d>-1&&b.gridMenuScope.registeredMenuItems.splice(d,1)},getMenuItems:function(b){var c=[];return b.grid.options.gridMenuCustomItems&&(angular.isArray(b.grid.options.gridMenuCustomItems)?c=c.concat(b.grid.options.gridMenuCustomItems):a.logError("gridOptions.gridMenuCustomItems must be an array, and is not")),c=c.concat(b.registeredMenuItems),b.grid.options.gridMenuShowHideColumns!==!1&&(c=c.concat(d.showHideColumns(b))),c},showHideColumns:function(a){var c=[];return a.grid.options.columnDefs&&0!==a.grid.options.columnDefs.length&&0!==a.grid.columns.length?(c.push({title:b.getSafeText("gridMenu.columns")}),a.grid.options.gridMenuTitleFilter=a.grid.options.gridMenuTitleFilter?a.grid.options.gridMenuTitleFilter:function(a){return a},a.grid.options.columnDefs.forEach(function(b){if(b.enableHiding!==!1){var e={icon:"ui-grid-icon-ok",action:function(a){a.stopPropagation(),d.toggleColumnVisibility(this.context.gridCol)},shown:function(){return this.context.gridCol.colDef.visible===!0||void 0===this.context.gridCol.colDef.visible},context:{gridCol:a.grid.getColumn(b.name||b.field)},leaveOpen:!0};d.setMenuItemTitle(e,b,a.grid),c.push(e),e={icon:"ui-grid-icon-cancel",action:function(a){a.stopPropagation(),d.toggleColumnVisibility(this.context.gridCol)},shown:function(){return!(this.context.gridCol.colDef.visible===!0||void 0===this.context.gridCol.colDef.visible)},context:{gridCol:a.grid.getColumn(b.name||b.field)},leaveOpen:!0},d.setMenuItemTitle(e,b,a.grid),c.push(e)}}),c):c},setMenuItemTitle:function(b,c,d){var e=d.options.gridMenuTitleFilter(c.displayName||c.name||c.field);"string"==typeof e?b.title=e:e.then?(b.title="",e.then(function(a){b.title=a},function(a){b.title=a})):(a.logError("Expected gridMenuTitleFilter to return a string or a promise, it has returned neither, bad config"),b.title="badconfig")},toggleColumnVisibility:function(a){a.colDef.visible=!(a.colDef.visible===!0||void 0===a.colDef.visible),a.grid.refresh(),a.grid.api.core.notifyDataChange(c.dataChange.COLUMN),a.grid.api.core.raise.columnVisibilityChanged(a)}};return d}]).directive("uiGridMenuButton",["gridUtil","uiGridConstants","uiGridGridMenuService",function(a,b,c){return{priority:0,scope:!0,require:["?^uiGrid"],templateUrl:"ui-grid/ui-grid-menu-button",replace:!0,link:function(a,b,d,e){var f=e[0];c.initialize(a,f.grid),a.shown=!1,a.toggleMenu=function(){a.shown?(a.$broadcast("hide-menu"),a.shown=!1):(a.menuItems=c.getMenuItems(a),a.$broadcast("show-menu"),a.shown=!0)},a.$on("menu-hidden",function(){a.shown=!1})}}}])}(),function(){angular.module("ui.grid").directive("uiGridMenu",["$compile","$timeout","$window","$document","gridUtil","uiGridConstants",function(a,b,c,d,e,f){var g={priority:0,scope:{menuItems:"=",autoHide:"=?"},require:"?^uiGrid",templateUrl:"ui-grid/uiGridMenu",replace:!1,link:function(a,d,e,g){var h=this;h.showMenu=a.showMenu=function(c,d){a.shown?a.shownMid||(a.shownMid=!0,a.$emit("menu-shown")):(a.shown=!0,b(function(){a.shownMid=!0,a.$emit("menu-shown")}));var e="click";d&&d.originalEvent&&d.originalEvent.type&&"touchstart"===d.originalEvent.type&&(e=d.originalEvent.type),angular.element(document).off("click touchstart",i),b(function(){angular.element(document).on(e,i)})},h.hideMenu=a.hideMenu=function(){a.shown&&(a.shownMid=!1,b(function(){a.shownMid||(a.shown=!1,a.$emit("menu-hidden"))},200)),angular.element(document).off("click touchstart",i)},a.$on("hide-menu",function(b,c){a.hideMenu(b,c)}),a.$on("show-menu",function(b,c){a.showMenu(b,c)});var i=function(){a.shown&&a.$apply(function(){a.hideMenu()})};("undefined"==typeof a.autoHide||void 0===a.autoHide)&&(a.autoHide=!0),a.autoHide&&angular.element(c).on("resize",i),a.$on("$destroy",function(){angular.element(document).off("click touchstart",i)}),a.$on("$destroy",function(){angular.element(c).off("resize",i)}),g&&a.$on("$destroy",g.grid.api.core.on.scrollEvent(a,i)),a.$on("$destroy",a.$on(f.events.ITEM_DRAGGING,i))},controller:["$scope","$element","$attrs",function(){}]};return g}]).directive("uiGridMenuItem",["gridUtil","$compile","i18nService",function(a,b,c){var d={priority:0,scope:{name:"=",active:"=",action:"=",icon:"=",shown:"=",context:"=",templateUrl:"=",leaveOpen:"="},require:["?^uiGrid","^uiGridMenu"],templateUrl:"ui-grid/uiGridMenuItem",replace:!0,compile:function(){return{pre:function(c,d,e,f){f[0],f[1];c.templateUrl&&a.getTemplate(c.templateUrl).then(function(a){var e=angular.element(a),f=b(e)(c);d.replaceWith(f)})},post:function(a,b,d,e){{var f=e[0];e[1]}("undefined"==typeof a.shown||null===a.shown)&&(a.shown=function(){return!0}),a.itemShown=function(){var b={};return a.context&&(b.context=a.context),"undefined"!=typeof f&&f&&(b.grid=f.grid),a.shown.call(b)},a.itemAction=function(b,c){if(b.stopPropagation(),"function"==typeof a.action){var d={};a.context&&(d.context=a.context),"undefined"!=typeof f&&f&&(d.grid=f.grid),a.action.call(d,b,c),a.leaveOpen||a.$emit("hide-menu")}},a.i18n=c.get()}}}};return d}])}(),function(){"use strict";var a=angular.module("ui.grid");a.directive("uiGridRenderContainer",["$timeout","$document","uiGridConstants","gridUtil","ScrollEvent",function(a,b,c,d,e){return{replace:!0,transclude:!0,templateUrl:"ui-grid/uiGridRenderContainer",require:["^uiGrid","uiGridRenderContainer"],scope:{containerId:"=",rowContainerName:"=",colContainerName:"=",bindScrollHorizontal:"=",bindScrollVertical:"=",enableVerticalScrollbar:"=",enableHorizontalScrollbar:"="},controller:"uiGridRenderContainer as RenderContainer",compile:function(){return{pre:function(a,b,c,d){var e=d[0],f=d[1],g=a.grid=e.grid;if(!a.rowContainerName)throw"No row render container name specified";if(!a.colContainerName)throw"No column render container name specified";if(!g.renderContainers[a.rowContainerName])throw"Row render container '"+a.rowContainerName+"' is not registered.";if(!g.renderContainers[a.colContainerName])throw"Column render container '"+a.colContainerName+"' is not registered.";var h=a.rowContainer=g.renderContainers[a.rowContainerName],i=a.colContainer=g.renderContainers[a.colContainerName];f.containerId=a.containerId,f.rowContainer=h,f.colContainer=i},post:function(a,b,c,f){function g(b){if(!b.grid||b.grid.id===k.id){if(b.y&&a.bindScrollVertical){j.prevScrollArgs=b;var c=b.getNewScrollTop(l,j.viewport);(b.source!==e.Sources.ViewPortScroll||b.sourceColContainer!==m)&&(j.viewport[0].scrollTop=c)}if(b.x&&a.bindScrollHorizontal){j.prevScrollArgs=b;var f=b.getNewScrollLeft(m,j.viewport);a.newScrollLeft=f,j.headerViewport&&(j.headerViewport.scrollLeft=d.denormalizeScrollLeft(j.headerViewport,f)),j.footerViewport&&(j.footerViewport.scrollLeft=d.denormalizeScrollLeft(j.footerViewport,f)),b.source!==e.Sources.ViewPortScroll&&(j.viewport[0].scrollLeft=d.denormalizeScrollLeft(j.viewport,f)),j.prevScrollLeft=f}}}function h(){var b="",c=m.getCanvasWidth(),d=m.getViewportWidth(),e=l.getCanvasHeight();"body"!==a.containerId&&(e+=k.scrollbarHeight);var f=l.getViewportHeight(),g=m.getHeaderViewportWidth(),h=m.getHeaderViewportWidth();return b+="\n .grid"+i.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-canvas { width: "+c+"px; height: "+e+"px; }",b+="\n .grid"+i.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-canvas { width: "+(c+k.scrollbarWidth)+"px; }",n.explicitHeaderCanvasHeight&&(b+="\n .grid"+i.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-canvas { height: "+n.explicitHeaderCanvasHeight+"px; }"),b+="\n .grid"+i.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-viewport { width: "+d+"px; height: "+f+"px; }",b+="\n .grid"+i.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-viewport { width: "+g+"px; }",b+="\n .grid"+i.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-footer-canvas { width: "+c+k.scrollbarWidth+"px; }",b+="\n .grid"+i.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-footer-viewport { width: "+h+"px; }"}var i=f[0],j=f[1],k=i.grid,l=j.rowContainer,m=j.colContainer,n=k.renderContainers[a.containerId];b.addClass("ui-grid-render-container-"+a.containerId),(a.bindScrollHorizontal||a.bindScrollVertical)&&k.api.core.on.scrollEvent(a,g),d.on.mousewheel(b,function(a){var b=new e(k,l,m,e.Sources.RenderContainerMouseWheel);if(0!==a.deltaY){var c=-1*a.deltaY*a.deltaFactor,f=(j.viewport[0].scrollTop+c)/l.getVerticalScrollLength();0>f?f=0:f>1&&(f=1),b.y={percentage:f,pixels:c}}if(0!==a.deltaX){var g=a.deltaX*a.deltaFactor,h=d.normalizeScrollLeft(j.viewport),i=(h+g)/(m.getCanvasWidth()-m.getViewportWidth());0>i?i=0:i>1&&(i=1),b.x={percentage:i,pixels:g}}(b.y&&0!==b.y.percentage&&1!==b.y.percentage&&0!==j.viewport[0].scrollTop||b.x&&0!==b.x.percentage&&1!==b.x.percentage)&&(a.preventDefault(),b.fireThrottledScrollingEvent())}),b.bind("$destroy",function(){b.unbind("keydown"),["touchstart","touchmove","touchend","keydown","wheel","mousewheel","DomMouseScroll","MozMousePixelScroll"].forEach(function(a){b.unbind(a)})}),i.grid.registerStyleComputation({priority:6,func:h})}}}}}]),a.controller("uiGridRenderContainer",["$scope","gridUtil",function(){}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridRow",["gridUtil",function(){return{replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:{row:"=uiGridRow",rowRenderIndex:"="},compile:function(){return{pre:function(a,b,c,d){function e(){a.row.getRowTemplateFn.then(function(c){var d=a.$new();c(d,function(a){h&&(h.remove(),i.$destroy()),b.empty().append(a),h=a,i=d})})}{var f=d[0],g=d[1];f.grid}a.grid=f.grid,a.colContainer=g.colContainer;var h,i;e(),a.$watch("row.getRowTemplateFn",function(a,b){a!==b&&e()})},post:function(){}}}}}])}(),function(){angular.module("ui.grid").directive("uiGridStyle",["gridUtil","$interpolate",function(a,b){return{link:function(a,c){var d=b(c.text(),!0);d&&a.$watch(d,function(a){c.text(a)})}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridViewport",["gridUtil","ScrollEvent","uiGridConstants",function(a,b,c){return{replace:!0,scope:{},controllerAs:"Viewport",templateUrl:"ui-grid/uiGridViewport",require:["^uiGrid","^uiGridRenderContainer"],link:function(d,e,f,g){var h=g[0],i=g[1];d.containerCtrl=i;var j=i.rowContainer,k=i.colContainer,l=h.grid;d.grid=h.grid,d.rowContainer=i.rowContainer,d.colContainer=i.colContainer,i.viewport=e,e.on("scroll",function(){var d=e[0].scrollTop,f=a.normalizeScrollLeft(e),g=-1,h=-1;if(f!==k.prevScrollLeft){l.flagScrollingHorizontally();var i=f-k.prevScrollLeft;i>0&&(l.scrollDirection=c.scrollDirection.RIGHT),0>i&&(l.scrollDirection=c.scrollDirection.LEFT);var m=k.getCanvasWidth()-k.getViewportWidth();g=0!==m?f/m:0,k.adjustScrollHorizontal(f,g)}if(d!==j.prevScrollTop){l.flagScrollingVertically();var n=d-j.prevScrollTop;n>0&&(l.scrollDirection=c.scrollDirection.DOWN),0>n&&(l.scrollDirection=c.scrollDirection.UP);var o=j.getVerticalScrollLength();h=d/o,h>1&&(h=1),0>h&&(h=0),j.adjustScrollVertical(d,h)}var p=new b(l,j,k,b.Sources.ViewPortScroll);p.newScrollLeft=f,p.newScrollTop=d,g>-1&&(p.x={percentage:g}),h>-1&&(p.y={percentage:h}),p.fireScrollingEvent()})},controller:["$scope",function(a){this.rowStyle=function(b){var c=a.rowContainer,d=a.colContainer,e={};if(0===b&&0!==c.currentTopRow){var f=c.currentTopRow*c.grid.options.rowHeight;e["margin-top"]=f+"px"}return 0!==d.currentFirstColumn&&(d.grid.isRTL()?e["margin-right"]=d.columnOffset+"px":e["margin-left"]=d.columnOffset+"px"),e}}]}}])}(),function(){angular.module("ui.grid").directive("uiGridVisible",function(){return function(a,b,c){a.$watch(c.uiGridVisible,function(a){b[a?"removeClass":"addClass"]("ui-grid-invisible")})}})}(),function(){"use strict";angular.module("ui.grid").controller("uiGridController",["$scope","$element","$attrs","gridUtil","$q","uiGridConstants","$templateCache","gridClassFactory","$timeout","$parse","$compile","ScrollEvent",function(a,b,c,d,e,f,g,h,i,j,k,l){function m(a,b){a&&a!==b&&(p.grid.options.columnDefs=a,p.grid.buildColumns({orderByColumnDefs:!0}).then(function(){p.grid.preCompileCellTemplates(),p.grid.callDataChangeCallbacks(f.dataChange.COLUMN)}))}function n(a){var b=new l(p.grid,null,null,"ui.grid.adjustInfiniteScrollPosition"),c=p.grid.renderContainers.body.visibleRowCache.length,d=(a+a/(c-1))/c;b.y=0===d?{pixels:1}:{percentage:d},b.fireScrollingEvent()}function o(b){var d=[];b&&(p.grid.columns.length===(p.grid.rowHeaderColumns?p.grid.rowHeaderColumns.length:0)&&!c.uiGridColumns&&0===p.grid.options.columnDefs.length&&b.length>0&&p.grid.buildColumnDefsFromData(b),(p.grid.options.columnDefs.length>0||b.length>0)&&d.push(p.grid.buildColumns().then(function(){p.grid.preCompileCellTemplates()})),e.all(d).then(function(){p.grid.modifyRows(b).then(function(){p.grid.redrawInPlace(!0),a.$evalAsync(function(){p.grid.refreshCanvas(!0),p.grid.callDataChangeCallbacks(f.dataChange.ROW),i(function(){p.grid.options.enableInfiniteScroll&&(0===p.grid.renderContainers.body.prevRowScrollIndex&&n(0),p.grid.scrollDirection===f.scrollDirection.UP&&n(p.grid.renderContainers.body.prevRowScrollIndex+1+p.grid.options.excessRows))},0)})})}))}var p=this;p.grid=h.createGrid(a.uiGrid),p.grid.appScope=p.grid.appScope||a.$parent,b.addClass("grid"+p.grid.id),p.grid.rtl="rtl"===d.getStyles(b[0]).direction,a.grid=p.grid,c.uiGridColumns&&c.$observe("uiGridColumns",function(a){p.grid.options.columnDefs=a,p.grid.buildColumns().then(function(){p.grid.preCompileCellTemplates(),p.grid.refreshCanvas(!0)})});var q;q=angular.isString(a.uiGrid.data)?a.$parent.$watchCollection(a.uiGrid.data,o):a.$parent.$watchCollection(function(){return a.uiGrid.data},o);var r=a.$parent.$watchCollection(function(){return a.uiGrid.columnDefs},m),s=a.$watch(function(){return p.grid.styleComputations},function(){p.grid.refreshCanvas(!0)});a.$on("$destroy",function(){q(),r(),s()}),p.fireEvent=function(b,c){("undefined"==typeof c||void 0===c)&&(c={}),("undefined"==typeof c.grid||void 0===c.grid)&&(c.grid=p.grid),a.$broadcast(b,c)},p.innerCompile=function(b){k(b)(a)}}]),angular.module("ui.grid").directive("uiGrid",["$compile","$templateCache","gridUtil","$window","uiGridConstants",function(a,b,c,d,e){return{templateUrl:"ui-grid/ui-grid",scope:{uiGrid:"="},replace:!0,transclude:!0,controller:"uiGridController",compile:function(){return{post:function(a,b,f,g){function h(){i.gridWidth=a.gridWidth=c.elementWidth(b),i.gridHeight=a.gridHeight=c.elementHeight(b),i.refreshCanvas(!0)}var i=g.grid;if(g.scrollbars=[],i.renderingComplete(),i.element=b,i.gridWidth=a.gridWidth=c.elementWidth(b),i.canvasWidth=g.grid.gridWidth,i.gridHeight=a.gridHeight=c.elementHeight(b),i.gridHeight<i.options.rowHeight&&i.options.enableMinHeightCheck){var j=i.options.minRowsToShow*i.options.rowHeight,k=i.options.showHeader?i.options.headerRowHeight:0,l=i.calcFooterHeight(),m=0;i.options.enableHorizontalScrollbar===e.scrollbars.ALWAYS&&(m=c.getScrollbarWidth());var n=0;angular.forEach(i.options.columnDefs,function(a){a.hasOwnProperty("filter")?1>n&&(n=1):a.hasOwnProperty("filters")&&n<a.filters.length&&(n=a.filters.length)});var o=n*k,p=k+j+l+m+o;b.css("height",p+"px"),i.gridHeight=a.gridHeight=c.elementHeight(b)}i.refreshCanvas(),a.$watch(function(){return i.hasLeftContainer()},function(a,b){a!==b&&i.refreshCanvas(!0)}),a.$watch(function(){
  return i.hasRightContainer()},function(a,b){a!==b&&i.refreshCanvas(!0)}),angular.element(d).on("resize",h),b.on("$destroy",function(){angular.element(d).off("resize",h)})}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridPinnedContainer",["gridUtil",function(){return{restrict:"EA",replace:!0,template:'<div class="ui-grid-pinned-container"><div ui-grid-render-container container-id="side" row-container-name="\'body\'" col-container-name="side" bind-scroll-vertical="true" class="{{ side }} ui-grid-render-container-{{ side }}"></div></div>',scope:{side:"=uiGridPinnedContainer"},require:"^uiGrid",compile:function(){return{post:function(a,b,c,d){function e(){if("left"===a.side||"right"===a.side){for(var b=g.renderContainers[a.side].visibleColumnCache,c=0,d=0;d<b.length;d++){var e=b[d];c+=e.drawnWidth||e.width||0}h=c}}function f(){var c="";if("left"===a.side||"right"===a.side){e(),b.attr("style",null);var d=g.renderContainers.body.getViewportHeight();c+=".grid"+g.id+" .ui-grid-pinned-container-"+a.side+", .grid"+g.id+" .ui-grid-pinned-container-"+a.side+" .ui-grid-render-container-"+a.side+" .ui-grid-viewport { width: "+h+"px; height: "+d+"px; } "}return c}var g=d.grid,h=0;b.addClass("ui-grid-pinned-container-"+a.side),g.renderContainers.body.registerViewportAdjuster(function(a){return 0!==h&&h||e(),a.width-=h,a}),g.registerStyleComputation({priority:15,func:f})}}}}}])}(),function(){angular.module("ui.grid").factory("Grid",["$q","$compile","$parse","gridUtil","uiGridConstants","GridOptions","GridColumn","GridRow","GridApi","rowSorter","rowSearcher","GridRenderContainer","$timeout",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){}var o=function(a){var b=this;if(void 0===a||"undefined"==typeof a.id||!a.id)throw new Error("No ID provided. An ID must be given when creating a grid.");if(!/^[_a-zA-Z0-9-]+$/.test(a.id))throw new Error("Grid id '"+a.id+'" is invalid. It must follow CSS selector syntax rules.');b.id=a.id,delete a.id,b.options=f.initialize(a),b.appScope=b.options.appScopeProvider,b.headerHeight=b.options.headerRowHeight,b.footerHeight=b.calcFooterHeight(),b.rtl=!1,b.gridHeight=0,b.gridWidth=0,b.columnBuilders=[],b.rowBuilders=[],b.rowsProcessors=[],b.columnsProcessors=[],b.styleComputations=[],b.viewportAdjusters=[],b.rowHeaderColumns=[],b.dataChangeCallbacks={},b.renderContainers={},b.renderContainers.body=new l("body",b),b.cellValueGetterCache={},b.getRowTemplateFn=null,b.rows=[],b.columns=[],b.isScrollingVertically=!1,b.isScrollingHorizontally=!1,b.scrollDirection=e.scrollDirection.NONE;var c=d.debounce(function(){b.isScrollingVertically=!1,b.scrollDirection=e.scrollDirection.NONE},1e3),g=d.debounce(function(){b.isScrollingHorizontally=!1,b.scrollDirection=e.scrollDirection.NONE},1e3);b.flagScrollingVertically=function(){b.isScrollingVertically=!0,c()},b.flagScrollingHorizontally=function(){b.isScrollingHorizontally=!0,g()},b.scrollbarHeight=0,b.scrollbarWidth=0,b.options.enableHorizontalScrollbar===e.scrollbars.ALWAYS&&(b.scrollbarHeight=d.getScrollbarWidth()),b.options.enableVerticalScrollbar===e.scrollbars.ALWAYS&&(b.scrollbarWidth=d.getScrollbarWidth()),b.api=new i(b),b.api.registerMethod("core","refresh",this.refresh),b.api.registerMethod("core","queueGridRefresh",this.queueGridRefresh),b.api.registerMethod("core","refreshRows",this.refreshRows),b.api.registerMethod("core","refreshRows",this.queueRefresh),b.api.registerMethod("core","handleWindowResize",this.handleWindowResize),b.api.registerMethod("core","addRowHeaderColumn",this.addRowHeaderColumn),b.api.registerMethod("core","sortHandleNulls",j.handleNulls),b.api.registerEvent("core","sortChanged"),b.api.registerEvent("core","columnVisibilityChanged"),b.api.registerMethod("core","notifyDataChange",this.notifyDataChange),b.registerDataChangeCallback(b.columnRefreshCallback,[e.dataChange.COLUMN]),b.registerDataChangeCallback(b.processRowsCallback,[e.dataChange.EDIT]),b.registerStyleComputation({priority:10,func:b.getFooterStyles})};return o.prototype.calcFooterHeight=function(){if(!this.hasFooter())return 0;var a=0;return this.options.showGridFooter&&(a+=this.options.gridFooterHeight),this.options.showColumnFooter&&(a+=this.options.columnFooterHeight),a},o.prototype.getFooterStyles=function(){var a=".grid"+this.id+" .ui-grid-footer-aggregates-row { height: "+this.options.columnFooterHeight+"px; }";return a+=" .grid"+this.id+" .ui-grid-footer-info { height: "+this.options.gridFooterHeight+"px; }"},o.prototype.hasFooter=function(){return this.options.showGridFooter||this.options.showColumnFooter},o.prototype.isRTL=function(){return this.rtl},o.prototype.registerColumnBuilder=function(a){this.columnBuilders.push(a)},o.prototype.buildColumnDefsFromData=function(a){this.options.columnDefs=d.getColumnsFromData(a,this.options.excludeProperties)},o.prototype.registerRowBuilder=function(a){this.rowBuilders.push(a)},o.prototype.registerDataChangeCallback=function(a,b,c){var f=d.nextUid();b||(b=[e.dataChange.ALL]),Array.isArray(b)||d.logError("Expected types to be an array or null in registerDataChangeCallback, value passed was: "+b),this.dataChangeCallbacks[f]={callback:a,types:b,_this:c};var g=this,h=function(){delete g.dataChangeCallbacks[f]};return h},o.prototype.callDataChangeCallbacks=function(a){angular.forEach(this.dataChangeCallbacks,function(b){(-1!==b.types.indexOf(e.dataChange.ALL)||-1!==b.types.indexOf(a)||a===e.dataChange.ALL)&&(b._this?b.callback.apply(b._this,this):b.callback(this))},this)},o.prototype.notifyDataChange=function(a){var b=e.dataChange;a===b.ALL||a===b.COLUMN||a===b.EDIT||a===b.ROW||a===b.OPTIONS?this.callDataChangeCallbacks(a):d.logError("Notified of a data change, but the type was not recognised, so no action taken, type was: "+a)},o.prototype.columnRefreshCallback=function(a){a.buildColumns(),a.queueGridRefresh()},o.prototype.processRowsCallback=function(a){a.queueGridRefresh()},o.prototype.getColumn=function(a){var b=this.columns.filter(function(b){return b.colDef.name===a});return b.length>0?b[0]:null},o.prototype.getColDef=function(a){var b=this.options.columnDefs.filter(function(b){return b.name===a});return b.length>0?b[0]:null},o.prototype.assignTypes=function(){var a=this;a.options.columnDefs.forEach(function(b,c){if(!b.type){var e=new g(b,c,a),f=a.rows.length>0?a.rows[0]:null;f?b.type=d.guessType(a.getCellValue(f,e)):(d.logWarn("Unable to assign type from data, so defaulting to string"),b.type="string")}})},o.prototype.addRowHeaderColumn=function(a){var b=this,c=new g(a,d.nextUid(),b);c.isRowHeader=!0,b.isRTL()?(b.createRightContainer(),c.renderContainer="right"):(b.createLeftContainer(),c.renderContainer="left"),b.columnBuilders[0](a,c,b.options).then(function(){c.enableFiltering=!1,c.enableSorting=!1,c.enableHiding=!1,b.rowHeaderColumns.push(c),b.buildColumns().then(function(){b.preCompileCellTemplates(),b.queueGridRefresh()})})},o.prototype.buildColumns=function(b){var c={orderByColumnDefs:!1};angular.extend(c,b);var e,f=this,h=[],i=f.rowHeaderColumns.length;for(e=0;e<f.columns.length;e++)f.getColDef(f.columns[e].name)||(f.columns.splice(e,1),e--);if(f.rowHeaderColumns.forEach(function(a){f.columns.unshift(a)}),f.options.columnDefs.forEach(function(a,b){f.preprocessColDef(a);var c=f.getColumn(a.name);c?c.updateColumnDef(a,!1):(c=new g(a,d.nextUid(),f),f.columns.splice(b+i,0,c)),f.columnBuilders.forEach(function(b){h.push(b.call(f,a,c,f.options))})}),c.orderByColumnDefs){var j=f.columns.slice(0),k=Math.min(f.options.columnDefs.length,f.columns.length);for(e=0;k>e;e++)j[e+i]=f.columns[e+i].name!==f.options.columnDefs[e].name?f.getColumn(f.options.columnDefs[e].name):f.columns[e+i];f.columns.length=0,Array.prototype.splice.apply(f.columns,[0,0].concat(j))}return a.all(h).then(function(){f.rows.length>0&&f.assignTypes()})},o.prototype.preCompileCellTemplates=function(){var a=this;this.columns.forEach(function(c){var d=c.cellTemplate.replace(e.MODEL_COL_FIELD,a.getQualifiedColField(c));d=d.replace(e.COL_FIELD,"grid.getCellValue(row, col)"),d=c.cellTooltip===!1?d.replace(e.TOOLTIP,""):d.replace(e.TOOLTIP,'title="{{col.cellTooltip(row, col)}}"');var f=b(d);c.compiledElementFn=f,c.compiledElementFnDefer&&c.compiledElementFnDefer.resolve(c.compiledElementFn)})},o.prototype.getQualifiedColField=function(a){return"row.entity."+d.preEval(a.field)},o.prototype.createLeftContainer=function(){this.hasLeftContainer()||(this.renderContainers.left=new l("left",this,{disableColumnOffset:!0}))},o.prototype.createRightContainer=function(){this.hasRightContainer()||(this.renderContainers.right=new l("right",this,{disableColumnOffset:!0}))},o.prototype.hasLeftContainer=function(){return void 0!==this.renderContainers.left},o.prototype.hasRightContainer=function(){return void 0!==this.renderContainers.right},o.prototype.preprocessColDef=function(a){var b=this;if(!a.field&&!a.name)throw new Error("colDef.name or colDef.field property is required");if(void 0===a.name&&void 0!==a.field){var c=b.getColumn(a.field);if(c){var d=new RegExp("^"+a.field+"(\\d+)$","i"),e=b.columns.filter(function(a){return d.test(a.displayName)}).sort(function(a,b){if(a===b)return 0;var c=a.displayName.match(d)[1],e=b.displayName.match(d)[1];return parseInt(c,10)>parseInt(e,10)?1:-1});if(0===e.length)a.name=a.field+"2";else{var f=e[e.length-1].displayName.match(d)[1];f=parseInt(f,10),a.name=a.field+(f+1)}}else a.name=a.field}},o.prototype.newInN=function(a,b,c,d){for(var e=this,f=[],g=0;g<b.length;g++){for(var h=d?b[g][d]:b[g],i=!1,j=0;j<a.length;j++){var k=c?a[j][c]:a[j];if(e.options.rowEquality(h,k)){i=!0;break}}i||f.push(h)}return f},o.prototype.getRow=function(a,b){var c=this;b="undefined"==typeof b?c.rows:b;var d=b.filter(function(b){return c.options.rowEquality(b.entity,a)});return d.length>0?d[0]:null},o.prototype.modifyRows=function(b){var c=this,d=c.rows.slice(0),e=c.rowHashMap||c.createRowHashMap();c.rowHashMap=c.createRowHashMap(),c.rows.length=0,b.forEach(function(a,b){var f;f=c.options.enableRowHashing?e.get(a):c.getRow(a,d),f||(f=c.processRowBuilders(new h(a,b,c))),c.rows.push(f),c.rowHashMap.put(a,f)}),c.assignTypes();var f=a.when(c.processRowsProcessors(c.rows)).then(function(a){return c.setVisibleRows(a)}),g=a.when(c.processColumnsProcessors(c.columns)).then(function(a){return c.setVisibleColumns(a)});return a.all([f,g])},o.prototype.addRows=function(a){for(var b=this,c=b.rows.length,d=0;d<a.length;d++){var e=b.processRowBuilders(new h(a[d],d+c,b));if(b.options.enableRowHashing){var f=b.rowHashMap.get(e.entity);f&&(f.row=e)}b.rows.push(e)}},o.prototype.processRowBuilders=function(a){var b=this;return b.rowBuilders.forEach(function(c){c.call(b,a,b.options)}),a},o.prototype.registerStyleComputation=function(a){this.styleComputations.push(a)},o.prototype.registerRowsProcessor=function(a){if(!angular.isFunction(a))throw"Attempt to register non-function rows processor: "+a;this.rowsProcessors.push(a)},o.prototype.removeRowsProcessor=function(a){var b=this.rowsProcessors.indexOf(a);"undefined"!=typeof b&&void 0!==b&&this.rowsProcessors.splice(b,1)},o.prototype.processRowsProcessors=function(b){function c(b,e){var g=d.rowsProcessors[b];return a.when(g.call(d,e,d.columns)).then(function(a){if(!a)throw"Processor at index "+b+" did not return a set of renderable rows";if(!angular.isArray(a))throw"Processor at index "+b+" did not return an array";return b++,b<=d.rowsProcessors.length-1?c(b,a):void f.resolve(a)})}var d=this,e=b.slice(0);if(0===d.rowsProcessors.length)return a.when(e);var f=a.defer();return c(0,e),f.promise},o.prototype.setVisibleRows=function(a){var b=this;for(var c in b.renderContainers){var d=b.renderContainers[c];d.canvasHeightShouldUpdate=!0,"undefined"==typeof d.visibleRowCache?d.visibleRowCache=[]:d.visibleRowCache.length=0}for(var e=0;e<a.length;e++){var f=a[e],g="undefined"!=typeof f.renderContainer&&f.renderContainer?f.renderContainer:"body";f.visible&&b.renderContainers[g].visibleRowCache.push(f)}b.api.core.raise.rowsRendered(this.api)},o.prototype.registerColumnsProcessor=function(a){if(!angular.isFunction(a))throw"Attempt to register non-function rows processor: "+a;this.columnsProcessors.push(a)},o.prototype.removeColumnsProcessor=function(a){var b=this.columnsProcessors.indexOf(a);"undefined"!=typeof b&&void 0!==b&&this.columnsProcessors.splice(b,1)},o.prototype.processColumnsProcessors=function(b){function c(b,g){var h=d.columnsProcessors[b];return a.when(h.call(d,g,d.rows)).then(function(a){if(!a)throw"Processor at index "+b+" did not return a set of renderable rows";if(!angular.isArray(a))throw"Processor at index "+b+" did not return an array";return b++,b<=d.columnsProcessors.length-1?c(b,e):void f.resolve(e)})}var d=this,e=b.slice(0);if(0===d.columnsProcessors.length)return a.when(e);var f=a.defer();return c(0,e),f.promise},o.prototype.setVisibleColumns=function(a){var b=this;for(var c in b.renderContainers){var d=b.renderContainers[c];d.visibleColumnCache.length=0}for(var e=0;e<a.length;e++){var f=a[e];f.visible&&("undefined"!=typeof f.renderContainer&&f.renderContainer?b.renderContainers[f.renderContainer].visibleColumnCache.push(f):b.renderContainers.body.visibleColumnCache.push(f))}},o.prototype.handleWindowResize=function(){var a=this;a.gridWidth=d.elementWidth(a.element),a.gridHeight=d.elementHeight(a.element),a.queueRefresh()},o.prototype.queueRefresh=function(){var a=this;return a.refreshCanceller&&m.cancel(a.refreshCanceller),a.refreshCanceller=m(function(){a.refreshCanvas(!0)}),a.refreshCanceller.then(function(){a.refreshCanceller=null}),a.refreshCanceller},o.prototype.queueGridRefresh=function(){var a=this;return a.gridRefreshCanceller&&m.cancel(a.gridRefreshCanceller),a.gridRefreshCanceller=m(function(){a.refresh(!0)}),a.gridRefreshCanceller.then(function(){a.gridRefreshCanceller=null}),a.gridRefreshCanceller},o.prototype.updateCanvasHeight=function(){var a=this;for(var b in a.renderContainers)if(a.renderContainers.hasOwnProperty(b)){var c=a.renderContainers[b];c.canvasHeightShouldUpdate=!0}},o.prototype.buildStyles=function(){var a=this;a.customStyles="",a.styleComputations.sort(function(a,b){return null===a.priority?1:null===b.priority?-1:null===a.priority&&null===b.priority?0:a.priority-b.priority}).forEach(function(b){var c=b.func.call(a);angular.isString(c)&&(a.customStyles+="\n"+c)})},o.prototype.minColumnsToRender=function(){var a=this,b=this.getViewportWidth(),c=0,d=0;return a.columns.forEach(function(e,f){if(b>d)d+=e.drawnWidth,c++;else{for(var g=0,h=f;h>=f-c;h--)g+=a.columns[h].drawnWidth;b>g&&c++}}),c},o.prototype.getBodyHeight=function(){var a=this.getViewportHeight();return a},o.prototype.getViewportHeight=function(){var a=this,b=this.gridHeight-this.headerHeight-this.footerHeight,c=a.getViewportAdjustment();return b+=c.height},o.prototype.getViewportWidth=function(){var a=this,b=this.gridWidth,c=a.getViewportAdjustment();return b+=c.width},o.prototype.getHeaderViewportWidth=function(){var a=this.getViewportWidth();return a},o.prototype.registerViewportAdjuster=function(a){this.viewportAdjusters.push(a)},o.prototype.removeViewportAdjuster=function(a){var b=this.viewportAdjusters.indexOf(a);"undefined"!=typeof b&&void 0!==b&&this.viewportAdjusters.splice(b,1)},o.prototype.getViewportAdjustment=function(){var a=this,b={height:0,width:0};return a.viewportAdjusters.forEach(function(a){b=a.call(this,b)}),b},o.prototype.getVisibleRowCount=function(){return this.renderContainers.body.visibleRowCache.length},o.prototype.getVisibleRows=function(){return this.renderContainers.body.visibleRowCache},o.prototype.getVisibleColumnCount=function(){return this.renderContainers.body.visibleColumnCache.length},o.prototype.searchRows=function(a){return k.search(this,a,this.columns)},o.prototype.sortByColumn=function(a){return j.sort(this,a,this.columns)},o.prototype.getCellValue=function(a,b){return this.options.flatEntityAccess&&b.field?a.entity[b.field]:(b.cellValueGetterCache||(b.cellValueGetterCache=c(a.getEntityQualifiedColField(b))),b.cellValueGetterCache(a))},o.prototype.getNextColumnSortPriority=function(){var a=this,b=0;return a.columns.forEach(function(a){a.sort&&a.sort.priority&&a.sort.priority>b&&(b=a.sort.priority)}),b+1},o.prototype.resetColumnSorting=function(a){var b=this;b.columns.forEach(function(b){b===a||b.suppressRemoveSort||(b.sort={})})},o.prototype.getColumnSorting=function(){var a,b=this,c=[];return a=b.columns.slice(0),a.sort(j.prioritySort).forEach(function(a){a.sort&&"undefined"!=typeof a.sort.direction&&a.sort.direction&&(a.sort.direction===e.ASC||a.sort.direction===e.DESC)&&c.push(a)}),c},o.prototype.sortColumn=function(b,c,d){var f=this,g=null;if("undefined"==typeof b||!b)throw new Error("No column parameter provided");return"boolean"==typeof c?d=c:g=c,d?b.sort.priority||(b.sort.priority=f.getNextColumnSortPriority()):(f.resetColumnSorting(b),b.sort.priority=0,b.sort.priority=f.getNextColumnSortPriority()),g?b.sort.direction=g:b.sort.direction&&b.sort.direction===e.ASC?b.sort.direction=e.DESC:b.sort.direction&&b.sort.direction===e.DESC?b.colDef&&b.suppressRemoveSort?b.sort.direction=e.ASC:b.sort={}:b.sort.direction=e.ASC,f.api.core.raise.sortChanged(f,f.getColumnSorting()),a.when(b)},o.prototype.renderingComplete=function(){angular.isFunction(this.options.onRegisterApi)&&this.options.onRegisterApi(this.api),this.api.core.raise.renderingComplete(this.api)},o.prototype.createRowHashMap=function(){var a=this,b=new n;return b.grid=a,b},o.prototype.refresh=function(b){var c=this,d=c.processRowsProcessors(c.rows).then(function(a){c.setVisibleRows(a)}),e=c.processColumnsProcessors(c.columns).then(function(a){c.setVisibleColumns(a)});return a.all([d,e]).then(function(){c.redrawInPlace(b),c.refreshCanvas(!0)})},o.prototype.refreshRows=function(){var a=this;return a.processRowsProcessors(a.rows).then(function(b){a.setVisibleRows(b),a.redrawInPlace(),a.refreshCanvas(!0)})},o.prototype.refreshCanvas=function(b){var c=this;b&&c.buildStyles();var e=a.defer(),f=[];for(var g in c.renderContainers)if(c.renderContainers.hasOwnProperty(g)){var h=c.renderContainers[g];if(null===h.canvasWidth||isNaN(h.canvasWidth))continue;(h.header||h.headerCanvas)&&f.push(h)}return m(f.length>0?function(){var a,g,h=!1,i=0,j=0;for(a=0;a<f.length;a++)if(g=f[a],null!==g.canvasWidth&&!isNaN(g.canvasWidth)){if(g.header){var k=g.headerHeight,l=d.outerElementHeight(g.header);g.headerHeight=parseInt(l,10),k!==l&&(h=!0);var m=d.getBorderSize(g.header,"top"),n=d.getBorderSize(g.header,"bottom"),o=parseInt(l-m-n,10);o=0>o?0:o,g.innerHeaderHeight=o,o>i&&(i=o)}if(g.headerCanvas){var p=g.headerCanvasHeight,q=d.outerElementHeight(g.headerCanvas);g.headerCanvasHeight=parseInt(q,10),p!==q&&(h=!0),q>j&&(j=q)}}for(a=0;a<f.length;a++)g=f[a],i>0&&"undefined"!=typeof g.headerHeight&&null!==g.headerHeight&&g.headerHeight<i&&(g.explicitHeaderHeight=i),"undefined"!=typeof g.headerCanvasHeight&&null!==g.headerCanvasHeight&&j>0&&g.headerCanvasHeight<j&&(g.explicitHeaderCanvasHeight=j);b&&h&&c.buildStyles(),e.resolve()}:function(){e.resolve()}),e.promise},o.prototype.redrawInPlace=function(a){var b=this;for(var c in b.renderContainers){var d=b.renderContainers[c];a?(d.adjustRows(d.prevScrollTop,null),d.adjustColumns(d.prevScrollLeft,null)):(d.adjustRows(null,d.prevScrolltopPercentage),d.adjustColumns(null,d.prevScrollleftPercentage))}},o.prototype.hasLeftContainerColumns=function(){return this.hasLeftContainer()&&this.renderContainers.left.renderedColumns.length>0},o.prototype.hasRightContainerColumns=function(){return this.hasRightContainer()&&this.renderContainers.right.renderedColumns.length>0},n.prototype={put:function(a,b){this[this.grid.options.rowIdentity(a)]=b},get:function(a){return this[this.grid.options.rowIdentity(a)]},remove:function(a){var b=this[a=this.grid.options.rowIdentity(a)];return delete this[a],b}},o}])}(),function(){angular.module("ui.grid").factory("GridApi",["$q","$rootScope","gridUtil","uiGridConstants","GridRow","uiGridGridMenuService",function(a,b,c,d,e){function f(a,c,d,e){return b.$on(a,function(){var a=Array.prototype.slice.call(arguments);a.splice(0,1),c.apply(e?e:d.api,a)})}var g=function(a){this.grid=a,this.listeners=[],this.registerEvent("core","renderingComplete"),this.registerEvent("core","filterChanged"),this.registerMethod("core","setRowInvisible",e.prototype.setRowInvisible),this.registerMethod("core","clearRowInvisible",e.prototype.clearRowInvisible),this.registerMethod("core","getVisibleRows",this.grid.getVisibleRows),this.registerEvent("core","rowsVisibleChanged"),this.registerEvent("core","rowsRendered"),this.registerEvent("core","scrollEvent"),this.registerEvent("core","canvasHeightChanged")};return g.prototype.suppressEvents=function(a,b){var c=this,d=angular.isArray(a)?a:[a],e=[];d.forEach(function(a){e=c.listeners.filter(function(b){return a===b.handler})}),e.forEach(function(a){a.dereg()}),b(),e.forEach(function(a){a.dereg=f(a.eventId,a.handler,c.grid,a._this)})},g.prototype.registerEvent=function(a,c){var d=this;d[a]||(d[a]={});var e=d[a];e.on||(e.on={},e.raise={});var g=d.grid.id+a+c;e.raise[c]=function(){b.$emit.apply(b,[g].concat(Array.prototype.slice.call(arguments)))},e.on[c]=function(a,b,c){var e=f(g,b,d.grid,c),h={handler:b,dereg:e,eventId:g,scope:a,_this:c};d.listeners.push(h);var i=function(){h.dereg();var a=d.listeners.indexOf(h);d.listeners.splice(a,1)};return a.$on("$destroy",function(){i()}),i}},g.prototype.registerEventsFromObject=function(a){var b=this,c=[];angular.forEach(a,function(a,b){var d={name:b,events:[]};angular.forEach(a,function(a,b){d.events.push(b)}),c.push(d)}),c.forEach(function(a){a.events.forEach(function(c){b.registerEvent(a.name,c)})})},g.prototype.registerMethod=function(a,b,d,e){this[a]||(this[a]={});var f=this[a];f[b]=c.createBoundedWrapper(e||this.grid,d)},g.prototype.registerMethodsFromObject=function(a,b){var c=this,d=[];angular.forEach(a,function(a,b){var c={name:b,methods:[]};angular.forEach(a,function(a,b){c.methods.push({name:b,fn:a})}),d.push(c)}),d.forEach(function(a){a.methods.forEach(function(d){c.registerMethod(a.name,d.name,d.fn,b)})})},g}])}(),function(){angular.module("ui.grid").factory("GridColumn",["gridUtil","uiGridConstants","i18nService",function(a,b,c){function d(a,b,c){var d=this;d.grid=c,d.uid=b,d.updateColumnDef(a,!0)}return d.prototype.setPropertyOrDefault=function(a,b,c){var d=this;d[b]="undefined"!=typeof a[b]&&a[b]?a[b]:"undefined"!=typeof d[b]?d[b]:c?c:{}},d.prototype.updateColumnDef=function(b,c){var e=this;if(e.colDef=b,void 0===b.name)throw new Error("colDef.name is required for column at index "+e.grid.options.columnDefs.indexOf(b));e.displayName=void 0===b.displayName?a.readableColumnName(b.name):b.displayName;var f="Cannot parse column width '"+b.width+"' for column named '"+b.name+"'";if(a.isNullOrUndefined(e.width)||!angular.isNumber(e.width))if(a.isNullOrUndefined(b.width))e.width="*";else if(angular.isNumber(b.width))e.width=b.width;else if(a.endsWith(b.width,"%")){var g=b.width.replace(/%/g,""),h=parseInt(g,10);if(isNaN(h))throw new Error(f);e.width=b.width}else if(b.width.match(/^(\d+)$/))e.width=parseInt(b.width.match(/^(\d+)$/)[1],10);else{if(!b.width.match(/^\*+$/))throw new Error(f);e.width=b.width}e.minWidth=b.minWidth?b.minWidth:30,e.maxWidth=b.maxWidth?b.maxWidth:9e3,e.field=void 0===b.field?b.name:b.field,"string"!=typeof e.field&&a.logError("Field is not a string, this is likely to break the code, Field is: "+e.field),e.name=b.name,e.displayName=void 0===b.displayName?a.readableColumnName(b.name):b.displayName,e.aggregationType=angular.isDefined(b.aggregationType)?b.aggregationType:null,e.footerCellTemplate=angular.isDefined(b.footerCellTemplate)?b.footerCellTemplate:null,e.cellTooltip="undefined"==typeof b.cellTooltip||b.cellTooltip===!1?!1:b.cellTooltip===!0?function(a,b){return e.grid.getCellValue(a,b)}:b.cellTooltip,e.footerCellClass=b.footerCellClass,e.cellClass=b.cellClass,e.headerCellClass=b.headerCellClass,e.cellFilter=b.cellFilter?b.cellFilter:"",e.headerCellFilter=b.headerCellFilter?b.headerCellFilter:"",e.footerCellFilter=b.footerCellFilter?b.footerCellFilter:"",e.visible=a.isNullOrUndefined(b.visible)||b.visible,e.headerClass=b.headerClass,e.enableSorting="undefined"!=typeof b.enableSorting?b.enableSorting:!0,e.sortingAlgorithm=b.sortingAlgorithm,"undefined"==typeof e.suppressRemoveSort&&(e.suppressRemoveSort="undefined"!=typeof b.suppressRemoveSort?b.suppressRemoveSort:!1),e.enableFiltering="undefined"!=typeof b.enableFiltering?b.enableFiltering:!0,e.setPropertyOrDefault(b,"menuItems",[]),c&&e.setPropertyOrDefault(b,"sort");var i=[];b.filter?i.push(b.filter):b.filters?i=b.filters:i.push({}),c?(e.setPropertyOrDefault(b,"filter"),e.setPropertyOrDefault(b,"filters",i)):e.filters.length===i.length&&e.filters.forEach(function(a,b){"undefined"!=typeof i[b].placeholder&&(a.placeholder=i[b].placeholder),"undefined"!=typeof i[b].flags&&(a.flags=i[b].flags),"undefined"!=typeof i[b].type&&(a.type=i[b].type),"undefined"!=typeof i[b].selectOptions&&(a.selectOptions=i[b].selectOptions)}),d.prototype.unsort=function(){this.sort={},e.grid.api.core.raise.sortChanged(e,e.grid.getColumnSorting())}},d.prototype.getColClass=function(a){var c=b.COL_CLASS_PREFIX+this.uid;return a?"."+c:c},d.prototype.getColClassDefinition=function(){return" .grid"+this.grid.id+" "+this.getColClass(!0)+" { min-width: "+this.drawnWidth+"px; max-width: "+this.drawnWidth+"px; }"},d.prototype.getRenderContainer=function(){var a=this,b=a.renderContainer;return(null===b||""===b||void 0===b)&&(b="body"),a.grid.renderContainers[b]},d.prototype.showColumn=function(){this.colDef.visible=!0},d.prototype.hideColumn=function(){this.colDef.visible=!1},d.prototype.getAggregationValue=function(){var a=this,c=0,d=a.grid.getVisibleRows(),e=function(){var b=[];return angular.forEach(d,function(c){var d=a.grid.getCellValue(c,a),e=Number(d);isNaN(e)||b.push(e)}),b};return angular.isFunction(a.aggregationType)?a.aggregationType(d,a):a.aggregationType===b.aggregationTypes.count?a.grid.getVisibleRowCount():a.aggregationType===b.aggregationTypes.sum?(angular.forEach(e(),function(a){c+=a}),c):a.aggregationType===b.aggregationTypes.avg?(angular.forEach(e(),function(a){c+=a}),c/=e().length):a.aggregationType===b.aggregationTypes.min?Math.min.apply(null,e()):a.aggregationType===b.aggregationTypes.max?Math.max.apply(null,e()):" "},d.prototype.getAggregationText=function(){var a=this;if(a.colDef.aggregationHideLabel)return"";if(a.colDef.aggregationLabel)return a.colDef.aggregationLabel;switch(a.colDef.aggregationType){case b.aggregationTypes.count:return c.getSafeText("aggregation.count");case b.aggregationTypes.sum:return c.getSafeText("aggregation.sum");case b.aggregationTypes.avg:return c.getSafeText("aggregation.avg");case b.aggregationTypes.min:return c.getSafeText("aggregation.min");case b.aggregationTypes.max:return c.getSafeText("aggregation.max");default:return""}},d.prototype.getCellTemplate=function(){var a=this;return a.cellTemplatePromise},d.prototype.getCompiledElementFn=function(){var a=this;return a.compiledElementFnDefer.promise},d}])}(),function(){angular.module("ui.grid").factory("GridOptions",["gridUtil","uiGridConstants",function(a,b){return{initialize:function(c){return c.onRegisterApi=c.onRegisterApi||angular.noop(),c.data=c.data||[],c.columnDefs=c.columnDefs||[],c.excludeProperties=c.excludeProperties||["$$hashKey"],c.enableRowHashing=c.enableRowHashing!==!1,c.rowIdentity=c.rowIdentity||function(b){return a.hashKey(b)},c.getRowIdentity=c.getRowIdentity||function(a){return a.$$hashKey},c.flatEntityAccess=c.flatEntityAccess===!0,c.showHeader="undefined"!=typeof c.showHeader?c.showHeader:!0,c.headerRowHeight=c.showHeader?"undefined"!=typeof c.headerRowHeight?c.headerRowHeight:30:0,c.rowHeight=c.rowHeight||30,c.minRowsToShow="undefined"!=typeof c.minRowsToShow?c.minRowsToShow:10,c.showGridFooter=c.showGridFooter===!0,c.showColumnFooter=c.showColumnFooter===!0,c.columnFooterHeight="undefined"!=typeof c.columnFooterHeight?c.columnFooterHeight:30,c.gridFooterHeight="undefined"!=typeof c.gridFooterHeight?c.gridFooterHeight:30,c.columnWidth="undefined"!=typeof c.columnWidth?c.columnWidth:50,c.maxVisibleColumnCount="undefined"!=typeof c.maxVisibleColumnCount?c.maxVisibleColumnCount:200,c.virtualizationThreshold="undefined"!=typeof c.virtualizationThreshold?c.virtualizationThreshold:20,c.columnVirtualizationThreshold="undefined"!=typeof c.columnVirtualizationThreshold?c.columnVirtualizationThreshold:10,c.excessRows="undefined"!=typeof c.excessRows?c.excessRows:4,c.scrollThreshold="undefined"!=typeof c.scrollThreshold?c.scrollThreshold:4,c.excessColumns="undefined"!=typeof c.excessColumns?c.excessColumns:4,c.horizontalScrollThreshold="undefined"!=typeof c.horizontalScrollThreshold?c.horizontalScrollThreshold:2,c.scrollThrottle="undefined"!=typeof c.scrollThrottle?c.scrollThrottle:70,c.enableSorting=c.enableSorting!==!1,c.enableFiltering=c.enableFiltering===!0,c.enableColumnMenus=c.enableColumnMenus!==!1,c.enableVerticalScrollbar="undefined"!=typeof c.enableVerticalScrollbar?c.enableVerticalScrollbar:b.scrollbars.ALWAYS,c.enableHorizontalScrollbar="undefined"!=typeof c.enableHorizontalScrollbar?c.enableHorizontalScrollbar:b.scrollbars.ALWAYS,c.enableMinHeightCheck=c.enableMinHeightCheck!==!1,c.minimumColumnSize="undefined"!=typeof c.minimumColumnSize?c.minimumColumnSize:10,c.rowEquality=c.rowEquality||function(a,b){return a===b},c.headerTemplate=c.headerTemplate||null,c.footerTemplate=c.footerTemplate||null,c.rowTemplate=c.rowTemplate||"ui-grid/ui-grid-row",c.appScopeProvider=c.appScopeProvider||null,c}}}])}(),function(){angular.module("ui.grid").factory("GridRenderContainer",["gridUtil","uiGridConstants",function(a,b){function c(a,b,c){var d=this;d.name=a,d.grid=b,d.visibleRowCache=[],d.visibleColumnCache=[],d.renderedRows=[],d.renderedColumns=[],d.prevScrollTop=0,d.prevScrolltopPercentage=0,d.prevRowScrollIndex=0,d.prevScrollLeft=0,d.prevScrollleftPercentage=0,d.prevColumnScrollIndex=0,d.columnStyles="",d.viewportAdjusters=[],d.canvasHeightShouldUpdate=!0,d.$$canvasHeight=0,c&&angular.isObject(c)&&angular.extend(d,c),b.registerStyleComputation({priority:5,func:function(){return d.columnStyles}})}return c.prototype.reset=function(){this.visibleColumnCache.length=0,this.visibleRowCache.length=0,this.renderedRows.length=0,this.renderedColumns.length=0},c.prototype.minRowsToRender=function(){for(var a=this,b=0,c=0,d=a.getViewportHeight(),e=a.visibleRowCache.length-1;d>c&&e>=0;e--)c+=a.visibleRowCache[e].height,b++;return b},c.prototype.minColumnsToRender=function(){for(var a=this,b=this.getViewportWidth(),c=0,d=0,e=0;e<a.visibleColumnCache.length;e++){var f=a.visibleColumnCache[e];if(b>d)d+=f.drawnWidth?f.drawnWidth:0,c++;else{for(var g=0,h=e;h>=e-c;h--)g+=a.visibleColumnCache[h].drawnWidth?a.visibleColumnCache[h].drawnWidth:0;b>g&&c++}}return c},c.prototype.getVisibleRowCount=function(){return this.visibleRowCache.length},c.prototype.registerViewportAdjuster=function(a){this.viewportAdjusters.push(a)},c.prototype.removeViewportAdjuster=function(a){var b=this.viewportAdjusters.indexOf(a);"undefined"!=typeof b&&void 0!==b&&this.viewportAdjusters.splice(b,1)},c.prototype.getViewportAdjustment=function(){var a=this,b={height:0,width:0};return a.viewportAdjusters.forEach(function(a){b=a.call(this,b)}),b},c.prototype.getViewportHeight=function(){var a=this,b=a.headerHeight?a.headerHeight:a.grid.headerHeight,c=a.grid.gridHeight-b-a.grid.footerHeight,d=a.getViewportAdjustment();return c+=d.height},c.prototype.getViewportWidth=function(){var a=this,b=a.grid.gridWidth,c=a.getViewportAdjustment();return b+=c.width},c.prototype.getHeaderViewportWidth=function(){var a=this.getViewportWidth();return a},c.prototype.getCanvasHeight=function(){var a=this;if(!a.canvasHeightShouldUpdate)return a.$$canvasHeight;var b=a.$$canvasHeight;return a.$$canvasHeight=0,a.visibleRowCache.forEach(function(b){a.$$canvasHeight+=b.height}),a.canvasHeightShouldUpdate=!1,a.grid.api.core.raise.canvasHeightChanged(b,a.$$canvasHeight),a.$$canvasHeight;
  },c.prototype.getVerticalScrollLength=function(){return this.getCanvasHeight()-this.getViewportHeight()},c.prototype.getCanvasWidth=function(){var a=this,b=a.canvasWidth;return b},c.prototype.setRenderedRows=function(a){this.renderedRows.length=a.length;for(var b=0;b<a.length;b++)this.renderedRows[b]=a[b]},c.prototype.setRenderedColumns=function(a){this.renderedColumns.length=a.length;for(var b=0;b<a.length;b++)this.renderedColumns[b]=a[b];this.updateColumnOffset()},c.prototype.updateColumnOffset=function(){for(var a=0,b=0;b<this.currentFirstColumn;b++)a+=this.visibleColumnCache[b].drawnWidth;this.columnOffset=a},c.prototype.adjustScrollVertical=function(a,b,c){(this.prevScrollTop!==a||c)&&(("undefined"==typeof a||void 0===a||null===a)&&(a=(this.getCanvasHeight()-this.getViewportHeight())*b),this.adjustRows(a,b,!1),this.prevScrollTop=a,this.prevScrolltopPercentage=b,this.grid.queueRefresh())},c.prototype.adjustScrollHorizontal=function(a,b,c){(this.prevScrollLeft!==a||c)&&(("undefined"==typeof a||void 0===a||null===a)&&(a=(this.getCanvasWidth()-this.getViewportWidth())*b),this.adjustColumns(a,b),this.prevScrollLeft=a,this.prevScrollleftPercentage=b,this.grid.queueRefresh())},c.prototype.adjustRows=function(a,c,d){var e=this,f=e.minRowsToRender(),g=e.visibleRowCache,h=g.length-f;"undefined"!=typeof c&&null!==c||!a||(c=a/e.getVerticalScrollLength());var i=Math.ceil(Math.min(h,h*c));i>h&&(i=h);var j=[];if(g.length>e.grid.options.virtualizationThreshold){if("undefined"!=typeof a&&null!==a){if(!e.grid.options.enableInfiniteScroll&&e.prevScrollTop<a&&i<e.prevRowScrollIndex+e.grid.options.scrollThreshold&&h>i)return;if(!e.grid.options.enableInfiniteScroll&&e.prevScrollTop>a&&i>e.prevRowScrollIndex-e.grid.options.scrollThreshold&&h>i)return}var k={},l={};if(e.grid.options.enableInfiniteScroll&&e.grid.scrollDirection!==b.scrollDirection.NONE&&d){var m=null,n=null;if(e.grid.scrollDirection===b.scrollDirection.UP){for(m=i>0?e.grid.options.excessRows:0,n=0;n<g.length;n++)if(e.grid.options.rowIdentity(g[n].entity)===e.grid.options.rowIdentity(e.renderedRows[m].entity)){i=n;break}k=Math.max(0,i),l=Math.min(g.length,k+e.grid.options.excessRows+f)}else if(e.grid.scrollDirection===b.scrollDirection.DOWN){for(m=f,n=0;n<g.length;n++)if(e.grid.options.rowIdentity(g[n].entity)===e.grid.options.rowIdentity(e.renderedRows[m].entity)){i=n;break}k=Math.max(0,i-e.grid.options.excessRows-f),l=Math.min(g.length,i+f+e.grid.options.excessRows)}}else k=Math.max(0,i-e.grid.options.excessRows),l=Math.min(g.length,i+f+e.grid.options.excessRows);j=[k,l]}else{var o=e.visibleRowCache.length;j=[0,Math.max(o,f+e.grid.options.excessRows)]}e.updateViewableRowRange(j),e.prevRowScrollIndex=i},c.prototype.adjustColumns=function(a,b){var c=this,d=c.minColumnsToRender(),e=c.visibleColumnCache,f=e.length-d;"undefined"!=typeof b&&null!==b||!a||(b=a/c.getCanvasWidth());var g=Math.ceil(Math.min(f,f*b));g>f&&(g=f);var h=[];if(e.length>c.grid.options.columnVirtualizationThreshold&&c.getCanvasWidth()>c.getViewportWidth()){var i=Math.max(0,g-c.grid.options.excessColumns),j=Math.min(e.length,g+d+c.grid.options.excessColumns);h=[i,j]}else{var k=c.visibleColumnCache.length;h=[0,Math.max(k,d+c.grid.options.excessColumns)]}c.updateViewableColumnRange(h),c.prevColumnScrollIndex=g},c.prototype.updateViewableRowRange=function(a){var b=this.visibleRowCache.slice(a[0],a[1]);this.currentTopRow=a[0],this.setRenderedRows(b)},c.prototype.updateViewableColumnRange=function(a){var b=this.visibleColumnCache.slice(a[0],a[1]);this.currentFirstColumn=a[0],this.setRenderedColumns(b)},c.prototype.headerCellWrapperStyle=function(){var a=this;if(0!==a.currentFirstColumn){var b=a.columnOffset;return a.grid.isRTL()?{"margin-right":b+"px"}:{"margin-left":b+"px"}}return null},c.prototype.updateColumnWidths=function(){var b,c=this,d=[],e=[],f=0,g=c.getViewportWidth()-c.grid.scrollbarWidth,h=0,i=0,j="",k=c.visibleColumnCache;k.forEach(function(b){if(b.visible){var c=!1;angular.isNumber(b.width)||(c=isNaN(b.width)&&a.endsWith(b.width,"%")),angular.isString(b.width)&&-1!==b.width.indexOf("*")?(f=parseInt(f+b.width.length,10),d.push(b)):c?e.push(b):angular.isNumber(b.width)&&(h=parseInt(h+b.width,10),i=parseInt(i,10)+parseInt(b.width,10),b.drawnWidth=b.width)}});var l,m,n,o=g-h;if(e.length>0){for(l=0;l<e.length;l++){m=e[l];var p=parseInt(m.width.replace(/%/g,""),10)/100;n=parseInt(p*o,10),m.colDef.minWidth&&n<m.colDef.minWidth?(n=m.colDef.minWidth,o-=n,i+=n,m.drawnWidth=n,e.splice(l,1)):m.colDef.maxWidth&&n>m.colDef.maxWidth&&(n=m.colDef.maxWidth,o-=n,i+=n,m.drawnWidth=n,e.splice(l,1))}e.forEach(function(a){var b=parseInt(a.width.replace(/%/g,""),10)/100,c=parseInt(b*o,10);i+=c,a.drawnWidth=c})}if(d.length>0){var q=parseInt(o/f,10);for(l=0;l<d.length;l++)m=d[l],n=parseInt(q*m.width.length,10),m.colDef.minWidth&&n<m.colDef.minWidth?(n=m.colDef.minWidth,o-=n,f--,i+=n,m.drawnWidth=n,b=m,d.splice(l,1)):m.colDef.maxWidth&&n>m.colDef.maxWidth&&(n=m.colDef.maxWidth,o-=n,f--,i+=n,m.drawnWidth=n,d.splice(l,1));q=parseInt(o/f,10),d.forEach(function(a){var b=parseInt(q*a.width.length,10);i+=b,a.drawnWidth=b})}var r=g-parseInt(i,10);if(r>0&&i>0&&g>i){var s=!1;if(k.forEach(function(a){a.width&&!angular.isNumber(a.width)&&(s=!0)}),s)for(var t=function(a){r>0&&(a.drawnWidth=a.drawnWidth+1,i+=1,r--)};r>0;)k.forEach(t)}g>i&&(i=g),k.forEach(function(a){j+=a.getColClassDefinition()}),c.canvasWidth=parseInt(i,10),this.columnStyles=j},c.prototype.getViewPortStyle=function(){var a=this,c={};return"body"===a.name?(c["overflow-x"]=a.grid.options.enableHorizontalScrollbar===b.scrollbars.NEVER?"hidden":"scroll",c["overflow-y"]=a.grid.isRTL()?a.grid.hasLeftContainerColumns()?"hidden":a.grid.options.enableVerticalScrollbar===b.scrollbars.NEVER?"hidden":"scroll":a.grid.hasRightContainerColumns()?"hidden":a.grid.options.enableVerticalScrollbar===b.scrollbars.NEVER?"hidden":"scroll"):"left"===a.name?(c["overflow-x"]="hidden",c["overflow-y"]=a.grid.isRTL()?a.grid.options.enableVerticalScrollbar===b.scrollbars.NEVER?"hidden":"scroll":"hidden"):(c["overflow-x"]="hidden",c["overflow-y"]=a.grid.isRTL()?"hidden":a.grid.options.enableVerticalScrollbar===b.scrollbars.NEVER?"hidden":"scroll"),c},c}])}(),function(){angular.module("ui.grid").factory("GridRow",["gridUtil",function(a){function b(b,c,d){this.grid=d,this.entity=b,this.uid=a.nextUid(),this.visible=!0,this.$$height=d.options.rowHeight}return Object.defineProperty(b.prototype,"height",{get:function(){return this.$$height},set:function(a){a!==this.$$height&&(this.grid.updateCanvasHeight(),this.$$height=a)}}),b.prototype.getQualifiedColField=function(a){return"row."+this.getEntityQualifiedColField(a)},b.prototype.getEntityQualifiedColField=function(b){return a.preEval("entity."+b.field)},b.prototype.setRowInvisible=function(a){a&&a.setThisRowInvisible&&a.setThisRowInvisible("user")},b.prototype.clearRowInvisible=function(a){a&&a.clearThisRowInvisible&&a.clearThisRowInvisible("user")},b.prototype.setThisRowInvisible=function(a,b){this.invisibleReason||(this.invisibleReason={}),this.invisibleReason[a]=!0,this.evaluateRowVisibility(b)},b.prototype.clearThisRowInvisible=function(a,b){delete this.invisibleReason.user,this.evaluateRowVisibility(b)},b.prototype.evaluateRowVisibility=function(a){var b=!0;this.invisibleReason&&angular.forEach(this.invisibleReason,function(a){a&&(b=!1)}),this.visible!==b&&(this.visible=b,a||(this.grid.queueGridRefresh(),this.grid.api.core.raise.rowsVisibleChanged(this)))},b}])}(),function(){angular.module("ui.grid").factory("ScrollEvent",["gridUtil",function(a){function b(b,c,d,e){var f=this;if(!b)throw new Error("grid argument is required");f.grid=b,f.source=e,f.sourceRowContainer=c,f.sourceColContainer=d,f.newScrollLeft=null,f.newScrollTop=null,f.x=null,f.y=null,f.fireThrottledScrollingEvent=a.throttle(function(){f.grid.api.core.raise.scrollEvent(f)},f.grid.options.scrollThrottle,{trailing:!0})}return b.prototype.fireScrollingEvent=function(){this.grid.api.core.raise.scrollEvent(this)},b.prototype.getNewScrollLeft=function(b,c){var d=this;if(!d.newScrollLeft){var e,f=b.getCanvasWidth()-b.getViewportWidth(),g=a.normalizeScrollLeft(c);if("undefined"!=typeof d.x.percentage&&void 0!==d.x.percentage)e=d.x.percentage;else{if("undefined"==typeof d.x.pixels||void 0===d.x.pixels)throw new Error("No percentage or pixel value provided for scroll event X axis");e=d.x.percentage=(g+d.x.pixels)/f}return Math.max(0,e*f)}return d.newScrollLeft},b.prototype.getNewScrollTop=function(a,b){var c=this;if(!c.newScrollTop){var d,e=a.getVerticalScrollLength(),f=b[0].scrollTop;if("undefined"!=typeof c.y.percentage&&void 0!==c.y.percentage)d=c.y.percentage;else{if("undefined"==typeof c.y.pixels||void 0===c.y.pixels)throw new Error("No percentage or pixel value provided for scroll event Y axis");d=c.y.percentage=(f+c.y.pixels)/e}return Math.max(0,d*e)}return c.newScrollTop},b.Sources={ViewPortScroll:"ViewPortScroll",RenderContainerMouseWheel:"RenderContainerMouseWheel",RenderContainerTouchMove:"RenderContainerTouchMove",Other:99},b}])}(),function(){"use strict";angular.module("ui.grid").service("gridClassFactory",["gridUtil","$q","$compile","$templateCache","uiGridConstants","Grid","GridColumn","GridRow",function(a,b,c,d,e,f){var g={createGrid:function(d){d="undefined"!=typeof d?d:{},d.id=a.newId();var e=new f(d);if(e.options.rowTemplate){var h=b.defer();e.getRowTemplateFn=h.promise,a.getTemplate(e.options.rowTemplate).then(function(a){var b=c(a);h.resolve(b)},function(){throw new Error("Couldn't fetch/use row template '"+e.options.rowTemplate+"'")})}return e.registerColumnBuilder(g.defaultColumnBuilder),e.registerRowBuilder(g.rowTemplateAssigner),e.registerRowsProcessor(function(a){return a.forEach(function(a){a.visible=!0}),a}),e.registerColumnsProcessor(function(a){return a.forEach(function(a){a.visible=!0}),a}),e.registerColumnsProcessor(function(a){return a.forEach(function(a){a.colDef.visible===!1&&(a.visible=!1)}),a}),e.registerRowsProcessor(e.searchRows),e.registerRowsProcessor(e.options.externalSort&&angular.isFunction(e.options.externalSort)?e.options.externalSort:e.sortByColumn),e},defaultColumnBuilder:function(c,d){var f=[];return d.providedHeaderCellTemplate=c.headerCellTemplate?c.headerCellTemplate:"ui-grid/uiGridHeaderCell",d.providedCellTemplate=c.cellTemplate?c.cellTemplate:"ui-grid/uiGridCell",d.providedFooterCellTemplate=c.footerCellTemplate?c.footerCellTemplate:"ui-grid/uiGridFooterCell",d.cellTemplatePromise=a.getTemplate(d.providedCellTemplate),f.push(d.cellTemplatePromise.then(function(a){d.cellTemplate=a.replace(e.CUSTOM_FILTERS,d.cellFilter?"|"+d.cellFilter:"")},function(){throw new Error("Couldn't fetch/use colDef.cellTemplate '"+c.cellTemplate+"'")})),f.push(a.getTemplate(d.providedHeaderCellTemplate).then(function(a){d.headerCellTemplate=a.replace(e.CUSTOM_FILTERS,d.headerCellFilter?"|"+d.headerCellFilter:"")},function(){throw new Error("Couldn't fetch/use colDef.headerCellTemplate '"+c.headerCellTemplate+"'")})),f.push(a.getTemplate(d.providedFooterCellTemplate).then(function(a){d.footerCellTemplate=a.replace(e.CUSTOM_FILTERS,d.footerCellFilter?"|"+d.footerCellFilter:"")},function(){throw new Error("Couldn't fetch/use colDef.footerCellTemplate '"+c.footerCellTemplate+"'")})),d.compiledElementFnDefer=b.defer(),b.all(f)},rowTemplateAssigner:function(d){var e=this;if(d.rowTemplate){var f=b.defer();d.getRowTemplateFn=f.promise,a.getTemplate(d.rowTemplate).then(function(a){var b=c(a);f.resolve(b)},function(){throw new Error("Couldn't fetch/use row template '"+d.rowTemplate+"'")})}else d.rowTemplate=e.options.rowTemplate,d.getRowTemplateFn=e.getRowTemplateFn;return d.getRowTemplateFn}};return g}])}(),function(){function a(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var b=angular.module("ui.grid");b.service("rowSearcher",["gridUtil","uiGridConstants",function(b,c){var d=c.filter.STARTS_WITH,e={};return e.getTerm=function(a){if("undefined"==typeof a.term)return a.term;var b=a.term;return"string"==typeof b&&(b=b.trim()),b},e.stripTerm=function(b){var c=e.getTerm(b);return"string"==typeof c?a(c.replace(/(^\*|\*$)/g,"")):c},e.guessCondition=function(a){if("undefined"==typeof a.term||!a.term)return d;var b=e.getTerm(a);if(/\*/.test(b)){var c="";a.flags&&a.flags.caseSensitive||(c+="i");var f=b.replace(/(\\)?\*/g,function(a,b){return b?a:"[\\s\\S]*?"});return new RegExp("^"+f+"$",c)}return d},e.setupFilters=function(a){for(var b=[],d=a.length,f=0;d>f;f++){var g=a[f];if(g.noTerm||g.term){var h={},i="";g.flags&&g.flags.caseSensitive||(i+="i"),g.term&&(h.term=e.stripTerm(g)),h.condition=g.condition?g.condition:e.guessCondition(g),h.flags=angular.extend({caseSensitive:!1,date:!1},g.flags),h.condition===c.filter.STARTS_WITH&&(h.startswithRE=new RegExp("^"+h.term,i)),h.condition===c.filter.ENDS_WITH&&(h.endswithRE=new RegExp(h.term+"$",i)),h.condition===c.filter.CONTAINS&&(h.containsRE=new RegExp(h.term,i)),h.condition===c.filter.EXACT&&(h.exactRE=new RegExp("^"+h.term+"$",i)),b.push(h)}}return b},e.runColumnFilter=function(a,b,d,e){var f=typeof e.condition,g=e.term,h=a.getCellValue(b,d);if(e.condition instanceof RegExp)return e.condition.test(h);if("function"===f)return e.condition(g,h,b,d);if(e.startswithRE)return e.startswithRE.test(h);if(e.endswithRE)return e.endswithRE.test(h);if(e.containsRE)return e.containsRE.test(h);if(e.exactRE)return e.exactRE.test(h);if(e.condition===c.filter.NOT_EQUAL){var i=new RegExp("^"+g+"$");return!i.exec(h)}if("number"==typeof h){var j=parseFloat(g.replace(/\\\./,".").replace(/\\\-/,"-"));isNaN(j)||(g=j)}return e.flags.date===!0&&(h=new Date(h),g=new Date(g.replace(/\\/g,""))),e.condition===c.filter.GREATER_THAN?h>g:e.condition===c.filter.GREATER_THAN_OR_EQUAL?h>=g:e.condition===c.filter.LESS_THAN?g>h:e.condition===c.filter.LESS_THAN_OR_EQUAL?g>=h:!0},e.searchColumn=function(a,b,c,d){if(a.options.useExternalFiltering)return!0;for(var f=d.length,g=0;f>g;g++){var h=d[g],i=e.runColumnFilter(a,b,c,h);if(!i)return!1}return!0},e.search=function(a,b,c){if(b){if(!a.options.enableFiltering)return b;for(var d=[],f=c.length,g=0;f>g;g++){var h=c[g];"undefined"!=typeof h.filters&&(h.filters.length>1||1===h.filters.length&&("undefined"!=typeof h.filters[0].term&&h.filters[0].term||h.filters[0].noTerm))?d.push({col:h,filters:e.setupFilters(h.filters)}):"undefined"!=typeof h.filter&&h.filter&&("undefined"!=typeof h.filter.term&&h.filter.term||h.filter.noTerm)&&d.push({col:h,filters:e.setupFilters([h.filter])})}if(d.length>0){for(var i=function(a,b,c,d){e.searchColumn(a,b,c,d)||b.setThisRowInvisible("filtered",!0)},j=function(a,c){for(var d=b.length,e=0;d>e;e++)i(a,b[e],c.col,c.filters)},k=d.length,l=0;k>l;l++)j(a,d[l]);a.api.core.raise.rowsVisibleChanged&&a.api.core.raise.rowsVisibleChanged()}return b}},e}])}(),function(){var a=angular.module("ui.grid");a.service("rowSorter",["$parse","uiGridConstants",function(a,b){var c="("+b.CURRENCY_SYMBOLS.map(function(a){return"\\"+a}).join("|")+")?",d=(new RegExp("^[-+]?"+c+"[\\d,.]+"+c+"%?$"),{colSortFnCache:{}});return d.guessSortFn=function(a){switch(a){case"number":return d.sortNumber;case"boolean":return d.sortBool;case"string":return d.sortAlpha;case"date":return d.sortDate;case"object":return d.basicSort;default:throw new Error("No sorting function found for type:"+a)}},d.handleNulls=function(a,b){if(!a&&0!==a&&a!==!1||!b&&0!==b&&b!==!1){if(!a&&0!==a&&a!==!1&&!b&&0!==b&&b!==!1)return 0;if(!a&&0!==a&&a!==!1)return 1;if(!b&&0!==b&&b!==!1)return-1}return null},d.basicSort=function(a,b){var c=d.handleNulls(a,b);return null!==c?c:a===b?0:b>a?-1:1},d.sortNumber=function(a,b){var c=d.handleNulls(a,b);return null!==c?c:a-b},d.sortNumberStr=function(a,b){var c=d.handleNulls(a,b);if(null!==c)return c;var e,f,g=!1,h=!1;return e=parseFloat(a.replace(/[^0-9.-]/g,"")),isNaN(e)&&(g=!0),f=parseFloat(b.replace(/[^0-9.-]/g,"")),isNaN(f)&&(h=!0),g&&h?0:g?1:h?-1:e-f},d.sortAlpha=function(a,b){var c=d.handleNulls(a,b);if(null!==c)return c;var e=a.toString().toLowerCase(),f=b.toString().toLowerCase();return e===f?0:f>e?-1:1},d.sortDate=function(a,b){var c=d.handleNulls(a,b);if(null!==c)return c;var e=a.getTime(),f=b.getTime();return e===f?0:f>e?-1:1},d.sortBool=function(a,b){var c=d.handleNulls(a,b);return null!==c?c:a&&b?0:a||b?a?1:-1:0},d.getSortFn=function(a,b){var c;return d.colSortFnCache[b.colDef.name]?c=d.colSortFnCache[b.colDef.name]:void 0!==b.sortingAlgorithm?(c=b.sortingAlgorithm,d.colSortFnCache[b.colDef.name]=b.sortingAlgorithm):(c=d.guessSortFn(b.colDef.type),c?d.colSortFnCache[b.colDef.name]=c:c=d.sortAlpha),c},d.prioritySort=function(a,b){return void 0!==a.sort.priority&&void 0!==b.sort.priority?a.sort.priority<b.sort.priority?-1:a.sort.priority===b.sort.priority?0:1:a.sort.priority||0===a.sort.priority?-1:b.sort.priority||0===b.sort.priority?1:0},d.sort=function(a,c,e){if(c){if(a.options.useExternalSorting)return c;var f=[];if(e.forEach(function(a){a.sort&&a.sort.direction&&(a.sort.direction===b.ASC||a.sort.direction===b.DESC)&&f.push(a)}),f=f.sort(d.prioritySort),0===f.length)return c;var g,h,i=c.slice(0),j=function(a,b){a.entity.$$uiGridIndex=b};c.forEach(j);var k=function(c,e){for(var j,k=0,l=0;0===k&&l<f.length;){g=f[l],h=f[l].sort.direction,j=d.getSortFn(a,g,i);var m=a.getCellValue(c,g),n=a.getCellValue(e,g);k=j(m,n),l++}return 0===k?c.entity.$$uiGridIndex-e.entity.$$uiGridIndex:h===b.ASC?k:0-k},l=c.sort(k),m=function(a){delete a.entity.$$uiGridIndex};return c.forEach(m),l}},d}])}(),function(){function a(a){var b=a;return"undefined"!=typeof b.length&&b.length&&(b=a[0]),b.ownerDocument.defaultView.getComputedStyle(b,null)}function b(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0,h=["Top","Right","Bottom","Left"];4>f;f+=2){var i=h[f];if("margin"===c){var j=parseFloat(e[c+i]);isNaN(j)||(g+=j)}if(d){if("content"===c){var k=parseFloat(e["padding"+i]);isNaN(k)||(g-=k)}if("margin"!==c){var l=parseFloat(e["border"+i+"Width"]);isNaN(l)||(g-=l)}}else{var m=parseFloat(e["padding"+i]);if(isNaN(m)||(g+=m),"padding"!==c){var n=parseFloat(e["border"+i+"Width"]);isNaN(n)||(g+=n)}}}return g}function c(c,d,e){var f,h=!0,i=a(c),j="border-box"===i.boxSizing;if(0>=f||null==f){if(f=i[d],(0>f||null==f)&&(f=c.style[d]),g.test(f))return f;h=j&&!0,f=parseFloat(f)||0}var k=f+b(c,d,e||(j?"border":"content"),h,i);return k}function d(b){b=angular.element(b)[0];var c=b.offsetParent;return c||(c=document.getElementsByTagName("body")[0]),parseInt(a(c).fontSize)||parseInt(a(b).fontSize)||16}var e,f=angular.module("ui.grid");"function"!=typeof Function.prototype.bind&&(e=function(){var a=Array.prototype.slice;return function(b){var c=this,d=a.call(arguments,1);return d.length?function(){return arguments.length?c.apply(b,d.concat(a.call(arguments))):c.apply(b,d)}:function(){return arguments.length?c.apply(b,arguments):c.call(b)}}});var g=new RegExp("^("+/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source+")(?!px)[a-z%]+$","i"),h=/^(block|none|table(?!-c[ea]).+)/,i={position:"absolute",visibility:"hidden",display:"block"},j=["0","0","0"],k="uiGrid-";f.service("gridUtil",["$log","$window","$document","$http","$templateCache","$timeout","$injector","$q","$interpolate","uiGridConstants",function(b,f,g,l,m,n,o,p,q,r){function s(a,b){var c=angular.element(this),d=0,e=0,f=0,g=0;if(b.originalEvent&&(b=b.originalEvent),"detail"in b&&(f=-1*b.detail),"wheelDelta"in b&&(f=b.wheelDelta),"wheelDeltaY"in b&&(f=b.wheelDeltaY),"wheelDeltaX"in b&&(e=-1*b.wheelDeltaX),"axis"in b&&b.axis===b.HORIZONTAL_AXIS&&(e=-1*f,f=0),d=0===f?e:f,"deltaY"in b&&(f=-1*b.deltaY,d=f),"deltaX"in b&&(e=b.deltaX,0===f&&(d=-1*e)),0!==f||0!==e){if(1===b.deltaMode){var h=c.data("mousewheel-line-height");d*=h,f*=h,e*=h}else if(2===b.deltaMode){var i=c.data("mousewheel-page-height");d*=i,f*=i,e*=i}g=Math.max(Math.abs(f),Math.abs(e)),(!x||x>g)&&(x=g,u(b,g)&&(x/=40)),d=Math[d>=1?"floor":"ceil"](d/x),e=Math[e>=1?"floor":"ceil"](e/x),f=Math[f>=1?"floor":"ceil"](f/x),b.deltaMode=0;var j={originalEvent:b,deltaX:e,deltaY:f,deltaFactor:x,preventDefault:function(){b.preventDefault()}};w&&clearTimeout(w),w=setTimeout(t,200),a.call(c[0],j)}}function t(){x=null}function u(a,b){return"mousewheel"===a.type&&b%120===0}var v={getStyles:a,createBoundedWrapper:function(a,b){return function(){return b.apply(a,arguments)}},readableColumnName:function(a){return"undefined"==typeof a||void 0===a||null===a?a:("string"!=typeof a&&(a=String(a)),a.replace(/_+/g," ").replace(/^[A-Z]+$/,function(a){return angular.lowercase(angular.uppercase(a.charAt(0))+a.slice(1))}).replace(/([\w\u00C0-\u017F]+)/g,function(a){return angular.uppercase(a.charAt(0))+a.slice(1)}).replace(/(\w+?(?=[A-Z]))/g,"$1 "))},getColumnsFromData:function(a,b){var c=[];if(!a||"undefined"==typeof a[0]||void 0===a[0])return[];angular.isUndefined(b)&&(b=[]);var d=a[0];return angular.forEach(d,function(a,d){-1===b.indexOf(d)&&c.push({name:d})}),c},newId:function(){var a=(new Date).getTime();return function(){return a+=1}}(),getTemplate:function(a){if(m.get(a))return v.postProcessTemplate(m.get(a));if(a.hasOwnProperty("then"))return a.then(v.postProcessTemplate);try{if(angular.element(a).length>0)return p.when(a).then(v.postProcessTemplate)}catch(b){}return v.logDebug("fetching url",a),l({method:"GET",url:a}).then(function(b){var c=b.data.trim();return m.put(a,c),c},function(b){throw new Error("Could not get template "+a+": "+b)}).then(v.postProcessTemplate)},postProcessTemplate:function(a){var b=q.startSymbol(),c=q.endSymbol();return("{{"!==b||"}}"!==c)&&(a=a.replace(/\{\{/g,b),a=a.replace(/\}\}/g,c)),p.when(a)},guessType:function(a){var b=typeof a;switch(b){case"number":case"boolean":case"string":return b;default:return angular.isDate(a)?"date":"object"}},elementWidth:function(){},elementHeight:function(){},getScrollbarWidth:function(){var a=document.createElement("div");a.style.visibility="hidden",a.style.width="100px",a.style.msOverflowStyle="scrollbar",document.body.appendChild(a);var b=a.offsetWidth;a.style.overflow="scroll";var c=document.createElement("div");c.style.width="100%",a.appendChild(c);var d=c.offsetWidth;return a.parentNode.removeChild(a),b-d},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},fakeElement:function(a,b,c){var d,e,f=angular.element(a).clone()[0];for(e in b)f.style[e]=b[e];return angular.element(document.body).append(f),d=c.call(f,f),angular.element(f).remove(),d},normalizeWheelEvent:function(a){var b,c,d,e=a||window.event,f=([].slice.call(arguments,1),0),g=0,h=0,i=0,j=0;return e.originalEvent&&(e=e.originalEvent),e.wheelDelta&&(f=e.wheelDelta),e.detail&&(f=-1*e.detail),h=f,void 0!==e.axis&&e.axis===e.HORIZONTAL_AXIS&&(h=0,g=-1*f),e.deltaY&&(h=-1*e.deltaY,f=h),e.deltaX&&(g=e.deltaX,f=-1*g),void 0!==e.wheelDeltaY&&(h=e.wheelDeltaY),void 0!==e.wheelDeltaX&&(g=e.wheelDeltaX),i=Math.abs(f),(!b||b>i)&&(b=i),j=Math.max(Math.abs(h),Math.abs(g)),(!c||c>j)&&(c=j),d=f>0?"floor":"ceil",f=Math[d](f/b),g=Math[d](g/c),h=Math[d](h/c),{delta:f,deltaX:g,deltaY:h}},isTouchEnabled:function(){var a;return("ontouchstart"in f||f.DocumentTouch&&g instanceof DocumentTouch)&&(a=!0),a},isNullOrUndefined:function(a){return void 0===a||null===a?!0:!1},endsWith:function(a,b){return a&&b&&"string"==typeof a?-1!==a.indexOf(b,a.length-b.length):!1},arrayContainsObjectWithProperty:function(a,b,c){var d=!1;return angular.forEach(a,function(a){a[b]===c&&(d=!0)}),d},requestAnimationFrame:f.requestAnimationFrame&&f.requestAnimationFrame.bind(f)||f.webkitRequestAnimationFrame&&f.webkitRequestAnimationFrame.bind(f)||function(a){return n(a,10,!1)},numericAndNullSort:function(a,b){return null===a?1:null===b?-1:null===a&&null===b?0:a-b},disableAnimations:function(a){var b;try{b=o.get("$animate"),b.enabled(!1,a)}catch(c){}},enableAnimations:function(a){var b;try{return b=o.get("$animate"),b.enabled(!0,a),b}catch(c){}},nextUid:function(){for(var a,b=j.length;b;){if(b--,a=j[b].charCodeAt(0),57===a)return j[b]="A",k+j.join("");if(90!==a)return j[b]=String.fromCharCode(a+1),k+j.join("");j[b]="0"}return j.unshift("0"),k+j.join("")},hashKey:function(a){var b,c=typeof a;return"object"===c&&null!==a?"function"==typeof(b=a.$$hashKey)?b=a.$$hashKey():"undefined"!=typeof a.$$hashKey&&a.$$hashKey?b=a.$$hashKey:void 0===b&&(b=a.$$hashKey=v.nextUid()):b=a,c+":"+b},resetUids:function(){j=["0","0","0"]},logError:function(a){r.LOG_ERROR_MESSAGES&&b.error(a)},logWarn:function(a){r.LOG_WARN_MESSAGES&&b.warn(a)},logDebug:function(){r.LOG_DEBUG_MESSAGES&&b.debug.apply(b,arguments)}};["width","height"].forEach(function(b){var d=angular.uppercase(b.charAt(0))+b.substr(1);v["element"+d]=function(d,e){var f=d;if(f&&"undefined"!=typeof f.length&&f.length&&(f=d[0]),f){var g=a(f);return 0===f.offsetWidth&&h.test(g.display)?v.fakeElement(f,i,function(a){return c(a,b,e)}):c(f,b,e)}return null},v["outerElement"+d]=function(a,b){return a?v["element"+d].call(this,a,b?"margin":"border"):null}}),v.closestElm=function(a,b){"undefined"!=typeof a.length&&a.length&&(a=a[0]);var c;["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].some(function(a){return"function"==typeof document.body[a]?(c=a,!0):!1});for(var d;null!==a;){if(d=a.parentElement,null!==d&&d[c](b))return d;a=d}return null},v.type=function(a){var b=Function.prototype.toString.call(a.constructor);return b.match(/function (.*?)\(/)[1]},v.getBorderSize=function(b,c){"undefined"!=typeof b.length&&b.length&&(b=b[0]);var d=a(b);c=c?"border"+c.charAt(0).toUpperCase()+c.slice(1):"border",c+="Width";var e=parseInt(d[c],10);return isNaN(e)?0:e},v.detectBrowser=function(){var a=f.navigator.userAgent,b={chrome:/chrome/i,safari:/safari/i,firefox:/firefox/i,ie:/internet explorer|trident\//i};for(var c in b)if(b[c].test(a))return c;return"unknown"},v.rtlScrollType=function z(){if(z.type)return z.type;var a=angular.element('<div dir="rtl" style="font-size: 14px; width: 1px; height: 1px; position: absolute; top: -1000px; overflow: scroll">A</div>')[0],b="reverse";return document.body.appendChild(a),a.scrollLeft>0?b="default":(a.scrollLeft=1,0===a.scrollLeft&&(b="negative")),a.remove(),z.type=b,b},v.normalizeScrollLeft=function(a){"undefined"!=typeof a.length&&a.length&&(a=a[0]);var b=a.scrollLeft,c=v.getStyles(a).direction;if("rtl"===c)switch(v.rtlScrollType()){case"default":return a.scrollWidth-b-a.clientWidth;case"negative":return Math.abs(b);case"reverse":return b}return b},v.denormalizeScrollLeft=function(a,b){"undefined"!=typeof a.length&&a.length&&(a=a[0]);var c=v.getStyles(a).direction;if("rtl"===c)switch(v.rtlScrollType()){case"default":var d=a.scrollWidth-a.clientWidth;return d-b;case"negative":return-1*b;case"reverse":return b}return b},v.preEval=function(a){var b=r.BRACKET_REGEXP.exec(a);if(b)return(b[1]?v.preEval(b[1]):b[1])+b[2]+(b[3]?v.preEval(b[3]):b[3]);a=a.replace(r.APOS_REGEXP,"\\'");var c=a.split(r.DOT_REGEXP),d=[c.shift()];return angular.forEach(c,function(a){d.push(a.replace(r.FUNC_REGEXP,"']$1"))}),d.join("['")},v.debounce=function(a,b,c){function d(){g=this,f=arguments;var d=function(){e=null,c||(h=a.apply(g,f))},i=c&&!e;return e&&n.cancel(e),e=n(d,b),i&&(h=a.apply(g,f)),h}var e,f,g,h;return d.cancel=function(){n.cancel(e),e=null},d},v.throttle=function(a,b,c){function d(){g=+new Date,a.apply(e,f),n(function(){h=null},0)}c=c||{};var e,f,g=0,h=null;return function(){if(e=this,f=arguments,null===h){var a=+new Date-g;a>b?d():c.trailing&&(h=n(d,b-a))}}},v.on={},v.off={},v._events={},v.addOff=function(a){v.off[a]=function(b,c){var d=v._events[a].indexOf(c);d>0&&v._events[a].removeAt(d)}};var w,x,y="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];return v.on.mousewheel=function(a,b){if(a&&b){var c=angular.element(a);c.data("mousewheel-line-height",d(c)),c.data("mousewheel-page-height",v.elementHeight(c)),c.data("mousewheel-callbacks")||c.data("mousewheel-callbacks",{});var f=c.data("mousewheel-callbacks");f[b]=(Function.prototype.bind||e).call(s,c[0],b);for(var g=y.length;g;)c.on(y[--g],f[b])}},v.off.mousewheel=function(a,b){var c=angular.element(this),d=c.data("mousewheel-callbacks"),e=d[b];if(e)for(var f=y.length;f;)c.off(y[--f],e);delete d[b],0===Object.keys(d).length&&(c.removeData("mousewheel-line-height"),c.removeData("mousewheel-page-height"),c.removeData("mousewheel-callbacks"))},v}]),f.filter("px",function(){return function(a){return a.match(/^[\d\.]+$/)?a+"px":a}})}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("da",{aggregate:{label:"artikler"},groupPanel:{description:"Grupér rækker udfra en kolonne ved at trække dens overskift hertil."},search:{placeholder:"Søg...",showingItems:"Viste rækker:",selectedItems:"Valgte rækker:",totalItems:"Rækker totalt:",size:"Side størrelse:",first:"Første side",next:"Næste side",previous:"Forrige side",last:"Sidste side"},menu:{text:"Vælg kolonner:"},column:{hide:"Skjul kolonne"},aggregation:{count:"samlede rækker: ",sum:"smalede: ",avg:"gns: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("de",{aggregate:{label:"Eintrag"},groupPanel:{description:"Ziehen Sie eine Spaltenüberschrift hierhin, um nach dieser Spalte zu gruppieren."},search:{placeholder:"Suche...",showingItems:"Zeige Einträge:",selectedItems:"Ausgewählte Einträge:",totalItems:"Einträge gesamt:",size:"Einträge pro Seite:",first:"Erste Seite",next:"Nächste Seite",previous:"Vorherige Seite",last:"Letzte Seite"},menu:{text:"Spalten auswählen:"},sort:{ascending:"aufsteigend sortieren",descending:"absteigend sortieren",remove:"Sortierung zurücksetzen"},column:{hide:"Spalte ausblenden"},aggregation:{count:"Zeilen insgesamt: ",sum:"gesamt: ",avg:"Durchschnitt: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Links anheften",pinRight:"Rechts anheften",unpin:"Lösen"},gridMenu:{columns:"Spalten:",importerTitle:"Datei importieren",exporterAllAsCsv:"Alle Daten als CSV exportieren",exporterVisibleAsCsv:"sichtbare Daten als CSV exportieren",exporterSelectedAsCsv:"markierte Daten als CSV exportieren",exporterAllAsPdf:"Alle Daten als PDF exportieren",exporterVisibleAsPdf:"sichtbare Daten als PDF exportieren",exporterSelectedAsPdf:"markierte Daten als CSV exportieren"},importer:{noHeaders:"Es konnten keine Spaltennamen ermittelt werden. Sind in der Datei Spaltendefinitionen enthalten?",noObjects:"Es konnten keine Zeileninformationen gelesen werden, Sind in der Datei außer den Spaltendefinitionen auch Daten enthalten?",invalidCsv:"Die Datei konnte nicht eingelesen werden, ist es eine gültige CSV-Datei?",invalidJson:"Die Datei konnte nicht eingelesen werden. Enthält sie gültiges JSON?",jsonNotArray:"Die importierte JSON-Datei muß ein Array enthalten. Breche Import ab."},pagination:{sizes:"Einträge pro Seite",totalItems:"Einträge"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("en",{aggregate:{label:"items"},groupPanel:{description:"Drag a column header here and drop it to group by that column."},search:{placeholder:"Search...",showingItems:"Showing Items:",selectedItems:"Selected Items:",
  totalItems:"Total Items:",size:"Page Size:",first:"First Page",next:"Next Page",previous:"Previous Page",last:"Last Page"},menu:{text:"Choose Columns:"},sort:{ascending:"Sort Ascending",descending:"Sort Descending",remove:"Remove Sort"},column:{hide:"Hide Column"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Pin Left",pinRight:"Pin Right",unpin:"Unpin"},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."},pagination:{sizes:"items per page",totalItems:"items"},grouping:{group:"Group",ungroup:"Ungroup",aggregate_count:"Agg: Count",aggregate_sum:"Agg: Sum",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Avg",aggregate_remove:"Agg: Remove"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("es",{aggregate:{label:"Artículos"},groupPanel:{description:"Arrastre un encabezado de columna aquí y suéltelo para agrupar por esa columna."},search:{placeholder:"Buscar...",showingItems:"Artículos Mostrados:",selectedItems:"Artículos Seleccionados:",totalItems:"Artículos Totales:",size:"Tamaño de Página:",first:"Primera Página",next:"Página Siguiente",previous:"Página Anterior",last:"Última Página"},menu:{text:"Elegir columnas:"},sort:{ascending:"Orden Ascendente",descending:"Orden Descendente",remove:"Sin Ordenar"},column:{hide:"Ocultar la columna"},aggregation:{count:"filas totales: ",sum:"total: ",avg:"media: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fijar a la Izquierda",pinRight:"Fijar a la Derecha",unpin:"Quitar Fijación"},gridMenu:{columns:"Columnas:",importerTitle:"Importar archivo",exporterAllAsCsv:"Exportar todo como csv",exporterVisibleAsCsv:"Exportar vista como csv",exporterSelectedAsCsv:"Exportar selección como csv",exporterAllAsPdf:"Exportar todo como pdf",exporterVisibleAsPdf:"Exportar vista como pdf",exporterSelectedAsPdf:"Exportar selección como pdf"},importer:{noHeaders:"No fue posible derivar los nombres de las columnas, ¿tiene encabezados el archivo?",noObjects:"No fue posible obtener registros, ¿contiene datos el archivo, aparte de los encabezados?",invalidCsv:"No fue posible procesar el archivo, ¿es un CSV válido?",invalidJson:"No fue posible procesar el archivo, ¿es un Json válido?",jsonNotArray:"El archivo json importado debe contener un array, abortando."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fa",{aggregate:{label:"موردها"},groupPanel:{description:"یک عنوان ستون اینجا را بردار و به گروهی از آن ستون بیانداز."},search:{placeholder:"جستجو...",showingItems:"نمایش موردها:",selectedItems:"موردهای انتخاب‌شده:",totalItems:"همهٔ موردها:",size:"اندازهٔ صفحه:",first:"صفحهٔ اول",next:"صفحهٔ بعد",previous:"صفحهٔ قبل",last:"آخرین صفحه"},menu:{text:"انتخاب ستون‌ها:"},column:{hide:"ستون پنهان کن"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fi",{aggregate:{label:"rivit"},groupPanel:{description:"Raahaa ja pudota otsikko tähän ryhmittääksesi sarakkeen mukaan."},search:{placeholder:"Hae...",showingItems:"Näytetään rivejä:",selectedItems:"Valitut rivit:",totalItems:"Rivejä yht.:",size:"Näytä:",first:"Ensimmäinen sivu",next:"Seuraava sivu",previous:"Edellinen sivu",last:"Viimeinen sivu"},menu:{text:"Valitse sarakkeet:"},sort:{ascending:"Järjestä nouseva",descending:"Järjestä laskeva",remove:"Poista järjestys"},column:{hide:"Piilota sarake"},aggregation:{count:"Rivejä yht.: ",sum:"Summa: ",avg:"K.a.: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Lukitse vasemmalle",pinRight:"Lukitse oikealle",unpin:"Poista lukitus"},gridMenu:{columns:"Sarakkeet:",importerTitle:"Tuo tiedosto",exporterAllAsCsv:"Vie tiedot csv-muodossa",exporterVisibleAsCsv:"Vie näkyvä tieto csv-muodossa",exporterSelectedAsCsv:"Vie valittu tieto csv-muodossa",exporterAllAsPdf:"Vie tiedot pdf-muodossa",exporterVisibleAsPdf:"Vie näkyvä tieto pdf-muodossa",exporterSelectedAsPdf:"Vie valittu tieto pdf-muodossa"},importer:{noHeaders:"Sarakkeen nimiä ei voitu päätellä, onko tiedostossa otsikkoriviä?",noObjects:"Tietoja ei voitu lukea, onko tiedostossa muuta kuin otsikkot?",invalidCsv:"Tiedostoa ei voitu käsitellä, oliko se CSV-muodossa?",invalidJson:"Tiedostoa ei voitu käsitellä, oliko se JSON-muodossa?",jsonNotArray:"Tiedosto ei sisältänyt taulukkoa, lopetetaan."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fr",{aggregate:{label:"articles"},groupPanel:{description:"Faites glisser un en-tête de colonne ici et déposez-le vers un groupe par cette colonne."},search:{placeholder:"Recherche...",showingItems:"Articles Affichage des:",selectedItems:"Éléments Articles:",totalItems:"Nombre total d'articles:",size:"Taille de page:",first:"Première page",next:"Page Suivante",previous:"Page précédente",last:"Dernière page"},menu:{text:"Choisir des colonnes:"},sort:{ascending:"Trier par ordre croissant",descending:"Trier par ordre décroissant",remove:"Enlever le tri"},column:{hide:"Cacher la colonne"},aggregation:{count:"total lignes: ",sum:"total: ",avg:"moy: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Épingler à gauche",pinRight:"Épingler à droite",unpin:"Détacher"},gridMenu:{columns:"Colonnes:",importerTitle:"Importer un fichier",exporterAllAsCsv:"Exporter toutes les données en CSV",exporterVisibleAsCsv:"Exporter les données visibles en CSV",exporterSelectedAsCsv:"Exporter les données sélectionnées en CSV",exporterAllAsPdf:"Exporter toutes les données en PDF",exporterVisibleAsPdf:"Exporter les données visibles en PDF",exporterSelectedAsPdf:"Exporter les données sélectionnées en PDF"},importer:{noHeaders:"Impossible de déterminer le nom des colonnes, le fichier possède-t-il un en-tête ?",noObjects:"Aucun objet trouvé, le fichier possède-t-il des données autres que l'en-tête ?",invalidCsv:"Le fichier n'a pas pu être traité, le CSV est-il valide ?",invalidJson:"Le fichier n'a pas pu être traité, le JSON est-il valide ?",jsonNotArray:"Le fichier JSON importé doit contenir un tableau. Abandon."},pagination:{sizes:"articles par page",totalItems:"articles"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("he",{aggregate:{label:"items"},groupPanel:{description:"גרור עמודה לכאן ושחרר בכדי לקבץ עמודה זו."},search:{placeholder:"חפש...",showingItems:"מציג:",selectedItems:'סה"כ נבחרו:',totalItems:'סה"כ רשומות:',size:"תוצאות בדף:",first:"דף ראשון",next:"דף הבא",previous:"דף קודם",last:"דף אחרון"},menu:{text:"בחר עמודות:"},sort:{ascending:"סדר עולה",descending:"סדר יורד",remove:"בטל"},column:{hide:"טור הסתר"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("hy",{aggregate:{label:"տվյալներ"},groupPanel:{description:"Ըստ սյան խմբավորելու համար քաշեք և գցեք վերնագիրն այստեղ։"},search:{placeholder:"Փնտրում...",showingItems:"Ցուցադրված տվյալներ՝",selectedItems:"Ընտրված:",totalItems:"Ընդամենը՝",size:"Տողերի քանակը էջում՝",first:"Առաջին էջ",next:"Հաջորդ էջ",previous:"Նախորդ էջ",last:"Վերջին էջ"},menu:{text:"Ընտրել սյուները:"},sort:{ascending:"Աճման կարգով",descending:"Նվազման կարգով",remove:"Հանել "},column:{hide:"Թաքցնել սյունը"},aggregation:{count:"ընդամենը տող՝ ",sum:"ընդամենը՝ ",avg:"միջին՝ ",min:"մին՝ ",max:"մաքս՝ "},pinning:{pinLeft:"Կպցնել ձախ կողմում",pinRight:"Կպցնել աջ կողմում",unpin:"Արձակել"},gridMenu:{columns:"Սյուներ:",importerTitle:"Ներմուծել ֆայլ",exporterAllAsCsv:"Արտահանել ամբողջը CSV",exporterVisibleAsCsv:"Արտահանել երևացող տվյալները CSV",exporterSelectedAsCsv:"Արտահանել ընտրված տվյալները CSV",exporterAllAsPdf:"Արտահանել PDF",exporterVisibleAsPdf:"Արտահանել երևացող տվյալները PDF",exporterSelectedAsPdf:"Արտահանել ընտրված տվյալները PDF"},importer:{noHeaders:"Հնարավոր չեղավ որոշել սյան վերնագրերը։ Արդյո՞ք ֆայլը ունի վերնագրեր։",noObjects:"Հնարավոր չեղավ կարդալ տվյալները։ Արդյո՞ք ֆայլում կան տվյալներ։",invalidCsv:"Հնարավոր չեղավ մշակել ֆայլը։ Արդյո՞ք այն վավեր CSV է։",invalidJson:"Հնարավոր չեղավ մշակել ֆայլը։ Արդյո՞ք այն վավեր Json է։",jsonNotArray:"Ներմուծված json ֆայլը պետք է պարունակի զանգված, կասեցվում է։"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("it",{aggregate:{label:"elementi"},groupPanel:{description:"Trascina un'intestazione all'interno del gruppo della colonna."},search:{placeholder:"Ricerca...",showingItems:"Mostra:",selectedItems:"Selezionati:",totalItems:"Totali:",size:"Tot Pagine:",first:"Prima",next:"Prossima",previous:"Precedente",last:"Ultima"},menu:{text:"Scegli le colonne:"},sort:{ascending:"Asc.",descending:"Desc.",remove:"Annulla ordinamento"},column:{hide:"Nascondi"},aggregation:{count:"righe totali: ",sum:"tot: ",avg:"media: ",min:"minimo: ",max:"massimo: "},pinning:{pinLeft:"Blocca a sx",pinRight:"Blocca a dx",unpin:"Blocca in alto"},gridMenu:{columns:"Colonne:",importerTitle:"Importa",exporterAllAsCsv:"Esporta tutti i dati in CSV",exporterVisibleAsCsv:"Esporta i dati visibili in CSV",exporterSelectedAsCsv:"Esporta i dati selezionati in CSV",exporterAllAsPdf:"Esporta tutti i dati in PDF",exporterVisibleAsPdf:"Esporta i dati visibili in PDF",exporterSelectedAsPdf:"Esporta i dati selezionati in PDF"},importer:{noHeaders:"Impossibile reperire i nomi delle colonne, sicuro che siano indicati all'interno del file?",noObjects:"Impossibile reperire gli oggetti, sicuro che siano indicati all'interno del file?",invalidCsv:"Impossibile elaborare il file, sicuro che sia un CSV?",invalidJson:"Impossibile elaborare il file, sicuro che sia un JSON valido?",jsonNotArray:"Errore! Il file JSON da importare deve contenere un array."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ja",{aggregate:{label:"件"},groupPanel:{description:"列名部分をここにドラッグアンドドロップすることで列ごとにグループ分けを行うことができます。"},search:{placeholder:"検索...",showingItems:"絞込み件数:",selectedItems:"選択件数:",totalItems:"全件数:",size:"ページサイズ: ",first:"最初のページ",next:"次のページ",previous:"前のページ",last:"最後のページ"},menu:{text:"列選択:"},sort:{ascending:"昇順ソート",descending:"降順ソート",remove:"ソート取消"},column:{hide:"列を隠す"},aggregation:{count:"合計件数: ",sum:"合計: ",avg:"平均: ",min:"最小値: ",max:"最大値: "},pinning:{pinLeft:"左にピン留め",pinRight:"右にピン留め",unpin:"ピン留め取消"},gridMenu:{columns:"列:",importerTitle:"インポートファイル",exporterAllAsCsv:"全てのデータをCSV形式でエクスポート",exporterVisibleAsCsv:"絞込み済みデータをCSV形式でエクスポート",exporterSelectedAsCsv:"選択しているデータをCSV形式でエクスポート",exporterAllAsPdf:"全てのデータをPDFでエクスポート",exporterVisibleAsPdf:"絞込み済みデータをPDFでエクスポート",exporterSelectedAsPdf:"選択しているデータをPDFでエクスポート"},importer:{noHeaders:"列名が抽出できません。ヘッダーは設定されていますか？",noObjects:"データが抽出できません。ファイルにデータは含まれていますか？",invalidCsv:"処理を行うことができません。ファイルは有効なCSVファイルですか？",invalidJson:"処理を行うことができません。ファイルは有効なJSONファイルですか？",jsonNotArray:"JSONファイルは配列を含んでいる必要があります。処理を中断します。"},pagination:{sizes:"件 / ページ",totalItems:"件"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ko",{aggregate:{label:"아이템"},groupPanel:{description:"컬럼으로 그룹핑하기 위해서는 컬럼 헤더를 끌어 떨어뜨려 주세요."},search:{placeholder:"검색...",showingItems:"항목 보여주기:",selectedItems:"선택 항목:",totalItems:"전체 항목:",size:"페이지 크기:",first:"첫번째 페이지",next:"다음 페이지",previous:"이전 페이지",last:"마지막 페이지"},menu:{text:"컬럼을 선택하세요:"},sort:{ascending:"오름차순 정렬",descending:"내림차순 정렬",remove:"소팅 제거"},column:{hide:"컬럼 제거"},aggregation:{count:"전체 갯수: ",sum:"전체: ",avg:"평균: ",min:"최소: ",max:"최대: "},pinning:{pinLeft:"왼쪽 핀",pinRight:"오른쪽 핀",unpin:"핀 제거"},gridMenu:{columns:"컬럼:",importerTitle:"파일 가져오기",exporterAllAsCsv:"csv로 모든 데이터 내보내기",exporterVisibleAsCsv:"csv로 보이는 데이터 내보내기",exporterSelectedAsCsv:"csv로 선택된 데이터 내보내기",exporterAllAsPdf:"pdf로 모든 데이터 내보내기",exporterVisibleAsPdf:"pdf로 보이는 데이터 내보내기",exporterSelectedAsPdf:"pdf로 선택 데이터 내보내기"},importer:{noHeaders:"컬럼명이 지정되어 있지 않습니다. 파일에 헤더가 명시되어 있는지 확인해 주세요.",noObjects:"데이터가 지정되어 있지 않습니다. 데이터가 파일에 있는지 확인해 주세요.",invalidCsv:"파일을 처리할 수 없습니다. 올바른 csv인지 확인해 주세요.",invalidJson:"파일을 처리할 수 없습니다. 올바른 json인지 확인해 주세요.",jsonNotArray:"json 파일은 배열을 포함해야 합니다."},pagination:{sizes:"페이지당 항목",totalItems:"전체 항목"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("nl",{aggregate:{label:"items"},groupPanel:{description:"Sleep hier een kolomnaam heen om op te groeperen."},search:{placeholder:"Zoeken...",showingItems:"Getoonde items:",selectedItems:"Geselecteerde items:",totalItems:"Totaal aantal items:",size:"Items per pagina:",first:"Eerste pagina",next:"Volgende pagina",previous:"Vorige pagina",last:"Laatste pagina"},menu:{text:"Kies kolommen:"},sort:{ascending:"Sorteer oplopend",descending:"Sorteer aflopend",remove:"Verwijder sortering"},column:{hide:"Verberg kolom"},aggregation:{count:"Aantal rijen: ",sum:"Som: ",avg:"Gemiddelde: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Zet links vast",pinRight:"Zet rechts vast",unpin:"Maak los"},gridMenu:{columns:"Kolommen:",importerTitle:"Importeer bestand",exporterAllAsCsv:"Exporteer alle data als csv",exporterVisibleAsCsv:"Exporteer zichtbare data als csv",exporterSelectedAsCsv:"Exporteer geselecteerde data als csv",exporterAllAsPdf:"Exporteer alle data als pdf",exporterVisibleAsPdf:"Exporteer zichtbare data als pdf",exporterSelectedAsPdf:"Exporteer geselecteerde data als pdf"},importer:{noHeaders:"Kolomnamen kunnen niet worden afgeleid. Heeft het bestand een header?",noObjects:"Objecten kunnen niet worden afgeleid. Bevat het bestand data naast de headers?",invalidCsv:"Het bestand kan niet verwerkt worden. Is het een valide csv bestand?",invalidJson:"Het bestand kan niet verwerkt worden. Is het valide json?",jsonNotArray:"Het json bestand moet een array bevatten. De actie wordt geannuleerd."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("pt-br",{aggregate:{label:"itens"},groupPanel:{description:"Arraste e solte uma coluna aqui para agrupar por essa coluna"},search:{placeholder:"Procurar...",showingItems:"Mostrando os Itens:",selectedItems:"Items Selecionados:",totalItems:"Total de Itens:",size:"Tamanho da Página:",first:"Primeira Página",next:"Próxima Página",previous:"Página Anterior",last:"Última Página"},menu:{text:"Selecione as colunas:"},sort:{ascending:"Ordenar Ascendente",descending:"Ordenar Descendente",remove:"Remover Ordenação"},column:{hide:"Esconder coluna"},aggregation:{count:"total de linhas: ",sum:"total: ",avg:"med: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fixar Esquerda",pinRight:"Fixar Direita",unpin:"Desprender"},gridMenu:{columns:"Colunas:",exporterAllAsCsv:"Exportar todos os dados como csv",exporterVisibleAsCsv:"Exportar dados visíveis como csv",exporterSelectedAsCsv:"Exportar dados selecionados como csv",exporterAllAsPdf:"Exportar todos os dados como pdf",exporterVisibleAsPdf:"Exportar dados visíveis como pdf",exporterSelectedAsPdf:"Exportar dados selecionados como pdf"},importer:{noHeaders:"Nomes de colunas não puderam ser derivados. O arquivo tem um cabeçalho?",noObjects:"Objetos não puderam ser derivados. Havia dados no arquivo, além dos cabeçalhos?",invalidCsv:"Arquivo não pode ser processado. É um CSV válido?",invalidJson:"Arquivo não pode ser processado. É um Json válido?",jsonNotArray:"Arquivo json importado tem que conter um array. Abortando."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("pt",{aggregate:{label:"itens"},groupPanel:{description:"Arraste e solte uma coluna aqui para agrupar por essa coluna"},search:{placeholder:"Procurar...",showingItems:"Mostrando os Itens:",selectedItems:"Items Selecionados:",totalItems:"Total de Itens:",size:"Tamanho da Página:",first:"Primeira Página",next:"Próxima Página",previous:"Página Anterior",last:"Última Página"},menu:{text:"Selecione as colunas:"},sort:{ascending:"Ordenar Ascendente",descending:"Ordenar Descendente",remove:"Remover Ordenação"},column:{hide:"Esconder coluna"},aggregation:{count:"total de linhas: ",sum:"total: ",avg:"med: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fixar Esquerda",pinRight:"Fixar Direita",unpin:"Desprender"},gridMenu:{columns:"Colunas:",exporterAllAsCsv:"Exportar todos os dados como csv",exporterVisibleAsCsv:"Exportar dados visíveis como csv",exporterSelectedAsCsv:"Exportar dados selecionados como csv",exporterAllAsPdf:"Exportar todos os dados como pdf",exporterVisibleAsPdf:"Exportar dados visíveis como pdf",exporterSelectedAsPdf:"Exportar dados selecionados como pdf"},importer:{noHeaders:"Nomes de colunas não puderam ser derivados. O arquivo tem um cabeçalho?",noObjects:"Objetos não puderam ser derivados. Havia dados no arquivo, além dos cabeçalhos?",invalidCsv:"Arquivo não pode ser processado. É um CSV válido?",invalidJson:"Arquivo não pode ser processado. É um Json válido?",jsonNotArray:"Arquivo json importado tem que conter um array. Abortando."},pagination:{sizes:"itens por página",totalItems:"itens"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ru",{aggregate:{label:"элементы"},groupPanel:{description:"Для группировки по столбцу перетащите сюда его название."},search:{placeholder:"Поиск...",showingItems:"Показать элементы:",selectedItems:"Выбранные элементы:",totalItems:"Всего элементов:",size:"Размер страницы:",first:"Первая страница",next:"Следующая страница",previous:"Предыдущая страница",last:"Последняя страница"},menu:{text:"Выбрать столбцы:"},sort:{ascending:"По возрастанию",descending:"По убыванию",remove:"Убрать сортировку"},column:{hide:"спрятать столбец"},aggregation:{count:"всего строк: ",sum:"итого: ",avg:"среднее: ",min:"мин: ",max:"макс: "},gridMenu:{columns:"Столбцы:",importerTitle:"Import file",exporterAllAsCsv:"Экспортировать всё в CSV",exporterVisibleAsCsv:"Экспортировать видимые данные в CSV",exporterSelectedAsCsv:"Экспортировать выбранные данные в CSV",exporterAllAsPdf:"Экспортировать всё в PDF",exporterVisibleAsPdf:"Экспортировать видимые данные в PDF",exporterSelectedAsPdf:"Экспортировать выбранные данные в PDF"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("sk",{aggregate:{label:"items"},groupPanel:{description:"Pretiahni sem názov stĺpca pre zoskupenie podľa toho stĺpca."},search:{placeholder:"Hľadaj...",showingItems:"Zobrazujem položky:",selectedItems:"Vybraté položky:",totalItems:"Počet položiek:",size:"Počet:",first:"Prvá strana",next:"Ďalšia strana",previous:"Predchádzajúca strana",last:"Posledná strana"},menu:{text:"Vyberte stĺpce:"},sort:{ascending:"Zotriediť vzostupne",descending:"Zotriediť zostupne",remove:"Vymazať triedenie"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("sv",{aggregate:{label:"Artiklar"},groupPanel:{description:"Dra en kolumnrubrik hit och släpp den för att gruppera efter den kolumnen."},search:{placeholder:"Sök...",showingItems:"Visar artiklar:",selectedItems:"Valda artiklar:",totalItems:"Antal artiklar:",size:"Sidstorlek:",first:"Första sidan",next:"Nästa sida",previous:"Föregående sida",last:"Sista sidan"},menu:{text:"Välj kolumner:"},sort:{ascending:"Sortera stigande",descending:"Sortera fallande",remove:"Inaktivera sortering"},column:{hide:"Göm kolumn"},aggregation:{count:"Antal rader: ",sum:"Summa: ",avg:"Genomsnitt: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Fäst vänster",pinRight:"Fäst höger",unpin:"Lösgör"},gridMenu:{columns:"Kolumner:",importerTitle:"Importera fil",exporterAllAsCsv:"Exportera all data som CSV",exporterVisibleAsCsv:"Exportera synlig data som CSV",exporterSelectedAsCsv:"Exportera markerad data som CSV",exporterAllAsPdf:"Exportera all data som PDF",exporterVisibleAsPdf:"Exportera synlig data som PDF",exporterSelectedAsPdf:"Exportera markerad data som PDF"},importer:{noHeaders:"Kolumnnamn kunde inte härledas. Har filen ett sidhuvud?",noObjects:"Objekt kunde inte härledas. Har filen data undantaget sidhuvud?",invalidCsv:"Filen kunde inte behandlas, är den en giltig CSV?",invalidJson:"Filen kunde inte behandlas, är den en giltig JSON?",jsonNotArray:"Importerad JSON-fil måste innehålla ett fält. Import avbruten."},pagination:{sizes:"Artiklar per sida",totalItems:"Artiklar"}}),a}])}])}(),function(){var a=["uiT","uiTranslate"],b=["t","uiTranslate"],c=angular.module("ui.grid.i18n");c.constant("i18nConstants",{MISSING:"[MISSING]",UPDATE_EVENT:"$uiI18n",LOCALE_DIRECTIVE_ALIAS:"uiI18n",DEFAULT_LANG:"en"}),c.service("i18nService",["$log","i18nConstants","$rootScope",function(a,b,c){var d={_langs:{},current:null,get:function(a){return this._langs[a.toLowerCase()]},add:function(a,b){var c=a.toLowerCase();this._langs[c]||(this._langs[c]={}),angular.extend(this._langs[c],b)},getAllLangs:function(){var a=[];if(!this._langs)return a;for(var b in this._langs)a.push(b);return a},setCurrent:function(a){this.current=a.toLowerCase()},getCurrentLang:function(){return this.current}},e={add:function(a,b){"object"==typeof a?angular.forEach(a,function(a){a&&d.add(a,b)}):d.add(a,b)},getAllLangs:function(){return d.getAllLangs()},get:function(a){var b=a?a:e.getCurrentLang();return d.get(b)},getSafeText:function(a,c){var f=c?c:e.getCurrentLang(),g=d.get(f);if(!g)return b.MISSING;for(var h=a.split("."),i=g,j=0;j<h.length;++j){if(void 0===i[h[j]]||null===i[h[j]])return b.MISSING;i=i[h[j]]}return i},setCurrentLang:function(a){a&&(d.setCurrent(a),c.$broadcast(b.UPDATE_EVENT))},getCurrentLang:function(){var a=d.getCurrentLang();return a||(a=b.DEFAULT_LANG,d.setCurrent(a)),a}};return e}]);var d=function(a,b){return{compile:function(){return{pre:function(c,d,e){var f=b.LOCALE_DIRECTIVE_ALIAS,g=c.$eval(e[f]);g?c.$watch(e[f],function(){a.setCurrentLang(g)}):e.$$observers&&e.$observe(f,function(){a.setCurrentLang(e[f]||b.DEFAULT_LANG)})}}}}};c.directive("uiI18n",["i18nService","i18nConstants",d]);var e=function(b,c,d){return{restrict:"EA",compile:function(){return{pre:function(e,f,g){var h,i=a[0],j=a[1],k=g[i]||g[j]||f.html(),l=d.MISSING+k;if(g.$$observers){var m=g[i]?i:j;h=g.$observe(m,function(a){a&&f.html(b(a)(c.getCurrentLang())||l)})}var n=b(k),o=e.$on(d.UPDATE_EVENT,function(){h?h(g[i]||g[j]):f.html(n(c.get())||l)});e.$on("$destroy",o),f.html(n(c.get())||l)}}}}};angular.forEach(a,function(a){c.directive(a,["$parse","i18nService","i18nConstants",e])});var f=function(a,b,c){return function(d){var e=a(d);return e(b.get())||c.MISSING+d}};angular.forEach(b,function(a){c.filter(a,["$parse","i18nService","i18nConstants",f])})}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("zh-cn",{aggregate:{label:"行"},groupPanel:{description:"拖曳表头到此处进行分组"},search:{placeholder:"查找",showingItems:"已显示行数：",selectedItems:"已选择行数：",totalItems:"总行数：",size:"每页显示行数：",first:"首页",next:"下一页",previous:"上一页",last:"末页"},menu:{text:"选择列："},sort:{ascending:"升序",descending:"降序",remove:"取消排序"},column:{hide:"隐藏列"},aggregation:{count:"计数：",sum:"求和：",avg:"均值：",min:"最小值：",max:"最大值："},pinning:{pinLeft:"左侧固定",pinRight:"右侧固定",unpin:"取消固定"},gridMenu:{columns:"列：",importerTitle:"导入文件",exporterAllAsCsv:"导出全部数据到CSV",exporterVisibleAsCsv:"导出可见数据到CSV",exporterSelectedAsCsv:"导出已选数据到CSV",exporterAllAsPdf:"导出全部数据到PDF",exporterVisibleAsPdf:"导出可见数据到PDF",exporterSelectedAsPdf:"导出已选数据到PDF"},importer:{noHeaders:"无法获取列名，确定文件包含表头？",noObjects:"无法获取数据，确定文件包含数据？",invalidCsv:"无法处理文件，确定是合法的CSV文件？",invalidJson:"无法处理文件，确定是合法的JSON文件？",jsonNotArray:"导入的文件不是JSON数组！"},pagination:{sizes:"行每页",totalItems:"行"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("zh-tw",{aggregate:{label:"行"},groupPanel:{description:"拖曳表頭到此處進行分組"},search:{placeholder:"查找",showingItems:"已顯示行數：",selectedItems:"已選擇行數：",totalItems:"總行數：",size:"每頁顯示行數：",first:"首頁",next:"下壹頁",previous:"上壹頁",last:"末頁"},menu:{text:"選擇列："},sort:{ascending:"升序",descending:"降序",remove:"取消排序"},column:{hide:"隱藏列"},aggregation:{count:"計數：",sum:"求和：",avg:"均值：",min:"最小值：",max:"最大值："},pinning:{pinLeft:"左側固定",pinRight:"右側固定",unpin:"取消固定"},gridMenu:{columns:"列：",importerTitle:"導入文件",exporterAllAsCsv:"導出全部數據到CSV",exporterVisibleAsCsv:"導出可見數據到CSV",exporterSelectedAsCsv:"導出已選數據到CSV",exporterAllAsPdf:"導出全部數據到PDF",exporterVisibleAsPdf:"導出可見數據到PDF",exporterSelectedAsPdf:"導出已選數據到PDF"},importer:{noHeaders:"無法獲取列名，確定文件包含表頭？",noObjects:"無法獲取數據，確定文件包含數據？",invalidCsv:"無法處理文件，確定是合法的CSV文件？",invalidJson:"無法處理文件，確定是合法的JSON文件？",jsonNotArray:"導入的文件不是JSON數組！"},pagination:{sizes:"行每頁",totalItems:"行"}}),a}])}])}(),function(){"use strict";var a=angular.module("ui.grid.autoResize",["ui.grid"]);a.directive("uiGridAutoResize",["$timeout","gridUtil",function(a,b){return{require:"uiGrid",scope:!1,link:function(a,c,d,e){function f(){i=b.elementHeight(c),h=b.elementWidth(c)}function g(){clearTimeout(j),j=setTimeout(function(){var d=b.elementHeight(c),j=b.elementWidth(c);d!==i||j!==h?(e.grid.gridHeight=d,e.grid.gridWidth=j,a.$apply(function(){e.grid.refresh().then(function(){f(),g()})})):g()},250)}var h,i;f();var j;g(),a.$on("$destroy",function(){clearTimeout(j)})}}}])}(),function(){"use strict";function a(a,b){this.row=a,this.col=b}var b=angular.module("ui.grid.cellNav",["ui.grid"]);b.constant("uiGridCellNavConstants",{FEATURE_NAME:"gridCellNav",CELL_NAV_EVENT:"cellNav",direction:{LEFT:0,RIGHT:1,UP:2,DOWN:3,PG_UP:4,PG_DOWN:5},EVENT_TYPE:{KEYDOWN:0,CLICK:1,CLEAR:2}}),b.factory("uiGridCellNavFactory",["gridUtil","uiGridConstants","uiGridCellNavConstants","$q",function(b,c,d){var e=function(a,b,c,d){this.rows=a.visibleRowCache,this.columns=b.visibleColumnCache,this.leftColumns=c?c.visibleColumnCache:[],this.rightColumns=d?d.visibleColumnCache:[],this.bodyContainer=a};return e.prototype.getFocusableCols=function(){var a=this.leftColumns.concat(this.columns,this.rightColumns);return a.filter(function(a){return a.colDef.allowCellFocus})},e.prototype.getFocusableRows=function(){return this.rows.filter(function(a){return a.allowCellFocus!==!1})},e.prototype.getNextRowCol=function(a,b,c){switch(a){case d.direction.LEFT:return this.getRowColLeft(b,c);case d.direction.RIGHT:return this.getRowColRight(b,c);case d.direction.UP:return this.getRowColUp(b,c);case d.direction.DOWN:return this.getRowColDown(b,c);case d.direction.PG_UP:return this.getRowColPageUp(b,c);case d.direction.PG_DOWN:return this.getRowColPageDown(b,c)}},e.prototype.getRowColLeft=function(b,c){var d=this.getFocusableCols(),e=this.getFocusableRows(),f=d.indexOf(c),g=e.indexOf(b);-1===f&&(f=1);var h=0===f?d.length-1:f-1;return h>f?0===g?new a(b,d[h]):new a(e[g-1],d[h]):new a(b,d[h])},e.prototype.getRowColRight=function(b,c){var d=this.getFocusableCols(),e=this.getFocusableRows(),f=d.indexOf(c),g=e.indexOf(b);-1===f&&(f=0);var h=f===d.length-1?0:f+1;return f>h?g===e.length-1?new a(b,d[h]):new a(e[g+1],d[h]):new a(b,d[h])},e.prototype.getRowColDown=function(b,c){var d=this.getFocusableCols(),e=this.getFocusableRows(),f=d.indexOf(c),g=e.indexOf(b);return-1===f&&(f=0),g===e.length-1?new a(b,d[f]):new a(e[g+1],d[f])},e.prototype.getRowColPageDown=function(b,c){var d=this.getFocusableCols(),e=this.getFocusableRows(),f=d.indexOf(c),g=e.indexOf(b);-1===f&&(f=0);var h=this.bodyContainer.minRowsToRender();return g>=e.length-h?new a(e[e.length-1],d[f]):new a(e[g+h],d[f])},e.prototype.getRowColUp=function(b,c){var d=this.getFocusableCols(),e=this.getFocusableRows(),f=d.indexOf(c),g=e.indexOf(b);return-1===f&&(f=0),0===g?new a(b,d[f]):new a(e[g-1],d[f])},e.prototype.getRowColPageUp=function(b,c){var d=this.getFocusableCols(),e=this.getFocusableRows(),f=d.indexOf(c),g=e.indexOf(b);-1===f&&(f=0);var h=this.bodyContainer.minRowsToRender();return 0>g-h?new a(e[0],d[f]):new a(e[g-h],d[f])},e}]),b.service("uiGridCellNavService",["gridUtil","uiGridConstants","uiGridCellNavConstants","$q","uiGridCellNavFactory","ScrollEvent",function(a,b,c,d,e,f){var g={initializeGrid:function(a){a.registerColumnBuilder(g.cellNavColumnBuilder),a.cellNav={},a.cellNav.lastRowCol=null,
  a.cellNav.focusedCells=[],g.defaultGridOptions(a.options);var b={events:{cellNav:{navigate:function(){}}},methods:{cellNav:{scrollTo:function(b,c){g.scrollTo(a,b,c)},scrollToFocus:function(b,c){g.scrollToFocus(a,b,c)},scrollToIfNecessary:function(b,c){g.scrollToIfNecessary(a,b,c)},getFocusedCell:function(){return a.cellNav.lastRowCol},getCurrentSelection:function(){return a.cellNav.focusedCells},rowColSelectIndex:function(b){for(var c=-1,d=0;d<a.cellNav.focusedCells.length;d++)if(a.cellNav.focusedCells[d].col.uid===b.col.uid&&a.cellNav.focusedCells[d].row.uid===b.row.uid){c=d;break}return c}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods)},defaultGridOptions:function(a){a.modifierKeysToMultiSelectCells=a.modifierKeysToMultiSelectCells===!0},decorateRenderContainers:function(a){var b=a.hasRightContainer()?a.renderContainers.right:null,c=a.hasLeftContainer()?a.renderContainers.left:null;null!==c&&(a.renderContainers.left.cellNav=new e(a.renderContainers.body,c,b,a.renderContainers.body)),null!==b&&(a.renderContainers.right.cellNav=new e(a.renderContainers.body,b,a.renderContainers.body,c)),a.renderContainers.body.cellNav=new e(a.renderContainers.body,a.renderContainers.body,c,b)},getDirection:function(a){return a.keyCode===b.keymap.LEFT||a.keyCode===b.keymap.TAB&&a.shiftKey?c.direction.LEFT:a.keyCode===b.keymap.RIGHT||a.keyCode===b.keymap.TAB?c.direction.RIGHT:a.keyCode===b.keymap.UP||a.keyCode===b.keymap.ENTER&&a.shiftKey?c.direction.UP:a.keyCode===b.keymap.PG_UP?c.direction.PG_UP:a.keyCode===b.keymap.DOWN||a.keyCode===b.keymap.ENTER?c.direction.DOWN:a.keyCode===b.keymap.PG_DOWN?c.direction.PG_DOWN:null},cellNavColumnBuilder:function(a){var b=[];return a.allowCellFocus=void 0===a.allowCellFocus?!0:a.allowCellFocus,d.all(b)},scrollTo:function(a,b,c){var d=null,e=null;null!==b&&"undefined"!=typeof b&&(d=a.getRow(b)),null!==c&&"undefined"!=typeof c&&(e=a.getColumn(c.name?c.name:c.field)),this.scrollToIfNecessary(a,d,e)},scrollToFocus:function(a,b,c){var d=null,e=null;"undefined"!=typeof b&&null!==b&&(d=a.getRow(b)),"undefined"!=typeof c&&null!==c&&(e=a.getColumn(c.name?c.name:c.field)),this.scrollToIfNecessary(a,d,e);var f={row:d,col:e};a.cellNav.broadcastCellNav(f)},scrollToInternal:function(a,b,c){var d=new f(a,null,null,"uiGridCellNavService.scrollToInternal");if(null!==b){var e=a.renderContainers.body.visibleRowCache.indexOf(b),g=a.renderContainers.body.visibleRowCache.length,h=(e+e/(g-1))/g;d.y={percentage:h}}null!==c&&(d.x={percentage:this.getLeftWidth(a,c)/this.getLeftWidth(a,a.renderContainers.body.visibleColumnCache[a.renderContainers.body.visibleColumnCache.length-1])}),(d.y||d.x)&&d.fireScrollingEvent()},scrollToIfNecessary:function(a,b,c){var d=new f(a,"uiGridCellNavService.scrollToIfNecessary"),e=a.renderContainers.body.visibleRowCache,g=a.renderContainers.body.visibleColumnCache,h=a.renderContainers.body.prevScrollTop+a.headerHeight;h=0>h?0:h;var i=a.renderContainers.body.prevScrollLeft,j=a.renderContainers.body.prevScrollTop+a.gridHeight-a.headerHeight-a.footerHeight,k=a.renderContainers.body.prevScrollLeft+Math.ceil(a.gridWidth);if(null!==b){var l=e.indexOf(b),m=a.renderContainers.body.getCanvasHeight()-a.renderContainers.body.getViewportHeight(),n=(l+1)*a.options.rowHeight;n=0>n?0:n;var o,p;h>n?(o=a.renderContainers.body.prevScrollTop-(h-n),p=o/m,d.y={percentage:p}):n>j&&(o=n-j+a.renderContainers.body.prevScrollTop,p=o/m,d.y={percentage:p})}if(null!==c){for(var q=g.indexOf(c),r=a.renderContainers.body.getCanvasWidth()-a.renderContainers.body.getViewportWidth(),s=0,t=0;q>t;t++){var u=g[t];s+=u.drawnWidth}s=0>s?0:s;var v=s+c.drawnWidth;v=0>v?0:v;var w,x;i>s?(w=a.renderContainers.body.prevScrollLeft-(i-s),x=w/r,x=x>1?1:x,d.x={percentage:x}):v>k&&(w=v-k+a.renderContainers.body.prevScrollLeft,x=w/r,x=x>1?1:x,d.x={percentage:x})}(d.y||d.x)&&d.fireScrollingEvent()},getLeftWidth:function(a,b){var c=0;if(!b)return c;var d=a.renderContainers.body.visibleColumnCache.indexOf(b);a.renderContainers.body.visibleColumnCache.forEach(function(a,b){d>b&&(c+=a.drawnWidth)});var e=0===d?0:(d+1)/a.renderContainers.body.visibleColumnCache.length;return c+=b.drawnWidth*e}};return g}]),b.directive("uiGridCellnav",["gridUtil","uiGridCellNavService","uiGridCellNavConstants","uiGridConstants",function(b,c,d,e){return{replace:!0,priority:-150,require:"^uiGrid",scope:!1,controller:function(){},compile:function(){return{pre:function(b,f,g,h){var i=b,j=h.grid;c.initializeGrid(j),h.cellNav={},h.cellNav.focusCell=function(a,b){h.cellNav.broadcastCellNav({row:a,col:b})},h.cellNav.broadcastCellNav=j.cellNav.broadcastCellNav=function(a,b){b=!(void 0===b||!b),h.cellNav.broadcastFocus(a,b),i.$broadcast(d.CELL_NAV_EVENT,a,b)},h.cellNav.clearFocus=j.cellNav.clearFocus=function(){i.$broadcast(d.CELL_NAV_EVENT,{eventType:d.EVENT_TYPE.CLEAR})},h.cellNav.broadcastFocus=function(b,c){c=!(void 0===c||!c);var d=b.row,e=b.col,f=h.grid.api.cellNav.rowColSelectIndex(b);if(null===j.cellNav.lastRowCol||-1===f){var g=new a(d,e);j.api.cellNav.raise.navigate(g,j.cellNav.lastRowCol),j.cellNav.lastRowCol=g,h.grid.options.modifierKeysToMultiSelectCells&&c?j.cellNav.focusedCells.push(b):j.cellNav.focusedCells=[b]}else j.options.modifierKeysToMultiSelectCells&&c&&f>=0&&j.cellNav.focusedCells.splice(f,1)},h.cellNav.handleKeyDown=function(a){var b=c.getDirection(a);if(null===b)return!0;var f="body";a.uiGridTargetRenderContainerId&&(f=a.uiGridTargetRenderContainerId);var g=h.grid.api.cellNav.getFocusedCell();if(g){var i=h.grid.renderContainers[f].cellNav.getNextRowCol(b,g.row,g.col),k=h.grid.renderContainers[f].cellNav.getFocusableCols();return b===d.direction.LEFT&&i.col===k[k.length-1]&&i.row===g.row&&a.keyCode===e.keymap.TAB&&a.shiftKey?(h.cellNav.clearFocus(),!0):b!==d.direction.RIGHT||i.col!==k[0]||i.row!==g.row||a.keyCode!==e.keymap.TAB||a.shiftKey?(i.eventType=d.EVENT_TYPE.KEYDOWN,c.scrollToIfNecessary(j,i.row,i.col),h.cellNav.broadcastCellNav(i),a.stopPropagation(),a.preventDefault(),!1):(h.cellNav.clearFocus(),!0)}}},post:function(){}}}}}]),b.directive("uiGridRenderContainer",["$timeout","$document","gridUtil","uiGridConstants","uiGridCellNavService","uiGridCellNavConstants",function(a,b,c,d,e){return{replace:!0,priority:-99999,require:["^uiGrid","uiGridRenderContainer","?^uiGridCellnav"],scope:!1,compile:function(){return{post:function(c,d,f,g){var h=g[0],i=g[1];if(h.grid.api.cellNav){var j=i.containerId,k=h.grid;e.decorateRenderContainers(k),d.attr("tabindex",-1),d.on("keydown",function(a){return a.uiGridTargetRenderContainerId=j,h.cellNav.handleKeyDown(a)});var l=!1;k.api.core.on.scrollEvent(c,function(c){c.grid&&c.grid.id!==h.grid.id||null!=h.grid.api.cellNav.getFocusedCell()&&("uiGridCellNavService.scrollToIfNecessary"===c.source?l=!0:l&&a(function(){a(function(){var a=h.grid.api.cellNav.getFocusedCell();b.activeElement===b.body&&d[0].focus(),h.cellNav.broadcastCellNav(a),l=!1})}))})}}}}}}]),b.directive("uiGridCell",["$timeout","$document","uiGridCellNavService","gridUtil","uiGridCellNavConstants","uiGridConstants",function(b,c,d,e,f){return{priority:-150,restrict:"A",require:"^uiGrid",scope:!1,link:function(b,c,d,e){function g(){c.find("div").attr("tabindex",0)}function h(){var a=c.find("div");a.addClass("ui-grid-cell-focus")}function i(){var a=c.find("div");a.removeClass("ui-grid-cell-focus")}e.grid.api.cellNav&&b.col.colDef.allowCellFocus&&(g(),c.find("div").on("click",function(c){e.cellNav.broadcastCellNav(new a(b.row,b.col),c.ctrlKey||c.metaKey),c.stopPropagation()}),c.find("div").on("focus",function(c){e.cellNav.broadcastCellNav(new a(b.row,b.col),c.ctrlKey||c.metaKey)}),b.$on(f.CELL_NAV_EVENT,function(a,d,g){return a.eventType===f.EVENT_TYPE.CLEAR?void i():void(d.row===b.row&&d.col===b.col?(e.grid.options.modifierKeysToMultiSelectCells&&g&&-1===e.grid.api.cellNav.rowColSelectIndex(d)?i():h(),d.hasOwnProperty("eventType")&&d.eventType===f.EVENT_TYPE.KEYDOWN&&c.find("div")[0].focus()):e.grid.options.modifierKeysToMultiSelectCells&&g||i())}),b.$on("$destroy",function(){c.find("div").off("click")}))}}}])}(),function(){"use strict";var a=angular.module("ui.grid.edit",["ui.grid"]);a.constant("uiGridEditConstants",{EDITABLE_CELL_TEMPLATE:/EDITABLE_CELL_TEMPLATE/g,EDITABLE_CELL_DIRECTIVE:/editable_cell_directive/g,events:{BEGIN_CELL_EDIT:"uiGridEventBeginCellEdit",END_CELL_EDIT:"uiGridEventEndCellEdit",CANCEL_CELL_EDIT:"uiGridEventCancelCellEdit"}}),a.service("uiGridEditService",["$q","$templateCache","uiGridConstants","gridUtil",function(a,b,c,d){var e={initializeGrid:function(a){e.defaultGridOptions(a.options),a.registerColumnBuilder(e.editColumnBuilder);var b={events:{edit:{afterCellEdit:function(){},beginCellEdit:function(){},cancelCellEdit:function(){}}},methods:{edit:{}}};a.api.registerEventsFromObject(b.events)},defaultGridOptions:function(a){a.cellEditableCondition=void 0===a.cellEditableCondition?!0:a.cellEditableCondition,a.enableCellEditOnFocus=void 0===a.enableCellEditOnFocus?!1:a.enableCellEditOnFocus},editColumnBuilder:function(b,c,e){var f=[];return b.enableCellEdit=void 0===b.enableCellEdit?void 0===e.enableCellEdit?"object"!==b.type:e.enableCellEdit:b.enableCellEdit,b.cellEditableCondition=void 0===b.cellEditableCondition?e.cellEditableCondition:b.cellEditableCondition,b.enableCellEdit&&(b.editableCellTemplate=b.editableCellTemplate||e.editableCellTemplate||"ui-grid/cellEditor",f.push(d.getTemplate(b.editableCellTemplate).then(function(a){c.editableCellTemplate=a},function(){throw new Error("Couldn't fetch/use colDef.editableCellTemplate '"+b.editableCellTemplate+"'")}))),b.enableCellEditOnFocus=void 0===b.enableCellEditOnFocus?e.enableCellEditOnFocus:b.enableCellEditOnFocus,a.all(f)},isStartEditKey:function(a){return a.keyCode===c.keymap.LEFT||a.keyCode===c.keymap.TAB&&a.shiftKey||a.keyCode===c.keymap.RIGHT||a.keyCode===c.keymap.TAB||a.keyCode===c.keymap.UP||a.keyCode===c.keymap.ENTER&&a.shiftKey||a.keyCode===c.keymap.DOWN||a.keyCode===c.keymap.ENTER?!1:!0}};return e}]),a.directive("uiGridEdit",["gridUtil","uiGridEditService",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(e.grid)},post:function(){}}}}}]),a.directive("uiGridCell",["$compile","$injector","$timeout","uiGridConstants","uiGridEditConstants","gridUtil","$parse","uiGridEditService","$rootScope",function(a,b,c,d,e,f,g,h,i){var j=500;return{priority:-100,restrict:"A",scope:!1,require:"?^uiGrid",link:function(f,k,l,m){function n(){k.on("dblclick",u),k.on("keydown",s),f.col.colDef.enableCellEditOnFocus&&k.find("div").on("focus",r),k.on("touchstart",o)}function o(a){"undefined"!=typeof a.originalEvent&&void 0!==a.originalEvent&&(a=a.originalEvent),k.on("touchend",p),B=c(function(){},j),B.then(function(){setTimeout(u,0),k.off("touchend",p)})}function p(){c.cancel(B),k.off("touchend",p)}function q(){k.off("dblclick",u),k.off("keydown",s),f.col.colDef.enableCellEditOnFocus&&k.find("div").off("focus",r),k.off("touchstart",o)}function r(a){m&&m.cellNav&&m.cellNav.focusCell(f.row,f.col),a.stopPropagation(),u()}function s(a){h.isStartEditKey(a)&&u()}function t(a,b){return!b.isSaving&&(angular.isFunction(a.colDef.cellEditableCondition)?a.colDef.cellEditableCondition(f):a.colDef.cellEditableCondition)}function u(){if(!D&&t(f.col,f.row)){f.grid.api.cellNav&&f.grid.api.cellNav.scrollToIfNecessary(f.row,f.col),A=g(f.row.getQualifiedColField(f.col)),z=A(f),y=f.col.editableCellTemplate,y=y.replace(d.MODEL_COL_FIELD,f.row.getQualifiedColField(f.col));var b=f.col.colDef.editDropdownFilter?"|"+f.col.colDef.editDropdownFilter:"";y=y.replace(d.CUSTOM_FILTERS,b);var c="text";switch(f.col.colDef.type){case"boolean":c="checkbox";break;case"number":c="number";break;case"date":c="date"}y=y.replace("INPUT_TYPE",c);var h=f.col.colDef.editDropdownRowEntityOptionsArrayPath;f.editDropdownOptionsArray=h?x(f.row.entity,h):f.col.colDef.editDropdownOptionsArray,f.editDropdownIdLabel=f.col.colDef.editDropdownIdLabel?f.col.colDef.editDropdownIdLabel:"id",f.editDropdownValueLabel=f.col.colDef.editDropdownValueLabel?f.col.colDef.editDropdownValueLabel:"value";var j=function(){D=!0,q();var b=angular.element(y);k.append(b),C=f.$new(),a(b)(C);var c=angular.element(k.children()[0]);E=c.hasClass("ui-grid-cell-focus"),c.addClass("ui-grid-cell-contents-hidden")};i.$$phase?j():f.$apply(j);var l=f.col.grid.api.core.on.scrollEvent(f,function(){v(!0),f.grid.api.edit.raise.afterCellEdit(f.row.entity,f.col.colDef,A(f),z),l(),m(),n()}),m=f.$on(e.events.END_CELL_EDIT,function(a,b){v(b),f.grid.api.edit.raise.afterCellEdit(f.row.entity,f.col.colDef,A(f),z),m(),l(),n()}),n=f.$on(e.events.CANCEL_CELL_EDIT,function(){w(),n(),l(),m()});f.$broadcast(e.events.BEGIN_CELL_EDIT),f.grid.api.edit.raise.beginCellEdit(f.row.entity,f.col.colDef)}}function v(a){if(D){var b=angular.element(k.children()[0]);C.$destroy(),angular.element(k.children()[1]).remove(),b.removeClass("ui-grid-cell-contents-hidden"),a&&E&&b[0].focus(),E=!1,D=!1,n(),f.grid.api.core.notifyDataChange(d.dataChange.EDIT)}}function w(){D&&(A.assign(f,z),f.$apply(),f.grid.api.edit.raise.cancelCellEdit(f.row.entity,f.col.colDef),v(!0))}function x(a,b){b=b.replace(/\[(\w+)\]/g,".$1"),b=b.replace(/^\./,"");for(var c=b.split(".");c.length;){var d=c.shift();if(!(d in a))return;a=a[d]}return a}if(f.col.colDef.enableCellEdit&&f.row.enableCellEdit!==!1){var y,z,A,B,C,D=!1,E=!1;n();try{var F=b.get("uiGridCellNavConstants");f.col.colDef.enableCellEditOnFocus&&f.$on(F.CELL_NAV_EVENT,function(a,b){b.row===f.row&&b.col===f.col?c(function(){c(function(){u()})}):v()})}catch(G){}}}}}]),a.directive("uiGridEditor",["gridUtil","uiGridConstants","uiGridEditConstants",function(a,b,c){return{scope:!0,require:["?^uiGrid","?^uiGridRenderContainer"],compile:function(){return{pre:function(){},post:function(a,d,e,f){var g,h;f[0]&&(g=f[0]),f[1]&&(h=f[1]),a.$on(c.events.BEGIN_CELL_EDIT,function(){d[0].focus(),d[0].select(),d.on("blur",function(b){a.stopEdit(b)})}),a.deepEdit=!1,a.stopEdit=function(b){a.inputForm&&!a.inputForm.$valid?(b.stopPropagation(),a.$emit(c.events.CANCEL_CELL_EDIT)):a.$emit(c.events.END_CELL_EDIT),a.deepEdit=!1},d.on("click",function(){a.deepEdit=!0}),d.on("keydown",function(d){switch(d.keyCode){case b.keymap.ESC:d.stopPropagation(),a.$emit(c.events.CANCEL_CELL_EDIT);break;case b.keymap.ENTER:a.stopEdit(d);break;case b.keymap.TAB:a.stopEdit(d)}if(a.deepEdit)switch(d.keyCode){case b.keymap.LEFT:d.stopPropagation();break;case b.keymap.RIGHT:d.stopPropagation();break;case b.keymap.UP:d.stopPropagation();break;case b.keymap.DOWN:d.stopPropagation()}else g&&g.hasOwnProperty("cellNav")&&h&&(d.uiGridTargetRenderContainerId=h.containerId,g.cellNav.handleKeyDown(d));return!0})}}}}}]),a.directive("uiGridEditor",["$filter",function(a){function b(a){if("undefined"==typeof a||""===a)return null;var b=a.split("-");if(3!==b.length)return null;var c=parseInt(b[0],10),d=parseInt(b[1],10),e=parseInt(b[2],10);return 1>d||1>c||1>e?null:new Date(c,d-1,e)}return{priority:-100,require:"?ngModel",link:function(c,d,e,f){2===angular.version.minor&&e.type&&"date"===e.type&&f&&(f.$formatters.push(function(b){return f.$setValidity(null,!b||!isNaN(b.getTime())),a("date")(b,"yyyy-MM-dd")}),f.$parsers.push(function(a){if(a&&a.length>0){var c=b(a);return f.$setValidity(null,c&&!isNaN(c.getTime())),c}return f.$setValidity(null,!0),null}))}}}]),a.directive("uiGridEditDropdown",["uiGridConstants","uiGridEditConstants",function(a,b){return{scope:!0,compile:function(){return{pre:function(){},post:function(c,d){c.$on(b.events.BEGIN_CELL_EDIT,function(){d[0].focus(),d[0].style.width=d[0].parentElement.offsetWidth-1+"px",d.on("blur",function(a){c.stopEdit(a)})}),c.stopEdit=function(){c.$emit(b.events.END_CELL_EDIT)},d.on("keydown",function(d){switch(d.keyCode){case a.keymap.ESC:d.stopPropagation(),c.$emit(b.events.CANCEL_CELL_EDIT);break;case a.keymap.ENTER:c.stopEdit(d);break;case a.keymap.LEFT:c.stopEdit(d);break;case a.keymap.RIGHT:c.stopEdit(d);break;case a.keymap.UP:d.stopPropagation();break;case a.keymap.DOWN:d.stopPropagation();break;case a.keymap.TAB:c.stopEdit(d)}return!0})}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.expandable",["ui.grid"]);a.service("uiGridExpandableService",["gridUtil","$compile",function(a){var b={initializeGrid:function(c){c.expandable={},c.expandable.expandedAll=!1,c.options.enableExpandable=c.options.enableExpandable!==!1,c.options.expandableRowHeight=c.options.expandableRowHeight||150,c.options.expandableRowHeaderWidth=c.options.expandableRowHeaderWidth||40,c.options.enableExpandable&&!c.options.expandableRowTemplate&&(a.logError("You have not set the expandableRowTemplate, disabling expandable module"),c.options.enableExpandable=!1);var d={events:{expandable:{rowExpandedStateChanged:function(){}}},methods:{expandable:{toggleRowExpansion:function(a){var d=c.getRow(a);null!==d&&b.toggleRowExpansion(c,d)},expandAllRows:function(){b.expandAllRows(c)},collapseAllRows:function(){b.collapseAllRows(c)},toggleAllRows:function(){b.toggleAllRows(c)}}}};c.api.registerEventsFromObject(d.events),c.api.registerMethodsFromObject(d.methods)},toggleRowExpansion:function(a,b){b.isExpanded=!b.isExpanded,b.isExpanded?b.height=b.grid.options.rowHeight+a.options.expandableRowHeight:(b.height=b.grid.options.rowHeight,a.expandable.expandedAll=!1),a.api.expandable.raise.rowExpandedStateChanged(b)},expandAllRows:function(a){a.renderContainers.body.visibleRowCache.forEach(function(c){c.isExpanded||b.toggleRowExpansion(a,c)}),a.expandable.expandedAll=!0,a.queueGridRefresh()},collapseAllRows:function(a){a.renderContainers.body.visibleRowCache.forEach(function(c){c.isExpanded&&b.toggleRowExpansion(a,c)}),a.expandable.expandedAll=!1,a.queueGridRefresh()},toggleAllRows:function(a){a.expandable.expandedAll?b.collapseAllRows(a):b.expandAllRows(a)}};return b}]),a.directive("uiGridExpandable",["uiGridExpandableService","$templateCache",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(c,d,e,f){if(f.grid.options.enableExpandableRowHeader!==!1){var g={name:"expandableButtons",displayName:"",exporterSuppressExport:!0,enableColumnResizing:!1,enableColumnMenu:!1,width:f.grid.options.expandableRowHeaderWidth||40};g.cellTemplate=b.get("ui-grid/expandableRowHeader"),g.headerCellTemplate=b.get("ui-grid/expandableTopRowHeader"),f.grid.addRowHeaderColumn(g)}a.initializeGrid(f.grid)},post:function(){}}}}}]),a.directive("uiGrid",["uiGridExpandableService","$templateCache",function(){return{replace:!0,priority:1e3,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,b,c,d){d.grid.api.core.on.renderingComplete(a,function(){a.row&&a.row.grid&&a.row.grid.options&&a.row.grid.options.enableExpandable&&(d.grid.parentRow=a.row)})},post:function(){}}}}}]),a.directive("uiGridExpandableRow",["uiGridExpandableService","$timeout","$compile","uiGridConstants","gridUtil","$interval","$log",function(a,b,c,d,e){return{replace:!1,priority:0,scope:!1,compile:function(){return{pre:function(a,b){e.getTemplate(a.grid.options.expandableRowTemplate).then(function(d){if(a.grid.options.expandableRowScope){var e=a.grid.options.expandableRowScope;for(var f in e)e.hasOwnProperty(f)&&(a[f]=e[f])}var g=c(d)(a);b.append(g),a.row.expandedRendered=!0})},post:function(a){a.$on("$destroy",function(){a.row.expandedRendered=!1})}}}}}]),a.directive("uiGridRow",["$compile","gridUtil","$templateCache",function(){return{priority:-200,scope:!1,compile:function(){return{pre:function(a){function b(){var b=a.grid,c=0;return b.columns.forEach(function(a){"left"===a.renderContainer&&(c+=a.width)}),c=Math.floor(c),".grid"+b.id+" .ui-grid-pinned-container-"+a.colContainer.name+", .grid"+b.id+" .ui-grid-pinned-container-"+a.colContainer.name+" .ui-grid-render-container-"+a.colContainer.name+" .ui-grid-viewport .ui-grid-canvas .ui-grid-row { width: "+c+"px; }"}a.expandableRow={},a.expandableRow.shouldRenderExpand=function(){var b="body"===a.colContainer.name&&a.grid.options.enableExpandable!==!1&&a.row.isExpanded&&(!a.grid.isScrollingVertically||a.row.expandedRendered);return b},a.expandableRow.shouldRenderFiller=function(){var b=a.row.isExpanded&&("body"!==a.colContainer.name||a.grid.isScrollingVertically&&!a.row.expandedRendered);return b},"left"===a.colContainer.name&&a.grid.registerStyleComputation({priority:15,func:b})},post:function(){}}}}}]),a.directive("uiGridViewport",["$compile","gridUtil","$templateCache",function(a,b,c){return{priority:-200,scope:!1,compile:function(a){var b=angular.element(a.children().children()[0]),d=c.get("ui-grid/expandableScrollFiller"),e=c.get("ui-grid/expandableRow");return b.append(e),b.append(d),{pre:function(){},post:function(){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.exporter",["ui.grid"]);a.constant("uiGridExporterConstants",{featureName:"exporter",ALL:"all",VISIBLE:"visible",SELECTED:"selected",CSV_CONTENT:"CSV_CONTENT",BUTTON_LABEL:"BUTTON_LABEL",FILE_NAME:"FILE_NAME"}),a.service("uiGridExporterService",["$q","uiGridExporterConstants","uiGridSelectionConstants","gridUtil","$compile","$interval","i18nService",function(a,b,c,d,e,f,g){var h={initializeGrid:function(a){a.exporter={},this.defaultGridOptions(a.options);var b={events:{exporter:{}},methods:{exporter:{csvExport:function(b,c){h.csvExport(a,b,c)},pdfExport:function(b,c){h.pdfExport(a,b,c)}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods),a.api.core.addToGridMenu?h.addToMenu(a):f(function(){a.api.core.addToGridMenu&&h.addToMenu(a)},100,1)},defaultGridOptions:function(a){a.exporterSuppressMenu=a.exporterSuppressMenu===!0,a.exporterMenuLabel=a.exporterMenuLabel?a.exporterMenuLabel:"Export",a.exporterSuppressColumns=a.exporterSuppressColumns?a.exporterSuppressColumns:[],a.exporterCsvColumnSeparator=a.exporterCsvColumnSeparator?a.exporterCsvColumnSeparator:",",a.exporterCsvFilename=a.exporterCsvFilename?a.exporterCsvFilename:"download.csv",a.exporterOlderExcelCompatibility=a.exporterOlderExcelCompatibility===!0,a.exporterPdfDefaultStyle=a.exporterPdfDefaultStyle?a.exporterPdfDefaultStyle:{fontSize:11},a.exporterPdfTableStyle=a.exporterPdfTableStyle?a.exporterPdfTableStyle:{margin:[0,5,0,15]},a.exporterPdfTableHeaderStyle=a.exporterPdfTableHeaderStyle?a.exporterPdfTableHeaderStyle:{bold:!0,fontSize:12,color:"black"},a.exporterPdfHeader=a.exporterPdfHeader?a.exporterPdfHeader:null,a.exporterPdfFooter=a.exporterPdfFooter?a.exporterPdfFooter:null,a.exporterPdfOrientation=a.exporterPdfOrientation?a.exporterPdfOrientation:"landscape",a.exporterPdfPageSize=a.exporterPdfPageSize?a.exporterPdfPageSize:"A4",a.exporterPdfMaxGridWidth=a.exporterPdfMaxGridWidth?a.exporterPdfMaxGridWidth:720,a.exporterMenuAllData=void 0!==a.exporterMenuAllData?a.exporterMenuAllData:!0,a.exporterMenuCsv=void 0!==a.exporterMenuCsv?a.exporterMenuCsv:!0,a.exporterMenuPdf=void 0!==a.exporterMenuPdf?a.exporterMenuPdf:!0,a.exporterPdfCustomFormatter=a.exporterPdfCustomFormatter&&"function"==typeof a.exporterPdfCustomFormatter?a.exporterPdfCustomFormatter:function(a){return a},a.exporterHeaderFilterUseName=a.exporterHeaderFilterUseName===!0,a.exporterFieldCallback=a.exporterFieldCallback?a.exporterFieldCallback:function(a,b,c,d){return d}},addToMenu:function(a){a.api.core.addToGridMenu(a,[{title:g.getSafeText("gridMenu.exporterAllAsCsv"),action:function(){this.grid.api.exporter.csvExport(b.ALL,b.ALL)},shown:function(){return this.grid.options.exporterMenuCsv&&this.grid.options.exporterMenuAllData}},{title:g.getSafeText("gridMenu.exporterVisibleAsCsv"),action:function(){this.grid.api.exporter.csvExport(b.VISIBLE,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuCsv}},{title:g.getSafeText("gridMenu.exporterSelectedAsCsv"),action:function(){this.grid.api.exporter.csvExport(b.SELECTED,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuCsv&&this.grid.api.selection&&this.grid.api.selection.getSelectedRows().length>0}},{title:g.getSafeText("gridMenu.exporterAllAsPdf"),action:function(){this.grid.api.exporter.pdfExport(b.ALL,b.ALL)},shown:function(){return this.grid.options.exporterMenuPdf&&this.grid.options.exporterMenuAllData}},{title:g.getSafeText("gridMenu.exporterVisibleAsPdf"),action:function(){this.grid.api.exporter.pdfExport(b.VISIBLE,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuPdf}},{title:g.getSafeText("gridMenu.exporterSelectedAsPdf"),action:function(){this.grid.api.exporter.pdfExport(b.SELECTED,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuPdf&&this.grid.api.selection&&this.grid.api.selection.getSelectedRows().length>0}}])},csvExport:function(a,b,c){var d=this.getColumnHeaders(a,c),e=this.getData(a,b,c),f=this.formatAsCsv(d,e,a.options.exporterCsvColumnSeparator);this.downloadFile(a.options.exporterCsvFilename,f,a.options.exporterOlderExcelCompatibility)},getColumnHeaders:function(a,c){var d=[];return a.columns.forEach(function(e){!e.visible&&c!==b.ALL||e.colDef.exporterSuppressExport===!0||-1!==a.options.exporterSuppressColumns.indexOf(e.name)||d.push({name:e.field,displayName:a.options.exporterHeaderFilter?a.options.exporterHeaderFilter(a.options.exporterHeaderFilterUseName?e.name:e.displayName):e.displayName,width:e.drawnWidth?e.drawnWidth:e.width,align:"number"===e.colDef.type?"right":"left"})}),d},getData:function(a,c,e){var f,g=[];switch(c){case b.ALL:f=a.rows;break;case b.VISIBLE:f=a.getVisibleRows();break;case b.SELECTED:a.api.selection?f=a.api.selection.getSelectedGridRows():d.logError("selection feature must be enabled to allow selected rows to be exported")}return f.forEach(function(c){if(c.exporterEnableExporting!==!1){var d=[];a.columns.forEach(function(f){if((f.visible||e===b.ALL)&&f.colDef.exporterSuppressExport!==!0&&-1===a.options.exporterSuppressColumns.indexOf(f.name)){var g={value:a.options.exporterFieldCallback(a,c,f,a.getCellValue(c,f))};f.colDef.exporterPdfAlign&&(g.alignment=f.colDef.exporterPdfAlign),d.push(g)}}),g.push(d)}}),g},formatAsCsv:function(a,b,c){var d=this,e=a.map(function(a){return{value:a.displayName}}),f=d.formatRowAsCsv(this,c)(e)+"\n";return f+=b.map(this.formatRowAsCsv(this,c)).join("\n")},formatRowAsCsv:function(a,b){return function(c){return c.map(a.formatFieldAsCsv).join(b)}},formatFieldAsCsv:function(a){return null==a.value?"":"number"==typeof a.value?a.value:"boolean"==typeof a.value?a.value?"TRUE":"FALSE":"string"==typeof a.value?'"'+a.value.replace(/"/g,'""')+'"':JSON.stringify(a.value)},isIE:function(){var a=navigator.userAgent.match(/(?:MSIE |Trident\/.*; rv:)(\d+)/);return a?parseInt(a[1]):!1},downloadFile:function(a,b){var c,d,e=document,f=e.createElement("a"),g="application/octet-stream;charset=utf-8";if(!a){var h=new Date;a="CWS Export - "+h.getFullYear()+(h.getMonth()+1)+h.getDate()+h.getHours()+h.getMinutes()+h.getSeconds()+".csv"}if(d=this.isIE(),d&&10>d){var i=e.createElement("iframe");return document.body.appendChild(i),i.contentWindow.document.open("text/html","replace"),i.contentWindow.document.write("sep=,\r\n"+b),i.contentWindow.document.close(),i.contentWindow.focus(),i.contentWindow.document.execCommand("SaveAs",!0,a),document.body.removeChild(i),!0}if(navigator.msSaveBlob)return navigator.msSaveBlob(new Blob(["\ufeff",b],{type:g}),a);if("download"in f){var j=new Blob(["\ufeff",b],{type:g});c=URL.createObjectURL(j),f.setAttribute("download",a)}else c="data:"+g+","+encodeURIComponent(b),f.setAttribute("target","_blank");f.href=c,f.setAttribute("style","display:none;"),e.body.appendChild(f),setTimeout(function(){if(f.click)f.click();else if(document.createEvent){var a=document.createEvent("MouseEvents");a.initEvent("click",!0,!0),f.dispatchEvent(a)}e.body.removeChild(f)},100)},pdfExport:function(a,b,c){var d=this.getColumnHeaders(a,c),e=this.getData(a,b,c),f=this.prepareAsPdf(a,d,e);if(this.isIE()){pdfMake.createPdf(f).download()}else pdfMake.createPdf(f).open()},prepareAsPdf:function(a,b,c){var d=this.calculatePdfHeaderWidths(a,b),e=b.map(function(a){return{text:a.displayName,style:"tableHeader"}}),f=c.map(this.formatRowAsPdf(this)),g=[e].concat(f),h={pageOrientation:a.options.exporterPdfOrientation,pageSize:a.options.exporterPdfPageSize,content:[{style:"tableStyle",table:{headerRows:1,widths:d,body:g}}],styles:{tableStyle:a.options.exporterPdfTableStyle,tableHeader:a.options.exporterPdfTableHeaderStyle},defaultStyle:a.options.exporterPdfDefaultStyle};return a.options.exporterPdfLayout&&(h.layout=a.options.exporterPdfLayout),a.options.exporterPdfHeader&&(h.header=a.options.exporterPdfHeader),a.options.exporterPdfFooter&&(h.footer=a.options.exporterPdfFooter),a.options.exporterPdfCustomFormatter&&(h=a.options.exporterPdfCustomFormatter(h)),h},calculatePdfHeaderWidths:function(a,b){var c=0;b.forEach(function(a){"number"==typeof a.width&&(c+=a.width)});var d=0;b.forEach(function(a){if("*"===a.width&&(d+=100),"string"==typeof a.width&&a.width.match(/(\d)*%/)){var b=parseInt(a.width.match(/(\d)*%/)[0]);a.width=c*b/100,d+=a.width}});var e=c+d;return b.map(function(b){return"*"===b.width?b.width:b.width*a.options.exporterPdfMaxGridWidth/e})},formatRowAsPdf:function(a){return function(b){return b.map(a.formatFieldAsPdfString)}},formatFieldAsPdfString:function(a){var b;return b=null==a.value?"":"number"==typeof a.value?a.value.toString():"boolean"==typeof a.value?a.value?"TRUE":"FALSE":"string"==typeof a.value?a.value.replace(/"/g,'""'):JSON.stringify(a.value).replace(/^"/,"").replace(/"$/,""),a.alignment&&"string"==typeof a.alignment&&(b={text:b,alignment:a.alignment}),b}};return h}]),a.directive("uiGridExporter",["uiGridExporterConstants","uiGridExporterService","gridUtil","$compile",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,link:function(a,c,d,e){b.initializeGrid(e.grid),e.grid.exporter.$scope=a}}}])}(),function(){"use strict";var a=angular.module("ui.grid.grouping",["ui.grid"]);a.constant("uiGridGroupingConstants",{featureName:"grouping",groupingRowHeaderColName:"groupingRowHeaderCol",EXPANDED:"expanded",COLLAPSED:"collapsed",aggregation:{COUNT:"count",SUM:"sum",MAX:"max",MIN:"min",AVG:"avg",FIELD:"##@@aggregation_running_count@@##"}}),a.service("uiGridGroupingService",["$q","uiGridGroupingConstants","gridUtil","GridRow","gridClassFactory","i18nService","uiGridConstants",function(a,b,c,d,e,f,g){var h={initializeGrid:function(a,b){a.grouping={},a.grouping.numberLevels=0,a.grouping.expandAll=!1,a.grouping.rowExpandedStates={},h.defaultGridOptions(a.options),a.registerRowsProcessor(h.groupRows),a.registerColumnsProcessor(h.groupingColumnProcessor);var c={events:{grouping:{}},methods:{grouping:{expandAllRows:function(){h.expandAllRows(a)},collapseAllRows:function(){h.collapseAllRows(a)},toggleRowGroupingState:function(b){h.toggleRowGroupingState(a,b)},expandRow:function(b){h.expandRow(a,b)},expandRowChildren:function(b){h.expandRowChildren(a,b)},collapseRow:function(b){h.collapseRow(a,b)},getGrouping:function(b){var c=h.getGrouping(a);return c.grouping.forEach(function(a){a.colName=a.col.name,delete a.col}),c.aggregations.forEach(function(a){a.colName=a.col.name,delete a.col}),b&&(c.rowExpandedStates=a.grouping.rowExpandedStates),c},setGrouping:function(b){h.setGrouping(a,b)},groupColumn:function(b){var c=a.getColumn(b);h.groupColumn(a,c)},ungroupColumn:function(b){var c=a.getColumn(b);h.ungroupColumn(a,c)},clearGrouping:function(){h.clearGrouping(a)},aggregateColumn:function(b,c){var d=a.getColumn(b);h.aggregateColumn(a,d,c)}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods),a.api.core.on.sortChanged(b,h.tidyPriorities)},defaultGridOptions:function(a){a.enableGrouping=a.enableGrouping!==!1,a.groupingRowHeaderBaseWidth=a.groupingRowHeaderBaseWidth||30,a.groupingIndent=a.groupingIndent||10,a.groupingRowHeaderAlwaysVisible=a.groupingRowHeaderAlwaysVisible===!0,a.groupingShowCounts=a.groupingShowCounts!==!1},groupingColumnBuilder:function(a,d){if(a.enableGrouping!==!1){"undefined"==typeof d.grouping&&"undefined"!=typeof a.grouping?d.grouping=angular.copy(a.grouping):"undefined"==typeof d.grouping&&(d.grouping={}),
  "undefined"!=typeof d.grouping&&void 0!==typeof d.grouping.groupPriority&&d.grouping.groupPriority>=0&&(d.suppressRemoveSort=!0),d.groupingSuppressAggregationText=a.groupingSuppressAggregationText===!0;var e={name:"ui.grid.grouping.group",title:f.get().grouping.group,icon:"ui-grid-icon-indent-right",shown:function(){return"undefined"==typeof this.context.col.grouping||"undefined"==typeof this.context.col.grouping.groupPriority||this.context.col.grouping.groupPriority<0},action:function(){h.groupColumn(this.context.col.grid,this.context.col)}},g={name:"ui.grid.grouping.ungroup",title:f.get().grouping.ungroup,icon:"ui-grid-icon-indent-left",shown:function(){return"undefined"!=typeof this.context.col.grouping&&"undefined"!=typeof this.context.col.grouping.groupPriority&&this.context.col.grouping.groupPriority>=0},action:function(){h.ungroupColumn(this.context.col.grid,this.context.col)}},i={name:"ui.grid.grouping.aggregateRemove",title:f.get().grouping.aggregate_remove,shown:function(){return"undefined"!=typeof this.context.col.grouping&&"undefined"!=typeof this.context.col.grouping.aggregation&&null!==this.context.col.grouping.aggregation},action:function(){h.aggregateColumn(this.context.col.grid,this.context.col,null)}},j=function(a){var b={name:"ui.grid.grouping.aggregate"+a,title:f.get().grouping["aggregate_"+a],shown:function(){return"undefined"==typeof this.context.col.grouping||"undefined"==typeof this.context.col.grouping.aggregation||this.context.col.grouping.aggregation!==a},action:function(){h.aggregateColumn(this.context.col.grid,this.context.col,a)}};c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.aggregate"+a)||d.menuItems.push(b)};c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.group")||d.menuItems.push(e),c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.ungroup")||d.menuItems.push(g),j(b.aggregation.COUNT),j(b.aggregation.SUM),j(b.aggregation.MAX),j(b.aggregation.MIN),j(b.aggregation.AVG),c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.aggregateRemove")||d.menuItems.push(i)}},groupingColumnProcessor:function(a,c){var d=this;return a.forEach(function(a,c){if(a.groupingPosition=c,a.name===b.groupingRowHeaderColName){var e=h.getGrouping(a.grid);("undefined"==typeof d.options.groupingRowHeaderAlwaysVisible||d.options.groupingRowHeaderAlwaysVisible===!1)&&(a.visible=e.grouping.length>0?!0:!1);var f=(e.grouping.length-1)*d.options.groupingIndent;f=f>0?f:0,a.width=d.options.groupingRowHeaderBaseWidth+f}}),a=h.moveGroupColumns(this,a,c)},moveGroupColumns:function(a,b){return a.options.moveGroupColumns!==!1?(b.sort(function(a,b){var c,d;return c="undefined"==typeof a.grouping||"undefined"==typeof a.grouping.groupPriority||a.grouping.groupPriority<0?null:a.grouping.groupPriority,d="undefined"==typeof b.grouping||"undefined"==typeof b.grouping.groupPriority||b.grouping.groupPriority<0?null:b.grouping.groupPriority,null!==c&&null===d?-1:null!==d&&null===c?1:null!==c&&null!==d?c-d:a.groupingPosition-b.groupingPosition}),b.forEach(function(a){delete a.groupingPosition}),b):void 0},groupColumn:function(a,b){"undefined"==typeof b.grouping&&(b.grouping={});var c=h.getGrouping(a);b.grouping.groupPriority=c.grouping.length,b.sort?("undefined"==typeof b.sort.direction||null===b.sort.direction)&&(b.sort.direction=g.ASC):b.sort={direction:g.ASC},h.tidyPriorities(a),a.queueGridRefresh()},ungroupColumn:function(a,b){"undefined"!=typeof b.grouping&&(delete b.grouping.groupPriority,h.tidyPriorities(a),a.queueGridRefresh())},aggregateColumn:function(a,b,c){"undefined"==typeof b.grouping&&(b.grouping={}),"undefined"!=typeof b.grouping.groupPriority&&b.grouping.groupPriority>=0&&h.ungroupColumn(a,b),b.grouping.aggregation=c,a.queueGridRefresh()},setGrouping:function(a,b){"undefined"!=typeof b&&(h.clearGrouping(a),b.grouping&&b.grouping.length&&b.grouping.length>0&&b.grouping.forEach(function(b){var c=a.getColumn(b.colName);c&&h.groupColumn(a,c)}),b.aggregations&&b.aggregations.length&&b.aggregations.length>0&&b.aggregations.forEach(function(b){var c=a.getColumn(b.colName);c&&h.aggregateColumn(a,c,b.aggregation)}),b.rowExpandedStates&&(a.grouping.rowExpandedStates=b.rowExpandedStates))},clearGrouping:function(a){var b=h.getGrouping(a);b.grouping.length>0&&b.grouping.forEach(function(b){b.col||(b.col=a.getColumn(b.colName)),h.ungroupColumn(a,b.col)}),b.aggregations.length>0&&b.aggregations.forEach(function(b){b.col||(b.col=a.getColumn(b.colName)),h.aggregateColumn(a,b.col,null)})},tidyPriorities:function(a){"undefined"==typeof a&&"undefined"!=typeof this.grid&&(a=this.grid);var b=[],c=[];a.columns.forEach(function(a){"undefined"!=typeof a.grouping&&"undefined"!=typeof a.grouping.groupPriority&&a.grouping.groupPriority>=0?b.push(a):"undefined"!=typeof a.sort&&"undefined"!=typeof a.sort.priority&&a.sort.priority>=0&&c.push(a)}),b.sort(function(a,b){return a.grouping.groupPriority-b.grouping.groupPriority}),b.forEach(function(a,b){a.grouping.groupPriority=b,a.suppressRemoveSort=!0,"undefined"==typeof a.sort&&(a.sort={}),a.sort.priority=b});var d=b.length;c.sort(function(a,b){return a.sort.priority-b.sort.priority}),c.forEach(function(a){a.sort.priority=d,a.suppressRemoveSort=a.colDef.suppressRemoveSort,d++})},expandAllRows:function(a){h.setAllNodes(a.grouping.rowExpandedStates,b.EXPANDED),a.queueGridRefresh()},collapseAllRows:function(a){h.setAllNodes(a.grouping.rowExpandedStates,b.COLLAPSED),a.queueGridRefresh()},setAllNodes:function(a,b){a.state=b,angular.forEach(a,function(a,c){"state"!==c&&h.setAllNodes(a,b)})},toggleRowGroupingState:function(a,c){c.groupHeader&&(c.expandedState.state=c.expandedState.state===b.EXPANDED?b.COLLAPSED:b.EXPANDED,a.queueGridRefresh())},expandRow:function(a,c){c.groupHeader&&(c.expandedState.state=b.EXPANDED,a.queueGridRefresh())},expandRowChildren:function(a,c){c.groupHeader&&(h.setAllNodes(c.expandedState,b.COLLAPSED),a.queueGridRefresh())},collapseRow:function(a,c){c.groupHeader&&(c.expandedState.state=b.COLLAPSED,a.queueGridRefresh())},collapseRowChildren:function(a,c){c.groupHeader&&(h.setAllNodes(c.expandedState,b.COLLAPSED),a.queueGridRefresh())},groupRows:function(a){if(0===a.length)return a;for(var b=this,c=h.initialiseProcessingState(b),d=function(d,g){var i=b.getCellValue(f,d.col);"undefined"!=typeof i&&null!==i&&f.visible&&(d.initialised&&i===d.currentValue||(h.insertGroupHeader(b,a,e,c,g),e++),h.aggregate(b,f,d))},e=0;e<a.length;e++){var f=a[e];c.forEach(d),h.setVisibility(b,f,c)}return h.writeOutAggregations(b,c,0),a},initialiseProcessingState:function(a){var c=[],d=h.getGrouping(a);return d.grouping.forEach(function(e){var f=[];a.options.groupingShowCounts&&f.push({type:b.aggregation.COUNT,fieldName:b.aggregation.FIELD,value:null}),d.aggregations.forEach(function(a){f.push(a.aggregation===b.aggregation.AVG?{type:a.aggregation,fieldName:a.field,col:a.col,value:null,sum:null,count:null}:{type:a.aggregation,fieldName:a.field,col:a.col,value:null})}),c.push({fieldName:e.field,col:e.col,initialised:!1,currentValue:null,currentGroupHeader:null,runningAggregations:f})}),c},getGrouping:function(a){var b=[],c=[];return a.columns.forEach(function(a){a.grouping&&("undefined"!=typeof a.grouping.groupPriority&&a.grouping.groupPriority>=0?b.push({field:a.field,col:a,groupPriority:a.grouping.groupPriority,grouping:a.grouping}):a.grouping.aggregation&&c.push({field:a.field,col:a,aggregation:a.grouping.aggregation}))}),b.sort(function(a,b){return a.groupPriority-b.groupPriority}),b.forEach(function(a,b){a.grouping.groupPriority=b,a.groupPriority=b,delete a.grouping}),{grouping:b,aggregations:c}},insertGroupHeader:function(a,b,c,f,g){h.writeOutAggregations(a,f,g);var i=new d({},null,a);e.rowTemplateAssigner.call(a,i);var j=f[g].fieldName,k=f[g].col,l=a.getCellValue(b[c],k);i.entity[j]=l,i.groupLevel=g,i.groupHeader=!0,i.internalRow=!0,i.enableEditing=!1,i.enableSelection=!1,f[g].initialised=!0,f[g].currentValue=l,f[g].currentGroupHeader=i,i.expandedState=h.getExpandedState(a,f,g),h.setVisibility(a,i,f),b.splice(c,0,i)},writeOutAggregations:function(a,b,c){for(var d=c;d<b.length;d++)h.writeOutAggregation(a,b[d])},writeOutAggregation:function(a,c){c.currentGroupHeader&&c.runningAggregations.forEach(function(a){a.fieldName===b.aggregation.FIELD?(c.currentGroupHeader.entity[c.fieldName]=c.currentValue+" ("+a.value+")",a.value=null):(c.currentGroupHeader.entity[a.fieldName]=a.col.groupingSuppressAggregationText?a.value:f.get().aggregation[a.type]+a.value,a.value=null,a.sum&&(a.sum=null),a.count&&(a.count=null))}),c.currentGroupHeader=null,c.currentValue=null,c.initialised=!1},getExpandedState:function(a,c,d){for(var e=a.grouping.rowExpandedStates,f=0;d>=f;f++)e[c[f].currentValue]||(e[c[f].currentValue]={state:b.COLLAPSED}),e=e[c[f].currentValue];return e},setVisibility:function(a,c,d){if(c.visible){for(var e=!0,f="undefined"!=typeof c.groupLevel?c.groupLevel:d.length,g=0;f>g;g++)d[g].currentGroupHeader.expandedState.state===b.COLLAPSED&&(e=!1);e||c.setThisRowInvisible("grouping",!0)}},aggregate:function(a,c,d){d.runningAggregations.forEach(function(d){if(d.type===b.aggregation.COUNT)d.value++;else{var e=a.getCellValue(c,d.col),f=Number(e);switch(d.type){case b.aggregation.SUM:isNaN(f)||(d.value+=f);break;case b.aggregation.MIN:void 0!==e&&null!==e&&(e<d.value||null===d.value)&&(d.value=e);break;case b.aggregation.MAX:void 0!==e&&e>d.value&&(d.value=e);break;case b.aggregation.AVG:d.count++,isNaN(f)||(d.sum+=f),d.value=d.sum/d.count}}})}};return h}]),a.directive("uiGridGrouping",["uiGridGroupingConstants","uiGridGroupingService","$templateCache",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(c,d,e,f){if(f.grid.options.enableGrouping!==!1){b.initializeGrid(f.grid,c);var g={name:a.groupingRowHeaderColName,displayName:"",width:f.grid.options.groupingRowHeaderWidth,minWidth:10,cellTemplate:"ui-grid/groupingRowHeader",headerCellTemplate:"ui-grid/groupingHeaderCell",enableColumnResizing:!1,enableColumnMenu:!1,exporterSuppressExport:!0,allowCellFocus:!0};f.grid.addRowHeaderColumn(g),f.grid.registerColumnBuilder(b.groupingColumnBuilder)}},post:function(){}}}}}]),a.directive("uiGridGroupingRowHeaderButtons",["$templateCache","uiGridGroupingService",function(a,b){return{replace:!0,restrict:"E",template:a.get("ui-grid/groupingRowHeaderButtons"),scope:!0,require:"^uiGrid",link:function(a,c,d,e){var f=e.grid;a.groupButtonClick=function(a,c){b.toggleRowGroupingState(f,a,c)}}}}]),a.directive("uiGridGroupingExpandAllButtons",["$templateCache","uiGridGroupingService",function(a,b){return{replace:!0,restrict:"E",template:a.get("ui-grid/groupingExpandAllButtons"),scope:!1,link:function(a){var c=a.col.grid;a.headerButtonClick=function(a,d){c.grouping.expandAll?(b.collapseAllRows(c,d),c.grouping.expandAll=!1):(b.expandAllRows(c,d),c.grouping.expandAll=!0)}}}}]),a.directive("uiGridViewport",["$compile","uiGridConstants","uiGridGroupingConstants","gridUtil","$parse","uiGridGroupingService",function(){return{priority:-200,scope:!1,compile:function(a){var b=angular.element(a.children().children()[0]),c=b.attr("ng-class"),d="";return d=c?c.slice(0,-1)+",'ui-grid-group-header-row': row.groupLevel > -1}":"{'ui-grid-group-header-row': row.groupLevel > -1}",b.attr("ng-class",d),{pre:function(){},post:function(){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.importer",["ui.grid"]);a.constant("uiGridImporterConstants",{featureName:"importer"}),a.service("uiGridImporterService",["$q","uiGridConstants","uiGridImporterConstants","gridUtil","$compile","$interval","i18nService","$window",function(a,b,c,d,e,f,g,h){var i={initializeGrid:function(a,b){b.importer={$scope:a},this.defaultGridOptions(b.options);var c={events:{importer:{}},methods:{importer:{importFile:function(a){i.importThisFile(b,a)}}}};b.api.registerEventsFromObject(c.events),b.api.registerMethodsFromObject(c.methods),b.options.enableImporter&&b.options.importerShowMenu&&(b.api.core.addToGridMenu?i.addToMenu(b):f(function(){b.api.core.addToGridMenu&&i.addToMenu(b)},100,1))},defaultGridOptions:function(a){a.enableImporter||void 0===a.enableImporter?h.hasOwnProperty("File")&&h.hasOwnProperty("FileReader")&&h.hasOwnProperty("FileList")&&h.hasOwnProperty("Blob")?a.enableImporter=!0:(d.logError("The File APIs are not fully supported in this browser, grid importer cannot be used."),a.enableImporter=!1):a.enableImporter=!1,a.importerProcessHeaders=a.importerProcessHeaders||i.processHeaders,a.importerHeaderFilter=a.importerHeaderFilter||function(a){return a},a.importerErrorCallback&&"function"==typeof a.importerErrorCallback||delete a.importerErrorCallback,a.enableImporter!==!0||a.importerDataAddCallback||(d.logError("You have not set an importerDataAddCallback, importer is disabled"),a.enableImporter=!1),a.importerShowMenu=a.importerShowMenu!==!1,a.importerObjectCallback=a.importerObjectCallback||function(a,b){return b}},addToMenu:function(a){a.api.core.addToGridMenu(a,[{title:g.getSafeText("gridMenu.importerTitle")},{templateUrl:"ui-grid/importerMenuItemContainer",action:function(){this.grid.api.importer.importAFile(a)}}])},importThisFile:function(a,b){if(!b)return void d.logError("No file object provided to importThisFile, should be impossible, aborting");var c=new FileReader;switch(b.type){case"application/json":c.onload=i.importJsonClosure(a);break;default:c.onload=i.importCsvClosure(a)}c.readAsText(b)},importJsonClosure:function(a){return function(b){var c,d=[],e=i.parseJson(a,b);null!==e&&(e.forEach(function(b){c=i.newObject(a),angular.extend(c,b),c=a.options.importerObjectCallback(a,c),d.push(c)}),i.addObjects(a,d))}},parseJson:function(a,b){var c;try{c=JSON.parse(b.target.result)}catch(d){return void i.alertError(a,"importer.invalidJson","File could not be processed, is it valid json? Content was: ",b.target.result)}return Array.isArray(c)?c:(i.alertError(a,"importer.jsonNotarray","Import failed, file is not an array, file was: ",b.target.result),[])},importCsvClosure:function(a){return function(b){var c=i.parseCsv(b);if(!c||c.length<1)return void i.alertError(a,"importer.invalidCsv","File could not be processed, is it valid csv? Content was: ",b.target.result);var d=i.createCsvObjects(a,c);return d&&0!==d.length?void i.addObjects(a,d):void i.alertError(a,"importer.noObjects","Objects were not able to be derived, content was: ",b.target.result)}},parseCsv:function(a){var b=a.target.result;return CSV.parse(b)},createCsvObjects:function(a,b){var c=a.options.importerProcessHeaders(a,b.shift());if(!c||0===c.length)return i.alertError(a,"importer.noHeaders","Column names could not be derived, content was: ",b),[];var d,e=[];return b.forEach(function(b){d=i.newObject(a),null!==b&&b.forEach(function(a,b){null!==c[b]&&(d[c[b]]=a)}),d=a.options.importerObjectCallback(a,d),e.push(d)}),e},processHeaders:function(a,b){var c=[];if(a.options.columnDefs&&0!==a.options.columnDefs.length){var d=i.flattenColumnDefs(a,a.options.columnDefs);return b.forEach(function(a){c.push(d[a]?d[a]:d[a.toLowerCase()]?d[a.toLowerCase()]:null)}),c}return b.forEach(function(a){c.push(a.replace(/[^0-9a-zA-Z\-_]/g,"_"))}),c},flattenColumnDefs:function(a,b){var c={};return b.forEach(function(b){b.name&&(c[b.name]=b.field||b.name,c[b.name.toLowerCase()]=b.field||b.name),b.field&&(c[b.field]=b.field||b.name,c[b.field.toLowerCase()]=b.field||b.name),b.displayName&&(c[b.displayName]=b.field||b.name,c[b.displayName.toLowerCase()]=b.field||b.name),b.displayName&&a.options.importerHeaderFilter&&(c[a.options.importerHeaderFilter(b.displayName)]=b.field||b.name,c[a.options.importerHeaderFilter(b.displayName).toLowerCase()]=b.field||b.name)}),c},addObjects:function(a,c){if(a.api.rowEdit){var d=a.registerDataChangeCallback(function(){a.api.rowEdit.setRowsDirty(c),d()},[b.dataChange.ROW]);a.importer.$scope.$on("$destroy",d)}a.importer.$scope.$apply(a.options.importerDataAddCallback(a,c))},newObject:function(a){return"undefined"!=typeof a.options&&"undefined"!=typeof a.options.importerNewObject?new a.options.importerNewObject:{}},alertError:function(a,b,c,e){a.options.importerErrorCallback?a.options.importerErrorCallback(a,b,c,e):(h.alert(g.getSafeText(b)),d.logError(c+e))}};return i}]),a.directive("uiGridImporter",["uiGridImporterConstants","uiGridImporterService","gridUtil","$compile",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,link:function(a,c,d,e){b.initializeGrid(a,e.grid)}}}]),a.directive("uiGridImporterMenuItem",["uiGridImporterConstants","uiGridImporterService","gridUtil","$compile",function(a,b,c){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,templateUrl:"ui-grid/importerMenuItem",link:function(a,d,e,f){var g=function(a){var c=a.srcElement||a.target;if(c&&c.files&&1===c.files.length){var d=c.files[0];b.importThisFile(i,d),c.form.reset()}},h=d[0].querySelectorAll(".ui-grid-importer-file-chooser"),i=f.grid;1!==h.length?c.logError("Found > 1 or < 1 file choosers within the menu item, error, cannot continue"):h[0].addEventListener("change",g,!1)}}}])}(),function(){"use strict";var a=angular.module("ui.grid.infiniteScroll",["ui.grid"]);a.service("uiGridInfiniteScrollService",["gridUtil","$compile","$timeout","uiGridConstants",function(a,b,c,d){var e={initializeGrid:function(a){e.defaultGridOptions(a.options);var b={events:{infiniteScroll:{needLoadMoreData:function(){},needLoadMoreDataTop:function(){}}},methods:{infiniteScroll:{dataLoaded:function(){a.options.loadTimout=!1}}}};a.options.loadTimout=!1,a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods)},defaultGridOptions:function(a){a.enableInfiniteScroll=a.enableInfiniteScroll!==!1},loadData:function(a){return a.options.loadTimout=!0,a.scrollDirection===d.scrollDirection.UP?void a.api.infiniteScroll.raise.needLoadMoreDataTop():void a.api.infiniteScroll.raise.needLoadMoreData()},checkScroll:function(a,b){var c=a.options.infiniteScrollPercentage?a.options.infiniteScrollPercentage:20;return!a.options.loadTimout&&c>=b?(this.loadData(a),!0):!1}};return e}]),a.directive("uiGridInfiniteScroll",["uiGridInfiniteScrollService",function(a){return{priority:-200,scope:!1,require:"^uiGrid",compile:function(){return{pre:function(b,c,d,e){a.initializeGrid(e.grid)},post:function(){}}}}}]),a.directive("uiGridViewport",["$compile","gridUtil","uiGridInfiniteScrollService","uiGridConstants",function(a,b,c,d){return{priority:-200,scope:!1,link:function(a){a.grid.options.enableInfiniteScroll&&a.grid.api.core.on.scrollEvent(a,function(b){if(b.y&&"ui.grid.adjustInfiniteScrollPosition"!==b.source){var e=100-100*b.y.percentage;a.grid.scrollDirection===d.scrollDirection.UP&&(e=100*b.y.percentage),c.checkScroll(a.grid,e)}})}}}])}(),function(){"use strict";var a=angular.module("ui.grid.moveColumns",["ui.grid"]);a.service("uiGridMoveColumnService",["$q","$timeout","$log","ScrollEvent","uiGridConstants","gridUtil",function(a,b,c,d,e,f){var g={initializeGrid:function(a){var b=this;this.registerPublicApi(a),this.defaultGridOptions(a.options),a.registerColumnBuilder(b.movableColumnBuilder)},registerPublicApi:function(a){var b=this,c={events:{colMovable:{columnPositionChanged:function(){}}},methods:{colMovable:{moveColumn:function(c,d){var e=a.columns;if(!angular.isNumber(c)||!angular.isNumber(d))return void f.logError("MoveColumn: Please provide valid values for originalPosition and finalPosition");for(var g=0,h=0;h<e.length;h++)(angular.isDefined(e[h].colDef.visible)&&e[h].colDef.visible===!1||e[h].isRowHeader===!0)&&g++;if(c>=e.length-g||d>=e.length-g)return void f.logError("MoveColumn: Invalid values for originalPosition, finalPosition");var i=function(a){for(var b=a,c=0;b>=c;c++)angular.isDefined(e[c])&&(angular.isDefined(e[c].colDef.visible)&&e[c].colDef.visible===!1||e[c].isRowHeader===!0)&&b++;return b};b.redrawColumnAtPosition(a,i(c),i(d))}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods)},defaultGridOptions:function(a){a.enableColumnMoving=a.enableColumnMoving!==!1},movableColumnBuilder:function(b,c,d){var e=[];return b.enableColumnMoving=void 0===b.enableColumnMoving?d.enableColumnMoving:b.enableColumnMoving,a.all(e)},redrawColumnAtPosition:function(a,c,d){var f=a.columns,g=f[c];if(g.colDef.enableColumnMoving){if(c>d)for(var h=c;h>d;h--)f[h]=f[h-1];else if(d>c)for(var i=c;d>i;i++)f[i]=f[i+1];f[d]=g,b(function(){a.api.core.notifyDataChange(e.dataChange.COLUMN),a.queueGridRefresh(),a.api.colMovable.raise.columnPositionChanged(g.colDef,c,d)})}}};return g}]),a.directive("uiGridMoveColumns",["uiGridMoveColumnService",function(a){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(b,c,d,e){a.initializeGrid(e.grid)},post:function(){}}}}}]),a.directive("uiGridHeaderCell",["$q","gridUtil","uiGridMoveColumnService","$document","$log","uiGridConstants","ScrollEvent",function(a,b,c,d,e,f,g){return{priority:-10,require:"^uiGrid",compile:function(){return{post:function(a,e,h,i){a.col.colDef.enableColumnMoving&&a.$on(f.events.COLUMN_HEADER_CLICK,function(f,h){if(h.columnName===a.col.colDef.name&&!a.col.renderContainer){var j=h.event;if("ui-grid-icon-angle-down"!==j.target.className&&"I"!==j.target.tagName&&j.target.className.indexOf("ui-grid-filter-input")<0){var k,l,m=a.grid.element[0].getBoundingClientRect().left,n=j.pageX,o=0,p=m+a.grid.getViewportWidth(),q=!1,r=function(){q=!0,k=e.clone(),e.parent().append(k),k.addClass("movingColumn");var b={},c=e[0].getBoundingClientRect().left;b.left=c-m+"px";var d=a.grid.element[0].getBoundingClientRect().right,f=e[0].getBoundingClientRect().right;f>d&&(l=a.col.drawnWidth+(d-f),b.width=l+"px"),k.css(b)},s=function(c){i.fireEvent("hide-menu");for(var d=a.grid.columns,e=0,f=0;f<d.length;f++)(angular.isUndefined(d[f].colDef.visible)||d[f].colDef.visible===!0)&&(e+=d[f].drawnWidth||d[f].width||d[f].colDef.width);var h,j=k[0].getBoundingClientRect().left-1,n=k[0].getBoundingClientRect().right;if(h="ie"===b.detectBrowser()?j+c:j-m+c,h=p>h?h:p,(j>=m||c>0)&&(p>=n||0>c))k.css({visibility:"visible",left:h+"px"});else if(e>Math.ceil(i.grid.gridWidth)){c*=8;var q=new g(a.col.grid,null,null,"uiGridHeaderCell.moveElement");q.x={pixels:c},q.fireScrollingEvent()}for(var r=0,s=0;s<d.length;s++)if(angular.isUndefined(d[s].colDef.visible)||d[s].colDef.visible===!0){if(d[s].colDef.name===a.col.colDef.name)break;r+=d[s].drawnWidth||d[s].width||d[s].colDef.width}void 0===a.newScrollLeft?o+=c:o=a.newScrollLeft+h-r,l<a.col.drawnWidth&&(l+=Math.abs(c),k.css({width:l+"px"}))},t=function(a){document.onselectstart=function(){return!1};var b=a.pageX-n;!q&&Math.abs(b)>50?r():q&&(s(b),n=a.pageX)};d.on("mousemove",t);var u=function(){document.onselectstart=null,k&&k.remove();for(var b=a.grid.columns,e=0,f=0;f<b.length&&b[f].colDef.name!==a.col.colDef.name;f++)e++;if(0>o){for(var g=0,h=e-1;h>=0;h--)if((angular.isUndefined(b[h].colDef.visible)||b[h].colDef.visible===!0)&&(g+=b[h].drawnWidth||b[h].width||b[h].colDef.width,g>Math.abs(o))){c.redrawColumnAtPosition(a.grid,e,h+1);break}g<Math.abs(o)&&c.redrawColumnAtPosition(a.grid,e,0)}else if(o>0){for(var i=0,j=e+1;j<b.length;j++)if((angular.isUndefined(b[j].colDef.visible)||b[j].colDef.visible===!0)&&(i+=b[j].drawnWidth||b[j].width||b[j].colDef.width,i>o)){c.redrawColumnAtPosition(a.grid,e,j-1);break}o>i&&c.redrawColumnAtPosition(a.grid,e,b.length-1)}d.off("mousemove",t),d.off("mouseup",u)};d.on("mouseup",u)}}})}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.pagination",["ng","ui.grid"]);a.service("uiGridPaginationService",["gridUtil",function(a){var b={initializeGrid:function(a){b.defaultGridOptions(a.options);var c={events:{pagination:{paginationChanged:function(){}}},methods:{pagination:{getPage:function(){return a.options.enablePagination?a.options.paginationCurrentPage:null},getTotalPages:function(){return a.options.enablePagination?0===a.options.totalItems?1:Math.ceil(a.options.totalItems/a.options.paginationPageSize):null},nextPage:function(){a.options.enablePagination&&(a.options.totalItems>0?a.options.paginationCurrentPage=Math.min(a.options.paginationCurrentPage+1,c.methods.pagination.getTotalPages()):a.options.paginationCurrentPage++)},previousPage:function(){a.options.enablePagination&&(a.options.paginationCurrentPage=Math.max(a.options.paginationCurrentPage-1,1))},seek:function(b){if(a.options.enablePagination){if(!angular.isNumber(b)||1>b)throw"Invalid page number: "+b;a.options.paginationCurrentPage=Math.min(b,c.methods.pagination.getTotalPages())}}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods),a.registerRowsProcessor(function(b){if(a.options.useExternalPagination||!a.options.enablePagination)return b;var c=parseInt(a.options.paginationPageSize,10),d=parseInt(a.options.paginationCurrentPage,10),e=b.filter(function(a){return a.visible});a.options.totalItems=e.length;var f=(d-1)*c;return f>e.length&&(d=a.options.paginationCurrentPage=1,f=(d-1)*c),e.slice(f,f+c)})},defaultGridOptions:function(b){b.enablePagination=b.enablePagination!==!1,b.enablePaginationControls=b.enablePaginationControls!==!1,b.useExternalPagination=b.useExternalPagination===!0,a.isNullOrUndefined(b.totalItems)&&(b.totalItems=0),a.isNullOrUndefined(b.paginationPageSizes)&&(b.paginationPageSizes=[250,500,1e3]),a.isNullOrUndefined(b.paginationPageSize)&&(b.paginationPageSize=b.paginationPageSizes.length>0?b.paginationPageSizes[0]:0),a.isNullOrUndefined(b.paginationCurrentPage)&&(b.paginationCurrentPage=1),a.isNullOrUndefined(b.paginationTemplate)&&(b.paginationTemplate="ui-grid/pagination")},onPaginationChanged:function(a,b,c){a.api.pagination.raise.paginationChanged(b,c),a.options.useExternalPagination||a.queueGridRefresh()}};return b}]),a.directive("uiGridPagination",["gridUtil","uiGridPaginationService",function(a,b){return{priority:-200,scope:!1,require:"uiGrid",link:{pre:function(c,d,e,f){b.initializeGrid(f.grid),a.getTemplate(f.grid.options.paginationTemplate).then(function(a){var b=angular.element(a);d.append(b),f.innerCompile(b)})}}}}]),a.directive("uiGridPager",["uiGridPaginationService","uiGridConstants","gridUtil","i18nService",function(a,b,c,d){return{priority:-200,scope:!0,require:"^uiGrid",link:function(e,f,g,h){e.paginationApi=h.grid.api.pagination,e.sizesLabel=d.getSafeText("pagination.sizes"),e.totalItemsLabel=d.getSafeText("pagination.totalItems");var i=h.grid.options;h.grid.renderContainers.body.registerViewportAdjuster(function(a){return a.height=a.height-c.elementHeight(f),a});var j=h.grid.registerDataChangeCallback(function(a){a.options.useExternalPagination||(a.options.totalItems=a.rows.length)},[b.dataChange.ROW]);e.$on("$destroy",j);var k=function(){e.showingLow=(i.paginationCurrentPage-1)*i.paginationPageSize+1,e.showingHigh=Math.min(i.paginationCurrentPage*i.paginationPageSize,i.totalItems)},l=e.$watch("grid.options.totalItems + grid.options.paginationPageSize",k),m=e.$watch("grid.options.paginationCurrentPage + grid.options.paginationPageSize",function(b,c){if(b!==c){if(!angular.isNumber(i.paginationCurrentPage)||i.paginationCurrentPage<1)return void(i.paginationCurrentPage=1);if(i.totalItems>0&&i.paginationCurrentPage>e.paginationApi.getTotalPages())return void(i.paginationCurrentPage=e.paginationApi.getTotalPages());k(),a.onPaginationChanged(e.grid,i.paginationCurrentPage,i.paginationPageSize)}});e.$on("$destroy",function(){l(),m()}),e.cantPageForward=function(){return i.totalItems>0?i.paginationCurrentPage>=e.paginationApi.getTotalPages():i.data.length<1},e.cantPageToLast=function(){return i.totalItems>0?e.cantPageForward():!0},e.cantPageBackward=function(){return i.paginationCurrentPage<=1}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.pinning",["ui.grid"]);a.service("uiGridPinningService",["gridUtil","GridRenderContainer","i18nService",function(a,b,c){var d={initializeGrid:function(a){d.defaultGridOptions(a.options),a.registerColumnBuilder(d.pinningColumnBuilder)},defaultGridOptions:function(a){a.enablePinning=a.enablePinning!==!1},pinningColumnBuilder:function(b,d,e){if(b.enablePinning=void 0===b.enablePinning?e.enablePinning:b.enablePinning,b.pinnedLeft?"*"===d.width?d.grid.refresh().then(function(){d.renderContainer="left",d.width=d.grid.canvasWidth/d.grid.columns.length,d.grid.createLeftContainer()}):(d.renderContainer="left",d.grid.createLeftContainer()):b.pinnedRight&&("*"===d.width?d.grid.refresh().then(function(){d.renderContainer="right",d.width=d.grid.canvasWidth/d.grid.columns.length,d.grid.createRightContainer()}):(d.renderContainer="right",d.grid.createRightContainer())),b.enablePinning){var f={name:"ui.grid.pinning.pinLeft",title:c.get().pinning.pinLeft,icon:"ui-grid-icon-left-open",shown:function(){return"undefined"==typeof this.context.col.renderContainer||!this.context.col.renderContainer||"left"!==this.context.col.renderContainer},action:function(){this.context.col.renderContainer="left",this.context.col.width=this.context.col.drawnWidth,this.context.col.grid.createLeftContainer(),d.grid.refresh().then(function(){d.grid.refresh()})}},g={name:"ui.grid.pinning.pinRight",title:c.get().pinning.pinRight,icon:"ui-grid-icon-right-open",shown:function(){return"undefined"==typeof this.context.col.renderContainer||!this.context.col.renderContainer||"right"!==this.context.col.renderContainer},action:function(){this.context.col.renderContainer="right",this.context.col.width=this.context.col.drawnWidth,this.context.col.grid.createRightContainer(),d.grid.refresh().then(function(){d.grid.refresh()})}},h={name:"ui.grid.pinning.unpin",title:c.get().pinning.unpin,icon:"ui-grid-icon-cancel",shown:function(){return"undefined"!=typeof this.context.col.renderContainer&&null!==this.context.col.renderContainer&&"body"!==this.context.col.renderContainer},action:function(){this.context.col.renderContainer=null,d.grid.refresh().then(function(){d.grid.refresh()})}};a.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.pinning.pinLeft")||d.menuItems.push(f),a.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.pinning.pinRight")||d.menuItems.push(g),a.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.pinning.unpin")||d.menuItems.push(h)}}};return d}]),a.directive("uiGridPinning",["gridUtil","uiGridPinningService",function(a,b){return{require:"uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(e.grid)},post:function(){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.resizeColumns",["ui.grid"]);a.service("uiGridResizeColumnsService",["gridUtil","$q","$timeout",function(a,b,c){var d={defaultGridOptions:function(a){a.enableColumnResizing=a.enableColumnResizing!==!1,a.enableColumnResize===!1&&(a.enableColumnResizing=!1)},colResizerColumnBuilder:function(a,c,d){var e=[];return a.enableColumnResizing=void 0===a.enableColumnResizing?d.enableColumnResizing:a.enableColumnResizing,a.enableColumnResize===!1&&(a.enableColumnResizing=!1),b.all(e)},registerPublicApi:function(a){var b={events:{colResizable:{columnSizeChanged:function(){}}}};a.api.registerEventsFromObject(b.events)},fireColumnSizeChanged:function(a,b,d){c(function(){a.api.colResizable.raise.columnSizeChanged(b,d)})},findTargetCol:function(a,b,c){var d=a.getRenderContainer();if("left"===b){var e=d.visibleColumnCache.indexOf(a);return d.visibleColumnCache[e-1*c]}return a}};return d}]),a.directive("uiGridResizeColumns",["gridUtil","uiGridResizeColumnsService",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.defaultGridOptions(e.grid.options),e.grid.registerColumnBuilder(b.colResizerColumnBuilder),b.registerPublicApi(e.grid)},post:function(){}}}}}]),a.directive("uiGridHeaderCell",["gridUtil","$templateCache","$compile","$q","uiGridResizeColumnsService","uiGridConstants","$timeout",function(a,b,c,d,e,f,g){return{priority:-10,require:"^uiGrid",compile:function(){return{post:function(a,d,h,i){var j=i.grid;if(j.options.enableColumnResizing){var k=b.get("ui-grid/columnResizer"),l=1;
  j.isRTL()&&(a.position="left",l=-1);var m=function(){for(var b=d[0].getElementsByClassName("ui-grid-column-resizer"),f=0;f<b.length;f++)angular.element(b[f]).remove();var g=e.findTargetCol(a.col,"left",l),h=a.col.getRenderContainer();if(g&&0!==h.visibleColumnCache.indexOf(a.col)&&g.colDef.enableColumnResizing!==!1){var i=angular.element(k).clone();i.attr("position","left"),d.prepend(i),c(i)(a)}if(a.col.colDef.enableColumnResizing!==!1){var j=angular.element(k).clone();j.attr("position","right"),d.append(j),c(j)(a)}};m();var n=function(){g(m)},o=j.registerDataChangeCallback(n,[f.dataChange.COLUMN]);a.$on("$destroy",o)}}}}}}]),a.directive("uiGridColumnResizer",["$document","gridUtil","uiGridConstants","uiGridResizeColumnsService",function(a,b,c,d){var e,f,g,h=angular.element('<div class="ui-grid-resize-overlay"></div>');b.isTouchEnabled()?(e="touchstart",f="touchend",g="touchmove"):(e="mousedown",f="mouseup",g="mousemove");var i={priority:0,scope:{col:"=",position:"@",renderIndex:"="},require:"?^uiGrid",link:function(i,j,k,l){function m(a){var b=a.getRenderContainer();b.visibleColumnCache.forEach(function(b){if(b!==a){var c=b.colDef;(!c.width||angular.isString(c.width)&&(-1!==c.width.indexOf("*")||-1!==c.width.indexOf("%")))&&(b.width=b.drawnWidth)}})}function n(){l.grid.buildColumns().then(function(){l.grid.refreshCanvas(!0).then(function(){l.grid.queueGridRefresh()})})}function o(a,b){var c=b;return a.colDef.minWidth&&c<a.colDef.minWidth?c=a.colDef.minWidth:a.colDef.maxWidth&&c>a.colDef.maxWidth&&(c=a.colDef.maxWidth),c}function p(a){a.originalEvent&&(a=a.originalEvent),a.preventDefault(),s=(a.targetTouches?a.targetTouches[0]:a).clientX-t,0>s?s=0:s>l.grid.gridWidth&&(s=l.grid.gridWidth);var b=d.findTargetCol(i.col,i.position,u);if(b.colDef.enableColumnResizing!==!1){l.grid.element.hasClass("column-resizing")||l.grid.element.addClass("column-resizing");var e=s-r,f=parseInt(b.drawnWidth+e*u,10);s+=(o(b,f)-f)*u,h.css({left:s+"px"}),l.fireEvent(c.events.ITEM_DRAGGING)}}function q(b){b.originalEvent&&(b=b.originalEvent),b.preventDefault(),l.grid.element.removeClass("column-resizing"),h.remove(),s=(b.changedTouches?b.changedTouches[0]:b).clientX-t;var c=s-r;if(0===c)return a.off(f,q),void a.off(g,p);var e=d.findTargetCol(i.col,i.position,u);if(e.colDef.enableColumnResizing!==!1){var j=parseInt(e.drawnWidth+c*u,10);e.width=o(e,j),m(e),n(c),d.fireColumnSizeChanged(l.grid,e.colDef,c),a.off(f,q),a.off(g,p)}}var r=0,s=0,t=0,u=1;l.grid.isRTL()&&(i.position="left",u=-1),"left"===i.position?j.addClass("left"):"right"===i.position&&j.addClass("right"),j.on(e,function(b){b.originalEvent&&(b=b.originalEvent),b.stopPropagation(),t=l.grid.element[0].getBoundingClientRect().left,r=(b.targetTouches?b.targetTouches[0]:b).clientX-t,l.grid.element.append(h),h.css({left:r}),a.on(f,q),a.on(g,p)}),j.on("dblclick",function(a){a.stopPropagation();var e=d.findTargetCol(i.col,i.position,u);if(e.colDef.enableColumnResizing!==!1){var f=0,g=0,h=b.closestElm(j,".ui-grid-render-container"),k=h.querySelectorAll("."+c.COL_CLASS_PREFIX+e.uid+" .ui-grid-cell-contents");Array.prototype.forEach.call(k,function(a){var c;angular.element(a).parent().hasClass("ui-grid-header-cell")&&(c=angular.element(a).parent()[0].querySelectorAll(".ui-grid-column-menu-button")),b.fakeElement(a,{},function(a){var d=angular.element(a);d.attr("style","float: left");var e=b.elementWidth(d);if(c){var h=b.elementWidth(c);e+=h}e>f&&(f=e,g=f-e)})}),e.width=o(e,f),m(e),n(g),d.fireColumnSizeChanged(l.grid,e.colDef,g)}}),j.on("$destroy",function(){j.off(e),j.off("dblclick"),a.off(g,p),a.off(f,q)})}};return i}])}(),function(){"use strict";var a=angular.module("ui.grid.rowEdit",["ui.grid","ui.grid.edit","ui.grid.cellNav"]);a.constant("uiGridRowEditConstants",{}),a.service("uiGridRowEditService",["$interval","$q","uiGridConstants","uiGridRowEditConstants","gridUtil",function(a,b,c,d,e){var f={initializeGrid:function(a,b){b.rowEdit={};var c={events:{rowEdit:{saveRow:function(){}}},methods:{rowEdit:{setSavePromise:function(a,c){f.setSavePromise(b,a,c)},getDirtyRows:function(){return b.rowEdit.dirtyRows?b.rowEdit.dirtyRows:[]},getErrorRows:function(){return b.rowEdit.errorRows?b.rowEdit.errorRows:[]},flushDirtyRows:function(){return f.flushDirtyRows(b)},setRowsDirty:function(a){f.setRowsDirty(b,a)}}}};b.api.registerEventsFromObject(c.events),b.api.registerMethodsFromObject(c.methods),b.api.core.on.renderingComplete(a,function(){b.api.edit.on.afterCellEdit(a,f.endEditCell),b.api.edit.on.beginCellEdit(a,f.beginEditCell),b.api.edit.on.cancelCellEdit(a,f.cancelEditCell),b.api.cellNav&&b.api.cellNav.on.navigate(a,f.navigate)})},defaultGridOptions:function(){},saveRow:function(a,b){var c=this;return function(){if(b.isSaving=!0,b.rowEditSavePromise)return b.rowEditSavePromise;var d=a.api.rowEdit.raise.saveRow(b.entity);return b.rowEditSavePromise?b.rowEditSavePromise.then(c.processSuccessPromise(a,b),c.processErrorPromise(a,b)):e.logError("A promise was not returned when saveRow event was raised, either nobody is listening to event, or event handler did not return a promise"),d}},setSavePromise:function(a,b,c){var d=a.getRow(b);d.rowEditSavePromise=c},processSuccessPromise:function(a,b){var c=this;return function(){delete b.isSaving,delete b.isDirty,delete b.isError,delete b.rowEditSaveTimer,delete b.rowEditSavePromise,c.removeRow(a.rowEdit.errorRows,b),c.removeRow(a.rowEdit.dirtyRows,b)}},processErrorPromise:function(a,b){return function(){delete b.isSaving,delete b.rowEditSaveTimer,delete b.rowEditSavePromise,b.isError=!0,a.rowEdit.errorRows||(a.rowEdit.errorRows=[]),f.isRowPresent(a.rowEdit.errorRows,b)||a.rowEdit.errorRows.push(b)}},removeRow:function(a,b){"undefined"!=typeof a&&null!==a&&a.forEach(function(c,d){c.uid===b.uid&&a.splice(d,1)})},isRowPresent:function(a,b){var c=!1;return a.forEach(function(a){a.uid===b.uid&&(c=!0)}),c},flushDirtyRows:function(a){var c=[];return a.rowEdit.dirtyRows.forEach(function(b){f.saveRow(a,b)(),c.push(b.rowEditSavePromise)}),b.all(c)},endEditCell:function(a,b,c,d){var g=this.grid,h=g.getRow(a);return h?void((c!==d||h.isDirty)&&(g.rowEdit.dirtyRows||(g.rowEdit.dirtyRows=[]),h.isDirty||(h.isDirty=!0,g.rowEdit.dirtyRows.push(h)),delete h.isError,f.considerSetTimer(g,h))):void e.logError("Unable to find rowEntity in grid data, dirty flag cannot be set")},beginEditCell:function(a){var b=this.grid,c=b.getRow(a);return c?void f.cancelTimer(b,c):void e.logError("Unable to find rowEntity in grid data, timer cannot be cancelled")},cancelEditCell:function(a){var b=this.grid,c=b.getRow(a);return c?void f.considerSetTimer(b,c):void e.logError("Unable to find rowEntity in grid data, timer cannot be set")},navigate:function(a,b){var c=this.grid;a.row.rowEditSaveTimer&&f.cancelTimer(c,a.row),b&&b.row&&b.row!==a.row&&f.considerSetTimer(c,b.row)},considerSetTimer:function(b,c){if(f.cancelTimer(b,c),c.isDirty&&!c.isSaving&&-1!==b.options.rowEditWaitInterval){var d=b.options.rowEditWaitInterval?b.options.rowEditWaitInterval:2e3;c.rowEditSaveTimer=a(f.saveRow(b,c),d,1)}},cancelTimer:function(b,c){c.rowEditSaveTimer&&!c.isSaving&&(a.cancel(c.rowEditSaveTimer),delete c.rowEditSaveTimer)},setRowsDirty:function(a,b){var c;b.forEach(function(b){c=a.getRow(b),c?(a.rowEdit.dirtyRows||(a.rowEdit.dirtyRows=[]),c.isDirty||(c.isDirty=!0,a.rowEdit.dirtyRows.push(c)),delete c.isError,f.considerSetTimer(a,c)):e.logError("requested row not found in rowEdit.setRowsDirty, row was: "+b)})}};return f}]),a.directive("uiGridRowEdit",["gridUtil","uiGridRowEditService","uiGridEditConstants",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(a,e.grid)},post:function(){}}}}}]),a.directive("uiGridViewport",["$compile","uiGridConstants","gridUtil","$parse",function(){return{priority:-200,scope:!1,compile:function(a){var b=angular.element(a.children().children()[0]),c=b.attr("ng-class"),d="";return d=c?c.slice(0,-1)+", 'ui-grid-row-dirty': row.isDirty, 'ui-grid-row-saving': row.isSaving, 'ui-grid-row-error': row.isError}":"{'ui-grid-row-dirty': row.isDirty, 'ui-grid-row-saving': row.isSaving, 'ui-grid-row-error': row.isError}",b.attr("ng-class",d),{pre:function(){},post:function(){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.saveState",["ui.grid","ui.grid.selection","ui.grid.cellNav","ui.grid.grouping"]);a.constant("uiGridSaveStateConstants",{featureName:"saveState"}),a.service("uiGridSaveStateService",["$q","uiGridSaveStateConstants","gridUtil","$compile","$interval","uiGridConstants",function(){var a={initializeGrid:function(b){b.saveState={},this.defaultGridOptions(b.options);var c={events:{saveState:{}},methods:{saveState:{save:function(){return a.save(b)},restore:function(c,d){a.restore(b,c,d)}}}};b.api.registerEventsFromObject(c.events),b.api.registerMethodsFromObject(c.methods)},defaultGridOptions:function(a){a.saveWidths=a.saveWidths!==!1,a.saveOrder=a.saveOrder!==!1,a.saveScroll=a.saveScroll===!0,a.saveFocus=a.saveScroll!==!0&&a.saveFocus!==!1,a.saveVisible=a.saveVisible!==!1,a.saveSort=a.saveSort!==!1,a.saveFilter=a.saveFilter!==!1,a.saveSelection=a.saveSelection!==!1,a.saveGrouping=a.saveGrouping!==!1,a.saveGroupingExpandedStates=a.saveGroupingExpandedStates===!0},save:function(b){var c={};return c.columns=a.saveColumns(b),c.scrollFocus=a.saveScrollFocus(b),c.selection=a.saveSelection(b),c.grouping=a.saveGrouping(b),c},restore:function(b,c,d){d.columns&&a.restoreColumns(b,d.columns),d.scrollFocus&&a.restoreScrollFocus(b,c,d.scrollFocus),d.selection&&a.restoreSelection(b,d.selection),d.grouping&&a.restoreGrouping(b,d.grouping),b.queueGridRefresh()},saveColumns:function(a){var b=[];return a.columns.forEach(function(c){var d={};d.name=c.name,a.options.saveVisible&&(d.visible=c.visible),a.options.saveWidths&&(d.width=c.width),a.options.saveSort&&(d.sort=angular.copy(c.sort)),a.options.saveFilter&&(d.filters=angular.copy(c.filters)),b.push(d)}),b},saveScrollFocus:function(b){if(!b.api.cellNav)return{};var c={};if(b.options.saveFocus){c.focus=!0;var d=b.api.cellNav.getFocusedCell();null!==d&&(null!==d.col&&(c.colName=d.col.colDef.name),null!==d.row&&(c.rowVal=a.getRowVal(b,d.row)))}else b.options.saveScroll&&(c.focus=!1,b.renderContainers.body.prevRowScrollIndex&&(c.rowVal=a.getRowVal(b,b.renderContainers.body.visibleRowCache[b.renderContainers.body.prevRowScrollIndex])),b.renderContainers.body.prevColScrollIndex&&(c.colName=b.renderContainers.body.visibleColumnCache[b.renderContainers.body.prevColScrollIndex].name));return c},saveSelection:function(b){if(!b.api.selection||!b.options.saveSelection)return{};var c=b.api.selection.getSelectedGridRows().map(function(c){return a.getRowVal(b,c)});return c},saveGrouping:function(a){return a.api.grouping&&a.options.saveGrouping?a.api.grouping.getGrouping(a.options.saveGroupingExpandedStates):{}},getRowVal:function(a,b){if(!b)return null;var c={};return a.options.saveRowIdentity?(c.identity=!0,c.row=a.options.saveRowIdentity(b.entity)):(c.identity=!1,c.row=a.renderContainers.body.visibleRowCache.indexOf(b)),c},restoreColumns:function(a,b){b.forEach(function(b,c){var d=a.getColumn(b.name);if(d){var e=a.columns.indexOf(d);if(!a.options.saveVisible||a.columns[e].visible===b.visible&&a.columns[e].colDef.visible===b.visible||(a.columns[e].visible=b.visible,a.columns[e].colDef.visible=b.visible,a.api.core.raise.columnVisibilityChanged(a.columns[e])),a.options.saveWidths&&(a.columns[e].width=b.width),!a.options.saveSort||angular.equals(a.columns[e].sort,b.sort)||void 0===a.columns[e].sort&&angular.isEmpty(b.sort)||(a.columns[e].sort=angular.copy(b.sort),a.api.core.raise.sortChanged()),a.options.saveFilter&&!angular.equals(a.columns[e].filters,b.filters)&&(a.columns[e].filters=angular.copy(b.filters),a.api.core.raise.filterChanged()),a.options.saveOrder&&e!==c){var f=a.columns.splice(e,1)[0];a.columns.splice(c,0,f)}}})},restoreScrollFocus:function(b,c,d){if(b.api.cellNav){var e,f;if(d.colName){var g=b.options.columnDefs.filter(function(a){return a.name===d.colName});g.length>0&&(e=g[0])}d.rowVal&&d.rowVal.row&&(f=d.rowVal.identity?a.findRowByIdentity(b,d.rowVal):b.renderContainers.body.visibleRowCache[d.rowVal.row]);var h=f&&f.entity?f.entity:null;(e||h)&&(d.focus?b.api.cellNav.scrollToFocus(h,e):b.api.cellNav.scrollTo(h,e))}},restoreSelection:function(b,c){b.api.selection&&(b.api.selection.clearSelectedRows(),c.forEach(function(c){if(c.identity){var d=a.findRowByIdentity(b,c);d&&b.api.selection.selectRow(d.entity)}else b.api.selection.selectRowByVisibleIndex(c.row)}))},restoreGrouping:function(a,b){a.api.grouping&&"undefined"!=typeof b&&null!==b&&!angular.equals(b,{})&&a.api.grouping.setGrouping(b)},findRowByIdentity:function(a,b){if(!a.options.saveRowIdentity)return null;var c=a.rows.filter(function(c){return a.options.saveRowIdentity(c.entity)===b.row?!0:!1});return c.length>0?c[0]:null}};return a}]),a.directive("uiGridSaveState",["uiGridSaveStateConstants","uiGridSaveStateService","gridUtil","$compile",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,link:function(a,c,d,e){b.initializeGrid(e.grid)}}}])}(),function(){"use strict";var a=angular.module("ui.grid.selection",["ui.grid"]);a.constant("uiGridSelectionConstants",{featureName:"selection",selectionRowHeaderColName:"selectionRowHeaderCol"}),angular.module("ui.grid").config(["$provide",function(a){a.decorator("GridRow",["$delegate",function(a){return a.prototype.setSelected=function(a){this.isSelected=a,a?this.grid.selection.selectedCount++:this.grid.selection.selectedCount--},a}])}]),a.service("uiGridSelectionService",["$q","$templateCache","uiGridSelectionConstants","gridUtil",function(){var a={initializeGrid:function(b){b.selection={},b.selection.lastSelectedRow=null,b.selection.selectAll=!1,b.selection.selectedCount=0,a.defaultGridOptions(b.options);var c={events:{selection:{rowSelectionChanged:function(){},rowSelectionChangedBatch:function(){}}},methods:{selection:{toggleRowSelection:function(c,d){var e=b.getRow(c);null!==e&&e.enableSelection!==!1&&a.toggleRowSelection(b,e,d,b.options.multiSelect,b.options.noUnselect)},selectRow:function(c,d){var e=b.getRow(c);null===e||e.isSelected||e.enableSelection===!1||a.toggleRowSelection(b,e,d,b.options.multiSelect,b.options.noUnselect)},selectRowByVisibleIndex:function(c,d){var e=b.renderContainers.body.visibleRowCache[c];null===e||"undefined"==typeof e||e.isSelected||e.enableSelection===!1||a.toggleRowSelection(b,e,d,b.options.multiSelect,b.options.noUnselect)},unSelectRow:function(c,d){var e=b.getRow(c);null!==e&&e.isSelected&&a.toggleRowSelection(b,e,d,b.options.multiSelect,b.options.noUnselect)},selectAllRows:function(c){if(b.options.multiSelect!==!1){var d=[];b.rows.forEach(function(e){e.isSelected||e.enableSelection===!1||(e.setSelected(!0),a.decideRaiseSelectionEvent(b,e,d,c))}),a.decideRaiseSelectionBatchEvent(b,d,c),b.selection.selectAll=!0}},selectAllVisibleRows:function(c){if(b.options.multiSelect!==!1){var d=[];b.rows.forEach(function(e){e.visible?e.isSelected||e.enableSelection===!1||(e.setSelected(!0),a.decideRaiseSelectionEvent(b,e,d,c)):e.isSelected&&(e.setSelected(!1),a.decideRaiseSelectionEvent(b,e,d,c))}),a.decideRaiseSelectionBatchEvent(b,d,c),b.selection.selectAll=!0}},clearSelectedRows:function(c){a.clearSelectedRows(b,c)},getSelectedRows:function(){return a.getSelectedRows(b).map(function(a){return a.entity})},getSelectedGridRows:function(){return a.getSelectedRows(b)},setMultiSelect:function(a){b.options.multiSelect=a},setModifierKeysToMultiSelect:function(a){b.options.modifierKeysToMultiSelect=a},getSelectAllState:function(){return b.selection.selectAll}}}};b.api.registerEventsFromObject(c.events),b.api.registerMethodsFromObject(c.methods)},defaultGridOptions:function(a){a.enableRowSelection=a.enableRowSelection!==!1,a.multiSelect=a.multiSelect!==!1,a.noUnselect=a.noUnselect===!0,a.modifierKeysToMultiSelect=a.modifierKeysToMultiSelect===!0,a.enableRowHeaderSelection=a.enableRowHeaderSelection!==!1,a.enableSelectAll=a.enableSelectAll!==!1,a.enableSelectionBatchEvent=a.enableSelectionBatchEvent!==!1,a.selectionRowHeaderWidth=angular.isDefined(a.selectionRowHeaderWidth)?a.selectionRowHeaderWidth:30,a.enableFooterTotalSelected=a.enableFooterTotalSelected!==!1,a.isRowSelectable=angular.isDefined(a.isRowSelectable)?a.isRowSelectable:angular.noop},toggleRowSelection:function(b,c,d,e,f){var g=c.isSelected;if(e||g){if(!e&&g){var h=a.getSelectedRows(b);h.length>1&&(g=!1,a.clearSelectedRows(b,d))}}else a.clearSelectedRows(b,d);g&&f||c.enableSelection!==!1&&(c.setSelected(!g),c.isSelected===!0?b.selection.lastSelectedRow=c:b.selection.selectAll=!1,b.api.selection.raise.rowSelectionChanged(c,d))},shiftSelect:function(b,c,d,e){if(e){var f=a.getSelectedRows(b),g=f.length>0?b.renderContainers.body.visibleRowCache.indexOf(b.selection.lastSelectedRow):0,h=b.renderContainers.body.visibleRowCache.indexOf(c);if(g>h){var i=g;g=h,h=i}for(var j=[],k=g;h>=k;k++){var l=b.renderContainers.body.visibleRowCache[k];l&&(l.isSelected||l.enableSelection===!1||(l.setSelected(!0),b.selection.lastSelectedRow=l,a.decideRaiseSelectionEvent(b,l,j,d)))}a.decideRaiseSelectionBatchEvent(b,j,d)}},getSelectedRows:function(a){return a.rows.filter(function(a){return a.isSelected})},clearSelectedRows:function(b,c){var d=[];a.getSelectedRows(b).forEach(function(e){e.isSelected&&(e.setSelected(!1),a.decideRaiseSelectionEvent(b,e,d,c))}),a.decideRaiseSelectionBatchEvent(b,d,c),b.selection.selectAll=!1},decideRaiseSelectionEvent:function(a,b,c,d){a.options.enableSelectionBatchEvent?c.push(b):a.api.selection.raise.rowSelectionChanged(b,d)},decideRaiseSelectionBatchEvent:function(a,b,c){b.length>0&&a.api.selection.raise.rowSelectionChangedBatch(b,c)}};return a}]),a.directive("uiGridSelection",["uiGridSelectionConstants","uiGridSelectionService","$templateCache","uiGridConstants",function(a,b,c,d){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(c,e,f,g){if(b.initializeGrid(g.grid),g.grid.options.enableRowHeaderSelection){var h={name:a.selectionRowHeaderColName,displayName:"",width:g.grid.options.selectionRowHeaderWidth,minWidth:10,cellTemplate:"ui-grid/selectionRowHeader",headerCellTemplate:"ui-grid/selectionHeaderCell",enableColumnResizing:!1,enableColumnMenu:!1,exporterSuppressExport:!0,allowCellFocus:!0};g.grid.addRowHeaderColumn(h)}var i=!1,j=function(){g.grid.options.isRowSelectable!==angular.noop&&i!==!0&&(g.grid.registerRowsProcessor(function(a){return a.forEach(function(a){a.enableSelection=g.grid.options.isRowSelectable(a)}),a}),i=!0)};j();var k=g.grid.registerDataChangeCallback(j,[d.dataChange.OPTIONS]);c.$on("$destroy",k)},post:function(){}}}}}]),a.directive("uiGridSelectionRowHeaderButtons",["$templateCache","uiGridSelectionService",function(a,b){return{replace:!0,restrict:"E",template:a.get("ui-grid/selectionRowHeaderButtons"),scope:!0,require:"^uiGrid",link:function(a,c,d,e){var f=e.grid;a.selectButtonClick=function(a,c){c.stopPropagation(),c.shiftKey?b.shiftSelect(f,a,c,f.options.multiSelect):c.ctrlKey||c.metaKey?b.toggleRowSelection(f,a,c,f.options.multiSelect,f.options.noUnselect):b.toggleRowSelection(f,a,c,f.options.multiSelect&&!f.options.modifierKeysToMultiSelect,f.options.noUnselect)}}}}]),a.directive("uiGridSelectionSelectAllButtons",["$templateCache","uiGridSelectionService",function(a,b){return{replace:!0,restrict:"E",template:a.get("ui-grid/selectionSelectAllButtons"),scope:!1,link:function(a){var c=a.col.grid;a.headerButtonClick=function(a,d){c.selection.selectAll?(b.clearSelectedRows(c,d),c.options.noUnselect&&c.api.selection.selectRowByVisibleIndex(0,d),c.selection.selectAll=!1):c.options.multiSelect&&(c.api.selection.selectAllVisibleRows(d),c.selection.selectAll=!0)}}}}]),a.directive("uiGridViewport",["$compile","uiGridConstants","uiGridSelectionConstants","gridUtil","$parse","uiGridSelectionService",function(){return{priority:-200,scope:!1,compile:function(a){var b=angular.element(a.children().children()[0]),c=b.attr("ng-class"),d="";return d=c?c.slice(0,-1)+",'ui-grid-row-selected': row.isSelected}":"{'ui-grid-row-selected': row.isSelected}",b.attr("ng-class",d),{pre:function(){},post:function(){}}}}}]),a.directive("uiGridCell",["$compile","uiGridConstants","uiGridSelectionConstants","gridUtil","$parse","uiGridSelectionService",function(a,b,c,d,e,f){return{priority:-200,restrict:"A",scope:!1,link:function(a,c){function d(){a.grid.options.enableRowSelection&&!a.grid.options.enableRowHeaderSelection&&(c.addClass("ui-grid-disable-selection"),c.on("touchstart",j),c.on("touchend",k),c.on("click",i),a.registered=!0)}function e(){a.registered&&(c.removeClass("ui-grid-disable-selection"),c.off("touchstart",j),c.off("touchend",k),c.off("click",i),a.registered=!1)}var g=0,h=300;c.bind("keydown",function(b){32===b.keyCode&&"selectionRowHeaderCol"===a.col.colDef.name&&(f.toggleRowSelection(a.grid,a.row,b,a.grid.options.multiSelect&&!a.grid.options.modifierKeysToMultiSelect,a.grid.options.noUnselect),a.$apply())});var i=function(b){b.shiftKey?f.shiftSelect(a.grid,a.row,b,a.grid.options.multiSelect):b.ctrlKey||b.metaKey?f.toggleRowSelection(a.grid,a.row,b,a.grid.options.multiSelect,a.grid.options.noUnselect):f.toggleRowSelection(a.grid,a.row,b,a.grid.options.multiSelect&&!a.grid.options.modifierKeysToMultiSelect,a.grid.options.noUnselect),a.$apply()},j=function(){g=(new Date).getTime()},k=function(a){var b=(new Date).getTime(),c=b-g;h>c&&i(a)};d();var l=a.grid.registerDataChangeCallback(function(){!a.grid.options.enableRowSelection||a.grid.options.enableRowHeaderSelection||a.registered?a.grid.options.enableRowSelection&&!a.grid.options.enableRowHeaderSelection||!a.registered||e():d()},[b.dataChange.OPTIONS]);c.on("$destroy",l)}}}]),a.directive("uiGridGridFooter",["$compile","uiGridConstants","gridUtil",function(a,b,c){return{restrict:"EA",replace:!0,priority:-1e3,require:"^uiGrid",scope:!0,compile:function(){return{pre:function(b,d,e,f){f.grid.options.showGridFooter&&c.getTemplate("ui-grid/gridFooterSelectedItems").then(function(c){var e=angular.element(c),f=a(e)(b);angular.element(d[0].getElementsByClassName("ui-grid-grid-footer")[0]).append(f)})},post:function(){}}}}}])}(),angular.module("ui.grid").run(["$templateCache",function(a){"use strict";a.put("ui-grid/ui-grid-footer",'<div class="ui-grid-footer-panel ui-grid-footer-aggregates-row"><div class="ui-grid-footer ui-grid-footer-viewport"><div class="ui-grid-footer-canvas"><div class="ui-grid-footer-cell-wrapper" ng-style="colContainer.headerCellWrapperStyle()"><div class="ui-grid-footer-cell-row"><div ng-repeat="col in colContainer.renderedColumns track by col.colDef.name" ui-grid-footer-cell col="col" render-index="$index" class="ui-grid-footer-cell ui-grid-clearfix"></div></div></div></div></div></div>'),a.put("ui-grid/ui-grid-grid-footer",'<div class="ui-grid-footer-info ui-grid-grid-footer"><span>{{\'search.totalItems\' | t}} {{grid.rows.length}}</span> <span ng-if="grid.renderContainers.body.visibleRowCache.length !== grid.rows.length" class="ngLabel">({{"search.showingItems" | t}} {{grid.renderContainers.body.visibleRowCache.length}})</span></div>'),a.put("ui-grid/ui-grid-group-panel",'<div class="ui-grid-group-panel"><div ui-t="groupPanel.description" class="description" ng-show="groupings.length == 0"></div><ul ng-show="groupings.length > 0" class="ngGroupList"><li class="ngGroupItem" ng-repeat="group in configGroups"><span class="ngGroupElement"><span class="ngGroupName">{{group.displayName}} <span ng-click="removeGroup($index)" class="ngRemoveGroup">x</span></span> <span ng-hide="$last" class="ngGroupArrow"></span></span></li></ul></div>'),a.put("ui-grid/ui-grid-header",'<div class="ui-grid-header"><div class="ui-grid-top-panel"><div class="ui-grid-header-viewport"><div class="ui-grid-header-canvas"><div class="ui-grid-header-cell-wrapper" ng-style="colContainer.headerCellWrapperStyle()"><div class="ui-grid-header-cell-row"><div class="ui-grid-header-cell ui-grid-clearfix" ng-repeat="col in colContainer.renderedColumns track by col.colDef.name" ui-grid-header-cell col="col" render-index="$index"></div></div></div></div></div><div ui-grid-menu></div></div></div>'),a.put("ui-grid/ui-grid-menu-button",'<div class="ui-grid-menu-button" ng-click="toggleMenu()"><div class="ui-grid-icon-container"><i class="ui-grid-icon-menu">&nbsp;</i></div><div ui-grid-menu menu-items="menuItems"></div></div>'),a.put("ui-grid/ui-grid-no-header",'<div class="ui-grid-top-panel"></div>'),a.put("ui-grid/ui-grid-row",'<div ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ng-class="{ \'ui-grid-row-header-cell\': col.isRowHeader }" ui-grid-cell></div>'),a.put("ui-grid/ui-grid",'<div ui-i18n="en" class="ui-grid"><!-- TODO (c0bra): add "scoped" attr here, eventually? --><style ui-grid-style>.grid{{ grid.id }} {\n /* Styles for the grid */\n }\n\n .grid{{ grid.id }} .ui-grid-row, .grid{{ grid.id }} .ui-grid-cell, .grid{{ grid.id }} .ui-grid-cell .ui-grid-vertical-bar {\n height: {{ grid.options.rowHeight }}px;\n }\n\n .grid{{ grid.id }} .ui-grid-row:last-child .ui-grid-cell {\n border-bottom-width: {{ ((grid.getTotalRowHeight() < grid.getViewportHeight()) && \'1\') || \'0\' }}px;\n }\n\n {{ grid.verticalScrollbarStyles }}\n {{ grid.horizontalScrollbarStyles }}\n\n /*\n .ui-grid[dir=rtl] .ui-grid-viewport {\n padding-left: {{ grid.verticalScrollbarWidth }}px;\n }\n */\n\n {{ grid.customStyles }}</style><div ui-grid-menu-button ng-if="grid.options.enableGridMenu"></div><div ng-if="grid.hasLeftContainer()" style="width: 0" ui-grid-pinned-container="\'left\'"></div><div ui-grid-render-container container-id="\'body\'" col-container-name="\'body\'" row-container-name="\'body\'" bind-scroll-horizontal="true" bind-scroll-vertical="true" enable-horizontal-scrollbar="grid.options.enableHorizontalScrollbar" enable-vertical-scrollbar="grid.options.enableVerticalScrollbar"></div><div ng-if="grid.hasRightContainer()" style="width: 0" ui-grid-pinned-container="\'right\'"></div><div ui-grid-grid-footer ng-if="grid.options.showGridFooter"></div><div ui-grid-column-menu ng-if="grid.options.enableColumnMenus"></div><div ng-transclude></div></div>'),a.put("ui-grid/uiGridCell",'<div class="ui-grid-cell-contents" title="TOOLTIP">{{COL_FIELD CUSTOM_FILTERS}}</div>'),a.put("ui-grid/uiGridColumnMenu",'<div class="ui-grid-column-menu"><div ui-grid-menu menu-items="menuItems"><!-- <div class="ui-grid-column-menu">\n <div class="inner" ng-show="menuShown">\n <ul>\n <div ng-show="grid.options.enableSorting">\n <li ng-click="sortColumn($event, asc)" ng-class="{ \'selected\' : col.sort.direction == asc }"><i class="ui-grid-icon-sort-alt-up"></i> Sort Ascending</li>\n <li ng-click="sortColumn($event, desc)" ng-class="{ \'selected\' : col.sort.direction == desc }"><i class="ui-grid-icon-sort-alt-down"></i> Sort Descending</li>\n <li ng-show="col.sort.direction" ng-click="unsortColumn()"><i class="ui-grid-icon-cancel"></i> Remove Sort</li>\n </div>\n </ul>\n </div>\n </div> --></div></div>'),a.put("ui-grid/uiGridFooterCell",'<div class="ui-grid-cell-contents" col-index="renderIndex"><div>{{ col.getAggregationText() + ( col.getAggregationValue() CUSTOM_FILTERS ) }}</div></div>'),a.put("ui-grid/uiGridHeaderCell",'<div ng-class="{ \'sortable\': sortable }"><!-- <div class="ui-grid-vertical-bar">&nbsp;</div> --><div class="ui-grid-cell-contents" col-index="renderIndex"><span>{{ col.displayName CUSTOM_FILTERS }}</span> <span ui-grid-visible="col.sort.direction" ng-class="{ \'ui-grid-icon-up-dir\': col.sort.direction == asc, \'ui-grid-icon-down-dir\': col.sort.direction == desc, \'ui-grid-icon-blank\': !col.sort.direction }">&nbsp;</span></div><div class="ui-grid-column-menu-button" ng-if="grid.options.enableColumnMenus && !col.isRowHeader && col.colDef.enableColumnMenu !== false" ng-click="toggleMenu($event)" ng-class="{\'ui-grid-column-menu-button-last-col\': isLastCol}"><i class="ui-grid-icon-angle-down">&nbsp;</i></div><div ng-if="filterable" class="ui-grid-filter-container" ng-repeat="colFilter in col.filters"><div ng-if="colFilter.type !== \'select\'"><input type="text" class="ui-grid-filter-input" ng-model="colFilter.term" ng-attr-placeholder="{{colFilter.placeholder || \'\'}}"><div class="ui-grid-filter-button" ng-click="colFilter.term = null"><i class="ui-grid-icon-cancel" ng-show="!!colFilter.term">&nbsp;</i><!-- use !! because angular interprets \'f\' as false --></div></div><div ng-if="colFilter.type === \'select\'"><select class="ui-grid-filter-select" ng-model="colFilter.term" ng-attr-placeholder="{{colFilter.placeholder || \'\'}}" ng-options="option.value as option.label for option in colFilter.selectOptions"></select><div class="ui-grid-filter-button-select" ng-click="colFilter.term = null"><i class="ui-grid-icon-cancel" ng-show="!!colFilter.term">&nbsp;</i><!-- use !! because angular interprets \'f\' as false --></div></div></div></div>'),a.put("ui-grid/uiGridMenu",'<div class="ui-grid-menu" ng-if="shown"><div class="ui-grid-menu-mid" ng-show="shownMid"><div class="ui-grid-menu-inner"><ul class="ui-grid-menu-items"><li ng-repeat="item in menuItems" ui-grid-menu-item action="item.action" name="item.title" active="item.active" icon="item.icon" shown="item.shown" context="item.context" template-url="item.templateUrl" leave-open="item.leaveOpen"></li></ul></div></div></div>'),a.put("ui-grid/uiGridMenuItem",'<li class="ui-grid-menu-item" ng-click="itemAction($event, title)" ng-show="itemShown()" ng-class="{ \'ui-grid-menu-item-active\' : active() }"><i ng-class="icon"></i> {{ name }}</li>'),a.put("ui-grid/uiGridRenderContainer",'<div class="ui-grid-render-container"><div ui-grid-header></div><div ui-grid-viewport></div><div ui-grid-footer ng-if="grid.options.showColumnFooter"></div></div>'),a.put("ui-grid/uiGridViewport",'<div class="ui-grid-viewport" ng-style="colContainer.getViewPortStyle()"><div class="ui-grid-canvas"><div ng-repeat="(rowRenderIndex, row) in rowContainer.renderedRows track by $index" class="ui-grid-row" ng-style="Viewport.rowStyle(rowRenderIndex)"><div ui-grid-row="row" row-render-index="rowRenderIndex"></div></div></div></div>'),a.put("ui-grid/cellEditor",'<div><form name="inputForm"><input type="INPUT_TYPE" ng-class="\'colt\' + col.uid" ui-grid-editor ng-model="MODEL_COL_FIELD"></form></div>'),a.put("ui-grid/dropdownEditor",'<div><form name="inputForm"><select ng-class="\'colt\' + col.uid" ui-grid-edit-dropdown ng-model="MODEL_COL_FIELD" ng-options="field[editDropdownIdLabel] as field[editDropdownValueLabel] CUSTOM_FILTERS for field in editDropdownOptionsArray"></select></form></div>'),a.put("ui-grid/expandableRow",'<div ui-grid-expandable-row ng-if="expandableRow.shouldRenderExpand()" class="expandableRow" style="float:left; margin-top: 1px; margin-bottom: 1px" ng-style="{width: (grid.renderContainers.body.getCanvasWidth()) + \'px\'\n , height: grid.options.expandableRowHeight + \'px\'}"></div>'),a.put("ui-grid/expandableRowHeader",'<div class="ui-grid-row-header-cell ui-grid-expandable-buttons-cell"><div class="ui-grid-cell-contents"><i ng-class="{ \'ui-grid-icon-plus-squared\' : !row.isExpanded, \'ui-grid-icon-minus-squared\' : row.isExpanded }" ng-click="grid.api.expandable.toggleRowExpansion(row.entity)"></i></div></div>'),a.put("ui-grid/expandableScrollFiller","<div ng-if=\"expandableRow.shouldRenderFiller()\" style=\"float:left; margin-top: 2px; margin-bottom: 2px\" ng-style=\"{ width: (grid.getViewportWidth()) + 'px',\n height: grid.options.expandableRowHeight + 'px', 'margin-left': grid.options.rowHeader.rowHeaderWidth + 'px' }\"><i class=\"ui-grid-icon-spin5 ui-grid-animate-spin\" ng-style=\"{ 'margin-top': ( grid.options.expandableRowHeight/2 - 5) + 'px',\n 'margin-left' : ((grid.getViewportWidth() - grid.options.rowHeader.rowHeaderWidth)/2 - 5) + 'px' }\"></i></div>"),
  a.put("ui-grid/expandableTopRowHeader",'<div class="ui-grid-row-header-cell ui-grid-expandable-buttons-cell"><div class="ui-grid-cell-contents"><i ng-class="{ \'ui-grid-icon-plus-squared\' : !grid.expandable.expandedAll, \'ui-grid-icon-minus-squared\' : grid.expandable.expandedAll }" ng-click="grid.api.expandable.toggleAllRows()"></i></div></div>'),a.put("ui-grid/csvLink",'<span class="ui-grid-exporter-csv-link-span"><a href="data:text/csv;charset=UTF-8,CSV_CONTENT" download="FILE_NAME">LINK_LABEL</a></span>'),a.put("ui-grid/groupingExpandAllButtons",'<div class="ui-grid-grouping-row-header-buttons" ng-class="{\'ui-grid-icon-minus-squared\': grid.grouping.expandAll, \'ui-grid-icon-plus-squared\': !grid.grouping.expandAll}" ng-click="headerButtonClick($event)"></div>'),a.put("ui-grid/groupingHeaderCell",'<div><!-- <div class="ui-grid-vertical-bar">&nbsp;</div> --><div class="ui-grid-cell-contents" col-index="renderIndex"><ui-grid-grouping-expand-all-buttons></ui-grid-grouping-expand-all-buttons></div></div>'),a.put("ui-grid/groupingRowHeader",'<div class="ui-grid-cell-contents"><ui-grid-grouping-row-header-buttons></ui-grid-grouping-row-header-buttons></div>'),a.put("ui-grid/groupingRowHeaderButtons","<div class=\"ui-grid-grouping-row-header-buttons\" ng-class=\"{'ui-grid-group-header': row.groupLevel > - 1}\" ng-click=\"groupButtonClick(row, $event)\"><i ng-class=\"{'ui-grid-icon-minus-squared': row.expandedState.state === 'expanded', 'ui-grid-icon-plus-squared': row.expandedState.state === 'collapsed'}\" ng-style=\"{'padding-left': grid.options.groupingIndent * row.groupLevel + 'px'}\"></i> &nbsp;</div>"),a.put("ui-grid/importerMenuItem",'<li class="ui-grid-menu-item"><form><input class="ui-grid-importer-file-chooser" type="file" id="files" name="files[]"></form></li>'),a.put("ui-grid/importerMenuItemContainer","<div ui-grid-importer-menu-item></div>"),a.put("ui-grid/pagination",'<div class="ui-grid-pager-panel" ui-grid-pager ng-show="grid.options.enablePaginationControls"><div class="ui-grid-pager-container"><div class="ui-grid-pager-control"><button type="button" ng-click="paginationApi.seek(1)" ng-disabled="cantPageBackward()"><div class="first-triangle"><div class="first-bar"></div></div></button> <button type="button" ng-click="paginationApi.previousPage()" ng-disabled="cantPageBackward()"><div class="first-triangle prev-triangle"></div></button> <input type="number" ng-model="grid.options.paginationCurrentPage" min="1" max="{{ paginationApi.getTotalPages() }}" required> <span class="ui-grid-pager-max-pages-number" ng-show="paginationApi.getTotalPages() > 0">/ {{ paginationApi.getTotalPages() }}</span> <button type="button" ng-click="paginationApi.nextPage()" ng-disabled="cantPageForward()"><div class="last-triangle next-triangle"></div></button> <button type="button" ng-click="paginationApi.seek(paginationApi.getTotalPages())" ng-disabled="cantPageToLast()"><div class="last-triangle"><div class="last-bar"></div></div></button></div><div class="ui-grid-pager-row-count-picker"><select ng-model="grid.options.paginationPageSize" ng-options="o as o for o in grid.options.paginationPageSizes"></select><span class="ui-grid-pager-row-count-label">&nbsp;{{sizesLabel}}</span></div></div><div class="ui-grid-pager-count-container"><div class="ui-grid-pager-count"><span ng-show="grid.options.totalItems > 0">{{showingLow}} - {{showingHigh}} of {{grid.options.totalItems}} {{totalItemsLabel}}</span></div></div></div>'),a.put("ui-grid/columnResizer",'<div ui-grid-column-resizer ng-if="grid.options.enableColumnResizing" class="ui-grid-column-resizer" col="col" position="right" render-index="renderIndex"></div>'),a.put("ui-grid/gridFooterSelectedItems",'<span ng-if="grid.selection.selectedCount !== 0 && grid.options.enableFooterTotalSelected">({{"search.selectedItems" | t}} {{grid.selection.selectedCount}})</span>'),a.put("ui-grid/selectionHeaderCell",'<div><!-- <div class="ui-grid-vertical-bar">&nbsp;</div> --><div class="ui-grid-cell-contents" col-index="renderIndex"><ui-grid-selection-select-all-buttons ng-if="grid.options.enableSelectAll"></ui-grid-selection-select-all-buttons></div></div>'),a.put("ui-grid/selectionRowHeader",'<div class="ui-grid-disable-selection"><div class="ui-grid-cell-contents"><ui-grid-selection-row-header-buttons></ui-grid-selection-row-header-buttons></div></div>'),a.put("ui-grid/selectionRowHeaderButtons",'<div class="ui-grid-selection-row-header-buttons ui-grid-icon-ok" ng-class="{\'ui-grid-row-selected\': row.isSelected}" ng-click="selectButtonClick(row, $event)">&nbsp;</div>'),a.put("ui-grid/selectionSelectAllButtons",'<div class="ui-grid-selection-row-header-buttons ui-grid-icon-ok" ng-class="{\'ui-grid-all-selected\': grid.selection.selectAll}" ng-click="headerButtonClick($event)"></div>')}]);