From 3d7ff4b417d02fd9c8f307d3d0a2c0f6462bec59 Mon Sep 17 00:00:00 2001 From: Olivier Louvignes Date: Sun, 27 Apr 2014 06:54:31 -0700 Subject: [PATCH] chore(release): hotfix the v2.0.2 release --- dist/angular-strap.js | 1316 ++++++++++++------------- dist/angular-strap.min.js | 4 +- dist/angular-strap.min.js.map | 2 +- dist/modules/parse-options.js | 8 +- dist/modules/parse-options.min.js | 2 +- dist/modules/parse-options.min.js.map | 2 +- dist/modules/select.js | 4 +- dist/modules/select.min.js | 2 +- dist/modules/select.min.js.map | 2 +- src/select/docs/select.demo.html | 2 +- src/select/docs/select.demo.js | 4 + 11 files changed, 676 insertions(+), 672 deletions(-) diff --git a/dist/angular-strap.js b/dist/angular-strap.js index 554a17cb0..c30eff9fe 100644 --- a/dist/angular-strap.js +++ b/dist/angular-strap.js @@ -1603,17 +1603,17 @@ angular.module('mgcrea.ngStrap.helpers.parseOptions', []).provider('$parseOption }; $parseOptions.valuesFn = function (scope, controller) { return $q.when(valuesFn(scope, controller)).then(function (values) { - $parseOptions.$values = values ? parseValues(values) : {}; + $parseOptions.$values = values ? parseValues(values, scope) : {}; return $parseOptions.$values; }); }; // Private functions - function parseValues(values) { + function parseValues(values, scope) { return values.map(function (match, index) { var locals = {}, label, value; locals[valueName] = match; - label = displayFn(locals); - value = valueFn(locals) || index; + label = displayFn(scope, locals); + value = valueFn(scope, locals) || index; return { label: label, value: value @@ -1992,223 +1992,275 @@ angular.module('mgcrea.ngStrap.navbar', []).provider('$navbar', function () { } ]); -// Source: scrollspy.js -angular.module('mgcrea.ngStrap.scrollspy', [ - 'mgcrea.ngStrap.helpers.debounce', - 'mgcrea.ngStrap.helpers.dimensions' -]).provider('$scrollspy', function () { - // Pool of registered spies - var spies = this.$$spies = {}; +// Source: select.js +angular.module('mgcrea.ngStrap.select', [ + 'mgcrea.ngStrap.tooltip', + 'mgcrea.ngStrap.helpers.parseOptions' +]).provider('$select', function () { var defaults = this.defaults = { - debounce: 150, - throttle: 100, - offset: 100 + animation: 'am-fade', + prefixClass: 'select', + placement: 'bottom-left', + template: 'select/select.tpl.html', + trigger: 'focus', + container: false, + keyboard: true, + html: false, + delay: 0, + multiple: false, + sort: true, + caretHtml: ' ', + placeholder: 'Choose among the following...', + maxLength: 3, + maxLengthHtml: 'selected' }; this.$get = [ '$window', '$document', '$rootScope', - 'dimensions', - 'debounce', - 'throttle', - function ($window, $document, $rootScope, dimensions, debounce, throttle) { - var windowEl = angular.element($window); - var docEl = angular.element($document.prop('documentElement')); + '$tooltip', + function ($window, $document, $rootScope, $tooltip) { var bodyEl = angular.element($window.document.body); - // Helper functions - function nodeName(element, name) { - return element[0].nodeName && element[0].nodeName.toLowerCase() === name.toLowerCase(); - } - function ScrollSpyFactory(config) { + var isTouch = 'createTouch' in $window.document; + function SelectFactory(element, controller, config) { + var $select = {}; // Common vars var options = angular.extend({}, defaults, config); - if (!options.element) - options.element = bodyEl; - var isWindowSpy = nodeName(options.element, 'body'); - var scrollEl = isWindowSpy ? windowEl : options.element; - var scrollId = isWindowSpy ? 'window' : options.id; - // Use existing spy - if (spies[scrollId]) { - spies[scrollId].$$count++; - return spies[scrollId]; - } - var $scrollspy = {}; - // Private vars - var unbindViewContentLoaded, unbindIncludeContentLoaded; - var trackedElements = $scrollspy.$trackedElements = []; - var sortedElements = []; - var activeTarget; - var debouncedCheckPosition; - var throttledCheckPosition; - var debouncedCheckOffsets; - var viewportHeight; - var scrollTop; - $scrollspy.init = function () { - // Setup internal ref counter - this.$$count = 1; - // Bind events - debouncedCheckPosition = debounce(this.checkPosition, options.debounce); - throttledCheckPosition = throttle(this.checkPosition, options.throttle); - scrollEl.on('click', this.checkPositionWithEventLoop); - windowEl.on('resize', debouncedCheckPosition); - scrollEl.on('scroll', throttledCheckPosition); - debouncedCheckOffsets = debounce(this.checkOffsets, options.debounce); - unbindViewContentLoaded = $rootScope.$on('$viewContentLoaded', debouncedCheckOffsets); - unbindIncludeContentLoaded = $rootScope.$on('$includeContentLoaded', debouncedCheckOffsets); - debouncedCheckOffsets(); - // Register spy for reuse - if (scrollId) { - spies[scrollId] = $scrollspy; - } + $select = $tooltip(element, options); + var parentScope = config.scope; + var scope = $select.$scope; + scope.$matches = []; + scope.$activeIndex = 0; + scope.$isMultiple = options.multiple; + scope.$activate = function (index) { + scope.$$postDigest(function () { + $select.activate(index); + }); }; - $scrollspy.destroy = function () { - // Check internal ref counter - this.$$count--; - if (this.$$count > 0) { - return; - } - // Unbind events - scrollEl.off('click', this.checkPositionWithEventLoop); - windowEl.off('resize', debouncedCheckPosition); - scrollEl.off('scroll', debouncedCheckPosition); - unbindViewContentLoaded(); - unbindIncludeContentLoaded(); - if (scrollId) { - delete spies[scrollId]; + scope.$select = function (index, evt) { + scope.$$postDigest(function () { + $select.select(index); + }); + }; + scope.$isVisible = function () { + return $select.$isVisible(); + }; + scope.$isActive = function (index) { + return $select.$isActive(index); + }; + // Public methods + $select.update = function (matches) { + scope.$matches = matches; + $select.$updateActiveIndex(); + }; + $select.activate = function (index) { + if (options.multiple) { + scope.$activeIndex.sort(); + $select.$isActive(index) ? scope.$activeIndex.splice(scope.$activeIndex.indexOf(index), 1) : scope.$activeIndex.push(index); + if (options.sort) + scope.$activeIndex.sort(); + } else { + scope.$activeIndex = index; } + return scope.$activeIndex; }; - $scrollspy.checkPosition = function () { - // Not ready yet - if (!sortedElements.length) - return; - // Calculate the scroll position - scrollTop = (isWindowSpy ? $window.pageYOffset : scrollEl.prop('scrollTop')) || 0; - // Calculate the viewport height for use by the components - viewportHeight = Math.max($window.innerHeight, docEl.prop('clientHeight')); - // Activate first element if scroll is smaller - if (scrollTop < sortedElements[0].offsetTop && activeTarget !== sortedElements[0].target) { - return $scrollspy.$activateElement(sortedElements[0]); + $select.select = function (index) { + var value = scope.$matches[index].value; + $select.activate(index); + if (options.multiple) { + controller.$setViewValue(scope.$activeIndex.map(function (index) { + return scope.$matches[index].value; + })); + } else { + controller.$setViewValue(value); } - // Activate proper element - for (var i = sortedElements.length; i--;) { - if (angular.isUndefined(sortedElements[i].offsetTop) || sortedElements[i].offsetTop === null) - continue; - if (activeTarget === sortedElements[i].target) - continue; - if (scrollTop < sortedElements[i].offsetTop) - continue; - if (sortedElements[i + 1] && scrollTop > sortedElements[i + 1].offsetTop) - continue; - return $scrollspy.$activateElement(sortedElements[i]); + controller.$render(); + if (parentScope) + parentScope.$digest(); + // Hide if single select + if (!options.multiple) { + $select.hide(); } - }; - $scrollspy.checkPositionWithEventLoop = function () { - setTimeout(this.checkPosition, 1); + // Emit event + scope.$emit('$select.select', value, index); }; // Protected methods - $scrollspy.$activateElement = function (element) { - if (activeTarget) { - var activeElement = $scrollspy.$getTrackedElement(activeTarget); - if (activeElement) { - activeElement.source.removeClass('active'); - if (nodeName(activeElement.source, 'li') && nodeName(activeElement.source.parent().parent(), 'li')) { - activeElement.source.parent().parent().removeClass('active'); - } + $select.$updateActiveIndex = function () { + if (controller.$modelValue && scope.$matches.length) { + if (options.multiple && angular.isArray(controller.$modelValue)) { + scope.$activeIndex = controller.$modelValue.map(function (value) { + return $select.$getIndex(value); + }); + } else { + scope.$activeIndex = $select.$getIndex(controller.$modelValue); } + } else if (scope.$activeIndex >= scope.$matches.length) { + scope.$activeIndex = options.multiple ? [] : 0; } - activeTarget = element.target; - element.source.addClass('active'); - if (nodeName(element.source, 'li') && nodeName(element.source.parent().parent(), 'li')) { - element.source.parent().parent().addClass('active'); + }; + $select.$isVisible = function () { + if (!options.minLength || !controller) { + return scope.$matches.length; } + // minLength support + return scope.$matches.length && controller.$viewValue.length >= options.minLength; }; - $scrollspy.$getTrackedElement = function (target) { - return trackedElements.filter(function (obj) { - return obj.target === target; - })[0]; + $select.$isActive = function (index) { + if (options.multiple) { + return scope.$activeIndex.indexOf(index) !== -1; + } else { + return scope.$activeIndex === index; + } }; - // Track offsets behavior - $scrollspy.checkOffsets = function () { - angular.forEach(trackedElements, function (trackedElement) { - var targetElement = document.querySelector(trackedElement.target); - trackedElement.offsetTop = targetElement ? dimensions.offset(targetElement).top : null; - if (options.offset && trackedElement.offsetTop !== null) - trackedElement.offsetTop -= options.offset * 1; - }); - sortedElements = trackedElements.filter(function (el) { - return el.offsetTop !== null; - }).sort(function (a, b) { - return a.offsetTop - b.offsetTop; - }); - debouncedCheckPosition(); + $select.$getIndex = function (value) { + var l = scope.$matches.length, i = l; + if (!l) + return; + for (i = l; i--;) { + if (scope.$matches[i].value === value) + break; + } + if (i < 0) + return; + return i; }; - $scrollspy.trackElement = function (target, source) { - trackedElements.push({ - target: target, - source: source + $select.$onMouseDown = function (evt) { + // Prevent blur on mousedown on .dropdown-menu + evt.preventDefault(); + evt.stopPropagation(); + // Emulate click for mobile devices + if (isTouch) { + var targetEl = angular.element(evt.target); + targetEl.triggerHandler('click'); + } + }; + $select.$onKeyDown = function (evt) { + if (!/(9|13|38|40)/.test(evt.keyCode)) + return; + evt.preventDefault(); + evt.stopPropagation(); + // Select with enter + if (!options.multiple && (evt.keyCode === 13 || evt.keyCode === 9)) { + return $select.select(scope.$activeIndex); + } + // Navigate with keyboard + if (evt.keyCode === 38 && scope.$activeIndex > 0) + scope.$activeIndex--; + else if (evt.keyCode === 40 && scope.$activeIndex < scope.$matches.length - 1) + scope.$activeIndex++; + else if (angular.isUndefined(scope.$activeIndex)) + scope.$activeIndex = 0; + scope.$digest(); + }; + // Overrides + var _show = $select.show; + $select.show = function () { + _show(); + if (options.multiple) { + $select.$element.addClass('select-multiple'); + } + setTimeout(function () { + $select.$element.on(isTouch ? 'touchstart' : 'mousedown', $select.$onMouseDown); + if (options.keyboard) { + element.on('keydown', $select.$onKeyDown); + } }); }; - $scrollspy.untrackElement = function (target, source) { - var toDelete; - for (var i = trackedElements.length; i--;) { - if (trackedElements[i].target === target && trackedElements[i].source === source) { - toDelete = i; - break; - } + var _hide = $select.hide; + $select.hide = function () { + $select.$element.off(isTouch ? 'touchstart' : 'mousedown', $select.$onMouseDown); + if (options.keyboard) { + element.off('keydown', $select.$onKeyDown); } - trackedElements = trackedElements.splice(toDelete, 1); - }; - $scrollspy.activate = function (i) { - trackedElements[i].addClass('active'); + _hide(true); }; - // Initialize plugin - $scrollspy.init(); - return $scrollspy; + return $select; } - return ScrollSpyFactory; + SelectFactory.defaults = defaults; + return SelectFactory; } ]; -}).directive('bsScrollspy', [ - '$rootScope', - 'debounce', - 'dimensions', - '$scrollspy', - function ($rootScope, debounce, dimensions, $scrollspy) { +}).directive('bsSelect', [ + '$window', + '$parse', + '$q', + '$select', + '$parseOptions', + function ($window, $parse, $q, $select, $parseOptions) { + var defaults = $select.defaults; return { restrict: 'EAC', - link: function postLink(scope, element, attr) { + require: 'ngModel', + link: function postLink(scope, element, attr, controller) { + // Directive options var options = { scope: scope }; angular.forEach([ - 'offset', - 'target' + 'placement', + 'container', + 'delay', + 'trigger', + 'keyboard', + 'html', + 'animation', + 'template', + 'placeholder', + 'multiple', + 'maxLength', + 'maxLengthHtml' ], function (key) { if (angular.isDefined(attr[key])) options[key] = attr[key]; }); - var scrollspy = $scrollspy(options); - scrollspy.trackElement(options.target, element); + // Add support for select markup + if (element[0].nodeName.toLowerCase() === 'select') { + var inputEl = element; + inputEl.css('display', 'none'); + element = angular.element(''); + inputEl.after(element); + } + // Build proper ngOptions + var parsedOptions = $parseOptions(attr.ngOptions); + // Initialize select + var select = $select(element, controller, options); + // Watch ngOptions values before filtering for changes + var watchedOptions = parsedOptions.$match[7].replace(/\|.+/, '').trim(); + scope.$watch(watchedOptions, function (newValue, oldValue) { + // console.warn('scope.$watch(%s)', watchedOptions, newValue, oldValue); + parsedOptions.valuesFn(scope, controller).then(function (values) { + select.update(values); + controller.$render(); + }); + }, true); + // Watch model for changes + scope.$watch(attr.ngModel, function (newValue, oldValue) { + // console.warn('scope.$watch(%s)', attr.ngModel, newValue, oldValue); + select.$updateActiveIndex(); + }, true); + // Model rendering in view + controller.$render = function () { + // console.warn('$render', element.attr('ng-model'), 'controller.$modelValue', typeof controller.$modelValue, controller.$modelValue, 'controller.$viewValue', typeof controller.$viewValue, controller.$viewValue); + var selected, index; + if (options.multiple && angular.isArray(controller.$modelValue)) { + selected = controller.$modelValue.map(function (value) { + index = select.$getIndex(value); + return angular.isDefined(index) ? select.$scope.$matches[index].label : false; + }).filter(angular.isDefined); + if (selected.length > (options.maxLength || defaults.maxLength)) { + selected = selected.length + ' ' + (options.maxLengthHtml || defaults.maxLengthHtml); + } else { + selected = selected.join(', '); + } + } else { + index = select.$getIndex(controller.$modelValue); + selected = angular.isDefined(index) ? select.$scope.$matches[index].label : false; + } + element.html((selected ? selected : attr.placeholder || defaults.placeholder) + defaults.caretHtml); + }; + // Garbage collection scope.$on('$destroy', function () { - scrollspy.untrackElement(options.target, element); - scrollspy.destroy(); + select.destroy(); options = null; - scrollspy = null; - }); - } - }; - } -]).directive('bsScrollspyList', [ - '$rootScope', - 'debounce', - 'dimensions', - '$scrollspy', - function ($rootScope, debounce, dimensions, $scrollspy) { - return { - restrict: 'A', - compile: function postLink(element, attr) { - var children = element[0].querySelectorAll('li > a[href]'); - angular.forEach(children, function (child) { - var childEl = angular.element(child); - childEl.parent().attr('bs-scrollspy', '').attr('data-target', childEl.attr('href')); + select = null; }); } }; @@ -2309,275 +2361,223 @@ angular.module('mgcrea.ngStrap.popover', ['mgcrea.ngStrap.tooltip']).provider('$ } ]); -// Source: select.js -angular.module('mgcrea.ngStrap.select', [ - 'mgcrea.ngStrap.tooltip', - 'mgcrea.ngStrap.helpers.parseOptions' -]).provider('$select', function () { +// Source: scrollspy.js +angular.module('mgcrea.ngStrap.scrollspy', [ + 'mgcrea.ngStrap.helpers.debounce', + 'mgcrea.ngStrap.helpers.dimensions' +]).provider('$scrollspy', function () { + // Pool of registered spies + var spies = this.$$spies = {}; var defaults = this.defaults = { - animation: 'am-fade', - prefixClass: 'select', - placement: 'bottom-left', - template: 'select/select.tpl.html', - trigger: 'focus', - container: false, - keyboard: true, - html: false, - delay: 0, - multiple: false, - sort: true, - caretHtml: ' ', - placeholder: 'Choose among the following...', - maxLength: 3, - maxLengthHtml: 'selected' + debounce: 150, + throttle: 100, + offset: 100 }; this.$get = [ '$window', '$document', '$rootScope', - '$tooltip', - function ($window, $document, $rootScope, $tooltip) { + 'dimensions', + 'debounce', + 'throttle', + function ($window, $document, $rootScope, dimensions, debounce, throttle) { + var windowEl = angular.element($window); + var docEl = angular.element($document.prop('documentElement')); var bodyEl = angular.element($window.document.body); - var isTouch = 'createTouch' in $window.document; - function SelectFactory(element, controller, config) { - var $select = {}; + // Helper functions + function nodeName(element, name) { + return element[0].nodeName && element[0].nodeName.toLowerCase() === name.toLowerCase(); + } + function ScrollSpyFactory(config) { // Common vars var options = angular.extend({}, defaults, config); - $select = $tooltip(element, options); - var parentScope = config.scope; - var scope = $select.$scope; - scope.$matches = []; - scope.$activeIndex = 0; - scope.$isMultiple = options.multiple; - scope.$activate = function (index) { - scope.$$postDigest(function () { - $select.activate(index); - }); - }; - scope.$select = function (index, evt) { - scope.$$postDigest(function () { - $select.select(index); - }); - }; - scope.$isVisible = function () { - return $select.$isVisible(); - }; - scope.$isActive = function (index) { - return $select.$isActive(index); - }; - // Public methods - $select.update = function (matches) { - scope.$matches = matches; - $select.$updateActiveIndex(); + if (!options.element) + options.element = bodyEl; + var isWindowSpy = nodeName(options.element, 'body'); + var scrollEl = isWindowSpy ? windowEl : options.element; + var scrollId = isWindowSpy ? 'window' : options.id; + // Use existing spy + if (spies[scrollId]) { + spies[scrollId].$$count++; + return spies[scrollId]; + } + var $scrollspy = {}; + // Private vars + var unbindViewContentLoaded, unbindIncludeContentLoaded; + var trackedElements = $scrollspy.$trackedElements = []; + var sortedElements = []; + var activeTarget; + var debouncedCheckPosition; + var throttledCheckPosition; + var debouncedCheckOffsets; + var viewportHeight; + var scrollTop; + $scrollspy.init = function () { + // Setup internal ref counter + this.$$count = 1; + // Bind events + debouncedCheckPosition = debounce(this.checkPosition, options.debounce); + throttledCheckPosition = throttle(this.checkPosition, options.throttle); + scrollEl.on('click', this.checkPositionWithEventLoop); + windowEl.on('resize', debouncedCheckPosition); + scrollEl.on('scroll', throttledCheckPosition); + debouncedCheckOffsets = debounce(this.checkOffsets, options.debounce); + unbindViewContentLoaded = $rootScope.$on('$viewContentLoaded', debouncedCheckOffsets); + unbindIncludeContentLoaded = $rootScope.$on('$includeContentLoaded', debouncedCheckOffsets); + debouncedCheckOffsets(); + // Register spy for reuse + if (scrollId) { + spies[scrollId] = $scrollspy; + } }; - $select.activate = function (index) { - if (options.multiple) { - scope.$activeIndex.sort(); - $select.$isActive(index) ? scope.$activeIndex.splice(scope.$activeIndex.indexOf(index), 1) : scope.$activeIndex.push(index); - if (options.sort) - scope.$activeIndex.sort(); - } else { - scope.$activeIndex = index; + $scrollspy.destroy = function () { + // Check internal ref counter + this.$$count--; + if (this.$$count > 0) { + return; + } + // Unbind events + scrollEl.off('click', this.checkPositionWithEventLoop); + windowEl.off('resize', debouncedCheckPosition); + scrollEl.off('scroll', debouncedCheckPosition); + unbindViewContentLoaded(); + unbindIncludeContentLoaded(); + if (scrollId) { + delete spies[scrollId]; } - return scope.$activeIndex; }; - $select.select = function (index) { - var value = scope.$matches[index].value; - $select.activate(index); - if (options.multiple) { - controller.$setViewValue(scope.$activeIndex.map(function (index) { - return scope.$matches[index].value; - })); - } else { - controller.$setViewValue(value); + $scrollspy.checkPosition = function () { + // Not ready yet + if (!sortedElements.length) + return; + // Calculate the scroll position + scrollTop = (isWindowSpy ? $window.pageYOffset : scrollEl.prop('scrollTop')) || 0; + // Calculate the viewport height for use by the components + viewportHeight = Math.max($window.innerHeight, docEl.prop('clientHeight')); + // Activate first element if scroll is smaller + if (scrollTop < sortedElements[0].offsetTop && activeTarget !== sortedElements[0].target) { + return $scrollspy.$activateElement(sortedElements[0]); } - controller.$render(); - if (parentScope) - parentScope.$digest(); - // Hide if single select - if (!options.multiple) { - $select.hide(); + // Activate proper element + for (var i = sortedElements.length; i--;) { + if (angular.isUndefined(sortedElements[i].offsetTop) || sortedElements[i].offsetTop === null) + continue; + if (activeTarget === sortedElements[i].target) + continue; + if (scrollTop < sortedElements[i].offsetTop) + continue; + if (sortedElements[i + 1] && scrollTop > sortedElements[i + 1].offsetTop) + continue; + return $scrollspy.$activateElement(sortedElements[i]); } - // Emit event - scope.$emit('$select.select', value, index); + }; + $scrollspy.checkPositionWithEventLoop = function () { + setTimeout(this.checkPosition, 1); }; // Protected methods - $select.$updateActiveIndex = function () { - if (controller.$modelValue && scope.$matches.length) { - if (options.multiple && angular.isArray(controller.$modelValue)) { - scope.$activeIndex = controller.$modelValue.map(function (value) { - return $select.$getIndex(value); - }); - } else { - scope.$activeIndex = $select.$getIndex(controller.$modelValue); + $scrollspy.$activateElement = function (element) { + if (activeTarget) { + var activeElement = $scrollspy.$getTrackedElement(activeTarget); + if (activeElement) { + activeElement.source.removeClass('active'); + if (nodeName(activeElement.source, 'li') && nodeName(activeElement.source.parent().parent(), 'li')) { + activeElement.source.parent().parent().removeClass('active'); + } } - } else if (scope.$activeIndex >= scope.$matches.length) { - scope.$activeIndex = options.multiple ? [] : 0; - } - }; - $select.$isVisible = function () { - if (!options.minLength || !controller) { - return scope.$matches.length; - } - // minLength support - return scope.$matches.length && controller.$viewValue.length >= options.minLength; - }; - $select.$isActive = function (index) { - if (options.multiple) { - return scope.$activeIndex.indexOf(index) !== -1; - } else { - return scope.$activeIndex === index; } - }; - $select.$getIndex = function (value) { - var l = scope.$matches.length, i = l; - if (!l) - return; - for (i = l; i--;) { - if (scope.$matches[i].value === value) - break; + activeTarget = element.target; + element.source.addClass('active'); + if (nodeName(element.source, 'li') && nodeName(element.source.parent().parent(), 'li')) { + element.source.parent().parent().addClass('active'); } - if (i < 0) - return; - return i; }; - $select.$onMouseDown = function (evt) { - // Prevent blur on mousedown on .dropdown-menu - evt.preventDefault(); - evt.stopPropagation(); - // Emulate click for mobile devices - if (isTouch) { - var targetEl = angular.element(evt.target); - targetEl.triggerHandler('click'); - } + $scrollspy.$getTrackedElement = function (target) { + return trackedElements.filter(function (obj) { + return obj.target === target; + })[0]; }; - $select.$onKeyDown = function (evt) { - if (!/(9|13|38|40)/.test(evt.keyCode)) - return; - evt.preventDefault(); - evt.stopPropagation(); - // Select with enter - if (evt.keyCode === 13 || evt.keyCode === 9) { - return $select.select(scope.$activeIndex); - } - // Navigate with keyboard - if (evt.keyCode === 38 && scope.$activeIndex > 0) - scope.$activeIndex--; - else if (evt.keyCode === 40 && scope.$activeIndex < scope.$matches.length - 1) - scope.$activeIndex++; - else if (angular.isUndefined(scope.$activeIndex)) - scope.$activeIndex = 0; - scope.$digest(); + // Track offsets behavior + $scrollspy.checkOffsets = function () { + angular.forEach(trackedElements, function (trackedElement) { + var targetElement = document.querySelector(trackedElement.target); + trackedElement.offsetTop = targetElement ? dimensions.offset(targetElement).top : null; + if (options.offset && trackedElement.offsetTop !== null) + trackedElement.offsetTop -= options.offset * 1; + }); + sortedElements = trackedElements.filter(function (el) { + return el.offsetTop !== null; + }).sort(function (a, b) { + return a.offsetTop - b.offsetTop; + }); + debouncedCheckPosition(); }; - // Overrides - var _show = $select.show; - $select.show = function () { - _show(); - if (options.multiple) { - $select.$element.addClass('select-multiple'); - } - setTimeout(function () { - $select.$element.on(isTouch ? 'touchstart' : 'mousedown', $select.$onMouseDown); - if (options.keyboard) { - element.on('keydown', $select.$onKeyDown); - } + $scrollspy.trackElement = function (target, source) { + trackedElements.push({ + target: target, + source: source }); }; - var _hide = $select.hide; - $select.hide = function () { - $select.$element.off(isTouch ? 'touchstart' : 'mousedown', $select.$onMouseDown); - if (options.keyboard) { - element.off('keydown', $select.$onKeyDown); + $scrollspy.untrackElement = function (target, source) { + var toDelete; + for (var i = trackedElements.length; i--;) { + if (trackedElements[i].target === target && trackedElements[i].source === source) { + toDelete = i; + break; + } } - _hide(); + trackedElements = trackedElements.splice(toDelete, 1); }; - return $select; + $scrollspy.activate = function (i) { + trackedElements[i].addClass('active'); + }; + // Initialize plugin + $scrollspy.init(); + return $scrollspy; } - SelectFactory.defaults = defaults; - return SelectFactory; + return ScrollSpyFactory; } ]; -}).directive('bsSelect', [ - '$window', - '$parse', - '$q', - '$select', - '$parseOptions', - function ($window, $parse, $q, $select, $parseOptions) { - var defaults = $select.defaults; +}).directive('bsScrollspy', [ + '$rootScope', + 'debounce', + 'dimensions', + '$scrollspy', + function ($rootScope, debounce, dimensions, $scrollspy) { return { restrict: 'EAC', - require: 'ngModel', - link: function postLink(scope, element, attr, controller) { - // Directive options + link: function postLink(scope, element, attr) { var options = { scope: scope }; angular.forEach([ - 'placement', - 'container', - 'delay', - 'trigger', - 'keyboard', - 'html', - 'animation', - 'template', - 'placeholder', - 'multiple', - 'maxLength', - 'maxLengthHtml' + 'offset', + 'target' ], function (key) { if (angular.isDefined(attr[key])) options[key] = attr[key]; }); - // Add support for select markup - if (element[0].nodeName.toLowerCase() === 'select') { - var inputEl = element; - inputEl.css('display', 'none'); - element = angular.element(''); - inputEl.after(element); - } - // Build proper ngOptions - var parsedOptions = $parseOptions(attr.ngOptions); - // Initialize select - var select = $select(element, controller, options); - // Watch ngOptions values before filtering for changes - var watchedOptions = parsedOptions.$match[7].replace(/\|.+/, '').trim(); - scope.$watch(watchedOptions, function (newValue, oldValue) { - // console.warn('scope.$watch(%s)', watchedOptions, newValue, oldValue); - parsedOptions.valuesFn(scope, controller).then(function (values) { - select.update(values); - controller.$render(); - }); - }, true); - // Watch model for changes - scope.$watch(attr.ngModel, function (newValue, oldValue) { - // console.warn('scope.$watch(%s)', attr.ngModel, newValue, oldValue); - select.$updateActiveIndex(); - }, true); - // Model rendering in view - controller.$render = function () { - // console.warn('$render', element.attr('ng-model'), 'controller.$modelValue', typeof controller.$modelValue, controller.$modelValue, 'controller.$viewValue', typeof controller.$viewValue, controller.$viewValue); - var selected, index; - if (options.multiple && angular.isArray(controller.$modelValue)) { - selected = controller.$modelValue.map(function (value) { - index = select.$getIndex(value); - return angular.isDefined(index) ? select.$scope.$matches[index].label : false; - }).filter(angular.isDefined); - if (selected.length > (options.maxLength || defaults.maxLength)) { - selected = selected.length + ' ' + (options.maxLengthHtml || defaults.maxLengthHtml); - } else { - selected = selected.join(', '); - } - } else { - index = select.$getIndex(controller.$modelValue); - selected = angular.isDefined(index) ? select.$scope.$matches[index].label : false; - } - element.html((selected ? selected : attr.placeholder || defaults.placeholder) + defaults.caretHtml); - }; - // Garbage collection + var scrollspy = $scrollspy(options); + scrollspy.trackElement(options.target, element); scope.$on('$destroy', function () { - select.destroy(); + scrollspy.untrackElement(options.target, element); + scrollspy.destroy(); options = null; - select = null; + scrollspy = null; + }); + } + }; + } +]).directive('bsScrollspyList', [ + '$rootScope', + 'debounce', + 'dimensions', + '$scrollspy', + function ($rootScope, debounce, dimensions, $scrollspy) { + return { + restrict: 'A', + compile: function postLink(element, attr) { + var children = element[0].querySelectorAll('li > a[href]'); + angular.forEach(children, function (child) { + var childEl = angular.element(child); + childEl.parent().attr('bs-scrollspy', '').attr('data-target', childEl.attr('href')); }); } }; @@ -3042,258 +3042,43 @@ angular.module('mgcrea.ngStrap.timepicker', [ controller.$dateValue = parsedTime; } if (options.timeType === 'string') { - return dateFilter(viewValue, options.timeFormat); - } else if (options.timeType === 'number') { - return controller.$dateValue.getTime(); - } else if (options.timeType === 'iso') { - return controller.$dateValue.toISOString(); - } else { - return new Date(controller.$dateValue); - } - }); - // modelValue -> $formatters -> viewValue - controller.$formatters.push(function (modelValue) { - // console.warn('$formatter("%s"): modelValue=%o (%o)', element.attr('ng-model'), modelValue, typeof modelValue); - var date; - if (angular.isUndefined(modelValue) || modelValue === null) { - date = NaN; - } else if (angular.isDate(modelValue)) { - date = modelValue; - } else if (options.timeType === 'string') { - date = dateParser.parse(modelValue); - } else { - date = new Date(modelValue); - } - // Setup default value? - // if(isNaN(date.getTime())) date = new Date(new Date().setMinutes(0) + 36e5); - controller.$dateValue = date; - return controller.$dateValue; - }); - // viewValue -> element - controller.$render = function () { - // console.warn('$render("%s"): viewValue=%o', element.attr('ng-model'), controller.$viewValue); - element.val(!controller.$dateValue || isNaN(controller.$dateValue.getTime()) ? '' : dateFilter(controller.$dateValue, options.timeFormat)); - }; - // Garbage collection - scope.$on('$destroy', function () { - timepicker.destroy(); - options = null; - timepicker = null; - }); - } - }; - } -]); - -// Source: typeahead.js -angular.module('mgcrea.ngStrap.typeahead', [ - 'mgcrea.ngStrap.tooltip', - 'mgcrea.ngStrap.helpers.parseOptions' -]).provider('$typeahead', function () { - var defaults = this.defaults = { - animation: 'am-fade', - prefixClass: 'typeahead', - placement: 'bottom-left', - template: 'typeahead/typeahead.tpl.html', - trigger: 'focus', - container: false, - keyboard: true, - html: false, - delay: 0, - minLength: 1, - filter: 'filter', - limit: 6 - }; - this.$get = [ - '$window', - '$rootScope', - '$tooltip', - function ($window, $rootScope, $tooltip) { - var bodyEl = angular.element($window.document.body); - function TypeaheadFactory(element, controller, config) { - var $typeahead = {}; - // Common vars - var options = angular.extend({}, defaults, config); - $typeahead = $tooltip(element, options); - var parentScope = config.scope; - var scope = $typeahead.$scope; - scope.$resetMatches = function () { - scope.$matches = []; - scope.$activeIndex = 0; - }; - scope.$resetMatches(); - scope.$activate = function (index) { - scope.$$postDigest(function () { - $typeahead.activate(index); - }); - }; - scope.$select = function (index, evt) { - scope.$$postDigest(function () { - $typeahead.select(index); - }); - }; - scope.$isVisible = function () { - return $typeahead.$isVisible(); - }; - // Public methods - $typeahead.update = function (matches) { - scope.$matches = matches; - if (scope.$activeIndex >= matches.length) { - scope.$activeIndex = 0; - } - }; - $typeahead.activate = function (index) { - scope.$activeIndex = index; - }; - $typeahead.select = function (index) { - var value = scope.$matches[index].value; - controller.$setViewValue(value); - scope.$resetMatches(); - controller.$render(); - if (parentScope) - parentScope.$digest(); - // Emit event - scope.$emit('$typeahead.select', value, index); - }; - // Protected methods - $typeahead.$isVisible = function () { - if (!options.minLength || !controller) { - return !!scope.$matches.length; - } - // minLength support - return scope.$matches.length && angular.isString(controller.$viewValue) && controller.$viewValue.length >= options.minLength; - }; - $typeahead.$getIndex = function (value) { - var l = scope.$matches.length, i = l; - if (!l) - return; - for (i = l; i--;) { - if (scope.$matches[i].value === value) - break; - } - if (i < 0) - return; - return i; - }; - $typeahead.$onMouseDown = function (evt) { - // Prevent blur on mousedown - evt.preventDefault(); - evt.stopPropagation(); - }; - $typeahead.$onKeyDown = function (evt) { - if (!/(38|40|13)/.test(evt.keyCode)) - return; - evt.preventDefault(); - evt.stopPropagation(); - // Select with enter - if (evt.keyCode === 13 && scope.$matches.length) { - $typeahead.select(scope.$activeIndex); - } // Navigate with keyboard - else if (evt.keyCode === 38 && scope.$activeIndex > 0) - scope.$activeIndex--; - else if (evt.keyCode === 40 && scope.$activeIndex < scope.$matches.length - 1) - scope.$activeIndex++; - else if (angular.isUndefined(scope.$activeIndex)) - scope.$activeIndex = 0; - scope.$digest(); - }; - // Overrides - var show = $typeahead.show; - $typeahead.show = function () { - show(); - setTimeout(function () { - $typeahead.$element.on('mousedown', $typeahead.$onMouseDown); - if (options.keyboard) { - element.on('keydown', $typeahead.$onKeyDown); - } - }); - }; - var hide = $typeahead.hide; - $typeahead.hide = function () { - $typeahead.$element.off('mousedown', $typeahead.$onMouseDown); - if (options.keyboard) { - element.off('keydown', $typeahead.$onKeyDown); - } - hide(); - }; - return $typeahead; - } - TypeaheadFactory.defaults = defaults; - return TypeaheadFactory; - } - ]; -}).directive('bsTypeahead', [ - '$window', - '$parse', - '$q', - '$typeahead', - '$parseOptions', - function ($window, $parse, $q, $typeahead, $parseOptions) { - var defaults = $typeahead.defaults; - return { - restrict: 'EAC', - require: 'ngModel', - link: function postLink(scope, element, attr, controller) { - // Directive options - var options = { scope: scope }; - angular.forEach([ - 'placement', - 'container', - 'delay', - 'trigger', - 'keyboard', - 'html', - 'animation', - 'template', - 'filter', - 'limit', - 'minLength' - ], function (key) { - if (angular.isDefined(attr[key])) - options[key] = attr[key]; - }); - // Build proper ngOptions - var filter = options.filter || defaults.filter; - var limit = options.limit || defaults.limit; - var ngOptions = attr.ngOptions; - if (filter) - ngOptions += ' | ' + filter + ':$viewValue'; - if (limit) - ngOptions += ' | limitTo:' + limit; - var parsedOptions = $parseOptions(ngOptions); - // Initialize typeahead - var typeahead = $typeahead(element, controller, options); - // Watch model for changes - scope.$watch(attr.ngModel, function (newValue, oldValue) { - // console.warn('$watch', element.attr('ng-model'), newValue); - scope.$modelValue = newValue; - // Publish modelValue on scope for custom templates - parsedOptions.valuesFn(scope, controller).then(function (values) { - if (values.length > limit) - values = values.slice(0, limit); - // Do not re-queue an update if a correct value has been selected - if (values.length === 1 && values[0].value === newValue) - return; - typeahead.update(values); - // Queue a new rendering that will leverage collection loading - controller.$render(); - }); + return dateFilter(viewValue, options.timeFormat); + } else if (options.timeType === 'number') { + return controller.$dateValue.getTime(); + } else if (options.timeType === 'iso') { + return controller.$dateValue.toISOString(); + } else { + return new Date(controller.$dateValue); + } }); - // Model rendering in view + // modelValue -> $formatters -> viewValue + controller.$formatters.push(function (modelValue) { + // console.warn('$formatter("%s"): modelValue=%o (%o)', element.attr('ng-model'), modelValue, typeof modelValue); + var date; + if (angular.isUndefined(modelValue) || modelValue === null) { + date = NaN; + } else if (angular.isDate(modelValue)) { + date = modelValue; + } else if (options.timeType === 'string') { + date = dateParser.parse(modelValue); + } else { + date = new Date(modelValue); + } + // Setup default value? + // if(isNaN(date.getTime())) date = new Date(new Date().setMinutes(0) + 36e5); + controller.$dateValue = date; + return controller.$dateValue; + }); + // viewValue -> element controller.$render = function () { - // console.warn('$render', element.attr('ng-model'), 'controller.$modelValue', typeof controller.$modelValue, controller.$modelValue, 'controller.$viewValue', typeof controller.$viewValue, controller.$viewValue); - if (controller.$isEmpty(controller.$viewValue)) - return element.val(''); - var index = typeahead.$getIndex(controller.$modelValue); - var selected = angular.isDefined(index) ? typeahead.$scope.$matches[index].label : controller.$viewValue; - selected = angular.isObject(selected) ? selected.label : selected; - element.val(selected.replace(/<(?:.|\n)*?>/gm, '').trim()); + // console.warn('$render("%s"): viewValue=%o', element.attr('ng-model'), controller.$viewValue); + element.val(!controller.$dateValue || isNaN(controller.$dateValue.getTime()) ? '' : dateFilter(controller.$dateValue, options.timeFormat)); }; // Garbage collection scope.$on('$destroy', function () { - typeahead.destroy(); + timepicker.destroy(); options = null; - typeahead = null; + timepicker = null; }); } }; @@ -3700,4 +3485,219 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']). } ]); +// Source: typeahead.js +angular.module('mgcrea.ngStrap.typeahead', [ + 'mgcrea.ngStrap.tooltip', + 'mgcrea.ngStrap.helpers.parseOptions' +]).provider('$typeahead', function () { + var defaults = this.defaults = { + animation: 'am-fade', + prefixClass: 'typeahead', + placement: 'bottom-left', + template: 'typeahead/typeahead.tpl.html', + trigger: 'focus', + container: false, + keyboard: true, + html: false, + delay: 0, + minLength: 1, + filter: 'filter', + limit: 6 + }; + this.$get = [ + '$window', + '$rootScope', + '$tooltip', + function ($window, $rootScope, $tooltip) { + var bodyEl = angular.element($window.document.body); + function TypeaheadFactory(element, controller, config) { + var $typeahead = {}; + // Common vars + var options = angular.extend({}, defaults, config); + $typeahead = $tooltip(element, options); + var parentScope = config.scope; + var scope = $typeahead.$scope; + scope.$resetMatches = function () { + scope.$matches = []; + scope.$activeIndex = 0; + }; + scope.$resetMatches(); + scope.$activate = function (index) { + scope.$$postDigest(function () { + $typeahead.activate(index); + }); + }; + scope.$select = function (index, evt) { + scope.$$postDigest(function () { + $typeahead.select(index); + }); + }; + scope.$isVisible = function () { + return $typeahead.$isVisible(); + }; + // Public methods + $typeahead.update = function (matches) { + scope.$matches = matches; + if (scope.$activeIndex >= matches.length) { + scope.$activeIndex = 0; + } + }; + $typeahead.activate = function (index) { + scope.$activeIndex = index; + }; + $typeahead.select = function (index) { + var value = scope.$matches[index].value; + controller.$setViewValue(value); + scope.$resetMatches(); + controller.$render(); + if (parentScope) + parentScope.$digest(); + // Emit event + scope.$emit('$typeahead.select', value, index); + }; + // Protected methods + $typeahead.$isVisible = function () { + if (!options.minLength || !controller) { + return !!scope.$matches.length; + } + // minLength support + return scope.$matches.length && angular.isString(controller.$viewValue) && controller.$viewValue.length >= options.minLength; + }; + $typeahead.$getIndex = function (value) { + var l = scope.$matches.length, i = l; + if (!l) + return; + for (i = l; i--;) { + if (scope.$matches[i].value === value) + break; + } + if (i < 0) + return; + return i; + }; + $typeahead.$onMouseDown = function (evt) { + // Prevent blur on mousedown + evt.preventDefault(); + evt.stopPropagation(); + }; + $typeahead.$onKeyDown = function (evt) { + if (!/(38|40|13)/.test(evt.keyCode)) + return; + evt.preventDefault(); + evt.stopPropagation(); + // Select with enter + if (evt.keyCode === 13 && scope.$matches.length) { + $typeahead.select(scope.$activeIndex); + } // Navigate with keyboard + else if (evt.keyCode === 38 && scope.$activeIndex > 0) + scope.$activeIndex--; + else if (evt.keyCode === 40 && scope.$activeIndex < scope.$matches.length - 1) + scope.$activeIndex++; + else if (angular.isUndefined(scope.$activeIndex)) + scope.$activeIndex = 0; + scope.$digest(); + }; + // Overrides + var show = $typeahead.show; + $typeahead.show = function () { + show(); + setTimeout(function () { + $typeahead.$element.on('mousedown', $typeahead.$onMouseDown); + if (options.keyboard) { + element.on('keydown', $typeahead.$onKeyDown); + } + }); + }; + var hide = $typeahead.hide; + $typeahead.hide = function () { + $typeahead.$element.off('mousedown', $typeahead.$onMouseDown); + if (options.keyboard) { + element.off('keydown', $typeahead.$onKeyDown); + } + hide(); + }; + return $typeahead; + } + TypeaheadFactory.defaults = defaults; + return TypeaheadFactory; + } + ]; +}).directive('bsTypeahead', [ + '$window', + '$parse', + '$q', + '$typeahead', + '$parseOptions', + function ($window, $parse, $q, $typeahead, $parseOptions) { + var defaults = $typeahead.defaults; + return { + restrict: 'EAC', + require: 'ngModel', + link: function postLink(scope, element, attr, controller) { + // Directive options + var options = { scope: scope }; + angular.forEach([ + 'placement', + 'container', + 'delay', + 'trigger', + 'keyboard', + 'html', + 'animation', + 'template', + 'filter', + 'limit', + 'minLength' + ], function (key) { + if (angular.isDefined(attr[key])) + options[key] = attr[key]; + }); + // Build proper ngOptions + var filter = options.filter || defaults.filter; + var limit = options.limit || defaults.limit; + var ngOptions = attr.ngOptions; + if (filter) + ngOptions += ' | ' + filter + ':$viewValue'; + if (limit) + ngOptions += ' | limitTo:' + limit; + var parsedOptions = $parseOptions(ngOptions); + // Initialize typeahead + var typeahead = $typeahead(element, controller, options); + // Watch model for changes + scope.$watch(attr.ngModel, function (newValue, oldValue) { + // console.warn('$watch', element.attr('ng-model'), newValue); + scope.$modelValue = newValue; + // Publish modelValue on scope for custom templates + parsedOptions.valuesFn(scope, controller).then(function (values) { + if (values.length > limit) + values = values.slice(0, limit); + // Do not re-queue an update if a correct value has been selected + if (values.length === 1 && values[0].value === newValue) + return; + typeahead.update(values); + // Queue a new rendering that will leverage collection loading + controller.$render(); + }); + }); + // Model rendering in view + controller.$render = function () { + // console.warn('$render', element.attr('ng-model'), 'controller.$modelValue', typeof controller.$modelValue, controller.$modelValue, 'controller.$viewValue', typeof controller.$viewValue, controller.$viewValue); + if (controller.$isEmpty(controller.$viewValue)) + return element.val(''); + var index = typeahead.$getIndex(controller.$modelValue); + var selected = angular.isDefined(index) ? typeahead.$scope.$matches[index].label : controller.$viewValue; + selected = angular.isObject(selected) ? selected.label : selected; + element.val(selected.replace(/<(?:.|\n)*?>/gm, '').trim()); + }; + // Garbage collection + scope.$on('$destroy', function () { + typeahead.destroy(); + options = null; + typeahead = null; + }); + } + }; + } +]); + })(window, document); diff --git a/dist/angular-strap.min.js b/dist/angular-strap.min.js index 68aa5d139..1b03a21ce 100644 --- a/dist/angular-strap.min.js +++ b/dist/angular-strap.min.js @@ -5,5 +5,5 @@ * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -!function(e,t){"use strict";angular.module("mgcrea.ngStrap",["mgcrea.ngStrap.modal","mgcrea.ngStrap.aside","mgcrea.ngStrap.alert","mgcrea.ngStrap.button","mgcrea.ngStrap.select","mgcrea.ngStrap.datepicker","mgcrea.ngStrap.timepicker","mgcrea.ngStrap.navbar","mgcrea.ngStrap.tooltip","mgcrea.ngStrap.popover","mgcrea.ngStrap.dropdown","mgcrea.ngStrap.typeahead","mgcrea.ngStrap.scrollspy","mgcrea.ngStrap.affix","mgcrea.ngStrap.tab"]),angular.module("mgcrea.ngStrap.affix",["mgcrea.ngStrap.helpers.dimensions","mgcrea.ngStrap.helpers.debounce"]).provider("$affix",function(){var e=this.defaults={offsetTop:"auto"};this.$get=["$window","debounce","dimensions",function(t,n,a){function o(o,l){function s(e,t,n){var a=u(),o=c();return h>=a?"top":null!==e&&a+e<=t.top?"middle":null!==v&&t.top+n+g>=o-v?"bottom":"middle"}function u(){return p[0]===t?t.pageYOffset:p[0]===t}function c(){return p[0]===t?t.document.body.scrollHeight:p[0].scrollHeight}var d={},f=angular.extend({},e,l),p=f.target,m="affix affix-top affix-bottom",g=0,$=0,h=0,v=0,y=null,w=null,b=o.parent();if(f.offsetParent)if(f.offsetParent.match(/^\d+$/))for(var k=0;k<1*f.offsetParent-1;k++)b=b.parent();else b=angular.element(f.offsetParent);return d.init=function(){d.$parseOffsets(),$=a.offset(o[0]).top+g,p.on("scroll",d.checkPosition),p.on("click",d.checkPositionWithEventLoop),r.on("resize",d.$debouncedOnResize),d.checkPosition(),d.checkPositionWithEventLoop()},d.destroy=function(){p.off("scroll",d.checkPosition),p.off("click",d.checkPositionWithEventLoop),r.off("resize",d.$debouncedOnResize)},d.checkPositionWithEventLoop=function(){setTimeout(d.checkPosition,1)},d.checkPosition=function(){var e=u(),t=a.offset(o[0]),n=a.height(o[0]),r=s(w,t,n);y!==r&&(y=r,o.removeClass(m).addClass("affix"+("middle"!==r?"-"+r:"")),"top"===r?(w=null,o.css("position",f.offsetParent?"":"relative"),o.css("top","")):"bottom"===r?(w=f.offsetUnpin?-(1*f.offsetUnpin):t.top-e,o.css("position",f.offsetParent?"":"relative"),o.css("top",f.offsetParent?"":i[0].offsetHeight-v-n-$+"px")):(w=null,o.css("position","fixed"),o.css("top",g+"px")))},d.$onResize=function(){d.$parseOffsets(),d.checkPosition()},d.$debouncedOnResize=n(d.$onResize,50),d.$parseOffsets=function(){o.css("position",f.offsetParent?"":"relative"),f.offsetTop&&("auto"===f.offsetTop&&(f.offsetTop="+0"),f.offsetTop.match(/^[-+]\d+$/)?(g=1*-f.offsetTop,h=f.offsetParent?a.offset(b[0]).top+1*f.offsetTop:a.offset(o[0]).top-a.css(o[0],"marginTop",!0)+1*f.offsetTop):h=1*f.offsetTop),f.offsetBottom&&(v=f.offsetParent&&f.offsetBottom.match(/^[-+]\d+$/)?c()-(a.offset(b[0]).top+a.height(b[0]))+1*f.offsetBottom+1:1*f.offsetBottom)},d.init(),d}var i=angular.element(t.document.body),r=angular.element(t);return o}]}).directive("bsAffix",["$affix","$window",function(e,t){return{restrict:"EAC",require:"^?bsAffixTarget",link:function(n,a,o,i){var r={scope:n,offsetTop:"auto",target:i?i.$element:angular.element(t)};angular.forEach(["offsetTop","offsetBottom","offsetParent","offsetUnpin"],function(e){angular.isDefined(o[e])&&(r[e]=o[e])});var l=e(a,r);n.$on("$destroy",function(){r=null,l=null})}}}]).directive("bsAffixTarget",function(){return{controller:["$element",function(e){this.$element=e}]}}),angular.module("mgcrea.ngStrap.alert",["mgcrea.ngStrap.modal"]).provider("$alert",function(){var e=this.defaults={animation:"am-fade",prefixClass:"alert",placement:null,template:"alert/alert.tpl.html",container:!1,element:null,backdrop:!1,keyboard:!0,show:!0,duration:!1,type:!1};this.$get=["$modal","$timeout",function(t,n){function a(a){var o={},i=angular.extend({},e,a);o=t(i),i.type&&(o.$scope.type=i.type);var r=o.show;return i.duration&&(o.show=function(){r(),n(function(){o.hide()},1e3*i.duration)}),o}return a}]}).directive("bsAlert",["$window","$location","$sce","$alert",function(e,t,n,a){e.requestAnimationFrame||e.setTimeout;return{restrict:"EAC",scope:!0,link:function(e,t,o){var i={scope:e,element:t,show:!1};angular.forEach(["template","placement","keyboard","html","container","animation","duration"],function(e){angular.isDefined(o[e])&&(i[e]=o[e])}),angular.forEach(["title","content","type"],function(t){o[t]&&o.$observe(t,function(a){e[t]=n.trustAsHtml(a)})}),o.bsAlert&&e.$watch(o.bsAlert,function(t){angular.isObject(t)?angular.extend(e,t):e.content=t},!0);var r=a(i);t.on(o.trigger||"click",r.toggle),e.$on("$destroy",function(){r.destroy(),i=null,r=null})}}}]),angular.module("mgcrea.ngStrap.aside",["mgcrea.ngStrap.modal"]).provider("$aside",function(){var e=this.defaults={animation:"am-fade-and-slide-right",prefixClass:"aside",placement:"right",template:"aside/aside.tpl.html",contentTemplate:!1,container:!1,element:null,backdrop:!0,keyboard:!0,html:!1,show:!0};this.$get=["$modal",function(t){function n(n){var a={},o=angular.extend({},e,n);return a=t(o)}return n}]}).directive("bsAside",["$window","$sce","$aside",function(e,t,n){e.requestAnimationFrame||e.setTimeout;return{restrict:"EAC",scope:!0,link:function(e,a,o){var i={scope:e,element:a,show:!1};angular.forEach(["template","contentTemplate","placement","backdrop","keyboard","html","container","animation"],function(e){angular.isDefined(o[e])&&(i[e]=o[e])}),angular.forEach(["title","content"],function(n){o[n]&&o.$observe(n,function(a){e[n]=t.trustAsHtml(a)})}),o.bsAside&&e.$watch(o.bsAside,function(t){angular.isObject(t)?angular.extend(e,t):e.content=t},!0);var r=n(i);a.on(o.trigger||"click",r.toggle),e.$on("$destroy",function(){r.destroy(),i=null,r=null})}}}]),angular.module("mgcrea.ngStrap.button",[]).provider("$button",function(){var e=this.defaults={activeClass:"active",toggleEvent:"click"};this.$get=function(){return{defaults:e}}}).directive("bsCheckboxGroup",function(){return{restrict:"A",require:"ngModel",compile:function(e,t){e.attr("data-toggle","buttons"),e.removeAttr("ng-model");var n=e[0].querySelectorAll('input[type="checkbox"]');angular.forEach(n,function(e){var n=angular.element(e);n.attr("bs-checkbox",""),n.attr("ng-model",t.ngModel+"."+n.attr("value"))})}}}).directive("bsCheckbox",["$button","$$rAF",function(e,t){var n=e.defaults,a=/^(true|false|\d+)$/;return{restrict:"A",require:"ngModel",link:function(e,o,i,r){var l=n,s="INPUT"===o[0].nodeName,u=s?o.parent():o,c=angular.isDefined(i.trueValue)?i.trueValue:!0;a.test(i.trueValue)&&(c=e.$eval(i.trueValue));var d=angular.isDefined(i.falseValue)?i.falseValue:!1;a.test(i.falseValue)&&(d=e.$eval(i.falseValue));var f="boolean"!=typeof c||"boolean"!=typeof d;f&&(r.$parsers.push(function(e){return e?c:d}),e.$watch(i.ngModel,function(){r.$render()})),r.$render=function(){var e=angular.equals(r.$modelValue,c);t(function(){s&&(o[0].checked=e),u.toggleClass(l.activeClass,e)})},o.bind(l.toggleEvent,function(){e.$apply(function(){s||r.$setViewValue(!u.hasClass("active")),f||r.$render()})})}}}]).directive("bsRadioGroup",function(){return{restrict:"A",require:"ngModel",compile:function(e,t){e.attr("data-toggle","buttons"),e.removeAttr("ng-model");var n=e[0].querySelectorAll('input[type="radio"]');angular.forEach(n,function(e){angular.element(e).attr("bs-radio",""),angular.element(e).attr("ng-model",t.ngModel)})}}}).directive("bsRadio",["$button","$$rAF",function(e,t){var n=e.defaults,a=/^(true|false|\d+)$/;return{restrict:"A",require:"ngModel",link:function(e,o,i,r){var l=n,s="INPUT"===o[0].nodeName,u=s?o.parent():o,c=a.test(i.value)?e.$eval(i.value):i.value;r.$render=function(){var e=angular.equals(r.$modelValue,c);t(function(){s&&(o[0].checked=e),u.toggleClass(l.activeClass,e)})},o.bind(l.toggleEvent,function(){e.$apply(function(){r.$setViewValue(c),r.$render()})})}}}]),angular.module("mgcrea.ngStrap.datepicker",["mgcrea.ngStrap.helpers.dateParser","mgcrea.ngStrap.tooltip"]).provider("$datepicker",function(){var e=this.defaults={animation:"am-fade",prefixClass:"datepicker",placement:"bottom-left",template:"datepicker/datepicker.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,useNative:!1,dateType:"date",dateFormat:"shortDate",dayFormat:"dd",strictFormat:!1,autoclose:!1,minDate:-1/0,maxDate:+1/0,startView:0,minView:0,startWeek:0};this.$get=["$window","$document","$rootScope","$sce","$locale","dateFilter","datepickerViews","$tooltip",function(t,n,a,o,i,r,l,s){function u(t,n,a){function o(e){e.selected=r.$isSelected(e.date)}function i(){t[0].focus()}var r=s(t,angular.extend({},e,a)),u=a.scope,f=r.$options,p=r.$scope;f.startView&&(f.startView-=f.minView);var m=l(r);r.$views=m.views;var g=m.viewDate;p.$mode=f.startView;var $=r.$views[p.$mode];p.$select=function(e){r.select(e)},p.$selectPane=function(e){r.$selectPane(e)},p.$toggleMode=function(){r.setMode((p.$mode+1)%r.$views.length)},r.update=function(e){angular.isDate(e)&&!isNaN(e.getTime())&&(r.$date=e,$.update.call($,e)),r.$build(!0)},r.select=function(e,t){angular.isDate(n.$dateValue)||(n.$dateValue=new Date(e)),n.$dateValue.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),!p.$mode||t?(n.$setViewValue(n.$dateValue),n.$render(),f.autoclose&&!t&&r.hide(!0)):(angular.extend(g,{year:e.getFullYear(),month:e.getMonth(),date:e.getDate()}),r.setMode(p.$mode-1),r.$build())},r.setMode=function(e){p.$mode=e,$=r.$views[p.$mode],r.$build()},r.$build=function(e){e===!0&&$.built||(e!==!1||$.built)&&$.build.call($)},r.$updateSelected=function(){for(var e=0,t=p.rows.length;t>e;e++)angular.forEach(p.rows[e],o)},r.$isSelected=function(e){return $.isSelected(e)},r.$selectPane=function(e){var t=$.steps,n=new Date(Date.UTC(g.year+(t.year||0)*e,g.month+(t.month||0)*e,g.date+(t.day||0)*e));angular.extend(g,{year:n.getUTCFullYear(),month:n.getUTCMonth(),date:n.getUTCDate()}),r.$build()},r.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),c){var t=angular.element(e.target);"button"!==t[0].nodeName.toLowerCase()&&(t=t.parent()),t.triggerHandler("click")}},r.$onKeyDown=function(e){if(/(38|37|39|40|13)/.test(e.keyCode)&&!e.shiftKey&&!e.altKey){if(e.preventDefault(),e.stopPropagation(),13===e.keyCode)return p.$mode?p.$apply(function(){r.setMode(p.$mode-1)}):r.hide(!0);$.onKeyDown(e),u.$digest()}};var h=r.init;r.init=function(){return d&&f.useNative?(t.prop("type","date"),void t.css("-webkit-appearance","textfield")):(c&&(t.prop("type","text"),t.attr("readonly","true"),t.on("click",i)),void h())};var v=r.destroy;r.destroy=function(){d&&f.useNative&&t.off("click",i),v()};var y=r.show;r.show=function(){y(),setTimeout(function(){r.$element.on(c?"touchstart":"mousedown",r.$onMouseDown),f.keyboard&&t.on("keydown",r.$onKeyDown)})};var w=r.hide;return r.hide=function(e){r.$element.off(c?"touchstart":"mousedown",r.$onMouseDown),f.keyboard&&t.off("keydown",r.$onKeyDown),w(e)},r}var c=(angular.element(t.document.body),"createTouch"in t.document),d=/(ip(a|o)d|iphone|android)/gi.test(t.navigator.userAgent);return e.lang||(e.lang=i.id),u.defaults=e,u}]}).directive("bsDatepicker",["$window","$parse","$q","$locale","dateFilter","$datepicker","$dateParser","$timeout",function(e,t,n,a,o,i,r){var l=(i.defaults,/(ip(a|o)d|iphone|android)/gi.test(e.navigator.userAgent)),s=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};return{restrict:"EAC",require:"ngModel",link:function(e,t,n,a){var u={scope:e,controller:a};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","autoclose","dateType","dateFormat","dayFormat","strictFormat","startWeek","useNative","lang","startView","minView"],function(e){angular.isDefined(n[e])&&(u[e]=n[e])}),l&&u.useNative&&(u.dateFormat="yyyy-MM-dd");var c=i(t,a,u);u=c.$options,angular.forEach(["minDate","maxDate"],function(e){angular.isDefined(n[e])&&n.$observe(e,function(t){if("today"===t){var n=new Date;c.$options[e]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()+("maxDate"===e?1:0),0,0,0,"minDate"===e?0:-1)}else c.$options[e]=angular.isString(t)&&t.match(/^".+"$/)?+new Date(t.substr(1,t.length-2)):s(t)?+new Date(parseInt(t,10)):+new Date(t);!isNaN(c.$options[e])&&c.$build(!1)})}),e.$watch(n.ngModel,function(){c.update(a.$dateValue)},!0);var d=r({format:u.dateFormat,lang:u.lang,strict:u.strictFormat});a.$parsers.unshift(function(e){if(!e)return void a.$setValidity("date",!0);var t=d.parse(e,a.$dateValue);if(!t||isNaN(t.getTime()))return void a.$setValidity("date",!1);var n=(isNaN(c.$options.minDate)||t.getTime()>=c.$options.minDate)&&(isNaN(c.$options.maxDate)||t.getTime()<=c.$options.maxDate);return a.$setValidity("date",n),n&&(a.$dateValue=t),"string"===u.dateType?o(e,u.dateFormat):"number"===u.dateType?a.$dateValue.getTime():"iso"===u.dateType?a.$dateValue.toISOString():new Date(a.$dateValue)}),a.$formatters.push(function(e){var t;return t=angular.isUndefined(e)||null===e?0/0:angular.isDate(e)?e:"string"===u.dateType?d.parse(e):new Date(e),a.$dateValue=t,a.$dateValue}),a.$render=function(){t.val(!a.$dateValue||isNaN(a.$dateValue.getTime())?"":o(a.$dateValue,u.dateFormat))},e.$on("$destroy",function(){c.destroy(),u=null,c=null})}}}]).provider("datepickerViews",function(){function e(e,t){for(var n=[];e.length>0;)n.push(e.splice(0,t));return n}function t(e,t){return(e%t+t)%t}this.defaults={dayFormat:"dd",daySplit:7};this.$get=["$locale","$sce","dateFilter",function(n,a,o){return function(i){var r=i.$scope,l=i.$options,s=n.DATETIME_FORMATS.SHORTDAY,u=s.slice(l.startWeek).concat(s.slice(0,l.startWeek)),c=a.trustAsHtml(''+u.join('')+""),d=i.$date||new Date,f={year:d.getFullYear(),month:d.getMonth(),date:d.getDate()},p=(6e4*d.getTimezoneOffset(),[{format:l.dayFormat,split:7,steps:{month:1},update:function(e,t){!this.built||t||e.getFullYear()!==f.year||e.getMonth()!==f.month?(angular.extend(f,{year:i.$date.getFullYear(),month:i.$date.getMonth(),date:i.$date.getDate()}),i.$build()):e.getDate()!==f.date&&(f.date=i.$date.getDate(),i.$updateSelected())},build:function(){var n=new Date(f.year,f.month,1),a=n.getTimezoneOffset(),s=new Date(+n-864e5*t(n.getDay()-l.startWeek,7)),u=s.getTimezoneOffset();u!==a&&(s=new Date(+s+6e4*(u-a)));for(var d,p=[],m=0;42>m;m++)d=new Date(s.getFullYear(),s.getMonth(),s.getDate()+m),p.push({date:d,label:o(d,this.format),selected:i.$date&&this.isSelected(d),muted:d.getMonth()!==f.month,disabled:this.isDisabled(d)});r.title=o(n,"MMMM yyyy"),r.showLabels=!0,r.labels=c,r.rows=e(p,this.split),this.built=!0},isSelected:function(e){return i.$date&&e.getFullYear()===i.$date.getFullYear()&&e.getMonth()===i.$date.getMonth()&&e.getDate()===i.$date.getDate()},isDisabled:function(e){return e.getTime()l.maxDate},onKeyDown:function(e){var t,n=i.$date.getTime();37===e.keyCode?t=new Date(n-864e5):38===e.keyCode?t=new Date(n-6048e5):39===e.keyCode?t=new Date(n+864e5):40===e.keyCode&&(t=new Date(n+6048e5)),this.isDisabled(t)||i.select(t,!0)}},{name:"month",format:"MMM",split:4,steps:{year:1},update:function(e){this.built&&e.getFullYear()===f.year?e.getMonth()!==f.month&&(angular.extend(f,{month:i.$date.getMonth(),date:i.$date.getDate()}),i.$updateSelected()):(angular.extend(f,{year:i.$date.getFullYear(),month:i.$date.getMonth(),date:i.$date.getDate()}),i.$build())},build:function(){for(var t,n=(new Date(f.year,0,1),[]),a=0;12>a;a++)t=new Date(f.year,a,1),n.push({date:t,label:o(t,this.format),selected:i.$isSelected(t),disabled:this.isDisabled(t)});r.title=o(t,"yyyy"),r.showLabels=!1,r.rows=e(n,this.split),this.built=!0},isSelected:function(e){return i.$date&&e.getFullYear()===i.$date.getFullYear()&&e.getMonth()===i.$date.getMonth()},isDisabled:function(e){var t=+new Date(e.getFullYear(),e.getMonth()+1,0);return tl.maxDate},onKeyDown:function(e){var t=i.$date.getMonth(),n=new Date(i.$date);37===e.keyCode?n.setMonth(t-1):38===e.keyCode?n.setMonth(t-4):39===e.keyCode?n.setMonth(t+1):40===e.keyCode&&n.setMonth(t+4),this.isDisabled(n)||i.select(n,!0)}},{name:"year",format:"yyyy",split:4,steps:{year:12},update:function(e,t){!this.built||t||parseInt(e.getFullYear()/20,10)!==parseInt(f.year/20,10)?(angular.extend(f,{year:i.$date.getFullYear(),month:i.$date.getMonth(),date:i.$date.getDate()}),i.$build()):e.getFullYear()!==f.year&&(angular.extend(f,{year:i.$date.getFullYear(),month:i.$date.getMonth(),date:i.$date.getDate()}),i.$updateSelected())},build:function(){for(var t,n=f.year-f.year%(3*this.split),a=[],l=0;12>l;l++)t=new Date(n+l,0,1),a.push({date:t,label:o(t,this.format),selected:i.$isSelected(t),disabled:this.isDisabled(t)});r.title=a[0].label+"-"+a[a.length-1].label,r.showLabels=!1,r.rows=e(a,this.split),this.built=!0},isSelected:function(e){return i.$date&&e.getFullYear()===i.$date.getFullYear()},isDisabled:function(e){var t=+new Date(e.getFullYear()+1,0,0);return tl.maxDate},onKeyDown:function(e){var t=i.$date.getFullYear(),n=new Date(i.$date);37===e.keyCode?n.setYear(t-1):38===e.keyCode?n.setYear(t-4):39===e.keyCode?n.setYear(t+1):40===e.keyCode&&n.setYear(t+4),this.isDisabled(n)||i.select(n,!0)}}]);return{views:l.minView?Array.prototype.slice.call(p,l.minView):p,viewDate:f}}}]}),angular.module("mgcrea.ngStrap.dropdown",["mgcrea.ngStrap.tooltip"]).provider("$dropdown",function(){var e=this.defaults={animation:"am-fade",prefixClass:"dropdown",placement:"bottom-left",template:"dropdown/dropdown.tpl.html",trigger:"click",container:!1,keyboard:!0,html:!1,delay:0};this.$get=["$window","$rootScope","$tooltip",function(t,n,a){function o(t,o){function l(e){return e.target!==t[0]?e.target!==t[0]&&s.hide():void 0}{var s={},u=angular.extend({},e,o);s.$scope=u.scope&&u.scope.$new()||n.$new()}s=a(t,u),s.$onKeyDown=function(e){if(/(38|40)/.test(e.keyCode)){e.preventDefault(),e.stopPropagation();var t=angular.element(s.$element[0].querySelectorAll("li:not(.divider) a"));if(t.length){var n;angular.forEach(t,function(e,t){r&&r.call(e,":focus")&&(n=t)}),38===e.keyCode&&n>0?n--:40===e.keyCode&&n1){var r=i.search(n[t]);e=e.split(n[t]).join(""),f[n[t]]&&(a[r]=f[n[t]])}return angular.forEach(a,function(e){o.push(e)}),o}function i(e){return e.replace(/\//g,"[\\/]").replace("/-/g","[-]").replace(/\./g,"[.]").replace(/\\s/g,"[\\s]")}function r(e){var t,n=Object.keys(d),a=e;for(t=0;tu?a=setTimeout(s,t-u):(a=null,n||(l=e.apply(i,o)))},u=n&&!a;return a||(a=setTimeout(s,t)),u&&(l=e.apply(i,o)),l}}).constant("throttle",function(e,t,n){var a,o,i,r=null,l=0;n||(n={});var s=function(){l=n.leading===!1?0:new Date,r=null,i=e.apply(a,o)};return function(){var u=new Date;l||n.leading!==!1||(l=u);var c=t-(u-l);return a=this,o=arguments,0>=c?(clearTimeout(r),r=null,l=u,i=e.apply(a,o)):r||n.trailing===!1||(r=setTimeout(s,c)),i}}),angular.module("mgcrea.ngStrap.helpers.dimensions",[]).factory("dimensions",["$document","$window",function(){var t=(angular.element,{}),n=t.nodeName=function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()};t.css=function(t,n,a){var o;return o=t.currentStyle?t.currentStyle[n]:e.getComputedStyle?e.getComputedStyle(t)[n]:t.style[n],a===!0?parseFloat(o)||0:o},t.offset=function(t){var n=t.getBoundingClientRect(),a=t.ownerDocument;return{width:t.offsetWidth,height:t.offsetHeight,top:n.top+(e.pageYOffset||a.documentElement.scrollTop)-(a.documentElement.clientTop||0),left:n.left+(e.pageXOffset||a.documentElement.scrollLeft)-(a.documentElement.clientLeft||0)}},t.position=function(e){var o,i,r={top:0,left:0};return"fixed"===t.css(e,"position")?i=e.getBoundingClientRect():(o=a(e),i=t.offset(e),i=t.offset(e),n(o,"html")||(r=t.offset(o)),r.top+=t.css(o,"borderTopWidth",!0),r.left+=t.css(o,"borderLeftWidth",!0)),{width:e.offsetWidth,height:e.offsetHeight,top:i.top-r.top-t.css(e,"marginTop",!0),left:i.left-r.left-t.css(e,"marginLeft",!0)}};var a=function(e){var a=e.ownerDocument,o=e.offsetParent||a;if(n(o,"#document"))return a.documentElement;for(;o&&!n(o,"html")&&"static"===t.css(o,"position");)o=o.offsetParent;return o||a.documentElement};return t.height=function(e,n){var a=e.offsetHeight;return n?a+=t.css(e,"marginTop",!0)+t.css(e,"marginBottom",!0):a-=t.css(e,"paddingTop",!0)+t.css(e,"paddingBottom",!0)+t.css(e,"borderTopWidth",!0)+t.css(e,"borderBottomWidth",!0),a},t.width=function(e,n){var a=e.offsetWidth;return n?a+=t.css(e,"marginLeft",!0)+t.css(e,"marginRight",!0):a-=t.css(e,"paddingLeft",!0)+t.css(e,"paddingRight",!0)+t.css(e,"borderLeftWidth",!0)+t.css(e,"borderRightWidth",!0),a},t}]),angular.module("mgcrea.ngStrap.helpers.parseOptions",[]).provider("$parseOptions",function(){var e=this.defaults={regexp:/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/};this.$get=["$parse","$q",function(t,n){function a(a,o){function i(e){return e.map(function(e,t){var n,a,o={};return o[c]=e,n=u(o),a=p(o)||t,{label:n,value:a}})}var r={},l=angular.extend({},e,o);r.$values=[];var s,u,c,d,f,p,m;return r.init=function(){r.$match=s=a.match(l.regexp),u=t(s[2]||s[1]),c=s[4]||s[6],d=s[5],f=t(s[3]||""),p=t(s[2]?s[1]:c),m=t(s[7])},r.valuesFn=function(e,t){return n.when(m(e,t)).then(function(e){return r.$values=e?i(e):{},r.$values})},r.init(),r}return a}]}),angular.version.minor<3&&angular.version.dot<14&&angular.module("ng").factory("$$rAF",["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame,a=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,o=!!n,i=o?function(e){var t=n(e);return function(){a(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return i.supported=o,i}]),angular.module("mgcrea.ngStrap.modal",["mgcrea.ngStrap.helpers.dimensions"]).provider("$modal",function(){var e=this.defaults={animation:"am-fade",backdropAnimation:"am-fade",prefixClass:"modal",prefixEvent:"modal",placement:"top",template:"modal/modal.tpl.html",contentTemplate:!1,container:!1,element:null,backdrop:!0,keyboard:!0,html:!1,show:!0};this.$get=["$window","$rootScope","$compile","$q","$templateCache","$http","$animate","$timeout","$sce","dimensions",function(n,a,o,i,r,l,s,u,c){function d(t){function n(e){e.target===e.currentTarget&&("static"===r.backdrop?i.focus():i.hide())}var i={},r=i.$options=angular.extend({},e,t);i.$promise=p(r.template);var l=i.$scope=r.scope&&r.scope.$new()||a.$new();r.element||r.container||(r.container="body"),m(["title","content"],function(e){r[e]&&(l[e]=c.trustAsHtml(r[e]))}),l.$hide=function(){l.$$postDigest(function(){i.hide()})},l.$show=function(){l.$$postDigest(function(){i.show()})},l.$toggle=function(){l.$$postDigest(function(){i.toggle()})},r.contentTemplate&&(i.$promise=i.$promise.then(function(e){var n=angular.element(e);return p(r.contentTemplate).then(function(e){var a=f('[ng-bind="content"]',n[0]).removeAttr("ng-bind").html(e);return t.template||a.next().remove(),n[0].outerHTML})}));var u,d,y=angular.element('
');return i.$promise.then(function(e){angular.isObject(e)&&(e=e.data),r.html&&(e=e.replace(v,'ng-bind-html="')),e=g.apply(e),u=o(e),i.init()}),i.init=function(){r.show&&l.$$postDigest(function(){i.show()})},i.destroy=function(){d&&(d.remove(),d=null),y&&(y.remove(),y=null),l.$destroy()},i.show=function(){l.$emit(r.prefixEvent+".show.before",i);var e=r.container?f(r.container):null,t=r.container?null:r.element;d=i.$element=u(l,function(){}),d.css({display:"block"}).addClass(r.placement),r.animation&&(r.backdrop&&y.addClass(r.backdropAnimation),d.addClass(r.animation)),r.backdrop&&s.enter(y,h,null,function(){}),s.enter(d,e,t,function(){l.$emit(r.prefixEvent+".show",i)}),l.$isShown=!0,l.$$phase||l.$root.$$phase||l.$digest();var a=d[0];$(function(){a.focus()}),h.addClass(r.prefixClass+"-open"),r.animation&&h.addClass(r.prefixClass+"-with-"+r.animation),r.backdrop&&(d.on("click",n),y.on("click",n)),r.keyboard&&d.on("keyup",i.$onKeyUp)},i.hide=function(){l.$emit(r.prefixEvent+".hide.before",i),s.leave(d,function(){l.$emit(r.prefixEvent+".hide",i),h.removeClass(r.prefixClass+"-open"),r.animation&&h.addClass(r.prefixClass+"-with-"+r.animation)}),r.backdrop&&s.leave(y,function(){}),l.$isShown=!1,l.$$phase||l.$root.$$phase||l.$digest(),r.backdrop&&(d.off("click",n),y.off("click",n)),r.keyboard&&d.off("keyup",i.$onKeyUp)},i.toggle=function(){l.$isShown?i.hide():i.show()},i.focus=function(){d[0].focus()},i.$onKeyUp=function(e){27===e.which&&i.hide()},i}function f(e,n){return angular.element((n||t).querySelectorAll(e))}function p(e){return i.when(r.get(e)||l.get(e)).then(function(t){return angular.isObject(t)?(r.put(e,t.data),t.data):t})}var m=angular.forEach,g=String.prototype.trim,$=n.requestAnimationFrame||n.setTimeout,h=angular.element(n.document.body),v=/ng-bind="/gi;return d}]}).directive("bsModal",["$window","$location","$sce","$modal",function(e,t,n,a){return{restrict:"EAC",scope:!0,link:function(e,t,o){var i={scope:e,element:t,show:!1};angular.forEach(["template","contentTemplate","placement","backdrop","keyboard","html","container","animation"],function(e){angular.isDefined(o[e])&&(i[e]=o[e])}),angular.forEach(["title","content"],function(t){o[t]&&o.$observe(t,function(a){e[t]=n.trustAsHtml(a)})}),o.bsModal&&e.$watch(o.bsModal,function(t){angular.isObject(t)?angular.extend(e,t):e.content=t},!0);var r=a(i);t.on(o.trigger||"click",r.toggle),e.$on("$destroy",function(){r.destroy(),i=null,r=null})}}}]),angular.module("mgcrea.ngStrap.navbar",[]).provider("$navbar",function(){var e=this.defaults={activeClass:"active",routeAttr:"data-match-route",strict:!1};this.$get=function(){return{defaults:e}}}).directive("bsNavbar",["$window","$location","$navbar",function(e,t,n){var a=n.defaults;return{restrict:"A",link:function(e,n,o){var i=angular.copy(a);angular.forEach(Object.keys(a),function(e){angular.isDefined(o[e])&&(i[e]=o[e])}),e.$watch(function(){return t.path()},function(e){var t=n[0].querySelectorAll("li["+i.routeAttr+"]");angular.forEach(t,function(t){var n=angular.element(t),a=n.attr(i.routeAttr).replace("/","\\/");i.strict&&(a="^"+a+"$");var o=new RegExp(a,["i"]);o.test(e)?n.addClass(i.activeClass):n.removeClass(i.activeClass)})})}}}]),angular.module("mgcrea.ngStrap.scrollspy",["mgcrea.ngStrap.helpers.debounce","mgcrea.ngStrap.helpers.dimensions"]).provider("$scrollspy",function(){var e=this.$$spies={},n=this.defaults={debounce:150,throttle:100,offset:100};this.$get=["$window","$document","$rootScope","dimensions","debounce","throttle",function(a,o,i,r,l,s){function u(e,t){return e[0].nodeName&&e[0].nodeName.toLowerCase()===t.toLowerCase()}function c(o){var c=angular.extend({},n,o);c.element||(c.element=p);var m=u(c.element,"body"),g=m?d:c.element,$=m?"window":c.id;if(e[$])return e[$].$$count++,e[$];var h,v,y,w,b,k,D,T,x={},S=x.$trackedElements=[],M=[];return x.init=function(){this.$$count=1,w=l(this.checkPosition,c.debounce),b=s(this.checkPosition,c.throttle),g.on("click",this.checkPositionWithEventLoop),d.on("resize",w),g.on("scroll",b),k=l(this.checkOffsets,c.debounce),h=i.$on("$viewContentLoaded",k),v=i.$on("$includeContentLoaded",k),k(),$&&(e[$]=x)},x.destroy=function(){this.$$count--,this.$$count>0||(g.off("click",this.checkPositionWithEventLoop),d.off("resize",w),g.off("scroll",w),h(),v(),$&&delete e[$])},x.checkPosition=function(){if(M.length){if(T=(m?a.pageYOffset:g.prop("scrollTop"))||0,D=Math.max(a.innerHeight,f.prop("clientHeight")),TM[e+1].offsetTop))return x.$activateElement(M[e])}},x.checkPositionWithEventLoop=function(){setTimeout(this.checkPosition,1)},x.$activateElement=function(e){if(y){var t=x.$getTrackedElement(y);t&&(t.source.removeClass("active"),u(t.source,"li")&&u(t.source.parent().parent(),"li")&&t.source.parent().parent().removeClass("active"))}y=e.target,e.source.addClass("active"),u(e.source,"li")&&u(e.source.parent().parent(),"li")&&e.source.parent().parent().addClass("active")},x.$getTrackedElement=function(e){return S.filter(function(t){return t.target===e})[0]},x.checkOffsets=function(){angular.forEach(S,function(e){var n=t.querySelector(e.target);e.offsetTop=n?r.offset(n).top:null,c.offset&&null!==e.offsetTop&&(e.offsetTop-=1*c.offset)}),M=S.filter(function(e){return null!==e.offsetTop}).sort(function(e,t){return e.offsetTop-t.offsetTop}),w()},x.trackElement=function(e,t){S.push({target:e,source:t})},x.untrackElement=function(e,t){for(var n,a=S.length;a--;)if(S[a].target===e&&S[a].source===t){n=a;break}S=S.splice(n,1)},x.activate=function(e){S[e].addClass("active")},x.init(),x}var d=angular.element(a),f=angular.element(o.prop("documentElement")),p=angular.element(a.document.body);return c}]}).directive("bsScrollspy",["$rootScope","debounce","dimensions","$scrollspy",function(e,t,n,a){return{restrict:"EAC",link:function(e,t,n){var o={scope:e}; -angular.forEach(["offset","target"],function(e){angular.isDefined(n[e])&&(o[e]=n[e])});var i=a(o);i.trackElement(o.target,t),e.$on("$destroy",function(){i.untrackElement(o.target,t),i.destroy(),o=null,i=null})}}}]).directive("bsScrollspyList",["$rootScope","debounce","dimensions","$scrollspy",function(){return{restrict:"A",compile:function(e){var t=e[0].querySelectorAll("li > a[href]");angular.forEach(t,function(e){var t=angular.element(e);t.parent().attr("bs-scrollspy","").attr("data-target",t.attr("href"))})}}}]),angular.module("mgcrea.ngStrap.popover",["mgcrea.ngStrap.tooltip"]).provider("$popover",function(){var e=this.defaults={animation:"am-fade",placement:"right",template:"popover/popover.tpl.html",contentTemplate:!1,trigger:"click",keyboard:!0,html:!1,title:"",content:"",delay:0,container:!1};this.$get=["$tooltip",function(t){function n(n,a){var o=angular.extend({},e,a),i=t(n,o);return o.content&&(i.$scope.content=o.content),i}return n}]}).directive("bsPopover",["$window","$location","$sce","$popover",function(e,t,n,a){var o=e.requestAnimationFrame||e.setTimeout;return{restrict:"EAC",scope:!0,link:function(e,t,i){var r={scope:e};angular.forEach(["template","contentTemplate","placement","container","delay","trigger","keyboard","html","animation"],function(e){angular.isDefined(i[e])&&(r[e]=i[e])}),angular.forEach(["title","content"],function(t){i[t]&&i.$observe(t,function(a,i){e[t]=n.trustAsHtml(a),angular.isDefined(i)&&o(function(){l&&l.$applyPlacement()})})}),i.bsPopover&&e.$watch(i.bsPopover,function(t,n){angular.isObject(t)?angular.extend(e,t):e.content=t,angular.isDefined(n)&&o(function(){l&&l.$applyPlacement()})},!0);var l=a(t,r);e.$on("$destroy",function(){l.destroy(),r=null,l=null})}}}]),angular.module("mgcrea.ngStrap.select",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$select",function(){var e=this.defaults={animation:"am-fade",prefixClass:"select",placement:"bottom-left",template:"select/select.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,multiple:!1,sort:!0,caretHtml:' ',placeholder:"Choose among the following...",maxLength:3,maxLengthHtml:"selected"};this.$get=["$window","$document","$rootScope","$tooltip",function(t,n,a,o){function i(t,n,a){var i={},l=angular.extend({},e,a);i=o(t,l);var s=a.scope,u=i.$scope;u.$matches=[],u.$activeIndex=0,u.$isMultiple=l.multiple,u.$activate=function(e){u.$$postDigest(function(){i.activate(e)})},u.$select=function(e){u.$$postDigest(function(){i.select(e)})},u.$isVisible=function(){return i.$isVisible()},u.$isActive=function(e){return i.$isActive(e)},i.update=function(e){u.$matches=e,i.$updateActiveIndex()},i.activate=function(e){return l.multiple?(u.$activeIndex.sort(),i.$isActive(e)?u.$activeIndex.splice(u.$activeIndex.indexOf(e),1):u.$activeIndex.push(e),l.sort&&u.$activeIndex.sort()):u.$activeIndex=e,u.$activeIndex},i.select=function(e){var t=u.$matches[e].value;i.activate(e),n.$setViewValue(l.multiple?u.$activeIndex.map(function(e){return u.$matches[e].value}):t),n.$render(),s&&s.$digest(),l.multiple||i.hide(),u.$emit("$select.select",t,e)},i.$updateActiveIndex=function(){n.$modelValue&&u.$matches.length?u.$activeIndex=l.multiple&&angular.isArray(n.$modelValue)?n.$modelValue.map(function(e){return i.$getIndex(e)}):i.$getIndex(n.$modelValue):u.$activeIndex>=u.$matches.length&&(u.$activeIndex=l.multiple?[]:0)},i.$isVisible=function(){return l.minLength&&n?u.$matches.length&&n.$viewValue.length>=l.minLength:u.$matches.length},i.$isActive=function(e){return l.multiple?-1!==u.$activeIndex.indexOf(e):u.$activeIndex===e},i.$getIndex=function(e){var t=u.$matches.length,n=t;if(t){for(n=t;n--&&u.$matches[n].value!==e;);if(!(0>n))return n}},i.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),r){var t=angular.element(e.target);t.triggerHandler("click")}},i.$onKeyDown=function(e){if(/(9|13|38|40)/.test(e.keyCode)){if(e.preventDefault(),e.stopPropagation(),13===e.keyCode||9===e.keyCode)return i.select(u.$activeIndex);38===e.keyCode&&u.$activeIndex>0?u.$activeIndex--:40===e.keyCode&&u.$activeIndex'),s.after(t)}var u=o(n.ngOptions),c=a(t,r,l),d=u.$match[7].replace(/\|.+/,"").trim();e.$watch(d,function(){u.valuesFn(e,r).then(function(e){c.update(e),r.$render()})},!0),e.$watch(n.ngModel,function(){c.$updateActiveIndex()},!0),r.$render=function(){var e,a;l.multiple&&angular.isArray(r.$modelValue)?(e=r.$modelValue.map(function(e){return a=c.$getIndex(e),angular.isDefined(a)?c.$scope.$matches[a].label:!1}).filter(angular.isDefined),e=e.length>(l.maxLength||i.maxLength)?e.length+" "+(l.maxLengthHtml||i.maxLengthHtml):e.join(", ")):(a=c.$getIndex(r.$modelValue),e=angular.isDefined(a)?c.$scope.$matches[a].label:!1),t.html((e?e:n.placeholder||i.placeholder)+i.caretHtml)},e.$on("$destroy",function(){c.destroy(),l=null,c=null})}}}]),angular.module("mgcrea.ngStrap.tab",[]).run(["$templateCache",function(e){e.put("$pane","{{pane.content}}")}]).provider("$tab",function(){var e=this.defaults={animation:"am-fade",template:"tab/tab.tpl.html"};this.$get=function(){return{defaults:e}}}).directive("bsTabs",["$window","$animate","$tab",function(e,t,n){var a=n.defaults;return{restrict:"EAC",scope:!0,require:"?ngModel",templateUrl:function(e,t){return t.template||a.template},link:function(e,t,n,o){var i=a;angular.forEach(["animation"],function(e){angular.isDefined(n[e])&&(i[e]=n[e])}),n.bsTabs&&e.$watch(n.bsTabs,function(t){e.panes=t},!0),t.addClass("tabs"),i.animation&&t.addClass(i.animation),e.active=e.activePane=0,e.setActive=function(t){e.active=t,o&&o.$setViewValue(t)},o&&(o.$render=function(){e.active=1*o.$modelValue})}}}]),angular.module("mgcrea.ngStrap.timepicker",["mgcrea.ngStrap.helpers.dateParser","mgcrea.ngStrap.tooltip"]).provider("$timepicker",function(){var e=this.defaults={animation:"am-fade",prefixClass:"timepicker",placement:"bottom-left",template:"timepicker/timepicker.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,useNative:!0,timeType:"date",timeFormat:"shortTime",autoclose:!1,minTime:-1/0,maxTime:+1/0,length:5,hourStep:1,minuteStep:5};this.$get=["$window","$document","$rootScope","$sce","$locale","dateFilter","$tooltip",function(t,n,a,o,i,r,l){function s(t,n,a){function o(e,n){if(t[0].createTextRange){var a=t[0].createTextRange();a.collapse(!0),a.moveStart("character",e),a.moveEnd("character",n),a.select()}else t[0].setSelectionRange?t[0].setSelectionRange(e,n):angular.isUndefined(t[0].selectionStart)&&(t[0].selectionStart=e,t[0].selectionEnd=n)}function s(){t[0].focus()}var d=l(t,angular.extend({},e,a)),f=a.scope,p=d.$options,m=d.$scope,g=0,$=n.$dateValue||new Date,h={hour:$.getHours(),meridian:$.getHours()<12,minute:$.getMinutes(),second:$.getSeconds(),millisecond:$.getMilliseconds()},v=i.DATETIME_FORMATS[p.timeFormat]||p.timeFormat,y=/(h+)[:]?(m+)[ ]?(a?)/i.exec(v).slice(1);m.$select=function(e,t){d.select(e,t)},m.$moveIndex=function(e,t){d.$moveIndex(e,t)},m.$switchMeridian=function(e){d.switchMeridian(e)},d.update=function(e){angular.isDate(e)&&!isNaN(e.getTime())?(d.$date=e,angular.extend(h,{hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisecond:e.getMilliseconds()}),d.$build()):d.$isBuilt||d.$build()},d.select=function(e,t,a){(!n.$dateValue||isNaN(n.$dateValue.getTime()))&&(n.$dateValue=new Date(1970,0,1)),angular.isDate(e)||(e=new Date(e)),0===t?n.$dateValue.setHours(e.getHours()):1===t&&n.$dateValue.setMinutes(e.getMinutes()),n.$setViewValue(n.$dateValue),n.$render(),p.autoclose&&!a&&d.hide(!0)},d.switchMeridian=function(e){var t=(e||n.$dateValue).getHours();n.$dateValue.setHours(12>t?t+12:t-12),n.$setViewValue(n.$dateValue),n.$render()},d.$build=function(){var e,t,n=m.midIndex=parseInt(p.length/2,10),a=[];for(e=0;e1*p.maxTime},d.$moveIndex=function(e,t){var n;0===t?(n=new Date(1970,0,1,h.hour+e*p.length,h.minute),angular.extend(h,{hour:n.getHours()})):1===t&&(n=new Date(1970,0,1,h.hour,h.minute+e*p.length*p.minuteStep),angular.extend(h,{minute:n.getMinutes()})),d.$build()},d.$onMouseDown=function(e){if("input"!==e.target.nodeName.toLowerCase()&&e.preventDefault(),e.stopPropagation(),u){var t=angular.element(e.target);"button"!==t[0].nodeName.toLowerCase()&&(t=t.parent()),t.triggerHandler("click")}},d.$onKeyDown=function(e){if(/(38|37|39|40|13)/.test(e.keyCode)&&!e.shiftKey&&!e.altKey){if(e.preventDefault(),e.stopPropagation(),13===e.keyCode)return d.hide(!0);var t=new Date(d.$date),n=t.getHours(),a=r(t,"h").length,i=t.getMinutes(),l=r(t,"mm").length,s=/(37|39)/.test(e.keyCode),u=2+1*!!y[2];s&&(37===e.keyCode?g=1>g?u-1:g-1:39===e.keyCode&&(g=u-1>g?g+1:0));var c=[0,a];0===g?(38===e.keyCode?t.setHours(n-parseInt(p.hourStep,10)):40===e.keyCode&&t.setHours(n+parseInt(p.hourStep,10)),c=[0,a]):1===g?(38===e.keyCode?t.setMinutes(i-parseInt(p.minuteStep,10)):40===e.keyCode&&t.setMinutes(i+parseInt(p.minuteStep,10)),c=[a+1,a+1+l]):2===g&&(s||d.switchMeridian(),c=[a+1+l+1,a+1+l+3]),d.select(t,g,!0),o(c[0],c[1]),f.$digest()}};var w=d.init;d.init=function(){return c&&p.useNative?(t.prop("type","time"),void t.css("-webkit-appearance","textfield")):(u&&(t.prop("type","text"),t.attr("readonly","true"),t.on("click",s)),void w())};var b=d.destroy;d.destroy=function(){c&&p.useNative&&t.off("click",s),b()};var k=d.show;d.show=function(){k(),setTimeout(function(){d.$element.on(u?"touchstart":"mousedown",d.$onMouseDown),p.keyboard&&t.on("keydown",d.$onKeyDown)})};var D=d.hide;return d.hide=function(e){d.$element.off(u?"touchstart":"mousedown",d.$onMouseDown),p.keyboard&&t.off("keydown",d.$onKeyDown),D(e)},d}var u=(angular.element(t.document.body),"createTouch"in t.document),c=/(ip(a|o)d|iphone|android)/gi.test(t.navigator.userAgent);return e.lang||(e.lang=i.id),s.defaults=e,s}]}).directive("bsTimepicker",["$window","$parse","$q","$locale","dateFilter","$timepicker","$dateParser","$timeout",function(e,t,n,a,o,i,r){{var l=i.defaults,s=/(ip(a|o)d|iphone|android)/gi.test(e.navigator.userAgent);e.requestAnimationFrame||e.setTimeout}return{restrict:"EAC",require:"ngModel",link:function(e,t,n,a){var u={scope:e,controller:a};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","autoclose","timeType","timeFormat","useNative","hourStep","minuteStep","length"],function(e){angular.isDefined(n[e])&&(u[e]=n[e])}),s&&(u.useNative||l.useNative)&&(u.timeFormat="HH:mm");var c=i(t,a,u);u=c.$options;var d=r({format:u.timeFormat,lang:u.lang});angular.forEach(["minTime","maxTime"],function(e){angular.isDefined(n[e])&&n.$observe(e,function(t){c.$options[e]="now"===t?(new Date).setFullYear(1970,0,1):angular.isString(t)&&t.match(/^".+"$/)?+new Date(t.substr(1,t.length-2)):d.parse(t,new Date(1970,0,1,0)),!isNaN(c.$options[e])&&c.$build()})}),e.$watch(n.ngModel,function(){c.update(a.$dateValue)},!0),a.$parsers.unshift(function(e){if(!e)return void a.$setValidity("date",!0);var t=d.parse(e,a.$dateValue);if(!t||isNaN(t.getTime()))a.$setValidity("date",!1);else{var n=t.getTime()>=u.minTime&&t.getTime()<=u.maxTime;a.$setValidity("date",n),n&&(a.$dateValue=t)}return"string"===u.timeType?o(e,u.timeFormat):"number"===u.timeType?a.$dateValue.getTime():"iso"===u.timeType?a.$dateValue.toISOString():new Date(a.$dateValue)}),a.$formatters.push(function(e){var t;return t=angular.isUndefined(e)||null===e?0/0:angular.isDate(e)?e:"string"===u.timeType?d.parse(e):new Date(e),a.$dateValue=t,a.$dateValue}),a.$render=function(){t.val(!a.$dateValue||isNaN(a.$dateValue.getTime())?"":o(a.$dateValue,u.timeFormat))},e.$on("$destroy",function(){c.destroy(),u=null,c=null})}}}]),angular.module("mgcrea.ngStrap.typeahead",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$typeahead",function(){var e=this.defaults={animation:"am-fade",prefixClass:"typeahead",placement:"bottom-left",template:"typeahead/typeahead.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,minLength:1,filter:"filter",limit:6};this.$get=["$window","$rootScope","$tooltip",function(t,n,a){function o(t,n,o){var i={},r=angular.extend({},e,o);i=a(t,r);var l=o.scope,s=i.$scope;s.$resetMatches=function(){s.$matches=[],s.$activeIndex=0},s.$resetMatches(),s.$activate=function(e){s.$$postDigest(function(){i.activate(e)})},s.$select=function(e){s.$$postDigest(function(){i.select(e)})},s.$isVisible=function(){return i.$isVisible()},i.update=function(e){s.$matches=e,s.$activeIndex>=e.length&&(s.$activeIndex=0)},i.activate=function(e){s.$activeIndex=e},i.select=function(e){var t=s.$matches[e].value;n.$setViewValue(t),s.$resetMatches(),n.$render(),l&&l.$digest(),s.$emit("$typeahead.select",t,e)},i.$isVisible=function(){return r.minLength&&n?s.$matches.length&&angular.isString(n.$viewValue)&&n.$viewValue.length>=r.minLength:!!s.$matches.length},i.$getIndex=function(e){var t=s.$matches.length,n=t;if(t){for(n=t;n--&&s.$matches[n].value!==e;);if(!(0>n))return n}},i.$onMouseDown=function(e){e.preventDefault(),e.stopPropagation()},i.$onKeyDown=function(e){/(38|40|13)/.test(e.keyCode)&&(e.preventDefault(),e.stopPropagation(),13===e.keyCode&&s.$matches.length?i.select(s.$activeIndex):38===e.keyCode&&s.$activeIndex>0?s.$activeIndex--:40===e.keyCode&&s.$activeIndexu&&(e=e.slice(0,u)),(1!==e.length||e[0].value!==t)&&(f.update(e),r.$render())})}),r.$render=function(){if(r.$isEmpty(r.$viewValue))return t.val("");var e=f.$getIndex(r.$modelValue),n=angular.isDefined(e)?f.$scope.$matches[e].label:r.$viewValue;n=angular.isObject(n)?n.label:n,t.val(n.replace(/<(?:.|\n)*?>/gm,"").trim())},e.$on("$destroy",function(){f.destroy(),l=null,f=null})}}}]),angular.module("mgcrea.ngStrap.tooltip",["mgcrea.ngStrap.helpers.dimensions"]).provider("$tooltip",function(){var e=this.defaults={animation:"am-fade",prefixClass:"tooltip",prefixEvent:"tooltip",container:!1,placement:"top",template:"tooltip/tooltip.tpl.html",contentTemplate:!1,trigger:"hover focus",keyboard:!1,html:!1,show:!1,title:"",type:"",delay:0};this.$get=["$window","$rootScope","$compile","$q","$templateCache","$http","$animate","$timeout","dimensions","$$rAF",function(n,a,o,i,r,l,s,u,c,d){function f(t,n){function i(){return"body"===f.container?c.offset(t[0]):c.position(t[0])}function r(e,t,n,a){var o,i=e.split("-");switch(i[0]){case"right":o={top:t.top+t.height/2-a/2,left:t.left+t.width};break;case"bottom":o={top:t.top+t.height,left:t.left+t.width/2-n/2};break;case"left":o={top:t.top+t.height/2-a/2,left:t.left-n};break;default:o={top:t.top-a,left:t.left+t.width/2-n/2}}if(!i[1])return o;if("top"===i[0]||"bottom"===i[0])switch(i[1]){case"left":o.left=t.left;break;case"right":o.left=t.left+t.width-n}else if("left"===i[0]||"right"===i[0])switch(i[1]){case"top":o.top=t.top-a;break;case"bottom":o.top=t.top+t.height}return o}var l={},u=t[0].nodeName.toLowerCase(),f=l.$options=angular.extend({},e,n);l.$promise=m(f.template);var v=l.$scope=f.scope&&f.scope.$new()||a.$new();f.delay&&angular.isString(f.delay)&&(f.delay=parseFloat(f.delay)),f.title&&(l.$scope.title=f.title),v.$hide=function(){v.$$postDigest(function(){l.hide()})},v.$show=function(){v.$$postDigest(function(){l.show()})},v.$toggle=function(){v.$$postDigest(function(){l.toggle()})},l.$isShown=v.$isShown=!1;var y,w;f.contentTemplate&&(l.$promise=l.$promise.then(function(e){var t=angular.element(e);return m(f.contentTemplate).then(function(e){var n=p('[ng-bind="content"]',t[0]);return n.length||(n=p('[ng-bind="title"]',t[0])),n.removeAttr("ng-bind").html(e),t[0].outerHTML})}));var b,k,D,T;return l.$promise.then(function(e){angular.isObject(e)&&(e=e.data),f.html&&(e=e.replace(h,'ng-bind-html="')),e=g.apply(e),D=e,b=o(e),l.init()}),l.init=function(){f.delay&&angular.isNumber(f.delay)&&(f.delay={show:f.delay,hide:f.delay}),"self"===f.container?T=t:f.container&&(T=p(f.container));var e=f.trigger.split(" ");angular.forEach(e,function(e){"click"===e?t.on("click",l.toggle):"manual"!==e&&(t.on("hover"===e?"mouseenter":"focus",l.enter),t.on("hover"===e?"mouseleave":"blur",l.leave),"button"===u&&"hover"!==e&&t.on($?"touchstart":"mousedown",l.$onFocusElementMouseDown))}),f.show&&v.$$postDigest(function(){"focus"===f.trigger?t[0].focus():l.show()})},l.destroy=function(){for(var e=f.trigger.split(" "),n=e.length;n--;){var a=e[n];"click"===a?t.off("click",l.toggle):"manual"!==a&&(t.off("hover"===a?"mouseenter":"focus",l.enter),t.off("hover"===a?"mouseleave":"blur",l.leave),"button"===u&&"hover"!==a&&t.off($?"touchstart":"mousedown",l.$onFocusElementMouseDown))}k&&(k.remove(),k=null),v.$destroy()},l.enter=function(){return clearTimeout(y),w="in",f.delay&&f.delay.show?void(y=setTimeout(function(){"in"===w&&l.show()},f.delay.show)):l.show()},l.show=function(){v.$emit(f.prefixEvent+".show.before",l);var e=f.container?T:null,n=f.container?null:t;k&&k.remove(),k=l.$element=b(v,function(){}),k.css({top:"0px",left:"0px",display:"block"}).addClass(f.placement),f.animation&&k.addClass(f.animation),f.type&&k.addClass(f.prefixClass+"-"+f.type),s.enter(k,e,n,function(){v.$emit(f.prefixEvent+".show",l)}),l.$isShown=v.$isShown=!0,v.$$phase||v.$root.$$phase||v.$digest(),d(l.$applyPlacement),f.keyboard&&("focus"!==f.trigger?(l.focus(),k.on("keyup",l.$onKeyUp)):t.on("keyup",l.$onFocusKeyUp))},l.leave=function(){return clearTimeout(y),w="out",f.delay&&f.delay.hide?void(y=setTimeout(function(){"out"===w&&l.hide()},f.delay.hide)):l.hide()},l.hide=function(e){return l.$isShown?(v.$emit(f.prefixEvent+".hide.before",l),s.leave(k,function(){v.$emit(f.prefixEvent+".hide",l)}),l.$isShown=v.$isShown=!1,v.$$phase||v.$root.$$phase||v.$digest(),f.keyboard&&null!==k&&k.off("keyup",l.$onKeyUp),e&&"focus"===f.trigger?t[0].blur():void 0):void 0},l.toggle=function(){l.$isShown?l.leave():l.enter()},l.focus=function(){k[0].focus()},l.$applyPlacement=function(){if(k){var e=i(),t=k.prop("offsetWidth"),n=k.prop("offsetHeight"),a=r(f.placement,e,t,n);a.top+="px",a.left+="px",k.css(a)}},l.$onKeyUp=function(e){27===e.which&&l.hide()},l.$onFocusKeyUp=function(e){27===e.which&&t[0].blur()},l.$onFocusElementMouseDown=function(e){e.preventDefault(),e.stopPropagation(),l.$isShown?t[0].blur():t[0].focus()},l}function p(e,n){return angular.element((n||t).querySelectorAll(e))}function m(e){return i.when(r.get(e)||l.get(e)).then(function(t){return angular.isObject(t)?(r.put(e,t.data),t.data):t})}var g=String.prototype.trim,$="createTouch"in n.document,h=/ng-bind="/gi;return f}]}).directive("bsTooltip",["$window","$location","$sce","$tooltip","$$rAF",function(e,t,n,a,o){return{restrict:"EAC",scope:!0,link:function(e,t,i){var r={scope:e};angular.forEach(["template","contentTemplate","placement","container","delay","trigger","keyboard","html","animation","type"],function(e){angular.isDefined(i[e])&&(r[e]=i[e])}),angular.forEach(["title"],function(t){i[t]&&i.$observe(t,function(a,i){e[t]=n.trustAsHtml(a),angular.isDefined(i)&&o(function(){l&&l.$applyPlacement()})})}),i.bsTooltip&&e.$watch(i.bsTooltip,function(t,n){angular.isObject(t)?angular.extend(e,t):e.title=t,angular.isDefined(n)&&o(function(){l&&l.$applyPlacement()})},!0);var l=a(t,r);e.$on("$destroy",function(){l.destroy(),r=null,l=null})}}}])}(window,document); \ No newline at end of file +!function(e,t){"use strict";angular.module("mgcrea.ngStrap",["mgcrea.ngStrap.modal","mgcrea.ngStrap.aside","mgcrea.ngStrap.alert","mgcrea.ngStrap.button","mgcrea.ngStrap.select","mgcrea.ngStrap.datepicker","mgcrea.ngStrap.timepicker","mgcrea.ngStrap.navbar","mgcrea.ngStrap.tooltip","mgcrea.ngStrap.popover","mgcrea.ngStrap.dropdown","mgcrea.ngStrap.typeahead","mgcrea.ngStrap.scrollspy","mgcrea.ngStrap.affix","mgcrea.ngStrap.tab"]),angular.module("mgcrea.ngStrap.affix",["mgcrea.ngStrap.helpers.dimensions","mgcrea.ngStrap.helpers.debounce"]).provider("$affix",function(){var e=this.defaults={offsetTop:"auto"};this.$get=["$window","debounce","dimensions",function(t,n,a){function o(o,l){function s(e,t,n){var a=u(),o=c();return h>=a?"top":null!==e&&a+e<=t.top?"middle":null!==v&&t.top+n+g>=o-v?"bottom":"middle"}function u(){return p[0]===t?t.pageYOffset:p[0]===t}function c(){return p[0]===t?t.document.body.scrollHeight:p[0].scrollHeight}var d={},f=angular.extend({},e,l),p=f.target,m="affix affix-top affix-bottom",g=0,$=0,h=0,v=0,y=null,w=null,b=o.parent();if(f.offsetParent)if(f.offsetParent.match(/^\d+$/))for(var k=0;k<1*f.offsetParent-1;k++)b=b.parent();else b=angular.element(f.offsetParent);return d.init=function(){d.$parseOffsets(),$=a.offset(o[0]).top+g,p.on("scroll",d.checkPosition),p.on("click",d.checkPositionWithEventLoop),r.on("resize",d.$debouncedOnResize),d.checkPosition(),d.checkPositionWithEventLoop()},d.destroy=function(){p.off("scroll",d.checkPosition),p.off("click",d.checkPositionWithEventLoop),r.off("resize",d.$debouncedOnResize)},d.checkPositionWithEventLoop=function(){setTimeout(d.checkPosition,1)},d.checkPosition=function(){var e=u(),t=a.offset(o[0]),n=a.height(o[0]),r=s(w,t,n);y!==r&&(y=r,o.removeClass(m).addClass("affix"+("middle"!==r?"-"+r:"")),"top"===r?(w=null,o.css("position",f.offsetParent?"":"relative"),o.css("top","")):"bottom"===r?(w=f.offsetUnpin?-(1*f.offsetUnpin):t.top-e,o.css("position",f.offsetParent?"":"relative"),o.css("top",f.offsetParent?"":i[0].offsetHeight-v-n-$+"px")):(w=null,o.css("position","fixed"),o.css("top",g+"px")))},d.$onResize=function(){d.$parseOffsets(),d.checkPosition()},d.$debouncedOnResize=n(d.$onResize,50),d.$parseOffsets=function(){o.css("position",f.offsetParent?"":"relative"),f.offsetTop&&("auto"===f.offsetTop&&(f.offsetTop="+0"),f.offsetTop.match(/^[-+]\d+$/)?(g=1*-f.offsetTop,h=f.offsetParent?a.offset(b[0]).top+1*f.offsetTop:a.offset(o[0]).top-a.css(o[0],"marginTop",!0)+1*f.offsetTop):h=1*f.offsetTop),f.offsetBottom&&(v=f.offsetParent&&f.offsetBottom.match(/^[-+]\d+$/)?c()-(a.offset(b[0]).top+a.height(b[0]))+1*f.offsetBottom+1:1*f.offsetBottom)},d.init(),d}var i=angular.element(t.document.body),r=angular.element(t);return o}]}).directive("bsAffix",["$affix","$window",function(e,t){return{restrict:"EAC",require:"^?bsAffixTarget",link:function(n,a,o,i){var r={scope:n,offsetTop:"auto",target:i?i.$element:angular.element(t)};angular.forEach(["offsetTop","offsetBottom","offsetParent","offsetUnpin"],function(e){angular.isDefined(o[e])&&(r[e]=o[e])});var l=e(a,r);n.$on("$destroy",function(){r=null,l=null})}}}]).directive("bsAffixTarget",function(){return{controller:["$element",function(e){this.$element=e}]}}),angular.module("mgcrea.ngStrap.alert",["mgcrea.ngStrap.modal"]).provider("$alert",function(){var e=this.defaults={animation:"am-fade",prefixClass:"alert",placement:null,template:"alert/alert.tpl.html",container:!1,element:null,backdrop:!1,keyboard:!0,show:!0,duration:!1,type:!1};this.$get=["$modal","$timeout",function(t,n){function a(a){var o={},i=angular.extend({},e,a);o=t(i),i.type&&(o.$scope.type=i.type);var r=o.show;return i.duration&&(o.show=function(){r(),n(function(){o.hide()},1e3*i.duration)}),o}return a}]}).directive("bsAlert",["$window","$location","$sce","$alert",function(e,t,n,a){e.requestAnimationFrame||e.setTimeout;return{restrict:"EAC",scope:!0,link:function(e,t,o){var i={scope:e,element:t,show:!1};angular.forEach(["template","placement","keyboard","html","container","animation","duration"],function(e){angular.isDefined(o[e])&&(i[e]=o[e])}),angular.forEach(["title","content","type"],function(t){o[t]&&o.$observe(t,function(a){e[t]=n.trustAsHtml(a)})}),o.bsAlert&&e.$watch(o.bsAlert,function(t){angular.isObject(t)?angular.extend(e,t):e.content=t},!0);var r=a(i);t.on(o.trigger||"click",r.toggle),e.$on("$destroy",function(){r.destroy(),i=null,r=null})}}}]),angular.module("mgcrea.ngStrap.aside",["mgcrea.ngStrap.modal"]).provider("$aside",function(){var e=this.defaults={animation:"am-fade-and-slide-right",prefixClass:"aside",placement:"right",template:"aside/aside.tpl.html",contentTemplate:!1,container:!1,element:null,backdrop:!0,keyboard:!0,html:!1,show:!0};this.$get=["$modal",function(t){function n(n){var a={},o=angular.extend({},e,n);return a=t(o)}return n}]}).directive("bsAside",["$window","$sce","$aside",function(e,t,n){e.requestAnimationFrame||e.setTimeout;return{restrict:"EAC",scope:!0,link:function(e,a,o){var i={scope:e,element:a,show:!1};angular.forEach(["template","contentTemplate","placement","backdrop","keyboard","html","container","animation"],function(e){angular.isDefined(o[e])&&(i[e]=o[e])}),angular.forEach(["title","content"],function(n){o[n]&&o.$observe(n,function(a){e[n]=t.trustAsHtml(a)})}),o.bsAside&&e.$watch(o.bsAside,function(t){angular.isObject(t)?angular.extend(e,t):e.content=t},!0);var r=n(i);a.on(o.trigger||"click",r.toggle),e.$on("$destroy",function(){r.destroy(),i=null,r=null})}}}]),angular.module("mgcrea.ngStrap.button",[]).provider("$button",function(){var e=this.defaults={activeClass:"active",toggleEvent:"click"};this.$get=function(){return{defaults:e}}}).directive("bsCheckboxGroup",function(){return{restrict:"A",require:"ngModel",compile:function(e,t){e.attr("data-toggle","buttons"),e.removeAttr("ng-model");var n=e[0].querySelectorAll('input[type="checkbox"]');angular.forEach(n,function(e){var n=angular.element(e);n.attr("bs-checkbox",""),n.attr("ng-model",t.ngModel+"."+n.attr("value"))})}}}).directive("bsCheckbox",["$button","$$rAF",function(e,t){var n=e.defaults,a=/^(true|false|\d+)$/;return{restrict:"A",require:"ngModel",link:function(e,o,i,r){var l=n,s="INPUT"===o[0].nodeName,u=s?o.parent():o,c=angular.isDefined(i.trueValue)?i.trueValue:!0;a.test(i.trueValue)&&(c=e.$eval(i.trueValue));var d=angular.isDefined(i.falseValue)?i.falseValue:!1;a.test(i.falseValue)&&(d=e.$eval(i.falseValue));var f="boolean"!=typeof c||"boolean"!=typeof d;f&&(r.$parsers.push(function(e){return e?c:d}),e.$watch(i.ngModel,function(){r.$render()})),r.$render=function(){var e=angular.equals(r.$modelValue,c);t(function(){s&&(o[0].checked=e),u.toggleClass(l.activeClass,e)})},o.bind(l.toggleEvent,function(){e.$apply(function(){s||r.$setViewValue(!u.hasClass("active")),f||r.$render()})})}}}]).directive("bsRadioGroup",function(){return{restrict:"A",require:"ngModel",compile:function(e,t){e.attr("data-toggle","buttons"),e.removeAttr("ng-model");var n=e[0].querySelectorAll('input[type="radio"]');angular.forEach(n,function(e){angular.element(e).attr("bs-radio",""),angular.element(e).attr("ng-model",t.ngModel)})}}}).directive("bsRadio",["$button","$$rAF",function(e,t){var n=e.defaults,a=/^(true|false|\d+)$/;return{restrict:"A",require:"ngModel",link:function(e,o,i,r){var l=n,s="INPUT"===o[0].nodeName,u=s?o.parent():o,c=a.test(i.value)?e.$eval(i.value):i.value;r.$render=function(){var e=angular.equals(r.$modelValue,c);t(function(){s&&(o[0].checked=e),u.toggleClass(l.activeClass,e)})},o.bind(l.toggleEvent,function(){e.$apply(function(){r.$setViewValue(c),r.$render()})})}}}]),angular.module("mgcrea.ngStrap.datepicker",["mgcrea.ngStrap.helpers.dateParser","mgcrea.ngStrap.tooltip"]).provider("$datepicker",function(){var e=this.defaults={animation:"am-fade",prefixClass:"datepicker",placement:"bottom-left",template:"datepicker/datepicker.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,useNative:!1,dateType:"date",dateFormat:"shortDate",dayFormat:"dd",strictFormat:!1,autoclose:!1,minDate:-1/0,maxDate:+1/0,startView:0,minView:0,startWeek:0};this.$get=["$window","$document","$rootScope","$sce","$locale","dateFilter","datepickerViews","$tooltip",function(t,n,a,o,i,r,l,s){function u(t,n,a){function o(e){e.selected=r.$isSelected(e.date)}function i(){t[0].focus()}var r=s(t,angular.extend({},e,a)),u=a.scope,f=r.$options,p=r.$scope;f.startView&&(f.startView-=f.minView);var m=l(r);r.$views=m.views;var g=m.viewDate;p.$mode=f.startView;var $=r.$views[p.$mode];p.$select=function(e){r.select(e)},p.$selectPane=function(e){r.$selectPane(e)},p.$toggleMode=function(){r.setMode((p.$mode+1)%r.$views.length)},r.update=function(e){angular.isDate(e)&&!isNaN(e.getTime())&&(r.$date=e,$.update.call($,e)),r.$build(!0)},r.select=function(e,t){angular.isDate(n.$dateValue)||(n.$dateValue=new Date(e)),n.$dateValue.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),!p.$mode||t?(n.$setViewValue(n.$dateValue),n.$render(),f.autoclose&&!t&&r.hide(!0)):(angular.extend(g,{year:e.getFullYear(),month:e.getMonth(),date:e.getDate()}),r.setMode(p.$mode-1),r.$build())},r.setMode=function(e){p.$mode=e,$=r.$views[p.$mode],r.$build()},r.$build=function(e){e===!0&&$.built||(e!==!1||$.built)&&$.build.call($)},r.$updateSelected=function(){for(var e=0,t=p.rows.length;t>e;e++)angular.forEach(p.rows[e],o)},r.$isSelected=function(e){return $.isSelected(e)},r.$selectPane=function(e){var t=$.steps,n=new Date(Date.UTC(g.year+(t.year||0)*e,g.month+(t.month||0)*e,g.date+(t.day||0)*e));angular.extend(g,{year:n.getUTCFullYear(),month:n.getUTCMonth(),date:n.getUTCDate()}),r.$build()},r.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),c){var t=angular.element(e.target);"button"!==t[0].nodeName.toLowerCase()&&(t=t.parent()),t.triggerHandler("click")}},r.$onKeyDown=function(e){if(/(38|37|39|40|13)/.test(e.keyCode)&&!e.shiftKey&&!e.altKey){if(e.preventDefault(),e.stopPropagation(),13===e.keyCode)return p.$mode?p.$apply(function(){r.setMode(p.$mode-1)}):r.hide(!0);$.onKeyDown(e),u.$digest()}};var h=r.init;r.init=function(){return d&&f.useNative?(t.prop("type","date"),void t.css("-webkit-appearance","textfield")):(c&&(t.prop("type","text"),t.attr("readonly","true"),t.on("click",i)),void h())};var v=r.destroy;r.destroy=function(){d&&f.useNative&&t.off("click",i),v()};var y=r.show;r.show=function(){y(),setTimeout(function(){r.$element.on(c?"touchstart":"mousedown",r.$onMouseDown),f.keyboard&&t.on("keydown",r.$onKeyDown)})};var w=r.hide;return r.hide=function(e){r.$element.off(c?"touchstart":"mousedown",r.$onMouseDown),f.keyboard&&t.off("keydown",r.$onKeyDown),w(e)},r}var c=(angular.element(t.document.body),"createTouch"in t.document),d=/(ip(a|o)d|iphone|android)/gi.test(t.navigator.userAgent);return e.lang||(e.lang=i.id),u.defaults=e,u}]}).directive("bsDatepicker",["$window","$parse","$q","$locale","dateFilter","$datepicker","$dateParser","$timeout",function(e,t,n,a,o,i,r){var l=(i.defaults,/(ip(a|o)d|iphone|android)/gi.test(e.navigator.userAgent)),s=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};return{restrict:"EAC",require:"ngModel",link:function(e,t,n,a){var u={scope:e,controller:a};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","autoclose","dateType","dateFormat","dayFormat","strictFormat","startWeek","useNative","lang","startView","minView"],function(e){angular.isDefined(n[e])&&(u[e]=n[e])}),l&&u.useNative&&(u.dateFormat="yyyy-MM-dd");var c=i(t,a,u);u=c.$options,angular.forEach(["minDate","maxDate"],function(e){angular.isDefined(n[e])&&n.$observe(e,function(t){if("today"===t){var n=new Date;c.$options[e]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()+("maxDate"===e?1:0),0,0,0,"minDate"===e?0:-1)}else c.$options[e]=angular.isString(t)&&t.match(/^".+"$/)?+new Date(t.substr(1,t.length-2)):s(t)?+new Date(parseInt(t,10)):+new Date(t);!isNaN(c.$options[e])&&c.$build(!1)})}),e.$watch(n.ngModel,function(){c.update(a.$dateValue)},!0);var d=r({format:u.dateFormat,lang:u.lang,strict:u.strictFormat});a.$parsers.unshift(function(e){if(!e)return void a.$setValidity("date",!0);var t=d.parse(e,a.$dateValue);if(!t||isNaN(t.getTime()))return void a.$setValidity("date",!1);var n=(isNaN(c.$options.minDate)||t.getTime()>=c.$options.minDate)&&(isNaN(c.$options.maxDate)||t.getTime()<=c.$options.maxDate);return a.$setValidity("date",n),n&&(a.$dateValue=t),"string"===u.dateType?o(e,u.dateFormat):"number"===u.dateType?a.$dateValue.getTime():"iso"===u.dateType?a.$dateValue.toISOString():new Date(a.$dateValue)}),a.$formatters.push(function(e){var t;return t=angular.isUndefined(e)||null===e?0/0:angular.isDate(e)?e:"string"===u.dateType?d.parse(e):new Date(e),a.$dateValue=t,a.$dateValue}),a.$render=function(){t.val(!a.$dateValue||isNaN(a.$dateValue.getTime())?"":o(a.$dateValue,u.dateFormat))},e.$on("$destroy",function(){c.destroy(),u=null,c=null})}}}]).provider("datepickerViews",function(){function e(e,t){for(var n=[];e.length>0;)n.push(e.splice(0,t));return n}function t(e,t){return(e%t+t)%t}this.defaults={dayFormat:"dd",daySplit:7};this.$get=["$locale","$sce","dateFilter",function(n,a,o){return function(i){var r=i.$scope,l=i.$options,s=n.DATETIME_FORMATS.SHORTDAY,u=s.slice(l.startWeek).concat(s.slice(0,l.startWeek)),c=a.trustAsHtml(''+u.join('')+""),d=i.$date||new Date,f={year:d.getFullYear(),month:d.getMonth(),date:d.getDate()},p=(6e4*d.getTimezoneOffset(),[{format:l.dayFormat,split:7,steps:{month:1},update:function(e,t){!this.built||t||e.getFullYear()!==f.year||e.getMonth()!==f.month?(angular.extend(f,{year:i.$date.getFullYear(),month:i.$date.getMonth(),date:i.$date.getDate()}),i.$build()):e.getDate()!==f.date&&(f.date=i.$date.getDate(),i.$updateSelected())},build:function(){var n=new Date(f.year,f.month,1),a=n.getTimezoneOffset(),s=new Date(+n-864e5*t(n.getDay()-l.startWeek,7)),u=s.getTimezoneOffset();u!==a&&(s=new Date(+s+6e4*(u-a)));for(var d,p=[],m=0;42>m;m++)d=new Date(s.getFullYear(),s.getMonth(),s.getDate()+m),p.push({date:d,label:o(d,this.format),selected:i.$date&&this.isSelected(d),muted:d.getMonth()!==f.month,disabled:this.isDisabled(d)});r.title=o(n,"MMMM yyyy"),r.showLabels=!0,r.labels=c,r.rows=e(p,this.split),this.built=!0},isSelected:function(e){return i.$date&&e.getFullYear()===i.$date.getFullYear()&&e.getMonth()===i.$date.getMonth()&&e.getDate()===i.$date.getDate()},isDisabled:function(e){return e.getTime()l.maxDate},onKeyDown:function(e){var t,n=i.$date.getTime();37===e.keyCode?t=new Date(n-864e5):38===e.keyCode?t=new Date(n-6048e5):39===e.keyCode?t=new Date(n+864e5):40===e.keyCode&&(t=new Date(n+6048e5)),this.isDisabled(t)||i.select(t,!0)}},{name:"month",format:"MMM",split:4,steps:{year:1},update:function(e){this.built&&e.getFullYear()===f.year?e.getMonth()!==f.month&&(angular.extend(f,{month:i.$date.getMonth(),date:i.$date.getDate()}),i.$updateSelected()):(angular.extend(f,{year:i.$date.getFullYear(),month:i.$date.getMonth(),date:i.$date.getDate()}),i.$build())},build:function(){for(var t,n=(new Date(f.year,0,1),[]),a=0;12>a;a++)t=new Date(f.year,a,1),n.push({date:t,label:o(t,this.format),selected:i.$isSelected(t),disabled:this.isDisabled(t)});r.title=o(t,"yyyy"),r.showLabels=!1,r.rows=e(n,this.split),this.built=!0},isSelected:function(e){return i.$date&&e.getFullYear()===i.$date.getFullYear()&&e.getMonth()===i.$date.getMonth()},isDisabled:function(e){var t=+new Date(e.getFullYear(),e.getMonth()+1,0);return tl.maxDate},onKeyDown:function(e){var t=i.$date.getMonth(),n=new Date(i.$date);37===e.keyCode?n.setMonth(t-1):38===e.keyCode?n.setMonth(t-4):39===e.keyCode?n.setMonth(t+1):40===e.keyCode&&n.setMonth(t+4),this.isDisabled(n)||i.select(n,!0)}},{name:"year",format:"yyyy",split:4,steps:{year:12},update:function(e,t){!this.built||t||parseInt(e.getFullYear()/20,10)!==parseInt(f.year/20,10)?(angular.extend(f,{year:i.$date.getFullYear(),month:i.$date.getMonth(),date:i.$date.getDate()}),i.$build()):e.getFullYear()!==f.year&&(angular.extend(f,{year:i.$date.getFullYear(),month:i.$date.getMonth(),date:i.$date.getDate()}),i.$updateSelected())},build:function(){for(var t,n=f.year-f.year%(3*this.split),a=[],l=0;12>l;l++)t=new Date(n+l,0,1),a.push({date:t,label:o(t,this.format),selected:i.$isSelected(t),disabled:this.isDisabled(t)});r.title=a[0].label+"-"+a[a.length-1].label,r.showLabels=!1,r.rows=e(a,this.split),this.built=!0},isSelected:function(e){return i.$date&&e.getFullYear()===i.$date.getFullYear()},isDisabled:function(e){var t=+new Date(e.getFullYear()+1,0,0);return tl.maxDate},onKeyDown:function(e){var t=i.$date.getFullYear(),n=new Date(i.$date);37===e.keyCode?n.setYear(t-1):38===e.keyCode?n.setYear(t-4):39===e.keyCode?n.setYear(t+1):40===e.keyCode&&n.setYear(t+4),this.isDisabled(n)||i.select(n,!0)}}]);return{views:l.minView?Array.prototype.slice.call(p,l.minView):p,viewDate:f}}}]}),angular.module("mgcrea.ngStrap.dropdown",["mgcrea.ngStrap.tooltip"]).provider("$dropdown",function(){var e=this.defaults={animation:"am-fade",prefixClass:"dropdown",placement:"bottom-left",template:"dropdown/dropdown.tpl.html",trigger:"click",container:!1,keyboard:!0,html:!1,delay:0};this.$get=["$window","$rootScope","$tooltip",function(t,n,a){function o(t,o){function l(e){return e.target!==t[0]?e.target!==t[0]&&s.hide():void 0}{var s={},u=angular.extend({},e,o);s.$scope=u.scope&&u.scope.$new()||n.$new()}s=a(t,u),s.$onKeyDown=function(e){if(/(38|40)/.test(e.keyCode)){e.preventDefault(),e.stopPropagation();var t=angular.element(s.$element[0].querySelectorAll("li:not(.divider) a"));if(t.length){var n;angular.forEach(t,function(e,t){r&&r.call(e,":focus")&&(n=t)}),38===e.keyCode&&n>0?n--:40===e.keyCode&&n1){var r=i.search(n[t]);e=e.split(n[t]).join(""),f[n[t]]&&(a[r]=f[n[t]])}return angular.forEach(a,function(e){o.push(e)}),o}function i(e){return e.replace(/\//g,"[\\/]").replace("/-/g","[-]").replace(/\./g,"[.]").replace(/\\s/g,"[\\s]")}function r(e){var t,n=Object.keys(d),a=e;for(t=0;tu?a=setTimeout(s,t-u):(a=null,n||(l=e.apply(i,o)))},u=n&&!a;return a||(a=setTimeout(s,t)),u&&(l=e.apply(i,o)),l}}).constant("throttle",function(e,t,n){var a,o,i,r=null,l=0;n||(n={});var s=function(){l=n.leading===!1?0:new Date,r=null,i=e.apply(a,o)};return function(){var u=new Date;l||n.leading!==!1||(l=u);var c=t-(u-l);return a=this,o=arguments,0>=c?(clearTimeout(r),r=null,l=u,i=e.apply(a,o)):r||n.trailing===!1||(r=setTimeout(s,c)),i}}),angular.module("mgcrea.ngStrap.helpers.dimensions",[]).factory("dimensions",["$document","$window",function(){var t=(angular.element,{}),n=t.nodeName=function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()};t.css=function(t,n,a){var o;return o=t.currentStyle?t.currentStyle[n]:e.getComputedStyle?e.getComputedStyle(t)[n]:t.style[n],a===!0?parseFloat(o)||0:o},t.offset=function(t){var n=t.getBoundingClientRect(),a=t.ownerDocument;return{width:t.offsetWidth,height:t.offsetHeight,top:n.top+(e.pageYOffset||a.documentElement.scrollTop)-(a.documentElement.clientTop||0),left:n.left+(e.pageXOffset||a.documentElement.scrollLeft)-(a.documentElement.clientLeft||0)}},t.position=function(e){var o,i,r={top:0,left:0};return"fixed"===t.css(e,"position")?i=e.getBoundingClientRect():(o=a(e),i=t.offset(e),i=t.offset(e),n(o,"html")||(r=t.offset(o)),r.top+=t.css(o,"borderTopWidth",!0),r.left+=t.css(o,"borderLeftWidth",!0)),{width:e.offsetWidth,height:e.offsetHeight,top:i.top-r.top-t.css(e,"marginTop",!0),left:i.left-r.left-t.css(e,"marginLeft",!0)}};var a=function(e){var a=e.ownerDocument,o=e.offsetParent||a;if(n(o,"#document"))return a.documentElement;for(;o&&!n(o,"html")&&"static"===t.css(o,"position");)o=o.offsetParent;return o||a.documentElement};return t.height=function(e,n){var a=e.offsetHeight;return n?a+=t.css(e,"marginTop",!0)+t.css(e,"marginBottom",!0):a-=t.css(e,"paddingTop",!0)+t.css(e,"paddingBottom",!0)+t.css(e,"borderTopWidth",!0)+t.css(e,"borderBottomWidth",!0),a},t.width=function(e,n){var a=e.offsetWidth;return n?a+=t.css(e,"marginLeft",!0)+t.css(e,"marginRight",!0):a-=t.css(e,"paddingLeft",!0)+t.css(e,"paddingRight",!0)+t.css(e,"borderLeftWidth",!0)+t.css(e,"borderRightWidth",!0),a},t}]),angular.module("mgcrea.ngStrap.helpers.parseOptions",[]).provider("$parseOptions",function(){var e=this.defaults={regexp:/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/};this.$get=["$parse","$q",function(t,n){function a(a,o){function i(e,t){return e.map(function(e,n){var a,o,i={};return i[c]=e,a=u(t,i),o=p(t,i)||n,{label:a,value:o}})}var r={},l=angular.extend({},e,o);r.$values=[];var s,u,c,d,f,p,m;return r.init=function(){r.$match=s=a.match(l.regexp),u=t(s[2]||s[1]),c=s[4]||s[6],d=s[5],f=t(s[3]||""),p=t(s[2]?s[1]:c),m=t(s[7])},r.valuesFn=function(e,t){return n.when(m(e,t)).then(function(t){return r.$values=t?i(t,e):{},r.$values})},r.init(),r}return a}]}),angular.version.minor<3&&angular.version.dot<14&&angular.module("ng").factory("$$rAF",["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame,a=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,o=!!n,i=o?function(e){var t=n(e);return function(){a(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return i.supported=o,i}]),angular.module("mgcrea.ngStrap.modal",["mgcrea.ngStrap.helpers.dimensions"]).provider("$modal",function(){var e=this.defaults={animation:"am-fade",backdropAnimation:"am-fade",prefixClass:"modal",prefixEvent:"modal",placement:"top",template:"modal/modal.tpl.html",contentTemplate:!1,container:!1,element:null,backdrop:!0,keyboard:!0,html:!1,show:!0};this.$get=["$window","$rootScope","$compile","$q","$templateCache","$http","$animate","$timeout","$sce","dimensions",function(n,a,o,i,r,l,s,u,c){function d(t){function n(e){e.target===e.currentTarget&&("static"===r.backdrop?i.focus():i.hide())}var i={},r=i.$options=angular.extend({},e,t);i.$promise=p(r.template);var l=i.$scope=r.scope&&r.scope.$new()||a.$new();r.element||r.container||(r.container="body"),m(["title","content"],function(e){r[e]&&(l[e]=c.trustAsHtml(r[e]))}),l.$hide=function(){l.$$postDigest(function(){i.hide()})},l.$show=function(){l.$$postDigest(function(){i.show()})},l.$toggle=function(){l.$$postDigest(function(){i.toggle()})},r.contentTemplate&&(i.$promise=i.$promise.then(function(e){var n=angular.element(e);return p(r.contentTemplate).then(function(e){var a=f('[ng-bind="content"]',n[0]).removeAttr("ng-bind").html(e);return t.template||a.next().remove(),n[0].outerHTML})}));var u,d,y=angular.element('
');return i.$promise.then(function(e){angular.isObject(e)&&(e=e.data),r.html&&(e=e.replace(v,'ng-bind-html="')),e=g.apply(e),u=o(e),i.init()}),i.init=function(){r.show&&l.$$postDigest(function(){i.show()})},i.destroy=function(){d&&(d.remove(),d=null),y&&(y.remove(),y=null),l.$destroy()},i.show=function(){l.$emit(r.prefixEvent+".show.before",i);var e=r.container?f(r.container):null,t=r.container?null:r.element;d=i.$element=u(l,function(){}),d.css({display:"block"}).addClass(r.placement),r.animation&&(r.backdrop&&y.addClass(r.backdropAnimation),d.addClass(r.animation)),r.backdrop&&s.enter(y,h,null,function(){}),s.enter(d,e,t,function(){l.$emit(r.prefixEvent+".show",i)}),l.$isShown=!0,l.$$phase||l.$root.$$phase||l.$digest();var a=d[0];$(function(){a.focus()}),h.addClass(r.prefixClass+"-open"),r.animation&&h.addClass(r.prefixClass+"-with-"+r.animation),r.backdrop&&(d.on("click",n),y.on("click",n)),r.keyboard&&d.on("keyup",i.$onKeyUp)},i.hide=function(){l.$emit(r.prefixEvent+".hide.before",i),s.leave(d,function(){l.$emit(r.prefixEvent+".hide",i),h.removeClass(r.prefixClass+"-open"),r.animation&&h.addClass(r.prefixClass+"-with-"+r.animation)}),r.backdrop&&s.leave(y,function(){}),l.$isShown=!1,l.$$phase||l.$root.$$phase||l.$digest(),r.backdrop&&(d.off("click",n),y.off("click",n)),r.keyboard&&d.off("keyup",i.$onKeyUp)},i.toggle=function(){l.$isShown?i.hide():i.show()},i.focus=function(){d[0].focus()},i.$onKeyUp=function(e){27===e.which&&i.hide()},i}function f(e,n){return angular.element((n||t).querySelectorAll(e))}function p(e){return i.when(r.get(e)||l.get(e)).then(function(t){return angular.isObject(t)?(r.put(e,t.data),t.data):t})}var m=angular.forEach,g=String.prototype.trim,$=n.requestAnimationFrame||n.setTimeout,h=angular.element(n.document.body),v=/ng-bind="/gi;return d}]}).directive("bsModal",["$window","$location","$sce","$modal",function(e,t,n,a){return{restrict:"EAC",scope:!0,link:function(e,t,o){var i={scope:e,element:t,show:!1};angular.forEach(["template","contentTemplate","placement","backdrop","keyboard","html","container","animation"],function(e){angular.isDefined(o[e])&&(i[e]=o[e])}),angular.forEach(["title","content"],function(t){o[t]&&o.$observe(t,function(a){e[t]=n.trustAsHtml(a)})}),o.bsModal&&e.$watch(o.bsModal,function(t){angular.isObject(t)?angular.extend(e,t):e.content=t},!0);var r=a(i);t.on(o.trigger||"click",r.toggle),e.$on("$destroy",function(){r.destroy(),i=null,r=null})}}}]),angular.module("mgcrea.ngStrap.navbar",[]).provider("$navbar",function(){var e=this.defaults={activeClass:"active",routeAttr:"data-match-route",strict:!1};this.$get=function(){return{defaults:e}}}).directive("bsNavbar",["$window","$location","$navbar",function(e,t,n){var a=n.defaults;return{restrict:"A",link:function(e,n,o){var i=angular.copy(a);angular.forEach(Object.keys(a),function(e){angular.isDefined(o[e])&&(i[e]=o[e])}),e.$watch(function(){return t.path()},function(e){var t=n[0].querySelectorAll("li["+i.routeAttr+"]");angular.forEach(t,function(t){var n=angular.element(t),a=n.attr(i.routeAttr).replace("/","\\/");i.strict&&(a="^"+a+"$");var o=new RegExp(a,["i"]);o.test(e)?n.addClass(i.activeClass):n.removeClass(i.activeClass)})})}}}]),angular.module("mgcrea.ngStrap.select",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$select",function(){var e=this.defaults={animation:"am-fade",prefixClass:"select",placement:"bottom-left",template:"select/select.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,multiple:!1,sort:!0,caretHtml:' ',placeholder:"Choose among the following...",maxLength:3,maxLengthHtml:"selected"};this.$get=["$window","$document","$rootScope","$tooltip",function(t,n,a,o){function i(t,n,a){var i={},l=angular.extend({},e,a);i=o(t,l);var s=a.scope,u=i.$scope;u.$matches=[],u.$activeIndex=0,u.$isMultiple=l.multiple,u.$activate=function(e){u.$$postDigest(function(){i.activate(e)})},u.$select=function(e){u.$$postDigest(function(){i.select(e)})},u.$isVisible=function(){return i.$isVisible()},u.$isActive=function(e){return i.$isActive(e)},i.update=function(e){u.$matches=e,i.$updateActiveIndex()},i.activate=function(e){return l.multiple?(u.$activeIndex.sort(),i.$isActive(e)?u.$activeIndex.splice(u.$activeIndex.indexOf(e),1):u.$activeIndex.push(e),l.sort&&u.$activeIndex.sort()):u.$activeIndex=e,u.$activeIndex},i.select=function(e){var t=u.$matches[e].value;i.activate(e),n.$setViewValue(l.multiple?u.$activeIndex.map(function(e){return u.$matches[e].value}):t),n.$render(),s&&s.$digest(),l.multiple||i.hide(),u.$emit("$select.select",t,e)},i.$updateActiveIndex=function(){n.$modelValue&&u.$matches.length?u.$activeIndex=l.multiple&&angular.isArray(n.$modelValue)?n.$modelValue.map(function(e){return i.$getIndex(e)}):i.$getIndex(n.$modelValue):u.$activeIndex>=u.$matches.length&&(u.$activeIndex=l.multiple?[]:0)},i.$isVisible=function(){return l.minLength&&n?u.$matches.length&&n.$viewValue.length>=l.minLength:u.$matches.length},i.$isActive=function(e){return l.multiple?-1!==u.$activeIndex.indexOf(e):u.$activeIndex===e},i.$getIndex=function(e){var t=u.$matches.length,n=t;if(t){for(n=t;n--&&u.$matches[n].value!==e;);if(!(0>n))return n}},i.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),r){var t=angular.element(e.target);t.triggerHandler("click")}},i.$onKeyDown=function(e){if(/(9|13|38|40)/.test(e.keyCode)){if(e.preventDefault(),e.stopPropagation(),!l.multiple&&(13===e.keyCode||9===e.keyCode))return i.select(u.$activeIndex);38===e.keyCode&&u.$activeIndex>0?u.$activeIndex--:40===e.keyCode&&u.$activeIndex'),s.after(t)}var u=o(n.ngOptions),c=a(t,r,l),d=u.$match[7].replace(/\|.+/,"").trim();e.$watch(d,function(){u.valuesFn(e,r).then(function(e){c.update(e),r.$render()})},!0),e.$watch(n.ngModel,function(){c.$updateActiveIndex()},!0),r.$render=function(){var e,a;l.multiple&&angular.isArray(r.$modelValue)?(e=r.$modelValue.map(function(e){return a=c.$getIndex(e),angular.isDefined(a)?c.$scope.$matches[a].label:!1}).filter(angular.isDefined),e=e.length>(l.maxLength||i.maxLength)?e.length+" "+(l.maxLengthHtml||i.maxLengthHtml):e.join(", ")):(a=c.$getIndex(r.$modelValue),e=angular.isDefined(a)?c.$scope.$matches[a].label:!1),t.html((e?e:n.placeholder||i.placeholder)+i.caretHtml)},e.$on("$destroy",function(){c.destroy(),l=null,c=null})}}}]),angular.module("mgcrea.ngStrap.popover",["mgcrea.ngStrap.tooltip"]).provider("$popover",function(){var e=this.defaults={animation:"am-fade",placement:"right",template:"popover/popover.tpl.html",contentTemplate:!1,trigger:"click",keyboard:!0,html:!1,title:"",content:"",delay:0,container:!1};this.$get=["$tooltip",function(t){function n(n,a){var o=angular.extend({},e,a),i=t(n,o);return o.content&&(i.$scope.content=o.content),i}return n}]}).directive("bsPopover",["$window","$location","$sce","$popover",function(e,t,n,a){var o=e.requestAnimationFrame||e.setTimeout;return{restrict:"EAC",scope:!0,link:function(e,t,i){var r={scope:e};angular.forEach(["template","contentTemplate","placement","container","delay","trigger","keyboard","html","animation"],function(e){angular.isDefined(i[e])&&(r[e]=i[e])}),angular.forEach(["title","content"],function(t){i[t]&&i.$observe(t,function(a,i){e[t]=n.trustAsHtml(a),angular.isDefined(i)&&o(function(){l&&l.$applyPlacement()})})}),i.bsPopover&&e.$watch(i.bsPopover,function(t,n){angular.isObject(t)?angular.extend(e,t):e.content=t,angular.isDefined(n)&&o(function(){l&&l.$applyPlacement()})},!0);var l=a(t,r);e.$on("$destroy",function(){l.destroy(),r=null,l=null})}}}]),angular.module("mgcrea.ngStrap.scrollspy",["mgcrea.ngStrap.helpers.debounce","mgcrea.ngStrap.helpers.dimensions"]).provider("$scrollspy",function(){var e=this.$$spies={},n=this.defaults={debounce:150,throttle:100,offset:100};this.$get=["$window","$document","$rootScope","dimensions","debounce","throttle",function(a,o,i,r,l,s){function u(e,t){return e[0].nodeName&&e[0].nodeName.toLowerCase()===t.toLowerCase()}function c(o){var c=angular.extend({},n,o);c.element||(c.element=p);var m=u(c.element,"body"),g=m?d:c.element,$=m?"window":c.id;if(e[$])return e[$].$$count++,e[$];var h,v,y,w,b,k,D,T,x={},S=x.$trackedElements=[],M=[];return x.init=function(){this.$$count=1,w=l(this.checkPosition,c.debounce),b=s(this.checkPosition,c.throttle),g.on("click",this.checkPositionWithEventLoop),d.on("resize",w),g.on("scroll",b),k=l(this.checkOffsets,c.debounce),h=i.$on("$viewContentLoaded",k),v=i.$on("$includeContentLoaded",k),k(),$&&(e[$]=x)},x.destroy=function(){this.$$count--,this.$$count>0||(g.off("click",this.checkPositionWithEventLoop),d.off("resize",w),g.off("scroll",w),h(),v(),$&&delete e[$])},x.checkPosition=function(){if(M.length){if(T=(m?a.pageYOffset:g.prop("scrollTop"))||0,D=Math.max(a.innerHeight,f.prop("clientHeight")),TM[e+1].offsetTop))return x.$activateElement(M[e])}},x.checkPositionWithEventLoop=function(){setTimeout(this.checkPosition,1)},x.$activateElement=function(e){if(y){var t=x.$getTrackedElement(y);t&&(t.source.removeClass("active"),u(t.source,"li")&&u(t.source.parent().parent(),"li")&&t.source.parent().parent().removeClass("active"))}y=e.target,e.source.addClass("active"),u(e.source,"li")&&u(e.source.parent().parent(),"li")&&e.source.parent().parent().addClass("active")},x.$getTrackedElement=function(e){return S.filter(function(t){return t.target===e})[0]},x.checkOffsets=function(){angular.forEach(S,function(e){var n=t.querySelector(e.target);e.offsetTop=n?r.offset(n).top:null,c.offset&&null!==e.offsetTop&&(e.offsetTop-=1*c.offset)}),M=S.filter(function(e){return null!==e.offsetTop}).sort(function(e,t){return e.offsetTop-t.offsetTop}),w()},x.trackElement=function(e,t){S.push({target:e,source:t})},x.untrackElement=function(e,t){for(var n,a=S.length;a--;)if(S[a].target===e&&S[a].source===t){n=a;break}S=S.splice(n,1)},x.activate=function(e){S[e].addClass("active")},x.init(),x}var d=angular.element(a),f=angular.element(o.prop("documentElement")),p=angular.element(a.document.body);return c}]}).directive("bsScrollspy",["$rootScope","debounce","dimensions","$scrollspy",function(e,t,n,a){return{restrict:"EAC",link:function(e,t,n){var o={scope:e};angular.forEach(["offset","target"],function(e){angular.isDefined(n[e])&&(o[e]=n[e])});var i=a(o);i.trackElement(o.target,t),e.$on("$destroy",function(){i.untrackElement(o.target,t),i.destroy(),o=null,i=null})}}}]).directive("bsScrollspyList",["$rootScope","debounce","dimensions","$scrollspy",function(){return{restrict:"A",compile:function(e){var t=e[0].querySelectorAll("li > a[href]");angular.forEach(t,function(e){var t=angular.element(e);t.parent().attr("bs-scrollspy","").attr("data-target",t.attr("href"))})}}}]),angular.module("mgcrea.ngStrap.tab",[]).run(["$templateCache",function(e){e.put("$pane","{{pane.content}}")}]).provider("$tab",function(){var e=this.defaults={animation:"am-fade",template:"tab/tab.tpl.html"};this.$get=function(){return{defaults:e}}}).directive("bsTabs",["$window","$animate","$tab",function(e,t,n){var a=n.defaults;return{restrict:"EAC",scope:!0,require:"?ngModel",templateUrl:function(e,t){return t.template||a.template},link:function(e,t,n,o){var i=a;angular.forEach(["animation"],function(e){angular.isDefined(n[e])&&(i[e]=n[e])}),n.bsTabs&&e.$watch(n.bsTabs,function(t){e.panes=t},!0),t.addClass("tabs"),i.animation&&t.addClass(i.animation),e.active=e.activePane=0,e.setActive=function(t){e.active=t,o&&o.$setViewValue(t)},o&&(o.$render=function(){e.active=1*o.$modelValue})}}}]),angular.module("mgcrea.ngStrap.timepicker",["mgcrea.ngStrap.helpers.dateParser","mgcrea.ngStrap.tooltip"]).provider("$timepicker",function(){var e=this.defaults={animation:"am-fade",prefixClass:"timepicker",placement:"bottom-left",template:"timepicker/timepicker.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,useNative:!0,timeType:"date",timeFormat:"shortTime",autoclose:!1,minTime:-1/0,maxTime:+1/0,length:5,hourStep:1,minuteStep:5};this.$get=["$window","$document","$rootScope","$sce","$locale","dateFilter","$tooltip",function(t,n,a,o,i,r,l){function s(t,n,a){function o(e,n){if(t[0].createTextRange){var a=t[0].createTextRange();a.collapse(!0),a.moveStart("character",e),a.moveEnd("character",n),a.select()}else t[0].setSelectionRange?t[0].setSelectionRange(e,n):angular.isUndefined(t[0].selectionStart)&&(t[0].selectionStart=e,t[0].selectionEnd=n)}function s(){t[0].focus()}var d=l(t,angular.extend({},e,a)),f=a.scope,p=d.$options,m=d.$scope,g=0,$=n.$dateValue||new Date,h={hour:$.getHours(),meridian:$.getHours()<12,minute:$.getMinutes(),second:$.getSeconds(),millisecond:$.getMilliseconds()},v=i.DATETIME_FORMATS[p.timeFormat]||p.timeFormat,y=/(h+)[:]?(m+)[ ]?(a?)/i.exec(v).slice(1);m.$select=function(e,t){d.select(e,t)},m.$moveIndex=function(e,t){d.$moveIndex(e,t)},m.$switchMeridian=function(e){d.switchMeridian(e)},d.update=function(e){angular.isDate(e)&&!isNaN(e.getTime())?(d.$date=e,angular.extend(h,{hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisecond:e.getMilliseconds()}),d.$build()):d.$isBuilt||d.$build()},d.select=function(e,t,a){(!n.$dateValue||isNaN(n.$dateValue.getTime()))&&(n.$dateValue=new Date(1970,0,1)),angular.isDate(e)||(e=new Date(e)),0===t?n.$dateValue.setHours(e.getHours()):1===t&&n.$dateValue.setMinutes(e.getMinutes()),n.$setViewValue(n.$dateValue),n.$render(),p.autoclose&&!a&&d.hide(!0)},d.switchMeridian=function(e){var t=(e||n.$dateValue).getHours();n.$dateValue.setHours(12>t?t+12:t-12),n.$setViewValue(n.$dateValue),n.$render()},d.$build=function(){var e,t,n=m.midIndex=parseInt(p.length/2,10),a=[];for(e=0;e1*p.maxTime},d.$moveIndex=function(e,t){var n;0===t?(n=new Date(1970,0,1,h.hour+e*p.length,h.minute),angular.extend(h,{hour:n.getHours()})):1===t&&(n=new Date(1970,0,1,h.hour,h.minute+e*p.length*p.minuteStep),angular.extend(h,{minute:n.getMinutes()})),d.$build()},d.$onMouseDown=function(e){if("input"!==e.target.nodeName.toLowerCase()&&e.preventDefault(),e.stopPropagation(),u){var t=angular.element(e.target);"button"!==t[0].nodeName.toLowerCase()&&(t=t.parent()),t.triggerHandler("click")}},d.$onKeyDown=function(e){if(/(38|37|39|40|13)/.test(e.keyCode)&&!e.shiftKey&&!e.altKey){if(e.preventDefault(),e.stopPropagation(),13===e.keyCode)return d.hide(!0);var t=new Date(d.$date),n=t.getHours(),a=r(t,"h").length,i=t.getMinutes(),l=r(t,"mm").length,s=/(37|39)/.test(e.keyCode),u=2+1*!!y[2];s&&(37===e.keyCode?g=1>g?u-1:g-1:39===e.keyCode&&(g=u-1>g?g+1:0));var c=[0,a];0===g?(38===e.keyCode?t.setHours(n-parseInt(p.hourStep,10)):40===e.keyCode&&t.setHours(n+parseInt(p.hourStep,10)),c=[0,a]):1===g?(38===e.keyCode?t.setMinutes(i-parseInt(p.minuteStep,10)):40===e.keyCode&&t.setMinutes(i+parseInt(p.minuteStep,10)),c=[a+1,a+1+l]):2===g&&(s||d.switchMeridian(),c=[a+1+l+1,a+1+l+3]),d.select(t,g,!0),o(c[0],c[1]),f.$digest()}};var w=d.init;d.init=function(){return c&&p.useNative?(t.prop("type","time"),void t.css("-webkit-appearance","textfield")):(u&&(t.prop("type","text"),t.attr("readonly","true"),t.on("click",s)),void w())};var b=d.destroy;d.destroy=function(){c&&p.useNative&&t.off("click",s),b()};var k=d.show;d.show=function(){k(),setTimeout(function(){d.$element.on(u?"touchstart":"mousedown",d.$onMouseDown),p.keyboard&&t.on("keydown",d.$onKeyDown)})};var D=d.hide;return d.hide=function(e){d.$element.off(u?"touchstart":"mousedown",d.$onMouseDown),p.keyboard&&t.off("keydown",d.$onKeyDown),D(e)},d}var u=(angular.element(t.document.body),"createTouch"in t.document),c=/(ip(a|o)d|iphone|android)/gi.test(t.navigator.userAgent);return e.lang||(e.lang=i.id),s.defaults=e,s}]}).directive("bsTimepicker",["$window","$parse","$q","$locale","dateFilter","$timepicker","$dateParser","$timeout",function(e,t,n,a,o,i,r){{var l=i.defaults,s=/(ip(a|o)d|iphone|android)/gi.test(e.navigator.userAgent);e.requestAnimationFrame||e.setTimeout}return{restrict:"EAC",require:"ngModel",link:function(e,t,n,a){var u={scope:e,controller:a};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","autoclose","timeType","timeFormat","useNative","hourStep","minuteStep","length"],function(e){angular.isDefined(n[e])&&(u[e]=n[e])}),s&&(u.useNative||l.useNative)&&(u.timeFormat="HH:mm");var c=i(t,a,u);u=c.$options;var d=r({format:u.timeFormat,lang:u.lang});angular.forEach(["minTime","maxTime"],function(e){angular.isDefined(n[e])&&n.$observe(e,function(t){c.$options[e]="now"===t?(new Date).setFullYear(1970,0,1):angular.isString(t)&&t.match(/^".+"$/)?+new Date(t.substr(1,t.length-2)):d.parse(t,new Date(1970,0,1,0)),!isNaN(c.$options[e])&&c.$build()})}),e.$watch(n.ngModel,function(){c.update(a.$dateValue)},!0),a.$parsers.unshift(function(e){if(!e)return void a.$setValidity("date",!0);var t=d.parse(e,a.$dateValue);if(!t||isNaN(t.getTime()))a.$setValidity("date",!1);else{var n=t.getTime()>=u.minTime&&t.getTime()<=u.maxTime;a.$setValidity("date",n),n&&(a.$dateValue=t)}return"string"===u.timeType?o(e,u.timeFormat):"number"===u.timeType?a.$dateValue.getTime():"iso"===u.timeType?a.$dateValue.toISOString():new Date(a.$dateValue)}),a.$formatters.push(function(e){var t;return t=angular.isUndefined(e)||null===e?0/0:angular.isDate(e)?e:"string"===u.timeType?d.parse(e):new Date(e),a.$dateValue=t,a.$dateValue}),a.$render=function(){t.val(!a.$dateValue||isNaN(a.$dateValue.getTime())?"":o(a.$dateValue,u.timeFormat))},e.$on("$destroy",function(){c.destroy(),u=null,c=null})}}}]),angular.module("mgcrea.ngStrap.tooltip",["mgcrea.ngStrap.helpers.dimensions"]).provider("$tooltip",function(){var e=this.defaults={animation:"am-fade",prefixClass:"tooltip",prefixEvent:"tooltip",container:!1,placement:"top",template:"tooltip/tooltip.tpl.html",contentTemplate:!1,trigger:"hover focus",keyboard:!1,html:!1,show:!1,title:"",type:"",delay:0};this.$get=["$window","$rootScope","$compile","$q","$templateCache","$http","$animate","$timeout","dimensions","$$rAF",function(n,a,o,i,r,l,s,u,c,d){function f(t,n){function i(){return"body"===f.container?c.offset(t[0]):c.position(t[0])}function r(e,t,n,a){var o,i=e.split("-");switch(i[0]){case"right":o={top:t.top+t.height/2-a/2,left:t.left+t.width};break;case"bottom":o={top:t.top+t.height,left:t.left+t.width/2-n/2};break;case"left":o={top:t.top+t.height/2-a/2,left:t.left-n};break;default:o={top:t.top-a,left:t.left+t.width/2-n/2}}if(!i[1])return o;if("top"===i[0]||"bottom"===i[0])switch(i[1]){case"left":o.left=t.left;break;case"right":o.left=t.left+t.width-n}else if("left"===i[0]||"right"===i[0])switch(i[1]){case"top":o.top=t.top-a;break;case"bottom":o.top=t.top+t.height}return o}var l={},u=t[0].nodeName.toLowerCase(),f=l.$options=angular.extend({},e,n);l.$promise=m(f.template);var v=l.$scope=f.scope&&f.scope.$new()||a.$new();f.delay&&angular.isString(f.delay)&&(f.delay=parseFloat(f.delay)),f.title&&(l.$scope.title=f.title),v.$hide=function(){v.$$postDigest(function(){l.hide()})},v.$show=function(){v.$$postDigest(function(){l.show()})},v.$toggle=function(){v.$$postDigest(function(){l.toggle()})},l.$isShown=v.$isShown=!1;var y,w;f.contentTemplate&&(l.$promise=l.$promise.then(function(e){var t=angular.element(e);return m(f.contentTemplate).then(function(e){var n=p('[ng-bind="content"]',t[0]);return n.length||(n=p('[ng-bind="title"]',t[0])),n.removeAttr("ng-bind").html(e),t[0].outerHTML})}));var b,k,D,T;return l.$promise.then(function(e){angular.isObject(e)&&(e=e.data),f.html&&(e=e.replace(h,'ng-bind-html="')),e=g.apply(e),D=e,b=o(e),l.init()}),l.init=function(){f.delay&&angular.isNumber(f.delay)&&(f.delay={show:f.delay,hide:f.delay}),"self"===f.container?T=t:f.container&&(T=p(f.container));var e=f.trigger.split(" ");angular.forEach(e,function(e){"click"===e?t.on("click",l.toggle):"manual"!==e&&(t.on("hover"===e?"mouseenter":"focus",l.enter),t.on("hover"===e?"mouseleave":"blur",l.leave),"button"===u&&"hover"!==e&&t.on($?"touchstart":"mousedown",l.$onFocusElementMouseDown))}),f.show&&v.$$postDigest(function(){"focus"===f.trigger?t[0].focus():l.show()})},l.destroy=function(){for(var e=f.trigger.split(" "),n=e.length;n--;){var a=e[n];"click"===a?t.off("click",l.toggle):"manual"!==a&&(t.off("hover"===a?"mouseenter":"focus",l.enter),t.off("hover"===a?"mouseleave":"blur",l.leave),"button"===u&&"hover"!==a&&t.off($?"touchstart":"mousedown",l.$onFocusElementMouseDown))}k&&(k.remove(),k=null),v.$destroy()},l.enter=function(){return clearTimeout(y),w="in",f.delay&&f.delay.show?void(y=setTimeout(function(){"in"===w&&l.show()},f.delay.show)):l.show()},l.show=function(){v.$emit(f.prefixEvent+".show.before",l);var e=f.container?T:null,n=f.container?null:t;k&&k.remove(),k=l.$element=b(v,function(){}),k.css({top:"0px",left:"0px",display:"block"}).addClass(f.placement),f.animation&&k.addClass(f.animation),f.type&&k.addClass(f.prefixClass+"-"+f.type),s.enter(k,e,n,function(){v.$emit(f.prefixEvent+".show",l)}),l.$isShown=v.$isShown=!0,v.$$phase||v.$root.$$phase||v.$digest(),d(l.$applyPlacement),f.keyboard&&("focus"!==f.trigger?(l.focus(),k.on("keyup",l.$onKeyUp)):t.on("keyup",l.$onFocusKeyUp))},l.leave=function(){return clearTimeout(y),w="out",f.delay&&f.delay.hide?void(y=setTimeout(function(){"out"===w&&l.hide()},f.delay.hide)):l.hide()},l.hide=function(e){return l.$isShown?(v.$emit(f.prefixEvent+".hide.before",l),s.leave(k,function(){v.$emit(f.prefixEvent+".hide",l)}),l.$isShown=v.$isShown=!1,v.$$phase||v.$root.$$phase||v.$digest(),f.keyboard&&null!==k&&k.off("keyup",l.$onKeyUp),e&&"focus"===f.trigger?t[0].blur():void 0):void 0},l.toggle=function(){l.$isShown?l.leave():l.enter()},l.focus=function(){k[0].focus()},l.$applyPlacement=function(){if(k){var e=i(),t=k.prop("offsetWidth"),n=k.prop("offsetHeight"),a=r(f.placement,e,t,n);a.top+="px",a.left+="px",k.css(a)}},l.$onKeyUp=function(e){27===e.which&&l.hide()},l.$onFocusKeyUp=function(e){27===e.which&&t[0].blur()},l.$onFocusElementMouseDown=function(e){e.preventDefault(),e.stopPropagation(),l.$isShown?t[0].blur():t[0].focus()},l}function p(e,n){return angular.element((n||t).querySelectorAll(e))}function m(e){return i.when(r.get(e)||l.get(e)).then(function(t){return angular.isObject(t)?(r.put(e,t.data),t.data):t})}var g=String.prototype.trim,$="createTouch"in n.document,h=/ng-bind="/gi;return f}]}).directive("bsTooltip",["$window","$location","$sce","$tooltip","$$rAF",function(e,t,n,a,o){return{restrict:"EAC",scope:!0,link:function(e,t,i){var r={scope:e};angular.forEach(["template","contentTemplate","placement","container","delay","trigger","keyboard","html","animation","type"],function(e){angular.isDefined(i[e])&&(r[e]=i[e])}),angular.forEach(["title"],function(t){i[t]&&i.$observe(t,function(a,i){e[t]=n.trustAsHtml(a),angular.isDefined(i)&&o(function(){l&&l.$applyPlacement()})})}),i.bsTooltip&&e.$watch(i.bsTooltip,function(t,n){angular.isObject(t)?angular.extend(e,t):e.title=t,angular.isDefined(n)&&o(function(){l&&l.$applyPlacement()})},!0);var l=a(t,r);e.$on("$destroy",function(){l.destroy(),r=null,l=null})}}}]),angular.module("mgcrea.ngStrap.typeahead",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$typeahead",function(){var e=this.defaults={animation:"am-fade",prefixClass:"typeahead",placement:"bottom-left",template:"typeahead/typeahead.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,minLength:1,filter:"filter",limit:6};this.$get=["$window","$rootScope","$tooltip",function(t,n,a){function o(t,n,o){var i={},r=angular.extend({},e,o);i=a(t,r);var l=o.scope,s=i.$scope;s.$resetMatches=function(){s.$matches=[],s.$activeIndex=0},s.$resetMatches(),s.$activate=function(e){s.$$postDigest(function(){i.activate(e)})},s.$select=function(e){s.$$postDigest(function(){i.select(e)})},s.$isVisible=function(){return i.$isVisible()},i.update=function(e){s.$matches=e,s.$activeIndex>=e.length&&(s.$activeIndex=0)},i.activate=function(e){s.$activeIndex=e},i.select=function(e){var t=s.$matches[e].value;n.$setViewValue(t),s.$resetMatches(),n.$render(),l&&l.$digest(),s.$emit("$typeahead.select",t,e)},i.$isVisible=function(){return r.minLength&&n?s.$matches.length&&angular.isString(n.$viewValue)&&n.$viewValue.length>=r.minLength:!!s.$matches.length},i.$getIndex=function(e){var t=s.$matches.length,n=t;if(t){for(n=t;n--&&s.$matches[n].value!==e;);if(!(0>n))return n}},i.$onMouseDown=function(e){e.preventDefault(),e.stopPropagation()},i.$onKeyDown=function(e){/(38|40|13)/.test(e.keyCode)&&(e.preventDefault(),e.stopPropagation(),13===e.keyCode&&s.$matches.length?i.select(s.$activeIndex):38===e.keyCode&&s.$activeIndex>0?s.$activeIndex--:40===e.keyCode&&s.$activeIndexu&&(e=e.slice(0,u)),(1!==e.length||e[0].value!==t)&&(f.update(e),r.$render())})}),r.$render=function(){if(r.$isEmpty(r.$viewValue))return t.val("");var e=f.$getIndex(r.$modelValue),n=angular.isDefined(e)?f.$scope.$matches[e].label:r.$viewValue;n=angular.isObject(n)?n.label:n,t.val(n.replace(/<(?:.|\n)*?>/gm,"").trim())},e.$on("$destroy",function(){f.destroy(),l=null,f=null})}}}])}(window,document); \ No newline at end of file diff --git a/dist/angular-strap.min.js.map b/dist/angular-strap.min.js.map index e3899eda6..5b415746d 100644 --- a/dist/angular-strap.min.js.map +++ b/dist/angular-strap.min.js.map @@ -5,4 +5,4 @@ * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -{"version":3,"file":"angular-strap.min.js.map","sources":["angular-strap.min.js"],"names":["window","document","angular","module","provider","defaults","this","offsetTop","$get","$window","debounce","dimensions","AffixFactory","element","config","getRequiredAffixClass","unpin","position","elementHeight","scrollTop","getScrollTop","scrollHeight","getScrollHeight","top","offsetBottom","initialAffixTop","targetEl","pageYOffset","body","$affix","options","extend","target","reset","initialOffsetTop","affixed","parent","offsetParent","match","i","init","$parseOffsets","offset","on","checkPosition","checkPositionWithEventLoop","windowEl","$debouncedOnResize","destroy","off","setTimeout","height","affix","removeClass","addClass","css","offsetUnpin","bodyEl","offsetHeight","$onResize","directive","restrict","require","link","scope","attr","affixTarget","$element","forEach","key","isDefined","$on","controller","animation","prefixClass","placement","template","container","backdrop","keyboard","show","duration","type","$modal","$timeout","AlertFactory","$alert","$scope","hide","$location","$sce","requestAnimationFrame","$observe","newValue","trustAsHtml","bsAlert","$watch","isObject","content","alert","trigger","toggle","contentTemplate","html","AsideFactory","$aside","bsAside","aside","activeClass","toggleEvent","compile","removeAttr","children","querySelectorAll","child","childEl","ngModel","$button","$$rAF","constantValueRegExp","isInput","nodeName","activeElement","trueValue","test","$eval","falseValue","hasExoticValues","$parsers","push","viewValue","$render","isActive","equals","$modelValue","checked","toggleClass","bind","$apply","$setViewValue","hasClass","value","delay","useNative","dateType","dateFormat","dayFormat","strictFormat","autoclose","minDate","Infinity","maxDate","startView","minView","startWeek","$document","$rootScope","$locale","dateFilter","datepickerViews","$tooltip","DatepickerFactory","updateSelected","el","selected","$datepicker","$isSelected","date","focusElement","focus","parentScope","$options","pickerViews","$views","views","viewDate","$mode","$picker","$select","select","$selectPane","$toggleMode","setMode","length","update","isDate","isNaN","getTime","$date","call","$build","keep","$dateValue","Date","setFullYear","getFullYear","getMonth","getDate","year","month","mode","pristine","built","build","$updateSelected","l","rows","isSelected","steps","targetDate","UTC","day","getUTCFullYear","getUTCMonth","getUTCDate","$onMouseDown","evt","preventDefault","stopPropagation","isTouch","toLowerCase","triggerHandler","$onKeyDown","keyCode","shiftKey","altKey","onKeyDown","$digest","_init","isNative","prop","_destroy","_show","_hide","blur","navigator","userAgent","lang","id","$parse","$q","$dateParser","isNumeric","n","parseFloat","isFinite","datepicker","today","isString","substr","parseInt","dateParser","format","strict","unshift","$setValidity","parsedDate","parse","isValid","toISOString","$formatters","modelValue","isUndefined","NaN","val","split","arr","size","arrays","splice","mod","m","daySplit","picker","weekDaysMin","DATETIME_FORMATS","SHORTDAY","weekDaysLabels","slice","concat","weekDaysLabelsHtml","join","startDate","getTimezoneOffset","force","firstDayOfMonth","firstDayOfMonthOffset","firstDate","getDay","firstDateOffset","days","label","muted","disabled","isDisabled","title","showLabels","labels","newDate","actualTime","name","months","lastDate","actualMonth","setMonth","firstYear","years","actualYear","setYear","Array","prototype","DropdownFactory","onBodyClick","$dropdown","$new","items","index","matchesSelector","eq","Element","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","bsDropdown","dropdown","proto","DateParserFactory","setMapForFormat","keys","Object","setFnMap","map","sortedMap","clonedFormat","search","v","escapeReservedSymbols","text","replace","regExpForFormat","regExpMap","re","RegExp","regex","setMap","sss","ss","s","mm","HH","H","hh","h","a","EEEE","DAY","EEE","dd","d","MMMM","MONTH","MMM","SHORTMONTH","MM","M","yyyy","yy","y","setMilliseconds","setSeconds","setMinutes","setHours","setDate","hours","getHours","indexOf","$format","baseDate","matches","exec","constant","func","wait","immediate","timeout","args","context","timestamp","result","arguments","later","last","apply","callNow","previous","leading","now","remaining","clearTimeout","trailing","factory","fn","extra","currentStyle","getComputedStyle","style","boxRect","getBoundingClientRect","docElement","ownerDocument","width","offsetWidth","documentElement","clientTop","left","pageXOffset","scrollLeft","clientLeft","offsetParentElement","offsetParentRect","outer","regexp","ParseOptionsFactory","parseValues","values","locals","valueName","displayFn","valueFn","$parseOptions","$values","keyName","groupByFn","valuesFn","$match","when","then","version","minor","dot","webkitRequestAnimationFrame","mozRequestAnimationFrame","cancelAnimationFrame","webkitCancelAnimationFrame","mozCancelAnimationFrame","webkitCancelRequestAnimationFrame","rafSupported","raf","timer","cancel","supported","backdropAnimation","prefixEvent","$compile","$templateCache","$http","$animate","ModalFactory","hideOnBackdropClick","currentTarget","$promise","fetchTemplate","$hide","$$postDigest","$show","$toggle","templateEl","contentEl","findElement","next","remove","outerHTML","modalLinker","modalElement","backdropElement","data","htmlReplaceRegExp","trim","$destroy","$emit","after","display","enter","bodyElement","$isShown","$$phase","$root","$onKeyUp","leave","which","query","get","res","put","String","bsModal","modal","routeAttr","$navbar","copy","path","liElements","li","liElement","pattern","spies","$$spies","throttle","ScrollSpyFactory","isWindowSpy","scrollEl","scrollId","$$count","unbindViewContentLoaded","unbindIncludeContentLoaded","activeTarget","debouncedCheckPosition","throttledCheckPosition","debouncedCheckOffsets","viewportHeight","$scrollspy","trackedElements","$trackedElements","sortedElements","checkOffsets","Math","max","innerHeight","docEl","$activateElement","$getTrackedElement","source","filter","obj","trackedElement","targetElement","querySelector","sort","b","trackElement","untrackElement","toDelete","activate","scrollspy","PopoverFactory","$popover","oldValue","popover","$applyPlacement","bsPopover","multiple","caretHtml","placeholder","maxLength","maxLengthHtml","SelectFactory","$matches","$activeIndex","$isMultiple","$activate","$isVisible","$isActive","$updateActiveIndex","isArray","$getIndex","minLength","$viewValue","inputEl","parsedOptions","ngOptions","watchedOptions","run","$tab","templateUrl","bsTabs","panes","active","activePane","setActive","timeType","timeFormat","minTime","maxTime","hourStep","minuteStep","timepickerFactory","createSelection","start","end","createTextRange","selRange","collapse","moveStart","moveEnd","setSelectionRange","selectionStart","selectionEnd","$timepicker","selectedIndex","hour","meridian","minute","getMinutes","second","getSeconds","millisecond","getMilliseconds","formats","$moveIndex","$switchMeridian","switchMeridian","$isBuilt","midIndex","$isDisabled","minutes","showAM","isAM","selectedTime","hoursLength","minutesLength","lateralMove","count","selectRange","timepicker","parsedTime","limit","TypeaheadFactory","$typeahead","$resetMatches","typeahead","$isEmpty","TooltipFactory","getPosition","getCalculatedOffset","actualWidth","actualHeight","hoverState","tipLinker","tipElement","tipTemplate","tipContainer","isNumber","triggers","$onFocusElementMouseDown","$onFocusKeyUp","elementPosition","tipWidth","tipHeight","tipPosition","tooltip","bsTooltip"],"mappings":"CAOA,SAAUA,EAAQC,GAClB,YAEAC,SAAQC,OAAO,kBACb,uBACA,uBACA,uBACA,wBACA,wBACA,4BACA,4BACA,wBACA,yBACA,yBACA,0BACA,2BACA,2BACA,uBACA,uBAIFD,QAAQC,OAAO,wBACb,oCACA,oCACCC,SAAS,SAAU,WACpB,GAAIC,GAAWC,KAAKD,UAAaE,UAAW,OAC5CD,MAAKE,MACH,UACA,WACA,aACA,SAAUC,EAASC,EAAUC,GAG3B,QAASC,GAAaC,EAASC,GA0G7B,QAASC,GAAsBC,EAAOC,EAAUC,GAC9C,GAAIC,GAAYC,IACZC,EAAeC,GACnB,OAAiBf,IAAbY,EACK,MACY,OAAVH,GAAkBG,EAAYH,GAASC,EAASM,IAClD,SACmB,OAAjBC,GAAyBP,EAASM,IAAML,EAAgBO,GAAmBJ,EAAeG,EAC5F,SAEA,SAGX,QAASJ,KACP,MAAOM,GAAS,KAAOjB,EAAUA,EAAQkB,YAAcD,EAAS,KAAOjB,EAEzE,QAASa,KACP,MAAOI,GAAS,KAAOjB,EAAUA,EAAQR,SAAS2B,KAAKP,aAAeK,EAAS,GAAGL,aA1HpF,GAAIQ,MAEAC,EAAU5B,QAAQ6B,UAAW1B,EAAUS,GACvCY,EAAWI,EAAQE,OAEnBC,EAAQ,+BAAgCR,EAAkB,EAAGS,EAAmB,EAAG3B,EAAY,EAAGiB,EAAe,EAAGW,EAAU,KAAMnB,EAAQ,KAC5IoB,EAASvB,EAAQuB,QAErB,IAAIN,EAAQO,aACV,GAAIP,EAAQO,aAAaC,MAAM,SAC7B,IAAK,GAAIC,GAAI,EAAGA,EAA2B,EAAvBT,EAAQO,aA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5jB,UAAU,aACX,UACA,YACA,OACA,WACA,QACA,SAAUnD,EAASgF,EAAWC,EAAMsE,EAAU1C,GAC5C,OACEzD,SAAU,MACVG,OAAO,EACPD,KAAM,SAAkBC,EAAOnD,EAASoD,GAEtC,GAAInC,IAAYkC,MAAOA,EACvB9D,SAAQkE,SACN,WACA,kBACA,YACA,YACA,QACA,UACA,WACA,OACA,YACA,QACC,SAAUC,GACPnE,QAAQoE,UAAUL,EAAKI,MACzBvC,EAAQuC,GAAOJ,EAAKI,MAGxBnE,QAAQkE,SAAS,SAAU,SAAUC,GACnCJ,EAAKI,IAAQJ,EAAK2B,SAASvB,EAAK,SAAUwB,EAAUsc,GAClDne,EAAMK,GAAOqB,EAAKI,YAAYD,GAC9B3F,QAAQoE,UAAU6d,IAAa7a,EAAM,WACnCohB,GAAWA,EAAQrG,wBAKzBpe,EAAK0kB,WAAa3kB,EAAMgC,OAAO/B,EAAK0kB,UAAW,SAAU9iB,EAAUsc,GAC7DjiB,QAAQ+F,SAASJ,GACnB3F,QAAQ6B,OAAOiC,EAAO6B,GAEtB7B,EAAMuO,MAAQ1M,EAEhB3F,QAAQoE,UAAU6d,IAAa7a,EAAM,WACnCohB,GAAWA,EAAQrG,sBAEpB,EAEH,IAAIqG,GAAU1e,EAASnJ,EAASiB,EAEhCkC,GAAMO,IAAI,WAAY,WACpBmkB,EAAQ1lB,UACRlB,EAAU,KACV4mB,EAAU,aAOjB1oB,OAAQC"} \ No newline at end of file +{"version":3,"file":"angular-strap.min.js.map","sources":["angular-strap.min.js"],"names":["window","document","angular","module","provider","defaults","this","offsetTop","$get","$window","debounce","dimensions","AffixFactory","element","config","getRequiredAffixClass","unpin","position","elementHeight","scrollTop","getScrollTop","scrollHeight","getScrollHeight","top","offsetBottom","initialAffixTop","targetEl","pageYOffset","body","$affix","options","extend","target","reset","initialOffsetTop","affixed","parent","offsetParent","match","i","init","$parseOffsets","offset","on","checkPosition","checkPositionWithEventLoop","windowEl","$debouncedOnResize","destroy","off","setTimeout","height","affix","removeClass","addClass","css","offsetUnpin","bodyEl","offsetHeight","$onResize","directive","restrict","require","link","scope","attr","affixTarget","$element","forEach","key","isDefined","$on","controller","animation","prefixClass","placement","template","container","backdrop","keyboard","show","duration","type","$modal","$timeout","AlertFactory","$alert","$scope","hide","$location","$sce","requestAnimationFrame","$observe","newValue","trustAsHtml","bsAlert","$watch","isObject","content","alert","trigger","toggle","contentTemplate","html","AsideFactory","$aside","bsAside","aside","activeClass","toggleEvent","compile","removeAttr","children","querySelectorAll","child","childEl","ngModel","$button","$$rAF","constantValueRegExp","isInput","nodeName","activeElement","trueValue","test","$eval","falseValue","hasExoticValues","$parsers","push","viewValue","$render","isActive","equals","$modelValue","checked","toggleClass","bind","$apply","$setViewValue","hasClass","value","delay","useNative","dateType","dateFormat","dayFormat","strictFormat","autoclose","minDate","Infinity","maxDate","startView","minView","startWeek","$document","$rootScope","$locale","dateFilter","datepickerViews","$tooltip","DatepickerFactory","updateSelected","el","selected","$datepicker","$isSelected","date","focusElement","focus","parentScope","$options","pickerViews","$views","views","viewDate","$mode","$picker","$select","select","$selectPane","$toggleMode","setMode","length","update","isDate","isNaN","getTime","$date","call","$build","keep","$dateValue","Date","setFullYear","getFullYear","getMonth","getDate","year","month","mode","pristine","built","build","$updateSelected","l","rows","isSelected","steps","targetDate","UTC","day","getUTCFullYear","getUTCMonth","getUTCDate","$onMouseDown","evt","preventDefault","stopPropagation","isTouch","toLowerCase","triggerHandler","$onKeyDown","keyCode","shiftKey","altKey","onKeyDown","$digest","_init","isNative","prop","_destroy","_show","_hide","blur","navigator","userAgent","lang","id","$parse","$q","$dateParser","isNumeric","n","parseFloat","isFinite","datepicker","today","isString","substr","parseInt","dateParser","format","strict","unshift","$setValidity","parsedDate","parse","isValid","toISOString","$formatters","modelValue","isUndefined","NaN","val","split","arr","size","arrays","splice","mod","m","daySplit","picker","weekDaysMin","DATETIME_FORMATS","SHORTDAY","weekDaysLabels","slice","concat","weekDaysLabelsHtml","join","startDate","getTimezoneOffset","force","firstDayOfMonth","firstDayOfMonthOffset","firstDate","getDay","firstDateOffset","days","label","muted","disabled","isDisabled","title","showLabels","labels","newDate","actualTime","name","months","lastDate","actualMonth","setMonth","firstYear","years","actualYear","setYear","Array","prototype","DropdownFactory","onBodyClick","$dropdown","$new","items","index","matchesSelector","eq","Element","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","bsDropdown","dropdown","proto","DateParserFactory","setMapForFormat","keys","Object","setFnMap","map","sortedMap","clonedFormat","search","v","escapeReservedSymbols","text","replace","regExpForFormat","regExpMap","re","RegExp","regex","setMap","sss","ss","s","mm","HH","H","hh","h","a","EEEE","DAY","EEE","dd","d","MMMM","MONTH","MMM","SHORTMONTH","MM","M","yyyy","yy","y","setMilliseconds","setSeconds","setMinutes","setHours","setDate","hours","getHours","indexOf","$format","baseDate","matches","exec","constant","func","wait","immediate","timeout","args","context","timestamp","result","arguments","later","last","apply","callNow","previous","leading","now","remaining","clearTimeout","trailing","factory","fn","extra","currentStyle","getComputedStyle","style","boxRect","getBoundingClientRect","docElement","ownerDocument","width","offsetWidth","documentElement","clientTop","left","pageXOffset","scrollLeft","clientLeft","offsetParentElement","offsetParentRect","outer","regexp","ParseOptionsFactory","parseValues","values","locals","valueName","displayFn","valueFn","$parseOptions","$values","keyName","groupByFn","valuesFn","$match","when","then","version","minor","dot","webkitRequestAnimationFrame","mozRequestAnimationFrame","cancelAnimationFrame","webkitCancelAnimationFrame","mozCancelAnimationFrame","webkitCancelRequestAnimationFrame","rafSupported","raf","timer","cancel","supported","backdropAnimation","prefixEvent","$compile","$templateCache","$http","$animate","ModalFactory","hideOnBackdropClick","currentTarget","$promise","fetchTemplate","$hide","$$postDigest","$show","$toggle","templateEl","contentEl","findElement","next","remove","outerHTML","modalLinker","modalElement","backdropElement","data","htmlReplaceRegExp","trim","$destroy","$emit","after","display","enter","bodyElement","$isShown","$$phase","$root","$onKeyUp","leave","which","query","get","res","put","String","bsModal","modal","routeAttr","$navbar","copy","path","liElements","li","liElement","pattern","multiple","sort","caretHtml","placeholder","maxLength","maxLengthHtml","SelectFactory","$matches","$activeIndex","$isMultiple","$activate","activate","$isVisible","$isActive","$updateActiveIndex","isArray","$getIndex","minLength","$viewValue","inputEl","parsedOptions","ngOptions","watchedOptions","filter","PopoverFactory","$popover","oldValue","popover","$applyPlacement","bsPopover","spies","$$spies","throttle","ScrollSpyFactory","isWindowSpy","scrollEl","scrollId","$$count","unbindViewContentLoaded","unbindIncludeContentLoaded","activeTarget","debouncedCheckPosition","throttledCheckPosition","debouncedCheckOffsets","viewportHeight","$scrollspy","trackedElements","$trackedElements","sortedElements","checkOffsets","Math","max","innerHeight","docEl","$activateElement","$getTrackedElement","source","obj","trackedElement","targetElement","querySelector","b","trackElement","untrackElement","toDelete","scrollspy","run","$tab","templateUrl","bsTabs","panes","active","activePane","setActive","timeType","timeFormat","minTime","maxTime","hourStep","minuteStep","timepickerFactory","createSelection","start","end","createTextRange","selRange","collapse","moveStart","moveEnd","setSelectionRange","selectionStart","selectionEnd","$timepicker","selectedIndex","hour","meridian","minute","getMinutes","second","getSeconds","millisecond","getMilliseconds","formats","$moveIndex","$switchMeridian","switchMeridian","$isBuilt","midIndex","$isDisabled","minutes","showAM","isAM","selectedTime","hoursLength","minutesLength","lateralMove","count","selectRange","timepicker","parsedTime","TooltipFactory","getPosition","getCalculatedOffset","actualWidth","actualHeight","hoverState","tipLinker","tipElement","tipTemplate","tipContainer","isNumber","triggers","$onFocusElementMouseDown","$onFocusKeyUp","elementPosition","tipWidth","tipHeight","tipPosition","tooltip","bsTooltip","limit","TypeaheadFactory","$typeahead","$resetMatches","typeahead","$isEmpty"],"mappings":"CAOA,SAAUA,EAAQC,GAClB,YAEAC,SAAQC,OAAO,kBACb,uBACA,uBACA,uBACA,wBACA,wBACA,4BACA,4BACA,wBACA,yBACA,yBACA,0BACA,2BACA,2BACA,uBACA,uBAIFD,QAAQC,OAAO,wBACb,oCACA,oCACCC,SAAS,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S+c,IAClB7N,EAASA,EAAOnJ,MAAM,EAAGgX,KAEL,IAAlB7N,EAAOlP,QAAgBkP,EAAO,GAAG5R,QAAUhD,KAE/C6iB,EAAUld,OAAOiP,GAEjBjW,EAAW2D,eAIf3D,EAAW2D,QAAU,WAEnB,GAAI3D,EAAWmkB,SAASnkB,EAAWoc,YACjC,MAAO/f,GAAQ2P,IAAI,GACrB,IAAIoD,GAAQ8U,EAAUhI,UAAUlc,EAAW8D,aACvC8B,EAAWlK,QAAQoE,UAAUsP,GAAS8U,EAAUnjB,OAAO0a,SAASrM,GAAOzB,MAAQ3N,EAAWoc,UAC9FxW,GAAWlK,QAAQ+F,SAASmE,GAAYA,EAAS+H,MAAQ/H,EACzDvJ,EAAQ2P,IAAIpG,EAAS+K,QAAQ,iBAAkB,IAAI2I,SAGrD9Z,EAAMO,IAAI,WAAY,WACpBmkB,EAAU1lB,UACVlB,EAAU,KACV4mB,EAAY,aAOnB1oB,OAAQC"} \ No newline at end of file diff --git a/dist/modules/parse-options.js b/dist/modules/parse-options.js index e3dac9c04..c200811e0 100644 --- a/dist/modules/parse-options.js +++ b/dist/modules/parse-options.js @@ -25,17 +25,17 @@ angular.module('mgcrea.ngStrap.helpers.parseOptions', []).provider('$parseOption }; $parseOptions.valuesFn = function (scope, controller) { return $q.when(valuesFn(scope, controller)).then(function (values) { - $parseOptions.$values = values ? parseValues(values) : {}; + $parseOptions.$values = values ? parseValues(values, scope) : {}; return $parseOptions.$values; }); }; // Private functions - function parseValues(values) { + function parseValues(values, scope) { return values.map(function (match, index) { var locals = {}, label, value; locals[valueName] = match; - label = displayFn(locals); - value = valueFn(locals) || index; + label = displayFn(scope, locals); + value = valueFn(scope, locals) || index; return { label: label, value: value diff --git a/dist/modules/parse-options.min.js b/dist/modules/parse-options.min.js index 8929cca7e..d8e95f5d1 100644 --- a/dist/modules/parse-options.min.js +++ b/dist/modules/parse-options.min.js @@ -5,4 +5,4 @@ * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -"use strict";angular.module("mgcrea.ngStrap.helpers.parseOptions",[]).provider("$parseOptions",function(){var n=this.defaults={regexp:/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/};this.$get=["$parse","$q",function(s,r){function e(e,t){function a(n){return n.map(function(n,s){var r,e,t={};return t[c]=n,r=o(t),e=f(t)||s,{label:r,value:e}})}var u={},i=angular.extend({},n,t);u.$values=[];var $,o,c,l,p,f,v;return u.init=function(){u.$match=$=e.match(i.regexp),o=s($[2]||$[1]),c=$[4]||$[6],l=$[5],p=s($[3]||""),f=s($[2]?$[1]:c),v=s($[7])},u.valuesFn=function(n,s){return r.when(v(n,s)).then(function(n){return u.$values=n?a(n):{},u.$values})},u.init(),u}return e}]}); \ No newline at end of file +"use strict";angular.module("mgcrea.ngStrap.helpers.parseOptions",[]).provider("$parseOptions",function(){var n=this.defaults={regexp:/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/};this.$get=["$parse","$q",function(s,r){function e(e,t){function a(n,s){return n.map(function(n,r){var e,t,a={};return a[c]=n,e=o(s,a),t=f(s,a)||r,{label:e,value:t}})}var u={},i=angular.extend({},n,t);u.$values=[];var $,o,c,l,p,f,v;return u.init=function(){u.$match=$=e.match(i.regexp),o=s($[2]||$[1]),c=$[4]||$[6],l=$[5],p=s($[3]||""),f=s($[2]?$[1]:c),v=s($[7])},u.valuesFn=function(n,s){return r.when(v(n,s)).then(function(s){return u.$values=s?a(s,n):{},u.$values})},u.init(),u}return e}]}); \ No newline at end of file diff --git a/dist/modules/parse-options.min.js.map b/dist/modules/parse-options.min.js.map index 7f7eaf3b0..eb72b9a34 100644 --- a/dist/modules/parse-options.min.js.map +++ b/dist/modules/parse-options.min.js.map @@ -5,4 +5,4 @@ * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -{"version":3,"file":"parse-options.min.js.map","sources":["parse-options.min.js"],"names":["angular","module","provider","defaults","this","regexp","$get","$parse","$q","ParseOptionsFactory","attr","config","parseValues","values","map","match","index","label","value","locals","valueName","displayFn","valueFn","$parseOptions","options","extend","$values","keyName","groupByFn","valuesFn","init","$match","scope","controller","when","then"],"mappings":"AAOA,YACAA,SAAQC,OAAO,0CAA2CC,SAAS,gBAAiB,WAClF,GAAIC,GAAWC,KAAKD,UAAaE,OAAQ,+KACzCD,MAAKE,MACH,SACA,KACA,SAAUC,EAAQC,GAChB,QAASC,GAAoBC,EAAMC,GAkBjC,QAASC,GAAYC,GACnB,MAAOA,GAAOC,IAAI,SAAUC,EAAOC,GACjC,GAAiBC,GAAOC,EAApBC,IAIJ,OAHAA,GAAOC,GAAaL,EACpBE,EAAQI,EAAUF,GAClBD,EAAQI,EAAQH,IAAWH,GAEzBC,MAAOA,EACPC,MAAOA,KAzBb,GAAIK,MAEAC,EAAUxB,QAAQyB,UAAWtB,EAAUQ,EAC3CY,GAAcG,UAEd,IAAIX,GAAOM,EAAWD,EAAWO,EAASC,EAAWN,EAASO,CAyB9D,OAxBAN,GAAcO,KAAO,WACnBP,EAAcQ,OAAShB,EAAQL,EAAKK,MAAMS,EAAQnB,QAClDgB,EAAYd,EAAOQ,EAAM,IAAMA,EAAM,IAAKK,EAAYL,EAAM,IAAMA,EAAM,GAAIY,EAAUZ,EAAM,GAAIa,EAAYrB,EAAOQ,EAAM,IAAM,IAAKO,EAAUf,EAAOQ,EAAM,GAAKA,EAAM,GAAKK,GAAYS,EAAWtB,EAAOQ,EAAM,KAEjNQ,EAAcM,SAAW,SAAUG,EAAOC,GACxC,MAAOzB,GAAG0B,KAAKL,EAASG,EAAOC,IAAaE,KAAK,SAAUtB,GAEzD,MADAU,GAAcG,QAAUb,EAASD,EAAYC,MACtCU,EAAcG,WAgBzBH,EAAcO,OACPP,EAET,MAAOd"} \ No newline at end of file +{"version":3,"file":"parse-options.min.js.map","sources":["parse-options.min.js"],"names":["angular","module","provider","defaults","this","regexp","$get","$parse","$q","ParseOptionsFactory","attr","config","parseValues","values","scope","map","match","index","label","value","locals","valueName","displayFn","valueFn","$parseOptions","options","extend","$values","keyName","groupByFn","valuesFn","init","$match","controller","when","then"],"mappings":"AAOA,YACAA,SAAQC,OAAO,0CAA2CC,SAAS,gBAAiB,WAClF,GAAIC,GAAWC,KAAKD,UAAaE,OAAQ,+KACzCD,MAAKE,MACH,SACA,KACA,SAAUC,EAAQC,GAChB,QAASC,GAAoBC,EAAMC,GAkBjC,QAASC,GAAYC,EAAQC,GAC3B,MAAOD,GAAOE,IAAI,SAAUC,EAAOC,GACjC,GAAiBC,GAAOC,EAApBC,IAIJ,OAHAA,GAAOC,GAAaL,EACpBE,EAAQI,EAAUR,EAAOM,GACzBD,EAAQI,EAAQT,EAAOM,IAAWH,GAEhCC,MAAOA,EACPC,MAAOA,KAzBb,GAAIK,MAEAC,EAAUzB,QAAQ0B,UAAWvB,EAAUQ,EAC3Ca,GAAcG,UAEd,IAAIX,GAAOM,EAAWD,EAAWO,EAASC,EAAWN,EAASO,CAyB9D,OAxBAN,GAAcO,KAAO,WACnBP,EAAcQ,OAAShB,EAAQN,EAAKM,MAAMS,EAAQpB,QAClDiB,EAAYf,EAAOS,EAAM,IAAMA,EAAM,IAAKK,EAAYL,EAAM,IAAMA,EAAM,GAAIY,EAAUZ,EAAM,GAAIa,EAAYtB,EAAOS,EAAM,IAAM,IAAKO,EAAUhB,EAAOS,EAAM,GAAKA,EAAM,GAAKK,GAAYS,EAAWvB,EAAOS,EAAM,KAEjNQ,EAAcM,SAAW,SAAUhB,EAAOmB,GACxC,MAAOzB,GAAG0B,KAAKJ,EAAShB,EAAOmB,IAAaE,KAAK,SAAUtB,GAEzD,MADAW,GAAcG,QAAUd,EAASD,EAAYC,EAAQC,MAC9CU,EAAcG,WAgBzBH,EAAcO,OACPP,EAET,MAAOf"} \ No newline at end of file diff --git a/dist/modules/select.js b/dist/modules/select.js index 824a4018f..7669ddfbb 100644 --- a/dist/modules/select.js +++ b/dist/modules/select.js @@ -153,7 +153,7 @@ angular.module('mgcrea.ngStrap.select', [ evt.preventDefault(); evt.stopPropagation(); // Select with enter - if (evt.keyCode === 13 || evt.keyCode === 9) { + if (!options.multiple && (evt.keyCode === 13 || evt.keyCode === 9)) { return $select.select(scope.$activeIndex); } // Navigate with keyboard @@ -185,7 +185,7 @@ angular.module('mgcrea.ngStrap.select', [ if (options.keyboard) { element.off('keydown', $select.$onKeyDown); } - _hide(); + _hide(true); }; return $select; } diff --git a/dist/modules/select.min.js b/dist/modules/select.min.js index 1796a28e2..06c6f9bab 100644 --- a/dist/modules/select.min.js +++ b/dist/modules/select.min.js @@ -5,4 +5,4 @@ * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -"use strict";angular.module("mgcrea.ngStrap.select",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$select",function(){var e=this.defaults={animation:"am-fade",prefixClass:"select",placement:"bottom-left",template:"select/select.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,multiple:!1,sort:!0,caretHtml:' ',placeholder:"Choose among the following...",maxLength:3,maxLengthHtml:"selected"};this.$get=["$window","$document","$rootScope","$tooltip",function(t,n,a,i){function l(t,n,a){var l={},c=angular.extend({},e,a);l=i(t,c);var r=a.scope,u=l.$scope;u.$matches=[],u.$activeIndex=0,u.$isMultiple=c.multiple,u.$activate=function(e){u.$$postDigest(function(){l.activate(e)})},u.$select=function(e){u.$$postDigest(function(){l.select(e)})},u.$isVisible=function(){return l.$isVisible()},u.$isActive=function(e){return l.$isActive(e)},l.update=function(e){u.$matches=e,l.$updateActiveIndex()},l.activate=function(e){return c.multiple?(u.$activeIndex.sort(),l.$isActive(e)?u.$activeIndex.splice(u.$activeIndex.indexOf(e),1):u.$activeIndex.push(e),c.sort&&u.$activeIndex.sort()):u.$activeIndex=e,u.$activeIndex},l.select=function(e){var t=u.$matches[e].value;l.activate(e),n.$setViewValue(c.multiple?u.$activeIndex.map(function(e){return u.$matches[e].value}):t),n.$render(),r&&r.$digest(),c.multiple||l.hide(),u.$emit("$select.select",t,e)},l.$updateActiveIndex=function(){n.$modelValue&&u.$matches.length?u.$activeIndex=c.multiple&&angular.isArray(n.$modelValue)?n.$modelValue.map(function(e){return l.$getIndex(e)}):l.$getIndex(n.$modelValue):u.$activeIndex>=u.$matches.length&&(u.$activeIndex=c.multiple?[]:0)},l.$isVisible=function(){return c.minLength&&n?u.$matches.length&&n.$viewValue.length>=c.minLength:u.$matches.length},l.$isActive=function(e){return c.multiple?-1!==u.$activeIndex.indexOf(e):u.$activeIndex===e},l.$getIndex=function(e){var t=u.$matches.length,n=t;if(t){for(n=t;n--&&u.$matches[n].value!==e;);if(!(0>n))return n}},l.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),o){var t=angular.element(e.target);t.triggerHandler("click")}},l.$onKeyDown=function(e){if(/(9|13|38|40)/.test(e.keyCode)){if(e.preventDefault(),e.stopPropagation(),13===e.keyCode||9===e.keyCode)return l.select(u.$activeIndex);38===e.keyCode&&u.$activeIndex>0?u.$activeIndex--:40===e.keyCode&&u.$activeIndex'),r.after(t)}var u=i(n.ngOptions),s=a(t,o,c),d=u.$match[7].replace(/\|.+/,"").trim();e.$watch(d,function(){u.valuesFn(e,o).then(function(e){s.update(e),o.$render()})},!0),e.$watch(n.ngModel,function(){s.$updateActiveIndex()},!0),o.$render=function(){var e,a;c.multiple&&angular.isArray(o.$modelValue)?(e=o.$modelValue.map(function(e){return a=s.$getIndex(e),angular.isDefined(a)?s.$scope.$matches[a].label:!1}).filter(angular.isDefined),e=e.length>(c.maxLength||l.maxLength)?e.length+" "+(c.maxLengthHtml||l.maxLengthHtml):e.join(", ")):(a=s.$getIndex(o.$modelValue),e=angular.isDefined(a)?s.$scope.$matches[a].label:!1),t.html((e?e:n.placeholder||l.placeholder)+l.caretHtml)},e.$on("$destroy",function(){s.destroy(),c=null,s=null})}}}]); \ No newline at end of file +"use strict";angular.module("mgcrea.ngStrap.select",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$select",function(){var e=this.defaults={animation:"am-fade",prefixClass:"select",placement:"bottom-left",template:"select/select.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,multiple:!1,sort:!0,caretHtml:' ',placeholder:"Choose among the following...",maxLength:3,maxLengthHtml:"selected"};this.$get=["$window","$document","$rootScope","$tooltip",function(t,n,a,i){function l(t,n,a){var l={},c=angular.extend({},e,a);l=i(t,c);var r=a.scope,u=l.$scope;u.$matches=[],u.$activeIndex=0,u.$isMultiple=c.multiple,u.$activate=function(e){u.$$postDigest(function(){l.activate(e)})},u.$select=function(e){u.$$postDigest(function(){l.select(e)})},u.$isVisible=function(){return l.$isVisible()},u.$isActive=function(e){return l.$isActive(e)},l.update=function(e){u.$matches=e,l.$updateActiveIndex()},l.activate=function(e){return c.multiple?(u.$activeIndex.sort(),l.$isActive(e)?u.$activeIndex.splice(u.$activeIndex.indexOf(e),1):u.$activeIndex.push(e),c.sort&&u.$activeIndex.sort()):u.$activeIndex=e,u.$activeIndex},l.select=function(e){var t=u.$matches[e].value;l.activate(e),n.$setViewValue(c.multiple?u.$activeIndex.map(function(e){return u.$matches[e].value}):t),n.$render(),r&&r.$digest(),c.multiple||l.hide(),u.$emit("$select.select",t,e)},l.$updateActiveIndex=function(){n.$modelValue&&u.$matches.length?u.$activeIndex=c.multiple&&angular.isArray(n.$modelValue)?n.$modelValue.map(function(e){return l.$getIndex(e)}):l.$getIndex(n.$modelValue):u.$activeIndex>=u.$matches.length&&(u.$activeIndex=c.multiple?[]:0)},l.$isVisible=function(){return c.minLength&&n?u.$matches.length&&n.$viewValue.length>=c.minLength:u.$matches.length},l.$isActive=function(e){return c.multiple?-1!==u.$activeIndex.indexOf(e):u.$activeIndex===e},l.$getIndex=function(e){var t=u.$matches.length,n=t;if(t){for(n=t;n--&&u.$matches[n].value!==e;);if(!(0>n))return n}},l.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),o){var t=angular.element(e.target);t.triggerHandler("click")}},l.$onKeyDown=function(e){if(/(9|13|38|40)/.test(e.keyCode)){if(e.preventDefault(),e.stopPropagation(),!c.multiple&&(13===e.keyCode||9===e.keyCode))return l.select(u.$activeIndex);38===e.keyCode&&u.$activeIndex>0?u.$activeIndex--:40===e.keyCode&&u.$activeIndex'),r.after(t)}var u=i(n.ngOptions),s=a(t,o,c),d=u.$match[7].replace(/\|.+/,"").trim();e.$watch(d,function(){u.valuesFn(e,o).then(function(e){s.update(e),o.$render()})},!0),e.$watch(n.ngModel,function(){s.$updateActiveIndex()},!0),o.$render=function(){var e,a;c.multiple&&angular.isArray(o.$modelValue)?(e=o.$modelValue.map(function(e){return a=s.$getIndex(e),angular.isDefined(a)?s.$scope.$matches[a].label:!1}).filter(angular.isDefined),e=e.length>(c.maxLength||l.maxLength)?e.length+" "+(c.maxLengthHtml||l.maxLengthHtml):e.join(", ")):(a=s.$getIndex(o.$modelValue),e=angular.isDefined(a)?s.$scope.$matches[a].label:!1),t.html((e?e:n.placeholder||l.placeholder)+l.caretHtml)},e.$on("$destroy",function(){s.destroy(),c=null,s=null})}}}]); \ No newline at end of file diff --git a/dist/modules/select.min.js.map b/dist/modules/select.min.js.map index 30c273615..2106cf87c 100644 --- a/dist/modules/select.min.js.map +++ b/dist/modules/select.min.js.map @@ -5,4 +5,4 @@ * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -{"version":3,"file":"select.min.js.map","sources":["select.min.js"],"names":["angular","module","provider","defaults","this","animation","prefixClass","placement","template","trigger","container","keyboard","html","delay","multiple","sort","caretHtml","placeholder","maxLength","maxLengthHtml","$get","$window","$document","$rootScope","$tooltip","SelectFactory","element","controller","config","$select","options","extend","parentScope","scope","$scope","$matches","$activeIndex","$isMultiple","$activate","index","$$postDigest","activate","select","$isVisible","$isActive","update","matches","$updateActiveIndex","splice","indexOf","push","value","$setViewValue","map","$render","$digest","hide","$emit","$modelValue","length","isArray","$getIndex","minLength","$viewValue","l","i","$onMouseDown","evt","preventDefault","stopPropagation","isTouch","targetEl","target","triggerHandler","$onKeyDown","test","keyCode","isUndefined","_show","show","$element","addClass","setTimeout","on","_hide","off","document","body","directive","$parse","$q","$parseOptions","restrict","require","link","attr","forEach","key","isDefined","nodeName","toLowerCase","inputEl","css","after","parsedOptions","ngOptions","watchedOptions","$match","replace","trim","$watch","valuesFn","then","values","ngModel","selected","label","filter","join","$on","destroy"],"mappings":"AAOA,YACAA,SAAQC,OAAO,yBACb,yBACA,wCACCC,SAAS,UAAW,WACrB,GAAIC,GAAWC,KAAKD,UAChBE,UAAW,UACXC,YAAa,SACbC,UAAW,cACXC,SAAU,yBACVC,QAAS,QACTC,WAAW,EACXC,UAAU,EACVC,MAAM,EACNC,MAAO,EACPC,UAAU,EACVC,MAAM,EACNC,UAAW,oCACXC,YAAa,gCACbC,UAAW,EACXC,cAAe,WAEnBf,MAAKgB,MACH,UACA,YACA,aACA,WACA,SAAUC,EAASC,EAAWC,EAAYC,GAGxC,QAASC,GAAcC,EAASC,EAAYC,GAC1C,GAAIC,MAEAC,EAAU9B,QAAQ+B,UAAW5B,EAAUyB,EAC3CC,GAAUL,EAASE,EAASI,EAC5B,IAAIE,GAAcJ,EAAOK,MACrBA,EAAQJ,EAAQK,MACpBD,GAAME,YACNF,EAAMG,aAAe,EACrBH,EAAMI,YAAcP,EAAQhB,SAC5BmB,EAAMK,UAAY,SAAUC,GAC1BN,EAAMO,aAAa,WACjBX,EAAQY,SAASF,MAG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QAAQkG,UAAU3D,GAASG,EAAOR,OAAOC,SAASI,GAAO6E,OAAQ,IACvEC,OAAOrH,QAAQkG,WAEhBiB,EADEA,EAASxD,QAAU7B,EAAQZ,WAAaf,EAASe,WACxCiG,EAASxD,OAAS,KAAO7B,EAAQX,eAAiBhB,EAASgB,eAE3DgG,EAASG,KAAK,QAG3B/E,EAAQG,EAAOmB,UAAUlC,EAAW+B,aACpCyD,EAAWnH,QAAQkG,UAAU3D,GAASG,EAAOR,OAAOC,SAASI,GAAO6E,OAAQ,GAE9E1F,EAAQd,MAAMuG,EAAWA,EAAWpB,EAAK9E,aAAed,EAASc,aAAed,EAASa,YAG3FiB,EAAMsF,IAAI,WAAY,WACpB7E,EAAO8E,UACP1F,EAAU,KACVY,EAAS"} \ No newline at end of file +{"version":3,"file":"select.min.js.map","sources":["select.min.js"],"names":["angular","module","provider","defaults","this","animation","prefixClass","placement","template","trigger","container","keyboard","html","delay","multiple","sort","caretHtml","placeholder","maxLength","maxLengthHtml","$get","$window","$document","$rootScope","$tooltip","SelectFactory","element","controller","config","$select","options","extend","parentScope","scope","$scope","$matches","$activeIndex","$isMultiple","$activate","index","$$postDigest","activate","select","$isVisible","$isActive","update","matches","$updateActiveIndex","splice","indexOf","push","value","$setViewValue","map","$render","$digest","hide","$emit","$modelValue","length","isArray","$getIndex","minLength","$viewValue","l","i","$onMouseDown","evt","preventDefault","stopPropagation","isTouch","targetEl","target","triggerHandler","$onKeyDown","test","keyCode","isUndefined","_show","show","$element","addClass","setTimeout","on","_hide","off","document","body","directive","$parse","$q","$parseOptions","restrict","require","link","attr","forEach","key","isDefined","nodeName","toLowerCase","inputEl","css","after","parsedOptions","ngOptions","watchedOptions","$match","replace","trim","$watch","valuesFn","then","values","ngModel","selected","label","filter","join","$on","destroy"],"mappings":"AAOA,YACAA,SAAQC,OAAO,yBACb,yBACA,wCACCC,SAAS,UAAW,WACrB,GAAIC,GAAWC,KAAKD,UAChBE,UAAW,UACXC,YAAa,SACbC,UAA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B,QAAQ,2DAC1B2E,EAAQE,MAAM7E,GAGhB,GAAI8E,GAAgBb,EAAcI,EAAKU,WAEnC/D,EAASb,EAAQH,EAASC,EAAYG,GAEtC4E,EAAiBF,EAAcG,OAAO,GAAGC,QAAQ,OAAQ,IAAIC,MACjE5E,GAAM6E,OAAOJ,EAAgB,WAE3BF,EAAcO,SAAS9E,EAAON,GAAYqF,KAAK,SAAUC,GACvDvE,EAAOG,OAAOoE,GACdtF,EAAW2B,cAEZ,GAEHrB,EAAM6E,OAAOf,EAAKmB,QAAS,WAEzBxE,EAAOK,uBACN,GAEHpB,EAAW2B,QAAU,WAEnB,GAAI6D,GAAU5E,CACVT,GAAQhB,UAAYd,QAAQ4D,QAAQjC,EAAW+B,cACjDyD,EAAWxF,EAAW+B,YAAYL,IAAI,SAAUF,GAE9C,MADAZ,GAAQG,EAAOmB,UAAUV,GAClBnD,QAAQkG,UAAU3D,GAASG,EAAOR,OAAOC,SAASI,GAAO6E,OAAQ,IACvEC,OAAOrH,QAAQkG,WAEhBiB,EADEA,EAASxD,QAAU7B,EAAQZ,WAAaf,EAASe,WACxCiG,EAASxD,OAAS,KAAO7B,EAAQX,eAAiBhB,EAASgB,eAE3DgG,EAASG,KAAK,QAG3B/E,EAAQG,EAAOmB,UAAUlC,EAAW+B,aACpCyD,EAAWnH,QAAQkG,UAAU3D,GAASG,EAAOR,OAAOC,SAASI,GAAO6E,OAAQ,GAE9E1F,EAAQd,MAAMuG,EAAWA,EAAWpB,EAAK9E,aAAed,EAASc,aAAed,EAASa,YAG3FiB,EAAMsF,IAAI,WAAY,WACpB7E,EAAO8E,UACP1F,EAAU,KACVY,EAAS"} \ No newline at end of file diff --git a/src/select/docs/select.demo.html b/src/select/docs/select.demo.html index 5382e9692..c70b6dc93 100644 --- a/src/select/docs/select.demo.html +++ b/src/select/docs/select.demo.html @@ -23,7 +23,7 @@

Live demo -
diff --git a/src/select/docs/select.demo.js b/src/select/docs/select.demo.js index 0eb990af9..d0fb4efa4 100644 --- a/src/select/docs/select.demo.js +++ b/src/select/docs/select.demo.js @@ -15,5 +15,9 @@ angular.module('mgcrea.ngStrapDocs') $scope.selectedMonth = 0; $scope.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + $scope.fn = function(v) { + console.warn('fn', v); + return v; + } });