Commit 2f7ce901 authored by Xavier Guimard's avatar Xavier Guimard

Update manager javascripts (#1568 #1495)

parent c1212147
Pipeline #3852 canceled with stages
/**
* @license AngularJS v1.7.2
* @license AngularJS v1.7.5
* (c) 2010-2018 Google, Inc. http://angularjs.org
* License: MIT
*/
......@@ -306,7 +306,7 @@ function getDomNode(element) {
return (element instanceof jqLite) ? element[0] : element;
}
function applyGeneratedPreparationClasses(element, event, options) {
function applyGeneratedPreparationClasses($$jqLite, element, event, options) {
var classes = '';
if (event) {
classes = pendClasses(event, EVENT_CLASS_PREFIX, true);
......@@ -814,33 +814,6 @@ function getCssTransitionDurationStyle(duration, applyOnlyDuration) {
return [style, value];
}
function createLocalCacheLookup() {
var cache = Object.create(null);
return {
flush: function() {
cache = Object.create(null);
},
count: function(key) {
var entry = cache[key];
return entry ? entry.total : 0;
},
get: function(key) {
var entry = cache[key];
return entry && entry.value;
},
put: function(key, value) {
if (!cache[key]) {
cache[key] = { total: 1, value: value };
} else {
cache[key].total++;
}
}
};
}
// we do not reassign an already present style value since
// if we detect the style property value again we may be
// detecting styles that were added via the `from` styles.
......@@ -859,26 +832,16 @@ function registerRestorableStyles(backup, node, properties) {
}
var $AnimateCssProvider = ['$animateProvider', /** @this */ function($animateProvider) {
var gcsLookup = createLocalCacheLookup();
var gcsStaggerLookup = createLocalCacheLookup();
this.$get = ['$window', '$$jqLite', '$$AnimateRunner', '$timeout',
this.$get = ['$window', '$$jqLite', '$$AnimateRunner', '$timeout', '$$animateCache',
'$$forceReflow', '$sniffer', '$$rAFScheduler', '$$animateQueue',
function($window, $$jqLite, $$AnimateRunner, $timeout,
function($window, $$jqLite, $$AnimateRunner, $timeout, $$animateCache,
$$forceReflow, $sniffer, $$rAFScheduler, $$animateQueue) {
var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
var parentCounter = 0;
function gcsHashFn(node, extraClasses) {
var KEY = '$$ngAnimateParentKey';
var parentNode = node.parentNode;
var parentID = parentNode[KEY] || (parentNode[KEY] = ++parentCounter);
return parentID + '-' + node.getAttribute('class') + '-' + extraClasses;
}
function computeCachedCssStyles(node, className, cacheKey, properties) {
var timings = gcsLookup.get(cacheKey);
function computeCachedCssStyles(node, className, cacheKey, allowNoDuration, properties) {
var timings = $$animateCache.get(cacheKey);
if (!timings) {
timings = computeCssStyles($window, node, properties);
......@@ -887,20 +850,26 @@ var $AnimateCssProvider = ['$animateProvider', /** @this */ function($animatePro
}
}
// if a css animation has no duration we
// should mark that so that repeated addClass/removeClass calls are skipped
var hasDuration = allowNoDuration || (timings.transitionDuration > 0 || timings.animationDuration > 0);
// we keep putting this in multiple times even though the value and the cacheKey are the same
// because we're keeping an internal tally of how many duplicate animations are detected.
gcsLookup.put(cacheKey, timings);
$$animateCache.put(cacheKey, timings, hasDuration);
return timings;
}
function computeCachedCssStaggerStyles(node, className, cacheKey, properties) {
var stagger;
var staggerCacheKey = 'stagger-' + cacheKey;
// if we have one or more existing matches of matching elements
// containing the same parent + CSS styles (which is how cacheKey works)
// then staggering is possible
if (gcsLookup.count(cacheKey) > 0) {
stagger = gcsStaggerLookup.get(cacheKey);
if ($$animateCache.count(cacheKey) > 0) {
stagger = $$animateCache.get(staggerCacheKey);
if (!stagger) {
var staggerClassName = pendClasses(className, '-stagger');
......@@ -915,7 +884,7 @@ var $AnimateCssProvider = ['$animateProvider', /** @this */ function($animatePro
$$jqLite.removeClass(node, staggerClassName);
gcsStaggerLookup.put(cacheKey, stagger);
$$animateCache.put(staggerCacheKey, stagger, true);
}
}
......@@ -926,8 +895,7 @@ var $AnimateCssProvider = ['$animateProvider', /** @this */ function($animatePro
function waitUntilQuiet(callback) {
rafWaitQueue.push(callback);
$$rAFScheduler.waitUntilQuiet(function() {
gcsLookup.flush();
gcsStaggerLookup.flush();
$$animateCache.flush();
// DO NOT REMOVE THIS LINE OR REFACTOR OUT THE `pageWidth` variable.
// PLEASE EXAMINE THE `$$forceReflow` service to understand why.
......@@ -942,8 +910,8 @@ var $AnimateCssProvider = ['$animateProvider', /** @this */ function($animatePro
});
}
function computeTimings(node, className, cacheKey) {
var timings = computeCachedCssStyles(node, className, cacheKey, DETECT_CSS_PROPERTIES);
function computeTimings(node, className, cacheKey, allowNoDuration) {
var timings = computeCachedCssStyles(node, className, cacheKey, allowNoDuration, DETECT_CSS_PROPERTIES);
var aD = timings.animationDelay;
var tD = timings.transitionDelay;
timings.maxDelay = aD && tD
......@@ -1030,7 +998,6 @@ var $AnimateCssProvider = ['$animateProvider', /** @this */ function($animatePro
var preparationClasses = [structuralClassName, addRemoveClassName].join(' ').trim();
var fullClassName = classes + ' ' + preparationClasses;
var activeClasses = pendClasses(preparationClasses, ACTIVE_CLASS_SUFFIX);
var hasToStyles = styles.to && Object.keys(styles.to).length > 0;
var containsKeyframeAnimation = (options.keyframeStyle || '').length > 0;
......@@ -1043,7 +1010,12 @@ var $AnimateCssProvider = ['$animateProvider', /** @this */ function($animatePro
return closeAndReturnNoopAnimator();
}
var cacheKey, stagger;
var stagger, cacheKey = $$animateCache.cacheKey(node, method, options.addClass, options.removeClass);
if ($$animateCache.containsCachedAnimationWithoutDuration(cacheKey)) {
preparationClasses = null;
return closeAndReturnNoopAnimator();
}
if (options.stagger > 0) {
var staggerVal = parseFloat(options.stagger);
stagger = {
......@@ -1053,7 +1025,6 @@ var $AnimateCssProvider = ['$animateProvider', /** @this */ function($animatePro
animationDuration: 0
};
} else {
cacheKey = gcsHashFn(node, fullClassName);
stagger = computeCachedCssStaggerStyles(node, preparationClasses, cacheKey, DETECT_STAGGER_CSS_PROPERTIES);
}
......@@ -1087,7 +1058,7 @@ var $AnimateCssProvider = ['$animateProvider', /** @this */ function($animatePro
var itemIndex = stagger
? options.staggerIndex >= 0
? options.staggerIndex
: gcsLookup.count(cacheKey)
: $$animateCache.count(cacheKey)
: 0;
var isFirst = itemIndex === 0;
......@@ -1102,7 +1073,7 @@ var $AnimateCssProvider = ['$animateProvider', /** @this */ function($animatePro
blockTransitions(node, SAFE_FAST_FORWARD_DURATION_VALUE);
}
var timings = computeTimings(node, fullClassName, cacheKey);
var timings = computeTimings(node, fullClassName, cacheKey, !isStructural);
var relativeDelay = timings.maxDelay;
maxDelay = Math.max(relativeDelay, 0);
maxDuration = timings.maxDuration;
......@@ -1140,6 +1111,8 @@ var $AnimateCssProvider = ['$animateProvider', /** @this */ function($animatePro
return closeAndReturnNoopAnimator();
}
var activeClasses = pendClasses(preparationClasses, ACTIVE_CLASS_SUFFIX);
if (options.delay != null) {
var delayStyle;
if (typeof options.delay !== 'boolean') {
......@@ -1227,10 +1200,13 @@ var $AnimateCssProvider = ['$animateProvider', /** @this */ function($animatePro
animationClosed = true;
animationPaused = false;
if (!options.$$skipPreparationClasses) {
if (preparationClasses && !options.$$skipPreparationClasses) {
$$jqLite.removeClass(element, preparationClasses);
}
$$jqLite.removeClass(element, activeClasses);
if (activeClasses) {
$$jqLite.removeClass(element, activeClasses);
}
blockKeyframeAnimations(node, false);
blockTransitions(node, false);
......@@ -1414,9 +1390,9 @@ var $AnimateCssProvider = ['$animateProvider', /** @this */ function($animatePro
if (flags.recalculateTimingStyles) {
fullClassName = node.getAttribute('class') + ' ' + preparationClasses;
cacheKey = gcsHashFn(node, fullClassName);
cacheKey = $$animateCache.cacheKey(node, method, options.addClass, options.removeClass);
timings = computeTimings(node, fullClassName, cacheKey);
timings = computeTimings(node, fullClassName, cacheKey, false);
relativeDelay = timings.maxDelay;
maxDelay = Math.max(relativeDelay, 0);
maxDuration = timings.maxDuration;
......@@ -2153,6 +2129,15 @@ var $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animate
join: []
};
function getEventData(options) {
return {
addClass: options.addClass,
removeClass: options.removeClass,
from: options.from,
to: options.to
};
}
function makeTruthyCssClassMap(classString) {
if (!classString) {
return null;
......@@ -2251,6 +2236,10 @@ var $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animate
var disabledElementsLookup = new $$Map();
var animationsEnabled = null;
function removeFromDisabledElementsLookup(evt) {
disabledElementsLookup.delete(evt.target);
}
function postDigestTaskFactory() {
var postDigestCalled = false;
return function(fn) {
......@@ -2434,6 +2423,11 @@ var $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animate
bool = !disabledElementsLookup.get(node);
} else {
// (element, bool) - Element setter
if (!disabledElementsLookup.has(node)) {
// The element is added to the map for the first time.
// Create a listener to remove it on `$destroy` (to avoid memory leak).
jqLite(element).on('$destroy', removeFromDisabledElementsLookup);
}
disabledElementsLookup.set(node, !bool);
}
}
......@@ -2519,9 +2513,9 @@ var $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animate
if (skipAnimations) {
// Callbacks should fire even if the document is hidden (regression fix for issue #14120)
if (documentHidden) notifyProgress(runner, event, 'start');
if (documentHidden) notifyProgress(runner, event, 'start', getEventData(options));
close();
if (documentHidden) notifyProgress(runner, event, 'close');
if (documentHidden) notifyProgress(runner, event, 'close', getEventData(options));
return runner;
}
......@@ -2578,7 +2572,7 @@ var $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animate
if (existingAnimation.state === RUNNING_STATE) {
normalizeAnimationDetails(element, newAnimation);
} else {
applyGeneratedPreparationClasses(element, isStructural ? event : null, options);
applyGeneratedPreparationClasses($$jqLite, element, isStructural ? event : null, options);
event = newAnimation.event = existingAnimation.event;
options = mergeAnimationDetails(element, existingAnimation, newAnimation);
......@@ -2683,7 +2677,7 @@ var $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animate
// this will update the runner's flow-control events based on
// the `realRunner` object.
runner.setHost(realRunner);
notifyProgress(runner, event, 'start', {});
notifyProgress(runner, event, 'start', getEventData(options));
realRunner.done(function(status) {
close(!status);
......@@ -2691,7 +2685,7 @@ var $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animate
if (animationDetails && animationDetails.counter === counter) {
clearElementAnimationState(node);
}
notifyProgress(runner, event, 'close', {});
notifyProgress(runner, event, 'close', getEventData(options));
});
});
......@@ -2857,6 +2851,62 @@ var $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animate
}];
}];
/** @this */
var $$AnimateCacheProvider = function() {
var KEY = '$$ngAnimateParentKey';
var parentCounter = 0;
var cache = Object.create(null);
this.$get = [function() {
return {
cacheKey: function(node, method, addClass, removeClass) {
var parentNode = node.parentNode;
var parentID = parentNode[KEY] || (parentNode[KEY] = ++parentCounter);
var parts = [parentID, method, node.getAttribute('class')];
if (addClass) {
parts.push(addClass);
}
if (removeClass) {
parts.push(removeClass);
}
return parts.join(' ');
},
containsCachedAnimationWithoutDuration: function(key) {
var entry = cache[key];
// nothing cached, so go ahead and animate
// otherwise it should be a valid animation
return (entry && !entry.isValid) || false;
},
flush: function() {
cache = Object.create(null);
},
count: function(key) {
var entry = cache[key];
return entry ? entry.total : 0;
},
get: function(key) {
var entry = cache[key];
return entry && entry.value;
},
put: function(key, value, isValid) {
if (!cache[key]) {
cache[key] = { total: 1, value: value, isValid: isValid };
} else {
cache[key].total++;
cache[key].value = value;
}
}
};
}];
};
/* exported $$AnimationProvider */
var $$AnimationProvider = ['$animateProvider', /** @this */ function($animateProvider) {
......@@ -2865,6 +2915,7 @@ var $$AnimationProvider = ['$animateProvider', /** @this */ function($animatePro
var drivers = this.drivers = [];
var RUNNER_STORAGE_KEY = '$$animationRunner';
var PREPARE_CLASSES_KEY = '$$animatePrepareClasses';
function setRunner(element, runner) {
element.data(RUNNER_STORAGE_KEY, runner);
......@@ -2878,8 +2929,8 @@ var $$AnimationProvider = ['$animateProvider', /** @this */ function($animatePro
return element.data(RUNNER_STORAGE_KEY);
}
this.$get = ['$$jqLite', '$rootScope', '$injector', '$$AnimateRunner', '$$Map', '$$rAFScheduler',
function($$jqLite, $rootScope, $injector, $$AnimateRunner, $$Map, $$rAFScheduler) {
this.$get = ['$$jqLite', '$rootScope', '$injector', '$$AnimateRunner', '$$Map', '$$rAFScheduler', '$$animateCache',
function($$jqLite, $rootScope, $injector, $$AnimateRunner, $$Map, $$rAFScheduler, $$animateCache) {
var animationQueue = [];
var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
......@@ -2894,6 +2945,7 @@ var $$AnimationProvider = ['$animateProvider', /** @this */ function($animatePro
var animation = animations[i];
lookup.set(animation.domNode, animations[i] = {
domNode: animation.domNode,
element: animation.element,
fn: animation.fn,
children: []
});
......@@ -2950,7 +3002,7 @@ var $$AnimationProvider = ['$animateProvider', /** @this */ function($animatePro
result.push(row);
row = [];
}
row.push(entry.fn);
row.push(entry);
entry.children.forEach(function(childEntry) {
nextLevelEntries++;
queue.push(childEntry);
......@@ -2985,8 +3037,6 @@ var $$AnimationProvider = ['$animateProvider', /** @this */ function($animatePro
return runner;
}
setRunner(element, runner);
var classes = mergeClasses(element.attr('class'), mergeClasses(options.addClass, options.removeClass));
var tempClasses = options.tempClasses;
if (tempClasses) {
......@@ -2994,12 +3044,12 @@ var $$AnimationProvider = ['$animateProvider', /** @this */ function($animatePro
options.tempClasses = null;
}
var prepareClassName;
if (isStructural) {
prepareClassName = 'ng-' + event + PREPARE_CLASS_SUFFIX;
$$jqLite.addClass(element, prepareClassName);
element.data(PREPARE_CLASSES_KEY, 'ng-' + event + PREPARE_CLASS_SUFFIX);
}
setRunner(element, runner);
animationQueue.push({
// this data is used by the postDigest code and passed into
// the driver step function
......@@ -3039,16 +3089,31 @@ var $$AnimationProvider = ['$animateProvider', /** @this */ function($animatePro
var toBeSortedAnimations = [];
forEach(groupedAnimations, function(animationEntry) {
var element = animationEntry.from ? animationEntry.from.element : animationEntry.element;
var extraClasses = options.addClass;
extraClasses = (extraClasses ? (extraClasses + ' ') : '') + NG_ANIMATE_CLASSNAME;
var cacheKey = $$animateCache.cacheKey(element[0], animationEntry.event, extraClasses, options.removeClass);
toBeSortedAnimations.push({
domNode: getDomNode(animationEntry.from ? animationEntry.from.element : animationEntry.element),
element: element,
domNode: getDomNode(element),
fn: function triggerAnimationStart() {
var startAnimationFn, closeFn = animationEntry.close;
// in the event that we've cached the animation status for this element
// and it's in fact an invalid animation (something that has duration = 0)
// then we should skip all the heavy work from here on
if ($$animateCache.containsCachedAnimationWithoutDuration(cacheKey)) {
closeFn();
return;
}
// it's important that we apply the `ng-animate` CSS class and the
// temporary classes before we do any driver invoking since these
// CSS classes may be required for proper CSS detection.
animationEntry.beforeStart();
var startAnimationFn, closeFn = animationEntry.close;
// in the event that the element was removed before the digest runs or
// during the RAF sequencing then we should not trigger the animation.
var targetElement = animationEntry.anchors
......@@ -3078,7 +3143,32 @@ var $$AnimationProvider = ['$animateProvider', /** @this */ function($animatePro
// we need to sort each of the animations in order of parent to child
// relationships. This ensures that the child classes are applied at the
// right time.
$$rAFScheduler(sortAnimations(toBeSortedAnimations));
var finalAnimations = sortAnimations(toBeSortedAnimations);
for (var i = 0; i < finalAnimations.length; i++) {
var innerArray = finalAnimations[i];
for (var j = 0; j < innerArray.length; j++) {
var entry = innerArray[j];
var element = entry.element;
// the RAFScheduler code only uses functions
finalAnimations[i][j] = entry.fn;
// the first row of elements shouldn't have a prepare-class added to them
// since the elements are at the top of the animation hierarchy and they
// will be applied without a RAF having to pass...
if (i === 0) {
element.removeData(PREPARE_CLASSES_KEY);
continue;
}
var prepareClassName = element.data(PREPARE_CLASSES_KEY);
if (prepareClassName) {
$$jqLite.addClass(element, prepareClassName);
}
}
}
$$rAFScheduler(finalAnimations);
});
return runner;
......@@ -3216,10 +3306,10 @@ var $$AnimationProvider = ['$animateProvider', /** @this */ function($animatePro
}
function beforeStart() {
element.addClass(NG_ANIMATE_CLASSNAME);
if (tempClasses) {
$$jqLite.addClass(element, tempClasses);
}
tempClasses = (tempClasses ? (tempClasses + ' ') : '') + NG_ANIMATE_CLASSNAME;
$$jqLite.addClass(element, tempClasses);
var prepareClassName = element.data(PREPARE_CLASSES_KEY);
if (prepareClassName) {
$$jqLite.removeClass(element, prepareClassName);
prepareClassName = null;
......@@ -3259,7 +3349,6 @@ var $$AnimationProvider = ['$animateProvider', /** @this */ function($animatePro
$$jqLite.removeClass(element, tempClasses);
}
element.removeClass(NG_ANIMATE_CLASSNAME);
runner.complete(!rejected);
}
};
......@@ -4160,13 +4249,14 @@ angular.module('ngAnimate', [], function initAngularHelpers() {
isFunction = angular.isFunction;
isElement = angular.isElement;
})
.info({ angularVersion: '1.7.2' })
.info({ angularVersion: '1.7.5' })
.directive('ngAnimateSwap', ngAnimateSwapDirective)
.directive('ngAnimateChildren', $$AnimateChildrenDirective)
.factory('$$rAFScheduler', $$rAFSchedulerFactory)
.provider('$$animateQueue', $$AnimateQueueProvider)
.provider('$$animateCache', $$AnimateCacheProvider)
.provider('$$animation', $$AnimationProvider)
.provider('$animateCss', $AnimateCssProvider)
......
/*
AngularJS v1.7.2
AngularJS v1.7.5
(c) 2010-2018 Google, Inc. http://angularjs.org
License: MIT
*/
(function(S,m){'use strict';function Ea(a,b,c){if(!a)throw Pa("areq",b||"?",c||"required");return a}function Fa(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;V(a)&&(a=a.join(" "));V(b)&&(b=b.join(" "));return a+" "+b}function Qa(a){var b={};a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from);return b}function W(a,b,c){var d="";a=V(a)?a:a&&B(a)&&a.length?a.split(/\s+/):[];t(a,function(a,e){a&&0<a.length&&(d+=0<e?" ":"",d+=c?b+a:a+b)});return d}function Ga(a){if(a instanceof z)switch(a.length){case 0:return a;
case 1:if(1===a[0].nodeType)return a;break;default:return z(ua(a))}if(1===a.nodeType)return z(a)}function ua(a){if(!a[0])return a;for(var b=0;b<a.length;b++){var c=a[b];if(1===c.nodeType)return c}}function Ra(a,b,c){t(b,function(b){a.addClass(b,c)})}function Sa(a,b,c){t(b,function(b){a.removeClass(b,c)})}function X(a){return function(b,c){c.addClass&&(Ra(a,b,c.addClass),c.addClass=null);c.removeClass&&(Sa(a,b,c.removeClass),c.removeClass=null)}}function oa(a){a=a||{};if(!a.$$prepared){var b=a.domOperation||
O;a.domOperation=function(){a.$$domOperationFired=!0;b();b=O};a.$$prepared=!0}return a}function ha(a,b){Ha(a,b);Ia(a,b)}function Ha(a,b){b.from&&(a.css(b.from),b.from=null)}function Ia(a,b){b.to&&(a.css(b.to),b.to=null)}function T(a,b,c){var d=b.options||{};c=c.options||{};var g=(d.addClass||"")+" "+(c.addClass||""),e=(d.removeClass||"")+" "+(c.removeClass||"");a=Ta(a.attr("class"),g,e);c.preparationClasses&&(d.preparationClasses=ca(c.preparationClasses,d.preparationClasses),delete c.preparationClasses);
g=d.domOperation!==O?d.domOperation:null;va(d,c);g&&(d.domOperation=g);d.addClass=a.addClass?a.addClass:null;d.removeClass=a.removeClass?a.removeClass:null;b.addClass=d.addClass;b.removeClass=d.removeClass;return d}function Ta(a,b,c){function d(a){B(a)&&(a=a.split(" "));var b={};t(a,function(a){a.length&&(b[a]=!0)});return b}var g={};a=d(a);b=d(b);t(b,function(a,b){g[b]=1});c=d(c);t(c,function(a,b){g[b]=1===g[b]?null:-1});var e={addClass:"",removeClass:""};t(g,function(b,c){var d,g;1===b?(d="addClass",
g=!a[c]||a[c+"-remove"]):-1===b&&(d="removeClass",g=a[c]||a[c+"-add"]);g&&(e[d].length&&(e[d]+=" "),e[d]+=c)});return e}function I(a){return a instanceof z?a[0]:a}function Ua(a,b,c){var d="";b&&(d=W(b,"ng-",!0));c.addClass&&(d=ca(d,W(c.addClass,"-add")));c.removeClass&&(d=ca(d,W(c.removeClass,"-remove")));d.length&&(c.preparationClasses=d,a.addClass(d))}function pa(a,b){var c=b?"-"+b+"s":"";ka(a,[la,c]);return[la,c]}function wa(a,b){var c=b?"paused":"",d=Y+"PlayState";ka(a,[d,c]);return[d,c]}function ka(a,
b){a.style[b[0]]=b[1]}function ca(a,b){return a?b?a+" "+b:a:b}function Ja(a,b,c){var d=Object.create(null),g=a.getComputedStyle(b)||{};t(c,function(a,b){var c=g[a];if(c){var N=c.charAt(0);if("-"===N||"+"===N||0<=N)c=Va(c);0===c&&(c=null);d[b]=c}});return d}function Va(a){var b=0;a=a.split(/\s*,\s*/);t(a,function(a){"s"===a.charAt(a.length-1)&&(a=a.substring(0,a.length-1));a=parseFloat(a)||0;b=b?Math.max(a,b):a});return b}function xa(a){return 0===a||null!=a}function Ka(a,b){var c=Q,d=a+"s";b?c+="Duration":
d+=" linear all";return[c,d]}function La(){var a=Object.create(null);return{flush:function(){a=Object.create(null)},count:function(b){return(b=a[b])?b.total:0},get:function(b){return(b=a[b])&&b.value},put:function(b,c){a[b]?a[b].total++:a[b]={total:1,value:c}}}}function Ma(a,b,c){t(c,function(c){a[c]=ya(a[c])?a[c]:b.style.getPropertyValue(c)})}var Q,za,Y,Aa;void 0===S.ontransitionend&&void 0!==S.onwebkittransitionend?(Q="WebkitTransition",za="webkitTransitionEnd transitionend"):(Q="transition",za=
"transitionend");void 0===S.onanimationend&&void 0!==S.onwebkitanimationend?(Y="WebkitAnimation",Aa="webkitAnimationEnd animationend"):(Y="animation",Aa="animationend");var qa=Y+"Delay",Ba=Y+"Duration",la=Q+"Delay",Na=Q+"Duration",Pa=m.$$minErr("ng"),Wa={transitionDuration:Na,transitionDelay:la,transitionProperty:Q+"Property",animationDuration:Ba,animationDelay:qa,animationIterationCount:Y+"IterationCount"},Xa={transitionDuration:Na,transitionDelay:la,animationDuration:Ba,animationDelay:qa},Ca,va,
t,V,ya,Z,Da,ra,B,P,z,O;m.module("ngAnimate",[],function(){O=m.noop;Ca=m.copy;va=m.extend;z=m.element;t=m.forEach;V=m.isArray;B=m.isString;ra=m.isObject;P=m.isUndefined;ya=m.isDefined;Da=m.isFunction;Z=m.isElement}).info({angularVersion:"1.7.2"}).directive("ngAnimateSwap",["$animate",function(a){return{restrict:"A",transclude:"element",terminal:!0,priority:600,link:function(b,c,d,g,e){var r,G;b.$watchCollection(d.ngAnimateSwap||d["for"],function(b){r&&a.leave(r);G&&(G.$destroy(),G=null);(b||0===b)&&
e(function(b,d){r=b;G=d;a.enter(b,null,c)})})}}}]).directive("ngAnimateChildren",["$interpolate",function(a){return{link:function(b,c,d){function g(a){c.data("$$ngAnimateChildren","on"===a||"true"===a)}var e=d.ngAnimateChildren;B(e)&&0===e.length?c.data("$$ngAnimateChildren",!0):(g(a(e)(b)),d.$observe("ngAnimateChildren",g))}}}]).factory("$$rAFScheduler",["$$rAF",function(a){function b(a){d=d.concat(a);c()}function c(){if(d.length){for(var b=d.shift(),r=0;r<b.length;r++)b[r]();g||a(function(){g||
c()})}}var d,g;d=b.queue=[];b.waitUntilQuiet=function(b){g&&g();g=a(function(){g=null;b();c()})};return b}]).provider("$$animateQueue",["$animateProvider",function(a){function b(a){if(!a)return null;a=a.split(" ");var b=Object.create(null);t(a,function(a){b[a]=!0});return b}function c(a,c){if(a&&c){var d=b(c);return a.split(" ").some(function(a){return d[a]})}}function d(a,b,c){return e[a].some(function(a){return a(b,c)})}function g(a,b){var c=0<(a.addClass||"").length,d=0<(a.removeClass||"").length;
return b?c&&d:c||d}var e=this.rules={skip:[],cancel:[],join:[]};e.join.push(function(a,b){return!a.structural&&g(a)});e.skip.push(function(a,b){return!a.structural&&!g(a)});e.skip.push(function(a,b){return"leave"===b.event&&a.structural});e.skip.push(function(a,b){return b.structural&&2===b.state&&!a.structural});e.cancel.push(function(a,b){return b.structural&&a.structural});e.cancel.push(function(a,b){return 2===b.state&&a.structural});e.cancel.push(function(a,b){if(b.structural)return!1;var d=
a.addClass,g=a.removeClass,e=b.addClass,sa=b.removeClass;return P(d)&&P(g)||P(e)&&P(sa)?!1:c(d,sa)||c(g,e)});this.$get=["$$rAF","$rootScope","$rootElement","$document","$$Map","$$animation","$$AnimateRunner","$templateRequest","$$jqLite","$$forceReflow","$$isDocumentHidden",function(b,c,e,l,J,sa,da,v,E,h,L){function x(){var a=!1;return function(b){a?b():c.$$postDigest(function(){a=!0;b()})}}function C(a,b,c){var f=[],d=k[c];d&&t(d,function(d){u.call(d.node,b)?f.push(d.callback):"leave"===c&&u.call(d.node,
a)&&f.push(d.callback)});return f}function H(a,b,c){var f=ua(b);return a.filter(function(a){return!(a.node===f&&(!c||a.callback===c))})}function p(a,k,w){function p(a,c,f,d){N(function(){var a=C(na,q,c);a.length?b(function(){t(a,function(a){a(e,f,d)});"close"!==f||q.parentNode||ba.off(q)}):"close"!==f||q.parentNode||ba.off(q)});a.progress(c,f,d)}function H(a){var b=e,c=h;c.preparationClasses&&(b.removeClass(c.preparationClasses),c.preparationClasses=null);c.activeClasses&&(b.removeClass(c.activeClasses),
c.activeClasses=null);Oa(e,h);ha(e,h);h.domOperation();l.complete(!a)}var h=Ca(w),e=Ga(a),q=I(e),na=q&&q.parentNode,h=oa(h),l=new da,N=x();V(h.addClass)&&(h.addClass=h.addClass.join(" "));h.addClass&&!B(h.addClass)&&(h.addClass=null);V(h.removeClass)&&(h.removeClass=h.removeClass.join(" "));h.removeClass&&!B(h.removeClass)&&(h.removeClass=null);h.from&&!ra(h.from)&&(h.from=null);h.to&&!ra(h.to)&&(h.to=null);if(!(f&&q&&Ya(q,k,w)&&D(q,h)))return H(),l;var v=0<=["enter","move","leave"].indexOf(k),u=
L(),J=u||ga.get(q);w=!J&&y.get(q)||{};var E=!!w.state;J||E&&1===w.state||(J=!K(q,na,k));if(J)return u&&p(l,k,"start"),H(),u&&p(l,k,"close"),l;v&&ta(q);u={structural:v,element:e,event:k,addClass:h.addClass,removeClass:h.removeClass,close:H,options:h,runner:l};if(E){if(d("skip",u,w)){if(2===w.state)return H(),l;T(e,w,u);return w.runner}if(d("cancel",u,w))if(2===w.state)w.runner.end();else if(w.structural)w.close();else return T(e,w,u),w.runner;else if(d("join",u,w))if(2===w.state)T(e,u,{});else return Ua(e,
v?k:null,h),k=u.event=w.event,h=T(e,w,u),w.runner}else T(e,u,{});(E=u.structural)||(E="animate"===u.event&&0<Object.keys(u.options.to||{}).length||g(u));if(!E)return H(),n(q),l;var m=(w.counter||0)+1;u.counter=m;F(q,1,u);c.$$postDigest(function(){e=Ga(a);var b=y.get(q),c=!b,b=b||{},f=0<(e.parent()||[]).length&&("animate"===b.event||b.structural||g(b));if(c||b.counter!==m||!f){c&&(Oa(e,h),ha(e,h));if(c||v&&b.event!==k)h.domOperation(),l.end();f||n(q)}else k=!b.structural&&g(b,!0)?"setClass":b.event,
F(q,2),b=sa(e,k,b.options),l.setHost(b),p(l,k,"start",{}),b.done(function(a){H(!a);(a=y.get(q))&&a.counter===m&&n(q);p(l,k,"close",{})})});return l}function ta(a){a=a.querySelectorAll("[data-ng-animate]");t(a,function(a){var b=parseInt(a.getAttribute("data-ng-animate"),10),c=y.get(a);if(c)switch(b){case 2:c.runner.end();case 1:y.delete(a)}})}function n(a){a.removeAttribute("data-ng-animate");y.delete(a)}function K(a,b,c){c=l[0].body;var f=I(e),d=a===c||"HTML"===a.nodeName,k=a===f,h=!1,q=ga.get(a),
C;for((a=z.data(a,"$ngAnimatePin"))&&(b=I(a));b;){k||(k=b===f);if(1!==b.nodeType)break;a=y.get(b)||{};if(!h){var p=ga.get(b);if(!0===p&&!1!==q){q=!0;break}else!1===p&&(q=!1);h=a.structural}if(P(C)||!0===C)a=z.data(b,"$$ngAnimateChildren"),ya(a)&&(C=a);if(h&&!1===C)break;d||(d=b===c);if(d&&k)break;if(!k&&(a=z.data(b,"$ngAnimatePin"))){b=I(a);continue}b=b.parentNode}return(!h||C)&&!0!==q&&k&&d}function F(a,b,c){c=c||{};c.state=b;a.setAttribute("data-ng-animate",b);c=(b=y.get(a))?va(b,c):c;y.set(a,c)}
var y=new J,ga=new J,f=null,q=c.$watch(function(){return 0===v.totalPendingRequests},function(a){a&&(q(),c.$$postDigest(function(){c.$$postDigest(function(){null===f&&(f=!0)})}))}),k=Object.create(null);J=a.customFilter();var na=a.classNameFilter();h=function(){return!0};var Ya=J||h,D=na?function(a,b){var c=[a.getAttribute("class"),b.addClass,b.removeClass].join(" ");return na.test(c)}:h,Oa=X(E),u=S.Node.prototype.contains||function(a){return this===a||!!(this.compareDocumentPosition(a)&16)},ba={on:function(a,
b,c){var f=ua(b);k[a]=k[a]||[];k[a].push({node:f,callback:c});z(b).on("$destroy",function(){y.get(f)||ba.off(a,b,c)})},off:function(a,b,c){if(1!==arguments.length||B(arguments[0])){var f=k[a];f&&(k[a]=1===arguments.length?null:H(f,b,c))}else for(f in b=arguments[0],k)k[f]=H(k[f],b)},pin:function(a,b){Ea(Z(a),"element","not an element");Ea(Z(b),"parentElement","not an element");a.data("$ngAnimatePin",b)},push:function(a,b,c,f){c=c||{};c.domOperation=f;return p(a,b,c)},enabled:function(a,b){var c=arguments.length;
if(0===c)b=!!f;else if(Z(a)){var d=I(a);1===c?b=!ga.get(d):ga.set(d,!b)}else b=f=!!a;return b}};return ba}]}]).provider("$$animation",["$animateProvider",function(a){var b=this.drivers=[];this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$Map","$$rAFScheduler",function(a,d,g,e,r,G){function N(a){function b(a){if(a.processed)return a;a.processed=!0;var d=a.domNode,e=d.parentNode;h.set(d,a);for(var p;e;){if(p=h.get(e)){p.processed||(p=b(p));break}e=e.parentNode}(p||c).children.push(a);
return a}var c={children:[]},d,h=new r;for(d=0;d<a.length;d++){var e=a[d];h.set(e.domNode,a[d]={domNode:e.domNode,fn:e.fn,children:[]})}for(d=0;d<a.length;d++)b(a[d]);return function(a){var b=[],c=[],d;for(d=0;d<a.children.length;d++)c.push(a.children[d]);a=c.length;var h=0,e=[];for(d=0;d<c.length;d++){var g=c[d];0>=a&&(a=h,h=0,b.push(e),e=[]);e.push(g.fn);g.children.forEach(function(a){h++;c.push(a)});a--}e.length&&b.push(e);return b}(c)}var l=[],J=X(a);return function(r,m,v){function E(a){a=a.hasAttribute("ng-animate-ref")?
[a]:a.querySelectorAll("[ng-animate-ref]");var b=[];t(a,function(a){var c=a.getAttribute("ng-animate-ref");c&&c.length&&b.push(a)});return b}function h(a){var b=[],c={};t(a,function(a,d){var k=I(a.element),h=0<=["enter","move"].indexOf(a.event),k=a.structural?E(k):[];if(k.length){var e=h?"to":"from";t(k,function(a){var b=a.getAttribute("ng-animate-ref");c[b]=c[b]||{};c[b][e]={animationID:d,element:z(a)}})}else b.push(a)});var d={},h={};t(c,function(c,e){var g=c.from,q=c.to;if(g&&q){var C=a[g.animationID],
p=a[q.animationID],y=g.animationID.toString();if(!h[y]){var n=h[y]={structural:!0,beforeStart:function(){C.beforeStart();p.beforeStart()},close:function(){C.close();p.close()},classes:L(C.classes,p.classes),from:C,to:p,anchors:[]};n.classes.length?b.push(n):(b.push(C),b.push(p))}h[y].anchors.push({out:g.element,"in":q.element})}else g=g?g.animationID:q.animationID,q=g.toString(),d[q]||(d[q]=!0,b.push(a[g]))});return b}function L(a,b){a=a.split(" ");b=b.split(" ");for(var c=[],d=0;d<a.length;d++){var h=
a[d];if("ng-"!==h.substring(0,3))for(var e=0;e<b.length;e++)if(h===b[e]){c.push(h);break}}return c.join(" ")}function x(a){for(var c=b.length-1;0<=c;c--){var d=g.get(b[c])(a);if(d)return d}}function C(a,b){function c(a){(a=a.data("$$animationRunner"))&&a.setHost(b)}a.from&&a.to?(c(a.from.element),c(a.to.element)):c(a.element)}function H(){var a=r.data("$$animationRunner");!a||"leave"===m&&v.$$domOperationFired||a.end()}function p(b){r.off("$destroy",H);r.removeData("$$animationRunner");J(r,v);ha(r,
v);v.domOperation();F&&a.removeClass(r,F);r.removeClass("ng-animate");n.complete(!b)}v=oa(v);var ta=0<=["enter","move","leave"].indexOf(m),n=new e({end:function(){p()},cancel:function(){p(!0)}});if(!b.length)return p(),n;r.data("$$animationRunner",n);var K=Fa(r.attr("class"),Fa(v.addClass,v.removeClass)),F=v.tempClasses;F&&(K+=" "+F,v.tempClasses=null);var y;ta&&(y="ng-"+m+"-prepare",a.addClass(r,y));l.push({element:r,classes:K,event:m,structural:ta,options:v,beforeStart:function(){r.addClass("ng-animate");
F&&a.addClass(r,F);y&&(a.removeClass(r,y),y=null)},close:p});r.on("$destroy",H);if(1<l.length)return n;d.$$postDigest(function(){var a=[];t(l,function(b){b.element.data("$$animationRunner")?a.push(b):b.close()});l.length=0;var b=h(a),c=[];t(b,function(a){c.push({domNode:I(a.from?a.from.element:a.element),fn:function(){a.beforeStart();var b,c=a.close;if((a.anchors?a.from.element||a.to.element:a.element).data("$$animationRunner")){var d=x(a);d&&(b=d.start)}b?(b=b(),b.done(function(a){c(!a)}),C(a,b)):
c()}})});G(N(c))});return n}}]}]).provider("$animateCss