Enabled CORS
Fetching info from L-XOS
Change-Id: I6293f15adeb7716cc31499b18d35bdedf8f7cde1
diff --git a/containers/xos/pip_requirements.txt b/containers/xos/pip_requirements.txt
index 6006928..8e2ae4d 100644
--- a/containers/xos/pip_requirements.txt
+++ b/containers/xos/pip_requirements.txt
@@ -26,6 +26,7 @@
debtcollector==1.8.0
decorator==4.0.10
django-bitfield==1.8.0
+django-cors-headers==1.2.0
django-crispy-forms==1.6.0
django-encrypted-fields==1.1.2
django-extensions==1.7.3
diff --git a/views/ngXosViews/globalXos/.bowerrc b/views/ngXosViews/globalXos/.bowerrc
new file mode 100644
index 0000000..e491038
--- /dev/null
+++ b/views/ngXosViews/globalXos/.bowerrc
@@ -0,0 +1,3 @@
+{
+ "directory": "src/vendor/"
+}
\ No newline at end of file
diff --git a/views/ngXosViews/globalXos/.eslintrc b/views/ngXosViews/globalXos/.eslintrc
new file mode 100644
index 0000000..c852748
--- /dev/null
+++ b/views/ngXosViews/globalXos/.eslintrc
@@ -0,0 +1,42 @@
+{
+ "ecmaFeatures": {
+ "blockBindings": true,
+ "forOf": true,
+ "destructuring": true,
+ "arrowFunctions": true,
+ "templateStrings": true
+ },
+ "env": {
+ "browser": true,
+ "node": true,
+ "es6": true
+ },
+ "plugins": [
+ //"angular"
+ ],
+ "rules": {
+ "quotes": [2, "single"],
+ "camelcase": [1, {"properties": "always"}],
+ "no-underscore-dangle": 1,
+ "eqeqeq": [2, "smart"],
+ "no-alert": 1,
+ "key-spacing": [1, { "beforeColon": false, "afterColon": true }],
+ "indent": [2, 2],
+ "no-irregular-whitespace": 1,
+ "eol-last": 0,
+ "max-nested-callbacks": [2, 4],
+ "comma-spacing": [1, {"before": false, "after": true}],
+ "no-trailing-spaces": [1, { skipBlankLines: true }],
+ "no-unused-vars": [1, {"vars": "all", "args": "after-used"}],
+ "new-cap": 0,
+
+ //"angular/ng_module_name": [2, '/^xos\.*[a-z]*$/'],
+ //"angular/ng_controller_name": [2, '/^[a-z].*Ctrl$/'],
+ //"angular/ng_service_name": [2, '/^[A-Z].*Service$/'],
+ //"angular/ng_directive_name": [2, '/^[a-z]+[[A-Z].*]*$/'],
+ //"angular/ng_di": [0, "function or array"]
+ },
+ "globals" :{
+ "angular": true
+ }
+}
\ No newline at end of file
diff --git a/views/ngXosViews/globalXos/.gitignore b/views/ngXosViews/globalXos/.gitignore
new file mode 100644
index 0000000..567aee4
--- /dev/null
+++ b/views/ngXosViews/globalXos/.gitignore
@@ -0,0 +1,6 @@
+dist/
+src/vendor
+.tmp
+node_modules
+npm-debug.log
+dist/
\ No newline at end of file
diff --git a/views/ngXosViews/globalXos/README.md b/views/ngXosViews/globalXos/README.md
new file mode 100644
index 0000000..b8044ad
--- /dev/null
+++ b/views/ngXosViews/globalXos/README.md
@@ -0,0 +1,21 @@
+# Global XOS View
+
+To onboard this view, use:
+```
+# You can use this recipe to load the dashboard in the system:
+GlobalXos:
+ type: tosca.nodes.DashboardView
+ properties:
+ url: template:xosGlobalXos
+
+# And this recipe to activate the dashboard for a user:
+padmin@vicci.org:
+ type: tosca.nodes.User
+ properties:
+ no-create: true
+ no-delete: true
+ requirements:
+ - globalXos_dashboard:
+ node: GlobalXos
+ relationship: tosca.relationships.UsesDashboard
+```
\ No newline at end of file
diff --git a/views/ngXosViews/globalXos/bower.json b/views/ngXosViews/globalXos/bower.json
new file mode 100644
index 0000000..1f7c07a
--- /dev/null
+++ b/views/ngXosViews/globalXos/bower.json
@@ -0,0 +1,35 @@
+{
+ "name": "xos-globalXos",
+ "version": "0.0.0",
+ "authors": [
+ "Matteo Scandolo <matteo.scandolo@gmail.com>"
+ ],
+ "description": "The globalXos view",
+ "license": "Apache-2.0",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "static/js/vendor/",
+ "test",
+ "tests"
+ ],
+ "dependencies": {
+ "angular-bootstrap": "~2.2.0"
+ },
+ "devDependencies": {
+ "jquery": "2.1.4",
+ "angular-mocks": "1.4.7",
+ "angular": "1.4.7",
+ "angular-ui-router": "0.2.15",
+ "angular-cookies": "1.4.7",
+ "angular-animate": "1.4.7",
+ "angular-resource": "1.4.7",
+ "lodash": "~4.11.1",
+ "bootstrap-css": "3.3.6",
+ "angular-chart.js": "~0.10.2",
+ "d3": "~3.5.17",
+ "angular-recursion": "~1.0.5",
+ "ng-xos-lib": "opencord/ng-xos-lib#~1.0.0"
+ }
+}
diff --git a/views/ngXosViews/globalXos/gulp/build.js b/views/ngXosViews/globalXos/gulp/build.js
new file mode 100644
index 0000000..e53042c
--- /dev/null
+++ b/views/ngXosViews/globalXos/gulp/build.js
@@ -0,0 +1,227 @@
+'use strict';
+
+// BUILD
+//
+// The only purpose of this gulpfile is to build a XOS view and copy the correct files into
+// .html => dashboards
+// .js (minified and concat) => static/js
+//
+// The template are parsed and added to js with angular $templateCache
+
+var gulp = require('gulp');
+var ngAnnotate = require('gulp-ng-annotate');
+var uglify = require('gulp-uglify');
+var templateCache = require('gulp-angular-templatecache');
+var runSequence = require('run-sequence');
+var concat = require('gulp-concat-util');
+var del = require('del');
+var wiredep = require('wiredep');
+var angularFilesort = require('gulp-angular-filesort');
+var _ = require('lodash');
+var eslint = require('gulp-eslint');
+var inject = require('gulp-inject');
+var rename = require('gulp-rename');
+var replace = require('gulp-replace');
+var postcss = require('gulp-postcss');
+var autoprefixer = require('autoprefixer');
+var mqpacker = require('css-mqpacker');
+var csswring = require('csswring');
+var yaml = require('js-yaml');
+var colors = require('colors/safe');
+var fs = require('fs');
+
+const TEMPLATE_FOOTER = `
+angular.module('xos.globalXos')
+.run(['$location', function(a){
+ a.path('/');
+}])
+`
+
+module.exports = function(options){
+
+ // delete previous builded file
+ gulp.task('clean', function(){
+ return del(
+ [
+ options.dashboards + 'xosGlobalXos.html',
+ options.static + 'css/xosGlobalXos.css',
+ options.static + 'images/globalXos-icon.png',
+ options.static + 'images/globalXos-icon-active.png'
+ ],
+ {force: true}
+ );
+ });
+
+ // minify css
+ gulp.task('css', function () {
+ var processors = [
+ autoprefixer({browsers: ['last 1 version']}),
+ mqpacker,
+ csswring
+ ];
+
+ gulp.src([
+ `${options.css}**/*.css`,
+ `!${options.css}dev.css`
+ ])
+ .pipe(postcss(processors))
+ .pipe(gulp.dest(options.tmp + '/css/'));
+ });
+
+ // copy css in correct folder
+ gulp.task('copyCss', ['wait'], function(){
+ return gulp.src([`${options.tmp}/css/*.css`])
+ .pipe(concat('xosGlobalXos.css'))
+ .pipe(gulp.dest(options.static + 'css/'))
+ });
+
+ // copy images in correct folder
+ gulp.task('copyImages', ['wait'], function(){
+ return gulp.src([`${options.icon}/globalXos-icon.png`, `${options.icon}/globalXos-icon-active.png`])
+ .pipe(gulp.dest(options.static + 'images/'))
+ });
+
+ // compile and minify scripts
+ gulp.task('scripts', function() {
+ return gulp.src([
+ options.tmp + '**/*.js'
+ ])
+ .pipe(ngAnnotate())
+ .pipe(angularFilesort())
+ .pipe(concat('xosGlobalXos.js'))
+ .pipe(concat.header('//Autogenerated, do not edit!!!\n'))
+ .pipe(concat.footer(TEMPLATE_FOOTER))
+ .pipe(uglify())
+ .pipe(gulp.dest(options.static + 'js/'));
+ });
+
+ // set templates in cache
+ gulp.task('templates', function(){
+ return gulp.src('./src/templates/*.html')
+ .pipe(templateCache({
+ module: 'xos.globalXos',
+ root: 'templates/'
+ }))
+ .pipe(gulp.dest(options.tmp));
+ });
+
+ // copy html index to Django Folder
+ gulp.task('copyHtml', function(){
+ return gulp.src(options.src + 'index.html')
+ // remove dev dependencies from html
+ .pipe(replace(/<!-- bower:css -->(\n^<link.*)*\n<!-- endbower -->/gmi, ''))
+ .pipe(replace(/<!-- bower:js -->(\n^<script.*)*\n<!-- endbower -->/gmi, ''))
+ // injecting minified files
+ .pipe(
+ inject(
+ gulp.src([
+ options.static + 'vendor/xosGlobalXosVendor.js',
+ options.static + 'js/xosGlobalXos.js',
+ options.static + 'css/xosGlobalXos.css'
+ ]),
+ {ignorePath: '/../../../xos/core/xoslib'}
+ )
+ )
+ .pipe(rename('xosGlobalXos.html'))
+ .pipe(gulp.dest(options.dashboards));
+ });
+
+ // minify vendor js files
+ gulp.task('wiredep', function(){
+ var bowerDeps = wiredep().js;
+ if(!bowerDeps){
+ return;
+ }
+
+ // remove angular (it's already loaded)
+ _.remove(bowerDeps, function(dep){
+ return dep.indexOf('angular/angular.js') !== -1;
+ });
+
+ return gulp.src(bowerDeps)
+ .pipe(concat('xosGlobalXosVendor.js'))
+ .pipe(uglify())
+ .pipe(gulp.dest(options.static + 'vendor/'));
+ });
+
+ gulp.task('lint', function () {
+ return gulp.src(['src/js/**/*.js'])
+ .pipe(eslint())
+ .pipe(eslint.format())
+ .pipe(eslint.failAfterError());
+ });
+
+ gulp.task('wait', function (cb) {
+ // setTimeout could be any async task
+ setTimeout(function () {
+ cb();
+ }, 1000);
+ });
+
+ gulp.task('tosca', function (cb) {
+
+ // TOSCA to register the dashboard in the system
+ const dashboardJson = {};
+ dashboardJson['GlobalXos'] = {
+ type: 'tosca.nodes.DashboardView',
+ properties: {
+ url: 'template:xosGlobalXos'
+ }
+ };
+
+ // check for custom icons
+ if(
+ fs.existsSync(`${options.icon}/globalXos-icon.png`) &&
+ fs.existsSync(`${options.icon}/globalXos-icon-active.png`)
+ ){
+ dashboardJson['GlobalXos'].properties.custom_icon = true;
+ }
+
+ const dashboardTosca = yaml.dump(dashboardJson).replace(/'/gmi, '');
+
+ // TOSCA to add the dashboard to the user
+ const userDashboardJson = {};
+ userDashboardJson['globalXos_dashboard'] = {
+ node: 'GlobalXos',
+ relationship: 'tosca.relationships.UsesDashboard'
+ };
+ const userJson = {
+ 'padmin@vicci.org': {
+ type: 'tosca.nodes.User',
+ properties: {
+ 'no-create': true,
+ 'no-delete': true
+ },
+ requirements: [userDashboardJson]
+ }
+ };
+ const userTosca = yaml.dump(userJson).replace(/'/gmi, '');
+
+
+ // the output is in a timeout so that it get printed after the gulp logs
+ setTimeout(function () {
+ console.log(colors.cyan('\n\n# You can use this recipe to load the dashboard in the system:'));
+ console.log(colors.yellow(dashboardTosca));
+ console.log(colors.cyan('# And this recipe to activate the dashboard for a user:'));
+ console.log(colors.yellow(userTosca));
+ }, 1000);
+ cb();
+ });
+
+ gulp.task('build', function() {
+ runSequence(
+ 'clean',
+ 'sass',
+ 'templates',
+ 'babel',
+ 'scripts',
+ 'wiredep',
+ 'css',
+ 'copyCss',
+ 'copyImages',
+ 'copyHtml',
+ 'cleanTmp',
+ 'tosca'
+ );
+ });
+};
\ No newline at end of file
diff --git a/views/ngXosViews/globalXos/gulp/server.js b/views/ngXosViews/globalXos/gulp/server.js
new file mode 100644
index 0000000..36fdded
--- /dev/null
+++ b/views/ngXosViews/globalXos/gulp/server.js
@@ -0,0 +1,169 @@
+'use strict';
+
+var gulp = require('gulp');
+var browserSync = require('browser-sync').create();
+var inject = require('gulp-inject');
+var runSequence = require('run-sequence');
+var angularFilesort = require('gulp-angular-filesort');
+var babel = require('gulp-babel');
+var wiredep = require('wiredep').stream;
+var httpProxy = require('http-proxy');
+var del = require('del');
+var sass = require('gulp-sass');
+var fs = require('fs');
+var path = require('path');
+
+const environment = process.env.NODE_ENV;
+
+if(!fs.existsSync(path.join(__dirname, `../../../env/${environment || 'default'}.js`))){
+ if(!environment){
+ throw new Error('You should define a default.js config in /views/env folder.');
+ }
+ else{
+ throw new Error(`Since you are loading a custom environment, you should define a ${environment}.js config in /views/env folder.`);
+ }
+}
+
+var conf = require(path.join(__dirname, `../../../env/${environment || 'default'}.js`));
+
+var proxy = httpProxy.createProxyServer({
+ target: conf.host
+});
+
+
+proxy.on('error', function(error, req, res) {
+ res.writeHead(500, {
+ 'Content-Type': 'text/plain'
+ });
+
+ console.error('[Proxy]', error);
+});
+
+module.exports = function(options){
+
+ gulp.task('browser', function() {
+ browserSync.init({
+ startPath: '#/',
+ snippetOptions: {
+ rule: {
+ match: /<!-- browserSync -->/i
+ }
+ },
+ server: {
+ baseDir: options.src,
+ routes: {
+ '/xos/core/static': options.static + '../../static/'
+ },
+ middleware: function(req, res, next){
+ if(
+ req.url.indexOf('/api/') !== -1
+ ){
+ if(conf.xoscsrftoken && conf.xossessionid){
+ req.headers.cookie = `xoscsrftoken=${conf.xoscsrftoken}; xossessionid=${conf.xossessionid}`;
+ req.headers['x-csrftoken'] = conf.xoscsrftoken;
+ }
+ proxy.web(req, res);
+ }
+ else{
+ next();
+ }
+ }
+ }
+ });
+
+ gulp.watch(options.src + 'js/**/*.js', ['js-watch']);
+ gulp.watch(options.src + 'vendor/**/*.js', ['bower'], function(){
+ browserSync.reload();
+ });
+ gulp.watch(options.src + '**/*.html', function(){
+ browserSync.reload();
+ });
+ gulp.watch(options.css + '**/*.css', function(){
+ browserSync.reload();
+ });
+ gulp.watch(`${options.sass}/**/*.scss`, ['sass'], function(){
+ browserSync.reload();
+ });
+
+ gulp.watch([
+ options.helpers + 'ngXosHelpers.js',
+ options.static + '../../static/xosNgLib.css'
+ ], function(){
+ browserSync.reload();
+ });
+ });
+
+ // compile sass
+ gulp.task('sass', function () {
+ return gulp.src(`${options.sass}/**/*.scss`)
+ .pipe(sass().on('error', sass.logError))
+ .pipe(gulp.dest(options.css));
+ });
+
+ // transpile js with sourceMaps
+ gulp.task('babel', function(){
+ return gulp.src(options.scripts + '**/*.js')
+ .pipe(babel({sourceMaps: true}))
+ .pipe(gulp.dest(options.tmp));
+ });
+
+ // inject scripts
+ gulp.task('injectScript', ['cleanTmp', 'babel'], function(){
+ return gulp.src(options.src + 'index.html')
+ .pipe(
+ inject(
+ gulp.src([
+ options.tmp + '**/*.js',
+ options.helpers + 'ngXosHelpers.min.js'
+ ])
+ .pipe(angularFilesort()),
+ {
+ ignorePath: [options.src, '/../../ngXosLib']
+ }
+ )
+ )
+ .pipe(gulp.dest(options.src));
+ });
+
+ // inject CSS
+ gulp.task('injectCss', function(){
+ return gulp.src(options.src + 'index.html')
+ .pipe(
+ inject(
+ gulp.src([
+ options.src + 'css/*.css',
+ options.static + '../../static/xosNgLib.css'
+ ]),
+ {
+ ignorePath: [options.src]
+ }
+ )
+ )
+ .pipe(gulp.dest(options.src));
+ });
+
+ // inject bower dependencies with wiredep
+ gulp.task('bower', function () {
+ return gulp.src(options.src + 'index.html')
+ .pipe(wiredep({devDependencies: true}))
+ .pipe(gulp.dest(options.src));
+ });
+
+ gulp.task('js-watch', ['injectScript'], function(){
+ browserSync.reload();
+ });
+
+ gulp.task('cleanTmp', function(){
+ return del([options.tmp + '**/*']);
+ });
+
+ gulp.task('serve', function() {
+ runSequence(
+ 'sass',
+ 'bower',
+ 'injectScript',
+ 'injectCss',
+ ['browser']
+ );
+ });
+};
diff --git a/views/ngXosViews/globalXos/gulpfile.js b/views/ngXosViews/globalXos/gulpfile.js
new file mode 100644
index 0000000..c825df8
--- /dev/null
+++ b/views/ngXosViews/globalXos/gulpfile.js
@@ -0,0 +1,27 @@
+'use strict';
+
+var gulp = require('gulp');
+var wrench = require('wrench');
+
+var options = {
+ src: 'src/',
+ css: 'src/css/',
+ icon: 'src/icons',
+ sass: 'src/sass/',
+ scripts: 'src/js/',
+ tmp: 'src/.tmp',
+ dist: 'dist/',
+ api: '../../ngXosLib/api/',
+ helpers: './src/vendor/ng-xos-lib/dist/',
+ static: '../../../xos/core/xoslib/static/', // this is the django static folder
+ dashboards: '../../../xos/core/xoslib/dashboards/' // this is the django html folder
+};
+
+wrench.readdirSyncRecursive('./gulp')
+.map(function(file) {
+ require('./gulp/' + file)(options);
+});
+
+gulp.task('default', function () {
+ gulp.start('build');
+});
diff --git a/views/ngXosViews/globalXos/karma.conf.js b/views/ngXosViews/globalXos/karma.conf.js
new file mode 100644
index 0000000..e5abf39
--- /dev/null
+++ b/views/ngXosViews/globalXos/karma.conf.js
@@ -0,0 +1,90 @@
+// Karma configuration
+// Generated on Tue Oct 06 2015 09:27:10 GMT+0000 (UTC)
+
+/* eslint indent: [2,2], quotes: [2, "single"]*/
+
+/*eslint-disable*/
+var wiredep = require('wiredep');
+var path = require('path');
+
+var bowerComponents = wiredep( {devDependencies: true} )[ 'js' ].map(function( file ){
+ return path.relative(process.cwd(), file);
+});
+
+module.exports = function(config) {
+/*eslint-enable*/
+ config.set({
+
+ // base path that will be used to resolve all patterns (eg. files, exclude)
+ basePath: '',
+
+
+ // frameworks to use
+ // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
+ frameworks: ['jasmine'],
+
+
+ // list of files / patterns to load in the browser
+ files: bowerComponents.concat([
+ './src/vendor/ng-xos-lib/dist/ngXosVendor.min.js',
+ './src/vendor/ng-xos-lib/dist/ngXosHelpers.min.js',
+ 'src/js/main.js',
+ 'src/js/**/*.js',
+ 'spec/**/*.mock.js',
+ 'spec/**/*.test.js',
+ 'src/**/*.html'
+ ]),
+
+
+ // list of files to exclude
+ exclude: [
+ ],
+
+
+ // preprocess matching files before serving them to the browser
+ // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
+ preprocessors: {
+ 'src/js/**/*.js': ['babel'],
+ 'spec/**/*.test.js': ['babel'],
+ 'spec/**/*.mock.js': ['babel'],
+ 'src/**/*.html': ['ng-html2js']
+ },
+
+ ngHtml2JsPreprocessor: {
+ stripPrefix: 'src/', //strip the src path from template url (http://stackoverflow.com/questions/22869668/karma-unexpected-request-when-testing-angular-directive-even-with-ng-html2js)
+ moduleName: 'templates' // define the template module name
+ },
+
+ // test results reporter to use
+ // possible values: 'dots', 'progress'
+ // available reporters: https://npmjs.org/browse/keyword/karma-reporter
+ reporters: ['mocha'],
+
+
+ // web server port
+ port: 9876,
+
+
+ // enable / disable colors in the output (reporters and logs)
+ colors: true,
+
+
+ // level of logging
+ // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
+ logLevel: config.LOG_INFO,
+
+
+ // enable / disable watching file and executing tests whenever any file changes
+ autoWatch: true,
+
+
+ // start these browsers
+ // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
+ browsers: ['PhantomJS'],
+
+
+ // Continuous Integration mode
+ // if true, Karma captures browsers, runs the tests and exits
+ singleRun: false
+ });
+};
diff --git a/views/ngXosViews/globalXos/mock-cfg.json b/views/ngXosViews/globalXos/mock-cfg.json
new file mode 100644
index 0000000..d48ce51
--- /dev/null
+++ b/views/ngXosViews/globalXos/mock-cfg.json
@@ -0,0 +1,14 @@
+{
+ "endpoints": [
+ {
+ "url": "controllers",
+ "base": "api/core/",
+ "methods": ["GET"]
+ },
+ {
+ "url": "slices",
+ "base": "api/core/",
+ "methods": ["GET"]
+ }
+ ]
+}
diff --git a/views/ngXosViews/globalXos/mocks/controllers.json b/views/ngXosViews/globalXos/mocks/controllers.json
new file mode 100644
index 0000000..16afd85
--- /dev/null
+++ b/views/ngXosViews/globalXos/mocks/controllers.json
@@ -0,0 +1,38 @@
+[
+ {
+ "humanReadableName": "CloudLab OpenStack Juno",
+ "id": 1,
+ "name": "CloudLab",
+ "backend_type": "OpenStack",
+ "version": "Juno",
+ "auth_url": "http://sample/v2",
+ "admin_user": "admin",
+ "admin_password": "adminpassword",
+ "admin_tenant": "admin",
+ "domain": "Default"
+ },
+ {
+ "humanReadableName": "Local XOS 1",
+ "id": 1,
+ "name": "Local XOS 1",
+ "backend_type": "XOS",
+ "version": "1.0",
+ "auth_url": "http://xos.dev:9999/",
+ "admin_user": "padmin@vicci.org",
+ "admin_password": "letmein",
+ "admin_tenant": "admin",
+ "domain": "Default"
+ },
+ {
+ "humanReadableName": "Local XOS 2",
+ "id": 2,
+ "name": "Local XOS 2",
+ "backend_type": "XOS",
+ "version": "1.0",
+ "auth_url": "http://c220g2-011001.wisc.cloudlab.us:9999/",
+ "admin_user": "padmin@vicci.org",
+ "admin_password": "letmein",
+ "admin_tenant": "admin",
+ "domain": "Default"
+ }
+]
\ No newline at end of file
diff --git a/views/ngXosViews/globalXos/mocks/slices.json b/views/ngXosViews/globalXos/mocks/slices.json
new file mode 100644
index 0000000..a314e2a
--- /dev/null
+++ b/views/ngXosViews/globalXos/mocks/slices.json
@@ -0,0 +1,35 @@
+[
+ {
+ "humanReadableName": "arizona_test",
+ "id": 1,
+ "created": "2016-10-21T08:29:16.204941Z",
+ "updated": "2016-10-26T12:37:32.146751Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "name": "arizona_test",
+ "enabled": true,
+ "omf_friendly": false,
+ "description": "",
+ "slice_url": "",
+ "site": 1,
+ "max_instances": 10,
+ "service": null,
+ "network": null,
+ "exposed_ports": null,
+ "serviceClass": 1,
+ "creator": 1,
+ "default_flavor": null,
+ "default_image": null,
+ "default_node": null,
+ "mount_data_sets": "GenBank",
+ "default_isolation": "vm",
+ "networks": []
+ }
+]
\ No newline at end of file
diff --git a/views/ngXosViews/globalXos/package.json b/views/ngXosViews/globalXos/package.json
new file mode 100644
index 0000000..167ea52
--- /dev/null
+++ b/views/ngXosViews/globalXos/package.json
@@ -0,0 +1,67 @@
+{
+ "name": "xos-globalXos",
+ "version": "1.0.0",
+ "description": "Angular Application for XOS, created with generator-xos",
+ "scripts": {
+ "prestart": "npm install && bower install",
+ "start": "gulp serve",
+ "tosca": "gulp tosca",
+ "prebuild": "npm install && bower install",
+ "build": "gulp",
+ "test": "karma start",
+ "test:ci": "karma start --single-run",
+ "mock": "easy-mocker -c mock-cfg.json -d mocks/",
+ "lint": "eslint src/js/"
+ },
+ "keywords": [
+ "XOS",
+ "Angular",
+ "XOSlib"
+ ],
+ "author": "Matteo Scandolo",
+ "license": "Apache-2.0",
+ "dependencies": {},
+ "devDependencies": {
+ "autoprefixer": "^6.3.3",
+ "browser-sync": "^2.9.11",
+ "colors": "^1.1.2",
+ "css-mqpacker": "^4.0.0",
+ "csswring": "^4.2.1",
+ "del": "^2.0.2",
+ "easy-mocker": "^1.3.1",
+ "eslint": "^1.8.0",
+ "eslint-plugin-angular": "linkmesrl/eslint-plugin-angular",
+ "gulp": "^3.9.0",
+ "gulp-angular-filesort": "^1.1.1",
+ "gulp-angular-templatecache": "^1.8.0",
+ "gulp-babel": "^5.3.0",
+ "gulp-concat": "^2.6.0",
+ "gulp-concat-util": "^0.5.5",
+ "gulp-eslint": "^1.0.0",
+ "gulp-inject": "^3.0.0",
+ "gulp-minify-html": "^1.0.4",
+ "gulp-ng-annotate": "^1.1.0",
+ "gulp-postcss": "^6.0.1",
+ "gulp-rename": "^1.2.2",
+ "gulp-replace": "^0.5.4",
+ "gulp-sass": "^2.2.0",
+ "gulp-uglify": "^1.4.2",
+ "http-proxy": "^1.12.0",
+ "ink-docstrap": "^0.5.2",
+ "jasmine-core": "~2.3.4",
+ "js-yaml": "^3.6.1",
+ "karma": "^0.13.14",
+ "karma-babel-preprocessor": "~5.2.2",
+ "karma-coverage": "^0.5.3",
+ "karma-jasmine": "~0.3.6",
+ "karma-mocha-reporter": "~1.1.1",
+ "karma-ng-html2js-preprocessor": "^0.2.0",
+ "karma-phantomjs-launcher": "~0.2.1",
+ "lodash": "^3.10.1",
+ "phantomjs": "^1.9.19",
+ "proxy-middleware": "^0.15.0",
+ "run-sequence": "^1.1.4",
+ "wiredep": "^3.0.0-beta",
+ "wrench": "^1.5.8"
+ }
+}
diff --git a/views/ngXosViews/globalXos/spec/sample.test.js b/views/ngXosViews/globalXos/spec/sample.test.js
new file mode 100644
index 0000000..6f21d7c
--- /dev/null
+++ b/views/ngXosViews/globalXos/spec/sample.test.js
@@ -0,0 +1,37 @@
+'use strict';
+
+describe('The User List', () => {
+
+ var scope, element, isolatedScope, httpBackend;
+
+ beforeEach(module('xos.globalXos'));
+ beforeEach(module('templates'));
+
+ beforeEach(inject(function($httpBackend, $compile, $rootScope){
+
+ httpBackend = $httpBackend;
+ // Setting up mock request
+ $httpBackend.expectGET('/api/core/users/?no_hyperlinks=1').respond([
+ {
+ email: 'matteo.scandolo@gmail.com',
+ firstname: 'Matteo',
+ lastname: 'Scandolo'
+ }
+ ]);
+
+ scope = $rootScope.$new();
+ element = angular.element('<users-list></users-list>');
+ $compile(element)(scope);
+ scope.$digest();
+ isolatedScope = element.isolateScope().vm;
+ }));
+
+ it('should load 1 users', () => {
+ httpBackend.flush();
+ expect(isolatedScope.users.length).toBe(1);
+ expect(isolatedScope.users[0].email).toEqual('matteo.scandolo@gmail.com');
+ expect(isolatedScope.users[0].firstname).toEqual('Matteo');
+ expect(isolatedScope.users[0].lastname).toEqual('Scandolo');
+ });
+
+});
\ No newline at end of file
diff --git a/views/ngXosViews/globalXos/src/css/dev.css b/views/ngXosViews/globalXos/src/css/dev.css
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/views/ngXosViews/globalXos/src/css/dev.css
diff --git a/views/ngXosViews/globalXos/src/css/main.css b/views/ngXosViews/globalXos/src/css/main.css
new file mode 100644
index 0000000..be8d4bf
--- /dev/null
+++ b/views/ngXosViews/globalXos/src/css/main.css
@@ -0,0 +1,7 @@
+#xosGlobalXos ui-view,
+#xosGlobalXos xos-list {
+ display: block; }
+
+#xosGlobalXos .well.active {
+ background: #337ab7;
+ color: #fff; }
diff --git a/views/ngXosViews/globalXos/src/icons/README.md b/views/ngXosViews/globalXos/src/icons/README.md
new file mode 100644
index 0000000..0d5a787
--- /dev/null
+++ b/views/ngXosViews/globalXos/src/icons/README.md
@@ -0,0 +1,18 @@
+# Set icon for custom dashboard
+
+## Path to add images : <dashboard-name>/src/icons
+
+### Add two images with name in following format
+ <dashboard-name>-icon.png
+ <dashboard-name>-icon-active.png
+
+Examples:
+ If your dashboard name is `slice`
+ then you will add the images with the name as
+ `slice-icon.png`
+ `slice-icon-active.png`
+
+
+
+
+Note: If you don't add the custom images, then dashboard will use the default images stored at `/xos/core/xoslib/static/images`
\ No newline at end of file
diff --git a/views/ngXosViews/globalXos/src/index.html b/views/ngXosViews/globalXos/src/index.html
new file mode 100644
index 0000000..4f2206e
--- /dev/null
+++ b/views/ngXosViews/globalXos/src/index.html
@@ -0,0 +1,38 @@
+<!-- browserSync -->
+<!-- bower:css -->
+<link rel="stylesheet" href="vendor/bootstrap-css/css/bootstrap.min.css" />
+<link rel="stylesheet" href="vendor/angular-chart.js/dist/angular-chart.css" />
+<!-- endbower -->
+<!-- endcss -->
+<!-- inject:css -->
+<link rel="stylesheet" href="/css/dev.css">
+<link rel="stylesheet" href="/css/main.css">
+<link rel="stylesheet" href="/../../../xos/core/static/xosNgLib.css">
+<!-- endinject -->
+
+<div ng-app="xos.globalXos" id="xosGlobalXos" class="container-fluid">
+ <div ui-view></div>
+</div>
+
+<!-- bower:js -->
+<script src="vendor/angular/angular.js"></script>
+<script src="vendor/angular-bootstrap/ui-bootstrap-tpls.js"></script>
+<script src="vendor/jquery/dist/jquery.js"></script>
+<script src="vendor/angular-mocks/angular-mocks.js"></script>
+<script src="vendor/angular-ui-router/release/angular-ui-router.js"></script>
+<script src="vendor/angular-cookies/angular-cookies.js"></script>
+<script src="vendor/angular-animate/angular-animate.js"></script>
+<script src="vendor/angular-resource/angular-resource.js"></script>
+<script src="vendor/lodash/lodash.js"></script>
+<script src="vendor/bootstrap-css/js/bootstrap.min.js"></script>
+<script src="vendor/Chart.js/Chart.js"></script>
+<script src="vendor/angular-chart.js/dist/angular-chart.js"></script>
+<script src="vendor/d3/d3.js"></script>
+<script src="vendor/angular-recursion/angular-recursion.js"></script>
+<!-- endbower -->
+<!-- endjs -->
+<!-- inject:js -->
+<script src="/vendor/ng-xos-lib/dist/ngXosHelpers.min.js"></script>
+<script src="/.tmp/main.js"></script>
+<script src="/.tmp/rest.js"></script>
+<!-- endinject -->
\ No newline at end of file
diff --git a/views/ngXosViews/globalXos/src/js/main.js b/views/ngXosViews/globalXos/src/js/main.js
new file mode 100644
index 0000000..b512ad4
--- /dev/null
+++ b/views/ngXosViews/globalXos/src/js/main.js
@@ -0,0 +1,360 @@
+'use strict';
+
+angular.module('xos.globalXos', [
+ 'ngResource',
+ 'ngCookies',
+ 'ui.router',
+ 'xos.helpers',
+ 'ui.bootstrap.modal',
+ 'ui.bootstrap.tpls'
+])
+.config(($stateProvider) => {
+ $stateProvider
+ .state('xos-list', {
+ url: '/',
+ template: '<xos-list></xos-list>'
+ });
+})
+.config(function($httpProvider){
+ $httpProvider.interceptors.push('NoHyperlinks');
+})
+.value('LXOS', [])
+.directive('xosList', function(){
+ return {
+ restrict: 'E',
+ scope: {},
+ bindToController: true,
+ controllerAs: 'vm',
+ templateUrl: 'templates/xos-list.tpl.html',
+ controller: function($window, $q, _, Controllers, LXOS, LocalAuth, LocalSlices, LocalUsers, $uibModal, Slices){
+ const self = this;
+ $q.all([
+ Controllers.query({backend_type: 'XOS'}).$promise,
+ Slices.query().$promise // NOTE why this is queryFromAll??
+ ])
+ .then(res => {
+ [this.xoss, this.gSlices] = res;
+ });
+
+ this.openLocally = (itemKind) => {
+ return (item) => {
+ $window.open(`${item.xos.auth_url}admin/core/${itemKind}/${item.id}`, '_blank');
+ }
+ };
+
+ const baseSliceCols = [
+ {
+ label: 'Name',
+ prop: 'name',
+ },
+ {
+ label: 'Mount Data Sets',
+ prop: 'mount_data_sets'
+ }
+ ];
+
+ const lXosSliceCols = [
+ {
+ label: 'Max Instances',
+ prop: 'max_instances'
+ },
+ {
+ label: 'Instances',
+ prop: 'instance_total'
+ },
+ {
+ label: 'L-XOS',
+ type: 'custom',
+ formatter: item => item.xos.name
+ }
+ ];
+
+ this.gSliceTableCgf = {
+ columns: baseSliceCols,
+ filter: 'field',
+ order: true,
+ actions: [
+ {
+ label: 'Get Instances',
+ icon: 'search',
+ cb: (item) => {
+ $uibModal.open({
+ animation: true,
+ size: 'lg',
+ templateUrl: 'listInstances.html',
+ controllerAs: 'vm',
+ resolve: {
+ slice: function () {
+ return {
+ name: item.name,
+ xos: {
+ name: 'G-XOS'
+ }
+ };
+ }
+ },
+ controller: function($uibModalInstance, slice, LocalInstances, LocalSlices) {
+ this.slice = slice;
+
+ this.config = {
+ columns: [
+ {
+ label: 'Name',
+ prop: 'name',
+ }
+ ]
+ };
+
+ LocalSlices.queryFromAll(self.xoss).$promise
+ .then(slices => {
+ // keep only the slice that match the name
+ this.slicesId = slices
+ .filter(s => s.name.indexOf(this.slice.name) > -1)
+ .reduce((o, s) => {
+ o[s.xos.id] = s.id;
+ return o;
+ }, {});
+ return LocalInstances.queryFromAll(self.xoss).$promise;
+ })
+ .then(instances => {
+ this.instances = instances.filter(i => this.slicesId[i.xos.id] === i.slice);
+ })
+ .catch(e => {
+ this.instances = [];
+ });
+
+ this.close = () => {
+ $uibModalInstance.dismiss('cancel');
+ }
+ }
+ })
+ }
+ },
+ ]
+ };
+
+ this.sliceTableCfg = {
+ columns: baseSliceCols.concat(lXosSliceCols),
+ actions: [
+ {
+ label: 'open locally',
+ icon: 'open',
+ cb: this.openLocally('slice')
+ },
+ {
+ label: 'Get Instances',
+ icon: 'search',
+ cb: (item) => {
+ $uibModal.open({
+ animation: true,
+ size: 'lg',
+ templateUrl: 'listInstances.html',
+ controllerAs: 'vm',
+ resolve: {
+ slice: function () {
+ return item;
+ }
+ },
+ controller: function($uibModalInstance, slice, LocalInstances) {
+ this.slice = slice;
+
+ this.config = {
+ columns: [
+ {
+ label: 'Name',
+ prop: 'name',
+ },
+ {
+ label: 'deployment',
+ prop: 'deployment',
+ },
+ ]
+ };
+
+ LocalInstances.getFromLocal(slice.xos)
+ .then(instances => {
+ this.instances = instances.filter(i => i.slice === slice.id);
+ });
+
+ this.close = () => {
+ $uibModalInstance.dismiss('cancel');
+ }
+ }
+ })
+ }
+ },
+ {
+ label: 'Add Instance',
+ icon: 'plus',
+ cb: (item) => {
+ $uibModal.open({
+ animation: true,
+ size: 'lg',
+ templateUrl: 'addInstance.html',
+ controller: function($uibModalInstance, slice, LocalInstances){
+ this.slice = slice;
+
+ this.model = {};
+
+ LocalInstances.getLocalInfo(slice.xos)
+ .then((res) => {
+ [
+ this.config.fields['deployment'].options,
+ this.config.fields['image'].options,
+ this.config.fields['flavor'].options,
+ this.config.fields['node'].options
+ ] = res;
+ });
+
+ this.config = {
+ formName: 'instanceForm',
+ excludedFields: ['xos', 'slice'],
+ actions: [
+ {
+ label: 'Save',
+ icon: 'ok',
+ cb: (instance) => {
+ instance.xos = slice.xos;
+ instance.slice = slice.id;
+ instance.creator = instance.xos.user.id;
+ LocalInstances.createOnLocal(instance)
+ .then(res => {
+ slice.instance_total = slice.instance_total + 1;
+ $uibModalInstance.close();
+ });
+ },
+ class: 'success'
+ },
+ {
+ label: 'Cancel',
+ icon: 'remove',
+ cb: () => {
+ $uibModalInstance.dismiss('cancel');
+ },
+ class: 'warning'
+ }
+ ],
+ fields: {
+ name: {
+ type: 'text',
+ validators: {
+ required: true
+ }
+ },
+ deployment: {
+ type: 'select',
+ validators: {
+ required: true
+ }
+ },
+ node: {
+ type: 'select',
+ validators: {
+ required: true
+ }
+ },
+ image: {
+ type: 'select',
+ validators: {
+ required: true,
+ }
+ },
+ flavor: {
+ type: 'select',
+ validators: {
+ required: true,
+ }
+ },
+ isolation: {
+ type: 'select',
+ options: [
+ {id: 'vm', label: 'VM'},
+ {id: 'container', label: 'Container'},
+ {id: 'container_vm', label: 'Container in VM'}
+ ],
+ validators: {
+ required: true,
+ }
+ },
+ }
+ };
+ },
+ controllerAs: 'vm',
+ resolve: {
+ slice: function () {
+ return item;
+ }
+ }
+ });
+ }
+ }
+ ],
+ filter: 'field',
+ order: true
+ };
+
+ this.usersTableCfg = {
+ columns: [
+ {
+ label: 'Name',
+ type: 'custom',
+ formatter: item => `${item.firstname} ${item.lastname}`
+ },
+ {
+ label: 'E-Mail',
+ prop: 'email'
+ },
+ {
+ label: 'User Name',
+ prop: 'username'
+ },
+ {
+ label: 'Time Zone',
+ prop: 'timezone'
+ },
+ {
+ label: 'L-XOS',
+ type: 'custom',
+ formatter: item => item.xos.name
+ }
+ ],
+ actions: [
+ {
+ label: 'open locally',
+ icon: 'open',
+ cb: this.openLocally('user')
+ }
+ ],
+ filter: 'field',
+ order: true
+ };
+
+ this.toggleXos = (xos) => {
+ if(_.findIndex(LXOS, {id: xos.id}) > -1){
+ xos.active = false;
+ _.remove(LXOS, {id: xos.id});
+ }
+ else{
+ xos.active = true;
+ LXOS.push(xos);
+ }
+
+ // authenticate on L-XOS
+ LocalAuth.login()
+ .then(() => {
+ // fetch slices
+ return $q.all([
+ LocalSlices.queryFromAll().$promise,
+ LocalUsers.queryFromAll().$promise,
+ ]);
+ })
+ .then(res => {
+ [this.localSlices, this.localUsers] = res;
+ })
+ .catch(e => {
+ console.log(e);
+ });
+ }
+ }
+ };
+});
\ No newline at end of file
diff --git a/views/ngXosViews/globalXos/src/js/rest.js b/views/ngXosViews/globalXos/src/js/rest.js
new file mode 100644
index 0000000..012daa8
--- /dev/null
+++ b/views/ngXosViews/globalXos/src/js/rest.js
@@ -0,0 +1,268 @@
+/**
+ * © OpenCORD
+ *
+ * Visit http://guide.xosproject.org/devguide/addview/ for more information
+ *
+ * Created by teone on 10/20/16.
+ */
+
+(function () {
+ 'use strict';
+ angular.module('xos.globalXos')
+ .service('Controllers', function($resource){
+ return $resource('/api/core/controllers/:id', {id: '@id'});
+ })
+ .service('GXOS', function($q, $resource, _, LXOS){
+ this.attachXosToItem = (items, target = LXOS) => {
+ return _.map(items, (lxos, i) => {
+ let currentXos = target[i];
+ return _.map(lxos, (item) => {
+ item.xos = currentXos;
+ return item;
+ });
+ })
+ };
+
+ this.buildQueryEndpoint = (baseUrl, target = LXOS) => {
+ return () => {
+ const d = $q.defer();
+
+ // store generated $resource for each L-XOS
+ let r = [];
+
+ let p = [];
+ _.forEach(target, (xos, i) => {
+ let resource = $resource(`${xos.auth_url}${baseUrl}`, {id: '@id'}, {
+ query: {
+ isArray: true,
+ headers: {
+ Authorization: `Basic ${btoa(xos.admin_user + ':' + xos.admin_password)}`
+ }
+ }
+ });
+ r.push(resource);
+ p.push(r[i].query().$promise);
+ });
+
+ $q.all(p)
+ .then(res => {
+ res = this.attachXosToItem(res, target);
+ d.resolve(_.flatten(res));
+ })
+ .catch(d.reject);
+
+ return {$promise: d.promise};
+ };
+ };
+
+ // TODO evaluate
+ this.buildLocalResource = (baseUrl, xos) => {
+ const headers = {
+ Authorization: `Basic ${btoa(xos.admin_user + ':' + xos.admin_password)}`
+ };
+ const resource = $resource(`${xos.auth_url}${baseUrl}`, {id: '@id'}, {
+ query: {
+ isArray: true,
+ headers: headers
+ }
+ });
+ return resource;
+ }
+ })
+ .service('LocalAuth', function ($q, $http, _, LXOS) {
+ const baseUrl = `api/utility/login/`;
+ this.login = () => {
+ const d = $q.defer();
+
+ let p = [];
+ _.forEach(LXOS, (xos, i) => {
+ let loginRequest = $http.post(`${xos.auth_url}${baseUrl}`, {username: xos.admin_user, password: xos.admin_password});
+ p.push(loginRequest);
+ });
+
+ $q.all(p)
+ .then(auths => {
+ _.forEach(auths, (auth, i) => {
+ LXOS[i].xoscsrftoken = auth.data.xoscsrftoken;
+ LXOS[i].xossessionid = auth.data.xossessionid;
+ LXOS[i].user = JSON.parse(auth.data.user);
+ });
+ d.resolve();
+ })
+ .catch(e => {
+ d.reject(e);
+ });
+
+ return d.promise;
+ }
+ })
+ .service('LocalSlices', function(GXOS){
+ const baseUrl = `api/utility/slicesplus/`;
+
+ // TODO build a global resource
+ this.queryFromAll = (targets) => {
+ return GXOS.buildQueryEndpoint(baseUrl, targets)();
+ };
+ })
+ .service('LocalUsers', function(GXOS){
+ const baseUrl = `api/core/users/`;
+
+ // TODO build a global resource
+ this.queryFromAll = GXOS.buildQueryEndpoint(baseUrl);
+ })
+ .service('LocalInstances', function($q, $http, GXOS, LocalDeployments, LocalImages, LocalFlavor, LocalNode){
+ const baseUrl = `api/core/instances/`;
+
+ // NOTE Evaluate to dinamically create a resource targeted to a L-XOS
+
+ this.queryFromAll = (targets) => {
+ return GXOS.buildQueryEndpoint(baseUrl, targets)();
+ };
+ this.createOnLocal = (instance) => {
+ const d = $q.defer();
+ const xos = instance.xos;
+ delete instance.xos;
+ $http.post(`${xos.auth_url}${baseUrl}`, instance, {
+ headers: {
+ Authorization: `Basic ${btoa(xos.admin_user + ':' + xos.admin_password)}`
+ }
+ })
+ .then((inst) => {
+ d.resolve(inst);
+ })
+ .catch(e => {
+ d.reject(e);
+ });
+
+ return d.promise;
+ };
+
+ this.getFromLocal = (xos, params) => {
+ const d = $q.defer();
+ $http.get(`${xos.auth_url}${baseUrl}`, {
+ params: params,
+ headers: {
+ Authorization: `Basic ${btoa(xos.admin_user + ':' + xos.admin_password)}`
+ }
+ })
+ .then((inst) => {
+ d.resolve(inst.data);
+ })
+ .catch(e => {
+ d.reject(e);
+ });
+
+ return d.promise;
+ };
+
+ this.getLocalInfo = (xos) => {
+ const d = $q.defer();
+ $q.all([
+ LocalDeployments.queryFromLocal(xos),
+ LocalImages.queryFromLocal(xos),
+ LocalFlavor.queryFromLocal(xos),
+ LocalNode.queryFromLocal(xos)
+ ])
+ .then((res) => {
+ res = _.map(res, collection => {
+ return _.map(collection, item => {
+ return {id: item.id, label: item.name}
+ });
+ });
+ d.resolve(res);
+ })
+ .catch(d.reject);
+ return d.promise;
+ };
+
+ })
+ .service('LocalDeployments', function($q, $http){
+
+ const baseUrl = `api/core/deployments/`;
+
+ this.queryFromLocal = (xos) => {
+ const d = $q.defer();
+
+ $http.get(`${xos.auth_url}${baseUrl}`, {
+ headers: {
+ Authorization: `Basic ${btoa(xos.admin_user + ':' + xos.admin_password)}`
+ }
+ })
+ .then((res) => {
+ d.resolve(res.data);
+ })
+ .catch(e => {
+ d.reject(e);
+ });
+
+ return d.promise;
+ }
+ })
+ .service('LocalImages', function($q, $http){
+
+ const baseUrl = `api/core/images/`;
+
+ this.queryFromLocal = (xos) => {
+ const d = $q.defer();
+
+ $http.get(`${xos.auth_url}${baseUrl}`, {
+ headers: {
+ Authorization: `Basic ${btoa(xos.admin_user + ':' + xos.admin_password)}`
+ }
+ })
+ .then((res) => {
+ d.resolve(res.data);
+ })
+ .catch(e => {
+ d.reject(e);
+ });
+
+ return d.promise;
+ }
+ })
+ .service('LocalFlavor', function($q, $http){
+
+ const baseUrl = `api/core/flavors/`;
+
+ this.queryFromLocal = (xos) => {
+ const d = $q.defer();
+
+ $http.get(`${xos.auth_url}${baseUrl}`, {
+ headers: {
+ Authorization: `Basic ${btoa(xos.admin_user + ':' + xos.admin_password)}`
+ }
+ })
+ .then((res) => {
+ d.resolve(res.data);
+ })
+ .catch(e => {
+ d.reject(e);
+ });
+
+ return d.promise;
+ }
+ })
+ .service('LocalNode', function($q, $http){
+
+ const baseUrl = `api/core/nodes/`;
+
+ this.queryFromLocal = (xos) => {
+ const d = $q.defer();
+
+ $http.get(`${xos.auth_url}${baseUrl}`, {
+ headers: {
+ Authorization: `Basic ${btoa(xos.admin_user + ':' + xos.admin_password)}`
+ }
+ })
+ .then((res) => {
+ d.resolve(res.data);
+ })
+ .catch(e => {
+ d.reject(e);
+ });
+
+ return d.promise;
+ }
+ });
+})();
+
diff --git a/views/ngXosViews/globalXos/src/sass/main.scss b/views/ngXosViews/globalXos/src/sass/main.scss
new file mode 100644
index 0000000..4ecf82d
--- /dev/null
+++ b/views/ngXosViews/globalXos/src/sass/main.scss
@@ -0,0 +1,13 @@
+@import '../../../../style/sass/lib/_variables.scss';
+
+#xosGlobalXos {
+ ui-view,
+ xos-list{
+ display: block;
+ }
+
+ .well.active{
+ background: $brand-primary;
+ color: #fff;
+ }
+}
\ No newline at end of file
diff --git a/views/ngXosViews/globalXos/src/templates/xos-list.tpl.html b/views/ngXosViews/globalXos/src/templates/xos-list.tpl.html
new file mode 100644
index 0000000..6299ba0
--- /dev/null
+++ b/views/ngXosViews/globalXos/src/templates/xos-list.tpl.html
@@ -0,0 +1,72 @@
+<div class="container">
+ <div class="row">
+ <h2>Select XOS to synch:</h2>
+ </div>
+ <div class="row">
+ <div class="col-xs-12">
+ <h2>G-XOS Slices:</h2>
+ </div>
+ <div class="col-xs-12">
+ <xos-table
+ config="vm.gSliceTableCgf"
+ data="vm.gSlices">
+ </xos-table>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-xs-12">
+ <h2>Get L-XOS details:</h2>
+ </div>
+ <div
+ ng-repeat="xos in vm.xoss"
+ class="col-sm-2">
+ <div
+ class="well"
+ ng-class="{active: xos.active}"
+ ng-click="vm.toggleXos(xos)">
+ {{xos.humanReadableName || xos.name}}
+ </div>
+ </div>
+ </div>
+ <div class="row" ng-if="vm.localSlices.length > 0">
+ <div class="col-xs-12">
+ <h2>L-XOS Slices:</h2>
+ </div>
+ <div class="col-xs-12">
+ <xos-table
+ config="vm.sliceTableCfg"
+ data="vm.localSlices">
+ </xos-table>
+ </div>
+ </div>
+ <div class="row" ng-if="vm.localSlices.length > 0">
+ <div class="col-xs-12">
+ <h2>L-XOS Users:</h2>
+ </div>
+ <div class="col-xs-12">
+ <xos-table
+ config="vm.usersTableCfg"
+ data="vm.localUsers">
+ </xos-table>
+ </div>
+ </div>
+</div>
+<script type="text/ng-template" id="addInstance.html">
+ <div class="modal-header">
+ <h3 class="modal-title" id="modal-title">Add Instance to {{vm.slice.name}} on {{vm.slice.xos.name}}</h3>
+ </div>
+ <div class="modal-body" id="modal-body">
+ <xos-form ng-model="vm.model" config="vm.config"></xos-form>
+ </div>
+</script>
+<script type="text/ng-template" id="listInstances.html">
+ <div class="modal-header">
+ <h3 class="modal-title" id="modal-title">Get Instances from {{vm.slice.name}} on {{vm.slice.xos.name}}</h3>
+ </div>
+ <div class="modal-body" id="modal-body">
+ <xos-table data="vm.instances" config="vm.config"></xos-table>
+ </div>
+ <div class="modal-footer">
+ <a ng-click="vm.close()" class="btn btn-warning">Close</a>
+ </div>
+</script>
\ No newline at end of file
diff --git a/xos/core/xoslib/dashboards/xosGlobalXos.html b/xos/core/xoslib/dashboards/xosGlobalXos.html
new file mode 100644
index 0000000..435724d
--- /dev/null
+++ b/xos/core/xoslib/dashboards/xosGlobalXos.html
@@ -0,0 +1,17 @@
+<!-- browserSync -->
+
+<!-- endcss -->
+<!-- inject:css -->
+<link rel="stylesheet" href="/static/css/xosGlobalXos.css">
+<!-- endinject -->
+
+<div ng-app="xos.globalXos" id="xosGlobalXos" class="container-fluid">
+ <div ui-view></div>
+</div>
+
+
+<!-- endjs -->
+<!-- inject:js -->
+<script src="/static/vendor/xosGlobalXosVendor.js"></script>
+<script src="/static/js/xosGlobalXos.js"></script>
+<!-- endinject -->
\ No newline at end of file
diff --git a/xos/core/xoslib/static/css/xosGlobalXos.css b/xos/core/xoslib/static/css/xosGlobalXos.css
new file mode 100644
index 0000000..fa52459
--- /dev/null
+++ b/xos/core/xoslib/static/css/xosGlobalXos.css
@@ -0,0 +1 @@
+#xosGlobalXos ui-view,#xosGlobalXos xos-list{display:block}#xosGlobalXos .well.active{background:#337ab7;color:#fff}
\ No newline at end of file
diff --git a/xos/core/xoslib/static/js/xosGlobalXos.js b/xos/core/xoslib/static/js/xosGlobalXos.js
new file mode 100644
index 0000000..4a10629
--- /dev/null
+++ b/xos/core/xoslib/static/js/xosGlobalXos.js
@@ -0,0 +1 @@
+"use strict";var _slicedToArray=function(){function e(e,n){var o=[],t=!0,i=!1,s=void 0;try{for(var a,r=e[Symbol.iterator]();!(t=(a=r.next()).done)&&(o.push(a.value),!n||o.length!==n);t=!0);}catch(l){i=!0,s=l}finally{try{!t&&r["return"]&&r["return"]()}finally{if(i)throw s}}return o}return function(n,o){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return e(n,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();angular.module("xos.globalXos",["ngResource","ngCookies","ui.router","xos.helpers","ui.bootstrap.modal","ui.bootstrap.tpls"]).config(["$stateProvider",function(e){e.state("xos-list",{url:"/",template:"<xos-list></xos-list>"})}]).config(["$httpProvider",function(e){e.interceptors.push("NoHyperlinks")}]).value("LXOS",[]).directive("xosList",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"vm",templateUrl:"templates/xos-list.tpl.html",controller:["$window","$q","_","Controllers","LXOS","LocalAuth","LocalSlices","LocalUsers","$uibModal","Slices",function(e,n,o,t,i,s,a,r,l,c){var u=this,d=this;n.all([t.query({backend_type:"XOS"}).$promise,c.query().$promise]).then(function(e){var n=_slicedToArray(e,2);u.xoss=n[0],u.gSlices=n[1]}),this.openLocally=function(n){return function(o){e.open(o.xos.auth_url+"admin/core/"+n+"/"+o.id,"_blank")}};var m=[{label:"Name",prop:"name"},{label:"Mount Data Sets",prop:"mount_data_sets"}],f=[{label:"Max Instances",prop:"max_instances"},{label:"Instances",prop:"instance_total"},{label:"L-XOS",type:"custom",formatter:function(e){return e.xos.name}}];this.gSliceTableCgf={columns:m,filter:"field",order:!0,actions:[{label:"Get Instances",icon:"search",cb:function(e){l.open({animation:!0,size:"lg",templateUrl:"listInstances.html",controllerAs:"vm",resolve:{slice:function(){return{name:e.name,xos:{name:"G-XOS"}}}},controller:["$uibModalInstance","slice","LocalInstances","LocalSlices",function(e,n,o,t){var i=this;this.slice=n,this.config={columns:[{label:"Name",prop:"name"}]},t.queryFromAll(d.xoss).$promise.then(function(e){return i.slicesId=e.filter(function(e){return e.name.indexOf(i.slice.name)>-1}).reduce(function(e,n){return e[n.xos.id]=n.id,e},{}),o.queryFromAll(d.xoss).$promise}).then(function(e){i.instances=e.filter(function(e){return i.slicesId[e.xos.id]===e.slice})})["catch"](function(e){i.instances=[]}),this.close=function(){e.dismiss("cancel")}}]})}}]},this.sliceTableCfg={columns:m.concat(f),actions:[{label:"open locally",icon:"open",cb:this.openLocally("slice")},{label:"Get Instances",icon:"search",cb:function(e){l.open({animation:!0,size:"lg",templateUrl:"listInstances.html",controllerAs:"vm",resolve:{slice:function(){return e}},controller:["$uibModalInstance","slice","LocalInstances",function(e,n,o){var t=this;this.slice=n,this.config={columns:[{label:"Name",prop:"name"},{label:"deployment",prop:"deployment"}]},o.getFromLocal(n.xos).then(function(e){t.instances=e.filter(function(e){return e.slice===n.id})}),this.close=function(){e.dismiss("cancel")}}]})}},{label:"Add Instance",icon:"plus",cb:function(e){l.open({animation:!0,size:"lg",templateUrl:"addInstance.html",controller:["$uibModalInstance","slice","LocalInstances",function(e,n,o){var t=this;this.slice=n,this.model={},o.getLocalInfo(n.xos).then(function(e){var n=_slicedToArray(e,4);t.config.fields.deployment.options=n[0],t.config.fields.image.options=n[1],t.config.fields.flavor.options=n[2],t.config.fields.node.options=n[3]}),this.config={formName:"instanceForm",excludedFields:["xos","slice"],actions:[{label:"Save",icon:"ok",cb:function(t){t.xos=n.xos,t.slice=n.id,t.creator=t.xos.user.id,o.createOnLocal(t).then(function(o){n.instance_total=n.instance_total+1,e.close()})},"class":"success"},{label:"Cancel",icon:"remove",cb:function(){e.dismiss("cancel")},"class":"warning"}],fields:{name:{type:"text",validators:{required:!0}},deployment:{type:"select",validators:{required:!0}},node:{type:"select",validators:{required:!0}},image:{type:"select",validators:{required:!0}},flavor:{type:"select",validators:{required:!0}},isolation:{type:"select",options:[{id:"vm",label:"VM"},{id:"container",label:"Container"},{id:"container_vm",label:"Container in VM"}],validators:{required:!0}}}}}],controllerAs:"vm",resolve:{slice:function(){return e}}})}}],filter:"field",order:!0},this.usersTableCfg={columns:[{label:"Name",type:"custom",formatter:function(e){return e.firstname+" "+e.lastname}},{label:"E-Mail",prop:"email"},{label:"User Name",prop:"username"},{label:"Time Zone",prop:"timezone"},{label:"L-XOS",type:"custom",formatter:function(e){return e.xos.name}}],actions:[{label:"open locally",icon:"open",cb:this.openLocally("user")}],filter:"field",order:!0},this.toggleXos=function(e){o.findIndex(i,{id:e.id})>-1?(e.active=!1,o.remove(i,{id:e.id})):(e.active=!0,i.push(e)),s.login().then(function(){return n.all([a.queryFromAll().$promise,r.queryFromAll().$promise])}).then(function(e){var n=_slicedToArray(e,2);u.localSlices=n[0],u.localUsers=n[1]})["catch"](function(e){console.log(e)})}}]}}),angular.module("xos.globalXos").run(["$templateCache",function(e){e.put("templates/xos-list.tpl.html",'<div class="container">\n <div class="row">\n <h2>Select XOS to synch:</h2>\n </div>\n <div class="row">\n <div class="col-xs-12">\n <h2>G-XOS Slices:</h2>\n </div>\n <div class="col-xs-12">\n <xos-table\n config="vm.gSliceTableCgf"\n data="vm.gSlices">\n </xos-table>\n </div>\n </div>\n <div class="row">\n <div class="col-xs-12">\n <h2>Get L-XOS details:</h2>\n </div>\n <div\n ng-repeat="xos in vm.xoss"\n class="col-sm-2">\n <div\n class="well"\n ng-class="{active: xos.active}"\n ng-click="vm.toggleXos(xos)">\n {{xos.humanReadableName || xos.name}}\n </div>\n </div>\n </div>\n <div class="row" ng-if="vm.localSlices.length > 0">\n <div class="col-xs-12">\n <h2>L-XOS Slices:</h2>\n </div>\n <div class="col-xs-12">\n <xos-table\n config="vm.sliceTableCfg"\n data="vm.localSlices">\n </xos-table>\n </div>\n </div>\n <div class="row" ng-if="vm.localSlices.length > 0">\n <div class="col-xs-12">\n <h2>L-XOS Users:</h2>\n </div>\n <div class="col-xs-12">\n <xos-table\n config="vm.usersTableCfg"\n data="vm.localUsers">\n </xos-table>\n </div>\n </div>\n</div>\n<script type="text/ng-template" id="addInstance.html">\n <div class="modal-header">\n <h3 class="modal-title" id="modal-title">Add Instance to {{vm.slice.name}} on {{vm.slice.xos.name}}</h3>\n </div>\n <div class="modal-body" id="modal-body">\n <xos-form ng-model="vm.model" config="vm.config"></xos-form>\n </div>\n</script>\n<script type="text/ng-template" id="listInstances.html">\n <div class="modal-header">\n <h3 class="modal-title" id="modal-title">Get Instances from {{vm.slice.name}} on {{vm.slice.xos.name}}</h3>\n </div>\n <div class="modal-body" id="modal-body">\n <xos-table data="vm.instances" config="vm.config"></xos-table>\n </div>\n <div class="modal-footer">\n <a ng-click="vm.close()" class="btn btn-warning">Close</a>\n </div>\n</script>')}]),function(){angular.module("xos.globalXos").service("Controllers",["$resource",function(e){return e("/api/core/controllers/:id",{id:"@id"})}]).service("GXOS",["$q","$resource","_","LXOS",function(e,n,o,t){var i=this;this.attachXosToItem=function(e){var n=arguments.length<=1||void 0===arguments[1]?t:arguments[1];return o.map(e,function(e,t){var i=n[t];return o.map(e,function(e){return e.xos=i,e})})},this.buildQueryEndpoint=function(s){var a=arguments.length<=1||void 0===arguments[1]?t:arguments[1];return function(){var t=e.defer(),r=[],l=[];return o.forEach(a,function(e,o){var t=n(""+e.auth_url+s,{id:"@id"},{query:{isArray:!0,headers:{Authorization:"Basic "+btoa(e.admin_user+":"+e.admin_password)}}});r.push(t),l.push(r[o].query().$promise)}),e.all(l).then(function(e){e=i.attachXosToItem(e,a),t.resolve(o.flatten(e))})["catch"](t.reject),{$promise:t.promise}}},this.buildLocalResource=function(e,o){var t={Authorization:"Basic "+btoa(o.admin_user+":"+o.admin_password)},i=n(""+o.auth_url+e,{id:"@id"},{query:{isArray:!0,headers:t}});return i}}]).service("LocalAuth",["$q","$http","_","LXOS",function(e,n,o,t){var i="api/utility/login/";this.login=function(){var s=e.defer(),a=[];return o.forEach(t,function(e,o){var t=n.post(""+e.auth_url+i,{username:e.admin_user,password:e.admin_password});a.push(t)}),e.all(a).then(function(e){o.forEach(e,function(e,n){t[n].xoscsrftoken=e.data.xoscsrftoken,t[n].xossessionid=e.data.xossessionid,t[n].user=JSON.parse(e.data.user)}),s.resolve()})["catch"](function(e){s.reject(e)}),s.promise}}]).service("LocalSlices",["GXOS",function(e){var n="api/utility/slicesplus/";this.queryFromAll=function(o){return e.buildQueryEndpoint(n,o)()}}]).service("LocalUsers",["GXOS",function(e){var n="api/core/users/";this.queryFromAll=e.buildQueryEndpoint(n)}]).service("LocalInstances",["$q","$http","GXOS","LocalDeployments","LocalImages","LocalFlavor","LocalNode",function(e,n,o,t,i,s,a){var r="api/core/instances/";this.queryFromAll=function(e){return o.buildQueryEndpoint(r,e)()},this.createOnLocal=function(o){var t=e.defer(),i=o.xos;return delete o.xos,n.post(""+i.auth_url+r,o,{headers:{Authorization:"Basic "+btoa(i.admin_user+":"+i.admin_password)}}).then(function(e){t.resolve(e)})["catch"](function(e){t.reject(e)}),t.promise},this.getFromLocal=function(o,t){var i=e.defer();return n.get(""+o.auth_url+r,{params:t,headers:{Authorization:"Basic "+btoa(o.admin_user+":"+o.admin_password)}}).then(function(e){i.resolve(e.data)})["catch"](function(e){i.reject(e)}),i.promise},this.getLocalInfo=function(n){var o=e.defer();return e.all([t.queryFromLocal(n),i.queryFromLocal(n),s.queryFromLocal(n),a.queryFromLocal(n)]).then(function(e){e=_.map(e,function(e){return _.map(e,function(e){return{id:e.id,label:e.name}})}),o.resolve(e)})["catch"](o.reject),o.promise}}]).service("LocalDeployments",["$q","$http",function(e,n){var o="api/core/deployments/";this.queryFromLocal=function(t){var i=e.defer();return n.get(""+t.auth_url+o,{headers:{Authorization:"Basic "+btoa(t.admin_user+":"+t.admin_password)}}).then(function(e){i.resolve(e.data)})["catch"](function(e){i.reject(e)}),i.promise}}]).service("LocalImages",["$q","$http",function(e,n){var o="api/core/images/";this.queryFromLocal=function(t){var i=e.defer();return n.get(""+t.auth_url+o,{headers:{Authorization:"Basic "+btoa(t.admin_user+":"+t.admin_password)}}).then(function(e){i.resolve(e.data)})["catch"](function(e){i.reject(e)}),i.promise}}]).service("LocalFlavor",["$q","$http",function(e,n){var o="api/core/flavors/";this.queryFromLocal=function(t){var i=e.defer();return n.get(""+t.auth_url+o,{headers:{Authorization:"Basic "+btoa(t.admin_user+":"+t.admin_password)}}).then(function(e){i.resolve(e.data)})["catch"](function(e){i.reject(e)}),i.promise}}]).service("LocalNode",["$q","$http",function(e,n){var o="api/core/nodes/";this.queryFromLocal=function(t){var i=e.defer();return n.get(""+t.auth_url+o,{headers:{Authorization:"Basic "+btoa(t.admin_user+":"+t.admin_password)}}).then(function(e){i.resolve(e.data)})["catch"](function(e){i.reject(e)}),i.promise}}])}(),angular.module("xos.globalXos").run(["$location",function(e){e.path("/")}]);
\ No newline at end of file
diff --git a/xos/core/xoslib/static/vendor/xosGlobalXosVendor.js b/xos/core/xoslib/static/vendor/xosGlobalXosVendor.js
new file mode 100644
index 0000000..5af32b8
--- /dev/null
+++ b/xos/core/xoslib/static/vendor/xosGlobalXosVendor.js
@@ -0,0 +1,4 @@
+angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.tabindex","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/year.html","uib/template/datepickerPopup/popup.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(e,t,n,a){var i=a.has("$animateCss")?a.get("$animateCss"):null;return{link:function(a,o,r){function l(){b=!!("horizontal"in r),b?(v={width:""},$={width:"0"}):(v={height:""},$={height:"0"}),a.$eval(r.uibCollapse)||o.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css(v)}function s(e){return b?{width:e.scrollWidth+"px"}:{height:e.scrollHeight+"px"}}function u(){o.hasClass("collapse")&&o.hasClass("in")||t.resolve(m(a)).then(function(){o.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),i?i(o,{addClass:"in",easing:"ease",css:{overflow:"hidden"},to:s(o[0])}).start()["finally"](p):e.addClass(o,"in",{css:{overflow:"hidden"},to:s(o[0])}).then(p)})}function p(){o.removeClass("collapsing").addClass("collapse").css(v),f(a)}function c(){return o.hasClass("collapse")||o.hasClass("in")?void t.resolve(h(a)).then(function(){o.css(s(o[0])).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),i?i(o,{removeClass:"in",to:$}).start()["finally"](d):e.removeClass(o,"in",{to:$}).then(d)}):d()}function d(){o.css($),o.removeClass("collapsing").addClass("collapse"),g(a)}var m=n(r.expanding),f=n(r.expanded),h=n(r.collapsing),g=n(r.collapsed),b=!1,v={},$={};l(),a.$watch(r.uibCollapse,function(e){e?c():u()})}}}]),angular.module("ui.bootstrap.tabindex",[]).directive("uibTabindexToggle",function(){return{restrict:"A",link:function(e,t,n){n.$observe("disabled",function(e){n.$set("tabindex",e?-1:null)})}}}),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse","ui.bootstrap.tabindex"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(e,t,n){this.groups=[],this.closeOthers=function(a){var i=angular.isDefined(t.closeOthers)?e.$eval(t.closeOthers):n.closeOthers;i&&angular.forEach(this.groups,function(e){e!==a&&(e.isOpen=!1)})},this.addGroup=function(e){var t=this;this.groups.push(e),e.$on("$destroy",function(n){t.removeGroup(e)})},this.removeGroup=function(e){var t=this.groups.indexOf(e);t!==-1&&this.groups.splice(t,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(e,t){return t.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,restrict:"A",templateUrl:function(e,t){return t.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",panelClass:"@?",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(e){this.heading=e}},link:function(e,t,n,a){t.addClass("panel"),a.addGroup(e),e.openClass=n.openClass||"panel-open",e.panelClass=n.panelClass||"panel-default",e.$watch("isOpen",function(n){t.toggleClass(e.openClass,!!n),n&&a.closeOthers(e)}),e.toggleOpen=function(t){e.isDisabled||t&&32!==t.which||(e.isOpen=!e.isOpen)};var i="accordiongroup-"+e.$id+"-"+Math.floor(1e4*Math.random());e.headingId=i+"-tab",e.panelId=i+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(e,t,n,a,i){a.setHeading(i(e,angular.noop))}}}).directive("uibAccordionTransclude",function(){function e(){return"uib-accordion-header,data-uib-accordion-header,x-uib-accordion-header,uib\\:accordion-header,[uib-accordion-header],[data-uib-accordion-header],[x-uib-accordion-header]"}return{require:"^uibAccordionGroup",link:function(t,n,a,i){t.$watch(function(){return i[a.uibAccordionTransclude]},function(t){if(t){var a=angular.element(n[0].querySelector(e()));a.html(""),a.append(t)}})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$element","$attrs","$interpolate","$timeout",function(e,t,n,a,i){e.closeable=!!n.close,t.addClass("alert"),n.$set("role","alert"),e.closeable&&t.addClass("alert-dismissible");var o=angular.isDefined(n.dismissOnTimeout)?a(n.dismissOnTimeout)(e.$parent):null;o&&i(function(){e.close()},parseInt(o,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",restrict:"A",templateUrl:function(e,t){return t.templateUrl||"uib/template/alert/alert.html"},transclude:!0,scope:{close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(e){this.activeClass=e.activeClass||"active",this.toggleEvent=e.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(e){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(t,n,a,i){var o=i[0],r=i[1],l=e(a.uibUncheckable);n.find("input").css({display:"none"}),r.$render=function(){n.toggleClass(o.activeClass,angular.equals(r.$modelValue,t.$eval(a.uibBtnRadio)))},n.on(o.toggleEvent,function(){if(!a.disabled){var e=n.hasClass(o.activeClass);e&&!angular.isDefined(a.uncheckable)||t.$apply(function(){r.$setViewValue(e?null:t.$eval(a.uibBtnRadio)),r.$render()})}}),a.uibUncheckable&&t.$watch(l,function(e){a.$set("uncheckable",e?"":void 0)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(e,t,n,a){function i(){return r(n.btnCheckboxTrue,!0)}function o(){return r(n.btnCheckboxFalse,!1)}function r(t,n){return angular.isDefined(t)?e.$eval(t):n}var l=a[0],s=a[1];t.find("input").css({display:"none"}),s.$render=function(){t.toggleClass(l.activeClass,angular.equals(s.$modelValue,i()))},t.on(l.toggleEvent,function(){n.disabled||e.$apply(function(){s.$setViewValue(t.hasClass(l.activeClass)?o():i()),s.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(e,t,n,a,i){function o(){for(;$.length;)$.shift()}function r(e){for(var t=0;t<g.length;t++)g[t].slide.active=t===e}function l(n,a,s){if(!y){if(angular.extend(n,{direction:s}),angular.extend(g[v].slide||{},{direction:s}),i.enabled(t)&&!e.$currentTransition&&g[a].element&&h.slides.length>1){g[a].element.data(b,n.direction);var u=h.getCurrentIndex();angular.isNumber(u)&&g[u].element&&g[u].element.data(b,n.direction),e.$currentTransition=!0,i.on("addClass",g[a].element,function(t,n){if("close"===n&&(e.$currentTransition=null,i.off("addClass",t),$.length)){var a=$.pop().slide,r=a.index,s=r>h.getCurrentIndex()?"next":"prev";o(),l(a,r,s)}})}e.active=n.index,v=n.index,r(a),c()}}function s(e){for(var t=0;t<g.length;t++)if(g[t].slide===e)return t}function u(){m&&(n.cancel(m),m=null)}function p(t){t.length||(e.$currentTransition=null,o())}function c(){u();var t=+e.interval;!isNaN(t)&&t>0&&(m=n(d,t))}function d(){var t=+e.interval;f&&!isNaN(t)&&t>0&&g.length?e.next():e.pause()}var m,f,h=this,g=h.slides=e.slides=[],b="uib-slideDirection",v=e.active,$=[],y=!1;t.addClass("carousel"),h.addSlide=function(t,n){g.push({slide:t,element:n}),g.sort(function(e,t){return+e.slide.index-+t.slide.index}),(t.index===e.active||1===g.length&&!angular.isNumber(e.active))&&(e.$currentTransition&&(e.$currentTransition=null),v=t.index,e.active=t.index,r(v),h.select(g[s(t)]),1===g.length&&e.play())},h.getCurrentIndex=function(){for(var e=0;e<g.length;e++)if(g[e].slide.index===v)return e},h.next=e.next=function(){var t=(h.getCurrentIndex()+1)%g.length;return 0===t&&e.noWrap()?void e.pause():h.select(g[t],"next")},h.prev=e.prev=function(){var t=h.getCurrentIndex()-1<0?g.length-1:h.getCurrentIndex()-1;return e.noWrap()&&t===g.length-1?void e.pause():h.select(g[t],"prev")},h.removeSlide=function(t){var n=s(t),a=$.indexOf(g[n]);a!==-1&&$.splice(a,1),g.splice(n,1),g.length>0&&v===n?n>=g.length?(v=g.length-1,e.active=v,r(v),h.select(g[g.length-1])):(v=n,e.active=v,r(v),h.select(g[n])):v>n&&(v--,e.active=v),0===g.length&&(v=null,e.active=null,o())},h.select=e.select=function(t,n){var a=s(t.slide);void 0===n&&(n=a>h.getCurrentIndex()?"next":"prev"),t.slide.index===v||e.$currentTransition?t&&t.slide.index!==v&&e.$currentTransition&&$.push(g[a]):l(t.slide,a,n)},e.indexOfSlide=function(e){return+e.slide.index},e.isActive=function(t){return e.active===t.slide.index},e.isPrevDisabled=function(){return 0===e.active&&e.noWrap()},e.isNextDisabled=function(){return e.active===g.length-1&&e.noWrap()},e.pause=function(){e.noPause||(f=!1,u())},e.play=function(){f||(f=!0,c())},t.on("mouseenter",e.pause),t.on("mouseleave",e.play),e.$on("$destroy",function(){y=!0,u()}),e.$watch("noTransition",function(e){i.enabled(t,!e)}),e.$watch("interval",c),e.$watchCollection("slides",p),e.$watch("active",function(e){if(angular.isNumber(e)&&v!==e){for(var t=0;t<g.length;t++)if(g[t].slide.index===e){e=t;break}var n=g[e];n&&(r(e),h.select(g[e]),v=e)}})}]).directive("uibCarousel",function(){return{transclude:!0,controller:"UibCarouselController",controllerAs:"carousel",restrict:"A",templateUrl:function(e,t){return t.templateUrl||"uib/template/carousel/carousel.html"},scope:{active:"=",interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",["$animate",function(e){return{require:"^uibCarousel",restrict:"A",transclude:!0,templateUrl:function(e,t){return t.templateUrl||"uib/template/carousel/slide.html"},scope:{actual:"=?",index:"=?"},link:function(t,n,a,i){n.addClass("item"),i.addSlide(t,n),t.$on("$destroy",function(){i.removeSlide(t)}),t.$watch("active",function(t){e[t?"addClass":"removeClass"](n,"active")})}}}]).animation(".item",["$animateCss",function(e){function t(e,t,n){e.removeClass(t),n&&n()}var n="uib-slideDirection";return{beforeAddClass:function(a,i,o){if("active"===i){var r=!1,l=a.data(n),s="next"===l?"left":"right",u=t.bind(this,a,s+" "+l,o);return a.addClass(l),e(a,{addClass:s}).start().done(u),function(){r=!0}}o()},beforeRemoveClass:function(a,i,o){if("active"===i){var r=!1,l=a.data(n),s="next"===l?"left":"right",u=t.bind(this,a,s,o);return e(a,{addClass:s}).start().done(u),function(){r=!0}}o()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","dateFilter","orderByFilter",function(e,t,n,a){function i(e){var t=[],n=e.split(""),i=e.indexOf("'");if(i>-1){var o=!1;e=e.split("");for(var r=i;r<e.length;r++)o?("'"===e[r]&&(r+1<e.length&&"'"===e[r+1]?(e[r+1]="$",n[r+1]=""):(n[r]="",o=!1)),e[r]="$"):"'"===e[r]&&(e[r]="$",n[r]="",o=!0);e=e.join("")}return angular.forEach(g,function(a){var i=e.indexOf(a.key);if(i>-1){e=e.split(""),n[i]="("+a.regex+")",e[i]="$";for(var o=i+1,r=i+a.key.length;o<r;o++)n[o]="",e[o]="$";e=e.join(""),t.push({index:i,key:a.key,apply:a.apply,matcher:a.regex})}}),{regex:new RegExp("^"+n.join("")+"$"),map:a(t,"index")}}function o(e){for(var t,n,a=[],i=0;i<e.length;)if(angular.isNumber(n)){if("'"===e.charAt(i))(i+1>=e.length||"'"!==e.charAt(i+1))&&(a.push(r(e,n,i)),n=null);else if(i===e.length)for(;n<e.length;)t=l(e,n),a.push(t),n=t.endIdx;i++}else"'"!==e.charAt(i)?(t=l(e,i),a.push(t.parser),i=t.endIdx):(n=i,i++);return a}function r(e,t,n){return function(){return e.substr(t+1,n-t-1)}}function l(e,t){for(var n=e.substr(t),a=0;a<g.length;a++)if(new RegExp("^"+g[a].key).test(n)){var i=g[a];return{endIdx:t+i.key.length,parser:i.formatter}}return{endIdx:t+1,parser:function(){return n.charAt(0)}}}function s(e,t,n){return!(n<1)&&(1===t&&n>28?29===n&&(e%4===0&&e%100!==0||e%400===0):3!==t&&5!==t&&8!==t&&10!==t||n<31)}function u(e){return parseInt(e,10)}function p(e,t){return e&&t?f(e,t):e}function c(e,t){return e&&t?f(e,t,!0):e}function d(e,t){e=e.replace(/:/g,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function m(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function f(e,t,n){n=n?-1:1;var a=e.getTimezoneOffset(),i=d(t,a);return m(e,n*(i-a))}var h,g,b=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){h=t.id,this.parsers={},this.formatters={},g=[{key:"yyyy",regex:"\\d{4}",apply:function(e){this.year=+e},formatter:function(e){var t=new Date;return t.setFullYear(Math.abs(e.getFullYear())),n(t,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(e){e=+e,this.year=e<69?e+2e3:e+1900},formatter:function(e){var t=new Date;return t.setFullYear(Math.abs(e.getFullYear())),n(t,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(e){this.year=+e},formatter:function(e){var t=new Date;return t.setFullYear(Math.abs(e.getFullYear())),n(t,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(e){this.month=e-1},formatter:function(e){var t=e.getMonth();return/^[0-9]$/.test(t)?n(e,"MM"):n(e,"M")}},{key:"MMMM",regex:t.DATETIME_FORMATS.MONTH.join("|"),apply:function(e){this.month=t.DATETIME_FORMATS.MONTH.indexOf(e)},formatter:function(e){return n(e,"MMMM")}},{key:"MMM",regex:t.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(e){this.month=t.DATETIME_FORMATS.SHORTMONTH.indexOf(e)},formatter:function(e){return n(e,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(e){this.month=e-1},formatter:function(e){return n(e,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(e){this.month=e-1},formatter:function(e){return n(e,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e},formatter:function(e){var t=e.getDate();return/^[1-9]$/.test(t)?n(e,"dd"):n(e,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e},formatter:function(e){return n(e,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e},formatter:function(e){return n(e,"d")}},{key:"EEEE",regex:t.DATETIME_FORMATS.DAY.join("|"),formatter:function(e){return n(e,"EEEE")}},{key:"EEE",regex:t.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(e){return n(e,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(e){this.hours=+e},formatter:function(e){return n(e,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(e){this.hours=+e},formatter:function(e){return n(e,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(e){this.hours=+e},formatter:function(e){return n(e,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(e){this.hours=+e},formatter:function(e){return n(e,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(e){this.minutes=+e},formatter:function(e){return n(e,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(e){this.minutes=+e},formatter:function(e){return n(e,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(e){this.milliseconds=+e},formatter:function(e){return n(e,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(e){this.seconds=+e},formatter:function(e){return n(e,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(e){this.seconds=+e},formatter:function(e){return n(e,"s")}},{key:"a",regex:t.DATETIME_FORMATS.AMPMS.join("|"),apply:function(e){12===this.hours&&(this.hours=0),"PM"===e&&(this.hours+=12)},formatter:function(e){return n(e,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(e){var t=e.match(/([+-])(\d{2})(\d{2})/),n=t[1],a=t[2],i=t[3];this.hours+=u(n+a),this.minutes+=u(n+i)},formatter:function(e){return n(e,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(e){return n(e,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(e){return n(e,"w")}},{key:"GGGG",regex:t.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(e){return n(e,"GGGG")}},{key:"GGG",regex:t.DATETIME_FORMATS.ERAS.join("|"),formatter:function(e){return n(e,"GGG")}},{key:"GG",regex:t.DATETIME_FORMATS.ERAS.join("|"),formatter:function(e){return n(e,"GG")}},{key:"G",regex:t.DATETIME_FORMATS.ERAS.join("|"),formatter:function(e){return n(e,"G")}}]},this.init(),this.filter=function(e,n){if(!angular.isDate(e)||isNaN(e)||!n)return"";n=t.DATETIME_FORMATS[n]||n,t.id!==h&&this.init(),this.formatters[n]||(this.formatters[n]=o(n));var a=this.formatters[n];return a.reduce(function(t,n){return t+n(e)},"")},this.parse=function(n,a,o){if(!angular.isString(n)||!a)return n;a=t.DATETIME_FORMATS[a]||a,a=a.replace(b,"\\$&"),t.id!==h&&this.init(),this.parsers[a]||(this.parsers[a]=i(a,"apply"));var r=this.parsers[a],l=r.regex,u=r.map,p=n.match(l),c=!1;if(p&&p.length){var d,m;angular.isDate(o)&&!isNaN(o.getTime())?d={year:o.getFullYear(),month:o.getMonth(),date:o.getDate(),hours:o.getHours(),minutes:o.getMinutes(),seconds:o.getSeconds(),milliseconds:o.getMilliseconds()}:(o&&e.warn("dateparser:","baseDate is not a valid date"),d={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var f=1,g=p.length;f<g;f++){var v=u[f-1];"Z"===v.matcher&&(c=!0),v.apply&&v.apply.call(d,p[f])}var $=c?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,y=c?Date.prototype.setUTCHours:Date.prototype.setHours;return s(d.year,d.month,d.date)&&(!angular.isDate(o)||isNaN(o.getTime())||c?(m=new Date(0),$.call(m,d.year,d.month,d.date),y.call(m,d.hours||0,d.minutes||0,d.seconds||0,d.milliseconds||0)):(m=new Date(o),$.call(m,d.year,d.month,d.date),y.call(m,d.hours,d.minutes,d.seconds,d.milliseconds))),m}},this.toTimezone=p,this.fromTimezone=c,this.timezoneToOffset=d,this.addDateMinutes=m,this.convertTimezoneToLocal=f}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(e){var t=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,n=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(a,i){function o(e,t,n){s.push(e),u.push({scope:e,element:t}),f.forEach(function(t,n){r(t,e)}),e.$on("$destroy",l)}function r(t,a){var i=t.match(n),o=a.$eval(i[1]),r=i[2],l=p[t];if(!l){var s=function(t){var n=null;u.some(function(e){var a=e.scope.$eval(d);if(a===t)return n=e,!0}),l.lastActivated!==n&&(l.lastActivated&&e.removeClass(l.lastActivated.element,o),n&&e.addClass(n.element,o),l.lastActivated=n)};p[t]=l={lastActivated:null,scope:a,watchFn:s,compareWithExp:r,watcher:a.$watch(r,s)}}l.watchFn(a.$eval(r))}function l(e){var t=e.targetScope,n=s.indexOf(t);if(s.splice(n,1),u.splice(n,1),s.length){var a=s[0];angular.forEach(p,function(e){e.scope===t&&(e.watcher=a.$watch(e.compareWithExp,e.watchFn),e.scope=a)})}else p={}}var s=[],u=[],p={},c=i.uibIsClass.match(t),d=c[2],m=c[1],f=m.split(",");return o}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass"]).value("$datepickerSuppressError",!1).value("$datepickerLiteralWarning",!0).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",monthColumns:3,ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$element","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerLiteralWarning","$datepickerSuppressError","uibDateParser",function(e,t,n,a,i,o,r,l,s,u,p,c){function d(t){e.datepickerMode=t,e.datepickerOptions.datepickerMode=t}var m=this,f={$setViewValue:angular.noop},h={},g=[];t.addClass("uib-datepicker"),n.$set("role","application"),e.datepickerOptions||(e.datepickerOptions={}),this.modes=["day","month","year"],["customClass","dateDisabled","datepickerMode","formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","maxDate","maxMode","minDate","minMode","monthColumns","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"].forEach(function(t){switch(t){case"customClass":case"dateDisabled":e[t]=e.datepickerOptions[t]||angular.noop;break;case"datepickerMode":e.datepickerMode=angular.isDefined(e.datepickerOptions.datepickerMode)?e.datepickerOptions.datepickerMode:s.datepickerMode;break;case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":m[t]=angular.isDefined(e.datepickerOptions[t])?i(e.datepickerOptions[t])(e.$parent):s[t];break;case"monthColumns":case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":m[t]=angular.isDefined(e.datepickerOptions[t])?e.datepickerOptions[t]:s[t];break;case"startingDay":angular.isDefined(e.datepickerOptions.startingDay)?m.startingDay=e.datepickerOptions.startingDay:angular.isNumber(s.startingDay)?m.startingDay=s.startingDay:m.startingDay=(o.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":e.$watch("datepickerOptions."+t,function(e){e?angular.isDate(e)?m[t]=c.fromTimezone(new Date(e),h.timezone):(u&&r.warn("Literal date support has been deprecated, please switch to date object usage"),m[t]=new Date(l(e,"medium"))):m[t]=s[t]?c.fromTimezone(new Date(s[t]),h.timezone):null,m.refreshView()});break;case"maxMode":case"minMode":e.datepickerOptions[t]?e.$watch(function(){return e.datepickerOptions[t]},function(n){m[t]=e[t]=angular.isDefined(n)?n:e.datepickerOptions[t],("minMode"===t&&m.modes.indexOf(e.datepickerOptions.datepickerMode)<m.modes.indexOf(m[t])||"maxMode"===t&&m.modes.indexOf(e.datepickerOptions.datepickerMode)>m.modes.indexOf(m[t]))&&(e.datepickerMode=m[t],e.datepickerOptions.datepickerMode=m[t])}):m[t]=e[t]=s[t]||null}}),e.uniqueId="datepicker-"+e.$id+"-"+Math.floor(1e4*Math.random()),e.disabled=angular.isDefined(n.disabled)||!1,angular.isDefined(n.ngDisabled)&&g.push(e.$parent.$watch(n.ngDisabled,function(t){e.disabled=t,m.refreshView()})),e.isActive=function(t){return 0===m.compare(t.date,m.activeDate)&&(e.activeDateId=t.uid,!0)},this.init=function(t){f=t,h=t.$options||e.datepickerOptions.ngModelOptions||s.ngModelOptions,e.datepickerOptions.initDate?(m.activeDate=c.fromTimezone(e.datepickerOptions.initDate,h.timezone)||new Date,e.$watch("datepickerOptions.initDate",function(e){e&&(f.$isEmpty(f.$modelValue)||f.$invalid)&&(m.activeDate=c.fromTimezone(e,h.timezone),m.refreshView())})):m.activeDate=new Date;var n=f.$modelValue?new Date(f.$modelValue):new Date;this.activeDate=isNaN(n)?c.fromTimezone(new Date,h.timezone):c.fromTimezone(n,h.timezone),f.$render=function(){m.render()}},this.render=function(){if(f.$viewValue){var e=new Date(f.$viewValue),t=!isNaN(e);t?this.activeDate=c.fromTimezone(e,h.timezone):p||r.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){e.selectedDt=null,this._refreshView(),e.activeDt&&(e.activeDateId=e.activeDt.uid);var t=f.$viewValue?new Date(f.$viewValue):null;t=c.fromTimezone(t,h.timezone),f.$setValidity("dateDisabled",!t||this.element&&!this.isDisabled(t))}},this.createDateObject=function(t,n){var a=f.$viewValue?new Date(f.$viewValue):null;a=c.fromTimezone(a,h.timezone);var i=new Date;i=c.fromTimezone(i,h.timezone);var o=this.compare(t,i),r={date:t,label:c.filter(t,n),selected:a&&0===this.compare(t,a),disabled:this.isDisabled(t),past:o<0,current:0===o,future:o>0,customClass:this.customClass(t)||null};return a&&0===this.compare(t,a)&&(e.selectedDt=r),m.activeDate&&0===this.compare(r.date,m.activeDate)&&(e.activeDt=r),r},this.isDisabled=function(t){return e.disabled||this.minDate&&this.compare(t,this.minDate)<0||this.maxDate&&this.compare(t,this.maxDate)>0||e.dateDisabled&&e.dateDisabled({date:t,mode:e.datepickerMode})},this.customClass=function(t){return e.customClass({date:t,mode:e.datepickerMode})},this.split=function(e,t){for(var n=[];e.length>0;)n.push(e.splice(0,t));return n},e.select=function(t){if(e.datepickerMode===m.minMode){var n=f.$viewValue?c.fromTimezone(new Date(f.$viewValue),h.timezone):new Date(0,0,0,0,0,0,0);n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n=c.toTimezone(n,h.timezone),f.$setViewValue(n),f.$render()}else m.activeDate=t,d(m.modes[m.modes.indexOf(e.datepickerMode)-1]),e.$emit("uib:datepicker.mode");e.$broadcast("uib:datepicker.focus")},e.move=function(e){var t=m.activeDate.getFullYear()+e*(m.step.years||0),n=m.activeDate.getMonth()+e*(m.step.months||0);m.activeDate.setFullYear(t,n,1),m.refreshView()},e.toggleMode=function(t){t=t||1,e.datepickerMode===m.maxMode&&1===t||e.datepickerMode===m.minMode&&t===-1||(d(m.modes[m.modes.indexOf(e.datepickerMode)+t]),e.$emit("uib:datepicker.mode"))},e.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var b=function(){m.element[0].focus()};e.$on("uib:datepicker.focus",b),e.keydown=function(t){var n=e.keys[t.which];if(n&&!t.shiftKey&&!t.altKey&&!e.disabled)if(t.preventDefault(),m.shortcutPropagation||t.stopPropagation(),"enter"===n||"space"===n){if(m.isDisabled(m.activeDate))return;e.select(m.activeDate)}else!t.ctrlKey||"up"!==n&&"down"!==n?(m.handleKeyDown(n,t),m.refreshView()):e.toggleMode("up"===n?1:-1)},t.on("keydown",function(t){e.$apply(function(){e.keydown(t)})}),e.$on("$destroy",function(){for(;g.length;)g.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(e,t,n){function a(e,t){return 1!==t||e%4!==0||e%100===0&&e%400!==0?o[t]:29}function i(e){var t=new Date(e);t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t)/864e5)/7)+1}var o=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=t,this.init=function(t){angular.extend(t,this),e.showWeeks=t.showWeeks,t.refreshView()},this.getDates=function(e,t){for(var n,a=new Array(t),i=new Date(e),o=0;o<t;)n=new Date(i),a[o++]=n,i.setDate(i.getDate()+1);return a},this._refreshView=function(){var t=this.activeDate.getFullYear(),a=this.activeDate.getMonth(),o=new Date(this.activeDate);o.setFullYear(t,a,1);var r=this.startingDay-o.getDay(),l=r>0?7-r:-r,s=new Date(o);l>0&&s.setDate(-l+1);for(var u=this.getDates(s,42),p=0;p<42;p++)u[p]=angular.extend(this.createDateObject(u[p],this.formatDay),{secondary:u[p].getMonth()!==a,uid:e.uniqueId+"-"+p});e.labels=new Array(7);for(var c=0;c<7;c++)e.labels[c]={abbr:n(u[c].date,this.formatDayHeader),full:n(u[c].date,"EEEE")};if(e.title=n(this.activeDate,this.formatDayTitle),e.rows=this.split(u,7),e.showWeeks){e.weekNumbers=[];for(var d=(11-this.startingDay)%7,m=e.rows.length,f=0;f<m;f++)e.weekNumbers.push(i(e.rows[f][d].date))}},this.compare=function(e,t){var n=new Date(e.getFullYear(),e.getMonth(),e.getDate()),a=new Date(t.getFullYear(),t.getMonth(),t.getDate());return n.setFullYear(e.getFullYear()),a.setFullYear(t.getFullYear()),n-a},this.handleKeyDown=function(e,t){var n=this.activeDate.getDate();if("left"===e)n-=1;else if("up"===e)n-=7;else if("right"===e)n+=1;else if("down"===e)n+=7;else if("pageup"===e||"pagedown"===e){var i=this.activeDate.getMonth()+("pageup"===e?-1:1);this.activeDate.setMonth(i,1),n=Math.min(a(this.activeDate.getFullYear(),this.activeDate.getMonth()),n)}else"home"===e?n=1:"end"===e&&(n=a(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(n)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(e,t,n){this.step={years:1},this.element=t,this.init=function(e){angular.extend(e,this),e.refreshView()},this._refreshView=function(){for(var t,a=new Array(12),i=this.activeDate.getFullYear(),o=0;o<12;o++)t=new Date(this.activeDate),t.setFullYear(i,o,1),a[o]=angular.extend(this.createDateObject(t,this.formatMonth),{uid:e.uniqueId+"-"+o});e.title=n(this.activeDate,this.formatMonthTitle),e.rows=this.split(a,this.monthColumns),e.yearHeaderColspan=this.monthColumns>3?this.monthColumns-2:1},this.compare=function(e,t){var n=new Date(e.getFullYear(),e.getMonth()),a=new Date(t.getFullYear(),t.getMonth());return n.setFullYear(e.getFullYear()),a.setFullYear(t.getFullYear()),n-a},this.handleKeyDown=function(e,t){var n=this.activeDate.getMonth();if("left"===e)n-=1;else if("up"===e)n-=this.monthColumns;else if("right"===e)n+=1;else if("down"===e)n+=this.monthColumns;else if("pageup"===e||"pagedown"===e){var a=this.activeDate.getFullYear()+("pageup"===e?-1:1);this.activeDate.setFullYear(a)}else"home"===e?n=0:"end"===e&&(n=11);this.activeDate.setMonth(n)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(e,t,n){function a(e){return parseInt((e-1)/o,10)*o+1}var i,o;this.element=t,this.yearpickerInit=function(){i=this.yearColumns,o=this.yearRows*i,this.step={years:o}},this._refreshView=function(){for(var t,n=new Array(o),r=0,l=a(this.activeDate.getFullYear());r<o;r++)t=new Date(this.activeDate),t.setFullYear(l+r,0,1),n[r]=angular.extend(this.createDateObject(t,this.formatYear),{uid:e.uniqueId+"-"+r});e.title=[n[0].label,n[o-1].label].join(" - "),e.rows=this.split(n,i),e.columns=i},this.compare=function(e,t){return e.getFullYear()-t.getFullYear()},this.handleKeyDown=function(e,t){var n=this.activeDate.getFullYear();"left"===e?n-=1:"up"===e?n-=i:"right"===e?n+=1:"down"===e?n+=i:"pageup"===e||"pagedown"===e?n+=("pageup"===e?-1:1)*o:"home"===e?n=a(this.activeDate.getFullYear()):"end"===e&&(n=a(this.activeDate.getFullYear())+o-1),this.activeDate.setFullYear(n)}}]).directive("uibDatepicker",function(){return{templateUrl:function(e,t){return t.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerOptions:"=?"},require:["uibDatepicker","^ngModel"],restrict:"A",controller:"UibDatepickerController",controllerAs:"datepicker",link:function(e,t,n,a){var i=a[0],o=a[1];i.init(o)}}}).directive("uibDaypicker",function(){return{templateUrl:function(e,t){return t.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],restrict:"A",controller:"UibDaypickerController",link:function(e,t,n,a){var i=a[0],o=a[1];o.init(i)}}}).directive("uibMonthpicker",function(){return{templateUrl:function(e,t){return t.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],restrict:"A",controller:"UibMonthpickerController",link:function(e,t,n,a){var i=a[0],o=a[1];o.init(i)}}}).directive("uibYearpicker",function(){return{templateUrl:function(e,t){return t.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],restrict:"A",controller:"UibYearpickerController",link:function(e,t,n,a){var i=a[0];angular.extend(i,a[1]),i.yearpickerInit(),i.refreshView()}}}),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(e,t){var n,a,i={normal:/(auto|scroll)/,
+hidden:/(auto|scroll|hidden)/},o={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/},r=/(HTML|BODY)/;return{getRawNode:function(e){return e.nodeName?e:e[0]||e},parseStyle:function(e){return e=parseFloat(e),isFinite(e)?e:0},offsetParent:function(n){function a(e){return"static"===(t.getComputedStyle(e).position||"static")}n=this.getRawNode(n);for(var i=n.offsetParent||e[0].documentElement;i&&i!==e[0].documentElement&&a(i);)i=i.offsetParent;return i||e[0].documentElement},scrollbarWidth:function(i){if(i){if(angular.isUndefined(a)){var o=e.find("body");o.addClass("uib-position-body-scrollbar-measure"),a=t.innerWidth-o[0].clientWidth,a=isFinite(a)?a:0,o.removeClass("uib-position-body-scrollbar-measure")}return a}if(angular.isUndefined(n)){var r=angular.element('<div class="uib-position-scrollbar-measure"></div>');e.find("body").append(r),n=r[0].offsetWidth-r[0].clientWidth,n=isFinite(n)?n:0,r.remove()}return n},scrollbarPadding:function(e){e=this.getRawNode(e);var n=t.getComputedStyle(e),a=this.parseStyle(n.paddingRight),i=this.parseStyle(n.paddingBottom),o=this.scrollParent(e,!1,!0),l=this.scrollbarWidth(r.test(o.tagName));return{scrollbarWidth:l,widthOverflow:o.scrollWidth>o.clientWidth,right:a+l,originalRight:a,heightOverflow:o.scrollHeight>o.clientHeight,bottom:i+l,originalBottom:i}},isScrollable:function(e,n){e=this.getRawNode(e);var a=n?i.hidden:i.normal,o=t.getComputedStyle(e);return a.test(o.overflow+o.overflowY+o.overflowX)},scrollParent:function(n,a,o){n=this.getRawNode(n);var r=a?i.hidden:i.normal,l=e[0].documentElement,s=t.getComputedStyle(n);if(o&&r.test(s.overflow+s.overflowY+s.overflowX))return n;var u="absolute"===s.position,p=n.parentElement||l;if(p===l||"fixed"===s.position)return l;for(;p.parentElement&&p!==l;){var c=t.getComputedStyle(p);if(u&&"static"!==c.position&&(u=!1),!u&&r.test(c.overflow+c.overflowY+c.overflowX))break;p=p.parentElement}return p},position:function(n,a){n=this.getRawNode(n);var i=this.offset(n);if(a){var o=t.getComputedStyle(n);i.top-=this.parseStyle(o.marginTop),i.left-=this.parseStyle(o.marginLeft)}var r=this.offsetParent(n),l={top:0,left:0};return r!==e[0].documentElement&&(l=this.offset(r),l.top+=r.clientTop-r.scrollTop,l.left+=r.clientLeft-r.scrollLeft),{width:Math.round(angular.isNumber(i.width)?i.width:n.offsetWidth),height:Math.round(angular.isNumber(i.height)?i.height:n.offsetHeight),top:Math.round(i.top-l.top),left:Math.round(i.left-l.left)}},offset:function(n){n=this.getRawNode(n);var a=n.getBoundingClientRect();return{width:Math.round(angular.isNumber(a.width)?a.width:n.offsetWidth),height:Math.round(angular.isNumber(a.height)?a.height:n.offsetHeight),top:Math.round(a.top+(t.pageYOffset||e[0].documentElement.scrollTop)),left:Math.round(a.left+(t.pageXOffset||e[0].documentElement.scrollLeft))}},viewportOffset:function(n,a,i){n=this.getRawNode(n),i=i!==!1;var o=n.getBoundingClientRect(),r={top:0,left:0,bottom:0,right:0},l=a?e[0].documentElement:this.scrollParent(n),s=l.getBoundingClientRect();if(r.top=s.top+l.clientTop,r.left=s.left+l.clientLeft,l===e[0].documentElement&&(r.top+=t.pageYOffset,r.left+=t.pageXOffset),r.bottom=r.top+l.clientHeight,r.right=r.left+l.clientWidth,i){var u=t.getComputedStyle(l);r.top+=this.parseStyle(u.paddingTop),r.bottom-=this.parseStyle(u.paddingBottom),r.left+=this.parseStyle(u.paddingLeft),r.right-=this.parseStyle(u.paddingRight)}return{top:Math.round(o.top-r.top),bottom:Math.round(r.bottom-o.bottom),left:Math.round(o.left-r.left),right:Math.round(r.right-o.right)}},parsePlacement:function(e){var t=o.auto.test(e);return t&&(e=e.replace(o.auto,"")),e=e.split("-"),e[0]=e[0]||"top",o.primary.test(e[0])||(e[0]="top"),e[1]=e[1]||"center",o.secondary.test(e[1])||(e[1]="center"),t?e[2]=!0:e[2]=!1,e},positionElements:function(e,n,a,i){e=this.getRawNode(e),n=this.getRawNode(n);var r=angular.isDefined(n.offsetWidth)?n.offsetWidth:n.prop("offsetWidth"),l=angular.isDefined(n.offsetHeight)?n.offsetHeight:n.prop("offsetHeight");a=this.parsePlacement(a);var s=i?this.offset(e):this.position(e),u={top:0,left:0,placement:""};if(a[2]){var p=this.viewportOffset(e,i),c=t.getComputedStyle(n),d={width:r+Math.round(Math.abs(this.parseStyle(c.marginLeft)+this.parseStyle(c.marginRight))),height:l+Math.round(Math.abs(this.parseStyle(c.marginTop)+this.parseStyle(c.marginBottom)))};if(a[0]="top"===a[0]&&d.height>p.top&&d.height<=p.bottom?"bottom":"bottom"===a[0]&&d.height>p.bottom&&d.height<=p.top?"top":"left"===a[0]&&d.width>p.left&&d.width<=p.right?"right":"right"===a[0]&&d.width>p.right&&d.width<=p.left?"left":a[0],a[1]="top"===a[1]&&d.height-s.height>p.bottom&&d.height-s.height<=p.top?"bottom":"bottom"===a[1]&&d.height-s.height>p.top&&d.height-s.height<=p.bottom?"top":"left"===a[1]&&d.width-s.width>p.right&&d.width-s.width<=p.left?"right":"right"===a[1]&&d.width-s.width>p.left&&d.width-s.width<=p.right?"left":a[1],"center"===a[1])if(o.vertical.test(a[0])){var m=s.width/2-r/2;p.left+m<0&&d.width-s.width<=p.right?a[1]="left":p.right+m<0&&d.width-s.width<=p.left&&(a[1]="right")}else{var f=s.height/2-d.height/2;p.top+f<0&&d.height-s.height<=p.bottom?a[1]="top":p.bottom+f<0&&d.height-s.height<=p.top&&(a[1]="bottom")}}switch(a[0]){case"top":u.top=s.top-l;break;case"bottom":u.top=s.top+s.height;break;case"left":u.left=s.left-r;break;case"right":u.left=s.left+s.width}switch(a[1]){case"top":u.top=s.top;break;case"bottom":u.top=s.top+s.height-l;break;case"left":u.left=s.left;break;case"right":u.left=s.left+s.width-r;break;case"center":o.vertical.test(a[0])?u.left=s.left+s.width/2-r/2:u.top=s.top+s.height/2-l/2}return u.top=Math.round(u.top),u.left=Math.round(u.left),u.placement="center"===a[1]?a[0]:a[0]+"-"+a[1],u},adjustTop:function(e,t,n,a){if(e.indexOf("top")!==-1&&n!==a)return{top:t.top-a+"px"}},positionArrow:function(e,n){e=this.getRawNode(e);var a=e.querySelector(".tooltip-inner, .popover-inner");if(a){var i=angular.element(a).hasClass("tooltip-inner"),r=i?e.querySelector(".tooltip-arrow"):e.querySelector(".arrow");if(r){var l={top:"",bottom:"",left:"",right:""};if(n=this.parsePlacement(n),"center"===n[1])return void angular.element(r).css(l);var s="border-"+n[0]+"-width",u=t.getComputedStyle(r)[s],p="border-";p+=o.vertical.test(n[0])?n[0]+"-"+n[1]:n[1]+"-"+n[0],p+="-radius";var c=t.getComputedStyle(i?a:e)[p];switch(n[0]){case"top":l.bottom=i?"0":"-"+u;break;case"bottom":l.top=i?"0":"-"+u;break;case"left":l.right=i?"0":"-"+u;break;case"right":l.left=i?"0":"-"+u}l[n[1]]=c,angular.element(r).css(l)}}}}}]),angular.module("ui.bootstrap.datepickerPopup",["ui.bootstrap.datepicker","ui.bootstrap.position"]).value("$datepickerPopupLiteralWarning",!0).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepickerPopup/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0,placement:"auto bottom-left"}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$log","$parse","$window","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig","$datepickerPopupLiteralWarning",function(e,t,n,a,i,o,r,l,s,u,p,c,d,m,f,h){function g(t){var n=c.parse(t,k,e.date);if(isNaN(n))for(var a=0;a<U.length;a++)if(n=c.parse(t,U[a],e.date),!isNaN(n))return n;return n}function b(e){if(angular.isNumber(e)&&(e=new Date(e)),!e)return null;if(angular.isDate(e)&&!isNaN(e))return e;if(angular.isString(e)){var t=g(e);if(!isNaN(t))return c.fromTimezone(t,A.timezone)}return E.$options&&E.$options.allowInvalid?e:void 0}function v(e,t){var a=e||t;return!n.ngRequired&&!a||(angular.isNumber(a)&&(a=new Date(a)),!a||(!(!angular.isDate(a)||isNaN(a))||!!angular.isString(a)&&!isNaN(g(a))))}function $(n){if(e.isOpen||!e.disabled){var a=I[0],i=t[0].contains(n.target),o=void 0!==a.contains&&a.contains(n.target);!e.isOpen||i||o||e.$apply(function(){e.isOpen=!1})}}function y(n){27===n.which&&e.isOpen?(n.preventDefault(),n.stopPropagation(),e.$apply(function(){e.isOpen=!1}),t[0].focus()):40!==n.which||e.isOpen||(n.preventDefault(),n.stopPropagation(),e.$apply(function(){e.isOpen=!0}))}function w(){if(e.isOpen){var a=angular.element(I[0].querySelector(".uib-datepicker-popup")),i=n.popupPlacement?n.popupPlacement:d.placement,o=u.positionElements(t,a,i,x);a.css({top:o.top+"px",left:o.left+"px"}),a.hasClass("uib-position-measure")&&a.removeClass("uib-position-measure")}}var k,D,x,C,M,T,O,P,S,E,A,I,U,N=!1,F=[];this.init=function(i){if(E=i,A=angular.isObject(i.$options)?i.$options:{timezone:null},D=angular.isDefined(n.closeOnDateSelection)?e.$parent.$eval(n.closeOnDateSelection):d.closeOnDateSelection,x=angular.isDefined(n.datepickerAppendToBody)?e.$parent.$eval(n.datepickerAppendToBody):d.appendToBody,C=angular.isDefined(n.onOpenFocus)?e.$parent.$eval(n.onOpenFocus):d.onOpenFocus,M=angular.isDefined(n.datepickerPopupTemplateUrl)?n.datepickerPopupTemplateUrl:d.datepickerPopupTemplateUrl,T=angular.isDefined(n.datepickerTemplateUrl)?n.datepickerTemplateUrl:d.datepickerTemplateUrl,U=angular.isDefined(n.altInputFormats)?e.$parent.$eval(n.altInputFormats):d.altInputFormats,e.showButtonBar=angular.isDefined(n.showButtonBar)?e.$parent.$eval(n.showButtonBar):d.showButtonBar,d.html5Types[n.type]?(k=d.html5Types[n.type],N=!0):(k=n.uibDatepickerPopup||d.datepickerPopup,n.$observe("uibDatepickerPopup",function(e,t){var n=e||d.datepickerPopup;if(n!==k&&(k=n,E.$modelValue=null,!k))throw new Error("uibDatepickerPopup must have a date format specified.")})),!k)throw new Error("uibDatepickerPopup must have a date format specified.");if(N&&n.uibDatepickerPopup)throw new Error("HTML5 date input types do not support custom formats.");O=angular.element("<div uib-datepicker-popup-wrap><div uib-datepicker></div></div>"),O.attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":M}),P=angular.element(O.children()[0]),P.attr("template-url",T),e.datepickerOptions||(e.datepickerOptions={}),N&&"month"===n.type&&(e.datepickerOptions.datepickerMode="month",e.datepickerOptions.minMode="month"),P.attr("datepicker-options","datepickerOptions"),N?E.$formatters.push(function(t){return e.date=c.fromTimezone(t,A.timezone),t}):(E.$$parserName="date",E.$validators.date=v,E.$parsers.unshift(b),E.$formatters.push(function(t){return E.$isEmpty(t)?(e.date=t,t):(angular.isNumber(t)&&(t=new Date(t)),e.date=c.fromTimezone(t,A.timezone),c.filter(e.date,k))})),E.$viewChangeListeners.push(function(){e.date=g(E.$viewValue)}),t.on("keydown",y),I=a(O)(e),O.remove(),x?l.find("body").append(I):t.after(I),e.$on("$destroy",function(){for(e.isOpen===!0&&(s.$$phase||e.$apply(function(){e.isOpen=!1})),I.remove(),t.off("keydown",y),l.off("click",$),S&&S.off("scroll",w),angular.element(r).off("resize",w);F.length;)F.shift()()})},e.getText=function(t){return e[t+"Text"]||d[t+"Text"]},e.isDisabled=function(t){"today"===t&&(t=c.fromTimezone(new Date,A.timezone));var n={};return angular.forEach(["minDate","maxDate"],function(t){e.datepickerOptions[t]?angular.isDate(e.datepickerOptions[t])?n[t]=new Date(e.datepickerOptions[t]):(h&&i.warn("Literal date support has been deprecated, please switch to date object usage"),n[t]=new Date(p(e.datepickerOptions[t],"medium"))):n[t]=null}),e.datepickerOptions&&n.minDate&&e.compare(t,n.minDate)<0||n.maxDate&&e.compare(t,n.maxDate)>0},e.compare=function(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate())-new Date(t.getFullYear(),t.getMonth(),t.getDate())},e.dateSelection=function(n){e.date=n;var a=e.date?c.filter(e.date,k):null;t.val(a),E.$setViewValue(a),D&&(e.isOpen=!1,t[0].focus())},e.keydown=function(n){27===n.which&&(n.stopPropagation(),e.isOpen=!1,t[0].focus())},e.select=function(t,n){if(n.stopPropagation(),"today"===t){var a=new Date;angular.isDate(e.date)?(t=new Date(e.date),t.setFullYear(a.getFullYear(),a.getMonth(),a.getDate())):(t=c.fromTimezone(a,A.timezone),t.setHours(0,0,0,0))}e.dateSelection(t)},e.close=function(n){n.stopPropagation(),e.isOpen=!1,t[0].focus()},e.disabled=angular.isDefined(n.disabled)||!1,n.ngDisabled&&F.push(e.$parent.$watch(o(n.ngDisabled),function(t){e.disabled=t})),e.$watch("isOpen",function(a){a?e.disabled?e.isOpen=!1:m(function(){w(),C&&e.$broadcast("uib:datepicker.focus"),l.on("click",$);var a=n.popupPlacement?n.popupPlacement:d.placement;x||u.parsePlacement(a)[2]?(S=S||angular.element(u.scrollParent(t)),S&&S.on("scroll",w)):S=null,angular.element(r).on("resize",w)},0,!1):(l.off("click",$),S&&S.off("scroll",w),angular.element(r).off("resize",w))}),e.$on("uib:datepicker.mode",function(){m(w,0,!1)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@"},link:function(e,t,n,a){var i=a[0],o=a[1];o.init(i)}}}).directive("uibDatepickerPopupWrap",function(){return{restrict:"A",transclude:!0,templateUrl:function(e,t){return t.templateUrl||"uib/template/datepickerPopup/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(e){return function(t,n){var a;return function(){var i=this,o=Array.prototype.slice.call(arguments);a&&e.cancel(a),a=e(function(){t.apply(i,o)},n)}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(e,t){var n=null;this.open=function(t,i){n||e.on("click",a),n&&n!==t&&(n.isOpen=!1),n=t},this.close=function(t,i){n===t&&(e.off("click",a),e.off("keydown",this.keybindFilter),n=null)};var a=function(e){if(n&&!(e&&"disabled"===n.getAutoClose()||e&&3===e.which)){var a=n.getToggleElement();if(!(e&&a&&a[0].contains(e.target))){var i=n.getDropdownElement();e&&"outsideClick"===n.getAutoClose()&&i&&i[0].contains(e.target)||(n.focusToggleElement(),n.isOpen=!1,t.$$phase||n.$apply())}}};this.keybindFilter=function(e){if(n){var t=n.getDropdownElement(),i=n.getToggleElement(),o=t&&t[0].contains(e.target),r=i&&i[0].contains(e.target);27===e.which?(e.stopPropagation(),n.focusToggleElement(),a()):n.isKeynavEnabled()&&[38,40].indexOf(e.which)!==-1&&n.isOpen&&(o||r)&&(e.preventDefault(),e.stopPropagation(),n.focusDropdownEntry(e.which))}}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(e,t,n,a,i,o,r,l,s,u,p){var c,d,m=this,f=e.$new(),h=i.appendToOpenClass,g=i.openClass,b=angular.noop,v=n.onToggle?a(n.onToggle):angular.noop,$=!1,y=null,w=!1,k=s.find("body");t.addClass("dropdown"),this.init=function(){if(n.isOpen&&(d=a(n.isOpen),b=d.assign,e.$watch(d,function(e){f.isOpen=!!e})),angular.isDefined(n.dropdownAppendTo)){var i=a(n.dropdownAppendTo)(f);i&&(y=angular.element(i))}$=angular.isDefined(n.dropdownAppendToBody),w=angular.isDefined(n.keyboardNav),$&&!y&&(y=k),y&&m.dropdownMenu&&(y.append(m.dropdownMenu),t.on("$destroy",function(){m.dropdownMenu.remove()}))},this.toggle=function(e){return f.isOpen=arguments.length?!!e:!f.isOpen,angular.isFunction(b)&&b(f,f.isOpen),f.isOpen},this.isOpen=function(){return f.isOpen},f.getToggleElement=function(){return m.toggleElement},f.getAutoClose=function(){return n.autoClose||"always"},f.getElement=function(){return t},f.isKeynavEnabled=function(){return w},f.focusDropdownEntry=function(e){var n=m.dropdownMenu?angular.element(m.dropdownMenu).find("a"):t.find("ul").eq(0).find("a");switch(e){case 40:angular.isNumber(m.selectedOption)?m.selectedOption=m.selectedOption===n.length-1?m.selectedOption:m.selectedOption+1:m.selectedOption=0;break;case 38:angular.isNumber(m.selectedOption)?m.selectedOption=0===m.selectedOption?0:m.selectedOption-1:m.selectedOption=n.length-1}n[m.selectedOption].focus()},f.getDropdownElement=function(){return m.dropdownMenu},f.focusToggleElement=function(){m.toggleElement&&m.toggleElement[0].focus()},f.$watch("isOpen",function(n,a){if(y&&m.dropdownMenu){var i,d,w,k=l.positionElements(t,m.dropdownMenu,"bottom-left",!0),D=0;if(i={top:k.top+"px",display:n?"block":"none"},d=m.dropdownMenu.hasClass("dropdown-menu-right"),d?(i.left="auto",w=l.scrollbarPadding(y),w.heightOverflow&&w.scrollbarWidth&&(D=w.scrollbarWidth),i.right=window.innerWidth-D-(k.left+t.prop("offsetWidth"))+"px"):(i.left=k.left+"px",i.right="auto"),!$){var x=l.offset(y);i.top=k.top-x.top+"px",d?i.right=window.innerWidth-(k.left-x.left+t.prop("offsetWidth"))+"px":i.left=k.left-x.left+"px"}m.dropdownMenu.css(i)}var C=y?y:t,M=C.hasClass(y?h:g);if(M===!n&&r[n?"addClass":"removeClass"](C,y?h:g).then(function(){angular.isDefined(n)&&n!==a&&v(e,{open:!!n})}),n)m.dropdownMenuTemplateUrl?p(m.dropdownMenuTemplateUrl).then(function(e){c=f.$new(),u(e.trim())(c,function(e){var t=e;m.dropdownMenu.replaceWith(t),m.dropdownMenu=t,s.on("keydown",o.keybindFilter)})}):s.on("keydown",o.keybindFilter),f.focusToggleElement(),o.open(f,t);else{if(o.close(f,t),m.dropdownMenuTemplateUrl){c&&c.$destroy();var T=angular.element('<ul class="dropdown-menu"></ul>');m.dropdownMenu.replaceWith(T),m.dropdownMenu=T}m.selectedOption=null}angular.isFunction(b)&&b(e,n)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(e,t,n,a){a.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(e,t,n,a){if(a&&!angular.isDefined(n.dropdownNested)){t.addClass("dropdown-menu");var i=n.templateUrl;i&&(a.dropdownMenuTemplateUrl=i),a.dropdownMenu||(a.dropdownMenu=t)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(e,t,n,a){if(a){t.addClass("dropdown-toggle"),a.toggleElement=t;var i=function(i){i.preventDefault(),t.hasClass("disabled")||n.disabled||e.$apply(function(){a.toggle()})};t.bind("click",i),t.attr({"aria-haspopup":!0,"aria-expanded":!1}),e.$watch(a.isOpen,function(e){t.attr("aria-expanded",!!e)}),e.$on("$destroy",function(){t.unbind("click",i)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var e=[];return{add:function(t,n){e.push({key:t,value:n})},get:function(t){for(var n=0;n<e.length;n++)if(t===e[n].key)return e[n]},keys:function(){for(var t=[],n=0;n<e.length;n++)t.push(e[n].key);return t},top:function(){return e[e.length-1]},remove:function(t){for(var n=-1,a=0;a<e.length;a++)if(t===e[a].key){n=a;break}return e.splice(n,1)[0]},removeTop:function(){return e.pop()},length:function(){return e.length}}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.stackedMap","ui.bootstrap.position"]).factory("$$multiMap",function(){return{createNew:function(){var e={};return{entries:function(){return Object.keys(e).map(function(t){return{key:t,value:e[t]}})},get:function(t){return e[t]},hasKey:function(t){return!!e[t]},keys:function(){return Object.keys(e)},put:function(t,n){e[t]||(e[t]=[]),e[t].push(n)},remove:function(t,n){var a=e[t];if(a){var i=a.indexOf(n);i!==-1&&a.splice(i,1),a.length||delete e[t]}}}}}}).provider("$uibResolve",function(){var e=this;this.resolver=null,this.setResolver=function(e){this.resolver=e},this.$get=["$injector","$q",function(t,n){var a=e.resolver?t.get(e.resolver):null;return{resolve:function(e,i,o,r){if(a)return a.resolve(e,i,o,r);var l=[];return angular.forEach(e,function(e){angular.isFunction(e)||angular.isArray(e)?l.push(n.resolve(t.invoke(e))):angular.isString(e)?l.push(n.resolve(t.get(e))):l.push(n.resolve(e))}),n.all(l).then(function(t){var n={},a=0;return angular.forEach(e,function(e,i){n[i]=t[a++]}),n})}}}]}).directive("uibModalBackdrop",["$animate","$injector","$uibModalStack",function(e,t,n){function a(t,a,i){i.modalInClass&&(e.addClass(a,i.modalInClass),t.$on(n.NOW_CLOSING_EVENT,function(n,o){var r=o();t.modalOptions.animation?e.removeClass(a,i.modalInClass).then(r):r()}))}return{restrict:"A",compile:function(e,t){return e.addClass(t.backdropClass),a}}}]).directive("uibModalWindow",["$uibModalStack","$q","$animateCss","$document",function(e,t,n,a){return{scope:{index:"@"},restrict:"A",transclude:!0,templateUrl:function(e,t){return t.templateUrl||"uib/template/modal/window.html"},link:function(i,o,r){o.addClass(r.windowTopClass||""),i.size=r.size,i.close=function(t){var n=e.getTop();n&&n.value.backdrop&&"static"!==n.value.backdrop&&t.target===t.currentTarget&&(t.preventDefault(),t.stopPropagation(),e.dismiss(n.key,"backdrop click"))},o.on("click",i.close),i.$isRendered=!0;var l=t.defer();i.$$postDigest(function(){l.resolve()}),l.promise.then(function(){var l=null;r.modalInClass&&(l=n(o,{addClass:r.modalInClass}).start(),i.$on(e.NOW_CLOSING_EVENT,function(e,t){var a=t();n(o,{removeClass:r.modalInClass}).start().then(a)})),t.when(l).then(function(){var t=e.getTop();if(t&&e.modalRendered(t.key),!a[0].activeElement||!o[0].contains(a[0].activeElement)){var n=o[0].querySelector("[autofocus]");n?n.focus():o[0].focus()}})})}}}]).directive("uibModalAnimationClass",function(){return{compile:function(e,t){t.modalAnimation&&e.addClass(t.uibModalAnimationClass)}}}).directive("uibModalTransclude",["$animate",function(e){return{link:function(t,n,a,i,o){o(t.$parent,function(t){n.empty(),e.enter(t,n)})}}}]).factory("$uibModalStack",["$animate","$animateCss","$document","$compile","$rootScope","$q","$$multiMap","$$stackedMap","$uibPosition",function(e,t,n,a,i,o,r,l,s){function u(e){var t="-";return e.replace(S,function(e,n){return(n?t:"")+e.toLowerCase()})}function p(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function c(){for(var e=-1,t=D.keys(),n=0;n<t.length;n++)D.get(t[n]).value.backdrop&&(e=n);return e>-1&&e<M&&(e=M),e}function d(e,t){var n=D.get(e).value,a=n.appendTo;D.remove(e),T=D.top(),T&&(M=parseInt(T.value.modalDomEl.attr("index"),10)),h(n.modalDomEl,n.modalScope,function(){var t=n.openedClass||k;x.remove(t,e);var i=x.hasKey(t);a.toggleClass(t,i),!i&&w&&w.heightOverflow&&w.scrollbarWidth&&(w.originalRight?a.css({paddingRight:w.originalRight+"px"}):a.css({paddingRight:""}),w=null),m(!0)},n.closedDeferred),f(),t&&t.focus?t.focus():a.focus&&a.focus()}function m(e){var t;D.length()>0&&(t=D.top().value,t.modalDomEl.toggleClass(t.windowTopClass||"",e))}function f(){if($&&c()===-1){var e=y;h($,y,function(){e=null}),$=void 0,y=void 0}}function h(t,n,a,i){function r(){r.done||(r.done=!0,e.leave(t).then(function(){a&&a(),t.remove(),i&&i.resolve()}),n.$destroy())}var l,s=null,u=function(){return l||(l=o.defer(),s=l.promise),function(){l.resolve()}};return n.$broadcast(C.NOW_CLOSING_EVENT,u),o.when(s).then(r)}function g(e){if(e.isDefaultPrevented())return e;var t=D.top();if(t)switch(e.which){case 27:t.value.keyboard&&(e.preventDefault(),i.$apply(function(){C.dismiss(t.key,"escape key press")}));break;case 9:var n=C.loadFocusElementList(t),a=!1;e.shiftKey?(C.isFocusInFirstItem(e,n)||C.isModalFocused(e,t))&&(a=C.focusLastFocusableElement(n)):C.isFocusInLastItem(e,n)&&(a=C.focusFirstFocusableElement(n)),a&&(e.preventDefault(),e.stopPropagation())}}function b(e,t,n){return!e.value.modalScope.$broadcast("modal.closing",t,n).defaultPrevented}function v(){Array.prototype.forEach.call(document.querySelectorAll("["+O+"]"),function(e){var t=parseInt(e.getAttribute(O),10),n=t-1;e.setAttribute(O,n),n||(e.removeAttribute(O),e.removeAttribute("aria-hidden"))})}var $,y,w,k="modal-open",D=l.createNew(),x=r.createNew(),C={NOW_CLOSING_EVENT:"modal.stack.now-closing"},M=0,T=null,O="data-bootstrap-modal-aria-hidden-count",P="a[href], area[href], input:not([disabled]):not([tabindex='-1']), button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']), textarea:not([disabled]):not([tabindex='-1']), iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]",S=/[A-Z]/g;return i.$watch(c,function(e){y&&(y.index=e)}),n.on("keydown",g),i.$on("$destroy",function(){n.off("keydown",g)}),C.open=function(t,o){function r(e){function t(e){var t=e.parent()?e.parent().children():[];return Array.prototype.filter.call(t,function(t){return t!==e[0]})}if(e&&"BODY"!==e[0].tagName)return t(e).forEach(function(e){var t="true"===e.getAttribute("aria-hidden"),n=parseInt(e.getAttribute(O),10);n||(n=t?1:0),e.setAttribute(O,n+1),e.setAttribute("aria-hidden","true")}),r(e.parent())}var l=n[0].activeElement,p=o.openedClass||k;m(!1),T=D.top(),D.add(t,{deferred:o.deferred,renderDeferred:o.renderDeferred,closedDeferred:o.closedDeferred,modalScope:o.scope,backdrop:o.backdrop,keyboard:o.keyboard,openedClass:o.openedClass,windowTopClass:o.windowTopClass,animation:o.animation,appendTo:o.appendTo}),x.put(p,t);var d=o.appendTo,f=c();if(!d.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");f>=0&&!$&&(y=i.$new(!0),y.modalOptions=o,y.index=f,$=angular.element('<div uib-modal-backdrop="modal-backdrop"></div>'),$.attr({"class":"modal-backdrop","ng-style":"{'z-index': 1040 + (index && 1 || 0) + index*10}","uib-modal-animation-class":"fade","modal-in-class":"in"}),o.backdropClass&&$.addClass(o.backdropClass),o.animation&&$.attr("modal-animation","true"),a($)(y),e.enter($,d),s.isScrollable(d)&&(w=s.scrollbarPadding(d),w.heightOverflow&&w.scrollbarWidth&&d.css({paddingRight:w.right+"px"})));var h;o.component?(h=document.createElement(u(o.component.name)),h=angular.element(h),h.attr({resolve:"$resolve","modal-instance":"$uibModalInstance",close:"$close($value)",dismiss:"$dismiss($value)"})):h=o.content,M=T?parseInt(T.value.modalDomEl.attr("index"),10)+1:0;var g=angular.element('<div uib-modal-window="modal-window"></div>');g.attr({"class":"modal","template-url":o.windowTemplateUrl,"window-top-class":o.windowTopClass,role:"dialog","aria-labelledby":o.ariaLabelledBy,"aria-describedby":o.ariaDescribedBy,size:o.size,index:M,animate:"animate","ng-style":"{'z-index': 1050 + $$topModalIndex*10, display: 'block'}",tabindex:-1,"uib-modal-animation-class":"fade","modal-in-class":"in"}).append(h),o.windowClass&&g.addClass(o.windowClass),o.animation&&g.attr("modal-animation","true"),d.addClass(p),o.scope&&(o.scope.$$topModalIndex=M),e.enter(a(g)(o.scope),d),D.top().value.modalDomEl=g,D.top().value.modalOpener=l,r(g)},C.close=function(e,t){var n=D.get(e);return v(),n&&b(n,t,!0)?(n.value.modalScope.$$uibDestructionScheduled=!0,n.value.deferred.resolve(t),d(e,n.value.modalOpener),!0):!n},C.dismiss=function(e,t){var n=D.get(e);return v(),n&&b(n,t,!1)?(n.value.modalScope.$$uibDestructionScheduled=!0,n.value.deferred.reject(t),d(e,n.value.modalOpener),!0):!n},C.dismissAll=function(e){for(var t=this.getTop();t&&this.dismiss(t.key,e);)t=this.getTop()},C.getTop=function(){return D.top()},C.modalRendered=function(e){var t=D.get(e);C.focusFirstFocusableElement(C.loadFocusElementList(t)),t&&t.value.renderDeferred.resolve()},C.focusFirstFocusableElement=function(e){return e.length>0&&(e[0].focus(),!0)},C.focusLastFocusableElement=function(e){return e.length>0&&(e[e.length-1].focus(),!0)},C.isModalFocused=function(e,t){if(e&&t){var n=t.value.modalDomEl;if(n&&n.length)return(e.target||e.srcElement)===n[0]}return!1},C.isFocusInFirstItem=function(e,t){return t.length>0&&(e.target||e.srcElement)===t[0]},C.isFocusInLastItem=function(e,t){return t.length>0&&(e.target||e.srcElement)===t[t.length-1]},C.loadFocusElementList=function(e){if(e){var t=e.value.modalDomEl;if(t&&t.length){var n=t[0].querySelectorAll(P);return n?Array.prototype.filter.call(n,function(e){return p(e)}):n}}},C}]).provider("$uibModal",function(){var e={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(t,n,a,i,o,r,l){function s(e){return e.template?n.when(e.template):i(angular.isFunction(e.templateUrl)?e.templateUrl():e.templateUrl)}var u={},p=null;return u.getPromiseChain=function(){return p},u.open=function(i){function u(){return g}var c=n.defer(),d=n.defer(),m=n.defer(),f=n.defer(),h={result:c.promise,opened:d.promise,closed:m.promise,rendered:f.promise,close:function(e){return l.close(h,e)},dismiss:function(e){return l.dismiss(h,e)}};if(i=angular.extend({},e.options,i),i.resolve=i.resolve||{},i.appendTo=i.appendTo||a.find("body").eq(0),!i.component&&!i.template&&!i.templateUrl)throw new Error("One of component or template or templateUrl options is required.");var g;g=i.component?n.when(r.resolve(i.resolve,{},null,null)):n.all([s(i),r.resolve(i.resolve,{},null,null)]);var b;return b=p=n.all([p]).then(u,u).then(function(e){function n(t,n,a,i){t.$scope=r,t.$scope.$resolve={},a?t.$scope.$uibModalInstance=h:t.$uibModalInstance=h;var o=n?e[1]:e;angular.forEach(o,function(e,n){i&&(t[n]=e),t.$scope.$resolve[n]=e})}var a=i.scope||t,r=a.$new();r.$close=h.close,r.$dismiss=h.dismiss,r.$on("$destroy",function(){r.$$uibDestructionScheduled||r.$dismiss("$uibUnscheduledDestruction")});var s,u,p={scope:r,deferred:c,renderDeferred:f,closedDeferred:m,animation:i.animation,backdrop:i.backdrop,keyboard:i.keyboard,backdropClass:i.backdropClass,windowTopClass:i.windowTopClass,windowClass:i.windowClass,windowTemplateUrl:i.windowTemplateUrl,ariaLabelledBy:i.ariaLabelledBy,ariaDescribedBy:i.ariaDescribedBy,size:i.size,openedClass:i.openedClass,appendTo:i.appendTo},g={},b={};i.component?(n(g,!1,!0,!1),g.name=i.component,p.component=g):i.controller&&(n(b,!0,!1,!0),u=o(i.controller,b,!0,i.controllerAs),i.controllerAs&&i.bindToController&&(s=u.instance,s.$close=r.$close,s.$dismiss=r.$dismiss,angular.extend(s,{$resolve:b.$scope.$resolve},a)),s=u(),angular.isFunction(s.$onInit)&&s.$onInit()),i.component||(p.content=e[0]),l.open(h,p),d.resolve(!0)},function(e){d.reject(e),c.reject(e)})["finally"](function(){p===b&&(p=null)}),h},u}]};return e}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(e){return{create:function(t,n,a){t.setNumPages=a.numPages?e(a.numPages).assign:angular.noop,t.ngModelCtrl={$setViewValue:angular.noop},t._watchers=[],t.init=function(e,i){t.ngModelCtrl=e,t.config=i,e.$render=function(){t.render()},a.itemsPerPage?t._watchers.push(n.$parent.$watch(a.itemsPerPage,function(e){t.itemsPerPage=parseInt(e,10),n.totalPages=t.calculateTotalPages(),t.updatePage()})):t.itemsPerPage=i.itemsPerPage,n.$watch("totalItems",function(e,a){(angular.isDefined(e)||e!==a)&&(n.totalPages=t.calculateTotalPages(),t.updatePage())})},t.calculateTotalPages=function(){var e=t.itemsPerPage<1?1:Math.ceil(n.totalItems/t.itemsPerPage);return Math.max(e||0,1)},t.render=function(){n.page=parseInt(t.ngModelCtrl.$viewValue,10)||1},n.selectPage=function(e,a){a&&a.preventDefault();var i=!n.ngDisabled||!a;i&&n.page!==e&&e>0&&e<=n.totalPages&&(a&&a.target&&a.target.blur(),t.ngModelCtrl.$setViewValue(e),t.ngModelCtrl.$render())},n.getText=function(e){return n[e+"Text"]||t.config[e+"Text"]},n.noPrevious=function(){return 1===n.page},n.noNext=function(){return n.page===n.totalPages},t.updatePage=function(){t.setNumPages(n.$parent,n.totalPages),n.page>n.totalPages?n.selectPage(n.totalPages):t.ngModelCtrl.$render()},n.$on("$destroy",function(){for(;t._watchers.length;)t._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(e,t,n,a){e.align=angular.isDefined(t.align)?e.$parent.$eval(t.align):a.align,n.create(this,e,t)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(e){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],restrict:"A",controller:"UibPagerController",controllerAs:"pager",templateUrl:function(e,t){return t.templateUrl||"uib/template/pager/pager.html";
+},link:function(t,n,a,i){n.addClass("pager");var o=i[0],r=i[1];r&&o.init(r,e)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(e,t,n,a,i){function o(e,t,n){return{number:e,text:t,active:n}}function r(e,t){var n=[],a=1,i=t,r=angular.isDefined(s)&&s<t;r&&(u?(a=Math.max(e-Math.floor(s/2),1),i=a+s-1,i>t&&(i=t,a=i-s+1)):(a=(Math.ceil(e/s)-1)*s+1,i=Math.min(a+s-1,t)));for(var l=a;l<=i;l++){var m=o(l,d(l),l===e);n.push(m)}if(r&&s>0&&(!u||p||c)){if(a>1){if(!c||a>3){var f=o(a-1,"...",!1);n.unshift(f)}if(c){if(3===a){var h=o(2,"2",!1);n.unshift(h)}var g=o(1,"1",!1);n.unshift(g)}}if(i<t){if(!c||i<t-2){var b=o(i+1,"...",!1);n.push(b)}if(c){if(i===t-2){var v=o(t-1,t-1,!1);n.push(v)}var $=o(t,t,!1);n.push($)}}}return n}var l=this,s=angular.isDefined(t.maxSize)?e.$parent.$eval(t.maxSize):i.maxSize,u=angular.isDefined(t.rotate)?e.$parent.$eval(t.rotate):i.rotate,p=angular.isDefined(t.forceEllipses)?e.$parent.$eval(t.forceEllipses):i.forceEllipses,c=angular.isDefined(t.boundaryLinkNumbers)?e.$parent.$eval(t.boundaryLinkNumbers):i.boundaryLinkNumbers,d=angular.isDefined(t.pageLabel)?function(n){return e.$parent.$eval(t.pageLabel,{$page:n})}:angular.identity;e.boundaryLinks=angular.isDefined(t.boundaryLinks)?e.$parent.$eval(t.boundaryLinks):i.boundaryLinks,e.directionLinks=angular.isDefined(t.directionLinks)?e.$parent.$eval(t.directionLinks):i.directionLinks,a.create(this,e,t),t.maxSize&&l._watchers.push(e.$parent.$watch(n(t.maxSize),function(e){s=parseInt(e,10),l.render()}));var m=this.render;this.render=function(){m(),e.page>0&&e.page<=e.totalPages&&(e.pages=r(e.page,e.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(e,t){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],restrict:"A",controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(e,t){return t.templateUrl||"uib/template/pagination/pagination.html"},link:function(e,n,a,i){n.addClass("pagination");var o=i[0],r=i[1];r&&o.init(r,t)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function e(e){var t=/[A-Z]/g,n="-";return e.replace(t,function(e,t){return(t?n:"")+e.toLowerCase()})}var t={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},n={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},a={};this.options=function(e){angular.extend(a,e)},this.setTriggers=function(e){angular.extend(n,e)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(i,o,r,l,s,u,p,c,d){function m(e){if(27===e.which){var t=f.top();t&&(t.value.close(),t=null)}}var f=d.createNew();return l.on("keyup",m),p.$on("$destroy",function(){l.off("keyup",m)}),function(i,p,d,m){function h(e){var t=(e||m.trigger||d).split(" "),a=t.map(function(e){return n[e]||e});return{show:t,hide:a}}m=angular.extend({},t,a,m);var g=e(i),b=u.startSymbol(),v=u.endSymbol(),$="<div "+g+'-popup uib-title="'+b+"title"+v+'" '+(m.useContentExp?'content-exp="contentExp()" ':'content="'+b+"content"+v+'" ')+'origin-scope="origScope" class="uib-position-measure '+p+'" tooltip-animation-class="fade"uib-tooltip-classes ng-class="{ in: isOpen }" ></div>';return{compile:function(e,t){var n=o($);return function(e,t,a,o){function u(){q.isOpen?g():d()}function d(){R&&!e.$eval(a[p+"Enable"])||(y(),D(),q.popupDelay?A||(A=r(b,q.popupDelay,!1)):b())}function g(){v(),q.popupCloseDelay?I||(I=r($,q.popupCloseDelay,!1)):$()}function b(){return v(),y(),q.content?(w(),void q.$evalAsync(function(){q.isOpen=!0,x(!0),W()})):angular.noop}function v(){A&&(r.cancel(A),A=null),U&&(r.cancel(U),U=null)}function $(){q&&q.$evalAsync(function(){q&&(q.isOpen=!1,x(!1),q.animation?E||(E=r(k,150,!1)):k())})}function y(){I&&(r.cancel(I),I=null),E&&(r.cancel(E),E=null)}function w(){P||(S=q.$new(),P=n(S,function(e){H?l.find("body").append(e):t.after(e)}),f.add(q,{close:$}),C())}function k(){v(),y(),M(),P&&(P.remove(),P=null,N&&r.cancel(N)),f.remove(q),S&&(S.$destroy(),S=null)}function D(){q.title=a[p+"Title"],z?q.content=z(e):q.content=a[i],q.popupClass=a[p+"Class"],q.placement=angular.isDefined(a[p+"Placement"])?a[p+"Placement"]:m.placement;var t=s.parsePlacement(q.placement);F=t[1]?t[0]+"-"+t[1]:t[0];var n=parseInt(a[p+"PopupDelay"],10),o=parseInt(a[p+"PopupCloseDelay"],10);q.popupDelay=isNaN(n)?m.popupDelay:n,q.popupCloseDelay=isNaN(o)?m.popupCloseDelay:o}function x(t){Y&&angular.isFunction(Y.assign)&&Y.assign(e,t)}function C(){B.length=0,z?(B.push(e.$watch(z,function(e){q.content=e,!e&&q.isOpen&&$()})),B.push(S.$watch(function(){L||(L=!0,S.$$postDigest(function(){L=!1,q&&q.isOpen&&W()}))}))):B.push(a.$observe(i,function(e){q.content=e,!e&&q.isOpen?$():W()})),B.push(a.$observe(p+"Title",function(e){q.title=e,q.isOpen&&W()})),B.push(a.$observe(p+"Placement",function(e){q.placement=e?e:m.placement,q.isOpen&&W()}))}function M(){B.length&&(angular.forEach(B,function(e){e()}),B.length=0)}function T(e){q&&q.isOpen&&P&&(t[0].contains(e.target)||P[0].contains(e.target)||g())}function O(){var n=[],i=[],o=e.$eval(a[p+"Trigger"]);j(),angular.isObject(o)?(Object.keys(o).forEach(function(e){n.push(e),i.push(o[e])}),V={show:n,hide:i}):V=h(o),"none"!==V.show&&V.show.forEach(function(e,n){"outsideClick"===e?(t.on("click",u),l.on("click",T)):e===V.hide[n]?t.on(e,u):e&&(t.on(e,d),t.on(V.hide[n],g)),t.on("keypress",function(e){27===e.which&&g()})})}var P,S,E,A,I,U,N,F,H=!!angular.isDefined(m.appendToBody)&&m.appendToBody,V=h(void 0),R=angular.isDefined(a[p+"Enable"]),q=e.$new(!0),L=!1,Y=!!angular.isDefined(a[p+"IsOpen"])&&c(a[p+"IsOpen"]),z=!!m.useContentExp&&c(a[i]),B=[],W=function(){P&&P.html()&&(U||(U=r(function(){var e=s.positionElements(t,P,q.placement,H),n=angular.isDefined(P.offsetHeight)?P.offsetHeight:P.prop("offsetHeight"),a=H?s.offset(t):s.position(t);P.css({top:e.top+"px",left:e.left+"px"});var i=e.placement.split("-");P.hasClass(i[0])||(P.removeClass(F.split("-")[0]),P.addClass(i[0])),P.hasClass(m.placementClassPrefix+e.placement)||(P.removeClass(m.placementClassPrefix+F),P.addClass(m.placementClassPrefix+e.placement)),N=r(function(){var e=angular.isDefined(P.offsetHeight)?P.offsetHeight:P.prop("offsetHeight"),t=s.adjustTop(i,a,n,e);t&&P.css(t),N=null},0,!1),P.hasClass("uib-position-measure")?(s.positionArrow(P,e.placement),P.removeClass("uib-position-measure")):F!==e.placement&&s.positionArrow(P,e.placement),F=e.placement,U=null},0,!1)))};q.origScope=e,q.isOpen=!1,q.contentExp=function(){return q.content},a.$observe("disabled",function(e){e&&v(),e&&q.isOpen&&$()}),Y&&e.$watch(Y,function(e){q&&!e===q.isOpen&&u()});var j=function(){V.show.forEach(function(e){"outsideClick"===e?t.off("click",u):(t.off(e,d),t.off(e,u))}),V.hide.forEach(function(e){"outsideClick"===e?l.off("click",T):t.off(e,g)})};O();var _=e.$eval(a[p+"Animation"]);q.animation=angular.isDefined(_)?!!_:m.animation;var G,K=p+"AppendToBody";G=K in a&&void 0===a[K]||e.$eval(a[K]),H=angular.isDefined(G)?G:H,e.$on("$destroy",function(){j(),k(),q=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(e,t,n,a){return{link:function(i,o,r){var l,s,u,p=i.$eval(r.tooltipTemplateTranscludeScope),c=0,d=function(){s&&(s.remove(),s=null),l&&(l.$destroy(),l=null),u&&(e.leave(u).then(function(){s=null}),s=u,u=null)};i.$watch(t.parseAsResourceUrl(r.uibTooltipTemplateTransclude),function(t){var r=++c;t?(a(t,!0).then(function(a){if(r===c){var i=p.$new(),s=a,m=n(s)(i,function(t){d(),e.enter(t,o)});l=i,u=m,l.$emit("$includeContentLoaded",t)}},function(){r===c&&(d(),i.$emit("$includeContentError",t))}),i.$emit("$includeContentRequested",t)):d()}),i.$on("$destroy",d)}}}]).directive("uibTooltipClasses",["$uibPosition",function(e){return{restrict:"A",link:function(t,n,a){if(t.placement){var i=e.parsePlacement(t.placement);n.addClass(i[0])}t.popupClass&&n.addClass(t.popupClass),t.animation&&n.addClass(a.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{restrict:"A",scope:{content:"@"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(e){return e("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{restrict:"A",scope:{contentExp:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(e){return e("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{restrict:"A",scope:{contentExp:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(e){return e("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{restrict:"A",scope:{uibTitle:"@",contentExp:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(e){return e("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{restrict:"A",scope:{contentExp:"&",uibTitle:"@"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(e){return e("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{restrict:"A",scope:{uibTitle:"@",content:"@"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(e){return e("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(e,t,n){function a(){return angular.isDefined(e.maxParam)?e.maxParam:n.max}var i=this,o=angular.isDefined(t.animate)?e.$parent.$eval(t.animate):n.animate;this.bars=[],e.max=a(),this.addBar=function(e,t,n){o||t.css({transition:"none"}),this.bars.push(e),e.max=a(),e.title=n&&angular.isDefined(n.title)?n.title:"progressbar",e.$watch("value",function(t){e.recalculatePercentage()}),e.recalculatePercentage=function(){var t=i.bars.reduce(function(e,t){return t.percent=+(100*t.value/t.max).toFixed(2),e+t.percent},0);t>100&&(e.percent-=t-100)},e.$on("$destroy",function(){t=null,i.removeBar(e)})},this.removeBar=function(e){this.bars.splice(this.bars.indexOf(e),1),this.bars.forEach(function(e){e.recalculatePercentage()})},e.$watch("maxParam",function(e){i.bars.forEach(function(e){e.max=a(),e.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{maxParam:"=?max"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(e,t,n,a){a.addBar(e,t,n)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",maxParam:"=?max",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(e,t,n,a){a.addBar(e,angular.element(t.children()[0]),{title:n.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,enableReset:!0,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(e,t,n){var a={$setViewValue:angular.noop},i=this;this.init=function(i){a=i,a.$render=this.render,a.$formatters.push(function(e){return angular.isNumber(e)&&e<<0!==e&&(e=Math.round(e)),e}),this.stateOn=angular.isDefined(t.stateOn)?e.$parent.$eval(t.stateOn):n.stateOn,this.stateOff=angular.isDefined(t.stateOff)?e.$parent.$eval(t.stateOff):n.stateOff,this.enableReset=angular.isDefined(t.enableReset)?e.$parent.$eval(t.enableReset):n.enableReset;var o=angular.isDefined(t.titles)?e.$parent.$eval(t.titles):n.titles;this.titles=angular.isArray(o)&&o.length>0?o:n.titles;var r=angular.isDefined(t.ratingStates)?e.$parent.$eval(t.ratingStates):new Array(angular.isDefined(t.max)?e.$parent.$eval(t.max):n.max);e.range=this.buildTemplateObjects(r)},this.buildTemplateObjects=function(e){for(var t=0,n=e.length;t<n;t++)e[t]=angular.extend({index:t},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(t)},e[t]);return e},this.getTitle=function(e){return e>=this.titles.length?e+1:this.titles[e]},e.rate=function(t){if(!e.readonly&&t>=0&&t<=e.range.length){var n=i.enableReset&&a.$viewValue===t?0:t;a.$setViewValue(n),a.$render()}},e.enter=function(t){e.readonly||(e.value=t),e.onHover({value:t})},e.reset=function(){e.value=a.$viewValue,e.onLeave()},e.onKeydown=function(t){/(37|38|39|40)/.test(t.which)&&(t.preventDefault(),t.stopPropagation(),e.rate(e.value+(38===t.which||39===t.which?1:-1)))},this.render=function(){e.value=a.$viewValue,e.title=i.getTitle(e.value-1)}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],restrict:"A",scope:{readonly:"=?readOnly",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",link:function(e,t,n,a){var i=a[0],o=a[1];i.init(o)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(e){function t(e){for(var t=0;t<a.tabs.length;t++)if(a.tabs[t].index===e)return t}var n,a=this;a.tabs=[],a.select=function(e,o){if(!i){var r=t(n),l=a.tabs[r];if(l){if(l.tab.onDeselect({$event:o,$selectedIndex:e}),o&&o.isDefaultPrevented())return;l.tab.active=!1}var s=a.tabs[e];s?(s.tab.onSelect({$event:o}),s.tab.active=!0,a.active=s.index,n=s.index):!s&&angular.isDefined(n)&&(a.active=null,n=null)}},a.addTab=function(e){if(a.tabs.push({tab:e,index:e.index}),a.tabs.sort(function(e,t){return e.index>t.index?1:e.index<t.index?-1:0}),e.index===a.active||!angular.isDefined(a.active)&&1===a.tabs.length){var n=t(e.index);a.select(n)}},a.removeTab=function(e){for(var t,n=0;n<a.tabs.length;n++)if(a.tabs[n].tab===e){t=n;break}if(a.tabs[t].index===a.active){var i=t===a.tabs.length-1?t-1:t+1%a.tabs.length;a.select(i)}a.tabs.splice(t,1)},e.$watch("tabset.active",function(e){angular.isDefined(e)&&e!==n&&a.select(t(e))});var i;e.$on("$destroy",function(){i=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{},bindToController:{active:"=?",type:"@"},controller:"UibTabsetController",controllerAs:"tabset",templateUrl:function(e,t){return t.templateUrl||"uib/template/tabs/tabset.html"},link:function(e,t,n){e.vertical=!!angular.isDefined(n.vertical)&&e.$parent.$eval(n.vertical),e.justified=!!angular.isDefined(n.justified)&&e.$parent.$eval(n.justified)}}}).directive("uibTab",["$parse",function(e){return{require:"^uibTabset",replace:!0,templateUrl:function(e,t){return t.templateUrl||"uib/template/tabs/tab.html"},transclude:!0,scope:{heading:"@",index:"=?",classes:"@?",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(t,n,a,i,o){t.disabled=!1,a.disable&&t.$parent.$watch(e(a.disable),function(e){t.disabled=!!e}),angular.isUndefined(a.index)&&(i.tabs&&i.tabs.length?t.index=Math.max.apply(null,i.tabs.map(function(e){return e.index}))+1:t.index=0),angular.isUndefined(a.classes)&&(t.classes=""),t.select=function(e){if(!t.disabled){for(var n,a=0;a<i.tabs.length;a++)if(i.tabs[a].tab===t){n=a;break}i.select(n,e)}},i.addTab(t),t.$on("$destroy",function(){i.removeTab(t)}),t.$transcludeFn=o}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(e,t){e.$watch("headingElement",function(e){e&&(t.html(""),t.append(e))})}}}).directive("uibTabContentTransclude",function(){function e(e){return e.tagName&&(e.hasAttribute("uib-tab-heading")||e.hasAttribute("data-uib-tab-heading")||e.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===e.tagName.toLowerCase()||"data-uib-tab-heading"===e.tagName.toLowerCase()||"x-uib-tab-heading"===e.tagName.toLowerCase()||"uib:tab-heading"===e.tagName.toLowerCase())}return{restrict:"A",require:"^uibTabset",link:function(t,n,a){var i=t.$eval(a.uibTabContentTransclude).tab;i.$transcludeFn(i.$parent,function(t){angular.forEach(t,function(t){e(t)?i.headingElement=t:n.append(t)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(e,t,n,a,i,o,r){function l(){var t=+e.hours,n=e.showMeridian?t>0&&t<13:t>=0&&t<24;if(n&&""!==e.hours)return e.showMeridian&&(12===t&&(t=0),e.meridian===x[1]&&(t+=12)),t}function s(){var t=+e.minutes,n=t>=0&&t<60;if(n&&""!==e.minutes)return t}function u(){var t=+e.seconds;return t>=0&&t<60?t:void 0}function p(e,t){return null===e?"":angular.isDefined(e)&&e.toString().length<2&&!t?"0"+e:e.toString()}function c(e){d(),D.$setViewValue(new Date(w)),m(e)}function d(){v&&v.$setValidity("hours",!0),$&&$.$setValidity("minutes",!0),y&&y.$setValidity("seconds",!0),D.$setValidity("time",!0),e.invalidHours=!1,e.invalidMinutes=!1,e.invalidSeconds=!1}function m(t){if(D.$modelValue){var n=w.getHours(),a=w.getMinutes(),i=w.getSeconds();e.showMeridian&&(n=0===n||12===n?12:n%12),e.hours="h"===t?n:p(n,!C),"m"!==t&&(e.minutes=p(a)),e.meridian=w.getHours()<12?x[0]:x[1],"s"!==t&&(e.seconds=p(i)),e.meridian=w.getHours()<12?x[0]:x[1]}else e.hours=null,e.minutes=null,e.seconds=null,e.meridian=x[0]}function f(e){w=g(w,e),c()}function h(e,t){return g(e,60*t)}function g(e,t){var n=new Date(e.getTime()+1e3*t),a=new Date(e);return a.setHours(n.getHours(),n.getMinutes(),n.getSeconds()),a}function b(){return(null===e.hours||""===e.hours)&&(null===e.minutes||""===e.minutes)&&(!e.showSeconds||e.showSeconds&&(null===e.seconds||""===e.seconds))}var v,$,y,w=new Date,k=[],D={$setViewValue:angular.noop},x=angular.isDefined(n.meridians)?e.$parent.$eval(n.meridians):r.meridians||o.DATETIME_FORMATS.AMPMS,C=!angular.isDefined(n.padHours)||e.$parent.$eval(n.padHours);e.tabindex=angular.isDefined(n.tabindex)?n.tabindex:0,t.removeAttr("tabindex"),this.init=function(t,a){D=t,D.$render=this.render,D.$formatters.unshift(function(e){return e?new Date(e):null});var i=a.eq(0),o=a.eq(1),l=a.eq(2);v=i.controller("ngModel"),$=o.controller("ngModel"),y=l.controller("ngModel");var s=angular.isDefined(n.mousewheel)?e.$parent.$eval(n.mousewheel):r.mousewheel;s&&this.setupMousewheelEvents(i,o,l);var u=angular.isDefined(n.arrowkeys)?e.$parent.$eval(n.arrowkeys):r.arrowkeys;u&&this.setupArrowkeyEvents(i,o,l),e.readonlyInput=angular.isDefined(n.readonlyInput)?e.$parent.$eval(n.readonlyInput):r.readonlyInput,this.setupInputEvents(i,o,l)};var M=r.hourStep;n.hourStep&&k.push(e.$parent.$watch(a(n.hourStep),function(e){M=+e}));var T=r.minuteStep;n.minuteStep&&k.push(e.$parent.$watch(a(n.minuteStep),function(e){T=+e}));var O;k.push(e.$parent.$watch(a(n.min),function(e){var t=new Date(e);O=isNaN(t)?void 0:t}));var P;k.push(e.$parent.$watch(a(n.max),function(e){var t=new Date(e);P=isNaN(t)?void 0:t}));var S=!1;n.ngDisabled&&k.push(e.$parent.$watch(a(n.ngDisabled),function(e){S=e})),e.noIncrementHours=function(){var e=h(w,60*M);return S||e>P||e<w&&e<O},e.noDecrementHours=function(){var e=h(w,60*-M);return S||e<O||e>w&&e>P},e.noIncrementMinutes=function(){var e=h(w,T);return S||e>P||e<w&&e<O},e.noDecrementMinutes=function(){var e=h(w,-T);return S||e<O||e>w&&e>P},e.noIncrementSeconds=function(){var e=g(w,E);return S||e>P||e<w&&e<O},e.noDecrementSeconds=function(){var e=g(w,-E);return S||e<O||e>w&&e>P},e.noToggleMeridian=function(){return w.getHours()<12?S||h(w,720)>P:S||h(w,-720)<O};var E=r.secondStep;n.secondStep&&k.push(e.$parent.$watch(a(n.secondStep),function(e){E=+e})),e.showSeconds=r.showSeconds,n.showSeconds&&k.push(e.$parent.$watch(a(n.showSeconds),function(t){e.showSeconds=!!t})),e.showMeridian=r.showMeridian,n.showMeridian&&k.push(e.$parent.$watch(a(n.showMeridian),function(t){if(e.showMeridian=!!t,D.$error.time){var n=l(),a=s();angular.isDefined(n)&&angular.isDefined(a)&&(w.setHours(n),c())}else m()})),this.setupMousewheelEvents=function(t,n,a){var i=function(e){e.originalEvent&&(e=e.originalEvent);var t=e.wheelDelta?e.wheelDelta:-e.deltaY;return e.detail||t>0};t.bind("mousewheel wheel",function(t){S||e.$apply(i(t)?e.incrementHours():e.decrementHours()),t.preventDefault()}),n.bind("mousewheel wheel",function(t){S||e.$apply(i(t)?e.incrementMinutes():e.decrementMinutes()),t.preventDefault()}),a.bind("mousewheel wheel",function(t){S||e.$apply(i(t)?e.incrementSeconds():e.decrementSeconds()),t.preventDefault()})},this.setupArrowkeyEvents=function(t,n,a){t.bind("keydown",function(t){S||(38===t.which?(t.preventDefault(),e.incrementHours(),e.$apply()):40===t.which&&(t.preventDefault(),e.decrementHours(),e.$apply()))}),n.bind("keydown",function(t){S||(38===t.which?(t.preventDefault(),e.incrementMinutes(),e.$apply()):40===t.which&&(t.preventDefault(),e.decrementMinutes(),e.$apply()))}),a.bind("keydown",function(t){S||(38===t.which?(t.preventDefault(),e.incrementSeconds(),e.$apply()):40===t.which&&(t.preventDefault(),e.decrementSeconds(),e.$apply()))})},this.setupInputEvents=function(t,n,a){if(e.readonlyInput)return e.updateHours=angular.noop,e.updateMinutes=angular.noop,void(e.updateSeconds=angular.noop);var i=function(t,n,a){D.$setViewValue(null),D.$setValidity("time",!1),angular.isDefined(t)&&(e.invalidHours=t,v&&v.$setValidity("hours",!1)),angular.isDefined(n)&&(e.invalidMinutes=n,$&&$.$setValidity("minutes",!1)),angular.isDefined(a)&&(e.invalidSeconds=a,y&&y.$setValidity("seconds",!1))};e.updateHours=function(){var e=l(),t=s();D.$setDirty(),angular.isDefined(e)&&angular.isDefined(t)?(w.setHours(e),w.setMinutes(t),w<O||w>P?i(!0):c("h")):i(!0)},t.bind("blur",function(t){D.$setTouched(),b()?d():null===e.hours||""===e.hours?i(!0):!e.invalidHours&&e.hours<10&&e.$apply(function(){e.hours=p(e.hours,!C)})}),e.updateMinutes=function(){var e=s(),t=l();D.$setDirty(),angular.isDefined(e)&&angular.isDefined(t)?(w.setHours(t),w.setMinutes(e),w<O||w>P?i(void 0,!0):c("m")):i(void 0,!0)},n.bind("blur",function(t){D.$setTouched(),b()?d():null===e.minutes?i(void 0,!0):!e.invalidMinutes&&e.minutes<10&&e.$apply(function(){e.minutes=p(e.minutes)})}),e.updateSeconds=function(){var e=u();D.$setDirty(),angular.isDefined(e)?(w.setSeconds(e),c("s")):i(void 0,void 0,!0)},a.bind("blur",function(t){b()?d():!e.invalidSeconds&&e.seconds<10&&e.$apply(function(){e.seconds=p(e.seconds)})})},this.render=function(){var t=D.$viewValue;isNaN(t)?(D.$setValidity("time",!1),i.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(t&&(w=t),w<O||w>P?(D.$setValidity("time",!1),e.invalidHours=!0,e.invalidMinutes=!0):d(),m())},e.showSpinners=angular.isDefined(n.showSpinners)?e.$parent.$eval(n.showSpinners):r.showSpinners,e.incrementHours=function(){e.noIncrementHours()||f(60*M*60)},e.decrementHours=function(){e.noDecrementHours()||f(60*-M*60)},e.incrementMinutes=function(){e.noIncrementMinutes()||f(60*T)},e.decrementMinutes=function(){e.noDecrementMinutes()||f(60*-T)},e.incrementSeconds=function(){e.noIncrementSeconds()||f(E)},e.decrementSeconds=function(){e.noDecrementSeconds()||f(-E)},e.toggleMeridian=function(){var t=s(),n=l();e.noToggleMeridian()||(angular.isDefined(t)&&angular.isDefined(n)?f(720*(w.getHours()<12?60:-60)):e.meridian=e.meridian===x[0]?x[1]:x[0])},e.blur=function(){D.$setTouched()},e.$on("$destroy",function(){for(;k.length;)k.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(e){return{require:["uibTimepicker","?^ngModel"],restrict:"A",controller:"UibTimepickerController",controllerAs:"timepicker",scope:{},templateUrl:function(t,n){return n.templateUrl||e.templateUrl},link:function(e,t,n,a){var i=a[0],o=a[1];o&&i.init(o,t.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(e){var t=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(n){var a=n.match(t);if(!a)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+n+'".');return{itemName:a[3],source:e(a[4]),viewMapper:e(a[2]||a[1]),modelMapper:e(a[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(e,t,n,a,i,o,r,l,s,u,p,c,d){function m(){q.moveInProgress||(q.moveInProgress=!0,q.$digest()),Z()}function f(){q.position=S?c.offset(t):c.position(t),q.position.top+=t.prop("offsetHeight")}var h,g,b=[9,13,27,38,40],v=200,$=e.$eval(n.typeaheadMinLength);$||0===$||($=1),e.$watch(n.typeaheadMinLength,function(e){$=e||0===e?e:1});var y=e.$eval(n.typeaheadWaitMs)||0,w=e.$eval(n.typeaheadEditable)!==!1;e.$watch(n.typeaheadEditable,function(e){w=e!==!1});var k,D,x=i(n.typeaheadLoading).assign||angular.noop,C=n.typeaheadShouldSelect?i(n.typeaheadShouldSelect):function(e,t){var n=t.$event;return 13===n.which||9===n.which},M=i(n.typeaheadOnSelect),T=!!angular.isDefined(n.typeaheadSelectOnBlur)&&e.$eval(n.typeaheadSelectOnBlur),O=i(n.typeaheadNoResults).assign||angular.noop,P=n.typeaheadInputFormatter?i(n.typeaheadInputFormatter):void 0,S=!!n.typeaheadAppendToBody&&e.$eval(n.typeaheadAppendToBody),E=n.typeaheadAppendTo?e.$eval(n.typeaheadAppendTo):null,A=e.$eval(n.typeaheadFocusFirst)!==!1,I=!!n.typeaheadSelectOnExact&&e.$eval(n.typeaheadSelectOnExact),U=i(n.typeaheadIsOpen).assign||angular.noop,N=e.$eval(n.typeaheadShowHint)||!1,F=i(n.ngModel),H=i(n.ngModel+"($$$p)"),V=function(t,n){return angular.isFunction(F(e))&&g&&g.$options&&g.$options.getterSetter?H(t,{$$$p:n}):F.assign(t,n)},R=d.parse(n.uibTypeahead),q=e.$new(),L=e.$on("$destroy",function(){q.$destroy()});q.$on("$destroy",L);var Y="typeahead-"+q.$id+"-"+Math.floor(1e4*Math.random());t.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":Y});var z,B;N&&(z=angular.element("<div></div>"),z.css("position","relative"),t.after(z),B=t.clone(),B.attr("placeholder",""),B.attr("tabindex","-1"),B.val(""),B.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),t.css({position:"relative","vertical-align":"top","background-color":"transparent"}),B.attr("id")&&B.removeAttr("id"),z.append(B),B.after(t));var W=angular.element("<div uib-typeahead-popup></div>");W.attr({id:Y,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(n.typeaheadTemplateUrl)&&W.attr("template-url",n.typeaheadTemplateUrl),angular.isDefined(n.typeaheadPopupTemplateUrl)&&W.attr("popup-template-url",n.typeaheadPopupTemplateUrl);var j=function(){N&&B.val("")},_=function(){q.matches=[],q.activeIdx=-1,t.attr("aria-expanded",!1),j()},G=function(e){return Y+"-option-"+e};q.$watch("activeIdx",function(e){e<0?t.removeAttr("aria-activedescendant"):t.attr("aria-activedescendant",G(e))});var K=function(e,t){return!!(q.matches.length>t&&e)&&e.toUpperCase()===q.matches[t].label.toUpperCase()},X=function(n,a){var i={$viewValue:n};x(e,!0),O(e,!1),o.when(R.source(e,i)).then(function(o){var r=n===h.$viewValue;if(r&&k)if(o&&o.length>0){q.activeIdx=A?0:-1,O(e,!1),q.matches.length=0;for(var l=0;l<o.length;l++)i[R.itemName]=o[l],q.matches.push({id:G(l),label:R.viewMapper(q,i),model:o[l]});if(q.query=n,f(),t.attr("aria-expanded",!0),I&&1===q.matches.length&&K(n,0)&&(angular.isNumber(q.debounceUpdate)||angular.isObject(q.debounceUpdate)?p(function(){q.select(0,a)},angular.isNumber(q.debounceUpdate)?q.debounceUpdate:q.debounceUpdate["default"]):q.select(0,a)),N){var s=q.matches[0].label;angular.isString(n)&&n.length>0&&s.slice(0,n.length).toUpperCase()===n.toUpperCase()?B.val(n+s.slice(n.length)):B.val("")}}else _(),O(e,!0);r&&x(e,!1)},function(){_(),x(e,!1),O(e,!0)})};S&&(angular.element(s).on("resize",m),l.find("body").on("scroll",m));var Z=p(function(){q.matches.length&&f(),q.moveInProgress=!1},v);q.moveInProgress=!1,q.query=void 0;var J,Q=function(e){J=r(function(){X(e)},y)},ee=function(){J&&r.cancel(J)};_(),q.assignIsOpen=function(t){U(e,t)},q.select=function(a,i){var o,l,s={};D=!0,s[R.itemName]=l=q.matches[a].model,o=R.modelMapper(e,s),V(e,o),h.$setValidity("editable",!0),h.$setValidity("parse",!0),M(e,{$item:l,$model:o,$label:R.viewMapper(e,s),$event:i}),_(),q.$eval(n.typeaheadFocusOnSelect)!==!1&&r(function(){t[0].focus()},0,!1)},t.on("keydown",function(t){if(0!==q.matches.length&&b.indexOf(t.which)!==-1){var n=C(e,{$event:t});if(q.activeIdx===-1&&n||9===t.which&&t.shiftKey)return _(),void q.$digest();t.preventDefault();var a;switch(t.which){case 27:t.stopPropagation(),_(),e.$digest();break;case 38:q.activeIdx=(q.activeIdx>0?q.activeIdx:q.matches.length)-1,q.$digest(),a=W[0].querySelectorAll(".uib-typeahead-match")[q.activeIdx],a.parentNode.scrollTop=a.offsetTop;break;case 40:q.activeIdx=(q.activeIdx+1)%q.matches.length,q.$digest(),a=W[0].querySelectorAll(".uib-typeahead-match")[q.activeIdx],a.parentNode.scrollTop=a.offsetTop;break;default:n&&q.$apply(function(){angular.isNumber(q.debounceUpdate)||angular.isObject(q.debounceUpdate)?p(function(){q.select(q.activeIdx,t)},angular.isNumber(q.debounceUpdate)?q.debounceUpdate:q.debounceUpdate["default"]):q.select(q.activeIdx,t)})}}}),t.bind("focus",function(e){k=!0,0!==$||h.$viewValue||r(function(){X(h.$viewValue,e)},0)}),t.bind("blur",function(e){T&&q.matches.length&&q.activeIdx!==-1&&!D&&(D=!0,q.$apply(function(){angular.isObject(q.debounceUpdate)&&angular.isNumber(q.debounceUpdate.blur)?p(function(){q.select(q.activeIdx,e)},q.debounceUpdate.blur):q.select(q.activeIdx,e)})),!w&&h.$error.editable&&(h.$setViewValue(),q.$apply(function(){h.$setValidity("editable",!0),h.$setValidity("parse",!0)}),t.val("")),k=!1,D=!1});var te=function(n){t[0]!==n.target&&3!==n.which&&0!==q.matches.length&&(_(),u.$$phase||e.$digest())};l.on("click",te),e.$on("$destroy",function(){l.off("click",te),(S||E)&&ne.remove(),S&&(angular.element(s).off("resize",m),l.find("body").off("scroll",m)),W.remove(),N&&z.remove()});var ne=a(W)(q);S?l.find("body").append(ne):E?angular.element(E).eq(0).append(ne):t.after(ne),this.init=function(t,n){h=t,g=n,q.debounceUpdate=h.$options&&i(h.$options.debounce)(e),h.$parsers.unshift(function(t){return k=!0,0===$||t&&t.length>=$?y>0?(ee(),Q(t)):X(t):(x(e,!1),ee(),_()),w?t:t?void h.$setValidity("editable",!1):(h.$setValidity("editable",!0),null)}),h.$formatters.push(function(t){var n,a,i={};return w||h.$setValidity("editable",!0),P?(i.$model=t,P(e,i)):(i[R.itemName]=t,n=R.viewMapper(e,i),i[R.itemName]=void 0,a=R.viewMapper(e,i),n!==a?n:t)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(e,t,n,a){
+a[2].init(a[0],a[1])}}}).directive("uibTypeaheadPopup",["$$debounce",function(e){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(e,t){return t.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(t,n,a){t.templateUrl=a.templateUrl,t.isOpen=function(){var e=t.matches.length>0;return t.assignIsOpen({isOpen:e}),e},t.isActive=function(e){return t.active===e},t.selectActive=function(e){t.active=e},t.selectMatch=function(n,a){var i=t.debounce();angular.isNumber(i)||angular.isObject(i)?e(function(){t.select({activeIdx:n,evt:a})},angular.isNumber(i)?i:i["default"]):t.select({activeIdx:n,evt:a})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(e,t,n){return{scope:{index:"=",match:"=",query:"="},link:function(a,i,o){var r=n(o.templateUrl)(a.$parent)||"uib/template/typeahead/typeahead-match.html";e(r).then(function(e){var n=angular.element(e.trim());i.replaceWith(n),t(n)(a)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(e,t,n){function a(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function i(e){return/<.*>/g.test(e)}var o;return o=t.has("$sanitize"),function(t,r){return!o&&i(t)&&n.warn("Unsafe use of typeahead please use ngSanitize"),t=r?(""+t).replace(new RegExp(a(r),"gi"),"<strong>$&</strong>"):t,o||(t=e.trustAsHtml(t)),t}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(e){e.put("uib/template/accordion/accordion-group.html",'<div role="tab" id="{{::headingId}}" aria-selected="{{isOpen}}" class="panel-heading" ng-keypress="toggleOpen($event)">\n <h4 class="panel-title">\n <a role="button" data-toggle="collapse" href aria-expanded="{{isOpen}}" aria-controls="{{::panelId}}" tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading" ng-disabled="isDisabled" uib-tabindex-toggle><span uib-accordion-header ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n </h4>\n</div>\n<div id="{{::panelId}}" aria-labelledby="{{::headingId}}" aria-hidden="{{!isOpen}}" role="tabpanel" class="panel-collapse collapse" uib-collapse="!isOpen">\n <div class="panel-body" ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(e){e.put("uib/template/accordion/accordion.html",'<div role="tablist" class="panel-group" ng-transclude></div>')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(e){e.put("uib/template/alert/alert.html",'<button ng-show="closeable" type="button" class="close" ng-click="close({$event: $event})">\n <span aria-hidden="true">×</span>\n <span class="sr-only">Close</span>\n</button>\n<div ng-transclude></div>\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(e){e.put("uib/template/carousel/carousel.html",'<div class="carousel-inner" ng-transclude></div>\n<a role="button" href class="left carousel-control" ng-click="prev()" ng-class="{ disabled: isPrevDisabled() }" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-left"></span>\n <span class="sr-only">previous</span>\n</a>\n<a role="button" href class="right carousel-control" ng-click="next()" ng-class="{ disabled: isNextDisabled() }" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-right"></span>\n <span class="sr-only">next</span>\n</a>\n<ol class="carousel-indicators" ng-show="slides.length > 1">\n <li ng-repeat="slide in slides | orderBy:indexOfSlide track by $index" ng-class="{ active: isActive(slide) }" ng-click="select(slide)">\n <span class="sr-only">slide {{ $index + 1 }} of {{ slides.length }}<span ng-if="isActive(slide)">, currently active</span></span>\n </li>\n</ol>\n')}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(e){e.put("uib/template/carousel/slide.html",'<div class="text-center" ng-transclude></div>\n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(e){e.put("uib/template/datepicker/datepicker.html",'<div ng-switch="datepickerMode">\n <div uib-daypicker ng-switch-when="day" tabindex="0" class="uib-daypicker"></div>\n <div uib-monthpicker ng-switch-when="month" tabindex="0" class="uib-monthpicker"></div>\n <div uib-yearpicker ng-switch-when="year" tabindex="0" class="uib-yearpicker"></div>\n</div>\n')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(e){e.put("uib/template/datepicker/day.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-left"></i><span class="sr-only">previous</span></button></th>\n <th colspan="{{::5 + showWeeks}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-right"></i><span class="sr-only">next</span></button></th>\n </tr>\n <tr>\n <th ng-if="showWeeks" class="text-center"></th>\n <th ng-repeat="label in ::labels track by $index" class="text-center"><small aria-label="{{::label.full}}">{{::label.abbr}}</small></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-weeks" ng-repeat="row in rows track by $index" role="row">\n <td ng-if="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n <td ng-repeat="dt in row" class="uib-day text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default btn-sm"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(e){e.put("uib/template/datepicker/month.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-left"></i><span class="sr-only">previous</span></button></th>\n <th colspan="{{::yearHeaderColspan}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-right"></i><span class="sr-only">next</span></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-months" ng-repeat="row in rows track by $index" role="row">\n <td ng-repeat="dt in row" class="uib-month text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(e){e.put("uib/template/datepicker/year.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-left"></i><span class="sr-only">previous</span></button></th>\n <th colspan="{{::columns - 2}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-right"></i><span class="sr-only">next</span></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-years" ng-repeat="row in rows track by $index" role="row">\n <td ng-repeat="dt in row" class="uib-year text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepickerPopup/popup.html",[]).run(["$templateCache",function(e){e.put("uib/template/datepickerPopup/popup.html",'<ul role="presentation" class="uib-datepicker-popup dropdown-menu uib-position-measure" dropdown-nested ng-if="isOpen" ng-keydown="keydown($event)" ng-click="$event.stopPropagation()">\n <li ng-transclude></li>\n <li ng-if="showButtonBar" class="uib-button-bar">\n <span class="btn-group pull-left">\n <button type="button" class="btn btn-sm btn-info uib-datepicker-current" ng-click="select(\'today\', $event)" ng-disabled="isDisabled(\'today\')">{{ getText(\'current\') }}</button>\n <button type="button" class="btn btn-sm btn-danger uib-clear" ng-click="select(null, $event)">{{ getText(\'clear\') }}</button>\n </span>\n <button type="button" class="btn btn-sm btn-success pull-right uib-close" ng-click="close($event)">{{ getText(\'close\') }}</button>\n </li>\n</ul>\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(e){e.put("uib/template/modal/window.html","<div class=\"modal-dialog {{size ? 'modal-' + size : ''}}\"><div class=\"modal-content\" uib-modal-transclude></div></div>\n")}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(e){e.put("uib/template/pager/pager.html",'<li ng-class="{disabled: noPrevious()||ngDisabled, previous: align}"><a href ng-click="selectPage(page - 1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'previous\')}}</a></li>\n<li ng-class="{disabled: noNext()||ngDisabled, next: align}"><a href ng-click="selectPage(page + 1, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'next\')}}</a></li>\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(e){e.put("uib/template/pagination/pagination.html",'<li ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-first"><a href ng-click="selectPage(1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'first\')}}</a></li>\n<li ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-prev"><a href ng-click="selectPage(page - 1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'previous\')}}</a></li>\n<li ng-repeat="page in pages track by $index" ng-class="{active: page.active,disabled: ngDisabled&&!page.active}" class="pagination-page"><a href ng-click="selectPage(page.number, $event)" ng-disabled="ngDisabled&&!page.active" uib-tabindex-toggle>{{page.text}}</a></li>\n<li ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-next"><a href ng-click="selectPage(page + 1, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'next\')}}</a></li>\n<li ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-last"><a href ng-click="selectPage(totalPages, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'last\')}}</a></li>\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(e){e.put("uib/template/tooltip/tooltip-html-popup.html",'<div class="tooltip-arrow"></div>\n<div class="tooltip-inner" ng-bind-html="contentExp()"></div>\n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(e){e.put("uib/template/tooltip/tooltip-popup.html",'<div class="tooltip-arrow"></div>\n<div class="tooltip-inner" ng-bind="content"></div>\n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(e){e.put("uib/template/tooltip/tooltip-template-popup.html",'<div class="tooltip-arrow"></div>\n<div class="tooltip-inner"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(e){e.put("uib/template/popover/popover-html.html",'<div class="arrow"></div>\n\n<div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content" ng-bind-html="contentExp()"></div>\n</div>\n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(e){e.put("uib/template/popover/popover-template.html",'<div class="arrow"></div>\n\n<div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n</div>\n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(e){e.put("uib/template/popover/popover.html",'<div class="arrow"></div>\n\n<div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content" ng-bind="content"></div>\n</div>\n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(e){e.put("uib/template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(e){e.put("uib/template/progressbar/progress.html",'<div class="progress" ng-transclude aria-labelledby="{{::title}}"></div>')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(e){e.put("uib/template/progressbar/progressbar.html",'<div class="progress">\n <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(e){e.put("uib/template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}" aria-valuetext="{{title}}">\n <span ng-repeat-start="r in range track by $index" class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n <i ng-repeat-end ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')" ng-attr-title="{{r.title}}"></i>\n</span>\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(e){e.put("uib/template/tabs/tab.html",'<li ng-class="[{active: active, disabled: disabled}, classes]" class="uib-tab nav-item">\n <a href ng-click="select($event)" class="nav-link" uib-tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(e){e.put("uib/template/tabs/tabset.html",'<div>\n <ul class="nav nav-{{tabset.type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n <div class="tab-content">\n <div class="tab-pane"\n ng-repeat="tab in tabset.tabs"\n ng-class="{active: tabset.active === tab.index}"\n uib-tab-content-transclude="tab">\n </div>\n </div>\n</div>\n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(e){e.put("uib/template/timepicker/timepicker.html",'<table class="uib-timepicker">\n <tbody>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-increment hours"><a ng-click="incrementHours()" ng-class="{disabled: noIncrementHours()}" class="btn btn-link" ng-disabled="noIncrementHours()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td> </td>\n <td class="uib-increment minutes"><a ng-click="incrementMinutes()" ng-class="{disabled: noIncrementMinutes()}" class="btn btn-link" ng-disabled="noIncrementMinutes()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showSeconds"> </td>\n <td ng-show="showSeconds" class="uib-increment seconds"><a ng-click="incrementSeconds()" ng-class="{disabled: noIncrementSeconds()}" class="btn btn-link" ng-disabled="noIncrementSeconds()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n <tr>\n <td class="form-group uib-time hours" ng-class="{\'has-error\': invalidHours}">\n <input type="text" placeholder="HH" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementHours()" ng-blur="blur()">\n </td>\n <td class="uib-separator">:</td>\n <td class="form-group uib-time minutes" ng-class="{\'has-error\': invalidMinutes}">\n <input type="text" placeholder="MM" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementMinutes()" ng-blur="blur()">\n </td>\n <td ng-show="showSeconds" class="uib-separator">:</td>\n <td class="form-group uib-time seconds" ng-class="{\'has-error\': invalidSeconds}" ng-show="showSeconds">\n <input type="text" placeholder="SS" ng-model="seconds" ng-change="updateSeconds()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementSeconds()" ng-blur="blur()">\n </td>\n <td ng-show="showMeridian" class="uib-time am-pm"><button type="button" ng-class="{disabled: noToggleMeridian()}" class="btn btn-default text-center" ng-click="toggleMeridian()" ng-disabled="noToggleMeridian()" tabindex="{{::tabindex}}">{{meridian}}</button></td>\n </tr>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-decrement hours"><a ng-click="decrementHours()" ng-class="{disabled: noDecrementHours()}" class="btn btn-link" ng-disabled="noDecrementHours()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td> </td>\n <td class="uib-decrement minutes"><a ng-click="decrementMinutes()" ng-class="{disabled: noDecrementMinutes()}" class="btn btn-link" ng-disabled="noDecrementMinutes()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showSeconds"> </td>\n <td ng-show="showSeconds" class="uib-decrement seconds"><a ng-click="decrementSeconds()" ng-class="{disabled: noDecrementSeconds()}" class="btn btn-link" ng-disabled="noDecrementSeconds()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(e){e.put("uib/template/typeahead/typeahead-match.html",'<a href\n tabindex="-1"\n ng-bind-html="match.label | uibTypeaheadHighlight:query"\n ng-attr-title="{{match.label}}"></a>\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(e){e.put("uib/template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+\'px\', left: position().left+\'px\'}" role="listbox" aria-hidden="{{!isOpen()}}">\n <li class="uib-typeahead-match" ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index, $event)" role="option" id="{{::match.id}}">\n <div uib-typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n </li>\n</ul>\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibCarouselCss&&angular.element(document).find("head").prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'),angular.$$uibCarouselCss=!0}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker .uib-title{width:100%;}.uib-day button,.uib-month button,.uib-year button{min-width:100%;}.uib-left,.uib-right{width:100%}</style>'),angular.$$uibDatepickerCss=!0}),angular.module("ui.bootstrap.position").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibPositionCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-position-measure{display:block !important;visibility:hidden !important;position:absolute !important;top:-9999px !important;left:-9999px !important;}.uib-position-scrollbar-measure{position:absolute !important;top:-9999px !important;width:50px !important;height:50px !important;overflow:scroll !important;}.uib-position-body-scrollbar-measure{overflow:scroll !important;}</style>'),angular.$$uibPositionCss=!0}),angular.module("ui.bootstrap.datepickerPopup").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerpopupCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker-popup.dropdown-menu{display:block;float:none;margin:0;}.uib-button-bar{padding:10px 9px 2px;}</style>'),angular.$$uibDatepickerpopupCss=!0}),angular.module("ui.bootstrap.tooltip").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTooltipCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-tooltip-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-bottom > .tooltip-arrow,[uib-popover-popup].popover.top-left > .arrow,[uib-popover-popup].popover.top-right > .arrow,[uib-popover-popup].popover.bottom-left > .arrow,[uib-popover-popup].popover.bottom-right > .arrow,[uib-popover-popup].popover.left-top > .arrow,[uib-popover-popup].popover.left-bottom > .arrow,[uib-popover-popup].popover.right-top > .arrow,[uib-popover-popup].popover.right-bottom > .arrow,[uib-popover-html-popup].popover.top-left > .arrow,[uib-popover-html-popup].popover.top-right > .arrow,[uib-popover-html-popup].popover.bottom-left > .arrow,[uib-popover-html-popup].popover.bottom-right > .arrow,[uib-popover-html-popup].popover.left-top > .arrow,[uib-popover-html-popup].popover.left-bottom > .arrow,[uib-popover-html-popup].popover.right-top > .arrow,[uib-popover-html-popup].popover.right-bottom > .arrow,[uib-popover-template-popup].popover.top-left > .arrow,[uib-popover-template-popup].popover.top-right > .arrow,[uib-popover-template-popup].popover.bottom-left > .arrow,[uib-popover-template-popup].popover.bottom-right > .arrow,[uib-popover-template-popup].popover.left-top > .arrow,[uib-popover-template-popup].popover.left-bottom > .arrow,[uib-popover-template-popup].popover.right-top > .arrow,[uib-popover-template-popup].popover.right-bottom > .arrow{top:auto;bottom:auto;left:auto;right:auto;margin:0;}[uib-popover-popup].popover,[uib-popover-html-popup].popover,[uib-popover-template-popup].popover{display:block !important;}</style>'),angular.$$uibTooltipCss=!0}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTimepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-time input{width:50px;}</style>'),angular.$$uibTimepickerCss=!0}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTypeaheadCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-typeahead-popup].dropdown-menu{display:block;}</style>'),angular.$$uibTypeaheadCss=!0});
\ No newline at end of file
diff --git a/xos/xos/settings.py b/xos/xos/settings.py
index 9ee1be5..1b68832 100644
--- a/xos/xos/settings.py
+++ b/xos/xos/settings.py
@@ -35,6 +35,9 @@
DEBUG = True
TEMPLATE_DEBUG = DEBUG
+# Enable CORS requests, needed to enable layered XOS
+CORS_ORIGIN_ALLOW_ALL = True
+
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
@@ -135,6 +138,7 @@
)
MIDDLEWARE_CLASSES = (
+ 'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
@@ -184,6 +188,7 @@
'services.syndicate_storage',
# 'geoposition',
# 'rest_framework_swagger',
+ 'corsheaders'
)
# add services that were configured by xosbuilder to INSTALLED_APPS