rails-angularjs 1.3.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +22 -0
- data/README.md +37 -0
- data/lib/rails-angularjs.rb +9 -0
- data/lib/rails-angularjs/engine.rb +4 -0
- data/lib/rails-angularjs/sprockets.rb +3 -0
- data/lib/rails-angularjs/version.rb +4 -0
- data/vendor/assets/javascripts/angularjs/angular-animate.js +2137 -0
- data/vendor/assets/javascripts/angularjs/angular-animate.min.js +33 -0
- data/vendor/assets/javascripts/angularjs/angular-aria.js +339 -0
- data/vendor/assets/javascripts/angularjs/angular-aria.min.js +12 -0
- data/vendor/assets/javascripts/angularjs/angular-cookies.js +206 -0
- data/vendor/assets/javascripts/angularjs/angular-cookies.min.js +8 -0
- data/vendor/assets/javascripts/angularjs/angular-loader.js +405 -0
- data/vendor/assets/javascripts/angularjs/angular-loader.min.js +9 -0
- data/vendor/assets/javascripts/angularjs/angular-messages.js +400 -0
- data/vendor/assets/javascripts/angularjs/angular-messages.min.js +10 -0
- data/vendor/assets/javascripts/angularjs/angular-mocks.js +2396 -0
- data/vendor/assets/javascripts/angularjs/angular-resource.js +667 -0
- data/vendor/assets/javascripts/angularjs/angular-resource.min.js +13 -0
- data/vendor/assets/javascripts/angularjs/angular-route.js +989 -0
- data/vendor/assets/javascripts/angularjs/angular-route.min.js +15 -0
- data/vendor/assets/javascripts/angularjs/angular-sanitize.js +680 -0
- data/vendor/assets/javascripts/angularjs/angular-sanitize.min.js +16 -0
- data/vendor/assets/javascripts/angularjs/angular-scenario.js +37499 -0
- data/vendor/assets/javascripts/angularjs/angular-touch.js +622 -0
- data/vendor/assets/javascripts/angularjs/angular-touch.min.js +13 -0
- data/vendor/assets/javascripts/angularjs/angular.js +26130 -0
- data/vendor/assets/javascripts/angularjs/angular.min.js +250 -0
- data/vendor/assets/javascripts/angularjs/unstable/angular-animate.js +2137 -0
- data/vendor/assets/javascripts/angularjs/unstable/angular-animate.min.js +33 -0
- data/vendor/assets/javascripts/angularjs/unstable/angular-aria.js +339 -0
- data/vendor/assets/javascripts/angularjs/unstable/angular-aria.min.js +12 -0
- data/vendor/assets/javascripts/angularjs/unstable/angular-cookies.js +206 -0
- data/vendor/assets/javascripts/angularjs/unstable/angular-cookies.min.js +8 -0
- data/vendor/assets/javascripts/angularjs/unstable/angular-loader.js +410 -0
- data/vendor/assets/javascripts/angularjs/unstable/angular-loader.min.js +9 -0
- data/vendor/assets/javascripts/angularjs/unstable/angular-messages.js +400 -0
- data/vendor/assets/javascripts/angularjs/unstable/angular-messages.min.js +10 -0
- data/vendor/assets/javascripts/angularjs/unstable/angular-mocks.js +2400 -0
- data/vendor/assets/javascripts/angularjs/unstable/angular-resource.js +667 -0
- data/vendor/assets/javascripts/angularjs/unstable/angular-resource.min.js +13 -0
- data/vendor/assets/javascripts/angularjs/unstable/angular-route.js +989 -0
- data/vendor/assets/javascripts/angularjs/unstable/angular-route.min.js +15 -0
- data/vendor/assets/javascripts/angularjs/unstable/angular-sanitize.js +682 -0
- data/vendor/assets/javascripts/angularjs/unstable/angular-sanitize.min.js +16 -0
- data/vendor/assets/javascripts/angularjs/unstable/angular-scenario.js +38463 -0
- data/vendor/assets/javascripts/angularjs/unstable/angular-touch.js +622 -0
- data/vendor/assets/javascripts/angularjs/unstable/angular-touch.min.js +13 -0
- data/vendor/assets/javascripts/angularjs/unstable/angular.js +27088 -0
- data/vendor/assets/javascripts/angularjs/unstable/angular.min.js +281 -0
- metadata +140 -0
@@ -0,0 +1,250 @@
|
|
1
|
+
/*
|
2
|
+
AngularJS v1.3.12
|
3
|
+
(c) 2010-2014 Google, Inc. http://angularjs.org
|
4
|
+
License: MIT
|
5
|
+
*/
|
6
|
+
(function(M,Y,t){'use strict';function S(b){return function(){var a=arguments[0],c;c="["+(b?b+":":"")+a+"] http://errors.angularjs.org/1.3.12/"+(b?b+"/":"")+a;for(a=1;a<arguments.length;a++){c=c+(1==a?"?":"&")+"p"+(a-1)+"=";var d=encodeURIComponent,e;e=arguments[a];e="function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof e?"undefined":"string"!=typeof e?JSON.stringify(e):e;c+=d(e)}return Error(c)}}function Ta(b){if(null==b||Ua(b))return!1;var a=b.length;return b.nodeType===
|
7
|
+
oa&&a?!0:F(b)||H(b)||0===a||"number"===typeof a&&0<a&&a-1 in b}function s(b,a,c){var d,e;if(b)if(G(b))for(d in b)"prototype"==d||"length"==d||"name"==d||b.hasOwnProperty&&!b.hasOwnProperty(d)||a.call(c,b[d],d,b);else if(H(b)||Ta(b)){var f="object"!==typeof b;d=0;for(e=b.length;d<e;d++)(f||d in b)&&a.call(c,b[d],d,b)}else if(b.forEach&&b.forEach!==s)b.forEach(a,c,b);else for(d in b)b.hasOwnProperty(d)&&a.call(c,b[d],d,b);return b}function Ed(b,a,c){for(var d=Object.keys(b).sort(),e=0;e<d.length;e++)a.call(c,
|
8
|
+
b[d[e]],d[e]);return d}function kc(b){return function(a,c){b(c,a)}}function Fd(){return++ob}function lc(b,a){a?b.$$hashKey=a:delete b.$$hashKey}function x(b){for(var a=b.$$hashKey,c=1,d=arguments.length;c<d;c++){var e=arguments[c];if(e)for(var f=Object.keys(e),g=0,h=f.length;g<h;g++){var l=f[g];b[l]=e[l]}}lc(b,a);return b}function ba(b){return parseInt(b,10)}function Ob(b,a){return x(Object.create(b),a)}function z(){}function pa(b){return b}function ea(b){return function(){return b}}function B(b){return"undefined"===
|
9
|
+
typeof b}function y(b){return"undefined"!==typeof b}function I(b){return null!==b&&"object"===typeof b}function F(b){return"string"===typeof b}function V(b){return"number"===typeof b}function qa(b){return"[object Date]"===Da.call(b)}function G(b){return"function"===typeof b}function pb(b){return"[object RegExp]"===Da.call(b)}function Ua(b){return b&&b.window===b}function Va(b){return b&&b.$evalAsync&&b.$watch}function Wa(b){return"boolean"===typeof b}function mc(b){return!(!b||!(b.nodeName||b.prop&&
|
10
|
+
b.attr&&b.find))}function Gd(b){var a={};b=b.split(",");var c;for(c=0;c<b.length;c++)a[b[c]]=!0;return a}function ua(b){return Q(b.nodeName||b[0]&&b[0].nodeName)}function Xa(b,a){var c=b.indexOf(a);0<=c&&b.splice(c,1);return a}function Ea(b,a,c,d){if(Ua(b)||Va(b))throw Ka("cpws");if(a){if(b===a)throw Ka("cpi");c=c||[];d=d||[];if(I(b)){var e=c.indexOf(b);if(-1!==e)return d[e];c.push(b);d.push(a)}if(H(b))for(var f=a.length=0;f<b.length;f++)e=Ea(b[f],null,c,d),I(b[f])&&(c.push(b[f]),d.push(e)),a.push(e);
|
11
|
+
else{var g=a.$$hashKey;H(a)?a.length=0:s(a,function(b,c){delete a[c]});for(f in b)b.hasOwnProperty(f)&&(e=Ea(b[f],null,c,d),I(b[f])&&(c.push(b[f]),d.push(e)),a[f]=e);lc(a,g)}}else if(a=b)H(b)?a=Ea(b,[],c,d):qa(b)?a=new Date(b.getTime()):pb(b)?(a=new RegExp(b.source,b.toString().match(/[^\/]*$/)[0]),a.lastIndex=b.lastIndex):I(b)&&(e=Object.create(Object.getPrototypeOf(b)),a=Ea(b,e,c,d));return a}function ra(b,a){if(H(b)){a=a||[];for(var c=0,d=b.length;c<d;c++)a[c]=b[c]}else if(I(b))for(c in a=a||{},
|
12
|
+
b)if("$"!==c.charAt(0)||"$"!==c.charAt(1))a[c]=b[c];return a||b}function ga(b,a){if(b===a)return!0;if(null===b||null===a)return!1;if(b!==b&&a!==a)return!0;var c=typeof b,d;if(c==typeof a&&"object"==c)if(H(b)){if(!H(a))return!1;if((c=b.length)==a.length){for(d=0;d<c;d++)if(!ga(b[d],a[d]))return!1;return!0}}else{if(qa(b))return qa(a)?ga(b.getTime(),a.getTime()):!1;if(pb(b)&&pb(a))return b.toString()==a.toString();if(Va(b)||Va(a)||Ua(b)||Ua(a)||H(a))return!1;c={};for(d in b)if("$"!==d.charAt(0)&&!G(b[d])){if(!ga(b[d],
|
13
|
+
a[d]))return!1;c[d]=!0}for(d in a)if(!c.hasOwnProperty(d)&&"$"!==d.charAt(0)&&a[d]!==t&&!G(a[d]))return!1;return!0}return!1}function Ya(b,a,c){return b.concat(Za.call(a,c))}function nc(b,a){var c=2<arguments.length?Za.call(arguments,2):[];return!G(a)||a instanceof RegExp?a:c.length?function(){return arguments.length?a.apply(b,Ya(c,arguments,0)):a.apply(b,c)}:function(){return arguments.length?a.apply(b,arguments):a.call(b)}}function Hd(b,a){var c=a;"string"===typeof b&&"$"===b.charAt(0)&&"$"===b.charAt(1)?
|
14
|
+
c=t:Ua(a)?c="$WINDOW":a&&Y===a?c="$DOCUMENT":Va(a)&&(c="$SCOPE");return c}function $a(b,a){if("undefined"===typeof b)return t;V(a)||(a=a?2:null);return JSON.stringify(b,Hd,a)}function oc(b){return F(b)?JSON.parse(b):b}function va(b){b=D(b).clone();try{b.empty()}catch(a){}var c=D("<div>").append(b).html();try{return b[0].nodeType===qb?Q(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+Q(b)})}catch(d){return Q(c)}}function pc(b){try{return decodeURIComponent(b)}catch(a){}}function qc(b){var a=
|
15
|
+
{},c,d;s((b||"").split("&"),function(b){b&&(c=b.replace(/\+/g,"%20").split("="),d=pc(c[0]),y(d)&&(b=y(c[1])?pc(c[1]):!0,rc.call(a,d)?H(a[d])?a[d].push(b):a[d]=[a[d],b]:a[d]=b))});return a}function Pb(b){var a=[];s(b,function(b,d){H(b)?s(b,function(b){a.push(Fa(d,!0)+(!0===b?"":"="+Fa(b,!0)))}):a.push(Fa(d,!0)+(!0===b?"":"="+Fa(b,!0)))});return a.length?a.join("&"):""}function rb(b){return Fa(b,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Fa(b,a){return encodeURIComponent(b).replace(/%40/gi,
|
16
|
+
"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,a?"%20":"+")}function Id(b,a){var c,d,e=sb.length;b=D(b);for(d=0;d<e;++d)if(c=sb[d]+a,F(c=b.attr(c)))return c;return null}function Jd(b,a){var c,d,e={};s(sb,function(a){a+="app";!c&&b.hasAttribute&&b.hasAttribute(a)&&(c=b,d=b.getAttribute(a))});s(sb,function(a){a+="app";var e;!c&&(e=b.querySelector("["+a.replace(":","\\:")+"]"))&&(c=e,d=e.getAttribute(a))});c&&(e.strictDi=null!==Id(c,"strict-di"),
|
17
|
+
a(c,d?[d]:[],e))}function sc(b,a,c){I(c)||(c={});c=x({strictDi:!1},c);var d=function(){b=D(b);if(b.injector()){var d=b[0]===Y?"document":va(b);throw Ka("btstrpd",d.replace(/</,"<").replace(/>/,">"));}a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);c.debugInfoEnabled&&a.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]);a.unshift("ng");d=ab(a,c.strictDi);d.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",
|
18
|
+
d);c(b)(a)})}]);return d},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;M&&e.test(M.name)&&(c.debugInfoEnabled=!0,M.name=M.name.replace(e,""));if(M&&!f.test(M.name))return d();M.name=M.name.replace(f,"");ca.resumeBootstrap=function(b){s(b,function(b){a.push(b)});return d()};G(ca.resumeDeferredBootstrap)&&ca.resumeDeferredBootstrap()}function Kd(){M.name="NG_ENABLE_DEBUG_INFO!"+M.name;M.location.reload()}function Ld(b){b=ca.element(b).injector();if(!b)throw Ka("test");return b.get("$$testability")}
|
19
|
+
function tc(b,a){a=a||"_";return b.replace(Md,function(b,d){return(d?a:"")+b.toLowerCase()})}function Nd(){var b;uc||((sa=M.jQuery)&&sa.fn.on?(D=sa,x(sa.fn,{scope:La.scope,isolateScope:La.isolateScope,controller:La.controller,injector:La.injector,inheritedData:La.inheritedData}),b=sa.cleanData,sa.cleanData=function(a){var c;if(Qb)Qb=!1;else for(var d=0,e;null!=(e=a[d]);d++)(c=sa._data(e,"events"))&&c.$destroy&&sa(e).triggerHandler("$destroy");b(a)}):D=R,ca.element=D,uc=!0)}function Rb(b,a,c){if(!b)throw Ka("areq",
|
20
|
+
a||"?",c||"required");return b}function tb(b,a,c){c&&H(b)&&(b=b[b.length-1]);Rb(G(b),a,"not a function, got "+(b&&"object"===typeof b?b.constructor.name||"Object":typeof b));return b}function Ma(b,a){if("hasOwnProperty"===b)throw Ka("badname",a);}function vc(b,a,c){if(!a)return b;a=a.split(".");for(var d,e=b,f=a.length,g=0;g<f;g++)d=a[g],b&&(b=(e=b)[d]);return!c&&G(b)?nc(e,b):b}function ub(b){var a=b[0];b=b[b.length-1];var c=[a];do{a=a.nextSibling;if(!a)break;c.push(a)}while(a!==b);return D(c)}function ha(){return Object.create(null)}
|
21
|
+
function Od(b){function a(a,b,c){return a[b]||(a[b]=c())}var c=S("$injector"),d=S("ng");b=a(b,"angular",Object);b.$$minErr=b.$$minErr||S;return a(b,"module",function(){var b={};return function(f,g,h){if("hasOwnProperty"===f)throw d("badname","module");g&&b.hasOwnProperty(f)&&(b[f]=null);return a(b,f,function(){function a(c,d,e,f){f||(f=b);return function(){f[e||"push"]([c,d,arguments]);return u}}if(!g)throw c("nomod",f);var b=[],d=[],e=[],q=a("$injector","invoke","push",d),u={_invokeQueue:b,_configBlocks:d,
|
22
|
+
_runBlocks:e,requires:g,name:f,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),animation:a("$animateProvider","register"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:q,run:function(a){e.push(a);return this}};h&&q(h);return u})}})}function Pd(b){x(b,{bootstrap:sc,copy:Ea,extend:x,equals:ga,
|
23
|
+
element:D,forEach:s,injector:ab,noop:z,bind:nc,toJson:$a,fromJson:oc,identity:pa,isUndefined:B,isDefined:y,isString:F,isFunction:G,isObject:I,isNumber:V,isElement:mc,isArray:H,version:Qd,isDate:qa,lowercase:Q,uppercase:vb,callbacks:{counter:0},getTestability:Ld,$$minErr:S,$$csp:bb,reloadWithDebugInfo:Kd});cb=Od(M);try{cb("ngLocale")}catch(a){cb("ngLocale",[]).provider("$locale",Rd)}cb("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:Sd});a.provider("$compile",wc).directive({a:Td,
|
24
|
+
input:xc,textarea:xc,form:Ud,script:Vd,select:Wd,style:Xd,option:Yd,ngBind:Zd,ngBindHtml:$d,ngBindTemplate:ae,ngClass:be,ngClassEven:ce,ngClassOdd:de,ngCloak:ee,ngController:fe,ngForm:ge,ngHide:he,ngIf:ie,ngInclude:je,ngInit:ke,ngNonBindable:le,ngPluralize:me,ngRepeat:ne,ngShow:oe,ngStyle:pe,ngSwitch:qe,ngSwitchWhen:re,ngSwitchDefault:se,ngOptions:te,ngTransclude:ue,ngModel:ve,ngList:we,ngChange:xe,pattern:yc,ngPattern:yc,required:zc,ngRequired:zc,minlength:Ac,ngMinlength:Ac,maxlength:Bc,ngMaxlength:Bc,
|
25
|
+
ngValue:ye,ngModelOptions:ze}).directive({ngInclude:Ae}).directive(wb).directive(Cc);a.provider({$anchorScroll:Be,$animate:Ce,$browser:De,$cacheFactory:Ee,$controller:Fe,$document:Ge,$exceptionHandler:He,$filter:Dc,$interpolate:Ie,$interval:Je,$http:Ke,$httpBackend:Le,$location:Me,$log:Ne,$parse:Oe,$rootScope:Pe,$q:Qe,$$q:Re,$sce:Se,$sceDelegate:Te,$sniffer:Ue,$templateCache:Ve,$templateRequest:We,$$testability:Xe,$timeout:Ye,$window:Ze,$$rAF:$e,$$asyncCallback:af,$$jqLite:bf})}])}function db(b){return b.replace(cf,
|
26
|
+
function(a,b,d,e){return e?d.toUpperCase():d}).replace(df,"Moz$1")}function Ec(b){b=b.nodeType;return b===oa||!b||9===b}function Fc(b,a){var c,d,e=a.createDocumentFragment(),f=[];if(Sb.test(b)){c=c||e.appendChild(a.createElement("div"));d=(ef.exec(b)||["",""])[1].toLowerCase();d=ia[d]||ia._default;c.innerHTML=d[1]+b.replace(ff,"<$1></$2>")+d[2];for(d=d[0];d--;)c=c.lastChild;f=Ya(f,c.childNodes);c=e.firstChild;c.textContent=""}else f.push(a.createTextNode(b));e.textContent="";e.innerHTML="";s(f,function(a){e.appendChild(a)});
|
27
|
+
return e}function R(b){if(b instanceof R)return b;var a;F(b)&&(b=U(b),a=!0);if(!(this instanceof R)){if(a&&"<"!=b.charAt(0))throw Tb("nosel");return new R(b)}if(a){a=Y;var c;b=(c=gf.exec(b))?[a.createElement(c[1])]:(c=Fc(b,a))?c.childNodes:[]}Gc(this,b)}function Ub(b){return b.cloneNode(!0)}function xb(b,a){a||yb(b);if(b.querySelectorAll)for(var c=b.querySelectorAll("*"),d=0,e=c.length;d<e;d++)yb(c[d])}function Hc(b,a,c,d){if(y(d))throw Tb("offargs");var e=(d=zb(b))&&d.events,f=d&&d.handle;if(f)if(a)s(a.split(" "),
|
28
|
+
function(a){if(y(c)){var d=e[a];Xa(d||[],c);if(d&&0<d.length)return}b.removeEventListener(a,f,!1);delete e[a]});else for(a in e)"$destroy"!==a&&b.removeEventListener(a,f,!1),delete e[a]}function yb(b,a){var c=b.ng339,d=c&&Ab[c];d&&(a?delete d.data[a]:(d.handle&&(d.events.$destroy&&d.handle({},"$destroy"),Hc(b)),delete Ab[c],b.ng339=t))}function zb(b,a){var c=b.ng339,c=c&&Ab[c];a&&!c&&(b.ng339=c=++hf,c=Ab[c]={events:{},data:{},handle:t});return c}function Vb(b,a,c){if(Ec(b)){var d=y(c),e=!d&&a&&!I(a),
|
29
|
+
f=!a;b=(b=zb(b,!e))&&b.data;if(d)b[a]=c;else{if(f)return b;if(e)return b&&b[a];x(b,a)}}}function Bb(b,a){return b.getAttribute?-1<(" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+a+" "):!1}function Cb(b,a){a&&b.setAttribute&&s(a.split(" "),function(a){b.setAttribute("class",U((" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+U(a)+" "," ")))})}function Db(b,a){if(a&&b.setAttribute){var c=(" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");
|
30
|
+
s(a.split(" "),function(a){a=U(a);-1===c.indexOf(" "+a+" ")&&(c+=a+" ")});b.setAttribute("class",U(c))}}function Gc(b,a){if(a)if(a.nodeType)b[b.length++]=a;else{var c=a.length;if("number"===typeof c&&a.window!==a){if(c)for(var d=0;d<c;d++)b[b.length++]=a[d]}else b[b.length++]=a}}function Ic(b,a){return Eb(b,"$"+(a||"ngController")+"Controller")}function Eb(b,a,c){9==b.nodeType&&(b=b.documentElement);for(a=H(a)?a:[a];b;){for(var d=0,e=a.length;d<e;d++)if((c=D.data(b,a[d]))!==t)return c;b=b.parentNode||
|
31
|
+
11===b.nodeType&&b.host}}function Jc(b){for(xb(b,!0);b.firstChild;)b.removeChild(b.firstChild)}function Kc(b,a){a||xb(b);var c=b.parentNode;c&&c.removeChild(b)}function jf(b,a){a=a||M;if("complete"===a.document.readyState)a.setTimeout(b);else D(a).on("load",b)}function Lc(b,a){var c=Fb[a.toLowerCase()];return c&&Mc[ua(b)]&&c}function kf(b,a){var c=b.nodeName;return("INPUT"===c||"TEXTAREA"===c)&&Nc[a]}function lf(b,a){var c=function(c,e){c.isDefaultPrevented=function(){return c.defaultPrevented};var f=
|
32
|
+
a[e||c.type],g=f?f.length:0;if(g){if(B(c.immediatePropagationStopped)){var h=c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0;c.stopPropagation&&c.stopPropagation();h&&h.call(c)}}c.isImmediatePropagationStopped=function(){return!0===c.immediatePropagationStopped};1<g&&(f=ra(f));for(var l=0;l<g;l++)c.isImmediatePropagationStopped()||f[l].call(b,c)}};c.elem=b;return c}function bf(){this.$get=function(){return x(R,{hasClass:function(b,a){b.attr&&(b=b[0]);
|
33
|
+
return Bb(b,a)},addClass:function(b,a){b.attr&&(b=b[0]);return Db(b,a)},removeClass:function(b,a){b.attr&&(b=b[0]);return Cb(b,a)}})}}function Na(b,a){var c=b&&b.$$hashKey;if(c)return"function"===typeof c&&(c=b.$$hashKey()),c;c=typeof b;return c="function"==c||"object"==c&&null!==b?b.$$hashKey=c+":"+(a||Fd)():c+":"+b}function eb(b,a){if(a){var c=0;this.nextUid=function(){return++c}}s(b,this.put,this)}function mf(b){return(b=b.toString().replace(Oc,"").match(Pc))?"function("+(b[1]||"").replace(/[\s\r\n]+/,
|
34
|
+
" ")+")":"fn"}function ab(b,a){function c(a){return function(b,c){if(I(b))s(b,kc(a));else return a(b,c)}}function d(a,b){Ma(a,"service");if(G(b)||H(b))b=q.instantiate(b);if(!b.$get)throw Ga("pget",a);return n[a+"Provider"]=b}function e(a,b){return function(){var c=r.invoke(b,this);if(B(c))throw Ga("undef",a);return c}}function f(a,b,c){return d(a,{$get:!1!==c?e(a,b):b})}function g(a){var b=[],c;s(a,function(a){function d(a){var b,c;b=0;for(c=a.length;b<c;b++){var e=a[b],f=q.get(e[0]);f[e[1]].apply(f,
|
35
|
+
e[2])}}if(!m.get(a)){m.put(a,!0);try{F(a)?(c=cb(a),b=b.concat(g(c.requires)).concat(c._runBlocks),d(c._invokeQueue),d(c._configBlocks)):G(a)?b.push(q.invoke(a)):H(a)?b.push(q.invoke(a)):tb(a,"module")}catch(e){throw H(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Ga("modulerr",a,e.stack||e.message||e);}}});return b}function h(b,c){function d(a,e){if(b.hasOwnProperty(a)){if(b[a]===l)throw Ga("cdep",a+" <- "+k.join(" <- "));return b[a]}try{return k.unshift(a),
|
36
|
+
b[a]=l,b[a]=c(a,e)}catch(f){throw b[a]===l&&delete b[a],f;}finally{k.shift()}}function e(b,c,f,g){"string"===typeof f&&(g=f,f=null);var h=[],k=ab.$$annotate(b,a,g),l,q,n;q=0;for(l=k.length;q<l;q++){n=k[q];if("string"!==typeof n)throw Ga("itkn",n);h.push(f&&f.hasOwnProperty(n)?f[n]:d(n,g))}H(b)&&(b=b[l]);return b.apply(c,h)}return{invoke:e,instantiate:function(a,b,c){var d=Object.create((H(a)?a[a.length-1]:a).prototype||null);a=e(a,d,b,c);return I(a)||G(a)?a:d},get:d,annotate:ab.$$annotate,has:function(a){return n.hasOwnProperty(a+
|
37
|
+
"Provider")||b.hasOwnProperty(a)}}}a=!0===a;var l={},k=[],m=new eb([],!0),n={$provide:{provider:c(d),factory:c(f),service:c(function(a,b){return f(a,["$injector",function(a){return a.instantiate(b)}])}),value:c(function(a,b){return f(a,ea(b),!1)}),constant:c(function(a,b){Ma(a,"constant");n[a]=b;u[a]=b}),decorator:function(a,b){var c=q.get(a+"Provider"),d=c.$get;c.$get=function(){var a=r.invoke(d,c);return r.invoke(b,null,{$delegate:a})}}}},q=n.$injector=h(n,function(a,b){ca.isString(b)&&k.push(b);
|
38
|
+
throw Ga("unpr",k.join(" <- "));}),u={},r=u.$injector=h(u,function(a,b){var c=q.get(a+"Provider",b);return r.invoke(c.$get,c,t,a)});s(g(b),function(a){r.invoke(a||z)});return r}function Be(){var b=!0;this.disableAutoScrolling=function(){b=!1};this.$get=["$window","$location","$rootScope",function(a,c,d){function e(a){var b=null;Array.prototype.some.call(a,function(a){if("a"===ua(a))return b=a,!0});return b}function f(b){if(b){b.scrollIntoView();var c;c=g.yOffset;G(c)?c=c():mc(c)?(c=c[0],c="fixed"!==
|
39
|
+
a.getComputedStyle(c).position?0:c.getBoundingClientRect().bottom):V(c)||(c=0);c&&(b=b.getBoundingClientRect().top,a.scrollBy(0,b-c))}else a.scrollTo(0,0)}function g(){var a=c.hash(),b;a?(b=h.getElementById(a))?f(b):(b=e(h.getElementsByName(a)))?f(b):"top"===a&&f(null):f(null)}var h=a.document;b&&d.$watch(function(){return c.hash()},function(a,b){a===b&&""===a||jf(function(){d.$evalAsync(g)})});return g}]}function af(){this.$get=["$$rAF","$timeout",function(b,a){return b.supported?function(a){return b(a)}:
|
40
|
+
function(b){return a(b,0,!1)}}]}function nf(b,a,c,d){function e(a){try{a.apply(null,Za.call(arguments,1))}finally{if(v--,0===v)for(;w.length;)try{w.pop()()}catch(b){c.error(b)}}}function f(a,b){(function N(){s(L,function(a){a()});C=b(N,a)})()}function g(){h();l()}function h(){A=b.history.state;A=B(A)?null:A;ga(A,J)&&(A=J);J=A}function l(){if(E!==m.url()||O!==A)E=m.url(),O=A,s(W,function(a){a(m.url(),A)})}function k(a){try{return decodeURIComponent(a)}catch(b){return a}}var m=this,n=a[0],q=b.location,
|
41
|
+
u=b.history,r=b.setTimeout,P=b.clearTimeout,p={};m.isMock=!1;var v=0,w=[];m.$$completeOutstandingRequest=e;m.$$incOutstandingRequestCount=function(){v++};m.notifyWhenNoOutstandingRequests=function(a){s(L,function(a){a()});0===v?a():w.push(a)};var L=[],C;m.addPollFn=function(a){B(C)&&f(100,r);L.push(a);return a};var A,O,E=q.href,T=a.find("base"),X=null;h();O=A;m.url=function(a,c,e){B(e)&&(e=null);q!==b.location&&(q=b.location);u!==b.history&&(u=b.history);if(a){var f=O===e;if(E===a&&(!d.history||f))return m;
|
42
|
+
var g=E&&Ha(E)===Ha(a);E=a;O=e;!d.history||g&&f?(g||(X=a),c?q.replace(a):g?(c=q,e=a.indexOf("#"),a=-1===e?"":a.substr(e+1),c.hash=a):q.href=a):(u[c?"replaceState":"pushState"](e,"",a),h(),O=A);return m}return X||q.href.replace(/%27/g,"'")};m.state=function(){return A};var W=[],wa=!1,J=null;m.onUrlChange=function(a){if(!wa){if(d.history)D(b).on("popstate",g);D(b).on("hashchange",g);wa=!0}W.push(a);return a};m.$$checkUrlChange=l;m.baseHref=function(){var a=T.attr("href");return a?a.replace(/^(https?\:)?\/\/[^\/]*/,
|
43
|
+
""):""};var fa={},y="",da=m.baseHref();m.cookies=function(a,b){var d,e,f,g;if(a)b===t?n.cookie=encodeURIComponent(a)+"=;path="+da+";expires=Thu, 01 Jan 1970 00:00:00 GMT":F(b)&&(d=(n.cookie=encodeURIComponent(a)+"="+encodeURIComponent(b)+";path="+da).length+1,4096<d&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+d+" > 4096 bytes)!"));else{if(n.cookie!==y)for(y=n.cookie,d=y.split("; "),fa={},f=0;f<d.length;f++)e=d[f],g=e.indexOf("="),0<g&&(a=k(e.substring(0,g)),
|
44
|
+
fa[a]===t&&(fa[a]=k(e.substring(g+1))));return fa}};m.defer=function(a,b){var c;v++;c=r(function(){delete p[c];e(a)},b||0);p[c]=!0;return c};m.defer.cancel=function(a){return p[a]?(delete p[a],P(a),e(z),!0):!1}}function De(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new nf(b,d,a,c)}]}function Ee(){this.$get=function(){function b(b,d){function e(a){a!=n&&(q?q==a&&(q=a.n):q=a,f(a.n,a.p),f(a,n),n=a,n.n=null)}function f(a,b){a!=b&&(a&&(a.p=b),b&&(b.n=a))}if(b in a)throw S("$cacheFactory")("iid",
|
45
|
+
b);var g=0,h=x({},d,{id:b}),l={},k=d&&d.capacity||Number.MAX_VALUE,m={},n=null,q=null;return a[b]={put:function(a,b){if(k<Number.MAX_VALUE){var c=m[a]||(m[a]={key:a});e(c)}if(!B(b))return a in l||g++,l[a]=b,g>k&&this.remove(q.key),b},get:function(a){if(k<Number.MAX_VALUE){var b=m[a];if(!b)return;e(b)}return l[a]},remove:function(a){if(k<Number.MAX_VALUE){var b=m[a];if(!b)return;b==n&&(n=b.p);b==q&&(q=b.n);f(b.n,b.p);delete m[a]}delete l[a];g--},removeAll:function(){l={};g=0;m={};n=q=null},destroy:function(){m=
|
46
|
+
h=l=null;delete a[b]},info:function(){return x({},h,{size:g})}}}var a={};b.info=function(){var b={};s(a,function(a,e){b[e]=a.info()});return b};b.get=function(b){return a[b]};return b}}function Ve(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function wc(b,a){function c(a,b){var c=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,d={};s(a,function(a,e){var f=a.match(c);if(!f)throw ja("iscp",b,e,a);d[e]={mode:f[1][0],collection:"*"===f[2],optional:"?"===f[3],attrName:f[4]||e}});return d}var d=
|
47
|
+
{},e=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,f=/(([\w\-]+)(?:\:([^;]+))?;?)/,g=Gd("ngSrc,ngSrcset,src,srcset"),h=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,l=/^(on[a-z]+|formaction)$/;this.directive=function n(a,e){Ma(a,"directive");F(a)?(Rb(e,"directiveFactory"),d.hasOwnProperty(a)||(d[a]=[],b.factory(a+"Directive",["$injector","$exceptionHandler",function(b,e){var f=[];s(d[a],function(d,g){try{var h=b.invoke(d);G(h)?h={compile:ea(h)}:!h.compile&&h.link&&(h.compile=ea(h.link));h.priority=h.priority||0;h.index=
|
48
|
+
g;h.name=h.name||a;h.require=h.require||h.controller&&h.name;h.restrict=h.restrict||"EA";I(h.scope)&&(h.$$isolateBindings=c(h.scope,h.name));f.push(h)}catch(l){e(l)}});return f}])),d[a].push(e)):s(a,kc(n));return this};this.aHrefSanitizationWhitelist=function(b){return y(b)?(a.aHrefSanitizationWhitelist(b),this):a.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(b){return y(b)?(a.imgSrcSanitizationWhitelist(b),this):a.imgSrcSanitizationWhitelist()};var k=!0;this.debugInfoEnabled=
|
49
|
+
function(a){return y(a)?(k=a,this):k};this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(a,b,c,r,P,p,v,w,L,C,A){function O(a,b){try{a.addClass(b)}catch(c){}}function E(a,b,c,d,e){a instanceof D||(a=D(a));s(a,function(b,c){b.nodeType==qb&&b.nodeValue.match(/\S+/)&&(a[c]=D(b).wrap("<span></span>").parent()[0])});var f=T(a,b,a,c,d,e);E.$$addScopeClass(a);var g=null;return function(b,c,
|
50
|
+
d){Rb(b,"scope");d=d||{};var e=d.parentBoundTranscludeFn,h=d.transcludeControllers;d=d.futureParentElement;e&&e.$$boundTransclude&&(e=e.$$boundTransclude);g||(g=(d=d&&d[0])?"foreignobject"!==ua(d)&&d.toString().match(/SVG/)?"svg":"html":"html");d="html"!==g?D(Wb(g,D("<div>").append(a).html())):c?La.clone.call(a):a;if(h)for(var l in h)d.data("$"+l+"Controller",h[l].instance);E.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,e);return d}}function T(a,b,c,d,e,f){function g(a,c,d,e){var f,l,k,q,n,p,w;if(r)for(w=
|
51
|
+
Array(c.length),q=0;q<h.length;q+=3)f=h[q],w[f]=c[f];else w=c;q=0;for(n=h.length;q<n;)l=w[h[q++]],c=h[q++],f=h[q++],c?(c.scope?(k=a.$new(),E.$$addScopeInfo(D(l),k)):k=a,p=c.transcludeOnThisElement?X(a,c.transclude,e,c.elementTranscludeOnThisElement):!c.templateOnThisElement&&e?e:!e&&b?X(a,b):null,c(f,k,l,d,p)):f&&f(a,l.childNodes,t,e)}for(var h=[],l,k,q,n,r,p=0;p<a.length;p++){l=new Xb;k=W(a[p],[],l,0===p?d:t,e);(f=k.length?fa(k,a[p],l,b,c,null,[],[],f):null)&&f.scope&&E.$$addScopeClass(l.$$element);
|
52
|
+
l=f&&f.terminal||!(q=a[p].childNodes)||!q.length?null:T(q,f?(f.transcludeOnThisElement||!f.templateOnThisElement)&&f.transclude:b);if(f||l)h.push(p,f,l),n=!0,r=r||f;f=null}return n?g:null}function X(a,b,c,d){return function(d,e,f,g,h){d||(d=a.$new(!1,h),d.$$transcluded=!0);return b(d,e,{parentBoundTranscludeFn:c,transcludeControllers:f,futureParentElement:g})}}function W(a,b,c,d,g){var h=c.$attr,l;switch(a.nodeType){case oa:da(b,ya(ua(a)),"E",d,g);for(var k,q,n,r=a.attributes,p=0,w=r&&r.length;p<
|
53
|
+
w;p++){var P=!1,L=!1;k=r[p];l=k.name;q=U(k.value);k=ya(l);if(n=gb.test(k))l=l.replace(Rc,"").substr(8).replace(/_(.)/g,function(a,b){return b.toUpperCase()});var u=k.replace(/(Start|End)$/,"");B(u)&&k===u+"Start"&&(P=l,L=l.substr(0,l.length-5)+"end",l=l.substr(0,l.length-6));k=ya(l.toLowerCase());h[k]=l;if(n||!c.hasOwnProperty(k))c[k]=q,Lc(a,k)&&(c[k]=!0);Pa(a,b,q,k,n);da(b,k,"A",d,g,P,L)}a=a.className;I(a)&&(a=a.animVal);if(F(a)&&""!==a)for(;l=f.exec(a);)k=ya(l[2]),da(b,k,"C",d,g)&&(c[k]=U(l[3])),
|
54
|
+
a=a.substr(l.index+l[0].length);break;case qb:M(b,a.nodeValue);break;case 8:try{if(l=e.exec(a.nodeValue))k=ya(l[1]),da(b,k,"M",d,g)&&(c[k]=U(l[2]))}catch(v){}}b.sort(N);return b}function wa(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw ja("uterdir",b,c);a.nodeType==oa&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return D(d)}function J(a,b,c){return function(d,e,f,g,h){e=wa(e[0],b,c);return a(d,e,f,g,h)}}function fa(a,
|
55
|
+
d,e,f,g,l,k,n,r){function w(a,b,c,d){if(a){c&&(a=J(a,c,d));a.require=K.require;a.directiveName=x;if(T===K||K.$$isolateScope)a=Z(a,{isolateScope:!0});k.push(a)}if(b){c&&(b=J(b,c,d));b.require=K.require;b.directiveName=x;if(T===K||K.$$isolateScope)b=Z(b,{isolateScope:!0});n.push(b)}}function L(a,b,c,d){var e,f="data",g=!1,l=c,k;if(F(b)){k=b.match(h);b=b.substring(k[0].length);k[3]&&(k[1]?k[3]=null:k[1]=k[3]);"^"===k[1]?f="inheritedData":"^^"===k[1]&&(f="inheritedData",l=c.parent());"?"===k[2]&&(g=!0);
|
56
|
+
e=null;d&&"data"===f&&(e=d[b])&&(e=e.instance);e=e||l[f]("$"+b+"Controller");if(!e&&!g)throw ja("ctreq",b,a);return e||null}H(b)&&(e=[],s(b,function(b){e.push(L(a,b,c,d))}));return e}function v(a,c,f,g,h){function l(a,b,c){var d;Va(a)||(c=b,b=a,a=t);z&&(d=O);c||(c=z?W.parent():W);return h(a,b,d,c,wa)}var r,w,u,A,O,fb,W,J;d===f?(J=e,W=e.$$element):(W=D(f),J=new Xb(W,e));T&&(A=c.$new(!0));h&&(fb=l,fb.$$boundTransclude=h);C&&(X={},O={},s(C,function(a){var b={$scope:a===T||a.$$isolateScope?A:c,$element:W,
|
57
|
+
$attrs:J,$transclude:fb};u=a.controller;"@"==u&&(u=J[a.name]);b=p(u,b,!0,a.controllerAs);O[a.name]=b;z||W.data("$"+a.name+"Controller",b.instance);X[a.name]=b}));if(T){E.$$addScopeInfo(W,A,!0,!(ka&&(ka===T||ka===T.$$originalDirective)));E.$$addScopeClass(W,!0);g=X&&X[T.name];var xa=A;g&&g.identifier&&!0===T.bindToController&&(xa=g.instance);s(A.$$isolateBindings=T.$$isolateBindings,function(a,d){var e=a.attrName,f=a.optional,g,h,l,k;switch(a.mode){case "@":J.$observe(e,function(a){xa[d]=a});J.$$observers[e].$$scope=
|
58
|
+
c;J[e]&&(xa[d]=b(J[e])(c));break;case "=":if(f&&!J[e])break;h=P(J[e]);k=h.literal?ga:function(a,b){return a===b||a!==a&&b!==b};l=h.assign||function(){g=xa[d]=h(c);throw ja("nonassign",J[e],T.name);};g=xa[d]=h(c);f=function(a){k(a,xa[d])||(k(a,g)?l(c,a=xa[d]):xa[d]=a);return g=a};f.$stateful=!0;f=a.collection?c.$watchCollection(J[e],f):c.$watch(P(J[e],f),null,h.literal);A.$on("$destroy",f);break;case "&":h=P(J[e]),xa[d]=function(a){return h(c,a)}}})}X&&(s(X,function(a){a()}),X=null);g=0;for(r=k.length;g<
|
59
|
+
r;g++)w=k[g],$(w,w.isolateScope?A:c,W,J,w.require&&L(w.directiveName,w.require,W,O),fb);var wa=c;T&&(T.template||null===T.templateUrl)&&(wa=A);a&&a(wa,f.childNodes,t,h);for(g=n.length-1;0<=g;g--)w=n[g],$(w,w.isolateScope?A:c,W,J,w.require&&L(w.directiveName,w.require,W,O),fb)}r=r||{};for(var A=-Number.MAX_VALUE,O,C=r.controllerDirectives,X,T=r.newIsolateScopeDirective,ka=r.templateDirective,fa=r.nonTlbTranscludeDirective,da=!1,B=!1,z=r.hasElementTranscludeDirective,aa=e.$$element=D(d),K,x,N,Aa=f,
|
60
|
+
Q,M=0,R=a.length;M<R;M++){K=a[M];var Pa=K.$$start,gb=K.$$end;Pa&&(aa=wa(d,Pa,gb));N=t;if(A>K.priority)break;if(N=K.scope)K.templateUrl||(I(N)?(Oa("new/isolated scope",T||O,K,aa),T=K):Oa("new/isolated scope",T,K,aa)),O=O||K;x=K.name;!K.templateUrl&&K.controller&&(N=K.controller,C=C||{},Oa("'"+x+"' controller",C[x],K,aa),C[x]=K);if(N=K.transclude)da=!0,K.$$tlb||(Oa("transclusion",fa,K,aa),fa=K),"element"==N?(z=!0,A=K.priority,N=aa,aa=e.$$element=D(Y.createComment(" "+x+": "+e[x]+" ")),d=aa[0],V(g,Za.call(N,
|
61
|
+
0),d),Aa=E(N,f,A,l&&l.name,{nonTlbTranscludeDirective:fa})):(N=D(Ub(d)).contents(),aa.empty(),Aa=E(N,f));if(K.template)if(B=!0,Oa("template",ka,K,aa),ka=K,N=G(K.template)?K.template(aa,e):K.template,N=Sc(N),K.replace){l=K;N=Sb.test(N)?Tc(Wb(K.templateNamespace,U(N))):[];d=N[0];if(1!=N.length||d.nodeType!==oa)throw ja("tplrt",x,"");V(g,aa,d);R={$attr:{}};N=W(d,[],R);var ba=a.splice(M+1,a.length-(M+1));T&&y(N);a=a.concat(N).concat(ba);Qc(e,R);R=a.length}else aa.html(N);if(K.templateUrl)B=!0,Oa("template",
|
62
|
+
ka,K,aa),ka=K,K.replace&&(l=K),v=S(a.splice(M,a.length-M),aa,e,g,da&&Aa,k,n,{controllerDirectives:C,newIsolateScopeDirective:T,templateDirective:ka,nonTlbTranscludeDirective:fa}),R=a.length;else if(K.compile)try{Q=K.compile(aa,e,Aa),G(Q)?w(null,Q,Pa,gb):Q&&w(Q.pre,Q.post,Pa,gb)}catch(of){c(of,va(aa))}K.terminal&&(v.terminal=!0,A=Math.max(A,K.priority))}v.scope=O&&!0===O.scope;v.transcludeOnThisElement=da;v.elementTranscludeOnThisElement=z;v.templateOnThisElement=B;v.transclude=Aa;r.hasElementTranscludeDirective=
|
63
|
+
z;return v}function y(a){for(var b=0,c=a.length;b<c;b++)a[b]=Ob(a[b],{$$isolateScope:!0})}function da(b,e,f,g,h,l,k){if(e===h)return null;h=null;if(d.hasOwnProperty(e)){var q;e=a.get(e+"Directive");for(var r=0,p=e.length;r<p;r++)try{q=e[r],(g===t||g>q.priority)&&-1!=q.restrict.indexOf(f)&&(l&&(q=Ob(q,{$$start:l,$$end:k})),b.push(q),h=q)}catch(w){c(w)}}return h}function B(b){if(d.hasOwnProperty(b))for(var c=a.get(b+"Directive"),e=0,f=c.length;e<f;e++)if(b=c[e],b.multiElement)return!0;return!1}function Qc(a,
|
64
|
+
b){var c=b.$attr,d=a.$attr,e=a.$$element;s(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});s(b,function(b,f){"class"==f?(O(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):"style"==f?(e.attr("style",e.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==f.charAt(0)||a.hasOwnProperty(f)||(a[f]=b,d[f]=c[f])})}function S(a,b,c,d,e,f,g,h){var l=[],k,q,n=b[0],p=a.shift(),w=Ob(p,{templateUrl:null,transclude:null,replace:null,$$originalDirective:p}),
|
65
|
+
P=G(p.templateUrl)?p.templateUrl(b,c):p.templateUrl,u=p.templateNamespace;b.empty();r(L.getTrustedResourceUrl(P)).then(function(r){var L,v;r=Sc(r);if(p.replace){r=Sb.test(r)?Tc(Wb(u,U(r))):[];L=r[0];if(1!=r.length||L.nodeType!==oa)throw ja("tplrt",p.name,P);r={$attr:{}};V(d,b,L);var A=W(L,[],r);I(p.scope)&&y(A);a=A.concat(a);Qc(c,r)}else L=n,b.html(r);a.unshift(w);k=fa(a,L,c,e,b,p,f,g,h);s(d,function(a,c){a==L&&(d[c]=b[0])});for(q=T(b[0].childNodes,e);l.length;){r=l.shift();v=l.shift();var C=l.shift(),
|
66
|
+
E=l.shift(),A=b[0];if(!r.$$destroyed){if(v!==n){var J=v.className;h.hasElementTranscludeDirective&&p.replace||(A=Ub(L));V(C,D(v),A);O(D(A),J)}v=k.transcludeOnThisElement?X(r,k.transclude,E):E;k(q,r,A,d,v)}}l=null});return function(a,b,c,d,e){a=e;b.$$destroyed||(l?l.push(b,c,d,a):(k.transcludeOnThisElement&&(a=X(b,k.transclude,e)),k(q,b,c,d,a)))}}function N(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function Oa(a,b,c,d){if(b)throw ja("multidir",
|
67
|
+
b.name,c.name,a,va(d));}function M(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:function(a){a=a.parent();var b=!!a.length;b&&E.$$addBindingClass(a);return function(a,c){var e=c.parent();b||E.$$addBindingClass(e);E.$$addBindingInfo(e,d.expressions);a.$watch(d,function(a){c[0].nodeValue=a})}}})}function Wb(a,b){a=Q(a||"html");switch(a){case "svg":case "math":var c=Y.createElement("div");c.innerHTML="<"+a+">"+b+"</"+a+">";return c.childNodes[0].childNodes;default:return b}}function R(a,b){if("srcdoc"==
|
68
|
+
b)return L.HTML;var c=ua(a);if("xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b))return L.RESOURCE_URL}function Pa(a,c,d,e,f){var h=R(a,e);f=g[e]||f;var k=b(d,!0,h,f);if(k){if("multiple"===e&&"select"===ua(a))throw ja("selmulti",va(a));c.push({priority:100,compile:function(){return{pre:function(a,c,g){c=g.$$observers||(g.$$observers={});if(l.test(e))throw ja("nodomevents");var n=g[e];n!==d&&(k=n&&b(n,!0,h,f),d=n);k&&(g[e]=k(a),(c[e]||(c[e]=[])).$$inter=!0,(g.$$observers&&g.$$observers[e].$$scope||
|
69
|
+
a).$watch(k,function(a,b){"class"===e&&a!=b?g.$updateClass(a,b):g.$set(e,a)}))}}}})}}function V(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g<h;g++)if(a[g]==d){a[g++]=c;h=g+e-1;for(var l=a.length;g<l;g++,h++)h<l?a[g]=a[h]:delete a[g];a.length-=e-1;a.context===d&&(a.context=c);break}f&&f.replaceChild(c,d);a=Y.createDocumentFragment();a.appendChild(d);D(c).data(D(d).data());sa?(Qb=!0,sa.cleanData([d])):delete D.cache[d[D.expando]];d=1;for(e=b.length;d<e;d++)f=b[d],D(f).remove(),
|
70
|
+
a.appendChild(f),delete b[d];b[0]=c;b.length=1}function Z(a,b){return x(function(){return a.apply(null,arguments)},a,b)}function $(a,b,d,e,f,g){try{a(b,d,e,f,g)}catch(h){c(h,va(d))}}var Xb=function(a,b){if(b){var c=Object.keys(b),d,e,f;d=0;for(e=c.length;d<e;d++)f=c[d],this[f]=b[f]}else this.$attr={};this.$$element=a};Xb.prototype={$normalize:ya,$addClass:function(a){a&&0<a.length&&C.addClass(this.$$element,a)},$removeClass:function(a){a&&0<a.length&&C.removeClass(this.$$element,a)},$updateClass:function(a,
|
71
|
+
b){var c=Uc(a,b);c&&c.length&&C.addClass(this.$$element,c);(c=Uc(b,a))&&c.length&&C.removeClass(this.$$element,c)},$set:function(a,b,d,e){var f=this.$$element[0],g=Lc(f,a),h=kf(f,a),f=a;g?(this.$$element.prop(a,b),e=g):h&&(this[h]=b,f=h);this[a]=b;e?this.$attr[a]=e:(e=this.$attr[a])||(this.$attr[a]=e=tc(a,"-"));g=ua(this.$$element);if("a"===g&&"href"===a||"img"===g&&"src"===a)this[a]=b=A(b,"src"===a);else if("img"===g&&"srcset"===a){for(var g="",h=U(b),l=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,l=/\s/.test(h)?
|
72
|
+
l:/(,)/,h=h.split(l),l=Math.floor(h.length/2),k=0;k<l;k++)var q=2*k,g=g+A(U(h[q]),!0),g=g+(" "+U(h[q+1]));h=U(h[2*k]).split(/\s/);g+=A(U(h[0]),!0);2===h.length&&(g+=" "+U(h[1]));this[a]=b=g}!1!==d&&(null===b||b===t?this.$$element.removeAttr(e):this.$$element.attr(e,b));(a=this.$$observers)&&s(a[f],function(a){try{a(b)}catch(d){c(d)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=ha()),e=d[a]||(d[a]=[]);e.push(b);v.$evalAsync(function(){!e.$$inter&&c.hasOwnProperty(a)&&b(c[a])});
|
73
|
+
return function(){Xa(e,b)}}};var Aa=b.startSymbol(),ka=b.endSymbol(),Sc="{{"==Aa||"}}"==ka?pa:function(a){return a.replace(/\{\{/g,Aa).replace(/}}/g,ka)},gb=/^ngAttr[A-Z]/;E.$$addBindingInfo=k?function(a,b){var c=a.data("$binding")||[];H(b)?c=c.concat(b):c.push(b);a.data("$binding",c)}:z;E.$$addBindingClass=k?function(a){O(a,"ng-binding")}:z;E.$$addScopeInfo=k?function(a,b,c,d){a.data(c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope",b)}:z;E.$$addScopeClass=k?function(a,b){O(a,b?"ng-isolate-scope":
|
74
|
+
"ng-scope")}:z;return E}]}function ya(b){return db(b.replace(Rc,""))}function Uc(b,a){var c="",d=b.split(/\s+/),e=a.split(/\s+/),f=0;a:for(;f<d.length;f++){for(var g=d[f],h=0;h<e.length;h++)if(g==e[h])continue a;c+=(0<c.length?" ":"")+g}return c}function Tc(b){b=D(b);var a=b.length;if(1>=a)return b;for(;a--;)8===b[a].nodeType&&pf.call(b,a,1);return b}function Fe(){var b={},a=!1,c=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(a,c){Ma(a,"controller");I(a)?x(b,a):b[a]=c};this.allowGlobals=function(){a=
|
75
|
+
!0};this.$get=["$injector","$window",function(d,e){function f(a,b,c,d){if(!a||!I(a.$scope))throw S("$controller")("noscp",d,b);a.$scope[b]=c}return function(g,h,l,k){var m,n,q;l=!0===l;k&&F(k)&&(q=k);if(F(g)){k=g.match(c);if(!k)throw qf("ctrlfmt",g);n=k[1];q=q||k[3];g=b.hasOwnProperty(n)?b[n]:vc(h.$scope,n,!0)||(a?vc(e,n,!0):t);tb(g,n,!0)}if(l)return l=(H(g)?g[g.length-1]:g).prototype,m=Object.create(l||null),q&&f(h,q,m,n||g.name),x(function(){d.invoke(g,m,h,n);return m},{instance:m,identifier:q});
|
76
|
+
m=d.instantiate(g,h,n);q&&f(h,q,m,n||g.name);return m}}]}function Ge(){this.$get=["$window",function(b){return D(b.document)}]}function He(){this.$get=["$log",function(b){return function(a,c){b.error.apply(b,arguments)}}]}function Yb(b,a){if(F(b)){var c=b.replace(rf,"").trim();if(c){var d=a("Content-Type");(d=d&&0===d.indexOf(Vc))||(d=(d=c.match(sf))&&tf[d[0]].test(c));d&&(b=oc(c))}}return b}function Wc(b){var a=ha(),c,d,e;if(!b)return a;s(b.split("\n"),function(b){e=b.indexOf(":");c=Q(U(b.substr(0,
|
77
|
+
e)));d=U(b.substr(e+1));c&&(a[c]=a[c]?a[c]+", "+d:d)});return a}function Xc(b){var a=I(b)?b:t;return function(c){a||(a=Wc(b));return c?(c=a[Q(c)],void 0===c&&(c=null),c):a}}function Yc(b,a,c,d){if(G(d))return d(b,a,c);s(d,function(d){b=d(b,a,c)});return b}function Ke(){var b=this.defaults={transformResponse:[Yb],transformRequest:[function(a){return I(a)&&"[object File]"!==Da.call(a)&&"[object Blob]"!==Da.call(a)&&"[object FormData]"!==Da.call(a)?$a(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},
|
78
|
+
post:ra(Zb),put:ra(Zb),patch:ra(Zb)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},a=!1;this.useApplyAsync=function(b){return y(b)?(a=!!b,this):a};var c=this.interceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(d,e,f,g,h,l){function k(a){function c(a){var b=x({},a);b.data=a.data?Yc(a.data,a.headers,a.status,e.transformResponse):a.data;a=a.status;return 200<=a&&300>a?b:h.reject(b)}function d(a){var b,c={};s(a,function(a,d){G(a)?(b=
|
79
|
+
a(),null!=b&&(c[d]=b)):c[d]=a});return c}if(!ca.isObject(a))throw S("$http")("badreq",a);var e=x({method:"get",transformRequest:b.transformRequest,transformResponse:b.transformResponse},a);e.headers=function(a){var c=b.headers,e=x({},a.headers),f,g,c=x({},c.common,c[Q(a.method)]);a:for(f in c){a=Q(f);for(g in e)if(Q(g)===a)continue a;e[f]=c[f]}return d(e)}(a);e.method=vb(e.method);var f=[function(a){var d=a.headers,e=Yc(a.data,Xc(d),t,a.transformRequest);B(e)&&s(d,function(a,b){"content-type"===Q(b)&&
|
80
|
+
delete d[b]});B(a.withCredentials)&&!B(b.withCredentials)&&(a.withCredentials=b.withCredentials);return m(a,e).then(c,c)},t],g=h.when(e);for(s(u,function(a){(a.request||a.requestError)&&f.unshift(a.request,a.requestError);(a.response||a.responseError)&&f.push(a.response,a.responseError)});f.length;){a=f.shift();var l=f.shift(),g=g.then(a,l)}g.success=function(a){g.then(function(b){a(b.data,b.status,b.headers,e)});return g};g.error=function(a){g.then(null,function(b){a(b.data,b.status,b.headers,e)});
|
81
|
+
return g};return g}function m(c,f){function l(b,c,d,e){function f(){m(c,b,d,e)}O&&(200<=b&&300>b?O.put(X,[b,c,Wc(d),e]):O.remove(X));a?g.$applyAsync(f):(f(),g.$$phase||g.$apply())}function m(a,b,d,e){b=Math.max(b,0);(200<=b&&300>b?C.resolve:C.reject)({data:a,status:b,headers:Xc(d),config:c,statusText:e})}function w(a){m(a.data,a.status,ra(a.headers()),a.statusText)}function u(){var a=k.pendingRequests.indexOf(c);-1!==a&&k.pendingRequests.splice(a,1)}var C=h.defer(),A=C.promise,O,E,s=c.headers,X=n(c.url,
|
82
|
+
c.params);k.pendingRequests.push(c);A.then(u,u);!c.cache&&!b.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(O=I(c.cache)?c.cache:I(b.cache)?b.cache:q);O&&(E=O.get(X),y(E)?E&&G(E.then)?E.then(w,w):H(E)?m(E[1],E[0],ra(E[2]),E[3]):m(E,200,{},"OK"):O.put(X,A));B(E)&&((E=Zc(c.url)?e.cookies()[c.xsrfCookieName||b.xsrfCookieName]:t)&&(s[c.xsrfHeaderName||b.xsrfHeaderName]=E),d(c.method,X,f,l,s,c.timeout,c.withCredentials,c.responseType));return A}function n(a,b){if(!b)return a;var c=[];Ed(b,
|
83
|
+
function(a,b){null===a||B(a)||(H(a)||(a=[a]),s(a,function(a){I(a)&&(a=qa(a)?a.toISOString():$a(a));c.push(Fa(b)+"="+Fa(a))}))});0<c.length&&(a+=(-1==a.indexOf("?")?"?":"&")+c.join("&"));return a}var q=f("$http"),u=[];s(c,function(a){u.unshift(F(a)?l.get(a):l.invoke(a))});k.pendingRequests=[];(function(a){s(arguments,function(a){k[a]=function(b,c){return k(x(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){s(arguments,function(a){k[a]=function(b,c,d){return k(x(d||{},{method:a,
|
84
|
+
url:b,data:c}))}})})("post","put","patch");k.defaults=b;return k}]}function uf(){return new M.XMLHttpRequest}function Le(){this.$get=["$browser","$window","$document",function(b,a,c){return vf(b,uf,b.defer,a.angular.callbacks,c[0])}]}function vf(b,a,c,d,e){function f(a,b,c){var f=e.createElement("script"),m=null;f.type="text/javascript";f.src=a;f.async=!0;m=function(a){f.removeEventListener("load",m,!1);f.removeEventListener("error",m,!1);e.body.removeChild(f);f=null;var g=-1,u="unknown";a&&("load"!==
|
85
|
+
a.type||d[b].called||(a={type:"error"}),u=a.type,g="error"===a.type?404:200);c&&c(g,u)};f.addEventListener("load",m,!1);f.addEventListener("error",m,!1);e.body.appendChild(f);return m}return function(e,h,l,k,m,n,q,u){function r(){v&&v();w&&w.abort()}function P(a,d,e,f,g){C!==t&&c.cancel(C);v=w=null;a(d,e,f,g);b.$$completeOutstandingRequest(z)}b.$$incOutstandingRequestCount();h=h||b.url();if("jsonp"==Q(e)){var p="_"+(d.counter++).toString(36);d[p]=function(a){d[p].data=a;d[p].called=!0};var v=f(h.replace("JSON_CALLBACK",
|
86
|
+
"angular.callbacks."+p),p,function(a,b){P(k,a,d[p].data,"",b);d[p]=z})}else{var w=a();w.open(e,h,!0);s(m,function(a,b){y(a)&&w.setRequestHeader(b,a)});w.onload=function(){var a=w.statusText||"",b="response"in w?w.response:w.responseText,c=1223===w.status?204:w.status;0===c&&(c=b?200:"file"==Ba(h).protocol?404:0);P(k,c,b,w.getAllResponseHeaders(),a)};e=function(){P(k,-1,null,null,"")};w.onerror=e;w.onabort=e;q&&(w.withCredentials=!0);if(u)try{w.responseType=u}catch(L){if("json"!==u)throw L;}w.send(l||
|
87
|
+
null)}if(0<n)var C=c(r,n);else n&&G(n.then)&&n.then(r)}}function Ie(){var b="{{",a="}}";this.startSymbol=function(a){return a?(b=a,this):b};this.endSymbol=function(b){return b?(a=b,this):a};this.$get=["$parse","$exceptionHandler","$sce",function(c,d,e){function f(a){return"\\\\\\"+a}function g(f,g,u,r){function P(c){return c.replace(k,b).replace(m,a)}function p(a){try{var b=a;a=u?e.getTrusted(u,b):e.valueOf(b);var c;if(r&&!y(a))c=a;else if(null==a)c="";else{switch(typeof a){case "string":break;case "number":a=
|
88
|
+
""+a;break;default:a=$a(a)}c=a}return c}catch(g){c=$b("interr",f,g.toString()),d(c)}}r=!!r;for(var v,w,L=0,C=[],A=[],O=f.length,E=[],s=[];L<O;)if(-1!=(v=f.indexOf(b,L))&&-1!=(w=f.indexOf(a,v+h)))L!==v&&E.push(P(f.substring(L,v))),L=f.substring(v+h,w),C.push(L),A.push(c(L,p)),L=w+l,s.push(E.length),E.push("");else{L!==O&&E.push(P(f.substring(L)));break}if(u&&1<E.length)throw $b("noconcat",f);if(!g||C.length){var X=function(a){for(var b=0,c=C.length;b<c;b++){if(r&&B(a[b]))return;E[s[b]]=a[b]}return E.join("")};
|
89
|
+
return x(function(a){var b=0,c=C.length,e=Array(c);try{for(;b<c;b++)e[b]=A[b](a);return X(e)}catch(g){a=$b("interr",f,g.toString()),d(a)}},{exp:f,expressions:C,$$watchDelegate:function(a,b,c){var d;return a.$watchGroup(A,function(c,e){var f=X(c);G(b)&&b.call(this,f,c!==e?d:f,a);d=f},c)}})}}var h=b.length,l=a.length,k=new RegExp(b.replace(/./g,f),"g"),m=new RegExp(a.replace(/./g,f),"g");g.startSymbol=function(){return b};g.endSymbol=function(){return a};return g}]}function Je(){this.$get=["$rootScope",
|
90
|
+
"$window","$q","$$q",function(b,a,c,d){function e(e,h,l,k){var m=a.setInterval,n=a.clearInterval,q=0,u=y(k)&&!k,r=(u?d:c).defer(),P=r.promise;l=y(l)?l:0;P.then(null,null,e);P.$$intervalId=m(function(){r.notify(q++);0<l&&q>=l&&(r.resolve(q),n(P.$$intervalId),delete f[P.$$intervalId]);u||b.$apply()},h);f[P.$$intervalId]=r;return P}var f={};e.cancel=function(b){return b&&b.$$intervalId in f?(f[b.$$intervalId].reject("canceled"),a.clearInterval(b.$$intervalId),delete f[b.$$intervalId],!0):!1};return e}]}
|
91
|
+
function Rd(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January February March April May June July August September October November December".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),
|
92
|
+
DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return 1===b?"one":"other"}}}}function ac(b){b=b.split("/");for(var a=b.length;a--;)b[a]=rb(b[a]);return b.join("/")}function $c(b,a){var c=Ba(b);a.$$protocol=
|
93
|
+
c.protocol;a.$$host=c.hostname;a.$$port=ba(c.port)||wf[c.protocol]||null}function ad(b,a){var c="/"!==b.charAt(0);c&&(b="/"+b);var d=Ba(b);a.$$path=decodeURIComponent(c&&"/"===d.pathname.charAt(0)?d.pathname.substring(1):d.pathname);a.$$search=qc(d.search);a.$$hash=decodeURIComponent(d.hash);a.$$path&&"/"!=a.$$path.charAt(0)&&(a.$$path="/"+a.$$path)}function za(b,a){if(0===a.indexOf(b))return a.substr(b.length)}function Ha(b){var a=b.indexOf("#");return-1==a?b:b.substr(0,a)}function bd(b){return b.replace(/(#.+)|#$/,
|
94
|
+
"$1")}function bc(b){return b.substr(0,Ha(b).lastIndexOf("/")+1)}function cc(b,a){this.$$html5=!0;a=a||"";var c=bc(b);$c(b,this);this.$$parse=function(a){var b=za(c,a);if(!F(b))throw Gb("ipthprfx",a,c);ad(b,this);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Pb(this.$$search),b=this.$$hash?"#"+rb(this.$$hash):"";this.$$url=ac(this.$$path)+(a?"?"+a:"")+b;this.$$absUrl=c+this.$$url.substr(1)};this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),
|
95
|
+
!0;var f,g;(f=za(b,d))!==t?(g=f,g=(f=za(a,f))!==t?c+(za("/",f)||f):b+g):(f=za(c,d))!==t?g=c+f:c==d+"/"&&(g=c);g&&this.$$parse(g);return!!g}}function dc(b,a){var c=bc(b);$c(b,this);this.$$parse=function(d){d=za(b,d)||za(c,d);var e;"#"===d.charAt(0)?(e=za(a,d),B(e)&&(e=d)):e=this.$$html5?d:"";ad(e,this);d=this.$$path;var f=/^\/[A-Z]:(\/.*)/;0===e.indexOf(b)&&(e=e.replace(b,""));f.exec(e)||(d=(e=f.exec(d))?e[1]:d);this.$$path=d;this.$$compose()};this.$$compose=function(){var c=Pb(this.$$search),e=this.$$hash?
|
96
|
+
"#"+rb(this.$$hash):"";this.$$url=ac(this.$$path)+(c?"?"+c:"")+e;this.$$absUrl=b+(this.$$url?a+this.$$url:"")};this.$$parseLinkUrl=function(a,c){return Ha(b)==Ha(a)?(this.$$parse(a),!0):!1}}function cd(b,a){this.$$html5=!0;dc.apply(this,arguments);var c=bc(b);this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;b==Ha(d)?f=d:(g=za(c,d))?f=b+a+g:c===d+"/"&&(f=c);f&&this.$$parse(f);return!!f};this.$$compose=function(){var c=Pb(this.$$search),e=this.$$hash?"#"+rb(this.$$hash):
|
97
|
+
"";this.$$url=ac(this.$$path)+(c?"?"+c:"")+e;this.$$absUrl=b+a+this.$$url}}function Hb(b){return function(){return this[b]}}function dd(b,a){return function(c){if(B(c))return this[b];this[b]=a(c);this.$$compose();return this}}function Me(){var b="",a={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(a){return y(a)?(b=a,this):b};this.html5Mode=function(b){return Wa(b)?(a.enabled=b,this):I(b)?(Wa(b.enabled)&&(a.enabled=b.enabled),Wa(b.requireBase)&&(a.requireBase=b.requireBase),Wa(b.rewriteLinks)&&
|
98
|
+
(a.rewriteLinks=b.rewriteLinks),this):a};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(c,d,e,f,g){function h(a,b,c){var e=k.url(),f=k.$$state;try{d.url(a,b,c),k.$$state=d.state()}catch(g){throw k.url(e),k.$$state=f,g;}}function l(a,b){c.$broadcast("$locationChangeSuccess",k.absUrl(),a,k.$$state,b)}var k,m;m=d.baseHref();var n=d.url(),q;if(a.enabled){if(!m&&a.requireBase)throw Gb("nobase");q=n.substring(0,n.indexOf("/",n.indexOf("//")+2))+(m||"/");m=e.history?cc:cd}else q=
|
99
|
+
Ha(n),m=dc;k=new m(q,"#"+b);k.$$parseLinkUrl(n,n);k.$$state=d.state();var u=/^\s*(javascript|mailto):/i;f.on("click",function(b){if(a.rewriteLinks&&!b.ctrlKey&&!b.metaKey&&!b.shiftKey&&2!=b.which&&2!=b.button){for(var e=D(b.target);"a"!==ua(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),l=e.attr("href")||e.attr("xlink:href");I(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=Ba(h.animVal).href);u.test(h)||!h||e.attr("target")||b.isDefaultPrevented()||!k.$$parseLinkUrl(h,
|
100
|
+
l)||(b.preventDefault(),k.absUrl()!=d.url()&&(c.$apply(),g.angular["ff-684208-preventDefault"]=!0))}});k.absUrl()!=n&&d.url(k.absUrl(),!0);var r=!0;d.onUrlChange(function(a,b){c.$evalAsync(function(){var d=k.absUrl(),e=k.$$state,f;k.$$parse(a);k.$$state=b;f=c.$broadcast("$locationChangeStart",a,d,b,e).defaultPrevented;k.absUrl()===a&&(f?(k.$$parse(d),k.$$state=e,h(d,!1,e)):(r=!1,l(d,e)))});c.$$phase||c.$digest()});c.$watch(function(){var a=bd(d.url()),b=bd(k.absUrl()),f=d.state(),g=k.$$replace,q=
|
101
|
+
a!==b||k.$$html5&&e.history&&f!==k.$$state;if(r||q)r=!1,c.$evalAsync(function(){var b=k.absUrl(),d=c.$broadcast("$locationChangeStart",b,a,k.$$state,f).defaultPrevented;k.absUrl()===b&&(d?(k.$$parse(a),k.$$state=f):(q&&h(b,g,f===k.$$state?null:k.$$state),l(a,f)))});k.$$replace=!1});return k}]}function Ne(){var b=!0,a=this;this.debugEnabled=function(a){return y(a)?(b=a,this):b};this.$get=["$window",function(c){function d(a){a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?
|
102
|
+
"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=c.console||{},e=b[a]||b.log||z;a=!1;try{a=!!e.apply}catch(l){}return a?function(){var a=[];s(arguments,function(b){a.push(d(b))});return e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){b&&c.apply(a,arguments)}}()}}]}function ta(b,a){if("__defineGetter__"===
|
103
|
+
b||"__defineSetter__"===b||"__lookupGetter__"===b||"__lookupSetter__"===b||"__proto__"===b)throw la("isecfld",a);return b}function ma(b,a){if(b){if(b.constructor===b)throw la("isecfn",a);if(b.window===b)throw la("isecwindow",a);if(b.children&&(b.nodeName||b.prop&&b.attr&&b.find))throw la("isecdom",a);if(b===Object)throw la("isecobj",a);}return b}function ec(b){return b.constant}function hb(b,a,c,d,e){ma(b,e);ma(a,e);c=c.split(".");for(var f,g=0;1<c.length;g++){f=ta(c.shift(),e);var h=0===g&&a&&a[f]||
|
104
|
+
b[f];h||(h={},b[f]=h);b=ma(h,e)}f=ta(c.shift(),e);ma(b[f],e);return b[f]=d}function Qa(b){return"constructor"==b}function ed(b,a,c,d,e,f,g){ta(b,f);ta(a,f);ta(c,f);ta(d,f);ta(e,f);var h=function(a){return ma(a,f)},l=g||Qa(b)?h:pa,k=g||Qa(a)?h:pa,m=g||Qa(c)?h:pa,n=g||Qa(d)?h:pa,q=g||Qa(e)?h:pa;return function(f,g){var h=g&&g.hasOwnProperty(b)?g:f;if(null==h)return h;h=l(h[b]);if(!a)return h;if(null==h)return t;h=k(h[a]);if(!c)return h;if(null==h)return t;h=m(h[c]);if(!d)return h;if(null==h)return t;
|
105
|
+
h=n(h[d]);return e?null==h?t:h=q(h[e]):h}}function xf(b,a){return function(c,d){return b(c,d,ma,a)}}function yf(b,a,c){var d=a.expensiveChecks,e=d?zf:Af,f=e[b];if(f)return f;var g=b.split("."),h=g.length;if(a.csp)f=6>h?ed(g[0],g[1],g[2],g[3],g[4],c,d):function(a,b){var e=0,f;do f=ed(g[e++],g[e++],g[e++],g[e++],g[e++],c,d)(a,b),b=t,a=f;while(e<h);return f};else{var l="";d&&(l+="s = eso(s, fe);\nl = eso(l, fe);\n");var k=d;s(g,function(a,b){ta(a,c);var e=(b?"s":'((l&&l.hasOwnProperty("'+a+'"))?l:s)')+
|
106
|
+
"."+a;if(d||Qa(a))e="eso("+e+", fe)",k=!0;l+="if(s == null) return undefined;\ns="+e+";\n"});l+="return s;";a=new Function("s","l","eso","fe",l);a.toString=ea(l);k&&(a=xf(a,c));f=a}f.sharedGetter=!0;f.assign=function(a,c,d){return hb(a,d,b,c,b)};return e[b]=f}function fc(b){return G(b.valueOf)?b.valueOf():Bf.call(b)}function Oe(){var b=ha(),a=ha();this.$get=["$filter","$sniffer",function(c,d){function e(a){var b=a;a.sharedGetter&&(b=function(b,c){return a(b,c)},b.literal=a.literal,b.constant=a.constant,
|
107
|
+
b.assign=a.assign);return b}function f(a,b){for(var c=0,d=a.length;c<d;c++){var e=a[c];e.constant||(e.inputs?f(e.inputs,b):-1===b.indexOf(e)&&b.push(e))}return b}function g(a,b){return null==a||null==b?a===b:"object"===typeof a&&(a=fc(a),"object"===typeof a)?!1:a===b||a!==a&&b!==b}function h(a,b,c,d){var e=d.$$inputs||(d.$$inputs=f(d.inputs,[])),h;if(1===e.length){var l=g,e=e[0];return a.$watch(function(a){var b=e(a);g(b,l)||(h=d(a),l=b&&fc(b));return h},b,c)}for(var k=[],q=0,n=e.length;q<n;q++)k[q]=
|
108
|
+
g;return a.$watch(function(a){for(var b=!1,c=0,f=e.length;c<f;c++){var l=e[c](a);if(b||(b=!g(l,k[c])))k[c]=l&&fc(l)}b&&(h=d(a));return h},b,c)}function l(a,b,c,d){var e,f;return e=a.$watch(function(a){return d(a)},function(a,c,d){f=a;G(b)&&b.apply(this,arguments);y(a)&&d.$$postDigest(function(){y(f)&&e()})},c)}function k(a,b,c,d){function e(a){var b=!0;s(a,function(a){y(a)||(b=!1)});return b}var f,g;return f=a.$watch(function(a){return d(a)},function(a,c,d){g=a;G(b)&&b.call(this,a,c,d);e(a)&&d.$$postDigest(function(){e(g)&&
|
109
|
+
f()})},c)}function m(a,b,c,d){var e;return e=a.$watch(function(a){return d(a)},function(a,c,d){G(b)&&b.apply(this,arguments);e()},c)}function n(a,b){if(!b)return a;var c=a.$$watchDelegate,c=c!==k&&c!==l?function(c,d){var e=a(c,d);return b(e,c,d)}:function(c,d){var e=a(c,d),f=b(e,c,d);return y(e)?f:e};a.$$watchDelegate&&a.$$watchDelegate!==h?c.$$watchDelegate=a.$$watchDelegate:b.$stateful||(c.$$watchDelegate=h,c.inputs=[a]);return c}var q={csp:d.csp,expensiveChecks:!1},u={csp:d.csp,expensiveChecks:!0};
|
110
|
+
return function(d,f,g){var v,w,L;switch(typeof d){case "string":L=d=d.trim();var C=g?a:b;v=C[L];v||(":"===d.charAt(0)&&":"===d.charAt(1)&&(w=!0,d=d.substring(2)),g=g?u:q,v=new gc(g),v=(new ib(v,c,g)).parse(d),v.constant?v.$$watchDelegate=m:w?(v=e(v),v.$$watchDelegate=v.literal?k:l):v.inputs&&(v.$$watchDelegate=h),C[L]=v);return n(v,f);case "function":return n(d,f);default:return n(z,f)}}}]}function Qe(){this.$get=["$rootScope","$exceptionHandler",function(b,a){return fd(function(a){b.$evalAsync(a)},
|
111
|
+
a)}]}function Re(){this.$get=["$browser","$exceptionHandler",function(b,a){return fd(function(a){b.defer(a)},a)}]}function fd(b,a){function c(a,b,c){function d(b){return function(c){e||(e=!0,b.call(a,c))}}var e=!1;return[d(b),d(c)]}function d(){this.$$state={status:0}}function e(a,b){return function(c){b.call(a,c)}}function f(c){!c.processScheduled&&c.pending&&(c.processScheduled=!0,b(function(){var b,d,e;e=c.pending;c.processScheduled=!1;c.pending=t;for(var f=0,g=e.length;f<g;++f){d=e[f][0];b=e[f][c.status];
|
112
|
+
try{G(b)?d.resolve(b(c.value)):1===c.status?d.resolve(c.value):d.reject(c.value)}catch(h){d.reject(h),a(h)}}}))}function g(){this.promise=new d;this.resolve=e(this,this.resolve);this.reject=e(this,this.reject);this.notify=e(this,this.notify)}var h=S("$q",TypeError);d.prototype={then:function(a,b,c){var d=new g;this.$$state.pending=this.$$state.pending||[];this.$$state.pending.push([d,a,b,c]);0<this.$$state.status&&f(this.$$state);return d.promise},"catch":function(a){return this.then(null,a)},"finally":function(a,
|
113
|
+
b){return this.then(function(b){return k(b,!0,a)},function(b){return k(b,!1,a)},b)}};g.prototype={resolve:function(a){this.promise.$$state.status||(a===this.promise?this.$$reject(h("qcycle",a)):this.$$resolve(a))},$$resolve:function(b){var d,e;e=c(this,this.$$resolve,this.$$reject);try{if(I(b)||G(b))d=b&&b.then;G(d)?(this.promise.$$state.status=-1,d.call(b,e[0],e[1],this.notify)):(this.promise.$$state.value=b,this.promise.$$state.status=1,f(this.promise.$$state))}catch(g){e[1](g),a(g)}},reject:function(a){this.promise.$$state.status||
|
114
|
+
this.$$reject(a)},$$reject:function(a){this.promise.$$state.value=a;this.promise.$$state.status=2;f(this.promise.$$state)},notify:function(c){var d=this.promise.$$state.pending;0>=this.promise.$$state.status&&d&&d.length&&b(function(){for(var b,e,f=0,g=d.length;f<g;f++){e=d[f][0];b=d[f][3];try{e.notify(G(b)?b(c):c)}catch(h){a(h)}}})}};var l=function(a,b){var c=new g;b?c.resolve(a):c.reject(a);return c.promise},k=function(a,b,c){var d=null;try{G(c)&&(d=c())}catch(e){return l(e,!1)}return d&&G(d.then)?
|
115
|
+
d.then(function(){return l(a,b)},function(a){return l(a,!1)}):l(a,b)},m=function(a,b,c,d){var e=new g;e.resolve(a);return e.promise.then(b,c,d)},n=function u(a){if(!G(a))throw h("norslvr",a);if(!(this instanceof u))return new u(a);var b=new g;a(function(a){b.resolve(a)},function(a){b.reject(a)});return b.promise};n.defer=function(){return new g};n.reject=function(a){var b=new g;b.reject(a);return b.promise};n.when=m;n.all=function(a){var b=new g,c=0,d=H(a)?[]:{};s(a,function(a,e){c++;m(a).then(function(a){d.hasOwnProperty(e)||
|
116
|
+
(d[e]=a,--c||b.resolve(d))},function(a){d.hasOwnProperty(e)||b.reject(a)})});0===c&&b.resolve(d);return b.promise};return n}function $e(){this.$get=["$window","$timeout",function(b,a){var c=b.requestAnimationFrame||b.webkitRequestAnimationFrame,d=b.cancelAnimationFrame||b.webkitCancelAnimationFrame||b.webkitCancelRequestAnimationFrame,e=!!c,f=e?function(a){var b=c(a);return function(){d(b)}}:function(b){var c=a(b,16.66,!1);return function(){a.cancel(c)}};f.supported=e;return f}]}function Pe(){var b=
|
117
|
+
10,a=S("$rootScope"),c=null,d=null;this.digestTtl=function(a){arguments.length&&(b=a);return b};this.$get=["$injector","$exceptionHandler","$parse","$browser",function(e,f,g,h){function l(){this.$id=++ob;this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this.$root=this;this.$$destroyed=!1;this.$$listeners={};this.$$listenerCount={};this.$$isolateBindings=null}function k(b){if(r.$$phase)throw a("inprog",r.$$phase);r.$$phase=b}function m(a,
|
118
|
+
b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function n(){}function q(){for(;v.length;)try{v.shift()()}catch(a){f(a)}d=null}function u(){null===d&&(d=h.defer(function(){r.$apply(q)}))}l.prototype={constructor:l,$new:function(a,b){function c(){d.$$destroyed=!0}var d;b=b||this;a?(d=new l,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=function(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners=
|
119
|
+
{};this.$$listenerCount={};this.$id=++ob;this.$$ChildScope=null},this.$$ChildScope.prototype=this),d=new this.$$ChildScope);d.$parent=b;d.$$prevSibling=b.$$childTail;b.$$childHead?(b.$$childTail.$$nextSibling=d,b.$$childTail=d):b.$$childHead=b.$$childTail=d;(a||b!=this)&&d.$on("$destroy",c);return d},$watch:function(a,b,d){var e=g(a);if(e.$$watchDelegate)return e.$$watchDelegate(this,b,d,e);var f=this.$$watchers,h={fn:b,last:n,get:e,exp:a,eq:!!d};c=null;G(b)||(h.fn=z);f||(f=this.$$watchers=[]);f.unshift(h);
|
120
|
+
return function(){Xa(f,h);c=null}},$watchGroup:function(a,b){function c(){h=!1;l?(l=!1,b(e,e,g)):b(e,d,g)}var d=Array(a.length),e=Array(a.length),f=[],g=this,h=!1,l=!0;if(!a.length){var k=!0;g.$evalAsync(function(){k&&b(e,e,g)});return function(){k=!1}}if(1===a.length)return this.$watch(a[0],function(a,c,f){e[0]=a;d[0]=c;b(e,a===c?e:d,f)});s(a,function(a,b){var l=g.$watch(a,function(a,f){e[b]=a;d[b]=f;h||(h=!0,g.$evalAsync(c))});f.push(l)});return function(){for(;f.length;)f.shift()()}},$watchCollection:function(a,
|
121
|
+
b){function c(a){e=a;var b,d,g,h;if(!B(e)){if(I(e))if(Ta(e))for(f!==q&&(f=q,u=f.length=0,k++),a=e.length,u!==a&&(k++,f.length=u=a),b=0;b<a;b++)h=f[b],g=e[b],d=h!==h&&g!==g,d||h===g||(k++,f[b]=g);else{f!==m&&(f=m={},u=0,k++);a=0;for(b in e)e.hasOwnProperty(b)&&(a++,g=e[b],h=f[b],b in f?(d=h!==h&&g!==g,d||h===g||(k++,f[b]=g)):(u++,f[b]=g,k++));if(u>a)for(b in k++,f)e.hasOwnProperty(b)||(u--,delete f[b])}else f!==e&&(f=e,k++);return k}}c.$stateful=!0;var d=this,e,f,h,l=1<b.length,k=0,n=g(a,c),q=[],m=
|
122
|
+
{},p=!0,u=0;return this.$watch(n,function(){p?(p=!1,b(e,e,d)):b(e,h,d);if(l)if(I(e))if(Ta(e)){h=Array(e.length);for(var a=0;a<e.length;a++)h[a]=e[a]}else for(a in h={},e)rc.call(e,a)&&(h[a]=e[a]);else h=e})},$digest:function(){var e,g,l,m,u,v,s=b,t,W=[],y,J;k("$digest");h.$$checkUrlChange();this===r&&null!==d&&(h.defer.cancel(d),q());c=null;do{v=!1;for(t=this;P.length;){try{J=P.shift(),J.scope.$eval(J.expression,J.locals)}catch(D){f(D)}c=null}a:do{if(m=t.$$watchers)for(u=m.length;u--;)try{if(e=m[u])if((g=
|
123
|
+
e.get(t))!==(l=e.last)&&!(e.eq?ga(g,l):"number"===typeof g&&"number"===typeof l&&isNaN(g)&&isNaN(l)))v=!0,c=e,e.last=e.eq?Ea(g,null):g,e.fn(g,l===n?g:l,t),5>s&&(y=4-s,W[y]||(W[y]=[]),W[y].push({msg:G(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:g,oldVal:l}));else if(e===c){v=!1;break a}}catch(B){f(B)}if(!(m=t.$$childHead||t!==this&&t.$$nextSibling))for(;t!==this&&!(m=t.$$nextSibling);)t=t.$parent}while(t=m);if((v||P.length)&&!s--)throw r.$$phase=null,a("infdig",b,W);}while(v||P.length);
|
124
|
+
for(r.$$phase=null;p.length;)try{p.shift()()}catch(da){f(da)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;if(this!==r){for(var b in this.$$listenerCount)m(this,this.$$listenerCount[b],b);a.$$childHead==this&&(a.$$childHead=this.$$nextSibling);a.$$childTail==this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);
|
125
|
+
this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=z;this.$on=this.$watch=this.$watchGroup=function(){return z};this.$$listeners={};this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a,b){r.$$phase||P.length||h.defer(function(){P.length&&r.$digest()});P.push({scope:this,expression:a,locals:b})},$$postDigest:function(a){p.push(a)},$apply:function(a){try{return k("$apply"),
|
126
|
+
this.$eval(a)}catch(b){f(b)}finally{r.$$phase=null;try{r.$digest()}catch(c){throw f(c),c;}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&v.push(b);u()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(c[d]=null,m(e,1,a))}},$emit:function(a,b){var c=[],d,e=this,g=!1,h={name:a,targetScope:e,
|
127
|
+
stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},l=Ya([h],arguments,1),k,m;do{d=e.$$listeners[a]||c;h.currentScope=e;k=0;for(m=d.length;k<m;k++)if(d[k])try{d[k].apply(null,l)}catch(n){f(n)}else d.splice(k,1),k--,m--;if(g)return h.currentScope=null,h;e=e.$parent}while(e);h.currentScope=null;return h},$broadcast:function(a,b){var c=this,d=this,e={name:a,targetScope:this,preventDefault:function(){e.defaultPrevented=!0},defaultPrevented:!1};if(!this.$$listenerCount[a])return e;
|
128
|
+
for(var g=Ya([e],arguments,1),h,l;c=d;){e.currentScope=c;d=c.$$listeners[a]||[];h=0;for(l=d.length;h<l;h++)if(d[h])try{d[h].apply(null,g)}catch(k){f(k)}else d.splice(h,1),h--,l--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}e.currentScope=null;return e}};var r=new l,P=r.$$asyncQueue=[],p=r.$$postDigestQueue=[],v=r.$$applyAsyncQueue=[];return r}]}function Sd(){var b=/^\s*(https?|ftp|mailto|tel|file):/,a=/^\s*((https?|ftp|file|blob):|data:image\/)/;
|
129
|
+
this.aHrefSanitizationWhitelist=function(a){return y(a)?(b=a,this):b};this.imgSrcSanitizationWhitelist=function(b){return y(b)?(a=b,this):a};this.$get=function(){return function(c,d){var e=d?a:b,f;f=Ba(c).href;return""===f||f.match(e)?c:"unsafe:"+f}}}function Cf(b){if("self"===b)return b;if(F(b)){if(-1<b.indexOf("***"))throw Ca("iwcard",b);b=gd(b).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*");return new RegExp("^"+b+"$")}if(pb(b))return new RegExp("^"+b.source+"$");throw Ca("imatcher");}function hd(b){var a=
|
130
|
+
[];y(b)&&s(b,function(b){a.push(Cf(b))});return a}function Te(){this.SCE_CONTEXTS=na;var b=["self"],a=[];this.resourceUrlWhitelist=function(a){arguments.length&&(b=hd(a));return b};this.resourceUrlBlacklist=function(b){arguments.length&&(a=hd(b));return a};this.$get=["$injector",function(c){function d(a,b){return"self"===a?Zc(b):!!a.exec(b.href)}function e(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};
|
131
|
+
b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()};return b}var f=function(a){throw Ca("unsafe");};c.has("$sanitize")&&(f=c.get("$sanitize"));var g=e(),h={};h[na.HTML]=e(g);h[na.CSS]=e(g);h[na.URL]=e(g);h[na.JS]=e(g);h[na.RESOURCE_URL]=e(h[na.URL]);return{trustAs:function(a,b){var c=h.hasOwnProperty(a)?h[a]:null;if(!c)throw Ca("icontext",a,b);if(null===b||b===t||""===b)return b;if("string"!==typeof b)throw Ca("itype",a);return new c(b)},getTrusted:function(c,e){if(null===
|
132
|
+
e||e===t||""===e)return e;var g=h.hasOwnProperty(c)?h[c]:null;if(g&&e instanceof g)return e.$$unwrapTrustedValue();if(c===na.RESOURCE_URL){var g=Ba(e.toString()),n,q,u=!1;n=0;for(q=b.length;n<q;n++)if(d(b[n],g)){u=!0;break}if(u)for(n=0,q=a.length;n<q;n++)if(d(a[n],g)){u=!1;break}if(u)return e;throw Ca("insecurl",e.toString());}if(c===na.HTML)return f(e);throw Ca("unsafe");},valueOf:function(a){return a instanceof g?a.$$unwrapTrustedValue():a}}}]}function Se(){var b=!0;this.enabled=function(a){arguments.length&&
|
133
|
+
(b=!!a);return b};this.$get=["$parse","$sceDelegate",function(a,c){if(b&&8>Ra)throw Ca("iequirks");var d=ra(na);d.isEnabled=function(){return b};d.trustAs=c.trustAs;d.getTrusted=c.getTrusted;d.valueOf=c.valueOf;b||(d.trustAs=d.getTrusted=function(a,b){return b},d.valueOf=pa);d.parseAs=function(b,c){var e=a(c);return e.literal&&e.constant?e:a(c,function(a){return d.getTrusted(b,a)})};var e=d.parseAs,f=d.getTrusted,g=d.trustAs;s(na,function(a,b){var c=Q(b);d[db("parse_as_"+c)]=function(b){return e(a,
|
134
|
+
b)};d[db("get_trusted_"+c)]=function(b){return f(a,b)};d[db("trust_as_"+c)]=function(b){return g(a,b)}});return d}]}function Ue(){this.$get=["$window","$document",function(b,a){var c={},d=ba((/android (\d+)/.exec(Q((b.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((b.navigator||{}).userAgent),f=a[0]||{},g,h=/^(Moz|webkit|ms)(?=[A-Z])/,l=f.body&&f.body.style,k=!1,m=!1;if(l){for(var n in l)if(k=h.exec(n)){g=k[0];g=g.substr(0,1).toUpperCase()+g.substr(1);break}g||(g="WebkitOpacity"in l&&"webkit");
|
135
|
+
k=!!("transition"in l||g+"Transition"in l);m=!!("animation"in l||g+"Animation"in l);!d||k&&m||(k=F(f.body.style.webkitTransition),m=F(f.body.style.webkitAnimation))}return{history:!(!b.history||!b.history.pushState||4>d||e),hasEvent:function(a){if("input"===a&&11>=Ra)return!1;if(B(c[a])){var b=f.createElement("div");c[a]="on"+a in b}return c[a]},csp:bb(),vendorPrefix:g,transitions:k,animations:m,android:d}}]}function We(){this.$get=["$templateCache","$http","$q",function(b,a,c){function d(e,f){d.totalPendingRequests++;
|
136
|
+
var g=a.defaults&&a.defaults.transformResponse;H(g)?g=g.filter(function(a){return a!==Yb}):g===Yb&&(g=null);return a.get(e,{cache:b,transformResponse:g}).finally(function(){d.totalPendingRequests--}).then(function(a){return a.data},function(a){if(!f)throw ja("tpload",e);return c.reject(a)})}d.totalPendingRequests=0;return d}]}function Xe(){this.$get=["$rootScope","$browser","$location",function(b,a,c){return{findBindings:function(a,b,c){a=a.getElementsByClassName("ng-binding");var g=[];s(a,function(a){var d=
|
137
|
+
ca.element(a).data("$binding");d&&s(d,function(d){c?(new RegExp("(^|\\s)"+gd(b)+"(\\s|\\||$)")).test(d)&&g.push(a):-1!=d.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,c){for(var g=["ng-","data-ng-","ng\\:"],h=0;h<g.length;++h){var l=a.querySelectorAll("["+g[h]+"model"+(c?"=":"*=")+'"'+b+'"]');if(l.length)return l}},getLocation:function(){return c.url()},setLocation:function(a){a!==c.url()&&(c.url(a),b.$digest())},whenStable:function(b){a.notifyWhenNoOutstandingRequests(b)}}}]}function Ye(){this.$get=
|
138
|
+
["$rootScope","$browser","$q","$$q","$exceptionHandler",function(b,a,c,d,e){function f(f,l,k){var m=y(k)&&!k,n=(m?d:c).defer(),q=n.promise;l=a.defer(function(){try{n.resolve(f())}catch(a){n.reject(a),e(a)}finally{delete g[q.$$timeoutId]}m||b.$apply()},l);q.$$timeoutId=l;g[l]=n;return q}var g={};f.cancel=function(b){return b&&b.$$timeoutId in g?(g[b.$$timeoutId].reject("canceled"),delete g[b.$$timeoutId],a.defer.cancel(b.$$timeoutId)):!1};return f}]}function Ba(b){Ra&&(Z.setAttribute("href",b),b=Z.href);
|
139
|
+
Z.setAttribute("href",b);return{href:Z.href,protocol:Z.protocol?Z.protocol.replace(/:$/,""):"",host:Z.host,search:Z.search?Z.search.replace(/^\?/,""):"",hash:Z.hash?Z.hash.replace(/^#/,""):"",hostname:Z.hostname,port:Z.port,pathname:"/"===Z.pathname.charAt(0)?Z.pathname:"/"+Z.pathname}}function Zc(b){b=F(b)?Ba(b):b;return b.protocol===id.protocol&&b.host===id.host}function Ze(){this.$get=ea(M)}function Dc(b){function a(c,d){if(I(c)){var e={};s(c,function(b,c){e[c]=a(c,b)});return e}return b.factory(c+
|
140
|
+
"Filter",d)}this.register=a;this.$get=["$injector",function(a){return function(b){return a.get(b+"Filter")}}];a("currency",jd);a("date",kd);a("filter",Df);a("json",Ef);a("limitTo",Ff);a("lowercase",Gf);a("number",ld);a("orderBy",md);a("uppercase",Hf)}function Df(){return function(b,a,c){if(!H(b))return b;var d;switch(typeof a){case "function":break;case "boolean":case "number":case "string":d=!0;case "object":a=If(a,c,d);break;default:return b}return b.filter(a)}}function If(b,a,c){var d=I(b)&&"$"in
|
141
|
+
b;!0===a?a=ga:G(a)||(a=function(a,b){if(I(a)||I(b))return!1;a=Q(""+a);b=Q(""+b);return-1!==a.indexOf(b)});return function(e){return d&&!I(e)?Ia(e,b.$,a,!1):Ia(e,b,a,c)}}function Ia(b,a,c,d,e){var f=typeof b,g=typeof a;if("string"===g&&"!"===a.charAt(0))return!Ia(b,a.substring(1),c,d);if(H(b))return b.some(function(b){return Ia(b,a,c,d)});switch(f){case "object":var h;if(d){for(h in b)if("$"!==h.charAt(0)&&Ia(b[h],a,c,!0))return!0;return e?!1:Ia(b,a,c,!1)}if("object"===g){for(h in a)if(e=a[h],!G(e)&&
|
142
|
+
(f="$"===h,!Ia(f?b:b[h],e,c,f,f)))return!1;return!0}return c(b,a);case "function":return!1;default:return c(b,a)}}function jd(b){var a=b.NUMBER_FORMATS;return function(b,d,e){B(d)&&(d=a.CURRENCY_SYM);B(e)&&(e=a.PATTERNS[1].maxFrac);return null==b?b:nd(b,a.PATTERNS[1],a.GROUP_SEP,a.DECIMAL_SEP,e).replace(/\u00A4/g,d)}}function ld(b){var a=b.NUMBER_FORMATS;return function(b,d){return null==b?b:nd(b,a.PATTERNS[0],a.GROUP_SEP,a.DECIMAL_SEP,d)}}function nd(b,a,c,d,e){if(!isFinite(b)||I(b))return"";var f=
|
143
|
+
0>b;b=Math.abs(b);var g=b+"",h="",l=[],k=!1;if(-1!==g.indexOf("e")){var m=g.match(/([\d\.]+)e(-?)(\d+)/);m&&"-"==m[2]&&m[3]>e+1?b=0:(h=g,k=!0)}if(k)0<e&&1>b&&(h=b.toFixed(e),b=parseFloat(h));else{g=(g.split(od)[1]||"").length;B(e)&&(e=Math.min(Math.max(a.minFrac,g),a.maxFrac));b=+(Math.round(+(b.toString()+"e"+e)).toString()+"e"+-e);var g=(""+b).split(od),k=g[0],g=g[1]||"",n=0,q=a.lgSize,u=a.gSize;if(k.length>=q+u)for(n=k.length-q,m=0;m<n;m++)0===(n-m)%u&&0!==m&&(h+=c),h+=k.charAt(m);for(m=n;m<k.length;m++)0===
|
144
|
+
(k.length-m)%q&&0!==m&&(h+=c),h+=k.charAt(m);for(;g.length<e;)g+="0";e&&"0"!==e&&(h+=d+g.substr(0,e))}0===b&&(f=!1);l.push(f?a.negPre:a.posPre,h,f?a.negSuf:a.posSuf);return l.join("")}function Ib(b,a,c){var d="";0>b&&(d="-",b=-b);for(b=""+b;b.length<a;)b="0"+b;c&&(b=b.substr(b.length-a));return d+b}function $(b,a,c,d){c=c||0;return function(e){e=e["get"+b]();if(0<c||e>-c)e+=c;0===e&&-12==c&&(e=12);return Ib(e,a,d)}}function Jb(b,a){return function(c,d){var e=c["get"+b](),f=vb(a?"SHORT"+b:b);return d[f][e]}}
|
145
|
+
function pd(b){var a=(new Date(b,0,1)).getDay();return new Date(b,0,(4>=a?5:12)-a)}function qd(b){return function(a){var c=pd(a.getFullYear());a=+new Date(a.getFullYear(),a.getMonth(),a.getDate()+(4-a.getDay()))-+c;a=1+Math.round(a/6048E5);return Ib(a,b)}}function kd(b){function a(a){var b;if(b=a.match(c)){a=new Date(0);var f=0,g=0,h=b[8]?a.setUTCFullYear:a.setFullYear,l=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=ba(b[9]+b[10]),g=ba(b[9]+b[11]));h.call(a,ba(b[1]),ba(b[2])-1,ba(b[3]));f=ba(b[4]||0)-f;
|
146
|
+
g=ba(b[5]||0)-g;h=ba(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));l.call(a,f,g,h,b)}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,e,f){var g="",h=[],l,k;e=e||"mediumDate";e=b.DATETIME_FORMATS[e]||e;F(c)&&(c=Jf.test(c)?ba(c):a(c));V(c)&&(c=new Date(c));if(!qa(c))return c;for(;e;)(k=Kf.exec(e))?(h=Ya(h,k,1),e=h.pop()):(h.push(e),e=null);f&&"UTC"===f&&(c=new Date(c.getTime()),c.setMinutes(c.getMinutes()+
|
147
|
+
c.getTimezoneOffset()));s(h,function(a){l=Lf[a];g+=l?l(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function Ef(){return function(b,a){B(a)&&(a=2);return $a(b,a)}}function Ff(){return function(b,a){V(b)&&(b=b.toString());return H(b)||F(b)?(a=Infinity===Math.abs(Number(a))?Number(a):ba(a))?0<a?b.slice(0,a):b.slice(a):F(b)?"":[]:b}}function md(b){return function(a,c,d){function e(a,b){return b?function(b,c){return a(c,b)}:a}function f(a){switch(typeof a){case "number":case "boolean":case "string":return!0;
|
148
|
+
default:return!1}}function g(a){return null===a?"null":"function"===typeof a.valueOf&&(a=a.valueOf(),f(a))||"function"===typeof a.toString&&(a=a.toString(),f(a))?a:""}function h(a,b){var c=typeof a,d=typeof b;c===d&&"object"===c&&(a=g(a),b=g(b));return c===d?("string"===c&&(a=a.toLowerCase(),b=b.toLowerCase()),a===b?0:a<b?-1:1):c<d?-1:1}if(!Ta(a))return a;c=H(c)?c:[c];0===c.length&&(c=["+"]);c=c.map(function(a){var c=!1,d=a||pa;if(F(a)){if("+"==a.charAt(0)||"-"==a.charAt(0))c="-"==a.charAt(0),a=a.substring(1);
|
149
|
+
if(""===a)return e(h,c);d=b(a);if(d.constant){var f=d();return e(function(a,b){return h(a[f],b[f])},c)}}return e(function(a,b){return h(d(a),d(b))},c)});return Za.call(a).sort(e(function(a,b){for(var d=0;d<c.length;d++){var e=c[d](a,b);if(0!==e)return e}return 0},d))}}function Ja(b){G(b)&&(b={link:b});b.restrict=b.restrict||"AC";return ea(b)}function rd(b,a,c,d,e){var f=this,g=[],h=f.$$parentForm=b.parent().controller("form")||Kb;f.$error={};f.$$success={};f.$pending=t;f.$name=e(a.name||a.ngForm||
|
150
|
+
"")(c);f.$dirty=!1;f.$pristine=!0;f.$valid=!0;f.$invalid=!1;f.$submitted=!1;h.$addControl(f);f.$rollbackViewValue=function(){s(g,function(a){a.$rollbackViewValue()})};f.$commitViewValue=function(){s(g,function(a){a.$commitViewValue()})};f.$addControl=function(a){Ma(a.$name,"input");g.push(a);a.$name&&(f[a.$name]=a)};f.$$renameControl=function(a,b){var c=a.$name;f[c]===a&&delete f[c];f[b]=a;a.$name=b};f.$removeControl=function(a){a.$name&&f[a.$name]===a&&delete f[a.$name];s(f.$pending,function(b,c){f.$setValidity(c,
|
151
|
+
null,a)});s(f.$error,function(b,c){f.$setValidity(c,null,a)});s(f.$$success,function(b,c){f.$setValidity(c,null,a)});Xa(g,a)};sd({ctrl:this,$element:b,set:function(a,b,c){var d=a[b];d?-1===d.indexOf(c)&&d.push(c):a[b]=[c]},unset:function(a,b,c){var d=a[b];d&&(Xa(d,c),0===d.length&&delete a[b])},parentForm:h,$animate:d});f.$setDirty=function(){d.removeClass(b,Sa);d.addClass(b,Lb);f.$dirty=!0;f.$pristine=!1;h.$setDirty()};f.$setPristine=function(){d.setClass(b,Sa,Lb+" ng-submitted");f.$dirty=!1;f.$pristine=
|
152
|
+
!0;f.$submitted=!1;s(g,function(a){a.$setPristine()})};f.$setUntouched=function(){s(g,function(a){a.$setUntouched()})};f.$setSubmitted=function(){d.addClass(b,"ng-submitted");f.$submitted=!0;h.$setSubmitted()}}function hc(b){b.$formatters.push(function(a){return b.$isEmpty(a)?a:a.toString()})}function jb(b,a,c,d,e,f){var g=Q(a[0].type);if(!e.android){var h=!1;a.on("compositionstart",function(a){h=!0});a.on("compositionend",function(){h=!1;l()})}var l=function(b){k&&(f.defer.cancel(k),k=null);if(!h){var e=
|
153
|
+
a.val();b=b&&b.type;"password"===g||c.ngTrim&&"false"===c.ngTrim||(e=U(e));(d.$viewValue!==e||""===e&&d.$$hasNativeValidators)&&d.$setViewValue(e,b)}};if(e.hasEvent("input"))a.on("input",l);else{var k,m=function(a,b,c){k||(k=f.defer(function(){k=null;b&&b.value===c||l(a)}))};a.on("keydown",function(a){var b=a.keyCode;91===b||15<b&&19>b||37<=b&&40>=b||m(a,this,this.value)});if(e.hasEvent("paste"))a.on("paste cut",m)}a.on("change",l);d.$render=function(){a.val(d.$isEmpty(d.$viewValue)?"":d.$viewValue)}}
|
154
|
+
function Mb(b,a){return function(c,d){var e,f;if(qa(c))return c;if(F(c)){'"'==c.charAt(0)&&'"'==c.charAt(c.length-1)&&(c=c.substring(1,c.length-1));if(Mf.test(c))return new Date(c);b.lastIndex=0;if(e=b.exec(c))return e.shift(),f=d?{yyyy:d.getFullYear(),MM:d.getMonth()+1,dd:d.getDate(),HH:d.getHours(),mm:d.getMinutes(),ss:d.getSeconds(),sss:d.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},s(e,function(b,c){c<a.length&&(f[a[c]]=+b)}),new Date(f.yyyy,f.MM-1,f.dd,f.HH,f.mm,f.ss||0,
|
155
|
+
1E3*f.sss||0)}return NaN}}function kb(b,a,c,d){return function(e,f,g,h,l,k,m){function n(a){return a&&!(a.getTime&&a.getTime()!==a.getTime())}function q(a){return y(a)?qa(a)?a:c(a):t}td(e,f,g,h);jb(e,f,g,h,l,k);var u=h&&h.$options&&h.$options.timezone,r;h.$$parserName=b;h.$parsers.push(function(b){return h.$isEmpty(b)?null:a.test(b)?(b=c(b,r),"UTC"===u&&b.setMinutes(b.getMinutes()-b.getTimezoneOffset()),b):t});h.$formatters.push(function(a){if(a&&!qa(a))throw Nb("datefmt",a);if(n(a)){if((r=a)&&"UTC"===
|
156
|
+
u){var b=6E4*r.getTimezoneOffset();r=new Date(r.getTime()+b)}return m("date")(a,d,u)}r=null;return""});if(y(g.min)||g.ngMin){var s;h.$validators.min=function(a){return!n(a)||B(s)||c(a)>=s};g.$observe("min",function(a){s=q(a);h.$validate()})}if(y(g.max)||g.ngMax){var p;h.$validators.max=function(a){return!n(a)||B(p)||c(a)<=p};g.$observe("max",function(a){p=q(a);h.$validate()})}}}function td(b,a,c,d){(d.$$hasNativeValidators=I(a[0].validity))&&d.$parsers.push(function(b){var c=a.prop("validity")||{};
|
157
|
+
return c.badInput&&!c.typeMismatch?t:b})}function ud(b,a,c,d,e){if(y(d)){b=b(d);if(!b.constant)throw S("ngModel")("constexpr",c,d);return b(a)}return e}function ic(b,a){b="ngClass"+b;return["$animate",function(c){function d(a,b){var c=[],d=0;a:for(;d<a.length;d++){for(var e=a[d],m=0;m<b.length;m++)if(e==b[m])continue a;c.push(e)}return c}function e(a){if(!H(a)){if(F(a))return a.split(" ");if(I(a)){var b=[];s(a,function(a,c){a&&(b=b.concat(c.split(" ")))});return b}}return a}return{restrict:"AC",link:function(f,
|
158
|
+
g,h){function l(a,b){var c=g.data("$classCounts")||{},d=[];s(a,function(a){if(0<b||c[a])c[a]=(c[a]||0)+b,c[a]===+(0<b)&&d.push(a)});g.data("$classCounts",c);return d.join(" ")}function k(b){if(!0===a||f.$index%2===a){var k=e(b||[]);if(!m){var u=l(k,1);h.$addClass(u)}else if(!ga(b,m)){var r=e(m),u=d(k,r),k=d(r,k),u=l(u,1),k=l(k,-1);u&&u.length&&c.addClass(g,u);k&&k.length&&c.removeClass(g,k)}}m=ra(b)}var m;f.$watch(h[b],k,!0);h.$observe("class",function(a){k(f.$eval(h[b]))});"ngClass"!==b&&f.$watch("$index",
|
159
|
+
function(c,d){var g=c&1;if(g!==(d&1)){var k=e(f.$eval(h[b]));g===a?(g=l(k,1),h.$addClass(g)):(g=l(k,-1),h.$removeClass(g))}})}}}]}function sd(b){function a(a,b){b&&!f[a]?(k.addClass(e,a),f[a]=!0):!b&&f[a]&&(k.removeClass(e,a),f[a]=!1)}function c(b,c){b=b?"-"+tc(b,"-"):"";a(lb+b,!0===c);a(vd+b,!1===c)}var d=b.ctrl,e=b.$element,f={},g=b.set,h=b.unset,l=b.parentForm,k=b.$animate;f[vd]=!(f[lb]=e.hasClass(lb));d.$setValidity=function(b,e,f){e===t?(d.$pending||(d.$pending={}),g(d.$pending,b,f)):(d.$pending&&
|
160
|
+
h(d.$pending,b,f),wd(d.$pending)&&(d.$pending=t));Wa(e)?e?(h(d.$error,b,f),g(d.$$success,b,f)):(g(d.$error,b,f),h(d.$$success,b,f)):(h(d.$error,b,f),h(d.$$success,b,f));d.$pending?(a(xd,!0),d.$valid=d.$invalid=t,c("",null)):(a(xd,!1),d.$valid=wd(d.$error),d.$invalid=!d.$valid,c("",d.$valid));e=d.$pending&&d.$pending[b]?t:d.$error[b]?!1:d.$$success[b]?!0:null;c(b,e);l.$setValidity(b,e,d)}}function wd(b){if(b)for(var a in b)return!1;return!0}var Nf=/^\/(.+)\/([a-z]*)$/,Q=function(b){return F(b)?b.toLowerCase():
|
161
|
+
b},rc=Object.prototype.hasOwnProperty,vb=function(b){return F(b)?b.toUpperCase():b},Ra,D,sa,Za=[].slice,pf=[].splice,Of=[].push,Da=Object.prototype.toString,Ka=S("ng"),ca=M.angular||(M.angular={}),cb,ob=0;Ra=Y.documentMode;z.$inject=[];pa.$inject=[];var H=Array.isArray,U=function(b){return F(b)?b.trim():b},gd=function(b){return b.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},bb=function(){if(y(bb.isActive_))return bb.isActive_;var b=!(!Y.querySelector("[ng-csp]")&&!Y.querySelector("[data-ng-csp]"));
|
162
|
+
if(!b)try{new Function("")}catch(a){b=!0}return bb.isActive_=b},sb=["ng-","data-ng-","ng:","x-ng-"],Md=/[A-Z]/g,uc=!1,Qb,oa=1,qb=3,Qd={full:"1.3.12",major:1,minor:3,dot:12,codeName:"outlandish-knitting"};R.expando="ng339";var Ab=R.cache={},hf=1;R._data=function(b){return this.cache[b[this.expando]]||{}};var cf=/([\:\-\_]+(.))/g,df=/^moz([A-Z])/,Pf={mouseleave:"mouseout",mouseenter:"mouseover"},Tb=S("jqLite"),gf=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Sb=/<|&#?\w+;/,ef=/<([\w:]+)/,ff=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
|
163
|
+
ia={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ia.optgroup=ia.option;ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead;ia.th=ia.td;var La=R.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;"complete"===Y.readyState?setTimeout(a):(this.on("DOMContentLoaded",a),R(M).on("load",a))},
|
164
|
+
toString:function(){var b=[];s(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return 0<=b?D(this[b]):D(this[this.length+b])},length:0,push:Of,sort:[].sort,splice:[].splice},Fb={};s("multiple selected checked disabled readOnly required open".split(" "),function(b){Fb[Q(b)]=b});var Mc={};s("input select option textarea button form details".split(" "),function(b){Mc[b]=!0});var Nc={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};
|
165
|
+
s({data:Vb,removeData:yb},function(b,a){R[a]=b});s({data:Vb,inheritedData:Eb,scope:function(b){return D.data(b,"$scope")||Eb(b.parentNode||b,["$isolateScope","$scope"])},isolateScope:function(b){return D.data(b,"$isolateScope")||D.data(b,"$isolateScopeNoTemplate")},controller:Ic,injector:function(b){return Eb(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Bb,css:function(b,a,c){a=db(a);if(y(c))b.style[a]=c;else return b.style[a]},attr:function(b,a,c){var d=Q(a);if(Fb[d])if(y(c))c?
|
166
|
+
(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||z).specified?d:t;else if(y(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),null===b?t:b},prop:function(b,a,c){if(y(c))b[a]=c;else return b[a]},text:function(){function b(a,b){if(B(b)){var d=a.nodeType;return d===oa||d===qb?a.textContent:""}a.textContent=b}b.$dv="";return b}(),val:function(b,a){if(B(a)){if(b.multiple&&"select"===ua(b)){var c=[];s(b.options,function(a){a.selected&&
|
167
|
+
c.push(a.value||a.text)});return 0===c.length?null:c}return b.value}b.value=a},html:function(b,a){if(B(a))return b.innerHTML;xb(b,!0);b.innerHTML=a},empty:Jc},function(b,a){R.prototype[a]=function(a,d){var e,f,g=this.length;if(b!==Jc&&(2==b.length&&b!==Bb&&b!==Ic?a:d)===t){if(I(a)){for(e=0;e<g;e++)if(b===Vb)b(this[e],a);else for(f in a)b(this[e],f,a[f]);return this}e=b.$dv;g=e===t?Math.min(g,1):g;for(f=0;f<g;f++){var h=b(this[f],a,d);e=e?e+h:h}return e}for(e=0;e<g;e++)b(this[e],a,d);return this}});
|
168
|
+
s({removeData:yb,on:function a(c,d,e,f){if(y(f))throw Tb("onargs");if(Ec(c)){var g=zb(c,!0);f=g.events;var h=g.handle;h||(h=g.handle=lf(c,f));for(var g=0<=d.indexOf(" ")?d.split(" "):[d],l=g.length;l--;){d=g[l];var k=f[d];k||(f[d]=[],"mouseenter"===d||"mouseleave"===d?a(c,Pf[d],function(a){var c=a.relatedTarget;c&&(c===this||this.contains(c))||h(a,d)}):"$destroy"!==d&&c.addEventListener(d,h,!1),k=f[d]);k.push(e)}}},off:Hc,one:function(a,c,d){a=D(a);a.on(c,function f(){a.off(c,d);a.off(c,f)});a.on(c,
|
169
|
+
d)},replaceWith:function(a,c){var d,e=a.parentNode;xb(a);s(new R(c),function(c){d?e.insertBefore(c,d.nextSibling):e.replaceChild(c,a);d=c})},children:function(a){var c=[];s(a.childNodes,function(a){a.nodeType===oa&&c.push(a)});return c},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,c){var d=a.nodeType;if(d===oa||11===d){c=new R(c);for(var d=0,e=c.length;d<e;d++)a.appendChild(c[d])}},prepend:function(a,c){if(a.nodeType===oa){var d=a.firstChild;s(new R(c),function(c){a.insertBefore(c,
|
170
|
+
d)})}},wrap:function(a,c){c=D(c).eq(0).clone()[0];var d=a.parentNode;d&&d.replaceChild(c,a);c.appendChild(a)},remove:Kc,detach:function(a){Kc(a,!0)},after:function(a,c){var d=a,e=a.parentNode;c=new R(c);for(var f=0,g=c.length;f<g;f++){var h=c[f];e.insertBefore(h,d.nextSibling);d=h}},addClass:Db,removeClass:Cb,toggleClass:function(a,c,d){c&&s(c.split(" "),function(c){var f=d;B(f)&&(f=!Bb(a,c));(f?Db:Cb)(a,c)})},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){return a.nextElementSibling},
|
171
|
+
find:function(a,c){return a.getElementsByTagName?a.getElementsByTagName(c):[]},clone:Ub,triggerHandler:function(a,c,d){var e,f,g=c.type||c,h=zb(a);if(h=(h=h&&h.events)&&h[g])e={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:z,type:g,target:a},c.type&&(e=x(e,
|
172
|
+
c)),c=ra(h),f=d?[e].concat(d):[e],s(c,function(c){e.isImmediatePropagationStopped()||c.apply(a,f)})}},function(a,c){R.prototype[c]=function(c,e,f){for(var g,h=0,l=this.length;h<l;h++)B(g)?(g=a(this[h],c,e,f),y(g)&&(g=D(g))):Gc(g,a(this[h],c,e,f));return y(g)?g:this};R.prototype.bind=R.prototype.on;R.prototype.unbind=R.prototype.off});eb.prototype={put:function(a,c){this[Na(a,this.nextUid)]=c},get:function(a){return this[Na(a,this.nextUid)]},remove:function(a){var c=this[a=Na(a,this.nextUid)];delete this[a];
|
173
|
+
return c}};var Pc=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,Qf=/,/,Rf=/^\s*(_?)(\S+?)\1\s*$/,Oc=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ga=S("$injector");ab.$$annotate=function(a,c,d){var e;if("function"===typeof a){if(!(e=a.$inject)){e=[];if(a.length){if(c)throw F(d)&&d||(d=a.name||mf(a)),Ga("strictdi",d);c=a.toString().replace(Oc,"");c=c.match(Pc);s(c[1].split(Qf),function(a){a.replace(Rf,function(a,c,d){e.push(d)})})}a.$inject=e}}else H(a)?(c=a.length-1,tb(a[c],"fn"),e=a.slice(0,c)):tb(a,"fn",!0);return e};
|
174
|
+
var Sf=S("$animate"),Ce=["$provide",function(a){this.$$selectors={};this.register=function(c,d){var e=c+"-animation";if(c&&"."!=c.charAt(0))throw Sf("notcsel",c);this.$$selectors[c.substr(1)]=e;a.factory(e,d)};this.classNameFilter=function(a){1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null);return this.$$classNameFilter};this.$get=["$$q","$$asyncCallback","$rootScope",function(a,d,e){function f(d){var f,g=a.defer();g.promise.$$cancelFn=function(){f&&f()};e.$$postDigest(function(){f=
|
175
|
+
d(function(){g.resolve()})});return g.promise}function g(a,c){var d=[],e=[],f=ha();s((a.attr("class")||"").split(/\s+/),function(a){f[a]=!0});s(c,function(a,c){var g=f[c];!1===a&&g?e.push(c):!0!==a||g||d.push(c)});return 0<d.length+e.length&&[d.length?d:null,e.length?e:null]}function h(a,c,d){for(var e=0,f=c.length;e<f;++e)a[c[e]]=d}function l(){m||(m=a.defer(),d(function(){m.resolve();m=null}));return m.promise}function k(a,c){if(ca.isObject(c)){var d=x(c.from||{},c.to||{});a.css(d)}}var m;return{animate:function(a,
|
176
|
+
c,d){k(a,{from:c,to:d});return l()},enter:function(a,c,d,e){k(a,e);d?d.after(a):c.prepend(a);return l()},leave:function(a,c){a.remove();return l()},move:function(a,c,d,e){return this.enter(a,c,d,e)},addClass:function(a,c,d){return this.setClass(a,c,[],d)},$$addClassImmediately:function(a,c,d){a=D(a);c=F(c)?c:H(c)?c.join(" "):"";s(a,function(a){Db(a,c)});k(a,d);return l()},removeClass:function(a,c,d){return this.setClass(a,[],c,d)},$$removeClassImmediately:function(a,c,d){a=D(a);c=F(c)?c:H(c)?c.join(" "):
|
177
|
+
"";s(a,function(a){Cb(a,c)});k(a,d);return l()},setClass:function(a,c,d,e){var k=this,l=!1;a=D(a);var m=a.data("$$animateClasses");m?e&&m.options&&(m.options=ca.extend(m.options||{},e)):(m={classes:{},options:e},l=!0);e=m.classes;c=H(c)?c:c.split(" ");d=H(d)?d:d.split(" ");h(e,c,!0);h(e,d,!1);l&&(m.promise=f(function(c){var d=a.data("$$animateClasses");a.removeData("$$animateClasses");if(d){var e=g(a,d.classes);e&&k.$$setClassImmediately(a,e[0],e[1],d.options)}c()}),a.data("$$animateClasses",m));
|
178
|
+
return m.promise},$$setClassImmediately:function(a,c,d,e){c&&this.$$addClassImmediately(a,c);d&&this.$$removeClassImmediately(a,d);k(a,e);return l()},enabled:z,cancel:z}}]}],ja=S("$compile");wc.$inject=["$provide","$$sanitizeUriProvider"];var Rc=/^((?:x|data)[\:\-_])/i,qf=S("$controller"),Vc="application/json",Zb={"Content-Type":Vc+";charset=utf-8"},sf=/^\[|^\{(?!\{)/,tf={"[":/]$/,"{":/}$/},rf=/^\)\]\}',?\n/,$b=S("$interpolate"),Tf=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,wf={http:80,https:443,ftp:21},Gb=
|
179
|
+
S("$location"),Uf={$$html5:!1,$$replace:!1,absUrl:Hb("$$absUrl"),url:function(a){if(B(a))return this.$$url;var c=Tf.exec(a);(c[1]||""===a)&&this.path(decodeURIComponent(c[1]));(c[2]||c[1]||""===a)&&this.search(c[3]||"");this.hash(c[5]||"");return this},protocol:Hb("$$protocol"),host:Hb("$$host"),port:Hb("$$port"),path:dd("$$path",function(a){a=null!==a?a.toString():"";return"/"==a.charAt(0)?a:"/"+a}),search:function(a,c){switch(arguments.length){case 0:return this.$$search;case 1:if(F(a)||V(a))a=
|
180
|
+
a.toString(),this.$$search=qc(a);else if(I(a))a=Ea(a,{}),s(a,function(c,e){null==c&&delete a[e]}),this.$$search=a;else throw Gb("isrcharg");break;default:B(c)||null===c?delete this.$$search[a]:this.$$search[a]=c}this.$$compose();return this},hash:dd("$$hash",function(a){return null!==a?a.toString():""}),replace:function(){this.$$replace=!0;return this}};s([cd,dc,cc],function(a){a.prototype=Object.create(Uf);a.prototype.state=function(c){if(!arguments.length)return this.$$state;if(a!==cc||!this.$$html5)throw Gb("nostate");
|
181
|
+
this.$$state=B(c)?null:c;return this}});var la=S("$parse"),Vf=Function.prototype.call,Wf=Function.prototype.apply,Xf=Function.prototype.bind,mb=ha();s({"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:function(){}},function(a,c){a.constant=a.literal=a.sharedGetter=!0;mb[c]=a});mb["this"]=function(a){return a};mb["this"].sharedGetter=!0;var nb=x(ha(),{"+":function(a,c,d,e){d=d(a,c);e=e(a,c);return y(d)?y(e)?d+e:d:y(e)?e:t},"-":function(a,c,d,e){d=d(a,
|
182
|
+
c);e=e(a,c);return(y(d)?d:0)-(y(e)?e:0)},"*":function(a,c,d,e){return d(a,c)*e(a,c)},"/":function(a,c,d,e){return d(a,c)/e(a,c)},"%":function(a,c,d,e){return d(a,c)%e(a,c)},"===":function(a,c,d,e){return d(a,c)===e(a,c)},"!==":function(a,c,d,e){return d(a,c)!==e(a,c)},"==":function(a,c,d,e){return d(a,c)==e(a,c)},"!=":function(a,c,d,e){return d(a,c)!=e(a,c)},"<":function(a,c,d,e){return d(a,c)<e(a,c)},">":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a,c,d,e){return d(a,c)<=e(a,c)},">=":function(a,
|
183
|
+
c,d,e){return d(a,c)>=e(a,c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},"!":function(a,c,d){return!d(a,c)},"=":!0,"|":!0}),Yf={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},gc=function(a){this.options=a};gc.prototype={constructor:gc,lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index<this.text.length;)if(a=this.text.charAt(this.index),'"'===a||"'"===a)this.readString(a);else if(this.isNumber(a)||"."===a&&this.isNumber(this.peek()))this.readNumber();
|
184
|
+
else if(this.isIdent(a))this.readIdent();else if(this.is(a,"(){}[].,;:?"))this.tokens.push({index:this.index,text:a}),this.index++;else if(this.isWhitespace(a))this.index++;else{var c=a+this.peek(),d=c+this.peek(2),e=nb[c],f=nb[d];nb[a]||e||f?(a=f?d:e?c:a,this.tokens.push({index:this.index,text:a,operator:!0}),this.index+=a.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(a,c){return-1!==c.indexOf(a)},peek:function(a){a=a||1;return this.index+
|
185
|
+
a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=a&&"string"===typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdent:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,c,d){d=d||this.index;c=y(c)?"s "+c+"-"+this.index+" ["+this.text.substring(c,d)+"]":" "+d;throw la("lexerr",a,c,this.text);
|
186
|
+
},readNumber:function(){for(var a="",c=this.index;this.index<this.text.length;){var d=Q(this.text.charAt(this.index));if("."==d||this.isNumber(d))a+=d;else{var e=this.peek();if("e"==d&&this.isExpOperator(e))a+=d;else if(this.isExpOperator(d)&&e&&this.isNumber(e)&&"e"==a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||e&&this.isNumber(e)||"e"!=a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}this.tokens.push({index:c,text:a,constant:!0,value:Number(a)})},readIdent:function(){for(var a=
|
187
|
+
this.index;this.index<this.text.length;){var c=this.text.charAt(this.index);if(!this.isIdent(c)&&!this.isNumber(c))break;this.index++}this.tokens.push({index:a,text:this.text.slice(a,this.index),identifier:!0})},readString:function(a){var c=this.index;this.index++;for(var d="",e=a,f=!1;this.index<this.text.length;){var g=this.text.charAt(this.index),e=e+g;if(f)"u"===g?(f=this.text.substring(this.index+1,this.index+5),f.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+f+"]"),this.index+=
|
188
|
+
4,d+=String.fromCharCode(parseInt(f,16))):d+=Yf[g]||g,f=!1;else if("\\"===g)f=!0;else{if(g===a){this.index++;this.tokens.push({index:c,text:e,constant:!0,value:d});return}d+=g}this.index++}this.throwError("Unterminated quote",c)}};var ib=function(a,c,d){this.lexer=a;this.$filter=c;this.options=d};ib.ZERO=x(function(){return 0},{sharedGetter:!0,constant:!0});ib.prototype={constructor:ib,parse:function(a){this.text=a;this.tokens=this.lexer.lex(a);a=this.statements();0!==this.tokens.length&&this.throwError("is an unexpected token",
|
189
|
+
this.tokens[0]);a.literal=!!a.literal;a.constant=!!a.constant;return a},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.peek().identifier&&this.peek().text in mb?a=mb[this.consume().text]:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var c,d;c=this.expect("(","[",".");)"("===c.text?(a=this.functionCall(a,
|
190
|
+
d),d=null):"["===c.text?(d=a,a=this.objectIndex(a)):"."===c.text?(d=a,a=this.fieldAccess(a)):this.throwError("IMPOSSIBLE");return a},throwError:function(a,c){throw la("syntax",c.text,a,c.index+1,this.text,this.text.substring(c.index));},peekToken:function(){if(0===this.tokens.length)throw la("ueoe",this.text);return this.tokens[0]},peek:function(a,c,d,e){return this.peekAhead(0,a,c,d,e)},peekAhead:function(a,c,d,e,f){if(this.tokens.length>a){a=this.tokens[a];var g=a.text;if(g===c||g===d||g===e||g===
|
191
|
+
f||!(c||d||e||f))return a}return!1},expect:function(a,c,d,e){return(a=this.peek(a,c,d,e))?(this.tokens.shift(),a):!1},consume:function(a){if(0===this.tokens.length)throw la("ueoe",this.text);var c=this.expect(a);c||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return c},unaryFn:function(a,c){var d=nb[a];return x(function(a,f){return d(a,f,c)},{constant:c.constant,inputs:[c]})},binaryFn:function(a,c,d,e){var f=nb[c];return x(function(c,e){return f(c,e,a,d)},{constant:a.constant&&
|
192
|
+
d.constant,inputs:!e&&[a,d]})},identifier:function(){for(var a=this.consume().text;this.peek(".")&&this.peekAhead(1).identifier&&!this.peekAhead(2,"(");)a+=this.consume().text+this.consume().text;return yf(a,this.options,this.text)},constant:function(){var a=this.consume().value;return x(function(){return a},{constant:!0,literal:!0})},statements:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.filterChain()),!this.expect(";"))return 1===a.length?a[0]:function(c,
|
193
|
+
d){for(var e,f=0,g=a.length;f<g;f++)e=a[f](c,d);return e}},filterChain:function(){for(var a=this.expression();this.expect("|");)a=this.filter(a);return a},filter:function(a){var c=this.$filter(this.consume().text),d,e;if(this.peek(":"))for(d=[],e=[];this.expect(":");)d.push(this.expression());var f=[a].concat(d||[]);return x(function(f,h){var l=a(f,h);if(e){e[0]=l;for(l=d.length;l--;)e[l+1]=d[l](f,h);return c.apply(t,e)}return c(l)},{constant:!c.$stateful&&f.every(ec),inputs:!c.$stateful&&f})},expression:function(){return this.assignment()},
|
194
|
+
assignment:function(){var a=this.ternary(),c,d;return(d=this.expect("="))?(a.assign||this.throwError("implies assignment but ["+this.text.substring(0,d.index)+"] can not be assigned to",d),c=this.ternary(),x(function(d,f){return a.assign(d,c(d,f),f)},{inputs:[a,c]})):a},ternary:function(){var a=this.logicalOR(),c;if(this.expect("?")&&(c=this.assignment(),this.consume(":"))){var d=this.assignment();return x(function(e,f){return a(e,f)?c(e,f):d(e,f)},{constant:a.constant&&c.constant&&d.constant})}return a},
|
195
|
+
logicalOR:function(){for(var a=this.logicalAND(),c;c=this.expect("||");)a=this.binaryFn(a,c.text,this.logicalAND(),!0);return a},logicalAND:function(){for(var a=this.equality(),c;c=this.expect("&&");)a=this.binaryFn(a,c.text,this.equality(),!0);return a},equality:function(){for(var a=this.relational(),c;c=this.expect("==","!=","===","!==");)a=this.binaryFn(a,c.text,this.relational());return a},relational:function(){for(var a=this.additive(),c;c=this.expect("<",">","<=",">=");)a=this.binaryFn(a,c.text,
|
196
|
+
this.additive());return a},additive:function(){for(var a=this.multiplicative(),c;c=this.expect("+","-");)a=this.binaryFn(a,c.text,this.multiplicative());return a},multiplicative:function(){for(var a=this.unary(),c;c=this.expect("*","/","%");)a=this.binaryFn(a,c.text,this.unary());return a},unary:function(){var a;return this.expect("+")?this.primary():(a=this.expect("-"))?this.binaryFn(ib.ZERO,a.text,this.unary()):(a=this.expect("!"))?this.unaryFn(a.text,this.unary()):this.primary()},fieldAccess:function(a){var c=
|
197
|
+
this.identifier();return x(function(d,e,f){d=f||a(d,e);return null==d?t:c(d)},{assign:function(d,e,f){var g=a(d,f);g||a.assign(d,g={},f);return c.assign(g,e)}})},objectIndex:function(a){var c=this.text,d=this.expression();this.consume("]");return x(function(e,f){var g=a(e,f),h=d(e,f);ta(h,c);return g?ma(g[h],c):t},{assign:function(e,f,g){var h=ta(d(e,g),c),l=ma(a(e,g),c);l||a.assign(e,l={},g);return l[h]=f}})},functionCall:function(a,c){var d=[];if(")"!==this.peekToken().text){do d.push(this.expression());
|
198
|
+
while(this.expect(","))}this.consume(")");var e=this.text,f=d.length?[]:null;return function(g,h){var l=c?c(g,h):y(c)?t:g,k=a(g,h,l)||z;if(f)for(var m=d.length;m--;)f[m]=ma(d[m](g,h),e);ma(l,e);if(k){if(k.constructor===k)throw la("isecfn",e);if(k===Vf||k===Wf||k===Xf)throw la("isecff",e);}l=k.apply?k.apply(l,f):k(f[0],f[1],f[2],f[3],f[4]);f&&(f.length=0);return ma(l,e)}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","))
|
199
|
+
}this.consume("]");return x(function(c,d){for(var e=[],f=0,g=a.length;f<g;f++)e.push(a[f](c,d));return e},{literal:!0,constant:a.every(ec),inputs:a})},object:function(){var a=[],c=[];if("}"!==this.peekToken().text){do{if(this.peek("}"))break;var d=this.consume();d.constant?a.push(d.value):d.identifier?a.push(d.text):this.throwError("invalid key",d);this.consume(":");c.push(this.expression())}while(this.expect(","))}this.consume("}");return x(function(d,f){for(var g={},h=0,l=c.length;h<l;h++)g[a[h]]=
|
200
|
+
c[h](d,f);return g},{literal:!0,constant:c.every(ec),inputs:c})}};var Af=ha(),zf=ha(),Bf=Object.prototype.valueOf,Ca=S("$sce"),na={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},ja=S("$compile"),Z=Y.createElement("a"),id=Ba(M.location.href);Dc.$inject=["$provide"];jd.$inject=["$locale"];ld.$inject=["$locale"];var od=".",Lf={yyyy:$("FullYear",4),yy:$("FullYear",2,0,!0),y:$("FullYear",1),MMMM:Jb("Month"),MMM:Jb("Month",!0),MM:$("Month",2,1),M:$("Month",1,1),dd:$("Date",2),d:$("Date",
|
201
|
+
1),HH:$("Hours",2),H:$("Hours",1),hh:$("Hours",2,-12),h:$("Hours",1,-12),mm:$("Minutes",2),m:$("Minutes",1),ss:$("Seconds",2),s:$("Seconds",1),sss:$("Milliseconds",3),EEEE:Jb("Day"),EEE:Jb("Day",!0),a:function(a,c){return 12>a.getHours()?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){a=-1*a.getTimezoneOffset();return a=(0<=a?"+":"")+(Ib(Math[0<a?"floor":"ceil"](a/60),2)+Ib(Math.abs(a%60),2))},ww:qd(2),w:qd(1)},Kf=/((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|w+))(.*)/,Jf=/^\-?\d+$/;
|
202
|
+
kd.$inject=["$locale"];var Gf=ea(Q),Hf=ea(vb);md.$inject=["$parse"];var Td=ea({restrict:"E",compile:function(a,c){if(!c.href&&!c.xlinkHref&&!c.name)return function(a,c){if("a"===c[0].nodeName.toLowerCase()){var f="[object SVGAnimatedString]"===Da.call(c.prop("href"))?"xlink:href":"href";c.on("click",function(a){c.attr(f)||a.preventDefault()})}}}}),wb={};s(Fb,function(a,c){if("multiple"!=a){var d=ya("ng-"+c);wb[d]=function(){return{restrict:"A",priority:100,link:function(a,f,g){a.$watch(g[d],function(a){g.$set(c,
|
203
|
+
!!a)})}}}}});s(Nc,function(a,c){wb[c]=function(){return{priority:100,link:function(a,e,f){if("ngPattern"===c&&"/"==f.ngPattern.charAt(0)&&(e=f.ngPattern.match(Nf))){f.$set("ngPattern",new RegExp(e[1],e[2]));return}a.$watch(f[c],function(a){f.$set(c,a)})}}}});s(["src","srcset","href"],function(a){var c=ya("ng-"+a);wb[c]=function(){return{priority:99,link:function(d,e,f){var g=a,h=a;"href"===a&&"[object SVGAnimatedString]"===Da.call(e.prop("href"))&&(h="xlinkHref",f.$attr[h]="xlink:href",g=null);f.$observe(c,
|
204
|
+
function(c){c?(f.$set(h,c),Ra&&g&&e.prop(g,f[h])):"href"===a&&f.$set(h,null)})}}}});var Kb={$addControl:z,$$renameControl:function(a,c){a.$name=c},$removeControl:z,$setValidity:z,$setDirty:z,$setPristine:z,$setSubmitted:z};rd.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var yd=function(a){return["$timeout",function(c){return{name:"form",restrict:a?"EAC":"E",controller:rd,compile:function(a){a.addClass(Sa).addClass(lb);return{pre:function(a,d,g,h){if(!("action"in g)){var l=function(c){a.$apply(function(){h.$commitViewValue();
|
205
|
+
h.$setSubmitted()});c.preventDefault()};d[0].addEventListener("submit",l,!1);d.on("$destroy",function(){c(function(){d[0].removeEventListener("submit",l,!1)},0,!1)})}var k=h.$$parentForm,m=h.$name;m&&(hb(a,null,m,h,m),g.$observe(g.name?"name":"ngForm",function(c){m!==c&&(hb(a,null,m,t,m),m=c,hb(a,null,m,h,m),k.$$renameControl(h,m))}));d.on("$destroy",function(){k.$removeControl(h);m&&hb(a,null,m,t,m);x(h,Kb)})}}}}}]},Ud=yd(),ge=yd(!0),Mf=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,
|
206
|
+
Zf=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,$f=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,ag=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,zd=/^(\d{4})-(\d{2})-(\d{2})$/,Ad=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,jc=/^(\d{4})-W(\d\d)$/,Bd=/^(\d{4})-(\d\d)$/,Cd=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Dd={text:function(a,c,d,e,f,g){jb(a,c,d,e,f,g);hc(e)},date:kb("date",zd,Mb(zd,["yyyy",
|
207
|
+
"MM","dd"]),"yyyy-MM-dd"),"datetime-local":kb("datetimelocal",Ad,Mb(Ad,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:kb("time",Cd,Mb(Cd,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:kb("week",jc,function(a,c){if(qa(a))return a;if(F(a)){jc.lastIndex=0;var d=jc.exec(a);if(d){var e=+d[1],f=+d[2],g=d=0,h=0,l=0,k=pd(e),f=7*(f-1);c&&(d=c.getHours(),g=c.getMinutes(),h=c.getSeconds(),l=c.getMilliseconds());return new Date(e,0,k.getDate()+f,d,g,h,l)}}return NaN},"yyyy-Www"),month:kb("month",
|
208
|
+
Bd,Mb(Bd,["yyyy","MM"]),"yyyy-MM"),number:function(a,c,d,e,f,g){td(a,c,d,e);jb(a,c,d,e,f,g);e.$$parserName="number";e.$parsers.push(function(a){return e.$isEmpty(a)?null:ag.test(a)?parseFloat(a):t});e.$formatters.push(function(a){if(!e.$isEmpty(a)){if(!V(a))throw Nb("numfmt",a);a=a.toString()}return a});if(d.min||d.ngMin){var h;e.$validators.min=function(a){return e.$isEmpty(a)||B(h)||a>=h};d.$observe("min",function(a){y(a)&&!V(a)&&(a=parseFloat(a,10));h=V(a)&&!isNaN(a)?a:t;e.$validate()})}if(d.max||
|
209
|
+
d.ngMax){var l;e.$validators.max=function(a){return e.$isEmpty(a)||B(l)||a<=l};d.$observe("max",function(a){y(a)&&!V(a)&&(a=parseFloat(a,10));l=V(a)&&!isNaN(a)?a:t;e.$validate()})}},url:function(a,c,d,e,f,g){jb(a,c,d,e,f,g);hc(e);e.$$parserName="url";e.$validators.url=function(a,c){var d=a||c;return e.$isEmpty(d)||Zf.test(d)}},email:function(a,c,d,e,f,g){jb(a,c,d,e,f,g);hc(e);e.$$parserName="email";e.$validators.email=function(a,c){var d=a||c;return e.$isEmpty(d)||$f.test(d)}},radio:function(a,c,
|
210
|
+
d,e){B(d.name)&&c.attr("name",++ob);c.on("click",function(a){c[0].checked&&e.$setViewValue(d.value,a&&a.type)});e.$render=function(){c[0].checked=d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e,f,g,h,l){var k=ud(l,a,"ngTrueValue",d.ngTrueValue,!0),m=ud(l,a,"ngFalseValue",d.ngFalseValue,!1);c.on("click",function(a){e.$setViewValue(c[0].checked,a&&a.type)});e.$render=function(){c[0].checked=e.$viewValue};e.$isEmpty=function(a){return!1===a};e.$formatters.push(function(a){return ga(a,
|
211
|
+
k)});e.$parsers.push(function(a){return a?k:m})},hidden:z,button:z,submit:z,reset:z,file:z},xc=["$browser","$sniffer","$filter","$parse",function(a,c,d,e){return{restrict:"E",require:["?ngModel"],link:{pre:function(f,g,h,l){l[0]&&(Dd[Q(h.type)]||Dd.text)(f,g,h,l[0],c,a,d,e)}}}}],bg=/^(true|false|\d+)$/,ye=function(){return{restrict:"A",priority:100,compile:function(a,c){return bg.test(c.ngValue)?function(a,c,f){f.$set("value",a.$eval(f.ngValue))}:function(a,c,f){a.$watch(f.ngValue,function(a){f.$set("value",
|
212
|
+
a)})}}}},Zd=["$compile",function(a){return{restrict:"AC",compile:function(c){a.$$addBindingClass(c);return function(c,e,f){a.$$addBindingInfo(e,f.ngBind);e=e[0];c.$watch(f.ngBind,function(a){e.textContent=a===t?"":a})}}}}],ae=["$interpolate","$compile",function(a,c){return{compile:function(d){c.$$addBindingClass(d);return function(d,f,g){d=a(f.attr(g.$attr.ngBindTemplate));c.$$addBindingInfo(f,d.expressions);f=f[0];g.$observe("ngBindTemplate",function(a){f.textContent=a===t?"":a})}}}}],$d=["$sce",
|
213
|
+
"$parse","$compile",function(a,c,d){return{restrict:"A",compile:function(e,f){var g=c(f.ngBindHtml),h=c(f.ngBindHtml,function(a){return(a||"").toString()});d.$$addBindingClass(e);return function(c,e,f){d.$$addBindingInfo(e,f.ngBindHtml);c.$watch(h,function(){e.html(a.getTrustedHtml(g(c))||"")})}}}}],xe=ea({restrict:"A",require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),be=ic("",!0),de=ic("Odd",0),ce=ic("Even",1),ee=Ja({compile:function(a,c){c.$set("ngCloak",
|
214
|
+
t);a.removeClass("ng-cloak")}}),fe=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Cc={},cg={blur:!0,focus:!0};s("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var c=ya("ng-"+a);Cc[c]=["$parse","$rootScope",function(d,e){return{restrict:"A",compile:function(f,g){var h=d(g[c],null,!0);return function(c,d){d.on(a,function(d){var f=function(){h(c,{$event:d})};
|
215
|
+
cg[a]&&e.$$phase?c.$evalAsync(f):c.$apply(f)})}}}}]});var ie=["$animate",function(a){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,f,g){var h,l,k;c.$watch(e.ngIf,function(c){c?l||g(function(c,f){l=f;c[c.length++]=Y.createComment(" end ngIf: "+e.ngIf+" ");h={clone:c};a.enter(c,d.parent(),d)}):(k&&(k.remove(),k=null),l&&(l.$destroy(),l=null),h&&(k=ub(h.clone),a.leave(k).then(function(){k=null}),h=null))})}}}],je=["$templateRequest","$anchorScroll",
|
216
|
+
"$animate","$sce",function(a,c,d,e){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:ca.noop,compile:function(f,g){var h=g.ngInclude||g.src,l=g.onload||"",k=g.autoscroll;return function(f,g,q,s,r){var t=0,p,v,w,L=function(){v&&(v.remove(),v=null);p&&(p.$destroy(),p=null);w&&(d.leave(w).then(function(){v=null}),v=w,w=null)};f.$watch(e.parseAsResourceUrl(h),function(e){var h=function(){!y(k)||k&&!f.$eval(k)||c()},q=++t;e?(a(e,!0).then(function(a){if(q===t){var c=f.$new();
|
217
|
+
s.template=a;a=r(c,function(a){L();d.enter(a,null,g).then(h)});p=c;w=a;p.$emit("$includeContentLoaded",e);f.$eval(l)}},function(){q===t&&(L(),f.$emit("$includeContentError",e))}),f.$emit("$includeContentRequested",e)):(L(),s.template=null)})}}}}],Ae=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(c,d,e,f){/SVG/.test(d[0].toString())?(d.empty(),a(Fc(f.template,Y).childNodes)(c,function(a){d.append(a)},{futureParentElement:d})):(d.html(f.template),a(d.contents())(c))}}}],
|
218
|
+
ke=Ja({priority:450,compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),we=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,c,d,e){var f=c.attr(d.$attr.ngList)||", ",g="false"!==d.ngTrim,h=g?U(f):f;e.$parsers.push(function(a){if(!B(a)){var c=[];a&&s(a.split(h),function(a){a&&c.push(g?U(a):a)});return c}});e.$formatters.push(function(a){return H(a)?a.join(f):t});e.$isEmpty=function(a){return!a||!a.length}}}},lb="ng-valid",vd="ng-invalid",Sa="ng-pristine",
|
219
|
+
Lb="ng-dirty",xd="ng-pending",Nb=new S("ngModel"),dg=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,c,d,e,f,g,h,l,k,m){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=t;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$untouched=!0;this.$touched=!1;this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success=
|
220
|
+
{};this.$pending=t;this.$name=m(d.name||"",!1)(a);var n=f(d.ngModel),q=n.assign,u=n,r=q,P=null,p=this;this.$$setOptions=function(a){if((p.$options=a)&&a.getterSetter){var c=f(d.ngModel+"()"),g=f(d.ngModel+"($$$p)");u=function(a){var d=n(a);G(d)&&(d=c(a));return d};r=function(a,c){G(n(a))?g(a,{$$$p:p.$modelValue}):q(a,p.$modelValue)}}else if(!n.assign)throw Nb("nonassign",d.ngModel,va(e));};this.$render=z;this.$isEmpty=function(a){return B(a)||""===a||null===a||a!==a};var v=e.inheritedData("$formController")||
|
221
|
+
Kb,w=0;sd({ctrl:this,$element:e,set:function(a,c){a[c]=!0},unset:function(a,c){delete a[c]},parentForm:v,$animate:g});this.$setPristine=function(){p.$dirty=!1;p.$pristine=!0;g.removeClass(e,Lb);g.addClass(e,Sa)};this.$setDirty=function(){p.$dirty=!0;p.$pristine=!1;g.removeClass(e,Sa);g.addClass(e,Lb);v.$setDirty()};this.$setUntouched=function(){p.$touched=!1;p.$untouched=!0;g.setClass(e,"ng-untouched","ng-touched")};this.$setTouched=function(){p.$touched=!0;p.$untouched=!1;g.setClass(e,"ng-touched",
|
222
|
+
"ng-untouched")};this.$rollbackViewValue=function(){h.cancel(P);p.$viewValue=p.$$lastCommittedViewValue;p.$render()};this.$validate=function(){if(!V(p.$modelValue)||!isNaN(p.$modelValue)){var a=p.$$rawModelValue,c=p.$valid,d=p.$modelValue,e=p.$options&&p.$options.allowInvalid;p.$$runValidators(p.$error[p.$$parserName||"parse"]?!1:t,a,p.$$lastCommittedViewValue,function(f){e||c===f||(p.$modelValue=f?a:t,p.$modelValue!==d&&p.$$writeModelToScope())})}};this.$$runValidators=function(a,c,d,e){function f(){var a=
|
223
|
+
!0;s(p.$validators,function(e,f){var g=e(c,d);a=a&&g;h(f,g)});return a?!0:(s(p.$asyncValidators,function(a,c){h(c,null)}),!1)}function g(){var a=[],e=!0;s(p.$asyncValidators,function(f,g){var l=f(c,d);if(!l||!G(l.then))throw Nb("$asyncValidators",l);h(g,t);a.push(l.then(function(){h(g,!0)},function(a){e=!1;h(g,!1)}))});a.length?k.all(a).then(function(){l(e)},z):l(!0)}function h(a,c){m===w&&p.$setValidity(a,c)}function l(a){m===w&&e(a)}w++;var m=w;(function(a){var c=p.$$parserName||"parse";if(a===
|
224
|
+
t)h(c,null);else if(h(c,a),!a)return s(p.$validators,function(a,c){h(c,null)}),s(p.$asyncValidators,function(a,c){h(c,null)}),!1;return!0})(a)?f()?g():l(!1):l(!1)};this.$commitViewValue=function(){var a=p.$viewValue;h.cancel(P);if(p.$$lastCommittedViewValue!==a||""===a&&p.$$hasNativeValidators)p.$$lastCommittedViewValue=a,p.$pristine&&this.$setDirty(),this.$$parseAndValidate()};this.$$parseAndValidate=function(){var c=p.$$lastCommittedViewValue,d=B(c)?t:!0;if(d)for(var e=0;e<p.$parsers.length;e++)if(c=
|
225
|
+
p.$parsers[e](c),B(c)){d=!1;break}V(p.$modelValue)&&isNaN(p.$modelValue)&&(p.$modelValue=u(a));var f=p.$modelValue,g=p.$options&&p.$options.allowInvalid;p.$$rawModelValue=c;g&&(p.$modelValue=c,p.$modelValue!==f&&p.$$writeModelToScope());p.$$runValidators(d,c,p.$$lastCommittedViewValue,function(a){g||(p.$modelValue=a?c:t,p.$modelValue!==f&&p.$$writeModelToScope())})};this.$$writeModelToScope=function(){r(a,p.$modelValue);s(p.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}})};this.$setViewValue=
|
226
|
+
function(a,c){p.$viewValue=a;p.$options&&!p.$options.updateOnDefault||p.$$debounceViewValueCommit(c)};this.$$debounceViewValueCommit=function(c){var d=0,e=p.$options;e&&y(e.debounce)&&(e=e.debounce,V(e)?d=e:V(e[c])?d=e[c]:V(e["default"])&&(d=e["default"]));h.cancel(P);d?P=h(function(){p.$commitViewValue()},d):l.$$phase?p.$commitViewValue():a.$apply(function(){p.$commitViewValue()})};a.$watch(function(){var c=u(a);if(c!==p.$modelValue){p.$modelValue=p.$$rawModelValue=c;for(var d=p.$formatters,e=d.length,
|
227
|
+
f=c;e--;)f=d[e](f);p.$viewValue!==f&&(p.$viewValue=p.$$lastCommittedViewValue=f,p.$render(),p.$$runValidators(t,c,f,z))}return c})}],ve=["$rootScope",function(a){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:dg,priority:1,compile:function(c){c.addClass(Sa).addClass("ng-untouched").addClass(lb);return{pre:function(a,c,f,g){var h=g[0],l=g[1]||Kb;h.$$setOptions(g[2]&&g[2].$options);l.$addControl(h);f.$observe("name",function(a){h.$name!==a&&l.$$renameControl(h,a)});a.$on("$destroy",
|
228
|
+
function(){l.$removeControl(h)})},post:function(c,e,f,g){var h=g[0];if(h.$options&&h.$options.updateOn)e.on(h.$options.updateOn,function(a){h.$$debounceViewValueCommit(a&&a.type)});e.on("blur",function(e){h.$touched||(a.$$phase?c.$evalAsync(h.$setTouched):c.$apply(h.$setTouched))})}}}}}],eg=/(\s+|^)default(\s+|$)/,ze=function(){return{restrict:"A",controller:["$scope","$attrs",function(a,c){var d=this;this.$options=a.$eval(c.ngModelOptions);this.$options.updateOn!==t?(this.$options.updateOnDefault=
|
229
|
+
!1,this.$options.updateOn=U(this.$options.updateOn.replace(eg,function(){d.$options.updateOnDefault=!0;return" "}))):this.$options.updateOnDefault=!0}]}},le=Ja({terminal:!0,priority:1E3}),me=["$locale","$interpolate",function(a,c){var d=/{}/g,e=/^when(Minus)?(.+)$/;return{restrict:"EA",link:function(f,g,h){function l(a){g.text(a||"")}var k=h.count,m=h.$attr.when&&g.attr(h.$attr.when),n=h.offset||0,q=f.$eval(m)||{},u={},m=c.startSymbol(),r=c.endSymbol(),t=m+k+"-"+n+r,p=ca.noop,v;s(h,function(a,c){var d=
|
230
|
+
e.exec(c);d&&(d=(d[1]?"-":"")+Q(d[2]),q[d]=g.attr(h.$attr[c]))});s(q,function(a,e){u[e]=c(a.replace(d,t))});f.$watch(k,function(c){c=parseFloat(c);var d=isNaN(c);d||c in q||(c=a.pluralCat(c-n));c===v||d&&isNaN(v)||(p(),p=f.$watch(u[c],l),v=c)})}}}],ne=["$parse","$animate",function(a,c){var d=S("ngRepeat"),e=function(a,c,d,e,k,m,n){a[d]=e;k&&(a[k]=m);a.$index=c;a.$first=0===c;a.$last=c===n-1;a.$middle=!(a.$first||a.$last);a.$odd=!(a.$even=0===(c&1))};return{restrict:"A",multiElement:!0,transclude:"element",
|
231
|
+
priority:1E3,terminal:!0,$$tlb:!0,compile:function(f,g){var h=g.ngRepeat,l=Y.createComment(" end ngRepeat: "+h+" "),k=h.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!k)throw d("iexp",h);var m=k[1],n=k[2],q=k[3],u=k[4],k=m.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/);if(!k)throw d("iidexp",m);var r=k[3]||k[1],y=k[2];if(q&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(q)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(q)))throw d("badident",
|
232
|
+
q);var p,v,w,B,z={$id:Na};u?p=a(u):(w=function(a,c){return Na(c)},B=function(a){return a});return function(a,f,g,k,m){p&&(v=function(c,d,e){y&&(z[y]=c);z[r]=d;z.$index=e;return p(a,z)});var u=ha();a.$watchCollection(n,function(g){var k,p,n=f[0],E,z=ha(),x,T,N,G,H,C,I;q&&(a[q]=g);if(Ta(g))H=g,p=v||w;else{p=v||B;H=[];for(I in g)g.hasOwnProperty(I)&&"$"!=I.charAt(0)&&H.push(I);H.sort()}x=H.length;I=Array(x);for(k=0;k<x;k++)if(T=g===H?k:H[k],N=g[T],G=p(T,N,k),u[G])C=u[G],delete u[G],z[G]=C,I[k]=C;else{if(z[G])throw s(I,
|
233
|
+
function(a){a&&a.scope&&(u[a.id]=a)}),d("dupes",h,G,N);I[k]={id:G,scope:t,clone:t};z[G]=!0}for(E in u){C=u[E];G=ub(C.clone);c.leave(G);if(G[0].parentNode)for(k=0,p=G.length;k<p;k++)G[k].$$NG_REMOVED=!0;C.scope.$destroy()}for(k=0;k<x;k++)if(T=g===H?k:H[k],N=g[T],C=I[k],C.scope){E=n;do E=E.nextSibling;while(E&&E.$$NG_REMOVED);C.clone[0]!=E&&c.move(ub(C.clone),null,D(n));n=C.clone[C.clone.length-1];e(C.scope,k,r,N,y,T,x)}else m(function(a,d){C.scope=d;var f=l.cloneNode(!1);a[a.length++]=f;c.enter(a,
|
234
|
+
null,D(n));n=f;C.clone=a;z[C.id]=C;e(C.scope,k,r,N,y,T,x)});u=z})}}}}],oe=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(c,d,e){c.$watch(e.ngShow,function(c){a[c?"removeClass":"addClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],he=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(c,d,e){c.$watch(e.ngHide,function(c){a[c?"addClass":"removeClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],pe=Ja(function(a,c,d){a.$watchCollection(d.ngStyle,
|
235
|
+
function(a,d){d&&a!==d&&s(d,function(a,d){c.css(d,"")});a&&c.css(a)})}),qe=["$animate",function(a){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(c,d,e,f){var g=[],h=[],l=[],k=[],m=function(a,c){return function(){a.splice(c,1)}};c.$watch(e.ngSwitch||e.on,function(c){var d,e;d=0;for(e=l.length;d<e;++d)a.cancel(l[d]);d=l.length=0;for(e=k.length;d<e;++d){var r=ub(h[d].clone);k[d].$destroy();(l[d]=a.leave(r)).then(m(l,d))}h.length=0;k.length=0;(g=
|
236
|
+
f.cases["!"+c]||f.cases["?"])&&s(g,function(c){c.transclude(function(d,e){k.push(e);var f=c.element;d[d.length++]=Y.createComment(" end ngSwitchWhen: ");h.push({clone:d});a.enter(d,f.parent(),f)})})})}}}],re=Ja({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,c,d,e,f){e.cases["!"+d.ngSwitchWhen]=e.cases["!"+d.ngSwitchWhen]||[];e.cases["!"+d.ngSwitchWhen].push({transclude:f,element:c})}}),se=Ja({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,
|
237
|
+
link:function(a,c,d,e,f){e.cases["?"]=e.cases["?"]||[];e.cases["?"].push({transclude:f,element:c})}}),ue=Ja({restrict:"EAC",link:function(a,c,d,e,f){if(!f)throw S("ngTransclude")("orphan",va(c));f(function(a){c.empty();c.append(a)})}}),Vd=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(c,d){"text/ng-template"==d.type&&a.put(d.id,c[0].text)}}}],fg=S("ngOptions"),te=ea({restrict:"A",terminal:!0}),Wd=["$compile","$parse",function(a,c){var d=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,
|
238
|
+
e={$setViewValue:z};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(a,c,d){var l=this,k={},m=e,n;l.databound=d.ngModel;l.init=function(a,c,d){m=a;n=d};l.addOption=function(c,d){Ma(c,'"option value"');k[c]=!0;m.$viewValue==c&&(a.val(c),n.parent()&&n.remove());d&&d[0].hasAttribute("selected")&&(d[0].selected=!0)};l.removeOption=function(a){this.hasOption(a)&&(delete k[a],m.$viewValue===a&&this.renderUnknownOption(a))};l.renderUnknownOption=function(c){c=
|
239
|
+
"? "+Na(c)+" ?";n.val(c);a.prepend(n);a.val(c);n.prop("selected",!0)};l.hasOption=function(a){return k.hasOwnProperty(a)};c.$on("$destroy",function(){l.renderUnknownOption=z})}],link:function(e,g,h,l){function k(a,c,d,e){d.$render=function(){var a=d.$viewValue;e.hasOption(a)?(C.parent()&&C.remove(),c.val(a),""===a&&p.prop("selected",!0)):B(a)&&p?c.val(""):e.renderUnknownOption(a)};c.on("change",function(){a.$apply(function(){C.parent()&&C.remove();d.$setViewValue(c.val())})})}function m(a,c,d){var e;
|
240
|
+
d.$render=function(){var a=new eb(d.$viewValue);s(c.find("option"),function(c){c.selected=y(a.get(c.value))})};a.$watch(function(){ga(e,d.$viewValue)||(e=ra(d.$viewValue),d.$render())});c.on("change",function(){a.$apply(function(){var a=[];s(c.find("option"),function(c){c.selected&&a.push(c.value)});d.$setViewValue(a)})})}function n(e,f,g){function h(a,c,d){S[x]=d;D&&(S[D]=c);return a(e,S)}function k(a){var c;if(u)if(M&&H(a)){c=new eb([]);for(var d=0;d<a.length;d++)c.put(h(M,null,a[d]),!0)}else c=
|
241
|
+
new eb(a);else M&&(a=h(M,null,a));return function(d,e){var f;f=M?M:B?B:F;return u?y(c.remove(h(f,d,e))):a===h(f,d,e)}}function l(){v||(e.$$postDigest(p),v=!0)}function m(a,c,d){a[c]=a[c]||0;a[c]+=d?1:-1}function p(){v=!1;var a={"":[]},c=[""],d,l,n,r,t;n=g.$viewValue;r=O(e)||[];var B=D?Object.keys(r).sort():r,x,A,H,F,N={};t=k(n);var J=!1,U,V;Q={};for(F=0;H=B.length,F<H;F++){x=F;if(D&&(x=B[F],"$"===x.charAt(0)))continue;A=r[x];d=h(I,x,A)||"";(l=a[d])||(l=a[d]=[],c.push(d));d=t(x,A);J=J||d;A=h(C,x,A);
|
242
|
+
A=y(A)?A:"";V=M?M(e,S):D?B[F]:F;M&&(Q[V]=x);l.push({id:V,label:A,selected:d})}u||(z||null===n?a[""].unshift({id:"",label:"",selected:!J}):J||a[""].unshift({id:"?",label:"",selected:!0}));x=0;for(B=c.length;x<B;x++){d=c[x];l=a[d];R.length<=x?(n={element:G.clone().attr("label",d),label:l.label},r=[n],R.push(r),f.append(n.element)):(r=R[x],n=r[0],n.label!=d&&n.element.attr("label",n.label=d));J=null;F=0;for(H=l.length;F<H;F++)d=l[F],(t=r[F+1])?(J=t.element,t.label!==d.label&&(m(N,t.label,!1),m(N,d.label,
|
243
|
+
!0),J.text(t.label=d.label),J.prop("label",t.label)),t.id!==d.id&&J.val(t.id=d.id),J[0].selected!==d.selected&&(J.prop("selected",t.selected=d.selected),Ra&&J.prop("selected",t.selected))):(""===d.id&&z?U=z:(U=w.clone()).val(d.id).prop("selected",d.selected).attr("selected",d.selected).prop("label",d.label).text(d.label),r.push(t={element:U,label:d.label,id:d.id,selected:d.selected}),m(N,d.label,!0),J?J.after(U):n.element.append(U),J=U);for(F++;r.length>F;)d=r.pop(),m(N,d.label,!1),d.element.remove()}for(;R.length>
|
244
|
+
x;){l=R.pop();for(F=1;F<l.length;++F)m(N,l[F].label,!1);l[0].element.remove()}s(N,function(a,c){0<a?q.addOption(c):0>a&&q.removeOption(c)})}var n;if(!(n=r.match(d)))throw fg("iexp",r,va(f));var C=c(n[2]||n[1]),x=n[4]||n[6],A=/ as /.test(n[0])&&n[1],B=A?c(A):null,D=n[5],I=c(n[3]||""),F=c(n[2]?n[1]:x),O=c(n[7]),M=n[8]?c(n[8]):null,Q={},R=[[{element:f,label:""}]],S={};z&&(a(z)(e),z.removeClass("ng-scope"),z.remove());f.empty();f.on("change",function(){e.$apply(function(){var a=O(e)||[],c;if(u)c=[],s(f.val(),
|
245
|
+
function(d){d=M?Q[d]:d;c.push("?"===d?t:""===d?null:h(B?B:F,d,a[d]))});else{var d=M?Q[f.val()]:f.val();c="?"===d?t:""===d?null:h(B?B:F,d,a[d])}g.$setViewValue(c);p()})});g.$render=p;e.$watchCollection(O,l);e.$watchCollection(function(){var a=O(e),c;if(a&&H(a)){c=Array(a.length);for(var d=0,f=a.length;d<f;d++)c[d]=h(C,d,a[d])}else if(a)for(d in c={},a)a.hasOwnProperty(d)&&(c[d]=h(C,d,a[d]));return c},l);u&&e.$watchCollection(function(){return g.$modelValue},l)}if(l[1]){var q=l[0];l=l[1];var u=h.multiple,
|
246
|
+
r=h.ngOptions,z=!1,p,v=!1,w=D(Y.createElement("option")),G=D(Y.createElement("optgroup")),C=w.clone();h=0;for(var A=g.children(),x=A.length;h<x;h++)if(""===A[h].value){p=z=A.eq(h);break}q.init(l,z,C);u&&(l.$isEmpty=function(a){return!a||0===a.length});r?n(e,g,l):u?m(e,g,l):k(e,g,l,q)}}}}],Yd=["$interpolate",function(a){var c={addOption:z,removeOption:z};return{restrict:"E",priority:100,compile:function(d,e){if(B(e.value)){var f=a(d.text(),!0);f||e.$set("value",d.text())}return function(a,d,e){var k=
|
247
|
+
d.parent(),m=k.data("$selectController")||k.parent().data("$selectController");m&&m.databound||(m=c);f?a.$watch(f,function(a,c){e.$set("value",a);c!==a&&m.removeOption(c);m.addOption(a,d)}):m.addOption(e.value,d);d.on("$destroy",function(){m.removeOption(e.value)})}}}}],Xd=ea({restrict:"E",terminal:!1}),zc=function(){return{restrict:"A",require:"?ngModel",link:function(a,c,d,e){e&&(d.required=!0,e.$validators.required=function(a,c){return!d.required||!e.$isEmpty(c)},d.$observe("required",function(){e.$validate()}))}}},
|
248
|
+
yc=function(){return{restrict:"A",require:"?ngModel",link:function(a,c,d,e){if(e){var f,g=d.ngPattern||d.pattern;d.$observe("pattern",function(a){F(a)&&0<a.length&&(a=new RegExp("^"+a+"$"));if(a&&!a.test)throw S("ngPattern")("noregexp",g,a,va(c));f=a||t;e.$validate()});e.$validators.pattern=function(a){return e.$isEmpty(a)||B(f)||f.test(a)}}}}},Bc=function(){return{restrict:"A",require:"?ngModel",link:function(a,c,d,e){if(e){var f=-1;d.$observe("maxlength",function(a){a=ba(a);f=isNaN(a)?-1:a;e.$validate()});
|
249
|
+
e.$validators.maxlength=function(a,c){return 0>f||e.$isEmpty(c)||c.length<=f}}}}},Ac=function(){return{restrict:"A",require:"?ngModel",link:function(a,c,d,e){if(e){var f=0;d.$observe("minlength",function(a){f=ba(a)||0;e.$validate()});e.$validators.minlength=function(a,c){return e.$isEmpty(c)||c.length>=f}}}}};M.angular.bootstrap?console.log("WARNING: Tried to load angular more than once."):(Nd(),Pd(ca),D(Y).ready(function(){Jd(Y,sc)}))})(window,document);!window.angular.$$csp()&&window.angular.element(document).find("head").prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}</style>');
|
250
|
+
//# sourceMappingURL=angular.min.js.map
|
@@ -0,0 +1,2137 @@
|
|
1
|
+
/**
|
2
|
+
* @license AngularJS v1.4.0-beta.3
|
3
|
+
* (c) 2010-2015 Google, Inc. http://angularjs.org
|
4
|
+
* License: MIT
|
5
|
+
*/
|
6
|
+
(function(window, angular, undefined) {'use strict';
|
7
|
+
|
8
|
+
/* jshint maxlen: false */
|
9
|
+
|
10
|
+
/**
|
11
|
+
* @ngdoc module
|
12
|
+
* @name ngAnimate
|
13
|
+
* @description
|
14
|
+
*
|
15
|
+
* The `ngAnimate` module provides support for JavaScript, CSS3 transition and CSS3 keyframe animation hooks within existing core and custom directives.
|
16
|
+
*
|
17
|
+
* <div doc-module-components="ngAnimate"></div>
|
18
|
+
*
|
19
|
+
* # Usage
|
20
|
+
*
|
21
|
+
* To see animations in action, all that is required is to define the appropriate CSS classes
|
22
|
+
* or to register a JavaScript animation via the `myModule.animation()` function. The directives that support animation automatically are:
|
23
|
+
* `ngRepeat`, `ngInclude`, `ngIf`, `ngSwitch`, `ngShow`, `ngHide`, `ngView` and `ngClass`. Custom directives can take advantage of animation
|
24
|
+
* by using the `$animate` service.
|
25
|
+
*
|
26
|
+
* Below is a more detailed breakdown of the supported animation events provided by pre-existing ng directives:
|
27
|
+
*
|
28
|
+
* | Directive | Supported Animations |
|
29
|
+
* |----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|
|
30
|
+
* | {@link ng.directive:ngRepeat#animations ngRepeat} | enter, leave and move |
|
31
|
+
* | {@link ngRoute.directive:ngView#animations ngView} | enter and leave |
|
32
|
+
* | {@link ng.directive:ngInclude#animations ngInclude} | enter and leave |
|
33
|
+
* | {@link ng.directive:ngSwitch#animations ngSwitch} | enter and leave |
|
34
|
+
* | {@link ng.directive:ngIf#animations ngIf} | enter and leave |
|
35
|
+
* | {@link ng.directive:ngClass#animations ngClass} | add and remove (the CSS class(es) present) |
|
36
|
+
* | {@link ng.directive:ngShow#animations ngShow} & {@link ng.directive:ngHide#animations ngHide} | add and remove (the ng-hide class value) |
|
37
|
+
* | {@link ng.directive:form#animation-hooks form} & {@link ng.directive:ngModel#animation-hooks ngModel} | add and remove (dirty, pristine, valid, invalid & all other validations) |
|
38
|
+
* | {@link module:ngMessages#animations ngMessages} | add and remove (ng-active & ng-inactive) |
|
39
|
+
* | {@link module:ngMessages#animations ngMessage} | enter and leave |
|
40
|
+
*
|
41
|
+
* You can find out more information about animations upon visiting each directive page.
|
42
|
+
*
|
43
|
+
* Below is an example of how to apply animations to a directive that supports animation hooks:
|
44
|
+
*
|
45
|
+
* ```html
|
46
|
+
* <style type="text/css">
|
47
|
+
* .slide.ng-enter, .slide.ng-leave {
|
48
|
+
* -webkit-transition:0.5s linear all;
|
49
|
+
* transition:0.5s linear all;
|
50
|
+
* }
|
51
|
+
*
|
52
|
+
* .slide.ng-enter { } /* starting animations for enter */
|
53
|
+
* .slide.ng-enter.ng-enter-active { } /* terminal animations for enter */
|
54
|
+
* .slide.ng-leave { } /* starting animations for leave */
|
55
|
+
* .slide.ng-leave.ng-leave-active { } /* terminal animations for leave */
|
56
|
+
* </style>
|
57
|
+
*
|
58
|
+
* <!--
|
59
|
+
* the animate service will automatically add .ng-enter and .ng-leave to the element
|
60
|
+
* to trigger the CSS transition/animations
|
61
|
+
* -->
|
62
|
+
* <ANY class="slide" ng-include="..."></ANY>
|
63
|
+
* ```
|
64
|
+
*
|
65
|
+
* Keep in mind that, by default, if an animation is running, any child elements cannot be animated
|
66
|
+
* until the parent element's animation has completed. This blocking feature can be overridden by
|
67
|
+
* placing the `ng-animate-children` attribute on a parent container tag.
|
68
|
+
*
|
69
|
+
* ```html
|
70
|
+
* <div class="slide-animation" ng-if="on" ng-animate-children>
|
71
|
+
* <div class="fade-animation" ng-if="on">
|
72
|
+
* <div class="explode-animation" ng-if="on">
|
73
|
+
* ...
|
74
|
+
* </div>
|
75
|
+
* </div>
|
76
|
+
* </div>
|
77
|
+
* ```
|
78
|
+
*
|
79
|
+
* When the `on` expression value changes and an animation is triggered then each of the elements within
|
80
|
+
* will all animate without the block being applied to child elements.
|
81
|
+
*
|
82
|
+
* ## Are animations run when the application starts?
|
83
|
+
* No they are not. When an application is bootstrapped Angular will disable animations from running to avoid
|
84
|
+
* a frenzy of animations from being triggered as soon as the browser has rendered the screen. For this to work,
|
85
|
+
* Angular will wait for two digest cycles until enabling animations. From there on, any animation-triggering
|
86
|
+
* layout changes in the application will trigger animations as normal.
|
87
|
+
*
|
88
|
+
* In addition, upon bootstrap, if the routing system or any directives or load remote data (via $http) then Angular
|
89
|
+
* will automatically extend the wait time to enable animations once **all** of the outbound HTTP requests
|
90
|
+
* are complete.
|
91
|
+
*
|
92
|
+
* ## CSS-defined Animations
|
93
|
+
* The animate service will automatically apply two CSS classes to the animated element and these two CSS classes
|
94
|
+
* are designed to contain the start and end CSS styling. Both CSS transitions and keyframe animations are supported
|
95
|
+
* and can be used to play along with this naming structure.
|
96
|
+
*
|
97
|
+
* The following code below demonstrates how to perform animations using **CSS transitions** with Angular:
|
98
|
+
*
|
99
|
+
* ```html
|
100
|
+
* <style type="text/css">
|
101
|
+
* /*
|
102
|
+
* The animate class is apart of the element and the ng-enter class
|
103
|
+
* is attached to the element once the enter animation event is triggered
|
104
|
+
* */
|
105
|
+
* .reveal-animation.ng-enter {
|
106
|
+
* -webkit-transition: 1s linear all; /* Safari/Chrome */
|
107
|
+
* transition: 1s linear all; /* All other modern browsers and IE10+ */
|
108
|
+
*
|
109
|
+
* /* The animation preparation code */
|
110
|
+
* opacity: 0;
|
111
|
+
* }
|
112
|
+
*
|
113
|
+
* /*
|
114
|
+
* Keep in mind that you want to combine both CSS
|
115
|
+
* classes together to avoid any CSS-specificity
|
116
|
+
* conflicts
|
117
|
+
* */
|
118
|
+
* .reveal-animation.ng-enter.ng-enter-active {
|
119
|
+
* /* The animation code itself */
|
120
|
+
* opacity: 1;
|
121
|
+
* }
|
122
|
+
* </style>
|
123
|
+
*
|
124
|
+
* <div class="view-container">
|
125
|
+
* <div ng-view class="reveal-animation"></div>
|
126
|
+
* </div>
|
127
|
+
* ```
|
128
|
+
*
|
129
|
+
* The following code below demonstrates how to perform animations using **CSS animations** with Angular:
|
130
|
+
*
|
131
|
+
* ```html
|
132
|
+
* <style type="text/css">
|
133
|
+
* .reveal-animation.ng-enter {
|
134
|
+
* -webkit-animation: enter_sequence 1s linear; /* Safari/Chrome */
|
135
|
+
* animation: enter_sequence 1s linear; /* IE10+ and Future Browsers */
|
136
|
+
* }
|
137
|
+
* @-webkit-keyframes enter_sequence {
|
138
|
+
* from { opacity:0; }
|
139
|
+
* to { opacity:1; }
|
140
|
+
* }
|
141
|
+
* @keyframes enter_sequence {
|
142
|
+
* from { opacity:0; }
|
143
|
+
* to { opacity:1; }
|
144
|
+
* }
|
145
|
+
* </style>
|
146
|
+
*
|
147
|
+
* <div class="view-container">
|
148
|
+
* <div ng-view class="reveal-animation"></div>
|
149
|
+
* </div>
|
150
|
+
* ```
|
151
|
+
*
|
152
|
+
* Both CSS3 animations and transitions can be used together and the animate service will figure out the correct duration and delay timing.
|
153
|
+
*
|
154
|
+
* Upon DOM mutation, the event class is added first (something like `ng-enter`), then the browser prepares itself to add
|
155
|
+
* the active class (in this case `ng-enter-active`) which then triggers the animation. The animation module will automatically
|
156
|
+
* detect the CSS code to determine when the animation ends. Once the animation is over then both CSS classes will be
|
157
|
+
* removed from the DOM. If a browser does not support CSS transitions or CSS animations then the animation will start and end
|
158
|
+
* immediately resulting in a DOM element that is at its final state. This final state is when the DOM element
|
159
|
+
* has no CSS transition/animation classes applied to it.
|
160
|
+
*
|
161
|
+
* ### Structural transition animations
|
162
|
+
*
|
163
|
+
* Structural transitions (such as enter, leave and move) will always apply a `0s none` transition
|
164
|
+
* value to force the browser into rendering the styles defined in the setup (`.ng-enter`, `.ng-leave`
|
165
|
+
* or `.ng-move`) class. This means that any active transition animations operating on the element
|
166
|
+
* will be cut off to make way for the enter, leave or move animation.
|
167
|
+
*
|
168
|
+
* ### Class-based transition animations
|
169
|
+
*
|
170
|
+
* Class-based transitions refer to transition animations that are triggered when a CSS class is
|
171
|
+
* added to or removed from the element (via `$animate.addClass`, `$animate.removeClass`,
|
172
|
+
* `$animate.setClass`, or by directives such as `ngClass`, `ngModel` and `form`).
|
173
|
+
* They are different when compared to structural animations since they **do not cancel existing
|
174
|
+
* animations** nor do they **block successive transitions** from rendering on the same element.
|
175
|
+
* This distinction allows for **multiple class-based transitions** to be performed on the same element.
|
176
|
+
*
|
177
|
+
* In addition to ngAnimate supporting the default (natural) functionality of class-based transition
|
178
|
+
* animations, ngAnimate also decorates the element with starting and ending CSS classes to aid the
|
179
|
+
* developer in further styling the element throughout the transition animation. Earlier versions
|
180
|
+
* of ngAnimate may have caused natural CSS transitions to break and not render properly due to
|
181
|
+
* $animate temporarily blocking transitions using `0s none` in order to allow the setup CSS class
|
182
|
+
* (the `-add` or `-remove` class) to be applied without triggering an animation. However, as of
|
183
|
+
* **version 1.3**, this workaround has been removed with ngAnimate and all non-ngAnimate CSS
|
184
|
+
* class transitions are compatible with ngAnimate.
|
185
|
+
*
|
186
|
+
* There is, however, one special case when dealing with class-based transitions in ngAnimate.
|
187
|
+
* When rendering class-based transitions that make use of the setup and active CSS classes
|
188
|
+
* (e.g. `.fade-add` and `.fade-add-active` for when `.fade` is added) be sure to define
|
189
|
+
* the transition value **on the active CSS class** and not the setup class.
|
190
|
+
*
|
191
|
+
* ```css
|
192
|
+
* .fade-add {
|
193
|
+
* /* remember to place a 0s transition here
|
194
|
+
* to ensure that the styles are applied instantly
|
195
|
+
* even if the element already has a transition style */
|
196
|
+
* transition:0s linear all;
|
197
|
+
*
|
198
|
+
* /* starting CSS styles */
|
199
|
+
* opacity:1;
|
200
|
+
* }
|
201
|
+
* .fade-add.fade-add-active {
|
202
|
+
* /* this will be the length of the animation */
|
203
|
+
* transition:1s linear all;
|
204
|
+
* opacity:0;
|
205
|
+
* }
|
206
|
+
* ```
|
207
|
+
*
|
208
|
+
* The setup CSS class (in this case `.fade-add`) also has a transition style property, however, it
|
209
|
+
* has a duration of zero. This may not be required, however, incase the browser is unable to render
|
210
|
+
* the styling present in this CSS class instantly then it could be that the browser is attempting
|
211
|
+
* to perform an unnecessary transition.
|
212
|
+
*
|
213
|
+
* This workaround, however, does not apply to standard class-based transitions that are rendered
|
214
|
+
* when a CSS class containing a transition is applied to an element:
|
215
|
+
*
|
216
|
+
* ```css
|
217
|
+
* /* this works as expected */
|
218
|
+
* .fade {
|
219
|
+
* transition:1s linear all;
|
220
|
+
* opacity:0;
|
221
|
+
* }
|
222
|
+
* ```
|
223
|
+
*
|
224
|
+
* Please keep this in mind when coding the CSS markup that will be used within class-based transitions.
|
225
|
+
* Also, try not to mix the two class-based animation flavors together since the CSS code may become
|
226
|
+
* overly complex.
|
227
|
+
*
|
228
|
+
*
|
229
|
+
* ### Preventing Collisions With Third Party Libraries
|
230
|
+
*
|
231
|
+
* Some third-party frameworks place animation duration defaults across many element or className
|
232
|
+
* selectors in order to make their code small and reuseable. This can lead to issues with ngAnimate, which
|
233
|
+
* is expecting actual animations on these elements and has to wait for their completion.
|
234
|
+
*
|
235
|
+
* You can prevent this unwanted behavior by using a prefix on all your animation classes:
|
236
|
+
*
|
237
|
+
* ```css
|
238
|
+
* /* prefixed with animate- */
|
239
|
+
* .animate-fade-add.animate-fade-add-active {
|
240
|
+
* transition:1s linear all;
|
241
|
+
* opacity:0;
|
242
|
+
* }
|
243
|
+
* ```
|
244
|
+
*
|
245
|
+
* You then configure `$animate` to enforce this prefix:
|
246
|
+
*
|
247
|
+
* ```js
|
248
|
+
* $animateProvider.classNameFilter(/animate-/);
|
249
|
+
* ```
|
250
|
+
* </div>
|
251
|
+
*
|
252
|
+
* ### CSS Staggering Animations
|
253
|
+
* A Staggering animation is a collection of animations that are issued with a slight delay in between each successive operation resulting in a
|
254
|
+
* curtain-like effect. The ngAnimate module (versions >=1.2) supports staggering animations and the stagger effect can be
|
255
|
+
* performed by creating a **ng-EVENT-stagger** CSS class and attaching that class to the base CSS class used for
|
256
|
+
* the animation. The style property expected within the stagger class can either be a **transition-delay** or an
|
257
|
+
* **animation-delay** property (or both if your animation contains both transitions and keyframe animations).
|
258
|
+
*
|
259
|
+
* ```css
|
260
|
+
* .my-animation.ng-enter {
|
261
|
+
* /* standard transition code */
|
262
|
+
* -webkit-transition: 1s linear all;
|
263
|
+
* transition: 1s linear all;
|
264
|
+
* opacity:0;
|
265
|
+
* }
|
266
|
+
* .my-animation.ng-enter-stagger {
|
267
|
+
* /* this will have a 100ms delay between each successive leave animation */
|
268
|
+
* -webkit-transition-delay: 0.1s;
|
269
|
+
* transition-delay: 0.1s;
|
270
|
+
*
|
271
|
+
* /* in case the stagger doesn't work then these two values
|
272
|
+
* must be set to 0 to avoid an accidental CSS inheritance */
|
273
|
+
* -webkit-transition-duration: 0s;
|
274
|
+
* transition-duration: 0s;
|
275
|
+
* }
|
276
|
+
* .my-animation.ng-enter.ng-enter-active {
|
277
|
+
* /* standard transition styles */
|
278
|
+
* opacity:1;
|
279
|
+
* }
|
280
|
+
* ```
|
281
|
+
*
|
282
|
+
* Staggering animations work by default in ngRepeat (so long as the CSS class is defined). Outside of ngRepeat, to use staggering animations
|
283
|
+
* on your own, they can be triggered by firing multiple calls to the same event on $animate. However, the restrictions surrounding this
|
284
|
+
* are that each of the elements must have the same CSS className value as well as the same parent element. A stagger operation
|
285
|
+
* will also be reset if more than 10ms has passed after the last animation has been fired.
|
286
|
+
*
|
287
|
+
* The following code will issue the **ng-leave-stagger** event on the element provided:
|
288
|
+
*
|
289
|
+
* ```js
|
290
|
+
* var kids = parent.children();
|
291
|
+
*
|
292
|
+
* $animate.leave(kids[0]); //stagger index=0
|
293
|
+
* $animate.leave(kids[1]); //stagger index=1
|
294
|
+
* $animate.leave(kids[2]); //stagger index=2
|
295
|
+
* $animate.leave(kids[3]); //stagger index=3
|
296
|
+
* $animate.leave(kids[4]); //stagger index=4
|
297
|
+
*
|
298
|
+
* $timeout(function() {
|
299
|
+
* //stagger has reset itself
|
300
|
+
* $animate.leave(kids[5]); //stagger index=0
|
301
|
+
* $animate.leave(kids[6]); //stagger index=1
|
302
|
+
* }, 100, false);
|
303
|
+
* ```
|
304
|
+
*
|
305
|
+
* Stagger animations are currently only supported within CSS-defined animations.
|
306
|
+
*
|
307
|
+
* ## JavaScript-defined Animations
|
308
|
+
* In the event that you do not want to use CSS3 transitions or CSS3 animations or if you wish to offer animations on browsers that do not
|
309
|
+
* yet support CSS transitions/animations, then you can make use of JavaScript animations defined inside of your AngularJS module.
|
310
|
+
*
|
311
|
+
* ```js
|
312
|
+
* //!annotate="YourApp" Your AngularJS Module|Replace this or ngModule with the module that you used to define your application.
|
313
|
+
* var ngModule = angular.module('YourApp', ['ngAnimate']);
|
314
|
+
* ngModule.animation('.my-crazy-animation', function() {
|
315
|
+
* return {
|
316
|
+
* enter: function(element, done) {
|
317
|
+
* //run the animation here and call done when the animation is complete
|
318
|
+
* return function(cancelled) {
|
319
|
+
* //this (optional) function will be called when the animation
|
320
|
+
* //completes or when the animation is cancelled (the cancelled
|
321
|
+
* //flag will be set to true if cancelled).
|
322
|
+
* };
|
323
|
+
* },
|
324
|
+
* leave: function(element, done) { },
|
325
|
+
* move: function(element, done) { },
|
326
|
+
*
|
327
|
+
* //animation that can be triggered before the class is added
|
328
|
+
* beforeAddClass: function(element, className, done) { },
|
329
|
+
*
|
330
|
+
* //animation that can be triggered after the class is added
|
331
|
+
* addClass: function(element, className, done) { },
|
332
|
+
*
|
333
|
+
* //animation that can be triggered before the class is removed
|
334
|
+
* beforeRemoveClass: function(element, className, done) { },
|
335
|
+
*
|
336
|
+
* //animation that can be triggered after the class is removed
|
337
|
+
* removeClass: function(element, className, done) { }
|
338
|
+
* };
|
339
|
+
* });
|
340
|
+
* ```
|
341
|
+
*
|
342
|
+
* JavaScript-defined animations are created with a CSS-like class selector and a collection of events which are set to run
|
343
|
+
* a javascript callback function. When an animation is triggered, $animate will look for a matching animation which fits
|
344
|
+
* the element's CSS class attribute value and then run the matching animation event function (if found).
|
345
|
+
* In other words, if the CSS classes present on the animated element match any of the JavaScript animations then the callback function will
|
346
|
+
* be executed. It should be also noted that only simple, single class selectors are allowed (compound class selectors are not supported).
|
347
|
+
*
|
348
|
+
* Within a JavaScript animation, an object containing various event callback animation functions is expected to be returned.
|
349
|
+
* As explained above, these callbacks are triggered based on the animation event. Therefore if an enter animation is run,
|
350
|
+
* and the JavaScript animation is found, then the enter callback will handle that animation (in addition to the CSS keyframe animation
|
351
|
+
* or transition code that is defined via a stylesheet).
|
352
|
+
*
|
353
|
+
*
|
354
|
+
* ### Applying Directive-specific Styles to an Animation
|
355
|
+
* In some cases a directive or service may want to provide `$animate` with extra details that the animation will
|
356
|
+
* include into its animation. Let's say for example we wanted to render an animation that animates an element
|
357
|
+
* towards the mouse coordinates as to where the user clicked last. By collecting the X/Y coordinates of the click
|
358
|
+
* (via the event parameter) we can set the `top` and `left` styles into an object and pass that into our function
|
359
|
+
* call to `$animate.addClass`.
|
360
|
+
*
|
361
|
+
* ```js
|
362
|
+
* canvas.on('click', function(e) {
|
363
|
+
* $animate.addClass(element, 'on', {
|
364
|
+
* to: {
|
365
|
+
* left : e.client.x + 'px',
|
366
|
+
* top : e.client.y + 'px'
|
367
|
+
* }
|
368
|
+
* }):
|
369
|
+
* });
|
370
|
+
* ```
|
371
|
+
*
|
372
|
+
* Now when the animation runs, and a transition or keyframe animation is picked up, then the animation itself will
|
373
|
+
* also include and transition the styling of the `left` and `top` properties into its running animation. If we want
|
374
|
+
* to provide some starting animation values then we can do so by placing the starting animations styles into an object
|
375
|
+
* called `from` in the same object as the `to` animations.
|
376
|
+
*
|
377
|
+
* ```js
|
378
|
+
* canvas.on('click', function(e) {
|
379
|
+
* $animate.addClass(element, 'on', {
|
380
|
+
* from: {
|
381
|
+
* position: 'absolute',
|
382
|
+
* left: '0px',
|
383
|
+
* top: '0px'
|
384
|
+
* },
|
385
|
+
* to: {
|
386
|
+
* left : e.client.x + 'px',
|
387
|
+
* top : e.client.y + 'px'
|
388
|
+
* }
|
389
|
+
* }):
|
390
|
+
* });
|
391
|
+
* ```
|
392
|
+
*
|
393
|
+
* Once the animation is complete or cancelled then the union of both the before and after styles are applied to the
|
394
|
+
* element. If `ngAnimate` is not present then the styles will be applied immediately.
|
395
|
+
*
|
396
|
+
*/
|
397
|
+
|
398
|
+
angular.module('ngAnimate', ['ng'])
|
399
|
+
|
400
|
+
/**
|
401
|
+
* @ngdoc provider
|
402
|
+
* @name $animateProvider
|
403
|
+
* @description
|
404
|
+
*
|
405
|
+
* The `$animateProvider` allows developers to register JavaScript animation event handlers directly inside of a module.
|
406
|
+
* When an animation is triggered, the $animate service will query the $animate service to find any animations that match
|
407
|
+
* the provided name value.
|
408
|
+
*
|
409
|
+
* Requires the {@link ngAnimate `ngAnimate`} module to be installed.
|
410
|
+
*
|
411
|
+
* Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application.
|
412
|
+
*
|
413
|
+
*/
|
414
|
+
.directive('ngAnimateChildren', function() {
|
415
|
+
var NG_ANIMATE_CHILDREN = '$$ngAnimateChildren';
|
416
|
+
return function(scope, element, attrs) {
|
417
|
+
var val = attrs.ngAnimateChildren;
|
418
|
+
if (angular.isString(val) && val.length === 0) { //empty attribute
|
419
|
+
element.data(NG_ANIMATE_CHILDREN, true);
|
420
|
+
} else {
|
421
|
+
scope.$watch(val, function(value) {
|
422
|
+
element.data(NG_ANIMATE_CHILDREN, !!value);
|
423
|
+
});
|
424
|
+
}
|
425
|
+
};
|
426
|
+
})
|
427
|
+
|
428
|
+
//this private service is only used within CSS-enabled animations
|
429
|
+
//IE8 + IE9 do not support rAF natively, but that is fine since they
|
430
|
+
//also don't support transitions and keyframes which means that the code
|
431
|
+
//below will never be used by the two browsers.
|
432
|
+
.factory('$$animateReflow', ['$$rAF', '$document', function($$rAF, $document) {
|
433
|
+
var bod = $document[0].body;
|
434
|
+
return function(fn) {
|
435
|
+
//the returned function acts as the cancellation function
|
436
|
+
return $$rAF(function() {
|
437
|
+
//the line below will force the browser to perform a repaint
|
438
|
+
//so that all the animated elements within the animation frame
|
439
|
+
//will be properly updated and drawn on screen. This is
|
440
|
+
//required to perform multi-class CSS based animations with
|
441
|
+
//Firefox. DO NOT REMOVE THIS LINE.
|
442
|
+
var a = bod.offsetWidth + 1;
|
443
|
+
fn();
|
444
|
+
});
|
445
|
+
};
|
446
|
+
}])
|
447
|
+
|
448
|
+
.config(['$provide', '$animateProvider', function($provide, $animateProvider) {
|
449
|
+
var noop = angular.noop;
|
450
|
+
var forEach = angular.forEach;
|
451
|
+
var selectors = $animateProvider.$$selectors;
|
452
|
+
var isArray = angular.isArray;
|
453
|
+
var isString = angular.isString;
|
454
|
+
var isObject = angular.isObject;
|
455
|
+
|
456
|
+
var ELEMENT_NODE = 1;
|
457
|
+
var NG_ANIMATE_STATE = '$$ngAnimateState';
|
458
|
+
var NG_ANIMATE_CHILDREN = '$$ngAnimateChildren';
|
459
|
+
var NG_ANIMATE_CLASS_NAME = 'ng-animate';
|
460
|
+
var rootAnimateState = {running: true};
|
461
|
+
|
462
|
+
function extractElementNode(element) {
|
463
|
+
for (var i = 0; i < element.length; i++) {
|
464
|
+
var elm = element[i];
|
465
|
+
if (elm.nodeType == ELEMENT_NODE) {
|
466
|
+
return elm;
|
467
|
+
}
|
468
|
+
}
|
469
|
+
}
|
470
|
+
|
471
|
+
function prepareElement(element) {
|
472
|
+
return element && angular.element(element);
|
473
|
+
}
|
474
|
+
|
475
|
+
function stripCommentsFromElement(element) {
|
476
|
+
return angular.element(extractElementNode(element));
|
477
|
+
}
|
478
|
+
|
479
|
+
function isMatchingElement(elm1, elm2) {
|
480
|
+
return extractElementNode(elm1) == extractElementNode(elm2);
|
481
|
+
}
|
482
|
+
var $$jqLite;
|
483
|
+
$provide.decorator('$animate',
|
484
|
+
['$delegate', '$$q', '$injector', '$sniffer', '$rootElement', '$$asyncCallback', '$rootScope', '$document', '$templateRequest', '$$jqLite',
|
485
|
+
function($delegate, $$q, $injector, $sniffer, $rootElement, $$asyncCallback, $rootScope, $document, $templateRequest, $$$jqLite) {
|
486
|
+
|
487
|
+
$$jqLite = $$$jqLite;
|
488
|
+
$rootElement.data(NG_ANIMATE_STATE, rootAnimateState);
|
489
|
+
|
490
|
+
// Wait until all directive and route-related templates are downloaded and
|
491
|
+
// compiled. The $templateRequest.totalPendingRequests variable keeps track of
|
492
|
+
// all of the remote templates being currently downloaded. If there are no
|
493
|
+
// templates currently downloading then the watcher will still fire anyway.
|
494
|
+
var deregisterWatch = $rootScope.$watch(
|
495
|
+
function() { return $templateRequest.totalPendingRequests; },
|
496
|
+
function(val, oldVal) {
|
497
|
+
if (val !== 0) return;
|
498
|
+
deregisterWatch();
|
499
|
+
|
500
|
+
// Now that all templates have been downloaded, $animate will wait until
|
501
|
+
// the post digest queue is empty before enabling animations. By having two
|
502
|
+
// calls to $postDigest calls we can ensure that the flag is enabled at the
|
503
|
+
// very end of the post digest queue. Since all of the animations in $animate
|
504
|
+
// use $postDigest, it's important that the code below executes at the end.
|
505
|
+
// This basically means that the page is fully downloaded and compiled before
|
506
|
+
// any animations are triggered.
|
507
|
+
$rootScope.$$postDigest(function() {
|
508
|
+
$rootScope.$$postDigest(function() {
|
509
|
+
rootAnimateState.running = false;
|
510
|
+
});
|
511
|
+
});
|
512
|
+
}
|
513
|
+
);
|
514
|
+
|
515
|
+
var globalAnimationCounter = 0;
|
516
|
+
var classNameFilter = $animateProvider.classNameFilter();
|
517
|
+
var isAnimatableClassName = !classNameFilter
|
518
|
+
? function() { return true; }
|
519
|
+
: function(className) {
|
520
|
+
return classNameFilter.test(className);
|
521
|
+
};
|
522
|
+
|
523
|
+
function classBasedAnimationsBlocked(element, setter) {
|
524
|
+
var data = element.data(NG_ANIMATE_STATE) || {};
|
525
|
+
if (setter) {
|
526
|
+
data.running = true;
|
527
|
+
data.structural = true;
|
528
|
+
element.data(NG_ANIMATE_STATE, data);
|
529
|
+
}
|
530
|
+
return data.disabled || (data.running && data.structural);
|
531
|
+
}
|
532
|
+
|
533
|
+
function runAnimationPostDigest(fn) {
|
534
|
+
var cancelFn, defer = $$q.defer();
|
535
|
+
defer.promise.$$cancelFn = function() {
|
536
|
+
cancelFn && cancelFn();
|
537
|
+
};
|
538
|
+
$rootScope.$$postDigest(function() {
|
539
|
+
cancelFn = fn(function() {
|
540
|
+
defer.resolve();
|
541
|
+
});
|
542
|
+
});
|
543
|
+
return defer.promise;
|
544
|
+
}
|
545
|
+
|
546
|
+
function parseAnimateOptions(options) {
|
547
|
+
// some plugin code may still be passing in the callback
|
548
|
+
// function as the last param for the $animate methods so
|
549
|
+
// it's best to only allow string or array values for now
|
550
|
+
if (isObject(options)) {
|
551
|
+
if (options.tempClasses && isString(options.tempClasses)) {
|
552
|
+
options.tempClasses = options.tempClasses.split(/\s+/);
|
553
|
+
}
|
554
|
+
return options;
|
555
|
+
}
|
556
|
+
}
|
557
|
+
|
558
|
+
function resolveElementClasses(element, cache, runningAnimations) {
|
559
|
+
runningAnimations = runningAnimations || {};
|
560
|
+
|
561
|
+
var lookup = {};
|
562
|
+
forEach(runningAnimations, function(data, selector) {
|
563
|
+
forEach(selector.split(' '), function(s) {
|
564
|
+
lookup[s]=data;
|
565
|
+
});
|
566
|
+
});
|
567
|
+
|
568
|
+
var hasClasses = Object.create(null);
|
569
|
+
forEach((element.attr('class') || '').split(/\s+/), function(className) {
|
570
|
+
hasClasses[className] = true;
|
571
|
+
});
|
572
|
+
|
573
|
+
var toAdd = [], toRemove = [];
|
574
|
+
forEach((cache && cache.classes) || [], function(status, className) {
|
575
|
+
var hasClass = hasClasses[className];
|
576
|
+
var matchingAnimation = lookup[className] || {};
|
577
|
+
|
578
|
+
// When addClass and removeClass is called then $animate will check to
|
579
|
+
// see if addClass and removeClass cancel each other out. When there are
|
580
|
+
// more calls to removeClass than addClass then the count falls below 0
|
581
|
+
// and then the removeClass animation will be allowed. Otherwise if the
|
582
|
+
// count is above 0 then that means an addClass animation will commence.
|
583
|
+
// Once an animation is allowed then the code will also check to see if
|
584
|
+
// there exists any on-going animation that is already adding or remvoing
|
585
|
+
// the matching CSS class.
|
586
|
+
if (status === false) {
|
587
|
+
//does it have the class or will it have the class
|
588
|
+
if (hasClass || matchingAnimation.event == 'addClass') {
|
589
|
+
toRemove.push(className);
|
590
|
+
}
|
591
|
+
} else if (status === true) {
|
592
|
+
//is the class missing or will it be removed?
|
593
|
+
if (!hasClass || matchingAnimation.event == 'removeClass') {
|
594
|
+
toAdd.push(className);
|
595
|
+
}
|
596
|
+
}
|
597
|
+
});
|
598
|
+
|
599
|
+
return (toAdd.length + toRemove.length) > 0 && [toAdd.join(' '), toRemove.join(' ')];
|
600
|
+
}
|
601
|
+
|
602
|
+
function lookup(name) {
|
603
|
+
if (name) {
|
604
|
+
var matches = [],
|
605
|
+
flagMap = {},
|
606
|
+
classes = name.substr(1).split('.');
|
607
|
+
|
608
|
+
//the empty string value is the default animation
|
609
|
+
//operation which performs CSS transition and keyframe
|
610
|
+
//animations sniffing. This is always included for each
|
611
|
+
//element animation procedure if the browser supports
|
612
|
+
//transitions and/or keyframe animations. The default
|
613
|
+
//animation is added to the top of the list to prevent
|
614
|
+
//any previous animations from affecting the element styling
|
615
|
+
//prior to the element being animated.
|
616
|
+
if ($sniffer.transitions || $sniffer.animations) {
|
617
|
+
matches.push($injector.get(selectors['']));
|
618
|
+
}
|
619
|
+
|
620
|
+
for (var i=0; i < classes.length; i++) {
|
621
|
+
var klass = classes[i],
|
622
|
+
selectorFactoryName = selectors[klass];
|
623
|
+
if (selectorFactoryName && !flagMap[klass]) {
|
624
|
+
matches.push($injector.get(selectorFactoryName));
|
625
|
+
flagMap[klass] = true;
|
626
|
+
}
|
627
|
+
}
|
628
|
+
return matches;
|
629
|
+
}
|
630
|
+
}
|
631
|
+
|
632
|
+
function animationRunner(element, animationEvent, className, options) {
|
633
|
+
//transcluded directives may sometimes fire an animation using only comment nodes
|
634
|
+
//best to catch this early on to prevent any animation operations from occurring
|
635
|
+
var node = element[0];
|
636
|
+
if (!node) {
|
637
|
+
return;
|
638
|
+
}
|
639
|
+
|
640
|
+
if (options) {
|
641
|
+
options.to = options.to || {};
|
642
|
+
options.from = options.from || {};
|
643
|
+
}
|
644
|
+
|
645
|
+
var classNameAdd;
|
646
|
+
var classNameRemove;
|
647
|
+
if (isArray(className)) {
|
648
|
+
classNameAdd = className[0];
|
649
|
+
classNameRemove = className[1];
|
650
|
+
if (!classNameAdd) {
|
651
|
+
className = classNameRemove;
|
652
|
+
animationEvent = 'removeClass';
|
653
|
+
} else if (!classNameRemove) {
|
654
|
+
className = classNameAdd;
|
655
|
+
animationEvent = 'addClass';
|
656
|
+
} else {
|
657
|
+
className = classNameAdd + ' ' + classNameRemove;
|
658
|
+
}
|
659
|
+
}
|
660
|
+
|
661
|
+
var isSetClassOperation = animationEvent == 'setClass';
|
662
|
+
var isClassBased = isSetClassOperation
|
663
|
+
|| animationEvent == 'addClass'
|
664
|
+
|| animationEvent == 'removeClass'
|
665
|
+
|| animationEvent == 'animate';
|
666
|
+
|
667
|
+
var currentClassName = element.attr('class');
|
668
|
+
var classes = currentClassName + ' ' + className;
|
669
|
+
if (!isAnimatableClassName(classes)) {
|
670
|
+
return;
|
671
|
+
}
|
672
|
+
|
673
|
+
var beforeComplete = noop,
|
674
|
+
beforeCancel = [],
|
675
|
+
before = [],
|
676
|
+
afterComplete = noop,
|
677
|
+
afterCancel = [],
|
678
|
+
after = [];
|
679
|
+
|
680
|
+
var animationLookup = (' ' + classes).replace(/\s+/g,'.');
|
681
|
+
forEach(lookup(animationLookup), function(animationFactory) {
|
682
|
+
var created = registerAnimation(animationFactory, animationEvent);
|
683
|
+
if (!created && isSetClassOperation) {
|
684
|
+
registerAnimation(animationFactory, 'addClass');
|
685
|
+
registerAnimation(animationFactory, 'removeClass');
|
686
|
+
}
|
687
|
+
});
|
688
|
+
|
689
|
+
function registerAnimation(animationFactory, event) {
|
690
|
+
var afterFn = animationFactory[event];
|
691
|
+
var beforeFn = animationFactory['before' + event.charAt(0).toUpperCase() + event.substr(1)];
|
692
|
+
if (afterFn || beforeFn) {
|
693
|
+
if (event == 'leave') {
|
694
|
+
beforeFn = afterFn;
|
695
|
+
//when set as null then animation knows to skip this phase
|
696
|
+
afterFn = null;
|
697
|
+
}
|
698
|
+
after.push({
|
699
|
+
event: event, fn: afterFn
|
700
|
+
});
|
701
|
+
before.push({
|
702
|
+
event: event, fn: beforeFn
|
703
|
+
});
|
704
|
+
return true;
|
705
|
+
}
|
706
|
+
}
|
707
|
+
|
708
|
+
function run(fns, cancellations, allCompleteFn) {
|
709
|
+
var animations = [];
|
710
|
+
forEach(fns, function(animation) {
|
711
|
+
animation.fn && animations.push(animation);
|
712
|
+
});
|
713
|
+
|
714
|
+
var count = 0;
|
715
|
+
function afterAnimationComplete(index) {
|
716
|
+
if (cancellations) {
|
717
|
+
(cancellations[index] || noop)();
|
718
|
+
if (++count < animations.length) return;
|
719
|
+
cancellations = null;
|
720
|
+
}
|
721
|
+
allCompleteFn();
|
722
|
+
}
|
723
|
+
|
724
|
+
//The code below adds directly to the array in order to work with
|
725
|
+
//both sync and async animations. Sync animations are when the done()
|
726
|
+
//operation is called right away. DO NOT REFACTOR!
|
727
|
+
forEach(animations, function(animation, index) {
|
728
|
+
var progress = function() {
|
729
|
+
afterAnimationComplete(index);
|
730
|
+
};
|
731
|
+
switch (animation.event) {
|
732
|
+
case 'setClass':
|
733
|
+
cancellations.push(animation.fn(element, classNameAdd, classNameRemove, progress, options));
|
734
|
+
break;
|
735
|
+
case 'animate':
|
736
|
+
cancellations.push(animation.fn(element, className, options.from, options.to, progress));
|
737
|
+
break;
|
738
|
+
case 'addClass':
|
739
|
+
cancellations.push(animation.fn(element, classNameAdd || className, progress, options));
|
740
|
+
break;
|
741
|
+
case 'removeClass':
|
742
|
+
cancellations.push(animation.fn(element, classNameRemove || className, progress, options));
|
743
|
+
break;
|
744
|
+
default:
|
745
|
+
cancellations.push(animation.fn(element, progress, options));
|
746
|
+
break;
|
747
|
+
}
|
748
|
+
});
|
749
|
+
|
750
|
+
if (cancellations && cancellations.length === 0) {
|
751
|
+
allCompleteFn();
|
752
|
+
}
|
753
|
+
}
|
754
|
+
|
755
|
+
return {
|
756
|
+
node: node,
|
757
|
+
event: animationEvent,
|
758
|
+
className: className,
|
759
|
+
isClassBased: isClassBased,
|
760
|
+
isSetClassOperation: isSetClassOperation,
|
761
|
+
applyStyles: function() {
|
762
|
+
if (options) {
|
763
|
+
element.css(angular.extend(options.from || {}, options.to || {}));
|
764
|
+
}
|
765
|
+
},
|
766
|
+
before: function(allCompleteFn) {
|
767
|
+
beforeComplete = allCompleteFn;
|
768
|
+
run(before, beforeCancel, function() {
|
769
|
+
beforeComplete = noop;
|
770
|
+
allCompleteFn();
|
771
|
+
});
|
772
|
+
},
|
773
|
+
after: function(allCompleteFn) {
|
774
|
+
afterComplete = allCompleteFn;
|
775
|
+
run(after, afterCancel, function() {
|
776
|
+
afterComplete = noop;
|
777
|
+
allCompleteFn();
|
778
|
+
});
|
779
|
+
},
|
780
|
+
cancel: function() {
|
781
|
+
if (beforeCancel) {
|
782
|
+
forEach(beforeCancel, function(cancelFn) {
|
783
|
+
(cancelFn || noop)(true);
|
784
|
+
});
|
785
|
+
beforeComplete(true);
|
786
|
+
}
|
787
|
+
if (afterCancel) {
|
788
|
+
forEach(afterCancel, function(cancelFn) {
|
789
|
+
(cancelFn || noop)(true);
|
790
|
+
});
|
791
|
+
afterComplete(true);
|
792
|
+
}
|
793
|
+
}
|
794
|
+
};
|
795
|
+
}
|
796
|
+
|
797
|
+
/**
|
798
|
+
* @ngdoc service
|
799
|
+
* @name $animate
|
800
|
+
* @kind object
|
801
|
+
*
|
802
|
+
* @description
|
803
|
+
* The `$animate` service provides animation detection support while performing DOM operations (enter, leave and move) as well as during addClass and removeClass operations.
|
804
|
+
* When any of these operations are run, the $animate service
|
805
|
+
* will examine any JavaScript-defined animations (which are defined by using the $animateProvider provider object)
|
806
|
+
* as well as any CSS-defined animations against the CSS classes present on the element once the DOM operation is run.
|
807
|
+
*
|
808
|
+
* The `$animate` service is used behind the scenes with pre-existing directives and animation with these directives
|
809
|
+
* will work out of the box without any extra configuration.
|
810
|
+
*
|
811
|
+
* Requires the {@link ngAnimate `ngAnimate`} module to be installed.
|
812
|
+
*
|
813
|
+
* Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application.
|
814
|
+
* ## Callback Promises
|
815
|
+
* With AngularJS 1.3, each of the animation methods, on the `$animate` service, return a promise when called. The
|
816
|
+
* promise itself is then resolved once the animation has completed itself, has been cancelled or has been
|
817
|
+
* skipped due to animations being disabled. (Note that even if the animation is cancelled it will still
|
818
|
+
* call the resolve function of the animation.)
|
819
|
+
*
|
820
|
+
* ```js
|
821
|
+
* $animate.enter(element, container).then(function() {
|
822
|
+
* //...this is called once the animation is complete...
|
823
|
+
* });
|
824
|
+
* ```
|
825
|
+
*
|
826
|
+
* Also note that, due to the nature of the callback promise, if any Angular-specific code (like changing the scope,
|
827
|
+
* location of the page, etc...) is executed within the callback promise then be sure to wrap the code using
|
828
|
+
* `$scope.$apply(...)`;
|
829
|
+
*
|
830
|
+
* ```js
|
831
|
+
* $animate.leave(element).then(function() {
|
832
|
+
* $scope.$apply(function() {
|
833
|
+
* $location.path('/new-page');
|
834
|
+
* });
|
835
|
+
* });
|
836
|
+
* ```
|
837
|
+
*
|
838
|
+
* An animation can also be cancelled by calling the `$animate.cancel(promise)` method with the provided
|
839
|
+
* promise that was returned when the animation was started.
|
840
|
+
*
|
841
|
+
* ```js
|
842
|
+
* var promise = $animate.addClass(element, 'super-long-animation');
|
843
|
+
* promise.then(function() {
|
844
|
+
* //this will still be called even if cancelled
|
845
|
+
* });
|
846
|
+
*
|
847
|
+
* element.on('click', function() {
|
848
|
+
* //tooo lazy to wait for the animation to end
|
849
|
+
* $animate.cancel(promise);
|
850
|
+
* });
|
851
|
+
* ```
|
852
|
+
*
|
853
|
+
* (Keep in mind that the promise cancellation is unique to `$animate` since promises in
|
854
|
+
* general cannot be cancelled.)
|
855
|
+
*
|
856
|
+
*/
|
857
|
+
return {
|
858
|
+
/**
|
859
|
+
* @ngdoc method
|
860
|
+
* @name $animate#animate
|
861
|
+
* @kind function
|
862
|
+
*
|
863
|
+
* @description
|
864
|
+
* Performs an inline animation on the element which applies the provided `to` and `from` CSS styles to the element.
|
865
|
+
* If any detected CSS transition, keyframe or JavaScript matches the provided `className` value then the animation
|
866
|
+
* will take on the provided styles. For example, if a transition animation is set for the given className then the
|
867
|
+
* provided `from` and `to` styles will be applied alongside the given transition. If a JavaScript animation is
|
868
|
+
* detected then the provided styles will be given in as function paramters.
|
869
|
+
*
|
870
|
+
* ```js
|
871
|
+
* ngModule.animation('.my-inline-animation', function() {
|
872
|
+
* return {
|
873
|
+
* animate : function(element, className, from, to, done) {
|
874
|
+
* //styles
|
875
|
+
* }
|
876
|
+
* }
|
877
|
+
* });
|
878
|
+
* ```
|
879
|
+
*
|
880
|
+
* Below is a breakdown of each step that occurs during the `animate` animation:
|
881
|
+
*
|
882
|
+
* | Animation Step | What the element class attribute looks like |
|
883
|
+
* |-----------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------|
|
884
|
+
* | 1. `$animate.animate(...)` is called | `class="my-animation"` |
|
885
|
+
* | 2. `$animate` waits for the next digest to start the animation | `class="my-animation ng-animate"` |
|
886
|
+
* | 3. `$animate` runs the JavaScript-defined animations detected on the element | `class="my-animation ng-animate"` |
|
887
|
+
* | 4. the `className` class value is added to the element | `class="my-animation ng-animate className"` |
|
888
|
+
* | 5. `$animate` scans the element styles to get the CSS transition/animation duration and delay | `class="my-animation ng-animate className"` |
|
889
|
+
* | 6. `$animate` blocks all CSS transitions on the element to ensure the `.className` class styling is applied right away| `class="my-animation ng-animate className"` |
|
890
|
+
* | 7. `$animate` applies the provided collection of `from` CSS styles to the element | `class="my-animation ng-animate className"` |
|
891
|
+
* | 8. `$animate` waits for a single animation frame (this performs a reflow) | `class="my-animation ng-animate className"` |
|
892
|
+
* | 9. `$animate` removes the CSS transition block placed on the element | `class="my-animation ng-animate className"` |
|
893
|
+
* | 10. the `className-active` class is added (this triggers the CSS transition/animation) | `class="my-animation ng-animate className className-active"` |
|
894
|
+
* | 11. `$animate` applies the collection of `to` CSS styles to the element which are then handled by the transition | `class="my-animation ng-animate className className-active"` |
|
895
|
+
* | 12. `$animate` waits for the animation to complete (via events and timeout) | `class="my-animation ng-animate className className-active"` |
|
896
|
+
* | 13. The animation ends and all generated CSS classes are removed from the element | `class="my-animation"` |
|
897
|
+
* | 14. The returned promise is resolved. | `class="my-animation"` |
|
898
|
+
*
|
899
|
+
* @param {DOMElement} element the element that will be the focus of the enter animation
|
900
|
+
* @param {object} from a collection of CSS styles that will be applied to the element at the start of the animation
|
901
|
+
* @param {object} to a collection of CSS styles that the element will animate towards
|
902
|
+
* @param {string=} className an optional CSS class that will be added to the element for the duration of the animation (the default class is `ng-inline-animate`)
|
903
|
+
* @param {object=} options an optional collection of options that will be picked up by the CSS transition/animation
|
904
|
+
* @return {Promise} the animation callback promise
|
905
|
+
*/
|
906
|
+
animate: function(element, from, to, className, options) {
|
907
|
+
className = className || 'ng-inline-animate';
|
908
|
+
options = parseAnimateOptions(options) || {};
|
909
|
+
options.from = to ? from : null;
|
910
|
+
options.to = to ? to : from;
|
911
|
+
|
912
|
+
return runAnimationPostDigest(function(done) {
|
913
|
+
return performAnimation('animate', className, stripCommentsFromElement(element), null, null, noop, options, done);
|
914
|
+
});
|
915
|
+
},
|
916
|
+
|
917
|
+
/**
|
918
|
+
* @ngdoc method
|
919
|
+
* @name $animate#enter
|
920
|
+
* @kind function
|
921
|
+
*
|
922
|
+
* @description
|
923
|
+
* Appends the element to the parentElement element that resides in the document and then runs the enter animation. Once
|
924
|
+
* the animation is started, the following CSS classes will be present on the element for the duration of the animation:
|
925
|
+
*
|
926
|
+
* Below is a breakdown of each step that occurs during enter animation:
|
927
|
+
*
|
928
|
+
* | Animation Step | What the element class attribute looks like |
|
929
|
+
* |-----------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------|
|
930
|
+
* | 1. `$animate.enter(...)` is called | `class="my-animation"` |
|
931
|
+
* | 2. element is inserted into the `parentElement` element or beside the `afterElement` element | `class="my-animation"` |
|
932
|
+
* | 3. `$animate` waits for the next digest to start the animation | `class="my-animation ng-animate"` |
|
933
|
+
* | 4. `$animate` runs the JavaScript-defined animations detected on the element | `class="my-animation ng-animate"` |
|
934
|
+
* | 5. the `.ng-enter` class is added to the element | `class="my-animation ng-animate ng-enter"` |
|
935
|
+
* | 6. `$animate` scans the element styles to get the CSS transition/animation duration and delay | `class="my-animation ng-animate ng-enter"` |
|
936
|
+
* | 7. `$animate` blocks all CSS transitions on the element to ensure the `.ng-enter` class styling is applied right away | `class="my-animation ng-animate ng-enter"` |
|
937
|
+
* | 8. `$animate` waits for a single animation frame (this performs a reflow) | `class="my-animation ng-animate ng-enter"` |
|
938
|
+
* | 9. `$animate` removes the CSS transition block placed on the element | `class="my-animation ng-animate ng-enter"` |
|
939
|
+
* | 10. the `.ng-enter-active` class is added (this triggers the CSS transition/animation) | `class="my-animation ng-animate ng-enter ng-enter-active"` |
|
940
|
+
* | 11. `$animate` waits for the animation to complete (via events and timeout) | `class="my-animation ng-animate ng-enter ng-enter-active"` |
|
941
|
+
* | 12. The animation ends and all generated CSS classes are removed from the element | `class="my-animation"` |
|
942
|
+
* | 13. The returned promise is resolved. | `class="my-animation"` |
|
943
|
+
*
|
944
|
+
* @param {DOMElement} element the element that will be the focus of the enter animation
|
945
|
+
* @param {DOMElement} parentElement the parent element of the element that will be the focus of the enter animation
|
946
|
+
* @param {DOMElement} afterElement the sibling element (which is the previous element) of the element that will be the focus of the enter animation
|
947
|
+
* @param {object=} options an optional collection of options that will be picked up by the CSS transition/animation
|
948
|
+
* @return {Promise} the animation callback promise
|
949
|
+
*/
|
950
|
+
enter: function(element, parentElement, afterElement, options) {
|
951
|
+
options = parseAnimateOptions(options);
|
952
|
+
element = angular.element(element);
|
953
|
+
parentElement = prepareElement(parentElement);
|
954
|
+
afterElement = prepareElement(afterElement);
|
955
|
+
|
956
|
+
classBasedAnimationsBlocked(element, true);
|
957
|
+
$delegate.enter(element, parentElement, afterElement);
|
958
|
+
return runAnimationPostDigest(function(done) {
|
959
|
+
return performAnimation('enter', 'ng-enter', stripCommentsFromElement(element), parentElement, afterElement, noop, options, done);
|
960
|
+
});
|
961
|
+
},
|
962
|
+
|
963
|
+
/**
|
964
|
+
* @ngdoc method
|
965
|
+
* @name $animate#leave
|
966
|
+
* @kind function
|
967
|
+
*
|
968
|
+
* @description
|
969
|
+
* Runs the leave animation operation and, upon completion, removes the element from the DOM. Once
|
970
|
+
* the animation is started, the following CSS classes will be added for the duration of the animation:
|
971
|
+
*
|
972
|
+
* Below is a breakdown of each step that occurs during leave animation:
|
973
|
+
*
|
974
|
+
* | Animation Step | What the element class attribute looks like |
|
975
|
+
* |-----------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------|
|
976
|
+
* | 1. `$animate.leave(...)` is called | `class="my-animation"` |
|
977
|
+
* | 2. `$animate` runs the JavaScript-defined animations detected on the element | `class="my-animation ng-animate"` |
|
978
|
+
* | 3. `$animate` waits for the next digest to start the animation | `class="my-animation ng-animate"` |
|
979
|
+
* | 4. the `.ng-leave` class is added to the element | `class="my-animation ng-animate ng-leave"` |
|
980
|
+
* | 5. `$animate` scans the element styles to get the CSS transition/animation duration and delay | `class="my-animation ng-animate ng-leave"` |
|
981
|
+
* | 6. `$animate` blocks all CSS transitions on the element to ensure the `.ng-leave` class styling is applied right away | `class="my-animation ng-animate ng-leave"` |
|
982
|
+
* | 7. `$animate` waits for a single animation frame (this performs a reflow) | `class="my-animation ng-animate ng-leave"` |
|
983
|
+
* | 8. `$animate` removes the CSS transition block placed on the element | `class="my-animation ng-animate ng-leave"` |
|
984
|
+
* | 9. the `.ng-leave-active` class is added (this triggers the CSS transition/animation) | `class="my-animation ng-animate ng-leave ng-leave-active"` |
|
985
|
+
* | 10. `$animate` waits for the animation to complete (via events and timeout) | `class="my-animation ng-animate ng-leave ng-leave-active"` |
|
986
|
+
* | 11. The animation ends and all generated CSS classes are removed from the element | `class="my-animation"` |
|
987
|
+
* | 12. The element is removed from the DOM | ... |
|
988
|
+
* | 13. The returned promise is resolved. | ... |
|
989
|
+
*
|
990
|
+
* @param {DOMElement} element the element that will be the focus of the leave animation
|
991
|
+
* @param {object=} options an optional collection of styles that will be picked up by the CSS transition/animation
|
992
|
+
* @return {Promise} the animation callback promise
|
993
|
+
*/
|
994
|
+
leave: function(element, options) {
|
995
|
+
options = parseAnimateOptions(options);
|
996
|
+
element = angular.element(element);
|
997
|
+
|
998
|
+
cancelChildAnimations(element);
|
999
|
+
classBasedAnimationsBlocked(element, true);
|
1000
|
+
return runAnimationPostDigest(function(done) {
|
1001
|
+
return performAnimation('leave', 'ng-leave', stripCommentsFromElement(element), null, null, function() {
|
1002
|
+
$delegate.leave(element);
|
1003
|
+
}, options, done);
|
1004
|
+
});
|
1005
|
+
},
|
1006
|
+
|
1007
|
+
/**
|
1008
|
+
* @ngdoc method
|
1009
|
+
* @name $animate#move
|
1010
|
+
* @kind function
|
1011
|
+
*
|
1012
|
+
* @description
|
1013
|
+
* Fires the move DOM operation. Just before the animation starts, the animate service will either append it into the parentElement container or
|
1014
|
+
* add the element directly after the afterElement element if present. Then the move animation will be run. Once
|
1015
|
+
* the animation is started, the following CSS classes will be added for the duration of the animation:
|
1016
|
+
*
|
1017
|
+
* Below is a breakdown of each step that occurs during move animation:
|
1018
|
+
*
|
1019
|
+
* | Animation Step | What the element class attribute looks like |
|
1020
|
+
* |----------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|
|
1021
|
+
* | 1. `$animate.move(...)` is called | `class="my-animation"` |
|
1022
|
+
* | 2. element is moved into the parentElement element or beside the afterElement element | `class="my-animation"` |
|
1023
|
+
* | 3. `$animate` waits for the next digest to start the animation | `class="my-animation ng-animate"` |
|
1024
|
+
* | 4. `$animate` runs the JavaScript-defined animations detected on the element | `class="my-animation ng-animate"` |
|
1025
|
+
* | 5. the `.ng-move` class is added to the element | `class="my-animation ng-animate ng-move"` |
|
1026
|
+
* | 6. `$animate` scans the element styles to get the CSS transition/animation duration and delay | `class="my-animation ng-animate ng-move"` |
|
1027
|
+
* | 7. `$animate` blocks all CSS transitions on the element to ensure the `.ng-move` class styling is applied right away | `class="my-animation ng-animate ng-move"` |
|
1028
|
+
* | 8. `$animate` waits for a single animation frame (this performs a reflow) | `class="my-animation ng-animate ng-move"` |
|
1029
|
+
* | 9. `$animate` removes the CSS transition block placed on the element | `class="my-animation ng-animate ng-move"` |
|
1030
|
+
* | 10. the `.ng-move-active` class is added (this triggers the CSS transition/animation) | `class="my-animation ng-animate ng-move ng-move-active"` |
|
1031
|
+
* | 11. `$animate` waits for the animation to complete (via events and timeout) | `class="my-animation ng-animate ng-move ng-move-active"` |
|
1032
|
+
* | 12. The animation ends and all generated CSS classes are removed from the element | `class="my-animation"` |
|
1033
|
+
* | 13. The returned promise is resolved. | `class="my-animation"` |
|
1034
|
+
*
|
1035
|
+
* @param {DOMElement} element the element that will be the focus of the move animation
|
1036
|
+
* @param {DOMElement} parentElement the parentElement element of the element that will be the focus of the move animation
|
1037
|
+
* @param {DOMElement} afterElement the sibling element (which is the previous element) of the element that will be the focus of the move animation
|
1038
|
+
* @param {object=} options an optional collection of styles that will be picked up by the CSS transition/animation
|
1039
|
+
* @return {Promise} the animation callback promise
|
1040
|
+
*/
|
1041
|
+
move: function(element, parentElement, afterElement, options) {
|
1042
|
+
options = parseAnimateOptions(options);
|
1043
|
+
element = angular.element(element);
|
1044
|
+
parentElement = prepareElement(parentElement);
|
1045
|
+
afterElement = prepareElement(afterElement);
|
1046
|
+
|
1047
|
+
cancelChildAnimations(element);
|
1048
|
+
classBasedAnimationsBlocked(element, true);
|
1049
|
+
$delegate.move(element, parentElement, afterElement);
|
1050
|
+
return runAnimationPostDigest(function(done) {
|
1051
|
+
return performAnimation('move', 'ng-move', stripCommentsFromElement(element), parentElement, afterElement, noop, options, done);
|
1052
|
+
});
|
1053
|
+
},
|
1054
|
+
|
1055
|
+
/**
|
1056
|
+
* @ngdoc method
|
1057
|
+
* @name $animate#addClass
|
1058
|
+
*
|
1059
|
+
* @description
|
1060
|
+
* Triggers a custom animation event based off the className variable and then attaches the className value to the element as a CSS class.
|
1061
|
+
* Unlike the other animation methods, the animate service will suffix the className value with {@type -add} in order to provide
|
1062
|
+
* the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if no CSS transitions
|
1063
|
+
* or keyframes are defined on the -add-active or base CSS class).
|
1064
|
+
*
|
1065
|
+
* Below is a breakdown of each step that occurs during addClass animation:
|
1066
|
+
*
|
1067
|
+
* | Animation Step | What the element class attribute looks like |
|
1068
|
+
* |--------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|
|
1069
|
+
* | 1. `$animate.addClass(element, 'super')` is called | `class="my-animation"` |
|
1070
|
+
* | 2. `$animate` runs the JavaScript-defined animations detected on the element | `class="my-animation ng-animate"` |
|
1071
|
+
* | 3. the `.super-add` class is added to the element | `class="my-animation ng-animate super-add"` |
|
1072
|
+
* | 4. `$animate` waits for a single animation frame (this performs a reflow) | `class="my-animation ng-animate super-add"` |
|
1073
|
+
* | 5. the `.super` and `.super-add-active` classes are added (this triggers the CSS transition/animation) | `class="my-animation ng-animate super super-add super-add-active"` |
|
1074
|
+
* | 6. `$animate` scans the element styles to get the CSS transition/animation duration and delay | `class="my-animation ng-animate super super-add super-add-active"` |
|
1075
|
+
* | 7. `$animate` waits for the animation to complete (via events and timeout) | `class="my-animation ng-animate super super-add super-add-active"` |
|
1076
|
+
* | 8. The animation ends and all generated CSS classes are removed from the element | `class="my-animation super"` |
|
1077
|
+
* | 9. The super class is kept on the element | `class="my-animation super"` |
|
1078
|
+
* | 10. The returned promise is resolved. | `class="my-animation super"` |
|
1079
|
+
*
|
1080
|
+
* @param {DOMElement} element the element that will be animated
|
1081
|
+
* @param {string} className the CSS class that will be added to the element and then animated
|
1082
|
+
* @param {object=} options an optional collection of styles that will be picked up by the CSS transition/animation
|
1083
|
+
* @return {Promise} the animation callback promise
|
1084
|
+
*/
|
1085
|
+
addClass: function(element, className, options) {
|
1086
|
+
return this.setClass(element, className, [], options);
|
1087
|
+
},
|
1088
|
+
|
1089
|
+
/**
|
1090
|
+
* @ngdoc method
|
1091
|
+
* @name $animate#removeClass
|
1092
|
+
*
|
1093
|
+
* @description
|
1094
|
+
* Triggers a custom animation event based off the className variable and then removes the CSS class provided by the className value
|
1095
|
+
* from the element. Unlike the other animation methods, the animate service will suffix the className value with {@type -remove} in
|
1096
|
+
* order to provide the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if
|
1097
|
+
* no CSS transitions or keyframes are defined on the -remove or base CSS classes).
|
1098
|
+
*
|
1099
|
+
* Below is a breakdown of each step that occurs during removeClass animation:
|
1100
|
+
*
|
1101
|
+
* | Animation Step | What the element class attribute looks like |
|
1102
|
+
* |----------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|
|
1103
|
+
* | 1. `$animate.removeClass(element, 'super')` is called | `class="my-animation super"` |
|
1104
|
+
* | 2. `$animate` runs the JavaScript-defined animations detected on the element | `class="my-animation super ng-animate"` |
|
1105
|
+
* | 3. the `.super-remove` class is added to the element | `class="my-animation super ng-animate super-remove"` |
|
1106
|
+
* | 4. `$animate` waits for a single animation frame (this performs a reflow) | `class="my-animation super ng-animate super-remove"` |
|
1107
|
+
* | 5. the `.super-remove-active` classes are added and `.super` is removed (this triggers the CSS transition/animation) | `class="my-animation ng-animate super-remove super-remove-active"` |
|
1108
|
+
* | 6. `$animate` scans the element styles to get the CSS transition/animation duration and delay | `class="my-animation ng-animate super-remove super-remove-active"` |
|
1109
|
+
* | 7. `$animate` waits for the animation to complete (via events and timeout) | `class="my-animation ng-animate super-remove super-remove-active"` |
|
1110
|
+
* | 8. The animation ends and all generated CSS classes are removed from the element | `class="my-animation"` |
|
1111
|
+
* | 9. The returned promise is resolved. | `class="my-animation"` |
|
1112
|
+
*
|
1113
|
+
*
|
1114
|
+
* @param {DOMElement} element the element that will be animated
|
1115
|
+
* @param {string} className the CSS class that will be animated and then removed from the element
|
1116
|
+
* @param {object=} options an optional collection of styles that will be picked up by the CSS transition/animation
|
1117
|
+
* @return {Promise} the animation callback promise
|
1118
|
+
*/
|
1119
|
+
removeClass: function(element, className, options) {
|
1120
|
+
return this.setClass(element, [], className, options);
|
1121
|
+
},
|
1122
|
+
|
1123
|
+
/**
|
1124
|
+
*
|
1125
|
+
* @ngdoc method
|
1126
|
+
* @name $animate#setClass
|
1127
|
+
*
|
1128
|
+
* @description Adds and/or removes the given CSS classes to and from the element.
|
1129
|
+
* Once complete, the `done()` callback will be fired (if provided).
|
1130
|
+
*
|
1131
|
+
* | Animation Step | What the element class attribute looks like |
|
1132
|
+
* |----------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------|
|
1133
|
+
* | 1. `$animate.setClass(element, 'on', 'off')` is called | `class="my-animation off"` |
|
1134
|
+
* | 2. `$animate` runs the JavaScript-defined animations detected on the element | `class="my-animation ng-animate off"` |
|
1135
|
+
* | 3. the `.on-add` and `.off-remove` classes are added to the element | `class="my-animation ng-animate on-add off-remove off"` |
|
1136
|
+
* | 4. `$animate` waits for a single animation frame (this performs a reflow) | `class="my-animation ng-animate on-add off-remove off"` |
|
1137
|
+
* | 5. the `.on`, `.on-add-active` and `.off-remove-active` classes are added and `.off` is removed (this triggers the CSS transition/animation) | `class="my-animation ng-animate on on-add on-add-active off-remove off-remove-active"` |
|
1138
|
+
* | 6. `$animate` scans the element styles to get the CSS transition/animation duration and delay | `class="my-animation ng-animate on on-add on-add-active off-remove off-remove-active"` |
|
1139
|
+
* | 7. `$animate` waits for the animation to complete (via events and timeout) | `class="my-animation ng-animate on on-add on-add-active off-remove off-remove-active"` |
|
1140
|
+
* | 8. The animation ends and all generated CSS classes are removed from the element | `class="my-animation on"` |
|
1141
|
+
* | 9. The returned promise is resolved. | `class="my-animation on"` |
|
1142
|
+
*
|
1143
|
+
* @param {DOMElement} element the element which will have its CSS classes changed
|
1144
|
+
* removed from it
|
1145
|
+
* @param {string} add the CSS classes which will be added to the element
|
1146
|
+
* @param {string} remove the CSS class which will be removed from the element
|
1147
|
+
* CSS classes have been set on the element
|
1148
|
+
* @param {object=} options an optional collection of styles that will be picked up by the CSS transition/animation
|
1149
|
+
* @return {Promise} the animation callback promise
|
1150
|
+
*/
|
1151
|
+
setClass: function(element, add, remove, options) {
|
1152
|
+
options = parseAnimateOptions(options);
|
1153
|
+
|
1154
|
+
var STORAGE_KEY = '$$animateClasses';
|
1155
|
+
element = angular.element(element);
|
1156
|
+
element = stripCommentsFromElement(element);
|
1157
|
+
|
1158
|
+
if (classBasedAnimationsBlocked(element)) {
|
1159
|
+
return $delegate.$$setClassImmediately(element, add, remove, options);
|
1160
|
+
}
|
1161
|
+
|
1162
|
+
// we're using a combined array for both the add and remove
|
1163
|
+
// operations since the ORDER OF addClass and removeClass matters
|
1164
|
+
var classes, cache = element.data(STORAGE_KEY);
|
1165
|
+
var hasCache = !!cache;
|
1166
|
+
if (!cache) {
|
1167
|
+
cache = {};
|
1168
|
+
cache.classes = {};
|
1169
|
+
}
|
1170
|
+
classes = cache.classes;
|
1171
|
+
|
1172
|
+
add = isArray(add) ? add : add.split(' ');
|
1173
|
+
forEach(add, function(c) {
|
1174
|
+
if (c && c.length) {
|
1175
|
+
classes[c] = true;
|
1176
|
+
}
|
1177
|
+
});
|
1178
|
+
|
1179
|
+
remove = isArray(remove) ? remove : remove.split(' ');
|
1180
|
+
forEach(remove, function(c) {
|
1181
|
+
if (c && c.length) {
|
1182
|
+
classes[c] = false;
|
1183
|
+
}
|
1184
|
+
});
|
1185
|
+
|
1186
|
+
if (hasCache) {
|
1187
|
+
if (options && cache.options) {
|
1188
|
+
cache.options = angular.extend(cache.options || {}, options);
|
1189
|
+
}
|
1190
|
+
|
1191
|
+
//the digest cycle will combine all the animations into one function
|
1192
|
+
return cache.promise;
|
1193
|
+
} else {
|
1194
|
+
element.data(STORAGE_KEY, cache = {
|
1195
|
+
classes: classes,
|
1196
|
+
options: options
|
1197
|
+
});
|
1198
|
+
}
|
1199
|
+
|
1200
|
+
return cache.promise = runAnimationPostDigest(function(done) {
|
1201
|
+
var parentElement = element.parent();
|
1202
|
+
var elementNode = extractElementNode(element);
|
1203
|
+
var parentNode = elementNode.parentNode;
|
1204
|
+
// TODO(matsko): move this code into the animationsDisabled() function once #8092 is fixed
|
1205
|
+
if (!parentNode || parentNode['$$NG_REMOVED'] || elementNode['$$NG_REMOVED']) {
|
1206
|
+
done();
|
1207
|
+
return;
|
1208
|
+
}
|
1209
|
+
|
1210
|
+
var cache = element.data(STORAGE_KEY);
|
1211
|
+
element.removeData(STORAGE_KEY);
|
1212
|
+
|
1213
|
+
var state = element.data(NG_ANIMATE_STATE) || {};
|
1214
|
+
var classes = resolveElementClasses(element, cache, state.active);
|
1215
|
+
return !classes
|
1216
|
+
? done()
|
1217
|
+
: performAnimation('setClass', classes, element, parentElement, null, function() {
|
1218
|
+
if (classes[0]) $delegate.$$addClassImmediately(element, classes[0]);
|
1219
|
+
if (classes[1]) $delegate.$$removeClassImmediately(element, classes[1]);
|
1220
|
+
}, cache.options, done);
|
1221
|
+
});
|
1222
|
+
},
|
1223
|
+
|
1224
|
+
/**
|
1225
|
+
* @ngdoc method
|
1226
|
+
* @name $animate#cancel
|
1227
|
+
* @kind function
|
1228
|
+
*
|
1229
|
+
* @param {Promise} animationPromise The animation promise that is returned when an animation is started.
|
1230
|
+
*
|
1231
|
+
* @description
|
1232
|
+
* Cancels the provided animation.
|
1233
|
+
*/
|
1234
|
+
cancel: function(promise) {
|
1235
|
+
promise.$$cancelFn();
|
1236
|
+
},
|
1237
|
+
|
1238
|
+
/**
|
1239
|
+
* @ngdoc method
|
1240
|
+
* @name $animate#enabled
|
1241
|
+
* @kind function
|
1242
|
+
*
|
1243
|
+
* @param {boolean=} value If provided then set the animation on or off.
|
1244
|
+
* @param {DOMElement=} element If provided then the element will be used to represent the enable/disable operation
|
1245
|
+
* @return {boolean} Current animation state.
|
1246
|
+
*
|
1247
|
+
* @description
|
1248
|
+
* Globally enables/disables animations.
|
1249
|
+
*
|
1250
|
+
*/
|
1251
|
+
enabled: function(value, element) {
|
1252
|
+
switch (arguments.length) {
|
1253
|
+
case 2:
|
1254
|
+
if (value) {
|
1255
|
+
cleanup(element);
|
1256
|
+
} else {
|
1257
|
+
var data = element.data(NG_ANIMATE_STATE) || {};
|
1258
|
+
data.disabled = true;
|
1259
|
+
element.data(NG_ANIMATE_STATE, data);
|
1260
|
+
}
|
1261
|
+
break;
|
1262
|
+
|
1263
|
+
case 1:
|
1264
|
+
rootAnimateState.disabled = !value;
|
1265
|
+
break;
|
1266
|
+
|
1267
|
+
default:
|
1268
|
+
value = !rootAnimateState.disabled;
|
1269
|
+
break;
|
1270
|
+
}
|
1271
|
+
return !!value;
|
1272
|
+
}
|
1273
|
+
};
|
1274
|
+
|
1275
|
+
/*
|
1276
|
+
all animations call this shared animation triggering function internally.
|
1277
|
+
The animationEvent variable refers to the JavaScript animation event that will be triggered
|
1278
|
+
and the className value is the name of the animation that will be applied within the
|
1279
|
+
CSS code. Element, `parentElement` and `afterElement` are provided DOM elements for the animation
|
1280
|
+
and the onComplete callback will be fired once the animation is fully complete.
|
1281
|
+
*/
|
1282
|
+
function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, options, doneCallback) {
|
1283
|
+
var noopCancel = noop;
|
1284
|
+
var runner = animationRunner(element, animationEvent, className, options);
|
1285
|
+
if (!runner) {
|
1286
|
+
fireDOMOperation();
|
1287
|
+
fireBeforeCallbackAsync();
|
1288
|
+
fireAfterCallbackAsync();
|
1289
|
+
closeAnimation();
|
1290
|
+
return noopCancel;
|
1291
|
+
}
|
1292
|
+
|
1293
|
+
animationEvent = runner.event;
|
1294
|
+
className = runner.className;
|
1295
|
+
var elementEvents = angular.element._data(runner.node);
|
1296
|
+
elementEvents = elementEvents && elementEvents.events;
|
1297
|
+
|
1298
|
+
if (!parentElement) {
|
1299
|
+
parentElement = afterElement ? afterElement.parent() : element.parent();
|
1300
|
+
}
|
1301
|
+
|
1302
|
+
//skip the animation if animations are disabled, a parent is already being animated,
|
1303
|
+
//the element is not currently attached to the document body or then completely close
|
1304
|
+
//the animation if any matching animations are not found at all.
|
1305
|
+
//NOTE: IE8 + IE9 should close properly (run closeAnimation()) in case an animation was found.
|
1306
|
+
if (animationsDisabled(element, parentElement)) {
|
1307
|
+
fireDOMOperation();
|
1308
|
+
fireBeforeCallbackAsync();
|
1309
|
+
fireAfterCallbackAsync();
|
1310
|
+
closeAnimation();
|
1311
|
+
return noopCancel;
|
1312
|
+
}
|
1313
|
+
|
1314
|
+
var ngAnimateState = element.data(NG_ANIMATE_STATE) || {};
|
1315
|
+
var runningAnimations = ngAnimateState.active || {};
|
1316
|
+
var totalActiveAnimations = ngAnimateState.totalActive || 0;
|
1317
|
+
var lastAnimation = ngAnimateState.last;
|
1318
|
+
var skipAnimation = false;
|
1319
|
+
|
1320
|
+
if (totalActiveAnimations > 0) {
|
1321
|
+
var animationsToCancel = [];
|
1322
|
+
if (!runner.isClassBased) {
|
1323
|
+
if (animationEvent == 'leave' && runningAnimations['ng-leave']) {
|
1324
|
+
skipAnimation = true;
|
1325
|
+
} else {
|
1326
|
+
//cancel all animations when a structural animation takes place
|
1327
|
+
for (var klass in runningAnimations) {
|
1328
|
+
animationsToCancel.push(runningAnimations[klass]);
|
1329
|
+
}
|
1330
|
+
ngAnimateState = {};
|
1331
|
+
cleanup(element, true);
|
1332
|
+
}
|
1333
|
+
} else if (lastAnimation.event == 'setClass') {
|
1334
|
+
animationsToCancel.push(lastAnimation);
|
1335
|
+
cleanup(element, className);
|
1336
|
+
} else if (runningAnimations[className]) {
|
1337
|
+
var current = runningAnimations[className];
|
1338
|
+
if (current.event == animationEvent) {
|
1339
|
+
skipAnimation = true;
|
1340
|
+
} else {
|
1341
|
+
animationsToCancel.push(current);
|
1342
|
+
cleanup(element, className);
|
1343
|
+
}
|
1344
|
+
}
|
1345
|
+
|
1346
|
+
if (animationsToCancel.length > 0) {
|
1347
|
+
forEach(animationsToCancel, function(operation) {
|
1348
|
+
operation.cancel();
|
1349
|
+
});
|
1350
|
+
}
|
1351
|
+
}
|
1352
|
+
|
1353
|
+
if (runner.isClassBased
|
1354
|
+
&& !runner.isSetClassOperation
|
1355
|
+
&& animationEvent != 'animate'
|
1356
|
+
&& !skipAnimation) {
|
1357
|
+
skipAnimation = (animationEvent == 'addClass') == element.hasClass(className); //opposite of XOR
|
1358
|
+
}
|
1359
|
+
|
1360
|
+
if (skipAnimation) {
|
1361
|
+
fireDOMOperation();
|
1362
|
+
fireBeforeCallbackAsync();
|
1363
|
+
fireAfterCallbackAsync();
|
1364
|
+
fireDoneCallbackAsync();
|
1365
|
+
return noopCancel;
|
1366
|
+
}
|
1367
|
+
|
1368
|
+
runningAnimations = ngAnimateState.active || {};
|
1369
|
+
totalActiveAnimations = ngAnimateState.totalActive || 0;
|
1370
|
+
|
1371
|
+
if (animationEvent == 'leave') {
|
1372
|
+
//there's no need to ever remove the listener since the element
|
1373
|
+
//will be removed (destroyed) after the leave animation ends or
|
1374
|
+
//is cancelled midway
|
1375
|
+
element.one('$destroy', function(e) {
|
1376
|
+
var element = angular.element(this);
|
1377
|
+
var state = element.data(NG_ANIMATE_STATE);
|
1378
|
+
if (state) {
|
1379
|
+
var activeLeaveAnimation = state.active['ng-leave'];
|
1380
|
+
if (activeLeaveAnimation) {
|
1381
|
+
activeLeaveAnimation.cancel();
|
1382
|
+
cleanup(element, 'ng-leave');
|
1383
|
+
}
|
1384
|
+
}
|
1385
|
+
});
|
1386
|
+
}
|
1387
|
+
|
1388
|
+
//the ng-animate class does nothing, but it's here to allow for
|
1389
|
+
//parent animations to find and cancel child animations when needed
|
1390
|
+
$$jqLite.addClass(element, NG_ANIMATE_CLASS_NAME);
|
1391
|
+
if (options && options.tempClasses) {
|
1392
|
+
forEach(options.tempClasses, function(className) {
|
1393
|
+
$$jqLite.addClass(element, className);
|
1394
|
+
});
|
1395
|
+
}
|
1396
|
+
|
1397
|
+
var localAnimationCount = globalAnimationCounter++;
|
1398
|
+
totalActiveAnimations++;
|
1399
|
+
runningAnimations[className] = runner;
|
1400
|
+
|
1401
|
+
element.data(NG_ANIMATE_STATE, {
|
1402
|
+
last: runner,
|
1403
|
+
active: runningAnimations,
|
1404
|
+
index: localAnimationCount,
|
1405
|
+
totalActive: totalActiveAnimations
|
1406
|
+
});
|
1407
|
+
|
1408
|
+
//first we run the before animations and when all of those are complete
|
1409
|
+
//then we perform the DOM operation and run the next set of animations
|
1410
|
+
fireBeforeCallbackAsync();
|
1411
|
+
runner.before(function(cancelled) {
|
1412
|
+
var data = element.data(NG_ANIMATE_STATE);
|
1413
|
+
cancelled = cancelled ||
|
1414
|
+
!data || !data.active[className] ||
|
1415
|
+
(runner.isClassBased && data.active[className].event != animationEvent);
|
1416
|
+
|
1417
|
+
fireDOMOperation();
|
1418
|
+
if (cancelled === true) {
|
1419
|
+
closeAnimation();
|
1420
|
+
} else {
|
1421
|
+
fireAfterCallbackAsync();
|
1422
|
+
runner.after(closeAnimation);
|
1423
|
+
}
|
1424
|
+
});
|
1425
|
+
|
1426
|
+
return runner.cancel;
|
1427
|
+
|
1428
|
+
function fireDOMCallback(animationPhase) {
|
1429
|
+
var eventName = '$animate:' + animationPhase;
|
1430
|
+
if (elementEvents && elementEvents[eventName] && elementEvents[eventName].length > 0) {
|
1431
|
+
$$asyncCallback(function() {
|
1432
|
+
element.triggerHandler(eventName, {
|
1433
|
+
event: animationEvent,
|
1434
|
+
className: className
|
1435
|
+
});
|
1436
|
+
});
|
1437
|
+
}
|
1438
|
+
}
|
1439
|
+
|
1440
|
+
function fireBeforeCallbackAsync() {
|
1441
|
+
fireDOMCallback('before');
|
1442
|
+
}
|
1443
|
+
|
1444
|
+
function fireAfterCallbackAsync() {
|
1445
|
+
fireDOMCallback('after');
|
1446
|
+
}
|
1447
|
+
|
1448
|
+
function fireDoneCallbackAsync() {
|
1449
|
+
fireDOMCallback('close');
|
1450
|
+
doneCallback();
|
1451
|
+
}
|
1452
|
+
|
1453
|
+
//it is less complicated to use a flag than managing and canceling
|
1454
|
+
//timeouts containing multiple callbacks.
|
1455
|
+
function fireDOMOperation() {
|
1456
|
+
if (!fireDOMOperation.hasBeenRun) {
|
1457
|
+
fireDOMOperation.hasBeenRun = true;
|
1458
|
+
domOperation();
|
1459
|
+
}
|
1460
|
+
}
|
1461
|
+
|
1462
|
+
function closeAnimation() {
|
1463
|
+
if (!closeAnimation.hasBeenRun) {
|
1464
|
+
if (runner) { //the runner doesn't exist if it fails to instantiate
|
1465
|
+
runner.applyStyles();
|
1466
|
+
}
|
1467
|
+
|
1468
|
+
closeAnimation.hasBeenRun = true;
|
1469
|
+
if (options && options.tempClasses) {
|
1470
|
+
forEach(options.tempClasses, function(className) {
|
1471
|
+
$$jqLite.removeClass(element, className);
|
1472
|
+
});
|
1473
|
+
}
|
1474
|
+
|
1475
|
+
var data = element.data(NG_ANIMATE_STATE);
|
1476
|
+
if (data) {
|
1477
|
+
|
1478
|
+
/* only structural animations wait for reflow before removing an
|
1479
|
+
animation, but class-based animations don't. An example of this
|
1480
|
+
failing would be when a parent HTML tag has a ng-class attribute
|
1481
|
+
causing ALL directives below to skip animations during the digest */
|
1482
|
+
if (runner && runner.isClassBased) {
|
1483
|
+
cleanup(element, className);
|
1484
|
+
} else {
|
1485
|
+
$$asyncCallback(function() {
|
1486
|
+
var data = element.data(NG_ANIMATE_STATE) || {};
|
1487
|
+
if (localAnimationCount == data.index) {
|
1488
|
+
cleanup(element, className, animationEvent);
|
1489
|
+
}
|
1490
|
+
});
|
1491
|
+
element.data(NG_ANIMATE_STATE, data);
|
1492
|
+
}
|
1493
|
+
}
|
1494
|
+
fireDoneCallbackAsync();
|
1495
|
+
}
|
1496
|
+
}
|
1497
|
+
}
|
1498
|
+
|
1499
|
+
function cancelChildAnimations(element) {
|
1500
|
+
var node = extractElementNode(element);
|
1501
|
+
if (node) {
|
1502
|
+
var nodes = angular.isFunction(node.getElementsByClassName) ?
|
1503
|
+
node.getElementsByClassName(NG_ANIMATE_CLASS_NAME) :
|
1504
|
+
node.querySelectorAll('.' + NG_ANIMATE_CLASS_NAME);
|
1505
|
+
forEach(nodes, function(element) {
|
1506
|
+
element = angular.element(element);
|
1507
|
+
var data = element.data(NG_ANIMATE_STATE);
|
1508
|
+
if (data && data.active) {
|
1509
|
+
forEach(data.active, function(runner) {
|
1510
|
+
runner.cancel();
|
1511
|
+
});
|
1512
|
+
}
|
1513
|
+
});
|
1514
|
+
}
|
1515
|
+
}
|
1516
|
+
|
1517
|
+
function cleanup(element, className) {
|
1518
|
+
if (isMatchingElement(element, $rootElement)) {
|
1519
|
+
if (!rootAnimateState.disabled) {
|
1520
|
+
rootAnimateState.running = false;
|
1521
|
+
rootAnimateState.structural = false;
|
1522
|
+
}
|
1523
|
+
} else if (className) {
|
1524
|
+
var data = element.data(NG_ANIMATE_STATE) || {};
|
1525
|
+
|
1526
|
+
var removeAnimations = className === true;
|
1527
|
+
if (!removeAnimations && data.active && data.active[className]) {
|
1528
|
+
data.totalActive--;
|
1529
|
+
delete data.active[className];
|
1530
|
+
}
|
1531
|
+
|
1532
|
+
if (removeAnimations || !data.totalActive) {
|
1533
|
+
$$jqLite.removeClass(element, NG_ANIMATE_CLASS_NAME);
|
1534
|
+
element.removeData(NG_ANIMATE_STATE);
|
1535
|
+
}
|
1536
|
+
}
|
1537
|
+
}
|
1538
|
+
|
1539
|
+
function animationsDisabled(element, parentElement) {
|
1540
|
+
if (rootAnimateState.disabled) {
|
1541
|
+
return true;
|
1542
|
+
}
|
1543
|
+
|
1544
|
+
if (isMatchingElement(element, $rootElement)) {
|
1545
|
+
return rootAnimateState.running;
|
1546
|
+
}
|
1547
|
+
|
1548
|
+
var allowChildAnimations, parentRunningAnimation, hasParent;
|
1549
|
+
do {
|
1550
|
+
//the element did not reach the root element which means that it
|
1551
|
+
//is not apart of the DOM. Therefore there is no reason to do
|
1552
|
+
//any animations on it
|
1553
|
+
if (parentElement.length === 0) break;
|
1554
|
+
|
1555
|
+
var isRoot = isMatchingElement(parentElement, $rootElement);
|
1556
|
+
var state = isRoot ? rootAnimateState : (parentElement.data(NG_ANIMATE_STATE) || {});
|
1557
|
+
if (state.disabled) {
|
1558
|
+
return true;
|
1559
|
+
}
|
1560
|
+
|
1561
|
+
//no matter what, for an animation to work it must reach the root element
|
1562
|
+
//this implies that the element is attached to the DOM when the animation is run
|
1563
|
+
if (isRoot) {
|
1564
|
+
hasParent = true;
|
1565
|
+
}
|
1566
|
+
|
1567
|
+
//once a flag is found that is strictly false then everything before
|
1568
|
+
//it will be discarded and all child animations will be restricted
|
1569
|
+
if (allowChildAnimations !== false) {
|
1570
|
+
var animateChildrenFlag = parentElement.data(NG_ANIMATE_CHILDREN);
|
1571
|
+
if (angular.isDefined(animateChildrenFlag)) {
|
1572
|
+
allowChildAnimations = animateChildrenFlag;
|
1573
|
+
}
|
1574
|
+
}
|
1575
|
+
|
1576
|
+
parentRunningAnimation = parentRunningAnimation ||
|
1577
|
+
state.running ||
|
1578
|
+
(state.last && !state.last.isClassBased);
|
1579
|
+
}
|
1580
|
+
while (parentElement = parentElement.parent());
|
1581
|
+
|
1582
|
+
return !hasParent || (!allowChildAnimations && parentRunningAnimation);
|
1583
|
+
}
|
1584
|
+
}]);
|
1585
|
+
|
1586
|
+
$animateProvider.register('', ['$window', '$sniffer', '$timeout', '$$animateReflow',
|
1587
|
+
function($window, $sniffer, $timeout, $$animateReflow) {
|
1588
|
+
// Detect proper transitionend/animationend event names.
|
1589
|
+
var CSS_PREFIX = '', TRANSITION_PROP, TRANSITIONEND_EVENT, ANIMATION_PROP, ANIMATIONEND_EVENT;
|
1590
|
+
|
1591
|
+
// If unprefixed events are not supported but webkit-prefixed are, use the latter.
|
1592
|
+
// Otherwise, just use W3C names, browsers not supporting them at all will just ignore them.
|
1593
|
+
// Note: Chrome implements `window.onwebkitanimationend` and doesn't implement `window.onanimationend`
|
1594
|
+
// but at the same time dispatches the `animationend` event and not `webkitAnimationEnd`.
|
1595
|
+
// Register both events in case `window.onanimationend` is not supported because of that,
|
1596
|
+
// do the same for `transitionend` as Safari is likely to exhibit similar behavior.
|
1597
|
+
// Also, the only modern browser that uses vendor prefixes for transitions/keyframes is webkit
|
1598
|
+
// therefore there is no reason to test anymore for other vendor prefixes: http://caniuse.com/#search=transition
|
1599
|
+
if (window.ontransitionend === undefined && window.onwebkittransitionend !== undefined) {
|
1600
|
+
CSS_PREFIX = '-webkit-';
|
1601
|
+
TRANSITION_PROP = 'WebkitTransition';
|
1602
|
+
TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend';
|
1603
|
+
} else {
|
1604
|
+
TRANSITION_PROP = 'transition';
|
1605
|
+
TRANSITIONEND_EVENT = 'transitionend';
|
1606
|
+
}
|
1607
|
+
|
1608
|
+
if (window.onanimationend === undefined && window.onwebkitanimationend !== undefined) {
|
1609
|
+
CSS_PREFIX = '-webkit-';
|
1610
|
+
ANIMATION_PROP = 'WebkitAnimation';
|
1611
|
+
ANIMATIONEND_EVENT = 'webkitAnimationEnd animationend';
|
1612
|
+
} else {
|
1613
|
+
ANIMATION_PROP = 'animation';
|
1614
|
+
ANIMATIONEND_EVENT = 'animationend';
|
1615
|
+
}
|
1616
|
+
|
1617
|
+
var DURATION_KEY = 'Duration';
|
1618
|
+
var PROPERTY_KEY = 'Property';
|
1619
|
+
var DELAY_KEY = 'Delay';
|
1620
|
+
var ANIMATION_ITERATION_COUNT_KEY = 'IterationCount';
|
1621
|
+
var ANIMATION_PLAYSTATE_KEY = 'PlayState';
|
1622
|
+
var NG_ANIMATE_PARENT_KEY = '$$ngAnimateKey';
|
1623
|
+
var NG_ANIMATE_CSS_DATA_KEY = '$$ngAnimateCSS3Data';
|
1624
|
+
var ELAPSED_TIME_MAX_DECIMAL_PLACES = 3;
|
1625
|
+
var CLOSING_TIME_BUFFER = 1.5;
|
1626
|
+
var ONE_SECOND = 1000;
|
1627
|
+
|
1628
|
+
var lookupCache = {};
|
1629
|
+
var parentCounter = 0;
|
1630
|
+
var animationReflowQueue = [];
|
1631
|
+
var cancelAnimationReflow;
|
1632
|
+
function clearCacheAfterReflow() {
|
1633
|
+
if (!cancelAnimationReflow) {
|
1634
|
+
cancelAnimationReflow = $$animateReflow(function() {
|
1635
|
+
animationReflowQueue = [];
|
1636
|
+
cancelAnimationReflow = null;
|
1637
|
+
lookupCache = {};
|
1638
|
+
});
|
1639
|
+
}
|
1640
|
+
}
|
1641
|
+
|
1642
|
+
function afterReflow(element, callback) {
|
1643
|
+
if (cancelAnimationReflow) {
|
1644
|
+
cancelAnimationReflow();
|
1645
|
+
}
|
1646
|
+
animationReflowQueue.push(callback);
|
1647
|
+
cancelAnimationReflow = $$animateReflow(function() {
|
1648
|
+
forEach(animationReflowQueue, function(fn) {
|
1649
|
+
fn();
|
1650
|
+
});
|
1651
|
+
|
1652
|
+
animationReflowQueue = [];
|
1653
|
+
cancelAnimationReflow = null;
|
1654
|
+
lookupCache = {};
|
1655
|
+
});
|
1656
|
+
}
|
1657
|
+
|
1658
|
+
var closingTimer = null;
|
1659
|
+
var closingTimestamp = 0;
|
1660
|
+
var animationElementQueue = [];
|
1661
|
+
function animationCloseHandler(element, totalTime) {
|
1662
|
+
var node = extractElementNode(element);
|
1663
|
+
element = angular.element(node);
|
1664
|
+
|
1665
|
+
//this item will be garbage collected by the closing
|
1666
|
+
//animation timeout
|
1667
|
+
animationElementQueue.push(element);
|
1668
|
+
|
1669
|
+
//but it may not need to cancel out the existing timeout
|
1670
|
+
//if the timestamp is less than the previous one
|
1671
|
+
var futureTimestamp = Date.now() + totalTime;
|
1672
|
+
if (futureTimestamp <= closingTimestamp) {
|
1673
|
+
return;
|
1674
|
+
}
|
1675
|
+
|
1676
|
+
$timeout.cancel(closingTimer);
|
1677
|
+
|
1678
|
+
closingTimestamp = futureTimestamp;
|
1679
|
+
closingTimer = $timeout(function() {
|
1680
|
+
closeAllAnimations(animationElementQueue);
|
1681
|
+
animationElementQueue = [];
|
1682
|
+
}, totalTime, false);
|
1683
|
+
}
|
1684
|
+
|
1685
|
+
function closeAllAnimations(elements) {
|
1686
|
+
forEach(elements, function(element) {
|
1687
|
+
var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY);
|
1688
|
+
if (elementData) {
|
1689
|
+
forEach(elementData.closeAnimationFns, function(fn) {
|
1690
|
+
fn();
|
1691
|
+
});
|
1692
|
+
}
|
1693
|
+
});
|
1694
|
+
}
|
1695
|
+
|
1696
|
+
function getElementAnimationDetails(element, cacheKey) {
|
1697
|
+
var data = cacheKey ? lookupCache[cacheKey] : null;
|
1698
|
+
if (!data) {
|
1699
|
+
var transitionDuration = 0;
|
1700
|
+
var transitionDelay = 0;
|
1701
|
+
var animationDuration = 0;
|
1702
|
+
var animationDelay = 0;
|
1703
|
+
|
1704
|
+
//we want all the styles defined before and after
|
1705
|
+
forEach(element, function(element) {
|
1706
|
+
if (element.nodeType == ELEMENT_NODE) {
|
1707
|
+
var elementStyles = $window.getComputedStyle(element) || {};
|
1708
|
+
|
1709
|
+
var transitionDurationStyle = elementStyles[TRANSITION_PROP + DURATION_KEY];
|
1710
|
+
transitionDuration = Math.max(parseMaxTime(transitionDurationStyle), transitionDuration);
|
1711
|
+
|
1712
|
+
var transitionDelayStyle = elementStyles[TRANSITION_PROP + DELAY_KEY];
|
1713
|
+
transitionDelay = Math.max(parseMaxTime(transitionDelayStyle), transitionDelay);
|
1714
|
+
|
1715
|
+
var animationDelayStyle = elementStyles[ANIMATION_PROP + DELAY_KEY];
|
1716
|
+
animationDelay = Math.max(parseMaxTime(elementStyles[ANIMATION_PROP + DELAY_KEY]), animationDelay);
|
1717
|
+
|
1718
|
+
var aDuration = parseMaxTime(elementStyles[ANIMATION_PROP + DURATION_KEY]);
|
1719
|
+
|
1720
|
+
if (aDuration > 0) {
|
1721
|
+
aDuration *= parseInt(elementStyles[ANIMATION_PROP + ANIMATION_ITERATION_COUNT_KEY], 10) || 1;
|
1722
|
+
}
|
1723
|
+
animationDuration = Math.max(aDuration, animationDuration);
|
1724
|
+
}
|
1725
|
+
});
|
1726
|
+
data = {
|
1727
|
+
total: 0,
|
1728
|
+
transitionDelay: transitionDelay,
|
1729
|
+
transitionDuration: transitionDuration,
|
1730
|
+
animationDelay: animationDelay,
|
1731
|
+
animationDuration: animationDuration
|
1732
|
+
};
|
1733
|
+
if (cacheKey) {
|
1734
|
+
lookupCache[cacheKey] = data;
|
1735
|
+
}
|
1736
|
+
}
|
1737
|
+
return data;
|
1738
|
+
}
|
1739
|
+
|
1740
|
+
function parseMaxTime(str) {
|
1741
|
+
var maxValue = 0;
|
1742
|
+
var values = isString(str) ?
|
1743
|
+
str.split(/\s*,\s*/) :
|
1744
|
+
[];
|
1745
|
+
forEach(values, function(value) {
|
1746
|
+
maxValue = Math.max(parseFloat(value) || 0, maxValue);
|
1747
|
+
});
|
1748
|
+
return maxValue;
|
1749
|
+
}
|
1750
|
+
|
1751
|
+
function getCacheKey(element) {
|
1752
|
+
var parentElement = element.parent();
|
1753
|
+
var parentID = parentElement.data(NG_ANIMATE_PARENT_KEY);
|
1754
|
+
if (!parentID) {
|
1755
|
+
parentElement.data(NG_ANIMATE_PARENT_KEY, ++parentCounter);
|
1756
|
+
parentID = parentCounter;
|
1757
|
+
}
|
1758
|
+
return parentID + '-' + extractElementNode(element).getAttribute('class');
|
1759
|
+
}
|
1760
|
+
|
1761
|
+
function animateSetup(animationEvent, element, className, styles) {
|
1762
|
+
var structural = ['ng-enter','ng-leave','ng-move'].indexOf(className) >= 0;
|
1763
|
+
|
1764
|
+
var cacheKey = getCacheKey(element);
|
1765
|
+
var eventCacheKey = cacheKey + ' ' + className;
|
1766
|
+
var itemIndex = lookupCache[eventCacheKey] ? ++lookupCache[eventCacheKey].total : 0;
|
1767
|
+
|
1768
|
+
var stagger = {};
|
1769
|
+
if (itemIndex > 0) {
|
1770
|
+
var staggerClassName = className + '-stagger';
|
1771
|
+
var staggerCacheKey = cacheKey + ' ' + staggerClassName;
|
1772
|
+
var applyClasses = !lookupCache[staggerCacheKey];
|
1773
|
+
|
1774
|
+
applyClasses && $$jqLite.addClass(element, staggerClassName);
|
1775
|
+
|
1776
|
+
stagger = getElementAnimationDetails(element, staggerCacheKey);
|
1777
|
+
|
1778
|
+
applyClasses && $$jqLite.removeClass(element, staggerClassName);
|
1779
|
+
}
|
1780
|
+
|
1781
|
+
$$jqLite.addClass(element, className);
|
1782
|
+
|
1783
|
+
var formerData = element.data(NG_ANIMATE_CSS_DATA_KEY) || {};
|
1784
|
+
var timings = getElementAnimationDetails(element, eventCacheKey);
|
1785
|
+
var transitionDuration = timings.transitionDuration;
|
1786
|
+
var animationDuration = timings.animationDuration;
|
1787
|
+
|
1788
|
+
if (structural && transitionDuration === 0 && animationDuration === 0) {
|
1789
|
+
$$jqLite.removeClass(element, className);
|
1790
|
+
return false;
|
1791
|
+
}
|
1792
|
+
|
1793
|
+
var blockTransition = styles || (structural && transitionDuration > 0);
|
1794
|
+
var blockAnimation = animationDuration > 0 &&
|
1795
|
+
stagger.animationDelay > 0 &&
|
1796
|
+
stagger.animationDuration === 0;
|
1797
|
+
|
1798
|
+
var closeAnimationFns = formerData.closeAnimationFns || [];
|
1799
|
+
element.data(NG_ANIMATE_CSS_DATA_KEY, {
|
1800
|
+
stagger: stagger,
|
1801
|
+
cacheKey: eventCacheKey,
|
1802
|
+
running: formerData.running || 0,
|
1803
|
+
itemIndex: itemIndex,
|
1804
|
+
blockTransition: blockTransition,
|
1805
|
+
closeAnimationFns: closeAnimationFns
|
1806
|
+
});
|
1807
|
+
|
1808
|
+
var node = extractElementNode(element);
|
1809
|
+
|
1810
|
+
if (blockTransition) {
|
1811
|
+
blockTransitions(node, true);
|
1812
|
+
if (styles) {
|
1813
|
+
element.css(styles);
|
1814
|
+
}
|
1815
|
+
}
|
1816
|
+
|
1817
|
+
if (blockAnimation) {
|
1818
|
+
blockAnimations(node, true);
|
1819
|
+
}
|
1820
|
+
|
1821
|
+
return true;
|
1822
|
+
}
|
1823
|
+
|
1824
|
+
function animateRun(animationEvent, element, className, activeAnimationComplete, styles) {
|
1825
|
+
var node = extractElementNode(element);
|
1826
|
+
var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY);
|
1827
|
+
if (node.getAttribute('class').indexOf(className) == -1 || !elementData) {
|
1828
|
+
activeAnimationComplete();
|
1829
|
+
return;
|
1830
|
+
}
|
1831
|
+
|
1832
|
+
var activeClassName = '';
|
1833
|
+
var pendingClassName = '';
|
1834
|
+
forEach(className.split(' '), function(klass, i) {
|
1835
|
+
var prefix = (i > 0 ? ' ' : '') + klass;
|
1836
|
+
activeClassName += prefix + '-active';
|
1837
|
+
pendingClassName += prefix + '-pending';
|
1838
|
+
});
|
1839
|
+
|
1840
|
+
var style = '';
|
1841
|
+
var appliedStyles = [];
|
1842
|
+
var itemIndex = elementData.itemIndex;
|
1843
|
+
var stagger = elementData.stagger;
|
1844
|
+
var staggerTime = 0;
|
1845
|
+
if (itemIndex > 0) {
|
1846
|
+
var transitionStaggerDelay = 0;
|
1847
|
+
if (stagger.transitionDelay > 0 && stagger.transitionDuration === 0) {
|
1848
|
+
transitionStaggerDelay = stagger.transitionDelay * itemIndex;
|
1849
|
+
}
|
1850
|
+
|
1851
|
+
var animationStaggerDelay = 0;
|
1852
|
+
if (stagger.animationDelay > 0 && stagger.animationDuration === 0) {
|
1853
|
+
animationStaggerDelay = stagger.animationDelay * itemIndex;
|
1854
|
+
appliedStyles.push(CSS_PREFIX + 'animation-play-state');
|
1855
|
+
}
|
1856
|
+
|
1857
|
+
staggerTime = Math.round(Math.max(transitionStaggerDelay, animationStaggerDelay) * 100) / 100;
|
1858
|
+
}
|
1859
|
+
|
1860
|
+
if (!staggerTime) {
|
1861
|
+
$$jqLite.addClass(element, activeClassName);
|
1862
|
+
if (elementData.blockTransition) {
|
1863
|
+
blockTransitions(node, false);
|
1864
|
+
}
|
1865
|
+
}
|
1866
|
+
|
1867
|
+
var eventCacheKey = elementData.cacheKey + ' ' + activeClassName;
|
1868
|
+
var timings = getElementAnimationDetails(element, eventCacheKey);
|
1869
|
+
var maxDuration = Math.max(timings.transitionDuration, timings.animationDuration);
|
1870
|
+
if (maxDuration === 0) {
|
1871
|
+
$$jqLite.removeClass(element, activeClassName);
|
1872
|
+
animateClose(element, className);
|
1873
|
+
activeAnimationComplete();
|
1874
|
+
return;
|
1875
|
+
}
|
1876
|
+
|
1877
|
+
if (!staggerTime && styles && Object.keys(styles).length > 0) {
|
1878
|
+
if (!timings.transitionDuration) {
|
1879
|
+
element.css('transition', timings.animationDuration + 's linear all');
|
1880
|
+
appliedStyles.push('transition');
|
1881
|
+
}
|
1882
|
+
element.css(styles);
|
1883
|
+
}
|
1884
|
+
|
1885
|
+
var maxDelay = Math.max(timings.transitionDelay, timings.animationDelay);
|
1886
|
+
var maxDelayTime = maxDelay * ONE_SECOND;
|
1887
|
+
|
1888
|
+
if (appliedStyles.length > 0) {
|
1889
|
+
//the element being animated may sometimes contain comment nodes in
|
1890
|
+
//the jqLite object, so we're safe to use a single variable to house
|
1891
|
+
//the styles since there is always only one element being animated
|
1892
|
+
var oldStyle = node.getAttribute('style') || '';
|
1893
|
+
if (oldStyle.charAt(oldStyle.length - 1) !== ';') {
|
1894
|
+
oldStyle += ';';
|
1895
|
+
}
|
1896
|
+
node.setAttribute('style', oldStyle + ' ' + style);
|
1897
|
+
}
|
1898
|
+
|
1899
|
+
var startTime = Date.now();
|
1900
|
+
var css3AnimationEvents = ANIMATIONEND_EVENT + ' ' + TRANSITIONEND_EVENT;
|
1901
|
+
var animationTime = (maxDelay + maxDuration) * CLOSING_TIME_BUFFER;
|
1902
|
+
var totalTime = (staggerTime + animationTime) * ONE_SECOND;
|
1903
|
+
|
1904
|
+
var staggerTimeout;
|
1905
|
+
if (staggerTime > 0) {
|
1906
|
+
$$jqLite.addClass(element, pendingClassName);
|
1907
|
+
staggerTimeout = $timeout(function() {
|
1908
|
+
staggerTimeout = null;
|
1909
|
+
|
1910
|
+
if (timings.transitionDuration > 0) {
|
1911
|
+
blockTransitions(node, false);
|
1912
|
+
}
|
1913
|
+
if (timings.animationDuration > 0) {
|
1914
|
+
blockAnimations(node, false);
|
1915
|
+
}
|
1916
|
+
|
1917
|
+
$$jqLite.addClass(element, activeClassName);
|
1918
|
+
$$jqLite.removeClass(element, pendingClassName);
|
1919
|
+
|
1920
|
+
if (styles) {
|
1921
|
+
if (timings.transitionDuration === 0) {
|
1922
|
+
element.css('transition', timings.animationDuration + 's linear all');
|
1923
|
+
}
|
1924
|
+
element.css(styles);
|
1925
|
+
appliedStyles.push('transition');
|
1926
|
+
}
|
1927
|
+
}, staggerTime * ONE_SECOND, false);
|
1928
|
+
}
|
1929
|
+
|
1930
|
+
element.on(css3AnimationEvents, onAnimationProgress);
|
1931
|
+
elementData.closeAnimationFns.push(function() {
|
1932
|
+
onEnd();
|
1933
|
+
activeAnimationComplete();
|
1934
|
+
});
|
1935
|
+
|
1936
|
+
elementData.running++;
|
1937
|
+
animationCloseHandler(element, totalTime);
|
1938
|
+
return onEnd;
|
1939
|
+
|
1940
|
+
// This will automatically be called by $animate so
|
1941
|
+
// there is no need to attach this internally to the
|
1942
|
+
// timeout done method.
|
1943
|
+
function onEnd() {
|
1944
|
+
element.off(css3AnimationEvents, onAnimationProgress);
|
1945
|
+
$$jqLite.removeClass(element, activeClassName);
|
1946
|
+
$$jqLite.removeClass(element, pendingClassName);
|
1947
|
+
if (staggerTimeout) {
|
1948
|
+
$timeout.cancel(staggerTimeout);
|
1949
|
+
}
|
1950
|
+
animateClose(element, className);
|
1951
|
+
var node = extractElementNode(element);
|
1952
|
+
for (var i in appliedStyles) {
|
1953
|
+
node.style.removeProperty(appliedStyles[i]);
|
1954
|
+
}
|
1955
|
+
}
|
1956
|
+
|
1957
|
+
function onAnimationProgress(event) {
|
1958
|
+
event.stopPropagation();
|
1959
|
+
var ev = event.originalEvent || event;
|
1960
|
+
var timeStamp = ev.$manualTimeStamp || ev.timeStamp || Date.now();
|
1961
|
+
|
1962
|
+
/* Firefox (or possibly just Gecko) likes to not round values up
|
1963
|
+
* when a ms measurement is used for the animation */
|
1964
|
+
var elapsedTime = parseFloat(ev.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES));
|
1965
|
+
|
1966
|
+
/* $manualTimeStamp is a mocked timeStamp value which is set
|
1967
|
+
* within browserTrigger(). This is only here so that tests can
|
1968
|
+
* mock animations properly. Real events fallback to event.timeStamp,
|
1969
|
+
* or, if they don't, then a timeStamp is automatically created for them.
|
1970
|
+
* We're checking to see if the timeStamp surpasses the expected delay,
|
1971
|
+
* but we're using elapsedTime instead of the timeStamp on the 2nd
|
1972
|
+
* pre-condition since animations sometimes close off early */
|
1973
|
+
if (Math.max(timeStamp - startTime, 0) >= maxDelayTime && elapsedTime >= maxDuration) {
|
1974
|
+
activeAnimationComplete();
|
1975
|
+
}
|
1976
|
+
}
|
1977
|
+
}
|
1978
|
+
|
1979
|
+
function blockTransitions(node, bool) {
|
1980
|
+
node.style[TRANSITION_PROP + PROPERTY_KEY] = bool ? 'none' : '';
|
1981
|
+
}
|
1982
|
+
|
1983
|
+
function blockAnimations(node, bool) {
|
1984
|
+
node.style[ANIMATION_PROP + ANIMATION_PLAYSTATE_KEY] = bool ? 'paused' : '';
|
1985
|
+
}
|
1986
|
+
|
1987
|
+
function animateBefore(animationEvent, element, className, styles) {
|
1988
|
+
if (animateSetup(animationEvent, element, className, styles)) {
|
1989
|
+
return function(cancelled) {
|
1990
|
+
cancelled && animateClose(element, className);
|
1991
|
+
};
|
1992
|
+
}
|
1993
|
+
}
|
1994
|
+
|
1995
|
+
function animateAfter(animationEvent, element, className, afterAnimationComplete, styles) {
|
1996
|
+
if (element.data(NG_ANIMATE_CSS_DATA_KEY)) {
|
1997
|
+
return animateRun(animationEvent, element, className, afterAnimationComplete, styles);
|
1998
|
+
} else {
|
1999
|
+
animateClose(element, className);
|
2000
|
+
afterAnimationComplete();
|
2001
|
+
}
|
2002
|
+
}
|
2003
|
+
|
2004
|
+
function animate(animationEvent, element, className, animationComplete, options) {
|
2005
|
+
//If the animateSetup function doesn't bother returning a
|
2006
|
+
//cancellation function then it means that there is no animation
|
2007
|
+
//to perform at all
|
2008
|
+
var preReflowCancellation = animateBefore(animationEvent, element, className, options.from);
|
2009
|
+
if (!preReflowCancellation) {
|
2010
|
+
clearCacheAfterReflow();
|
2011
|
+
animationComplete();
|
2012
|
+
return;
|
2013
|
+
}
|
2014
|
+
|
2015
|
+
//There are two cancellation functions: one is before the first
|
2016
|
+
//reflow animation and the second is during the active state
|
2017
|
+
//animation. The first function will take care of removing the
|
2018
|
+
//data from the element which will not make the 2nd animation
|
2019
|
+
//happen in the first place
|
2020
|
+
var cancel = preReflowCancellation;
|
2021
|
+
afterReflow(element, function() {
|
2022
|
+
//once the reflow is complete then we point cancel to
|
2023
|
+
//the new cancellation function which will remove all of the
|
2024
|
+
//animation properties from the active animation
|
2025
|
+
cancel = animateAfter(animationEvent, element, className, animationComplete, options.to);
|
2026
|
+
});
|
2027
|
+
|
2028
|
+
return function(cancelled) {
|
2029
|
+
(cancel || noop)(cancelled);
|
2030
|
+
};
|
2031
|
+
}
|
2032
|
+
|
2033
|
+
function animateClose(element, className) {
|
2034
|
+
$$jqLite.removeClass(element, className);
|
2035
|
+
var data = element.data(NG_ANIMATE_CSS_DATA_KEY);
|
2036
|
+
if (data) {
|
2037
|
+
if (data.running) {
|
2038
|
+
data.running--;
|
2039
|
+
}
|
2040
|
+
if (!data.running || data.running === 0) {
|
2041
|
+
element.removeData(NG_ANIMATE_CSS_DATA_KEY);
|
2042
|
+
}
|
2043
|
+
}
|
2044
|
+
}
|
2045
|
+
|
2046
|
+
return {
|
2047
|
+
animate: function(element, className, from, to, animationCompleted, options) {
|
2048
|
+
options = options || {};
|
2049
|
+
options.from = from;
|
2050
|
+
options.to = to;
|
2051
|
+
return animate('animate', element, className, animationCompleted, options);
|
2052
|
+
},
|
2053
|
+
|
2054
|
+
enter: function(element, animationCompleted, options) {
|
2055
|
+
options = options || {};
|
2056
|
+
return animate('enter', element, 'ng-enter', animationCompleted, options);
|
2057
|
+
},
|
2058
|
+
|
2059
|
+
leave: function(element, animationCompleted, options) {
|
2060
|
+
options = options || {};
|
2061
|
+
return animate('leave', element, 'ng-leave', animationCompleted, options);
|
2062
|
+
},
|
2063
|
+
|
2064
|
+
move: function(element, animationCompleted, options) {
|
2065
|
+
options = options || {};
|
2066
|
+
return animate('move', element, 'ng-move', animationCompleted, options);
|
2067
|
+
},
|
2068
|
+
|
2069
|
+
beforeSetClass: function(element, add, remove, animationCompleted, options) {
|
2070
|
+
options = options || {};
|
2071
|
+
var className = suffixClasses(remove, '-remove') + ' ' +
|
2072
|
+
suffixClasses(add, '-add');
|
2073
|
+
var cancellationMethod = animateBefore('setClass', element, className, options.from);
|
2074
|
+
if (cancellationMethod) {
|
2075
|
+
afterReflow(element, animationCompleted);
|
2076
|
+
return cancellationMethod;
|
2077
|
+
}
|
2078
|
+
clearCacheAfterReflow();
|
2079
|
+
animationCompleted();
|
2080
|
+
},
|
2081
|
+
|
2082
|
+
beforeAddClass: function(element, className, animationCompleted, options) {
|
2083
|
+
options = options || {};
|
2084
|
+
var cancellationMethod = animateBefore('addClass', element, suffixClasses(className, '-add'), options.from);
|
2085
|
+
if (cancellationMethod) {
|
2086
|
+
afterReflow(element, animationCompleted);
|
2087
|
+
return cancellationMethod;
|
2088
|
+
}
|
2089
|
+
clearCacheAfterReflow();
|
2090
|
+
animationCompleted();
|
2091
|
+
},
|
2092
|
+
|
2093
|
+
beforeRemoveClass: function(element, className, animationCompleted, options) {
|
2094
|
+
options = options || {};
|
2095
|
+
var cancellationMethod = animateBefore('removeClass', element, suffixClasses(className, '-remove'), options.from);
|
2096
|
+
if (cancellationMethod) {
|
2097
|
+
afterReflow(element, animationCompleted);
|
2098
|
+
return cancellationMethod;
|
2099
|
+
}
|
2100
|
+
clearCacheAfterReflow();
|
2101
|
+
animationCompleted();
|
2102
|
+
},
|
2103
|
+
|
2104
|
+
setClass: function(element, add, remove, animationCompleted, options) {
|
2105
|
+
options = options || {};
|
2106
|
+
remove = suffixClasses(remove, '-remove');
|
2107
|
+
add = suffixClasses(add, '-add');
|
2108
|
+
var className = remove + ' ' + add;
|
2109
|
+
return animateAfter('setClass', element, className, animationCompleted, options.to);
|
2110
|
+
},
|
2111
|
+
|
2112
|
+
addClass: function(element, className, animationCompleted, options) {
|
2113
|
+
options = options || {};
|
2114
|
+
return animateAfter('addClass', element, suffixClasses(className, '-add'), animationCompleted, options.to);
|
2115
|
+
},
|
2116
|
+
|
2117
|
+
removeClass: function(element, className, animationCompleted, options) {
|
2118
|
+
options = options || {};
|
2119
|
+
return animateAfter('removeClass', element, suffixClasses(className, '-remove'), animationCompleted, options.to);
|
2120
|
+
}
|
2121
|
+
};
|
2122
|
+
|
2123
|
+
function suffixClasses(classes, suffix) {
|
2124
|
+
var className = '';
|
2125
|
+
classes = isArray(classes) ? classes : classes.split(/\s+/);
|
2126
|
+
forEach(classes, function(klass, i) {
|
2127
|
+
if (klass && klass.length > 0) {
|
2128
|
+
className += (i > 0 ? ' ' : '') + klass + suffix;
|
2129
|
+
}
|
2130
|
+
});
|
2131
|
+
return className;
|
2132
|
+
}
|
2133
|
+
}]);
|
2134
|
+
}]);
|
2135
|
+
|
2136
|
+
|
2137
|
+
})(window, window.angular);
|