Client code change form GSO-GUI to OPEN-O GUI
[vnfsdk/refrepo.git] / portal-common / src / main / webapp / common / thirdparty / bootstrap-daterangepicker / moment.js
diff --git a/portal-common/src/main/webapp/common/thirdparty/bootstrap-daterangepicker/moment.js b/portal-common/src/main/webapp/common/thirdparty/bootstrap-daterangepicker/moment.js
new file mode 100644 (file)
index 0000000..6d94b17
--- /dev/null
@@ -0,0 +1,2808 @@
+//! moment.js\r
+//! version : 2.8.1\r
+//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\r
+//! license : MIT\r
+//! momentjs.com\r
+\r
+(function (undefined) {\r
+    /************************************\r
+        Constants\r
+    ************************************/\r
+\r
+    var moment,\r
+        VERSION = '2.8.1',\r
+        // the global-scope this is NOT the global object in Node.js\r
+        globalScope = typeof global !== 'undefined' ? global : this,\r
+        oldGlobalMoment,\r
+        round = Math.round,\r
+        i,\r
+\r
+        YEAR = 0,\r
+        MONTH = 1,\r
+        DATE = 2,\r
+        HOUR = 3,\r
+        MINUTE = 4,\r
+        SECOND = 5,\r
+        MILLISECOND = 6,\r
+\r
+        // internal storage for locale config files\r
+        locales = {},\r
+\r
+        // extra moment internal properties (plugins register props here)\r
+        momentProperties = [],\r
+\r
+        // check for nodeJS\r
+        hasModule = (typeof module !== 'undefined' && module.exports),\r
+\r
+        // ASP.NET json date format regex\r
+        aspNetJsonRegex = /^\/?Date\((\-?\d+)/i,\r
+        aspNetTimeSpanJsonRegex = /(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,\r
+\r
+        // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\r
+        // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\r
+        isoDurationRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,\r
+\r
+        // format tokens\r
+        formattingTokens = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,\r
+        localFormattingTokens = /(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,\r
+\r
+        // parsing token regexes\r
+        parseTokenOneOrTwoDigits = /\d\d?/, // 0 - 99\r
+        parseTokenOneToThreeDigits = /\d{1,3}/, // 0 - 999\r
+        parseTokenOneToFourDigits = /\d{1,4}/, // 0 - 9999\r
+        parseTokenOneToSixDigits = /[+\-]?\d{1,6}/, // -999,999 - 999,999\r
+        parseTokenDigits = /\d+/, // nonzero number of digits\r
+        parseTokenWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i, // any word (or two) characters or numbers including two/three word month in arabic.\r
+        parseTokenTimezone = /Z|[\+\-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z\r
+        parseTokenT = /T/i, // T (ISO separator)\r
+        parseTokenTimestampMs = /[\+\-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123\r
+        parseTokenOrdinal = /\d{1,2}/,\r
+\r
+        //strict parsing regexes\r
+        parseTokenOneDigit = /\d/, // 0 - 9\r
+        parseTokenTwoDigits = /\d\d/, // 00 - 99\r
+        parseTokenThreeDigits = /\d{3}/, // 000 - 999\r
+        parseTokenFourDigits = /\d{4}/, // 0000 - 9999\r
+        parseTokenSixDigits = /[+-]?\d{6}/, // -999,999 - 999,999\r
+        parseTokenSignedNumber = /[+-]?\d+/, // -inf - inf\r
+\r
+        // iso 8601 regex\r
+        // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\r
+        isoRegex = /^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,\r
+\r
+        isoFormat = 'YYYY-MM-DDTHH:mm:ssZ',\r
+\r
+        isoDates = [\r
+            ['YYYYYY-MM-DD', /[+-]\d{6}-\d{2}-\d{2}/],\r
+            ['YYYY-MM-DD', /\d{4}-\d{2}-\d{2}/],\r
+            ['GGGG-[W]WW-E', /\d{4}-W\d{2}-\d/],\r
+            ['GGGG-[W]WW', /\d{4}-W\d{2}/],\r
+            ['YYYY-DDD', /\d{4}-\d{3}/]\r
+        ],\r
+\r
+        // iso time formats and regexes\r
+        isoTimes = [\r
+            ['HH:mm:ss.SSSS', /(T| )\d\d:\d\d:\d\d\.\d+/],\r
+            ['HH:mm:ss', /(T| )\d\d:\d\d:\d\d/],\r
+            ['HH:mm', /(T| )\d\d:\d\d/],\r
+            ['HH', /(T| )\d\d/]\r
+        ],\r
+\r
+        // timezone chunker "+10:00" > ["10", "00"] or "-1530" > ["-15", "30"]\r
+        parseTimezoneChunker = /([\+\-]|\d\d)/gi,\r
+\r
+        // getter and setter names\r
+        proxyGettersAndSetters = 'Date|Hours|Minutes|Seconds|Milliseconds'.split('|'),\r
+        unitMillisecondFactors = {\r
+            'Milliseconds' : 1,\r
+            'Seconds' : 1e3,\r
+            'Minutes' : 6e4,\r
+            'Hours' : 36e5,\r
+            'Days' : 864e5,\r
+            'Months' : 2592e6,\r
+            'Years' : 31536e6\r
+        },\r
+\r
+        unitAliases = {\r
+            ms : 'millisecond',\r
+            s : 'second',\r
+            m : 'minute',\r
+            h : 'hour',\r
+            d : 'day',\r
+            D : 'date',\r
+            w : 'week',\r
+            W : 'isoWeek',\r
+            M : 'month',\r
+            Q : 'quarter',\r
+            y : 'year',\r
+            DDD : 'dayOfYear',\r
+            e : 'weekday',\r
+            E : 'isoWeekday',\r
+            gg: 'weekYear',\r
+            GG: 'isoWeekYear'\r
+        },\r
+\r
+        camelFunctions = {\r
+            dayofyear : 'dayOfYear',\r
+            isoweekday : 'isoWeekday',\r
+            isoweek : 'isoWeek',\r
+            weekyear : 'weekYear',\r
+            isoweekyear : 'isoWeekYear'\r
+        },\r
+\r
+        // format function strings\r
+        formatFunctions = {},\r
+\r
+        // default relative time thresholds\r
+        relativeTimeThresholds = {\r
+            s: 45,  // seconds to minute\r
+            m: 45,  // minutes to hour\r
+            h: 22,  // hours to day\r
+            d: 26,  // days to month\r
+            M: 11   // months to year\r
+        },\r
+\r
+        // tokens to ordinalize and pad\r
+        ordinalizeTokens = 'DDD w W M D d'.split(' '),\r
+        paddedTokens = 'M D H h m s w W'.split(' '),\r
+\r
+        formatTokenFunctions = {\r
+            M    : function () {\r
+                return this.month() + 1;\r
+            },\r
+            MMM  : function (format) {\r
+                return this.localeData().monthsShort(this, format);\r
+            },\r
+            MMMM : function (format) {\r
+                return this.localeData().months(this, format);\r
+            },\r
+            D    : function () {\r
+                return this.date();\r
+            },\r
+            DDD  : function () {\r
+                return this.dayOfYear();\r
+            },\r
+            d    : function () {\r
+                return this.day();\r
+            },\r
+            dd   : function (format) {\r
+                return this.localeData().weekdaysMin(this, format);\r
+            },\r
+            ddd  : function (format) {\r
+                return this.localeData().weekdaysShort(this, format);\r
+            },\r
+            dddd : function (format) {\r
+                return this.localeData().weekdays(this, format);\r
+            },\r
+            w    : function () {\r
+                return this.week();\r
+            },\r
+            W    : function () {\r
+                return this.isoWeek();\r
+            },\r
+            YY   : function () {\r
+                return leftZeroFill(this.year() % 100, 2);\r
+            },\r
+            YYYY : function () {\r
+                return leftZeroFill(this.year(), 4);\r
+            },\r
+            YYYYY : function () {\r
+                return leftZeroFill(this.year(), 5);\r
+            },\r
+            YYYYYY : function () {\r
+                var y = this.year(), sign = y >= 0 ? '+' : '-';\r
+                return sign + leftZeroFill(Math.abs(y), 6);\r
+            },\r
+            gg   : function () {\r
+                return leftZeroFill(this.weekYear() % 100, 2);\r
+            },\r
+            gggg : function () {\r
+                return leftZeroFill(this.weekYear(), 4);\r
+            },\r
+            ggggg : function () {\r
+                return leftZeroFill(this.weekYear(), 5);\r
+            },\r
+            GG   : function () {\r
+                return leftZeroFill(this.isoWeekYear() % 100, 2);\r
+            },\r
+            GGGG : function () {\r
+                return leftZeroFill(this.isoWeekYear(), 4);\r
+            },\r
+            GGGGG : function () {\r
+                return leftZeroFill(this.isoWeekYear(), 5);\r
+            },\r
+            e : function () {\r
+                return this.weekday();\r
+            },\r
+            E : function () {\r
+                return this.isoWeekday();\r
+            },\r
+            a    : function () {\r
+                return this.localeData().meridiem(this.hours(), this.minutes(), true);\r
+            },\r
+            A    : function () {\r
+                return this.localeData().meridiem(this.hours(), this.minutes(), false);\r
+            },\r
+            H    : function () {\r
+                return this.hours();\r
+            },\r
+            h    : function () {\r
+                return this.hours() % 12 || 12;\r
+            },\r
+            m    : function () {\r
+                return this.minutes();\r
+            },\r
+            s    : function () {\r
+                return this.seconds();\r
+            },\r
+            S    : function () {\r
+                return toInt(this.milliseconds() / 100);\r
+            },\r
+            SS   : function () {\r
+                return leftZeroFill(toInt(this.milliseconds() / 10), 2);\r
+            },\r
+            SSS  : function () {\r
+                return leftZeroFill(this.milliseconds(), 3);\r
+            },\r
+            SSSS : function () {\r
+                return leftZeroFill(this.milliseconds(), 3);\r
+            },\r
+            Z    : function () {\r
+                var a = -this.zone(),\r
+                    b = '+';\r
+                if (a < 0) {\r
+                    a = -a;\r
+                    b = '-';\r
+                }\r
+                return b + leftZeroFill(toInt(a / 60), 2) + ':' + leftZeroFill(toInt(a) % 60, 2);\r
+            },\r
+            ZZ   : function () {\r
+                var a = -this.zone(),\r
+                    b = '+';\r
+                if (a < 0) {\r
+                    a = -a;\r
+                    b = '-';\r
+                }\r
+                return b + leftZeroFill(toInt(a / 60), 2) + leftZeroFill(toInt(a) % 60, 2);\r
+            },\r
+            z : function () {\r
+                return this.zoneAbbr();\r
+            },\r
+            zz : function () {\r
+                return this.zoneName();\r
+            },\r
+            X    : function () {\r
+                return this.unix();\r
+            },\r
+            Q : function () {\r
+                return this.quarter();\r
+            }\r
+        },\r
+\r
+        deprecations = {},\r
+\r
+        lists = ['months', 'monthsShort', 'weekdays', 'weekdaysShort', 'weekdaysMin'];\r
+\r
+    // Pick the first defined of two or three arguments. dfl comes from\r
+    // default.\r
+    function dfl(a, b, c) {\r
+        switch (arguments.length) {\r
+            case 2: return a != null ? a : b;\r
+            case 3: return a != null ? a : b != null ? b : c;\r
+            default: throw new Error('Implement me');\r
+        }\r
+    }\r
+\r
+    function defaultParsingFlags() {\r
+        // We need to deep clone this object, and es5 standard is not very\r
+        // helpful.\r
+        return {\r
+            empty : false,\r
+            unusedTokens : [],\r
+            unusedInput : [],\r
+            overflow : -2,\r
+            charsLeftOver : 0,\r
+            nullInput : false,\r
+            invalidMonth : null,\r
+            invalidFormat : false,\r
+            userInvalidated : false,\r
+            iso: false\r
+        };\r
+    }\r
+\r
+    function printMsg(msg) {\r
+        if (moment.suppressDeprecationWarnings === false &&\r
+                typeof console !== 'undefined' && console.warn) {\r
+            console.warn("Deprecation warning: " + msg);\r
+        }\r
+    }\r
+\r
+    function deprecate(msg, fn) {\r
+        var firstTime = true;\r
+        return extend(function () {\r
+            if (firstTime) {\r
+                printMsg(msg);\r
+                firstTime = false;\r
+            }\r
+            return fn.apply(this, arguments);\r
+        }, fn);\r
+    }\r
+\r
+    function deprecateSimple(name, msg) {\r
+        if (!deprecations[name]) {\r
+            printMsg(msg);\r
+            deprecations[name] = true;\r
+        }\r
+    }\r
+\r
+    function padToken(func, count) {\r
+        return function (a) {\r
+            return leftZeroFill(func.call(this, a), count);\r
+        };\r
+    }\r
+    function ordinalizeToken(func, period) {\r
+        return function (a) {\r
+            return this.localeData().ordinal(func.call(this, a), period);\r
+        };\r
+    }\r
+\r
+    while (ordinalizeTokens.length) {\r
+        i = ordinalizeTokens.pop();\r
+        formatTokenFunctions[i + 'o'] = ordinalizeToken(formatTokenFunctions[i], i);\r
+    }\r
+    while (paddedTokens.length) {\r
+        i = paddedTokens.pop();\r
+        formatTokenFunctions[i + i] = padToken(formatTokenFunctions[i], 2);\r
+    }\r
+    formatTokenFunctions.DDDD = padToken(formatTokenFunctions.DDD, 3);\r
+\r
+\r
+    /************************************\r
+        Constructors\r
+    ************************************/\r
+\r
+    function Locale() {\r
+    }\r
+\r
+    // Moment prototype object\r
+    function Moment(config, skipOverflow) {\r
+        if (skipOverflow !== false) {\r
+            checkOverflow(config);\r
+        }\r
+        copyConfig(this, config);\r
+        this._d = new Date(+config._d);\r
+    }\r
+\r
+    // Duration Constructor\r
+    function Duration(duration) {\r
+        var normalizedInput = normalizeObjectUnits(duration),\r
+            years = normalizedInput.year || 0,\r
+            quarters = normalizedInput.quarter || 0,\r
+            months = normalizedInput.month || 0,\r
+            weeks = normalizedInput.week || 0,\r
+            days = normalizedInput.day || 0,\r
+            hours = normalizedInput.hour || 0,\r
+            minutes = normalizedInput.minute || 0,\r
+            seconds = normalizedInput.second || 0,\r
+            milliseconds = normalizedInput.millisecond || 0;\r
+\r
+        // representation for dateAddRemove\r
+        this._milliseconds = +milliseconds +\r
+            seconds * 1e3 + // 1000\r
+            minutes * 6e4 + // 1000 * 60\r
+            hours * 36e5; // 1000 * 60 * 60\r
+        // Because of dateAddRemove treats 24 hours as different from a\r
+        // day when working around DST, we need to store them separately\r
+        this._days = +days +\r
+            weeks * 7;\r
+        // It is impossible translate months into days without knowing\r
+        // which months you are are talking about, so we have to store\r
+        // it separately.\r
+        this._months = +months +\r
+            quarters * 3 +\r
+            years * 12;\r
+\r
+        this._data = {};\r
+\r
+        this._locale = moment.localeData();\r
+\r
+        this._bubble();\r
+    }\r
+\r
+    /************************************\r
+        Helpers\r
+    ************************************/\r
+\r
+\r
+    function extend(a, b) {\r
+        for (var i in b) {\r
+            if (b.hasOwnProperty(i)) {\r
+                a[i] = b[i];\r
+            }\r
+        }\r
+\r
+        if (b.hasOwnProperty('toString')) {\r
+            a.toString = b.toString;\r
+        }\r
+\r
+        if (b.hasOwnProperty('valueOf')) {\r
+            a.valueOf = b.valueOf;\r
+        }\r
+\r
+        return a;\r
+    }\r
+\r
+    function copyConfig(to, from) {\r
+        var i, prop, val;\r
+\r
+        if (typeof from._isAMomentObject !== 'undefined') {\r
+            to._isAMomentObject = from._isAMomentObject;\r
+        }\r
+        if (typeof from._i !== 'undefined') {\r
+            to._i = from._i;\r
+        }\r
+        if (typeof from._f !== 'undefined') {\r
+            to._f = from._f;\r
+        }\r
+        if (typeof from._l !== 'undefined') {\r
+            to._l = from._l;\r
+        }\r
+        if (typeof from._strict !== 'undefined') {\r
+            to._strict = from._strict;\r
+        }\r
+        if (typeof from._tzm !== 'undefined') {\r
+            to._tzm = from._tzm;\r
+        }\r
+        if (typeof from._isUTC !== 'undefined') {\r
+            to._isUTC = from._isUTC;\r
+        }\r
+        if (typeof from._offset !== 'undefined') {\r
+            to._offset = from._offset;\r
+        }\r
+        if (typeof from._pf !== 'undefined') {\r
+            to._pf = from._pf;\r
+        }\r
+        if (typeof from._locale !== 'undefined') {\r
+            to._locale = from._locale;\r
+        }\r
+\r
+        if (momentProperties.length > 0) {\r
+            for (i in momentProperties) {\r
+                prop = momentProperties[i];\r
+                val = from[prop];\r
+                if (typeof val !== 'undefined') {\r
+                    to[prop] = val;\r
+                }\r
+            }\r
+        }\r
+\r
+        return to;\r
+    }\r
+\r
+    function absRound(number) {\r
+        if (number < 0) {\r
+            return Math.ceil(number);\r
+        } else {\r
+            return Math.floor(number);\r
+        }\r
+    }\r
+\r
+    // left zero fill a number\r
+    // see http://jsperf.com/left-zero-filling for performance comparison\r
+    function leftZeroFill(number, targetLength, forceSign) {\r
+        var output = '' + Math.abs(number),\r
+            sign = number >= 0;\r
+\r
+        while (output.length < targetLength) {\r
+            output = '0' + output;\r
+        }\r
+        return (sign ? (forceSign ? '+' : '') : '-') + output;\r
+    }\r
+\r
+    function positiveMomentsDifference(base, other) {\r
+        var res = {milliseconds: 0, months: 0};\r
+\r
+        res.months = other.month() - base.month() +\r
+            (other.year() - base.year()) * 12;\r
+        if (base.clone().add(res.months, 'M').isAfter(other)) {\r
+            --res.months;\r
+        }\r
+\r
+        res.milliseconds = +other - +(base.clone().add(res.months, 'M'));\r
+\r
+        return res;\r
+    }\r
+\r
+    function momentsDifference(base, other) {\r
+        var res;\r
+        other = makeAs(other, base);\r
+        if (base.isBefore(other)) {\r
+            res = positiveMomentsDifference(base, other);\r
+        } else {\r
+            res = positiveMomentsDifference(other, base);\r
+            res.milliseconds = -res.milliseconds;\r
+            res.months = -res.months;\r
+        }\r
+\r
+        return res;\r
+    }\r
+\r
+    // TODO: remove 'name' arg after deprecation is removed\r
+    function createAdder(direction, name) {\r
+        return function (val, period) {\r
+            var dur, tmp;\r
+            //invert the arguments, but complain about it\r
+            if (period !== null && !isNaN(+period)) {\r
+                deprecateSimple(name, "moment()." + name  + "(period, number) is deprecated. Please use moment()." + name + "(number, period).");\r
+                tmp = val; val = period; period = tmp;\r
+            }\r
+\r
+            val = typeof val === 'string' ? +val : val;\r
+            dur = moment.duration(val, period);\r
+            addOrSubtractDurationFromMoment(this, dur, direction);\r
+            return this;\r
+        };\r
+    }\r
+\r
+    function addOrSubtractDurationFromMoment(mom, duration, isAdding, updateOffset) {\r
+        var milliseconds = duration._milliseconds,\r
+            days = duration._days,\r
+            months = duration._months;\r
+        updateOffset = updateOffset == null ? true : updateOffset;\r
+\r
+        if (milliseconds) {\r
+            mom._d.setTime(+mom._d + milliseconds * isAdding);\r
+        }\r
+        if (days) {\r
+            rawSetter(mom, 'Date', rawGetter(mom, 'Date') + days * isAdding);\r
+        }\r
+        if (months) {\r
+            rawMonthSetter(mom, rawGetter(mom, 'Month') + months * isAdding);\r
+        }\r
+        if (updateOffset) {\r
+            moment.updateOffset(mom, days || months);\r
+        }\r
+    }\r
+\r
+    // check if is an array\r
+    function isArray(input) {\r
+        return Object.prototype.toString.call(input) === '[object Array]';\r
+    }\r
+\r
+    function isDate(input) {\r
+        return Object.prototype.toString.call(input) === '[object Date]' ||\r
+            input instanceof Date;\r
+    }\r
+\r
+    // compare two arrays, return the number of differences\r
+    function compareArrays(array1, array2, dontConvert) {\r
+        var len = Math.min(array1.length, array2.length),\r
+            lengthDiff = Math.abs(array1.length - array2.length),\r
+            diffs = 0,\r
+            i;\r
+        for (i = 0; i < len; i++) {\r
+            if ((dontConvert && array1[i] !== array2[i]) ||\r
+                (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\r
+                diffs++;\r
+            }\r
+        }\r
+        return diffs + lengthDiff;\r
+    }\r
+\r
+    function normalizeUnits(units) {\r
+        if (units) {\r
+            var lowered = units.toLowerCase().replace(/(.)s$/, '$1');\r
+            units = unitAliases[units] || camelFunctions[lowered] || lowered;\r
+        }\r
+        return units;\r
+    }\r
+\r
+    function normalizeObjectUnits(inputObject) {\r
+        var normalizedInput = {},\r
+            normalizedProp,\r
+            prop;\r
+\r
+        for (prop in inputObject) {\r
+            if (inputObject.hasOwnProperty(prop)) {\r
+                normalizedProp = normalizeUnits(prop);\r
+                if (normalizedProp) {\r
+                    normalizedInput[normalizedProp] = inputObject[prop];\r
+                }\r
+            }\r
+        }\r
+\r
+        return normalizedInput;\r
+    }\r
+\r
+    function makeList(field) {\r
+        var count, setter;\r
+\r
+        if (field.indexOf('week') === 0) {\r
+            count = 7;\r
+            setter = 'day';\r
+        }\r
+        else if (field.indexOf('month') === 0) {\r
+            count = 12;\r
+            setter = 'month';\r
+        }\r
+        else {\r
+            return;\r
+        }\r
+\r
+        moment[field] = function (format, index) {\r
+            var i, getter,\r
+                method = moment._locale[field],\r
+                results = [];\r
+\r
+            if (typeof format === 'number') {\r
+                index = format;\r
+                format = undefined;\r
+            }\r
+\r
+            getter = function (i) {\r
+                var m = moment().utc().set(setter, i);\r
+                return method.call(moment._locale, m, format || '');\r
+            };\r
+\r
+            if (index != null) {\r
+                return getter(index);\r
+            }\r
+            else {\r
+                for (i = 0; i < count; i++) {\r
+                    results.push(getter(i));\r
+                }\r
+                return results;\r
+            }\r
+        };\r
+    }\r
+\r
+    function toInt(argumentForCoercion) {\r
+        var coercedNumber = +argumentForCoercion,\r
+            value = 0;\r
+\r
+        if (coercedNumber !== 0 && isFinite(coercedNumber)) {\r
+            if (coercedNumber >= 0) {\r
+                value = Math.floor(coercedNumber);\r
+            } else {\r
+                value = Math.ceil(coercedNumber);\r
+            }\r
+        }\r
+\r
+        return value;\r
+    }\r
+\r
+    function daysInMonth(year, month) {\r
+        return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();\r
+    }\r
+\r
+    function weeksInYear(year, dow, doy) {\r
+        return weekOfYear(moment([year, 11, 31 + dow - doy]), dow, doy).week;\r
+    }\r
+\r
+    function daysInYear(year) {\r
+        return isLeapYear(year) ? 366 : 365;\r
+    }\r
+\r
+    function isLeapYear(year) {\r
+        return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\r
+    }\r
+\r
+    function checkOverflow(m) {\r
+        var overflow;\r
+        if (m._a && m._pf.overflow === -2) {\r
+            overflow =\r
+                m._a[MONTH] < 0 || m._a[MONTH] > 11 ? MONTH :\r
+                m._a[DATE] < 1 || m._a[DATE] > daysInMonth(m._a[YEAR], m._a[MONTH]) ? DATE :\r
+                m._a[HOUR] < 0 || m._a[HOUR] > 23 ? HOUR :\r
+                m._a[MINUTE] < 0 || m._a[MINUTE] > 59 ? MINUTE :\r
+                m._a[SECOND] < 0 || m._a[SECOND] > 59 ? SECOND :\r
+                m._a[MILLISECOND] < 0 || m._a[MILLISECOND] > 999 ? MILLISECOND :\r
+                -1;\r
+\r
+            if (m._pf._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\r
+                overflow = DATE;\r
+            }\r
+\r
+            m._pf.overflow = overflow;\r
+        }\r
+    }\r
+\r
+    function isValid(m) {\r
+        if (m._isValid == null) {\r
+            m._isValid = !isNaN(m._d.getTime()) &&\r
+                m._pf.overflow < 0 &&\r
+                !m._pf.empty &&\r
+                !m._pf.invalidMonth &&\r
+                !m._pf.nullInput &&\r
+                !m._pf.invalidFormat &&\r
+                !m._pf.userInvalidated;\r
+\r
+            if (m._strict) {\r
+                m._isValid = m._isValid &&\r
+                    m._pf.charsLeftOver === 0 &&\r
+                    m._pf.unusedTokens.length === 0;\r
+            }\r
+        }\r
+        return m._isValid;\r
+    }\r
+\r
+    function normalizeLocale(key) {\r
+        return key ? key.toLowerCase().replace('_', '-') : key;\r
+    }\r
+\r
+    // pick the locale from the array\r
+    // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\r
+    // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\r
+    function chooseLocale(names) {\r
+        var i = 0, j, next, locale, split;\r
+\r
+        while (i < names.length) {\r
+            split = normalizeLocale(names[i]).split('-');\r
+            j = split.length;\r
+            next = normalizeLocale(names[i + 1]);\r
+            next = next ? next.split('-') : null;\r
+            while (j > 0) {\r
+                locale = loadLocale(split.slice(0, j).join('-'));\r
+                if (locale) {\r
+                    return locale;\r
+                }\r
+                if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\r
+                    //the next array item is better than a shallower substring of this one\r
+                    break;\r
+                }\r
+                j--;\r
+            }\r
+            i++;\r
+        }\r
+        return null;\r
+    }\r
+\r
+    function loadLocale(name) {\r
+        var oldLocale = null;\r
+        if (!locales[name] && hasModule) {\r
+            try {\r
+                oldLocale = moment.locale();\r
+                require('./locale/' + name);\r
+                // because defineLocale currently also sets the global locale, we want to undo that for lazy loaded locales\r
+                moment.locale(oldLocale);\r
+            } catch (e) { }\r
+        }\r
+        return locales[name];\r
+    }\r
+\r
+    // Return a moment from input, that is local/utc/zone equivalent to model.\r
+    function makeAs(input, model) {\r
+        return model._isUTC ? moment(input).zone(model._offset || 0) :\r
+            moment(input).local();\r
+    }\r
+\r
+    /************************************\r
+        Locale\r
+    ************************************/\r
+\r
+\r
+    extend(Locale.prototype, {\r
+\r
+        set : function (config) {\r
+            var prop, i;\r
+            for (i in config) {\r
+                prop = config[i];\r
+                if (typeof prop === 'function') {\r
+                    this[i] = prop;\r
+                } else {\r
+                    this['_' + i] = prop;\r
+                }\r
+            }\r
+        },\r
+\r
+        _months : '1_2_3_4_May_June_July_August_September_October_November_December'.split('_'),\r
+        months : function (m) {\r
+            return this._months[m.month()];\r
+        },\r
+\r
+        _monthsShort : '1_2_3_4_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\r
+        monthsShort : function (m) {\r
+            return this._monthsShort[m.month()];\r
+        },\r
+\r
+        monthsParse : function (monthName) {\r
+            var i, mom, regex;\r
+\r
+            if (!this._monthsParse) {\r
+                this._monthsParse = [];\r
+            }\r
+\r
+            for (i = 0; i < 12; i++) {\r
+                // make the regex if we don't have it already\r
+                if (!this._monthsParse[i]) {\r
+                    mom = moment.utc([2000, i]);\r
+                    regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\r
+                    this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\r
+                }\r
+                // test the regex\r
+                if (this._monthsParse[i].test(monthName)) {\r
+                    return i;\r
+                }\r
+            }\r
+        },\r
+\r
+        _weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\r
+        weekdays : function (m) {\r
+            return this._weekdays[m.day()];\r
+        },\r
+\r
+        _weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\r
+        weekdaysShort : function (m) {\r
+            return this._weekdaysShort[m.day()];\r
+        },\r
+\r
+        _weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\r
+        weekdaysMin : function (m) {\r
+            return this._weekdaysMin[m.day()];\r
+        },\r
+\r
+        weekdaysParse : function (weekdayName) {\r
+            var i, mom, regex;\r
+\r
+            if (!this._weekdaysParse) {\r
+                this._weekdaysParse = [];\r
+            }\r
+\r
+            for (i = 0; i < 7; i++) {\r
+                // make the regex if we don't have it already\r
+                if (!this._weekdaysParse[i]) {\r
+                    mom = moment([2000, 1]).day(i);\r
+                    regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\r
+                    this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\r
+                }\r
+                // test the regex\r
+                if (this._weekdaysParse[i].test(weekdayName)) {\r
+                    return i;\r
+                }\r
+            }\r
+        },\r
+\r
+        _longDateFormat : {\r
+            LT : 'h:mm A',\r
+            L : 'MM/DD/YYYY',\r
+            LL : 'MMMM D, YYYY',\r
+            LLL : 'MMMM D, YYYY LT',\r
+            LLLL : 'dddd, MMMM D, YYYY LT'\r
+        },\r
+        longDateFormat : function (key) {\r
+            var output = this._longDateFormat[key];\r
+            if (!output && this._longDateFormat[key.toUpperCase()]) {\r
+                output = this._longDateFormat[key.toUpperCase()].replace(/MMMM|MM|DD|dddd/g, function (val) {\r
+                    return val.slice(1);\r
+                });\r
+                this._longDateFormat[key] = output;\r
+            }\r
+            return output;\r
+        },\r
+\r
+        isPM : function (input) {\r
+            // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\r
+            // Using charAt should be more compatible.\r
+            return ((input + '').toLowerCase().charAt(0) === 'p');\r
+        },\r
+\r
+        _meridiemParse : /[ap]\.?m?\.?/i,\r
+        meridiem : function (hours, minutes, isLower) {\r
+            if (hours > 11) {\r
+                return isLower ? 'pm' : 'PM';\r
+            } else {\r
+                return isLower ? 'am' : 'AM';\r
+            }\r
+        },\r
+\r
+        _calendar : {\r
+            sameDay : '[Today at] LT',\r
+            nextDay : '[Tomorrow at] LT',\r
+            nextWeek : 'dddd [at] LT',\r
+            lastDay : '[Yesterday at] LT',\r
+            lastWeek : '[Last] dddd [at] LT',\r
+            sameElse : 'L'\r
+        },\r
+        calendar : function (key, mom) {\r
+            var output = this._calendar[key];\r
+            return typeof output === 'function' ? output.apply(mom) : output;\r
+        },\r
+\r
+        _relativeTime : {\r
+            future : 'in %s',\r
+            past : '%s ago',\r
+            s : 'a few seconds',\r
+            m : 'a minute',\r
+            mm : '%d minutes',\r
+            h : 'an hour',\r
+            hh : '%d hours',\r
+            d : 'a day',\r
+            dd : '%d days',\r
+            M : 'a month',\r
+            MM : '%d months',\r
+            y : 'a year',\r
+            yy : '%d years'\r
+        },\r
+\r
+        relativeTime : function (number, withoutSuffix, string, isFuture) {\r
+            var output = this._relativeTime[string];\r
+            return (typeof output === 'function') ?\r
+                output(number, withoutSuffix, string, isFuture) :\r
+                output.replace(/%d/i, number);\r
+        },\r
+\r
+        pastFuture : function (diff, output) {\r
+            var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\r
+            return typeof format === 'function' ? format(output) : format.replace(/%s/i, output);\r
+        },\r
+\r
+        ordinal : function (number) {\r
+            return this._ordinal.replace('%d', number);\r
+        },\r
+        _ordinal : '%d',\r
+\r
+        preparse : function (string) {\r
+            return string;\r
+        },\r
+\r
+        postformat : function (string) {\r
+            return string;\r
+        },\r
+\r
+        week : function (mom) {\r
+            return weekOfYear(mom, this._week.dow, this._week.doy).week;\r
+        },\r
+\r
+        _week : {\r
+            dow : 0, // Sunday is the first day of the week.\r
+            doy : 6  // The week that contains Jan 1st is the first week of the year.\r
+        },\r
+\r
+        _invalidDate: 'Invalid date',\r
+        invalidDate: function () {\r
+            return this._invalidDate;\r
+        }\r
+    });\r
+\r
+    /************************************\r
+        Formatting\r
+    ************************************/\r
+\r
+\r
+    function removeFormattingTokens(input) {\r
+        if (input.match(/\[[\s\S]/)) {\r
+            return input.replace(/^\[|\]$/g, '');\r
+        }\r
+        return input.replace(/\\/g, '');\r
+    }\r
+\r
+    function makeFormatFunction(format) {\r
+        var array = format.match(formattingTokens), i, length;\r
+\r
+        for (i = 0, length = array.length; i < length; i++) {\r
+            if (formatTokenFunctions[array[i]]) {\r
+                array[i] = formatTokenFunctions[array[i]];\r
+            } else {\r
+                array[i] = removeFormattingTokens(array[i]);\r
+            }\r
+        }\r
+\r
+        return function (mom) {\r
+            var output = '';\r
+            for (i = 0; i < length; i++) {\r
+                output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];\r
+            }\r
+            return output;\r
+        };\r
+    }\r
+\r
+    // format date using native date object\r
+    function formatMoment(m, format) {\r
+        if (!m.isValid()) {\r
+            return m.localeData().invalidDate();\r
+        }\r
+\r
+        format = expandFormat(format, m.localeData());\r
+\r
+        if (!formatFunctions[format]) {\r
+            formatFunctions[format] = makeFormatFunction(format);\r
+        }\r
+\r
+        return formatFunctions[format](m);\r
+    }\r
+\r
+    function expandFormat(format, locale) {\r
+        var i = 5;\r
+\r
+        function replaceLongDateFormatTokens(input) {\r
+            return locale.longDateFormat(input) || input;\r
+        }\r
+\r
+        localFormattingTokens.lastIndex = 0;\r
+        while (i >= 0 && localFormattingTokens.test(format)) {\r
+            format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\r
+            localFormattingTokens.lastIndex = 0;\r
+            i -= 1;\r
+        }\r
+\r
+        return format;\r
+    }\r
+\r
+\r
+    /************************************\r
+        Parsing\r
+    ************************************/\r
+\r
+\r
+    // get the regex to find the next token\r
+    function getParseRegexForToken(token, config) {\r
+        var a, strict = config._strict;\r
+        switch (token) {\r
+        case 'Q':\r
+            return parseTokenOneDigit;\r
+        case 'DDDD':\r
+            return parseTokenThreeDigits;\r
+        case 'YYYY':\r
+        case 'GGGG':\r
+        case 'gggg':\r
+            return strict ? parseTokenFourDigits : parseTokenOneToFourDigits;\r
+        case 'Y':\r
+        case 'G':\r
+        case 'g':\r
+            return parseTokenSignedNumber;\r
+        case 'YYYYYY':\r
+        case 'YYYYY':\r
+        case 'GGGGG':\r
+        case 'ggggg':\r
+            return strict ? parseTokenSixDigits : parseTokenOneToSixDigits;\r
+        case 'S':\r
+            if (strict) {\r
+                return parseTokenOneDigit;\r
+            }\r
+            /* falls through */\r
+        case 'SS':\r
+            if (strict) {\r
+                return parseTokenTwoDigits;\r
+            }\r
+            /* falls through */\r
+        case 'SSS':\r
+            if (strict) {\r
+                return parseTokenThreeDigits;\r
+            }\r
+            /* falls through */\r
+        case 'DDD':\r
+            return parseTokenOneToThreeDigits;\r
+        case 'MMM':\r
+        case 'MMMM':\r
+        case 'dd':\r
+        case 'ddd':\r
+        case 'dddd':\r
+            return parseTokenWord;\r
+        case 'a':\r
+        case 'A':\r
+            return config._locale._meridiemParse;\r
+        case 'X':\r
+            return parseTokenTimestampMs;\r
+        case 'Z':\r
+        case 'ZZ':\r
+            return parseTokenTimezone;\r
+        case 'T':\r
+            return parseTokenT;\r
+        case 'SSSS':\r
+            return parseTokenDigits;\r
+        case 'MM':\r
+        case 'DD':\r
+        case 'YY':\r
+        case 'GG':\r
+        case 'gg':\r
+        case 'HH':\r
+        case 'hh':\r
+        case 'mm':\r
+        case 'ss':\r
+        case 'ww':\r
+        case 'WW':\r
+            return strict ? parseTokenTwoDigits : parseTokenOneOrTwoDigits;\r
+        case 'M':\r
+        case 'D':\r
+        case 'd':\r
+        case 'H':\r
+        case 'h':\r
+        case 'm':\r
+        case 's':\r
+        case 'w':\r
+        case 'W':\r
+        case 'e':\r
+        case 'E':\r
+            return parseTokenOneOrTwoDigits;\r
+        case 'Do':\r
+            return parseTokenOrdinal;\r
+        default :\r
+            a = new RegExp(regexpEscape(unescapeFormat(token.replace('\\', '')), 'i'));\r
+            return a;\r
+        }\r
+    }\r
+\r
+    function timezoneMinutesFromString(string) {\r
+        string = string || '';\r
+        var possibleTzMatches = (string.match(parseTokenTimezone) || []),\r
+            tzChunk = possibleTzMatches[possibleTzMatches.length - 1] || [],\r
+            parts = (tzChunk + '').match(parseTimezoneChunker) || ['-', 0, 0],\r
+            minutes = +(parts[1] * 60) + toInt(parts[2]);\r
+\r
+        return parts[0] === '+' ? -minutes : minutes;\r
+    }\r
+\r
+    // function to convert string input to date\r
+    function addTimeToArrayFromToken(token, input, config) {\r
+        var a, datePartArray = config._a;\r
+\r
+        switch (token) {\r
+        // QUARTER\r
+        case 'Q':\r
+            if (input != null) {\r
+                datePartArray[MONTH] = (toInt(input) - 1) * 3;\r
+            }\r
+            break;\r
+        // MONTH\r
+        case 'M' : // fall through to MM\r
+        case 'MM' :\r
+            if (input != null) {\r
+                datePartArray[MONTH] = toInt(input) - 1;\r
+            }\r
+            break;\r
+        case 'MMM' : // fall through to MMMM\r
+        case 'MMMM' :\r
+            a = config._locale.monthsParse(input);\r
+            // if we didn't find a month name, mark the date as invalid.\r
+            if (a != null) {\r
+                datePartArray[MONTH] = a;\r
+            } else {\r
+                config._pf.invalidMonth = input;\r
+            }\r
+            break;\r
+        // DAY OF MONTH\r
+        case 'D' : // fall through to DD\r
+        case 'DD' :\r
+            if (input != null) {\r
+                datePartArray[DATE] = toInt(input);\r
+            }\r
+            break;\r
+        case 'Do' :\r
+            if (input != null) {\r
+                datePartArray[DATE] = toInt(parseInt(input, 10));\r
+            }\r
+            break;\r
+        // DAY OF YEAR\r
+        case 'DDD' : // fall through to DDDD\r
+        case 'DDDD' :\r
+            if (input != null) {\r
+                config._dayOfYear = toInt(input);\r
+            }\r
+\r
+            break;\r
+        // YEAR\r
+        case 'YY' :\r
+            datePartArray[YEAR] = moment.parseTwoDigitYear(input);\r
+            break;\r
+        case 'YYYY' :\r
+        case 'YYYYY' :\r
+        case 'YYYYYY' :\r
+            datePartArray[YEAR] = toInt(input);\r
+            break;\r
+        // AM / PM\r
+        case 'a' : // fall through to A\r
+        case 'A' :\r
+            config._isPm = config._locale.isPM(input);\r
+            break;\r
+        // 24 HOUR\r
+        case 'H' : // fall through to hh\r
+        case 'HH' : // fall through to hh\r
+        case 'h' : // fall through to hh\r
+        case 'hh' :\r
+            datePartArray[HOUR] = toInt(input);\r
+            break;\r
+        // MINUTE\r
+        case 'm' : // fall through to mm\r
+        case 'mm' :\r
+            datePartArray[MINUTE] = toInt(input);\r
+            break;\r
+        // SECOND\r
+        case 's' : // fall through to ss\r
+        case 'ss' :\r
+            datePartArray[SECOND] = toInt(input);\r
+            break;\r
+        // MILLISECOND\r
+        case 'S' :\r
+        case 'SS' :\r
+        case 'SSS' :\r
+        case 'SSSS' :\r
+            datePartArray[MILLISECOND] = toInt(('0.' + input) * 1000);\r
+            break;\r
+        // UNIX TIMESTAMP WITH MS\r
+        case 'X':\r
+            config._d = new Date(parseFloat(input) * 1000);\r
+            break;\r
+        // TIMEZONE\r
+        case 'Z' : // fall through to ZZ\r
+        case 'ZZ' :\r
+            config._useUTC = true;\r
+            config._tzm = timezoneMinutesFromString(input);\r
+            break;\r
+        // WEEKDAY - human\r
+        case 'dd':\r
+        case 'ddd':\r
+        case 'dddd':\r
+            a = config._locale.weekdaysParse(input);\r
+            // if we didn't get a weekday name, mark the date as invalid\r
+            if (a != null) {\r
+                config._w = config._w || {};\r
+                config._w['d'] = a;\r
+            } else {\r
+                config._pf.invalidWeekday = input;\r
+            }\r
+            break;\r
+        // WEEK, WEEK DAY - numeric\r
+        case 'w':\r
+        case 'ww':\r
+        case 'W':\r
+        case 'WW':\r
+        case 'd':\r
+        case 'e':\r
+        case 'E':\r
+            token = token.substr(0, 1);\r
+            /* falls through */\r
+        case 'gggg':\r
+        case 'GGGG':\r
+        case 'GGGGG':\r
+            token = token.substr(0, 2);\r
+            if (input) {\r
+                config._w = config._w || {};\r
+                config._w[token] = toInt(input);\r
+            }\r
+            break;\r
+        case 'gg':\r
+        case 'GG':\r
+            config._w = config._w || {};\r
+            config._w[token] = moment.parseTwoDigitYear(input);\r
+        }\r
+    }\r
+\r
+    function dayOfYearFromWeekInfo(config) {\r
+        var w, weekYear, week, weekday, dow, doy, temp;\r
+\r
+        w = config._w;\r
+        if (w.GG != null || w.W != null || w.E != null) {\r
+            dow = 1;\r
+            doy = 4;\r
+\r
+            // TODO: We need to take the current isoWeekYear, but that depends on\r
+            // how we interpret now (local, utc, fixed offset). So create\r
+            // a now version of current config (take local/utc/offset flags, and\r
+            // create now).\r
+            weekYear = dfl(w.GG, config._a[YEAR], weekOfYear(moment(), 1, 4).year);\r
+            week = dfl(w.W, 1);\r
+            weekday = dfl(w.E, 1);\r
+        } else {\r
+            dow = config._locale._week.dow;\r
+            doy = config._locale._week.doy;\r
+\r
+            weekYear = dfl(w.gg, config._a[YEAR], weekOfYear(moment(), dow, doy).year);\r
+            week = dfl(w.w, 1);\r
+\r
+            if (w.d != null) {\r
+                // weekday -- low day numbers are considered next week\r
+                weekday = w.d;\r
+                if (weekday < dow) {\r
+                    ++week;\r
+                }\r
+            } else if (w.e != null) {\r
+                // local weekday -- counting starts from begining of week\r
+                weekday = w.e + dow;\r
+            } else {\r
+                // default to begining of week\r
+                weekday = dow;\r
+            }\r
+        }\r
+        temp = dayOfYearFromWeeks(weekYear, week, weekday, doy, dow);\r
+\r
+        config._a[YEAR] = temp.year;\r
+        config._dayOfYear = temp.dayOfYear;\r
+    }\r
+\r
+    // convert an array to a date.\r
+    // the array should mirror the parameters below\r
+    // note: all values past the year are optional and will default to the lowest possible value.\r
+    // [year, month, day , hour, minute, second, millisecond]\r
+    function dateFromConfig(config) {\r
+        var i, date, input = [], currentDate, yearToUse;\r
+\r
+        if (config._d) {\r
+            return;\r
+        }\r
+\r
+        currentDate = currentDateArray(config);\r
+\r
+        //compute day of the year from weeks and weekdays\r
+        if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\r
+            dayOfYearFromWeekInfo(config);\r
+        }\r
+\r
+        //if the day of the year is set, figure out what it is\r
+        if (config._dayOfYear) {\r
+            yearToUse = dfl(config._a[YEAR], currentDate[YEAR]);\r
+\r
+            if (config._dayOfYear > daysInYear(yearToUse)) {\r
+                config._pf._overflowDayOfYear = true;\r
+            }\r
+\r
+            date = makeUTCDate(yearToUse, 0, config._dayOfYear);\r
+            config._a[MONTH] = date.getUTCMonth();\r
+            config._a[DATE] = date.getUTCDate();\r
+        }\r
+\r
+        // Default to current date.\r
+        // * if no year, month, day of month are given, default to today\r
+        // * if day of month is given, default month and year\r
+        // * if month is given, default only year\r
+        // * if year is given, don't default anything\r
+        for (i = 0; i < 3 && config._a[i] == null; ++i) {\r
+            config._a[i] = input[i] = currentDate[i];\r
+        }\r
+\r
+        // Zero out whatever was not defaulted, including time\r
+        for (; i < 7; i++) {\r
+            config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\r
+        }\r
+\r
+        config._d = (config._useUTC ? makeUTCDate : makeDate).apply(null, input);\r
+        // Apply timezone offset from input. The actual zone can be changed\r
+        // with parseZone.\r
+        if (config._tzm != null) {\r
+            config._d.setUTCMinutes(config._d.getUTCMinutes() + config._tzm);\r
+        }\r
+    }\r
+\r
+    function dateFromObject(config) {\r
+        var normalizedInput;\r
+\r
+        if (config._d) {\r
+            return;\r
+        }\r
+\r
+        normalizedInput = normalizeObjectUnits(config._i);\r
+        config._a = [\r
+            normalizedInput.year,\r
+            normalizedInput.month,\r
+            normalizedInput.day,\r
+            normalizedInput.hour,\r
+            normalizedInput.minute,\r
+            normalizedInput.second,\r
+            normalizedInput.millisecond\r
+        ];\r
+\r
+        dateFromConfig(config);\r
+    }\r
+\r
+    function currentDateArray(config) {\r
+        var now = new Date();\r
+        if (config._useUTC) {\r
+            return [\r
+                now.getUTCFullYear(),\r
+                now.getUTCMonth(),\r
+                now.getUTCDate()\r
+            ];\r
+        } else {\r
+            return [now.getFullYear(), now.getMonth(), now.getDate()];\r
+        }\r
+    }\r
+\r
+    // date from string and format string\r
+    function makeDateFromStringAndFormat(config) {\r
+        if (config._f === moment.ISO_8601) {\r
+            parseISO(config);\r
+            return;\r
+        }\r
+\r
+        config._a = [];\r
+        config._pf.empty = true;\r
+\r
+        // This array is used to make a Date, either with `new Date` or `Date.UTC`\r
+        var string = '' + config._i,\r
+            i, parsedInput, tokens, token, skipped,\r
+            stringLength = string.length,\r
+            totalParsedInputLength = 0;\r
+\r
+        tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\r
+\r
+        for (i = 0; i < tokens.length; i++) {\r
+            token = tokens[i];\r
+            parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\r
+            if (parsedInput) {\r
+                skipped = string.substr(0, string.indexOf(parsedInput));\r
+                if (skipped.length > 0) {\r
+                    config._pf.unusedInput.push(skipped);\r
+                }\r
+                string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\r
+                totalParsedInputLength += parsedInput.length;\r
+            }\r
+            // don't parse if it's not a known token\r
+            if (formatTokenFunctions[token]) {\r
+                if (parsedInput) {\r
+                    config._pf.empty = false;\r
+                }\r
+                else {\r
+                    config._pf.unusedTokens.push(token);\r
+                }\r
+                addTimeToArrayFromToken(token, parsedInput, config);\r
+            }\r
+            else if (config._strict && !parsedInput) {\r
+                config._pf.unusedTokens.push(token);\r
+            }\r
+        }\r
+\r
+        // add remaining unparsed input length to the string\r
+        config._pf.charsLeftOver = stringLength - totalParsedInputLength;\r
+        if (string.length > 0) {\r
+            config._pf.unusedInput.push(string);\r
+        }\r
+\r
+        // handle am pm\r
+        if (config._isPm && config._a[HOUR] < 12) {\r
+            config._a[HOUR] += 12;\r
+        }\r
+        // if is 12 am, change hours to 0\r
+        if (config._isPm === false && config._a[HOUR] === 12) {\r
+            config._a[HOUR] = 0;\r
+        }\r
+\r
+        dateFromConfig(config);\r
+        checkOverflow(config);\r
+    }\r
+\r
+    function unescapeFormat(s) {\r
+        return s.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {\r
+            return p1 || p2 || p3 || p4;\r
+        });\r
+    }\r
+\r
+    // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\r
+    function regexpEscape(s) {\r
+        return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');\r
+    }\r
+\r
+    // date from string and array of format strings\r
+    function makeDateFromStringAndArray(config) {\r
+        var tempConfig,\r
+            bestMoment,\r
+\r
+            scoreToBeat,\r
+            i,\r
+            currentScore;\r
+\r
+        if (config._f.length === 0) {\r
+            config._pf.invalidFormat = true;\r
+            config._d = new Date(NaN);\r
+            return;\r
+        }\r
+\r
+        for (i = 0; i < config._f.length; i++) {\r
+            currentScore = 0;\r
+            tempConfig = copyConfig({}, config);\r
+            tempConfig._pf = defaultParsingFlags();\r
+            tempConfig._f = config._f[i];\r
+            makeDateFromStringAndFormat(tempConfig);\r
+\r
+            if (!isValid(tempConfig)) {\r
+                continue;\r
+            }\r
+\r
+            // if there is any input that was not parsed add a penalty for that format\r
+            currentScore += tempConfig._pf.charsLeftOver;\r
+\r
+            //or tokens\r
+            currentScore += tempConfig._pf.unusedTokens.length * 10;\r
+\r
+            tempConfig._pf.score = currentScore;\r
+\r
+            if (scoreToBeat == null || currentScore < scoreToBeat) {\r
+                scoreToBeat = currentScore;\r
+                bestMoment = tempConfig;\r
+            }\r
+        }\r
+\r
+        extend(config, bestMoment || tempConfig);\r
+    }\r
+\r
+    // date from iso format\r
+    function parseISO(config) {\r
+        var i, l,\r
+            string = config._i,\r
+            match = isoRegex.exec(string);\r
+\r
+        if (match) {\r
+            config._pf.iso = true;\r
+            for (i = 0, l = isoDates.length; i < l; i++) {\r
+                if (isoDates[i][1].exec(string)) {\r
+                    // match[5] should be "T" or undefined\r
+                    config._f = isoDates[i][0] + (match[6] || ' ');\r
+                    break;\r
+                }\r
+            }\r
+            for (i = 0, l = isoTimes.length; i < l; i++) {\r
+                if (isoTimes[i][1].exec(string)) {\r
+                    config._f += isoTimes[i][0];\r
+                    break;\r
+                }\r
+            }\r
+            if (string.match(parseTokenTimezone)) {\r
+                config._f += 'Z';\r
+            }\r
+            makeDateFromStringAndFormat(config);\r
+        } else {\r
+            config._isValid = false;\r
+        }\r
+    }\r
+\r
+    // date from iso format or fallback\r
+    function makeDateFromString(config) {\r
+        parseISO(config);\r
+        if (config._isValid === false) {\r
+            delete config._isValid;\r
+            moment.createFromInputFallback(config);\r
+        }\r
+    }\r
+\r
+    function makeDateFromInput(config) {\r
+        var input = config._i, matched;\r
+        if (input === undefined) {\r
+            config._d = new Date();\r
+        } else if (isDate(input)) {\r
+            config._d = new Date(+input);\r
+        } else if ((matched = aspNetJsonRegex.exec(input)) !== null) {\r
+            config._d = new Date(+matched[1]);\r
+        } else if (typeof input === 'string') {\r
+            makeDateFromString(config);\r
+        } else if (isArray(input)) {\r
+            config._a = input.slice(0);\r
+            dateFromConfig(config);\r
+        } else if (typeof(input) === 'object') {\r
+            dateFromObject(config);\r
+        } else if (typeof(input) === 'number') {\r
+            // from milliseconds\r
+            config._d = new Date(input);\r
+        } else {\r
+            moment.createFromInputFallback(config);\r
+        }\r
+    }\r
+\r
+    function makeDate(y, m, d, h, M, s, ms) {\r
+        //can't just apply() to create a date:\r
+        //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply\r
+        var date = new Date(y, m, d, h, M, s, ms);\r
+\r
+        //the date constructor doesn't accept years < 1970\r
+        if (y < 1970) {\r
+            date.setFullYear(y);\r
+        }\r
+        return date;\r
+    }\r
+\r
+    function makeUTCDate(y) {\r
+        var date = new Date(Date.UTC.apply(null, arguments));\r
+        if (y < 1970) {\r
+            date.setUTCFullYear(y);\r
+        }\r
+        return date;\r
+    }\r
+\r
+    function parseWeekday(input, locale) {\r
+        if (typeof input === 'string') {\r
+            if (!isNaN(input)) {\r
+                input = parseInt(input, 10);\r
+            }\r
+            else {\r
+                input = locale.weekdaysParse(input);\r
+                if (typeof input !== 'number') {\r
+                    return null;\r
+                }\r
+            }\r
+        }\r
+        return input;\r
+    }\r
+\r
+    /************************************\r
+        Relative Time\r
+    ************************************/\r
+\r
+\r
+    // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\r
+    function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\r
+        return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\r
+    }\r
+\r
+    function relativeTime(posNegDuration, withoutSuffix, locale) {\r
+        var duration = moment.duration(posNegDuration).abs(),\r
+            seconds = round(duration.as('s')),\r
+            minutes = round(duration.as('m')),\r
+            hours = round(duration.as('h')),\r
+            days = round(duration.as('d')),\r
+            months = round(duration.as('M')),\r
+            years = round(duration.as('y')),\r
+\r
+            args = seconds < relativeTimeThresholds.s && ['s', seconds] ||\r
+                minutes === 1 && ['m'] ||\r
+                minutes < relativeTimeThresholds.m && ['mm', minutes] ||\r
+                hours === 1 && ['h'] ||\r
+                hours < relativeTimeThresholds.h && ['hh', hours] ||\r
+                days === 1 && ['d'] ||\r
+                days < relativeTimeThresholds.d && ['dd', days] ||\r
+                months === 1 && ['M'] ||\r
+                months < relativeTimeThresholds.M && ['MM', months] ||\r
+                years === 1 && ['y'] || ['yy', years];\r
+\r
+        args[2] = withoutSuffix;\r
+        args[3] = +posNegDuration > 0;\r
+        args[4] = locale;\r
+        return substituteTimeAgo.apply({}, args);\r
+    }\r
+\r
+\r
+    /************************************\r
+        Week of Year\r
+    ************************************/\r
+\r
+\r
+    // firstDayOfWeek       0 = sun, 6 = sat\r
+    //                      the day of the week that starts the week\r
+    //                      (usually sunday or monday)\r
+    // firstDayOfWeekOfYear 0 = sun, 6 = sat\r
+    //                      the first week is the week that contains the first\r
+    //                      of this day of the week\r
+    //                      (eg. ISO weeks use thursday (4))\r
+    function weekOfYear(mom, firstDayOfWeek, firstDayOfWeekOfYear) {\r
+        var end = firstDayOfWeekOfYear - firstDayOfWeek,\r
+            daysToDayOfWeek = firstDayOfWeekOfYear - mom.day(),\r
+            adjustedMoment;\r
+\r
+\r
+        if (daysToDayOfWeek > end) {\r
+            daysToDayOfWeek -= 7;\r
+        }\r
+\r
+        if (daysToDayOfWeek < end - 7) {\r
+            daysToDayOfWeek += 7;\r
+        }\r
+\r
+        adjustedMoment = moment(mom).add(daysToDayOfWeek, 'd');\r
+        return {\r
+            week: Math.ceil(adjustedMoment.dayOfYear() / 7),\r
+            year: adjustedMoment.year()\r
+        };\r
+    }\r
+\r
+    //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\r
+    function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) {\r
+        var d = makeUTCDate(year, 0, 1).getUTCDay(), daysToAdd, dayOfYear;\r
+\r
+        d = d === 0 ? 7 : d;\r
+        weekday = weekday != null ? weekday : firstDayOfWeek;\r
+        daysToAdd = firstDayOfWeek - d + (d > firstDayOfWeekOfYear ? 7 : 0) - (d < firstDayOfWeek ? 7 : 0);\r
+        dayOfYear = 7 * (week - 1) + (weekday - firstDayOfWeek) + daysToAdd + 1;\r
+\r
+        return {\r
+            year: dayOfYear > 0 ? year : year - 1,\r
+            dayOfYear: dayOfYear > 0 ?  dayOfYear : daysInYear(year - 1) + dayOfYear\r
+        };\r
+    }\r
+\r
+    /************************************\r
+        Top Level Functions\r
+    ************************************/\r
+\r
+    function makeMoment(config) {\r
+        var input = config._i,\r
+            format = config._f;\r
+\r
+        config._locale = config._locale || moment.localeData(config._l);\r
+\r
+        if (input === null || (format === undefined && input === '')) {\r
+            return moment.invalid({nullInput: true});\r
+        }\r
+\r
+        if (typeof input === 'string') {\r
+            config._i = input = config._locale.preparse(input);\r
+        }\r
+\r
+        if (moment.isMoment(input)) {\r
+            return new Moment(input, true);\r
+        } else if (format) {\r
+            if (isArray(format)) {\r
+                makeDateFromStringAndArray(config);\r
+            } else {\r
+                makeDateFromStringAndFormat(config);\r
+            }\r
+        } else {\r
+            makeDateFromInput(config);\r
+        }\r
+\r
+        return new Moment(config);\r
+    }\r
+\r
+    moment = function (input, format, locale, strict) {\r
+        var c;\r
+\r
+        if (typeof(locale) === "boolean") {\r
+            strict = locale;\r
+            locale = undefined;\r
+        }\r
+        // object construction must be done this way.\r
+        // https://github.com/moment/moment/issues/1423\r
+        c = {};\r
+        c._isAMomentObject = true;\r
+        c._i = input;\r
+        c._f = format;\r
+        c._l = locale;\r
+        c._strict = strict;\r
+        c._isUTC = false;\r
+        c._pf = defaultParsingFlags();\r
+\r
+        return makeMoment(c);\r
+    };\r
+\r
+    moment.suppressDeprecationWarnings = false;\r
+\r
+    moment.createFromInputFallback = deprecate(\r
+        'moment construction falls back to js Date. This is ' +\r
+        'discouraged and will be removed in upcoming major ' +\r
+        'release. Please refer to ' +\r
+        'https://github.com/moment/moment/issues/1407 for more info.',\r
+        function (config) {\r
+            config._d = new Date(config._i);\r
+        }\r
+    );\r
+\r
+    // Pick a moment m from moments so that m[fn](other) is true for all\r
+    // other. This relies on the function fn to be transitive.\r
+    //\r
+    // moments should either be an array of moment objects or an array, whose\r
+    // first element is an array of moment objects.\r
+    function pickBy(fn, moments) {\r
+        var res, i;\r
+        if (moments.length === 1 && isArray(moments[0])) {\r
+            moments = moments[0];\r
+        }\r
+        if (!moments.length) {\r
+            return moment();\r
+        }\r
+        res = moments[0];\r
+        for (i = 1; i < moments.length; ++i) {\r
+            if (moments[i][fn](res)) {\r
+                res = moments[i];\r
+            }\r
+        }\r
+        return res;\r
+    }\r
+\r
+    moment.min = function () {\r
+        var args = [].slice.call(arguments, 0);\r
+\r
+        return pickBy('isBefore', args);\r
+    };\r
+\r
+    moment.max = function () {\r
+        var args = [].slice.call(arguments, 0);\r
+\r
+        return pickBy('isAfter', args);\r
+    };\r
+\r
+    // creating with utc\r
+    moment.utc = function (input, format, locale, strict) {\r
+        var c;\r
+\r
+        if (typeof(locale) === "boolean") {\r
+            strict = locale;\r
+            locale = undefined;\r
+        }\r
+        // object construction must be done this way.\r
+        // https://github.com/moment/moment/issues/1423\r
+        c = {};\r
+        c._isAMomentObject = true;\r
+        c._useUTC = true;\r
+        c._isUTC = true;\r
+        c._l = locale;\r
+        c._i = input;\r
+        c._f = format;\r
+        c._strict = strict;\r
+        c._pf = defaultParsingFlags();\r
+\r
+        return makeMoment(c).utc();\r
+    };\r
+\r
+    // creating with unix timestamp (in seconds)\r
+    moment.unix = function (input) {\r
+        return moment(input * 1000);\r
+    };\r
+\r
+    // duration\r
+    moment.duration = function (input, key) {\r
+        var duration = input,\r
+            // matching against regexp is expensive, do it on demand\r
+            match = null,\r
+            sign,\r
+            ret,\r
+            parseIso,\r
+            diffRes;\r
+\r
+        if (moment.isDuration(input)) {\r
+            duration = {\r
+                ms: input._milliseconds,\r
+                d: input._days,\r
+                M: input._months\r
+            };\r
+        } else if (typeof input === 'number') {\r
+            duration = {};\r
+            if (key) {\r
+                duration[key] = input;\r
+            } else {\r
+                duration.milliseconds = input;\r
+            }\r
+        } else if (!!(match = aspNetTimeSpanJsonRegex.exec(input))) {\r
+            sign = (match[1] === '-') ? -1 : 1;\r
+            duration = {\r
+                y: 0,\r
+                d: toInt(match[DATE]) * sign,\r
+                h: toInt(match[HOUR]) * sign,\r
+                m: toInt(match[MINUTE]) * sign,\r
+                s: toInt(match[SECOND]) * sign,\r
+                ms: toInt(match[MILLISECOND]) * sign\r
+            };\r
+        } else if (!!(match = isoDurationRegex.exec(input))) {\r
+            sign = (match[1] === '-') ? -1 : 1;\r
+            parseIso = function (inp) {\r
+                // We'd normally use ~~inp for this, but unfortunately it also\r
+                // converts floats to ints.\r
+                // inp may be undefined, so careful calling replace on it.\r
+                var res = inp && parseFloat(inp.replace(',', '.'));\r
+                // apply sign while we're at it\r
+                return (isNaN(res) ? 0 : res) * sign;\r
+            };\r
+            duration = {\r
+                y: parseIso(match[2]),\r
+                M: parseIso(match[3]),\r
+                d: parseIso(match[4]),\r
+                h: parseIso(match[5]),\r
+                m: parseIso(match[6]),\r
+                s: parseIso(match[7]),\r
+                w: parseIso(match[8])\r
+            };\r
+        } else if (typeof duration === 'object' &&\r
+                ('from' in duration || 'to' in duration)) {\r
+            diffRes = momentsDifference(moment(duration.from), moment(duration.to));\r
+\r
+            duration = {};\r
+            duration.ms = diffRes.milliseconds;\r
+            duration.M = diffRes.months;\r
+        }\r
+\r
+        ret = new Duration(duration);\r
+\r
+        if (moment.isDuration(input) && input.hasOwnProperty('_locale')) {\r
+            ret._locale = input._locale;\r
+        }\r
+\r
+        return ret;\r
+    };\r
+\r
+    // version number\r
+    moment.version = VERSION;\r
+\r
+    // default format\r
+    moment.defaultFormat = isoFormat;\r
+\r
+    // constant that refers to the ISO standard\r
+    moment.ISO_8601 = function () {};\r
+\r
+    // Plugins that add properties should also add the key here (null value),\r
+    // so we can properly clone ourselves.\r
+    moment.momentProperties = momentProperties;\r
+\r
+    // This function will be called whenever a moment is mutated.\r
+    // It is intended to keep the offset in sync with the timezone.\r
+    moment.updateOffset = function () {};\r
+\r
+    // This function allows you to set a threshold for relative time strings\r
+    moment.relativeTimeThreshold = function (threshold, limit) {\r
+        if (relativeTimeThresholds[threshold] === undefined) {\r
+            return false;\r
+        }\r
+        if (limit === undefined) {\r
+            return relativeTimeThresholds[threshold];\r
+        }\r
+        relativeTimeThresholds[threshold] = limit;\r
+        return true;\r
+    };\r
+\r
+    moment.lang = deprecate(\r
+        "moment.lang is deprecated. Use moment.locale instead.",\r
+        function (key, value) {\r
+            return moment.locale(key, value);\r
+        }\r
+    );\r
+\r
+    // This function will load locale and then set the global locale.  If\r
+    // no arguments are passed in, it will simply return the current global\r
+    // locale key.\r
+    moment.locale = function (key, values) {\r
+        var data;\r
+        if (key) {\r
+            if (typeof(values) !== "undefined") {\r
+                data = moment.defineLocale(key, values);\r
+            }\r
+            else {\r
+                data = moment.localeData(key);\r
+            }\r
+\r
+            if (data) {\r
+                moment.duration._locale = moment._locale = data;\r
+            }\r
+        }\r
+\r
+        return moment._locale._abbr;\r
+    };\r
+\r
+    moment.defineLocale = function (name, values) {\r
+        if (values !== null) {\r
+            values.abbr = name;\r
+            if (!locales[name]) {\r
+                locales[name] = new Locale();\r
+            }\r
+            locales[name].set(values);\r
+\r
+            // backwards compat for now: also set the locale\r
+            moment.locale(name);\r
+\r
+            return locales[name];\r
+        } else {\r
+            // useful for testing\r
+            delete locales[name];\r
+            return null;\r
+        }\r
+    };\r
+\r
+    moment.langData = deprecate(\r
+        "moment.langData is deprecated. Use moment.localeData instead.",\r
+        function (key) {\r
+            return moment.localeData(key);\r
+        }\r
+    );\r
+\r
+    // returns locale data\r
+    moment.localeData = function (key) {\r
+        var locale;\r
+\r
+        if (key && key._locale && key._locale._abbr) {\r
+            key = key._locale._abbr;\r
+        }\r
+\r
+        if (!key) {\r
+            return moment._locale;\r
+        }\r
+\r
+        if (!isArray(key)) {\r
+            //short-circuit everything else\r
+            locale = loadLocale(key);\r
+            if (locale) {\r
+                return locale;\r
+            }\r
+            key = [key];\r
+        }\r
+\r
+        return chooseLocale(key);\r
+    };\r
+\r
+    // compare moment object\r
+    moment.isMoment = function (obj) {\r
+        return obj instanceof Moment ||\r
+            (obj != null &&  obj.hasOwnProperty('_isAMomentObject'));\r
+    };\r
+\r
+    // for typechecking Duration objects\r
+    moment.isDuration = function (obj) {\r
+        return obj instanceof Duration;\r
+    };\r
+\r
+    for (i = lists.length - 1; i >= 0; --i) {\r
+        makeList(lists[i]);\r
+    }\r
+\r
+    moment.normalizeUnits = function (units) {\r
+        return normalizeUnits(units);\r
+    };\r
+\r
+    moment.invalid = function (flags) {\r
+        var m = moment.utc(NaN);\r
+        if (flags != null) {\r
+            extend(m._pf, flags);\r
+        }\r
+        else {\r
+            m._pf.userInvalidated = true;\r
+        }\r
+\r
+        return m;\r
+    };\r
+\r
+    moment.parseZone = function () {\r
+        return moment.apply(null, arguments).parseZone();\r
+    };\r
+\r
+    moment.parseTwoDigitYear = function (input) {\r
+        return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\r
+    };\r
+\r
+    /************************************\r
+        Moment Prototype\r
+    ************************************/\r
+\r
+\r
+    extend(moment.fn = Moment.prototype, {\r
+\r
+        clone : function () {\r
+            return moment(this);\r
+        },\r
+\r
+        valueOf : function () {\r
+            return +this._d + ((this._offset || 0) * 60000);\r
+        },\r
+\r
+        unix : function () {\r
+            return Math.floor(+this / 1000);\r
+        },\r
+\r
+        toString : function () {\r
+            return this.clone().locale('en').format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");\r
+        },\r
+\r
+        toDate : function () {\r
+            return this._offset ? new Date(+this) : this._d;\r
+        },\r
+\r
+        toISOString : function () {\r
+            var m = moment(this).utc();\r
+            if (0 < m.year() && m.year() <= 9999) {\r
+                return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\r
+            } else {\r
+                return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\r
+            }\r
+        },\r
+\r
+        toArray : function () {\r
+            var m = this;\r
+            return [\r
+                m.year(),\r
+                m.month(),\r
+                m.date(),\r
+                m.hours(),\r
+                m.minutes(),\r
+                m.seconds(),\r
+                m.milliseconds()\r
+            ];\r
+        },\r
+\r
+        isValid : function () {\r
+            return isValid(this);\r
+        },\r
+\r
+        isDSTShifted : function () {\r
+            if (this._a) {\r
+                return this.isValid() && compareArrays(this._a, (this._isUTC ? moment.utc(this._a) : moment(this._a)).toArray()) > 0;\r
+            }\r
+\r
+            return false;\r
+        },\r
+\r
+        parsingFlags : function () {\r
+            return extend({}, this._pf);\r
+        },\r
+\r
+        invalidAt: function () {\r
+            return this._pf.overflow;\r
+        },\r
+\r
+        utc : function (keepLocalTime) {\r
+            return this.zone(0, keepLocalTime);\r
+        },\r
+\r
+        local : function (keepLocalTime) {\r
+            if (this._isUTC) {\r
+                this.zone(0, keepLocalTime);\r
+                this._isUTC = false;\r
+\r
+                if (keepLocalTime) {\r
+                    this.add(this._d.getTimezoneOffset(), 'm');\r
+                }\r
+            }\r
+            return this;\r
+        },\r
+\r
+        format : function (inputString) {\r
+            var output = formatMoment(this, inputString || moment.defaultFormat);\r
+            return this.localeData().postformat(output);\r
+        },\r
+\r
+        add : createAdder(1, 'add'),\r
+\r
+        subtract : createAdder(-1, 'subtract'),\r
+\r
+        diff : function (input, units, asFloat) {\r
+            var that = makeAs(input, this),\r
+                zoneDiff = (this.zone() - that.zone()) * 6e4,\r
+                diff, output;\r
+\r
+            units = normalizeUnits(units);\r
+\r
+            if (units === 'year' || units === 'month') {\r
+                // average number of days in the months in the given dates\r
+                diff = (this.daysInMonth() + that.daysInMonth()) * 432e5; // 24 * 60 * 60 * 1000 / 2\r
+                // difference in months\r
+                output = ((this.year() - that.year()) * 12) + (this.month() - that.month());\r
+                // adjust by taking difference in days, average number of days\r
+                // and dst in the given months.\r
+                output += ((this - moment(this).startOf('month')) -\r
+                        (that - moment(that).startOf('month'))) / diff;\r
+                // same as above but with zones, to negate all dst\r
+                output -= ((this.zone() - moment(this).startOf('month').zone()) -\r
+                        (that.zone() - moment(that).startOf('month').zone())) * 6e4 / diff;\r
+                if (units === 'year') {\r
+                    output = output / 12;\r
+                }\r
+            } else {\r
+                diff = (this - that);\r
+                output = units === 'second' ? diff / 1e3 : // 1000\r
+                    units === 'minute' ? diff / 6e4 : // 1000 * 60\r
+                    units === 'hour' ? diff / 36e5 : // 1000 * 60 * 60\r
+                    units === 'day' ? (diff - zoneDiff) / 864e5 : // 1000 * 60 * 60 * 24, negate dst\r
+                    units === 'week' ? (diff - zoneDiff) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst\r
+                    diff;\r
+            }\r
+            return asFloat ? output : absRound(output);\r
+        },\r
+\r
+        from : function (time, withoutSuffix) {\r
+            return moment.duration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);\r
+        },\r
+\r
+        fromNow : function (withoutSuffix) {\r
+            return this.from(moment(), withoutSuffix);\r
+        },\r
+\r
+        calendar : function (time) {\r
+            // We want to compare the start of today, vs this.\r
+            // Getting start-of-today depends on whether we're zone'd or not.\r
+            var now = time || moment(),\r
+                sod = makeAs(now, this).startOf('day'),\r
+                diff = this.diff(sod, 'days', true),\r
+                format = diff < -6 ? 'sameElse' :\r
+                    diff < -1 ? 'lastWeek' :\r
+                    diff < 0 ? 'lastDay' :\r
+                    diff < 1 ? 'sameDay' :\r
+                    diff < 2 ? 'nextDay' :\r
+                    diff < 7 ? 'nextWeek' : 'sameElse';\r
+            return this.format(this.localeData().calendar(format, this));\r
+        },\r
+\r
+        isLeapYear : function () {\r
+            return isLeapYear(this.year());\r
+        },\r
+\r
+        isDST : function () {\r
+            return (this.zone() < this.clone().month(0).zone() ||\r
+                this.zone() < this.clone().month(5).zone());\r
+        },\r
+\r
+        day : function (input) {\r
+            var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\r
+            if (input != null) {\r
+                input = parseWeekday(input, this.localeData());\r
+                return this.add(input - day, 'd');\r
+            } else {\r
+                return day;\r
+            }\r
+        },\r
+\r
+        month : makeAccessor('Month', true),\r
+\r
+        startOf : function (units) {\r
+            units = normalizeUnits(units);\r
+            // the following switch intentionally omits break keywords\r
+            // to utilize falling through the cases.\r
+            switch (units) {\r
+            case 'year':\r
+                this.month(0);\r
+                /* falls through */\r
+            case 'quarter':\r
+            case 'month':\r
+                this.date(1);\r
+                /* falls through */\r
+            case 'week':\r
+            case 'isoWeek':\r
+            case 'day':\r
+                this.hours(0);\r
+                /* falls through */\r
+            case 'hour':\r
+                this.minutes(0);\r
+                /* falls through */\r
+            case 'minute':\r
+                this.seconds(0);\r
+                /* falls through */\r
+            case 'second':\r
+                this.milliseconds(0);\r
+                /* falls through */\r
+            }\r
+\r
+            // weeks are a special case\r
+            if (units === 'week') {\r
+                this.weekday(0);\r
+            } else if (units === 'isoWeek') {\r
+                this.isoWeekday(1);\r
+            }\r
+\r
+            // quarters are also special\r
+            if (units === 'quarter') {\r
+                this.month(Math.floor(this.month() / 3) * 3);\r
+            }\r
+\r
+            return this;\r
+        },\r
+\r
+        endOf: function (units) {\r
+            units = normalizeUnits(units);\r
+            return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');\r
+        },\r
+\r
+        isAfter: function (input, units) {\r
+            units = typeof units !== 'undefined' ? units : 'millisecond';\r
+            return +this.clone().startOf(units) > +moment(input).startOf(units);\r
+        },\r
+\r
+        isBefore: function (input, units) {\r
+            units = typeof units !== 'undefined' ? units : 'millisecond';\r
+            return +this.clone().startOf(units) < +moment(input).startOf(units);\r
+        },\r
+\r
+        isSame: function (input, units) {\r
+            units = units || 'ms';\r
+            return +this.clone().startOf(units) === +makeAs(input, this).startOf(units);\r
+        },\r
+\r
+        min: deprecate(\r
+                 'moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548',\r
+                 function (other) {\r
+                     other = moment.apply(null, arguments);\r
+                     return other < this ? this : other;\r
+                 }\r
+         ),\r
+\r
+        max: deprecate(\r
+                'moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548',\r
+                function (other) {\r
+                    other = moment.apply(null, arguments);\r
+                    return other > this ? this : other;\r
+                }\r
+        ),\r
+\r
+        // keepLocalTime = true means only change the timezone, without\r
+        // affecting the local hour. So 5:31:26 +0300 --[zone(2, true)]-->\r
+        // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist int zone\r
+        // +0200, so we adjust the time as needed, to be valid.\r
+        //\r
+        // Keeping the time actually adds/subtracts (one hour)\r
+        // from the actual represented time. That is why we call updateOffset\r
+        // a second time. In case it wants us to change the offset again\r
+        // _changeInProgress == true case, then we have to adjust, because\r
+        // there is no such time in the given timezone.\r
+        zone : function (input, keepLocalTime) {\r
+            var offset = this._offset || 0,\r
+                localAdjust;\r
+            if (input != null) {\r
+                if (typeof input === 'string') {\r
+                    input = timezoneMinutesFromString(input);\r
+                }\r
+                if (Math.abs(input) < 16) {\r
+                    input = input * 60;\r
+                }\r
+                if (!this._isUTC && keepLocalTime) {\r
+                    localAdjust = this._d.getTimezoneOffset();\r
+                }\r
+                this._offset = input;\r
+                this._isUTC = true;\r
+                if (localAdjust != null) {\r
+                    this.subtract(localAdjust, 'm');\r
+                }\r
+                if (offset !== input) {\r
+                    if (!keepLocalTime || this._changeInProgress) {\r
+                        addOrSubtractDurationFromMoment(this,\r
+                                moment.duration(offset - input, 'm'), 1, false);\r
+                    } else if (!this._changeInProgress) {\r
+                        this._changeInProgress = true;\r
+                        moment.updateOffset(this, true);\r
+                        this._changeInProgress = null;\r
+                    }\r
+                }\r
+            } else {\r
+                return this._isUTC ? offset : this._d.getTimezoneOffset();\r
+            }\r
+            return this;\r
+        },\r
+\r
+        zoneAbbr : function () {\r
+            return this._isUTC ? 'UTC' : '';\r
+        },\r
+\r
+        zoneName : function () {\r
+            return this._isUTC ? 'Coordinated Universal Time' : '';\r
+        },\r
+\r
+        parseZone : function () {\r
+            if (this._tzm) {\r
+                this.zone(this._tzm);\r
+            } else if (typeof this._i === 'string') {\r
+                this.zone(this._i);\r
+            }\r
+            return this;\r
+        },\r
+\r
+        hasAlignedHourOffset : function (input) {\r
+            if (!input) {\r
+                input = 0;\r
+            }\r
+            else {\r
+                input = moment(input).zone();\r
+            }\r
+\r
+            return (this.zone() - input) % 60 === 0;\r
+        },\r
+\r
+        daysInMonth : function () {\r
+            return daysInMonth(this.year(), this.month());\r
+        },\r
+\r
+        dayOfYear : function (input) {\r
+            var dayOfYear = round((moment(this).startOf('day') - moment(this).startOf('year')) / 864e5) + 1;\r
+            return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');\r
+        },\r
+\r
+        quarter : function (input) {\r
+            return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\r
+        },\r
+\r
+        weekYear : function (input) {\r
+            var year = weekOfYear(this, this.localeData()._week.dow, this.localeData()._week.doy).year;\r
+            return input == null ? year : this.add((input - year), 'y');\r
+        },\r
+\r
+        isoWeekYear : function (input) {\r
+            var year = weekOfYear(this, 1, 4).year;\r
+            return input == null ? year : this.add((input - year), 'y');\r
+        },\r
+\r
+        week : function (input) {\r
+            var week = this.localeData().week(this);\r
+            return input == null ? week : this.add((input - week) * 7, 'd');\r
+        },\r
+\r
+        isoWeek : function (input) {\r
+            var week = weekOfYear(this, 1, 4).week;\r
+            return input == null ? week : this.add((input - week) * 7, 'd');\r
+        },\r
+\r
+        weekday : function (input) {\r
+            var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\r
+            return input == null ? weekday : this.add(input - weekday, 'd');\r
+        },\r
+\r
+        isoWeekday : function (input) {\r
+            // behaves the same as moment#day except\r
+            // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\r
+            // as a setter, sunday should belong to the previous week.\r
+            return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7);\r
+        },\r
+\r
+        isoWeeksInYear : function () {\r
+            return weeksInYear(this.year(), 1, 4);\r
+        },\r
+\r
+        weeksInYear : function () {\r
+            var weekInfo = this.localeData()._week;\r
+            return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\r
+        },\r
+\r
+        get : function (units) {\r
+            units = normalizeUnits(units);\r
+            return this[units]();\r
+        },\r
+\r
+        set : function (units, value) {\r
+            units = normalizeUnits(units);\r
+            if (typeof this[units] === 'function') {\r
+                this[units](value);\r
+            }\r
+            return this;\r
+        },\r
+\r
+        // If passed a locale key, it will set the locale for this\r
+        // instance.  Otherwise, it will return the locale configuration\r
+        // variables for this instance.\r
+        locale : function (key) {\r
+            if (key === undefined) {\r
+                return this._locale._abbr;\r
+            } else {\r
+                this._locale = moment.localeData(key);\r
+                return this;\r
+            }\r
+        },\r
+\r
+        lang : deprecate(\r
+            "moment().lang() is deprecated. Use moment().localeData() instead.",\r
+            function (key) {\r
+                if (key === undefined) {\r
+                    return this.localeData();\r
+                } else {\r
+                    this._locale = moment.localeData(key);\r
+                    return this;\r
+                }\r
+            }\r
+        ),\r
+\r
+        localeData : function () {\r
+            return this._locale;\r
+        }\r
+    });\r
+\r
+    function rawMonthSetter(mom, value) {\r
+        var dayOfMonth;\r
+\r
+        // TODO: Move this out of here!\r
+        if (typeof value === 'string') {\r
+            value = mom.localeData().monthsParse(value);\r
+            // TODO: Another silent failure?\r
+            if (typeof value !== 'number') {\r
+                return mom;\r
+            }\r
+        }\r
+\r
+        dayOfMonth = Math.min(mom.date(),\r
+                daysInMonth(mom.year(), value));\r
+        mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\r
+        return mom;\r
+    }\r
+\r
+    function rawGetter(mom, unit) {\r
+        return mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]();\r
+    }\r
+\r
+    function rawSetter(mom, unit, value) {\r
+        if (unit === 'Month') {\r
+            return rawMonthSetter(mom, value);\r
+        } else {\r
+            return mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\r
+        }\r
+    }\r
+\r
+    function makeAccessor(unit, keepTime) {\r
+        return function (value) {\r
+            if (value != null) {\r
+                rawSetter(this, unit, value);\r
+                moment.updateOffset(this, keepTime);\r
+                return this;\r
+            } else {\r
+                return rawGetter(this, unit);\r
+            }\r
+        };\r
+    }\r
+\r
+    moment.fn.millisecond = moment.fn.milliseconds = makeAccessor('Milliseconds', false);\r
+    moment.fn.second = moment.fn.seconds = makeAccessor('Seconds', false);\r
+    moment.fn.minute = moment.fn.minutes = makeAccessor('Minutes', false);\r
+    // Setting the hour should keep the time, because the user explicitly\r
+    // specified which hour he wants. So trying to maintain the same hour (in\r
+    // a new timezone) makes sense. Adding/subtracting hours does not follow\r
+    // this rule.\r
+    moment.fn.hour = moment.fn.hours = makeAccessor('Hours', true);\r
+    // moment.fn.month is defined separately\r
+    moment.fn.date = makeAccessor('Date', true);\r
+    moment.fn.dates = deprecate('dates accessor is deprecated. Use date instead.', makeAccessor('Date', true));\r
+    moment.fn.year = makeAccessor('FullYear', true);\r
+    moment.fn.years = deprecate('years accessor is deprecated. Use year instead.', makeAccessor('FullYear', true));\r
+\r
+    // add plural methods\r
+    moment.fn.days = moment.fn.day;\r
+    moment.fn.months = moment.fn.month;\r
+    moment.fn.weeks = moment.fn.week;\r
+    moment.fn.isoWeeks = moment.fn.isoWeek;\r
+    moment.fn.quarters = moment.fn.quarter;\r
+\r
+    // add aliased format methods\r
+    moment.fn.toJSON = moment.fn.toISOString;\r
+\r
+    /************************************\r
+        Duration Prototype\r
+    ************************************/\r
+\r
+\r
+    function daysToYears (days) {\r
+        // 400 years have 146097 days (taking into account leap year rules)\r
+        return days * 400 / 146097;\r
+    }\r
+\r
+    function yearsToDays (years) {\r
+        // years * 365 + absRound(years / 4) -\r
+        //     absRound(years / 100) + absRound(years / 400);\r
+        return years * 146097 / 400;\r
+    }\r
+\r
+    extend(moment.duration.fn = Duration.prototype, {\r
+\r
+        _bubble : function () {\r
+            var milliseconds = this._milliseconds,\r
+                days = this._days,\r
+                months = this._months,\r
+                data = this._data,\r
+                seconds, minutes, hours, years = 0;\r
+\r
+            // The following code bubbles up values, see the tests for\r
+            // examples of what that means.\r
+            data.milliseconds = milliseconds % 1000;\r
+\r
+            seconds = absRound(milliseconds / 1000);\r
+            data.seconds = seconds % 60;\r
+\r
+            minutes = absRound(seconds / 60);\r
+            data.minutes = minutes % 60;\r
+\r
+            hours = absRound(minutes / 60);\r
+            data.hours = hours % 24;\r
+\r
+            days += absRound(hours / 24);\r
+\r
+            // Accurately convert days to years, assume start from year 0.\r
+            years = absRound(daysToYears(days));\r
+            days -= absRound(yearsToDays(years));\r
+\r
+            // 30 days to a month\r
+            // TODO (iskren): Use anchor date (like 1st Jan) to compute this.\r
+            months += absRound(days / 30);\r
+            days %= 30;\r
+\r
+            // 12 months -> 1 year\r
+            years += absRound(months / 12);\r
+            months %= 12;\r
+\r
+            data.days = days;\r
+            data.months = months;\r
+            data.years = years;\r
+        },\r
+\r
+        abs : function () {\r
+            this._milliseconds = Math.abs(this._milliseconds);\r
+            this._days = Math.abs(this._days);\r
+            this._months = Math.abs(this._months);\r
+\r
+            this._data.milliseconds = Math.abs(this._data.milliseconds);\r
+            this._data.seconds = Math.abs(this._data.seconds);\r
+            this._data.minutes = Math.abs(this._data.minutes);\r
+            this._data.hours = Math.abs(this._data.hours);\r
+            this._data.months = Math.abs(this._data.months);\r
+            this._data.years = Math.abs(this._data.years);\r
+\r
+            return this;\r
+        },\r
+\r
+        weeks : function () {\r
+            return absRound(this.days() / 7);\r
+        },\r
+\r
+        valueOf : function () {\r
+            return this._milliseconds +\r
+              this._days * 864e5 +\r
+              (this._months % 12) * 2592e6 +\r
+              toInt(this._months / 12) * 31536e6;\r
+        },\r
+\r
+        humanize : function (withSuffix) {\r
+            var output = relativeTime(this, !withSuffix, this.localeData());\r
+\r
+            if (withSuffix) {\r
+                output = this.localeData().pastFuture(+this, output);\r
+            }\r
+\r
+            return this.localeData().postformat(output);\r
+        },\r
+\r
+        add : function (input, val) {\r
+            // supports only 2.0-style add(1, 's') or add(moment)\r
+            var dur = moment.duration(input, val);\r
+\r
+            this._milliseconds += dur._milliseconds;\r
+            this._days += dur._days;\r
+            this._months += dur._months;\r
+\r
+            this._bubble();\r
+\r
+            return this;\r
+        },\r
+\r
+        subtract : function (input, val) {\r
+            var dur = moment.duration(input, val);\r
+\r
+            this._milliseconds -= dur._milliseconds;\r
+            this._days -= dur._days;\r
+            this._months -= dur._months;\r
+\r
+            this._bubble();\r
+\r
+            return this;\r
+        },\r
+\r
+        get : function (units) {\r
+            units = normalizeUnits(units);\r
+            return this[units.toLowerCase() + 's']();\r
+        },\r
+\r
+        as : function (units) {\r
+            var days, months;\r
+            units = normalizeUnits(units);\r
+\r
+            days = this._days + this._milliseconds / 864e5;\r
+            if (units === 'month' || units === 'year') {\r
+                months = this._months + daysToYears(days) * 12;\r
+                return units === 'month' ? months : months / 12;\r
+            } else {\r
+                days += yearsToDays(this._months / 12);\r
+                switch (units) {\r
+                    case 'week': return days / 7;\r
+                    case 'day': return days;\r
+                    case 'hour': return days * 24;\r
+                    case 'minute': return days * 24 * 60;\r
+                    case 'second': return days * 24 * 60 * 60;\r
+                    case 'millisecond': return days * 24 * 60 * 60 * 1000;\r
+                    default: throw new Error('Unknown unit ' + units);\r
+                }\r
+            }\r
+        },\r
+\r
+        lang : moment.fn.lang,\r
+        locale : moment.fn.locale,\r
+\r
+        toIsoString : deprecate(\r
+            "toIsoString() is deprecated. Please use toISOString() instead " +\r
+            "(notice the capitals)",\r
+            function () {\r
+                return this.toISOString();\r
+            }\r
+        ),\r
+\r
+        toISOString : function () {\r
+            // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\r
+            var years = Math.abs(this.years()),\r
+                months = Math.abs(this.months()),\r
+                days = Math.abs(this.days()),\r
+                hours = Math.abs(this.hours()),\r
+                minutes = Math.abs(this.minutes()),\r
+                seconds = Math.abs(this.seconds() + this.milliseconds() / 1000);\r
+\r
+            if (!this.asSeconds()) {\r
+                // this is the same as C#'s (Noda) and python (isodate)...\r
+                // but not other JS (goog.date)\r
+                return 'P0D';\r
+            }\r
+\r
+            return (this.asSeconds() < 0 ? '-' : '') +\r
+                'P' +\r
+                (years ? years + 'Y' : '') +\r
+                (months ? months + 'M' : '') +\r
+                (days ? days + 'D' : '') +\r
+                ((hours || minutes || seconds) ? 'T' : '') +\r
+                (hours ? hours + 'H' : '') +\r
+                (minutes ? minutes + 'M' : '') +\r
+                (seconds ? seconds + 'S' : '');\r
+        },\r
+\r
+        localeData : function () {\r
+            return this._locale;\r
+        }\r
+    });\r
+\r
+    function makeDurationGetter(name) {\r
+        moment.duration.fn[name] = function () {\r
+            return this._data[name];\r
+        };\r
+    }\r
+\r
+    for (i in unitMillisecondFactors) {\r
+        if (unitMillisecondFactors.hasOwnProperty(i)) {\r
+            makeDurationGetter(i.toLowerCase());\r
+        }\r
+    }\r
+\r
+    moment.duration.fn.asMilliseconds = function () {\r
+        return this.as('ms');\r
+    };\r
+    moment.duration.fn.asSeconds = function () {\r
+        return this.as('s');\r
+    };\r
+    moment.duration.fn.asMinutes = function () {\r
+        return this.as('m');\r
+    };\r
+    moment.duration.fn.asHours = function () {\r
+        return this.as('h');\r
+    };\r
+    moment.duration.fn.asDays = function () {\r
+        return this.as('d');\r
+    };\r
+    moment.duration.fn.asWeeks = function () {\r
+        return this.as('weeks');\r
+    };\r
+    moment.duration.fn.asMonths = function () {\r
+        return this.as('M');\r
+    };\r
+    moment.duration.fn.asYears = function () {\r
+        return this.as('y');\r
+    };\r
+\r
+    /************************************\r
+        Default Locale\r
+    ************************************/\r
+\r
+\r
+    // Set default locale, other locale will inherit from English.\r
+    moment.locale('en', {\r
+        ordinal : function (number) {\r
+            var b = number % 10,\r
+                output = (toInt(number % 100 / 10) === 1) ? 'th' :\r
+                (b === 1) ? 'st' :\r
+                (b === 2) ? 'nd' :\r
+                (b === 3) ? 'rd' : 'th';\r
+            return number + output;\r
+        }\r
+    });\r
+\r
+    /* EMBED_LOCALES */\r
+\r
+    /************************************\r
+        Exposing Moment\r
+    ************************************/\r
+\r
+    function makeGlobal(shouldDeprecate) {\r
+        /*global ender:false */\r
+        if (typeof ender !== 'undefined') {\r
+            return;\r
+        }\r
+        oldGlobalMoment = globalScope.moment;\r
+        if (shouldDeprecate) {\r
+            globalScope.moment = deprecate(\r
+                    'Accessing Moment through the global scope is ' +\r
+                    'deprecated, and will be removed in an upcoming ' +\r
+                    'release.',\r
+                    moment);\r
+        } else {\r
+            globalScope.moment = moment;\r
+        }\r
+    }\r
+\r
+    // CommonJS module is defined\r
+    if (hasModule) {\r
+        module.exports = moment;\r
+    } else if (typeof define === 'function' && define.amd) {\r
+        define('moment', function (require, exports, module) {\r
+            if (module.config && module.config() && module.config().noGlobal === true) {\r
+                // release the global variable\r
+                globalScope.moment = oldGlobalMoment;\r
+            }\r
+\r
+            return moment;\r
+        });\r
+        makeGlobal(true);\r
+    } else {\r
+        makeGlobal();\r
+    }\r
+}).call(this);
\ No newline at end of file