require.config({
    waitSeconds: 30,
    baseUrl : '/app/',
    paths: {
        'app'            : 'js/apps/national-reports/app',
        'authentication' : 'services/authentication',
        'angular'        : 'libs/angular-flex/angular-flex',
        'ngRoute'        : 'libs/angular-route/angular-route.min',
        'ngCookies'      : 'libs/angular-cookies/angular-cookies.min',
        'ngAnimate'      : 'libs/angular-animate/angular-animate.min',
        'async'          : 'libs/requirejs-plugins/src/async',
        'text'           : 'libs/requirejs-text/text',
        'jquery'         : 'libs/jquery/dist/jquery.min',
        'bootstrap'      : 'libs/bootstrap/dist/js/bootstrap.min',
        'moment'         : 'libs/moment/min/moment.min',
        'underscore'     : 'libs/lodash/lodash.min',

        'ammap3WorldHigh'     : 'directives/reporting-display/worldEUHigh',
        'ammap3'              : 'libs/ammap3/ammap/ammap',
        'ammap-theme'         : 'libs/ammap3/ammap/themes/light',
        'ammap-resp'          : 'libs/ammap3/ammap/plugins/responsive/responsive',
        'ammap-export'        : 'libs/ammap3/ammap/plugins/export/export.min',
        'ammap-ex-fabric'     : 'libs/ammap3/ammap/plugins/export/libs/fabric.js/fabric.min',
        'ammap-ex-filesaver'  : 'libs/ammap3/ammap/plugins/export/libs/FileSaver.js/FileSaver.min',
        'ammap-ex-pdfmake'    : 'libs/ammap3/ammap/plugins/export/libs/pdfmake/pdfmake.min',
        'ammap-ex-vfs-fonts'  : 'libs/ammap3/ammap/plugins/export/libs/pdfmake/vfs_fonts',
        'ammap-ex-jszip'      : 'libs/ammap3/ammap/plugins/export/libs/jszip/jszip.min',
        'ammap-ex-xlsx'       : 'libs/ammap3/ammap/plugins/export/libs/xlsx/xlsx.min'
    },
    shim: {
        'libs/angular/angular.min' : { deps : ['jquery'] },
        'angular'              : { deps : ['libs/angular/angular.min'] },
        'ngRoute'              : { deps : ['angular'] },
        'ngCookies'            : { deps : ['angular'] },
        'ngAnimate'            : { deps : ['angular'] },
        'bootstrap'            : { deps : ['jquery' ] },
        'moment'               : { deps: ['jquery' ] },
        'ammap3WorldHigh'      : { deps: ['ammap3'] },
        'ammap-theme'          : { deps: ['ammap3']},
        'ammap-resp'           : { deps: ['ammap3']},
        'ammap-export'         : { deps: ['ammap3']},
    }
});

// BOOT

require(['angular', 'app', 'bootstrap', 'js/apps/national-reports/routes', 'views/reports/template'], function(ng, app) {

        ng.element(document).ready(function(){
            ng.bootstrap(document, [app.name]);
        });
});

// MISC

//==================================================
// Protect window.console method calls, e.g. console is not defined on IE
// unless dev tools are open, and IE doesn't define console.debug
//==================================================
(function fixIEConsole() { 'use strict';

    if (!window.console) {
        window.console = {};
    }

    var methods = ["log", "info", "warn", "error", "debug", "trace", "dir", "group","groupCollapsed", "groupEnd", "time", "timeEnd", "profile", "profileEnd", "dirxml", "assert", "count", "markTimeline", "timeStamp", "clear"];
    var noop    = function() {};

    for(var i = 0; i < methods.length; i++) {
        if (!window.console[methods[i]])
            window.console[methods[i]] = noop;
    }
})();

@@ -197,24 +197,81 @@
 angular'    
+     : 'libs/angular/angular.min',%0A        'angular-flex'
     : 'libs/
@@ -298,16 +298,16 @@
 -flex',%0A
-
         
@@ -499,32 +499,106 @@
 r-animate.min',%0A
+        'ngSanitize'      : 'libs/angular-sanitize/angular-sanitize.min',%0A
         'async' 
@@ -933,16 +933,78 @@
 sh.min',
+%0A        'angular-flex'    : 'libs/angular-flex/angular-flex',
 %0A%0A      
@@ -1945,33 +1945,29 @@
    '
-libs/angular/angular.min'
+angular'             
  : %7B
@@ -1984,16 +1984,36 @@
 jquery'%5D
+, exports: 'angular'
  %7D,%0A    
@@ -2016,34 +2016,38 @@
         'angular
+-flex
 '
- 
              : %7B
@@ -2031,36 +2031,32 @@
 r-flex'         
-    
 : %7B deps : %5B'lib
@@ -2056,32 +2056,25 @@
 : %5B'
-libs/
 angular
-/angular.min
+', 'jquery
 '%5D %7D
@@ -2118,32 +2118,37 @@
 deps : %5B'angular
+-flex
 '%5D %7D,%0A        'n
@@ -2180,32 +2180,37 @@
 deps : %5B'angular
+-flex
 '%5D %7D,%0A        'n
@@ -2250,16 +2250,21 @@
 'angular
+-flex
 '%5D %7D,%0A  

change boot order based on library changes