"format global";"deps angular";"deps moment";!function(){"use strict";functiona(a,b){returna.module("angularMoment",[]).constant("angularMomentConfig",{preprocess:null,timezone:"",format:null,statefulFilters:!0}).constant("moment",b).constant("amTimeAgoConfig",{withoutSuffix:!1,serverTime:null,titleFormat:null}).directive("amTimeAgo",["$window","moment","amMoment","amTimeAgoConfig","angularMomentConfig",function(b,c,d,e,f){returnfunction(g,h,i){functionj(){vara;if(e.serverTime){varb=(newDate).getTime(),d=b-u+e.serverTime;a=c(d)}elsea=c();returna}functionk(){q&&(b.clearTimeout(q),q=null)}functionl(a){if(h.text(a.from(j(),s)),t&&!h.attr("title")&&h.attr("title",a.local().format(t)),!x){varc=Math.abs(j().diff(a,"minute")),d=3600;1>c?d=1:60>c?d=30:180>c&&(d=300),q=b.setTimeout(function(){l(a)},1e3*d)}}functionm(a){y&&h.attr("datetime",a)}functionn(){if(k(),o){vara=d.preprocessDate(o,v,r);l(a),m(a.toISOString())}}varo,p,q=null,r=f.format,s=e.withoutSuffix,t=e.titleFormat,u=(newDate).getTime(),v=f.preprocess,w=i.amTimeAgo.replace(/^::/,""),x=0===i.amTimeAgo.indexOf("::"),y="TIME"===h[0].nodeName.toUpperCase();p=g.$watch(w,function(a){return"undefined"==typeofa||null===a||""===a?(k(),void(o&&(h.text(""),m(""),o=null))):(o=a,n(),void(void0!==a&&x&&p()))}),a.isDefined(i.amWithoutSuffix)&&g.$watch(i.amWithoutSuffix,function(a){"boolean"==typeofa?(s=a,n()):s=e.withoutSuffix}),i.$observe("amFormat",function(a){"undefined"!=typeofa&&(r=a,n())}),i.$observe("amPreprocess",function(a){v=a,n()}),g.$on("$destroy",function(){k()}),g.$on("amMoment:localeChanged",function(){n()})}}]).service("amMoment",["moment","$rootScope","$log","angularMomentConfig",function(b,c,d,e){this.preprocessors={utc:b.utc,unix:b.unix},this.changeLocale=function(d,e){varf=b.locale(d,e);returna.isDefined(d)&&c.$broadcast("amMoment:localeChanged"),f},this.changeTimezone=function(a){e.timezone=a,c.$broadcast("amMoment:timezoneChanged")},this.preprocessDate=function(c,f,g){returna.isUndefined(f)&&(f=e.preprocess),this.preprocessors[f]?this.preprocessors[f](c,g):(f&&d.warn("angular-moment: Ignoring unsupported value for preprocess: "+f),!isNaN(parseFloat(c))&&isFinite(c)?b(parseInt(c,10)):b(c,g))},this.applyTimezone=function(a){varb=e.timezone;returna&&b&&(a.tz?a=a.tz(b):d.warn("angular-moment: timezone specified but moment.tz() is undefined. Did you forget to include moment-timezone.js?")),a}}]).filter("amCalendar",["moment","amMoment","angularMomentConfig",function(a,b,c){functiond(c,d){if("undefined"==typeofc||null===c)return"";c=b.preprocessDate(c,d);vare=a(c);returne.isValid()?b.applyTimezone(e).calendar():""}returnd.$stateful=c.statefulFilters,d}]).filter("amDateFormat",["moment","amMoment","angularMomentConfig",function(a,b,c){functiond(c,d,e){if("undefined"==typeofc||null===c)return"";c=b.preprocessDate(c,e);varf=a(c);returnf.isValid()?b.applyTimezone(f).format(d):""}returnd.$stateful=c.statefulFilters,d}]).filter("amDurationFormat",["moment","angularMomentConfig",function(a,b){functionc(b,c,d){return"undefined"==typeofb||null===b?"":a.duration(b,c).humanize(d)}returnc.$stateful=b.statefulFilters,c}]).filter("amTimeAgo",["moment","amMoment","angularMomentConfig",function(a,b,c){functiond(c,d,e){if("undefined"==typeofc||null===c)return"";c=b.preprocessDate(c,d);varf=a(c);returnf.isValid()?b.applyTimezone(f).fromNow(e):""}returnd.$stateful=c.statefulFilters,d}])}"function"==typeofdefine&&define.amd?define(["angular","moment"],a):"undefined"!=typeofmodule&&module&&module.exports?a(angular,require("moment")):a(angular,window.moment)}();