{"ast":null,"code":"//! moment.js\n//! version : 2.29.1\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n;\n\n(function (global, factory) {\n  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.moment = factory();\n})(this, function () {\n  'use strict';\n\n  var hookCallback;\n\n  function hooks() {\n    return hookCallback.apply(null, arguments);\n  } // This is done to register the method called with moment()\n  // without creating circular dependencies.\n\n\n  function setHookCallback(callback) {\n    hookCallback = callback;\n  }\n\n  function isArray(input) {\n    return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n  }\n\n  function isObject(input) {\n    // IE8 will treat undefined and null as object if it wasn't for\n    // input != null\n    return input != null && Object.prototype.toString.call(input) === '[object Object]';\n  }\n\n  function hasOwnProp(a, b) {\n    return Object.prototype.hasOwnProperty.call(a, b);\n  }\n\n  function isObjectEmpty(obj) {\n    if (Object.getOwnPropertyNames) {\n      return Object.getOwnPropertyNames(obj).length === 0;\n    } else {\n      var k;\n\n      for (k in obj) {\n        if (hasOwnProp(obj, k)) {\n          return false;\n        }\n      }\n\n      return true;\n    }\n  }\n\n  function isUndefined(input) {\n    return input === void 0;\n  }\n\n  function isNumber(input) {\n    return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n  }\n\n  function isDate(input) {\n    return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n  }\n\n  function map(arr, fn) {\n    var res = [],\n        i;\n\n    for (i = 0; i < arr.length; ++i) {\n      res.push(fn(arr[i], i));\n    }\n\n    return res;\n  }\n\n  function extend(a, b) {\n    for (var i in b) {\n      if (hasOwnProp(b, i)) {\n        a[i] = b[i];\n      }\n    }\n\n    if (hasOwnProp(b, 'toString')) {\n      a.toString = b.toString;\n    }\n\n    if (hasOwnProp(b, 'valueOf')) {\n      a.valueOf = b.valueOf;\n    }\n\n    return a;\n  }\n\n  function createUTC(input, format, locale, strict) {\n    return createLocalOrUTC(input, format, locale, strict, true).utc();\n  }\n\n  function defaultParsingFlags() {\n    // We need to deep clone this object.\n    return {\n      empty: false,\n      unusedTokens: [],\n      unusedInput: [],\n      overflow: -2,\n      charsLeftOver: 0,\n      nullInput: false,\n      invalidEra: null,\n      invalidMonth: null,\n      invalidFormat: false,\n      userInvalidated: false,\n      iso: false,\n      parsedDateParts: [],\n      era: null,\n      meridiem: null,\n      rfc2822: false,\n      weekdayMismatch: false\n    };\n  }\n\n  function getParsingFlags(m) {\n    if (m._pf == null) {\n      m._pf = defaultParsingFlags();\n    }\n\n    return m._pf;\n  }\n\n  var some;\n\n  if (Array.prototype.some) {\n    some = Array.prototype.some;\n  } else {\n    some = function some(fun) {\n      var t = Object(this),\n          len = t.length >>> 0,\n          i;\n\n      for (i = 0; i < len; i++) {\n        if (i in t && fun.call(this, t[i], i, t)) {\n          return true;\n        }\n      }\n\n      return false;\n    };\n  }\n\n  function isValid(m) {\n    if (m._isValid == null) {\n      var flags = getParsingFlags(m),\n          parsedParts = some.call(flags.parsedDateParts, function (i) {\n        return i != null;\n      }),\n          isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidEra && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts);\n\n      if (m._strict) {\n        isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined;\n      }\n\n      if (Object.isFrozen == null || !Object.isFrozen(m)) {\n        m._isValid = isNowValid;\n      } else {\n        return isNowValid;\n      }\n    }\n\n    return m._isValid;\n  }\n\n  function createInvalid(flags) {\n    var m = createUTC(NaN);\n\n    if (flags != null) {\n      extend(getParsingFlags(m), flags);\n    } else {\n      getParsingFlags(m).userInvalidated = true;\n    }\n\n    return m;\n  } // Plugins that add properties should also add the key here (null value),\n  // so we can properly clone ourselves.\n\n\n  var momentProperties = hooks.momentProperties = [],\n      updateInProgress = false;\n\n  function copyConfig(to, from) {\n    var i, prop, val;\n\n    if (!isUndefined(from._isAMomentObject)) {\n      to._isAMomentObject = from._isAMomentObject;\n    }\n\n    if (!isUndefined(from._i)) {\n      to._i = from._i;\n    }\n\n    if (!isUndefined(from._f)) {\n      to._f = from._f;\n    }\n\n    if (!isUndefined(from._l)) {\n      to._l = from._l;\n    }\n\n    if (!isUndefined(from._strict)) {\n      to._strict = from._strict;\n    }\n\n    if (!isUndefined(from._tzm)) {\n      to._tzm = from._tzm;\n    }\n\n    if (!isUndefined(from._isUTC)) {\n      to._isUTC = from._isUTC;\n    }\n\n    if (!isUndefined(from._offset)) {\n      to._offset = from._offset;\n    }\n\n    if (!isUndefined(from._pf)) {\n      to._pf = getParsingFlags(from);\n    }\n\n    if (!isUndefined(from._locale)) {\n      to._locale = from._locale;\n    }\n\n    if (momentProperties.length > 0) {\n      for (i = 0; i < momentProperties.length; i++) {\n        prop = momentProperties[i];\n        val = from[prop];\n\n        if (!isUndefined(val)) {\n          to[prop] = val;\n        }\n      }\n    }\n\n    return to;\n  } // Moment prototype object\n\n\n  function Moment(config) {\n    copyConfig(this, config);\n    this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n\n    if (!this.isValid()) {\n      this._d = new Date(NaN);\n    } // Prevent infinite loop in case updateOffset creates new moment\n    // objects.\n\n\n    if (updateInProgress === false) {\n      updateInProgress = true;\n      hooks.updateOffset(this);\n      updateInProgress = false;\n    }\n  }\n\n  function isMoment(obj) {\n    return obj instanceof Moment || obj != null && obj._isAMomentObject != null;\n  }\n\n  function warn(msg) {\n    if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) {\n      console.warn('Deprecation warning: ' + msg);\n    }\n  }\n\n  function deprecate(msg, fn) {\n    var firstTime = true;\n    return extend(function () {\n      if (hooks.deprecationHandler != null) {\n        hooks.deprecationHandler(null, msg);\n      }\n\n      if (firstTime) {\n        var args = [],\n            arg,\n            i,\n            key;\n\n        for (i = 0; i < arguments.length; i++) {\n          arg = '';\n\n          if (typeof arguments[i] === 'object') {\n            arg += '\\n[' + i + '] ';\n\n            for (key in arguments[0]) {\n              if (hasOwnProp(arguments[0], key)) {\n                arg += key + ': ' + arguments[0][key] + ', ';\n              }\n            }\n\n            arg = arg.slice(0, -2); // Remove trailing comma and space\n          } else {\n            arg = arguments[i];\n          }\n\n          args.push(arg);\n        }\n\n        warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + new Error().stack);\n        firstTime = false;\n      }\n\n      return fn.apply(this, arguments);\n    }, fn);\n  }\n\n  var deprecations = {};\n\n  function deprecateSimple(name, msg) {\n    if (hooks.deprecationHandler != null) {\n      hooks.deprecationHandler(name, msg);\n    }\n\n    if (!deprecations[name]) {\n      warn(msg);\n      deprecations[name] = true;\n    }\n  }\n\n  hooks.suppressDeprecationWarnings = false;\n  hooks.deprecationHandler = null;\n\n  function isFunction(input) {\n    return typeof Function !== 'undefined' && input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n  }\n\n  function set(config) {\n    var prop, i;\n\n    for (i in config) {\n      if (hasOwnProp(config, i)) {\n        prop = config[i];\n\n        if (isFunction(prop)) {\n          this[i] = prop;\n        } else {\n          this['_' + i] = prop;\n        }\n      }\n    }\n\n    this._config = config; // Lenient ordinal parsing accepts just a number in addition to\n    // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n    // TODO: Remove \"ordinalParse\" fallback in next major release.\n\n    this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\\d{1,2}/.source);\n  }\n\n  function mergeConfigs(parentConfig, childConfig) {\n    var res = extend({}, parentConfig),\n        prop;\n\n    for (prop in childConfig) {\n      if (hasOwnProp(childConfig, prop)) {\n        if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n          res[prop] = {};\n          extend(res[prop], parentConfig[prop]);\n          extend(res[prop], childConfig[prop]);\n        } else if (childConfig[prop] != null) {\n          res[prop] = childConfig[prop];\n        } else {\n          delete res[prop];\n        }\n      }\n    }\n\n    for (prop in parentConfig) {\n      if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) {\n        // make sure changes to properties don't modify parent config\n        res[prop] = extend({}, res[prop]);\n      }\n    }\n\n    return res;\n  }\n\n  function Locale(config) {\n    if (config != null) {\n      this.set(config);\n    }\n  }\n\n  var keys;\n\n  if (Object.keys) {\n    keys = Object.keys;\n  } else {\n    keys = function keys(obj) {\n      var i,\n          res = [];\n\n      for (i in obj) {\n        if (hasOwnProp(obj, i)) {\n          res.push(i);\n        }\n      }\n\n      return res;\n    };\n  }\n\n  var defaultCalendar = {\n    sameDay: '[Today at] LT',\n    nextDay: '[Tomorrow at] LT',\n    nextWeek: 'dddd [at] LT',\n    lastDay: '[Yesterday at] LT',\n    lastWeek: '[Last] dddd [at] LT',\n    sameElse: 'L'\n  };\n\n  function calendar(key, mom, now) {\n    var output = this._calendar[key] || this._calendar['sameElse'];\n    return isFunction(output) ? output.call(mom, now) : output;\n  }\n\n  function zeroFill(number, targetLength, forceSign) {\n    var absNumber = '' + Math.abs(number),\n        zerosToFill = targetLength - absNumber.length,\n        sign = number >= 0;\n    return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n  }\n\n  var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n      localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n      formatFunctions = {},\n      formatTokenFunctions = {}; // token:    'M'\n  // padded:   ['MM', 2]\n  // ordinal:  'Mo'\n  // callback: function () { this.month() + 1 }\n\n  function addFormatToken(token, padded, ordinal, callback) {\n    var func = callback;\n\n    if (typeof callback === 'string') {\n      func = function func() {\n        return this[callback]();\n      };\n    }\n\n    if (token) {\n      formatTokenFunctions[token] = func;\n    }\n\n    if (padded) {\n      formatTokenFunctions[padded[0]] = function () {\n        return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n      };\n    }\n\n    if (ordinal) {\n      formatTokenFunctions[ordinal] = function () {\n        return this.localeData().ordinal(func.apply(this, arguments), token);\n      };\n    }\n  }\n\n  function removeFormattingTokens(input) {\n    if (input.match(/\\[[\\s\\S]/)) {\n      return input.replace(/^\\[|\\]$/g, '');\n    }\n\n    return input.replace(/\\\\/g, '');\n  }\n\n  function makeFormatFunction(format) {\n    var array = format.match(formattingTokens),\n        i,\n        length;\n\n    for (i = 0, length = array.length; i < length; i++) {\n      if (formatTokenFunctions[array[i]]) {\n        array[i] = formatTokenFunctions[array[i]];\n      } else {\n        array[i] = removeFormattingTokens(array[i]);\n      }\n    }\n\n    return function (mom) {\n      var output = '',\n          i;\n\n      for (i = 0; i < length; i++) {\n        output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\n      }\n\n      return output;\n    };\n  } // format date using native date object\n\n\n  function formatMoment(m, format) {\n    if (!m.isValid()) {\n      return m.localeData().invalidDate();\n    }\n\n    format = expandFormat(format, m.localeData());\n    formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n    return formatFunctions[format](m);\n  }\n\n  function expandFormat(format, locale) {\n    var i = 5;\n\n    function replaceLongDateFormatTokens(input) {\n      return locale.longDateFormat(input) || input;\n    }\n\n    localFormattingTokens.lastIndex = 0;\n\n    while (i >= 0 && localFormattingTokens.test(format)) {\n      format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n      localFormattingTokens.lastIndex = 0;\n      i -= 1;\n    }\n\n    return format;\n  }\n\n  var defaultLongDateFormat = {\n    LTS: 'h:mm:ss A',\n    LT: 'h:mm A',\n    L: 'MM/DD/YYYY',\n    LL: 'MMMM D, YYYY',\n    LLL: 'MMMM D, YYYY h:mm A',\n    LLLL: 'dddd, MMMM D, YYYY h:mm A'\n  };\n\n  function longDateFormat(key) {\n    var format = this._longDateFormat[key],\n        formatUpper = this._longDateFormat[key.toUpperCase()];\n\n    if (format || !formatUpper) {\n      return format;\n    }\n\n    this._longDateFormat[key] = formatUpper.match(formattingTokens).map(function (tok) {\n      if (tok === 'MMMM' || tok === 'MM' || tok === 'DD' || tok === 'dddd') {\n        return tok.slice(1);\n      }\n\n      return tok;\n    }).join('');\n    return this._longDateFormat[key];\n  }\n\n  var defaultInvalidDate = 'Invalid date';\n\n  function invalidDate() {\n    return this._invalidDate;\n  }\n\n  var defaultOrdinal = '%d',\n      defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n  function ordinal(number) {\n    return this._ordinal.replace('%d', number);\n  }\n\n  var defaultRelativeTime = {\n    future: 'in %s',\n    past: '%s ago',\n    s: 'a few seconds',\n    ss: '%d seconds',\n    m: 'a minute',\n    mm: '%d minutes',\n    h: 'an hour',\n    hh: '%d hours',\n    d: 'a day',\n    dd: '%d days',\n    w: 'a week',\n    ww: '%d weeks',\n    M: 'a month',\n    MM: '%d months',\n    y: 'a year',\n    yy: '%d years'\n  };\n\n  function relativeTime(number, withoutSuffix, string, isFuture) {\n    var output = this._relativeTime[string];\n    return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number);\n  }\n\n  function pastFuture(diff, output) {\n    var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n    return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n  }\n\n  var aliases = {};\n\n  function addUnitAlias(unit, shorthand) {\n    var lowerCase = unit.toLowerCase();\n    aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n  }\n\n  function normalizeUnits(units) {\n    return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n  }\n\n  function normalizeObjectUnits(inputObject) {\n    var normalizedInput = {},\n        normalizedProp,\n        prop;\n\n    for (prop in inputObject) {\n      if (hasOwnProp(inputObject, prop)) {\n        normalizedProp = normalizeUnits(prop);\n\n        if (normalizedProp) {\n          normalizedInput[normalizedProp] = inputObject[prop];\n        }\n      }\n    }\n\n    return normalizedInput;\n  }\n\n  var priorities = {};\n\n  function addUnitPriority(unit, priority) {\n    priorities[unit] = priority;\n  }\n\n  function getPrioritizedUnits(unitsObj) {\n    var units = [],\n        u;\n\n    for (u in unitsObj) {\n      if (hasOwnProp(unitsObj, u)) {\n        units.push({\n          unit: u,\n          priority: priorities[u]\n        });\n      }\n    }\n\n    units.sort(function (a, b) {\n      return a.priority - b.priority;\n    });\n    return units;\n  }\n\n  function isLeapYear(year) {\n    return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n  }\n\n  function absFloor(number) {\n    if (number < 0) {\n      // -0 -> 0\n      return Math.ceil(number) || 0;\n    } else {\n      return Math.floor(number);\n    }\n  }\n\n  function toInt(argumentForCoercion) {\n    var coercedNumber = +argumentForCoercion,\n        value = 0;\n\n    if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n      value = absFloor(coercedNumber);\n    }\n\n    return value;\n  }\n\n  function makeGetSet(unit, keepTime) {\n    return function (value) {\n      if (value != null) {\n        set$1(this, unit, value);\n        hooks.updateOffset(this, keepTime);\n        return this;\n      } else {\n        return get(this, unit);\n      }\n    };\n  }\n\n  function get(mom, unit) {\n    return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n  }\n\n  function set$1(mom, unit, value) {\n    if (mom.isValid() && !isNaN(value)) {\n      if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {\n        value = toInt(value);\n\n        mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));\n      } else {\n        mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n      }\n    }\n  } // MOMENTS\n\n\n  function stringGet(units) {\n    units = normalizeUnits(units);\n\n    if (isFunction(this[units])) {\n      return this[units]();\n    }\n\n    return this;\n  }\n\n  function stringSet(units, value) {\n    if (typeof units === 'object') {\n      units = normalizeObjectUnits(units);\n      var prioritized = getPrioritizedUnits(units),\n          i;\n\n      for (i = 0; i < prioritized.length; i++) {\n        this[prioritized[i].unit](units[prioritized[i].unit]);\n      }\n    } else {\n      units = normalizeUnits(units);\n\n      if (isFunction(this[units])) {\n        return this[units](value);\n      }\n    }\n\n    return this;\n  }\n\n  var match1 = /\\d/,\n      //       0 - 9\n  match2 = /\\d\\d/,\n      //      00 - 99\n  match3 = /\\d{3}/,\n      //     000 - 999\n  match4 = /\\d{4}/,\n      //    0000 - 9999\n  match6 = /[+-]?\\d{6}/,\n      // -999999 - 999999\n  match1to2 = /\\d\\d?/,\n      //       0 - 99\n  match3to4 = /\\d\\d\\d\\d?/,\n      //     999 - 9999\n  match5to6 = /\\d\\d\\d\\d\\d\\d?/,\n      //   99999 - 999999\n  match1to3 = /\\d{1,3}/,\n      //       0 - 999\n  match1to4 = /\\d{1,4}/,\n      //       0 - 9999\n  match1to6 = /[+-]?\\d{1,6}/,\n      // -999999 - 999999\n  matchUnsigned = /\\d+/,\n      //       0 - inf\n  matchSigned = /[+-]?\\d+/,\n      //    -inf - inf\n  matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi,\n      // +00:00 -00:00 +0000 -0000 or Z\n  matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi,\n      // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n  matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/,\n      // 123456789 123456789.123\n  // any word (or two) characters or numbers including two/three word month in arabic.\n  // includes scottish gaelic two word and hyphenated months\n  matchWord = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n      regexes;\n  regexes = {};\n\n  function addRegexToken(token, regex, strictRegex) {\n    regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n      return isStrict && strictRegex ? strictRegex : regex;\n    };\n  }\n\n  function getParseRegexForToken(token, config) {\n    if (!hasOwnProp(regexes, token)) {\n      return new RegExp(unescapeFormat(token));\n    }\n\n    return regexes[token](config._strict, config._locale);\n  } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n\n\n  function unescapeFormat(s) {\n    return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n      return p1 || p2 || p3 || p4;\n    }));\n  }\n\n  function regexEscape(s) {\n    return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n  }\n\n  var tokens = {};\n\n  function addParseToken(token, callback) {\n    var i,\n        func = callback;\n\n    if (typeof token === 'string') {\n      token = [token];\n    }\n\n    if (isNumber(callback)) {\n      func = function func(input, array) {\n        array[callback] = toInt(input);\n      };\n    }\n\n    for (i = 0; i < token.length; i++) {\n      tokens[token[i]] = func;\n    }\n  }\n\n  function addWeekParseToken(token, callback) {\n    addParseToken(token, function (input, array, config, token) {\n      config._w = config._w || {};\n      callback(input, config._w, config, token);\n    });\n  }\n\n  function addTimeToArrayFromToken(token, input, config) {\n    if (input != null && hasOwnProp(tokens, token)) {\n      tokens[token](input, config._a, config, token);\n    }\n  }\n\n  var YEAR = 0,\n      MONTH = 1,\n      DATE = 2,\n      HOUR = 3,\n      MINUTE = 4,\n      SECOND = 5,\n      MILLISECOND = 6,\n      WEEK = 7,\n      WEEKDAY = 8;\n\n  function mod(n, x) {\n    return (n % x + x) % x;\n  }\n\n  var indexOf;\n\n  if (Array.prototype.indexOf) {\n    indexOf = Array.prototype.indexOf;\n  } else {\n    indexOf = function indexOf(o) {\n      // I know\n      var i;\n\n      for (i = 0; i < this.length; ++i) {\n        if (this[i] === o) {\n          return i;\n        }\n      }\n\n      return -1;\n    };\n  }\n\n  function daysInMonth(year, month) {\n    if (isNaN(year) || isNaN(month)) {\n      return NaN;\n    }\n\n    var modMonth = mod(month, 12);\n    year += (month - modMonth) / 12;\n    return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2;\n  } // FORMATTING\n\n\n  addFormatToken('M', ['MM', 2], 'Mo', function () {\n    return this.month() + 1;\n  });\n  addFormatToken('MMM', 0, 0, function (format) {\n    return this.localeData().monthsShort(this, format);\n  });\n  addFormatToken('MMMM', 0, 0, function (format) {\n    return this.localeData().months(this, format);\n  }); // ALIASES\n\n  addUnitAlias('month', 'M'); // PRIORITY\n\n  addUnitPriority('month', 8); // PARSING\n\n  addRegexToken('M', match1to2);\n  addRegexToken('MM', match1to2, match2);\n  addRegexToken('MMM', function (isStrict, locale) {\n    return locale.monthsShortRegex(isStrict);\n  });\n  addRegexToken('MMMM', function (isStrict, locale) {\n    return locale.monthsRegex(isStrict);\n  });\n  addParseToken(['M', 'MM'], function (input, array) {\n    array[MONTH] = toInt(input) - 1;\n  });\n  addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n    var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid.\n\n\n    if (month != null) {\n      array[MONTH] = month;\n    } else {\n      getParsingFlags(config).invalidMonth = input;\n    }\n  }); // LOCALES\n\n  var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n      defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n      MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n      defaultMonthsShortRegex = matchWord,\n      defaultMonthsRegex = matchWord;\n\n  function localeMonths(m, format) {\n    if (!m) {\n      return isArray(this._months) ? this._months : this._months['standalone'];\n    }\n\n    return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n  }\n\n  function localeMonthsShort(m, format) {\n    if (!m) {\n      return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone'];\n    }\n\n    return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n  }\n\n  function handleStrictParse(monthName, format, strict) {\n    var i,\n        ii,\n        mom,\n        llc = monthName.toLocaleLowerCase();\n\n    if (!this._monthsParse) {\n      // this is not used\n      this._monthsParse = [];\n      this._longMonthsParse = [];\n      this._shortMonthsParse = [];\n\n      for (i = 0; i < 12; ++i) {\n        mom = createUTC([2000, i]);\n        this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n        this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n      }\n    }\n\n    if (strict) {\n      if (format === 'MMM') {\n        ii = indexOf.call(this._shortMonthsParse, llc);\n        return ii !== -1 ? ii : null;\n      } else {\n        ii = indexOf.call(this._longMonthsParse, llc);\n        return ii !== -1 ? ii : null;\n      }\n    } else {\n      if (format === 'MMM') {\n        ii = indexOf.call(this._shortMonthsParse, llc);\n\n        if (ii !== -1) {\n          return ii;\n        }\n\n        ii = indexOf.call(this._longMonthsParse, llc);\n        return ii !== -1 ? ii : null;\n      } else {\n        ii = indexOf.call(this._longMonthsParse, llc);\n\n        if (ii !== -1) {\n          return ii;\n        }\n\n        ii = indexOf.call(this._shortMonthsParse, llc);\n        return ii !== -1 ? ii : null;\n      }\n    }\n  }\n\n  function localeMonthsParse(monthName, format, strict) {\n    var i, mom, regex;\n\n    if (this._monthsParseExact) {\n      return handleStrictParse.call(this, monthName, format, strict);\n    }\n\n    if (!this._monthsParse) {\n      this._monthsParse = [];\n      this._longMonthsParse = [];\n      this._shortMonthsParse = [];\n    } // TODO: add sorting\n    // Sorting makes sure if one month (or abbr) is a prefix of another\n    // see sorting in computeMonthsParse\n\n\n    for (i = 0; i < 12; i++) {\n      // make the regex if we don't have it already\n      mom = createUTC([2000, i]);\n\n      if (strict && !this._longMonthsParse[i]) {\n        this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n        this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n      }\n\n      if (!strict && !this._monthsParse[i]) {\n        regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n        this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n      } // test the regex\n\n\n      if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n        return i;\n      } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n        return i;\n      } else if (!strict && this._monthsParse[i].test(monthName)) {\n        return i;\n      }\n    }\n  } // MOMENTS\n\n\n  function setMonth(mom, value) {\n    var dayOfMonth;\n\n    if (!mom.isValid()) {\n      // No op\n      return mom;\n    }\n\n    if (typeof value === 'string') {\n      if (/^\\d+$/.test(value)) {\n        value = toInt(value);\n      } else {\n        value = mom.localeData().monthsParse(value); // TODO: Another silent failure?\n\n        if (!isNumber(value)) {\n          return mom;\n        }\n      }\n    }\n\n    dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n\n    mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n\n    return mom;\n  }\n\n  function getSetMonth(value) {\n    if (value != null) {\n      setMonth(this, value);\n      hooks.updateOffset(this, true);\n      return this;\n    } else {\n      return get(this, 'Month');\n    }\n  }\n\n  function getDaysInMonth() {\n    return daysInMonth(this.year(), this.month());\n  }\n\n  function monthsShortRegex(isStrict) {\n    if (this._monthsParseExact) {\n      if (!hasOwnProp(this, '_monthsRegex')) {\n        computeMonthsParse.call(this);\n      }\n\n      if (isStrict) {\n        return this._monthsShortStrictRegex;\n      } else {\n        return this._monthsShortRegex;\n      }\n    } else {\n      if (!hasOwnProp(this, '_monthsShortRegex')) {\n        this._monthsShortRegex = defaultMonthsShortRegex;\n      }\n\n      return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex;\n    }\n  }\n\n  function monthsRegex(isStrict) {\n    if (this._monthsParseExact) {\n      if (!hasOwnProp(this, '_monthsRegex')) {\n        computeMonthsParse.call(this);\n      }\n\n      if (isStrict) {\n        return this._monthsStrictRegex;\n      } else {\n        return this._monthsRegex;\n      }\n    } else {\n      if (!hasOwnProp(this, '_monthsRegex')) {\n        this._monthsRegex = defaultMonthsRegex;\n      }\n\n      return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex;\n    }\n  }\n\n  function computeMonthsParse() {\n    function cmpLenRev(a, b) {\n      return b.length - a.length;\n    }\n\n    var shortPieces = [],\n        longPieces = [],\n        mixedPieces = [],\n        i,\n        mom;\n\n    for (i = 0; i < 12; i++) {\n      // make the regex if we don't have it already\n      mom = createUTC([2000, i]);\n      shortPieces.push(this.monthsShort(mom, ''));\n      longPieces.push(this.months(mom, ''));\n      mixedPieces.push(this.months(mom, ''));\n      mixedPieces.push(this.monthsShort(mom, ''));\n    } // Sorting makes sure if one month (or abbr) is a prefix of another it\n    // will match the longer piece.\n\n\n    shortPieces.sort(cmpLenRev);\n    longPieces.sort(cmpLenRev);\n    mixedPieces.sort(cmpLenRev);\n\n    for (i = 0; i < 12; i++) {\n      shortPieces[i] = regexEscape(shortPieces[i]);\n      longPieces[i] = regexEscape(longPieces[i]);\n    }\n\n    for (i = 0; i < 24; i++) {\n      mixedPieces[i] = regexEscape(mixedPieces[i]);\n    }\n\n    this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n    this._monthsShortRegex = this._monthsRegex;\n    this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n    this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n  } // FORMATTING\n\n\n  addFormatToken('Y', 0, 0, function () {\n    var y = this.year();\n    return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n  });\n  addFormatToken(0, ['YY', 2], 0, function () {\n    return this.year() % 100;\n  });\n  addFormatToken(0, ['YYYY', 4], 0, 'year');\n  addFormatToken(0, ['YYYYY', 5], 0, 'year');\n  addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES\n\n  addUnitAlias('year', 'y'); // PRIORITIES\n\n  addUnitPriority('year', 1); // PARSING\n\n  addRegexToken('Y', matchSigned);\n  addRegexToken('YY', match1to2, match2);\n  addRegexToken('YYYY', match1to4, match4);\n  addRegexToken('YYYYY', match1to6, match6);\n  addRegexToken('YYYYYY', match1to6, match6);\n  addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n  addParseToken('YYYY', function (input, array) {\n    array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n  });\n  addParseToken('YY', function (input, array) {\n    array[YEAR] = hooks.parseTwoDigitYear(input);\n  });\n  addParseToken('Y', function (input, array) {\n    array[YEAR] = parseInt(input, 10);\n  }); // HELPERS\n\n  function daysInYear(year) {\n    return isLeapYear(year) ? 366 : 365;\n  } // HOOKS\n\n\n  hooks.parseTwoDigitYear = function (input) {\n    return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n  }; // MOMENTS\n\n\n  var getSetYear = makeGetSet('FullYear', true);\n\n  function getIsLeapYear() {\n    return isLeapYear(this.year());\n  }\n\n  function createDate(y, m, d, h, M, s, ms) {\n    // can't just apply() to create a date:\n    // https://stackoverflow.com/q/181348\n    var date; // the date constructor remaps years 0-99 to 1900-1999\n\n    if (y < 100 && y >= 0) {\n      // preserve leap years using a full 400 year cycle, then reset\n      date = new Date(y + 400, m, d, h, M, s, ms);\n\n      if (isFinite(date.getFullYear())) {\n        date.setFullYear(y);\n      }\n    } else {\n      date = new Date(y, m, d, h, M, s, ms);\n    }\n\n    return date;\n  }\n\n  function createUTCDate(y) {\n    var date, args; // the Date.UTC function remaps years 0-99 to 1900-1999\n\n    if (y < 100 && y >= 0) {\n      args = Array.prototype.slice.call(arguments); // preserve leap years using a full 400 year cycle, then reset\n\n      args[0] = y + 400;\n      date = new Date(Date.UTC.apply(null, args));\n\n      if (isFinite(date.getUTCFullYear())) {\n        date.setUTCFullYear(y);\n      }\n    } else {\n      date = new Date(Date.UTC.apply(null, arguments));\n    }\n\n    return date;\n  } // start-of-first-week - start-of-year\n\n\n  function firstWeekOffset(year, dow, doy) {\n    var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n    fwd = 7 + dow - doy,\n        // first-week day local weekday -- which local weekday is fwd\n    fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n    return -fwdlw + fwd - 1;\n  } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n\n\n  function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n    var localWeekday = (7 + weekday - dow) % 7,\n        weekOffset = firstWeekOffset(year, dow, doy),\n        dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n        resYear,\n        resDayOfYear;\n\n    if (dayOfYear <= 0) {\n      resYear = year - 1;\n      resDayOfYear = daysInYear(resYear) + dayOfYear;\n    } else if (dayOfYear > daysInYear(year)) {\n      resYear = year + 1;\n      resDayOfYear = dayOfYear - daysInYear(year);\n    } else {\n      resYear = year;\n      resDayOfYear = dayOfYear;\n    }\n\n    return {\n      year: resYear,\n      dayOfYear: resDayOfYear\n    };\n  }\n\n  function weekOfYear(mom, dow, doy) {\n    var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n        week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n        resWeek,\n        resYear;\n\n    if (week < 1) {\n      resYear = mom.year() - 1;\n      resWeek = week + weeksInYear(resYear, dow, doy);\n    } else if (week > weeksInYear(mom.year(), dow, doy)) {\n      resWeek = week - weeksInYear(mom.year(), dow, doy);\n      resYear = mom.year() + 1;\n    } else {\n      resYear = mom.year();\n      resWeek = week;\n    }\n\n    return {\n      week: resWeek,\n      year: resYear\n    };\n  }\n\n  function weeksInYear(year, dow, doy) {\n    var weekOffset = firstWeekOffset(year, dow, doy),\n        weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n    return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n  } // FORMATTING\n\n\n  addFormatToken('w', ['ww', 2], 'wo', 'week');\n  addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES\n\n  addUnitAlias('week', 'w');\n  addUnitAlias('isoWeek', 'W'); // PRIORITIES\n\n  addUnitPriority('week', 5);\n  addUnitPriority('isoWeek', 5); // PARSING\n\n  addRegexToken('w', match1to2);\n  addRegexToken('ww', match1to2, match2);\n  addRegexToken('W', match1to2);\n  addRegexToken('WW', match1to2, match2);\n  addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n    week[token.substr(0, 1)] = toInt(input);\n  }); // HELPERS\n  // LOCALES\n\n  function localeWeek(mom) {\n    return weekOfYear(mom, this._week.dow, this._week.doy).week;\n  }\n\n  var defaultLocaleWeek = {\n    dow: 0,\n    // Sunday is the first day of the week.\n    doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n  };\n\n  function localeFirstDayOfWeek() {\n    return this._week.dow;\n  }\n\n  function localeFirstDayOfYear() {\n    return this._week.doy;\n  } // MOMENTS\n\n\n  function getSetWeek(input) {\n    var week = this.localeData().week(this);\n    return input == null ? week : this.add((input - week) * 7, 'd');\n  }\n\n  function getSetISOWeek(input) {\n    var week = weekOfYear(this, 1, 4).week;\n    return input == null ? week : this.add((input - week) * 7, 'd');\n  } // FORMATTING\n\n\n  addFormatToken('d', 0, 'do', 'day');\n  addFormatToken('dd', 0, 0, function (format) {\n    return this.localeData().weekdaysMin(this, format);\n  });\n  addFormatToken('ddd', 0, 0, function (format) {\n    return this.localeData().weekdaysShort(this, format);\n  });\n  addFormatToken('dddd', 0, 0, function (format) {\n    return this.localeData().weekdays(this, format);\n  });\n  addFormatToken('e', 0, 0, 'weekday');\n  addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES\n\n  addUnitAlias('day', 'd');\n  addUnitAlias('weekday', 'e');\n  addUnitAlias('isoWeekday', 'E'); // PRIORITY\n\n  addUnitPriority('day', 11);\n  addUnitPriority('weekday', 11);\n  addUnitPriority('isoWeekday', 11); // PARSING\n\n  addRegexToken('d', match1to2);\n  addRegexToken('e', match1to2);\n  addRegexToken('E', match1to2);\n  addRegexToken('dd', function (isStrict, locale) {\n    return locale.weekdaysMinRegex(isStrict);\n  });\n  addRegexToken('ddd', function (isStrict, locale) {\n    return locale.weekdaysShortRegex(isStrict);\n  });\n  addRegexToken('dddd', function (isStrict, locale) {\n    return locale.weekdaysRegex(isStrict);\n  });\n  addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n    var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid\n\n\n    if (weekday != null) {\n      week.d = weekday;\n    } else {\n      getParsingFlags(config).invalidWeekday = input;\n    }\n  });\n  addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n    week[token] = toInt(input);\n  }); // HELPERS\n\n  function parseWeekday(input, locale) {\n    if (typeof input !== 'string') {\n      return input;\n    }\n\n    if (!isNaN(input)) {\n      return parseInt(input, 10);\n    }\n\n    input = locale.weekdaysParse(input);\n\n    if (typeof input === 'number') {\n      return input;\n    }\n\n    return null;\n  }\n\n  function parseIsoWeekday(input, locale) {\n    if (typeof input === 'string') {\n      return locale.weekdaysParse(input) % 7 || 7;\n    }\n\n    return isNaN(input) ? null : input;\n  } // LOCALES\n\n\n  function shiftWeekdays(ws, n) {\n    return ws.slice(n, 7).concat(ws.slice(0, n));\n  }\n\n  var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n      defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n      defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n      defaultWeekdaysRegex = matchWord,\n      defaultWeekdaysShortRegex = matchWord,\n      defaultWeekdaysMinRegex = matchWord;\n\n  function localeWeekdays(m, format) {\n    var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format) ? 'format' : 'standalone'];\n    return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays;\n  }\n\n  function localeWeekdaysShort(m) {\n    return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n  }\n\n  function localeWeekdaysMin(m) {\n    return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n  }\n\n  function handleStrictParse$1(weekdayName, format, strict) {\n    var i,\n        ii,\n        mom,\n        llc = weekdayName.toLocaleLowerCase();\n\n    if (!this._weekdaysParse) {\n      this._weekdaysParse = [];\n      this._shortWeekdaysParse = [];\n      this._minWeekdaysParse = [];\n\n      for (i = 0; i < 7; ++i) {\n        mom = createUTC([2000, 1]).day(i);\n        this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n        this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n        this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n      }\n    }\n\n    if (strict) {\n      if (format === 'dddd') {\n        ii = indexOf.call(this._weekdaysParse, llc);\n        return ii !== -1 ? ii : null;\n      } else if (format === 'ddd') {\n        ii = indexOf.call(this._shortWeekdaysParse, llc);\n        return ii !== -1 ? ii : null;\n      } else {\n        ii = indexOf.call(this._minWeekdaysParse, llc);\n        return ii !== -1 ? ii : null;\n      }\n    } else {\n      if (format === 'dddd') {\n        ii = indexOf.call(this._weekdaysParse, llc);\n\n        if (ii !== -1) {\n          return ii;\n        }\n\n        ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n        if (ii !== -1) {\n          return ii;\n        }\n\n        ii = indexOf.call(this._minWeekdaysParse, llc);\n        return ii !== -1 ? ii : null;\n      } else if (format === 'ddd') {\n        ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n        if (ii !== -1) {\n          return ii;\n        }\n\n        ii = indexOf.call(this._weekdaysParse, llc);\n\n        if (ii !== -1) {\n          return ii;\n        }\n\n        ii = indexOf.call(this._minWeekdaysParse, llc);\n        return ii !== -1 ? ii : null;\n      } else {\n        ii = indexOf.call(this._minWeekdaysParse, llc);\n\n        if (ii !== -1) {\n          return ii;\n        }\n\n        ii = indexOf.call(this._weekdaysParse, llc);\n\n        if (ii !== -1) {\n          return ii;\n        }\n\n        ii = indexOf.call(this._shortWeekdaysParse, llc);\n        return ii !== -1 ? ii : null;\n      }\n    }\n  }\n\n  function localeWeekdaysParse(weekdayName, format, strict) {\n    var i, mom, regex;\n\n    if (this._weekdaysParseExact) {\n      return handleStrictParse$1.call(this, weekdayName, format, strict);\n    }\n\n    if (!this._weekdaysParse) {\n      this._weekdaysParse = [];\n      this._minWeekdaysParse = [];\n      this._shortWeekdaysParse = [];\n      this._fullWeekdaysParse = [];\n    }\n\n    for (i = 0; i < 7; i++) {\n      // make the regex if we don't have it already\n      mom = createUTC([2000, 1]).day(i);\n\n      if (strict && !this._fullWeekdaysParse[i]) {\n        this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$', 'i');\n        this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$', 'i');\n        this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$', 'i');\n      }\n\n      if (!this._weekdaysParse[i]) {\n        regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n        this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n      } // test the regex\n\n\n      if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n        return i;\n      } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n        return i;\n      } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n        return i;\n      } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n        return i;\n      }\n    }\n  } // MOMENTS\n\n\n  function getSetDayOfWeek(input) {\n    if (!this.isValid()) {\n      return input != null ? this : NaN;\n    }\n\n    var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n\n    if (input != null) {\n      input = parseWeekday(input, this.localeData());\n      return this.add(input - day, 'd');\n    } else {\n      return day;\n    }\n  }\n\n  function getSetLocaleDayOfWeek(input) {\n    if (!this.isValid()) {\n      return input != null ? this : NaN;\n    }\n\n    var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n    return input == null ? weekday : this.add(input - weekday, 'd');\n  }\n\n  function getSetISODayOfWeek(input) {\n    if (!this.isValid()) {\n      return input != null ? this : NaN;\n    } // behaves the same as moment#day except\n    // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n    // as a setter, sunday should belong to the previous week.\n\n\n    if (input != null) {\n      var weekday = parseIsoWeekday(input, this.localeData());\n      return this.day(this.day() % 7 ? weekday : weekday - 7);\n    } else {\n      return this.day() || 7;\n    }\n  }\n\n  function weekdaysRegex(isStrict) {\n    if (this._weekdaysParseExact) {\n      if (!hasOwnProp(this, '_weekdaysRegex')) {\n        computeWeekdaysParse.call(this);\n      }\n\n      if (isStrict) {\n        return this._weekdaysStrictRegex;\n      } else {\n        return this._weekdaysRegex;\n      }\n    } else {\n      if (!hasOwnProp(this, '_weekdaysRegex')) {\n        this._weekdaysRegex = defaultWeekdaysRegex;\n      }\n\n      return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex;\n    }\n  }\n\n  function weekdaysShortRegex(isStrict) {\n    if (this._weekdaysParseExact) {\n      if (!hasOwnProp(this, '_weekdaysRegex')) {\n        computeWeekdaysParse.call(this);\n      }\n\n      if (isStrict) {\n        return this._weekdaysShortStrictRegex;\n      } else {\n        return this._weekdaysShortRegex;\n      }\n    } else {\n      if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n        this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n      }\n\n      return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n    }\n  }\n\n  function weekdaysMinRegex(isStrict) {\n    if (this._weekdaysParseExact) {\n      if (!hasOwnProp(this, '_weekdaysRegex')) {\n        computeWeekdaysParse.call(this);\n      }\n\n      if (isStrict) {\n        return this._weekdaysMinStrictRegex;\n      } else {\n        return this._weekdaysMinRegex;\n      }\n    } else {\n      if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n        this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n      }\n\n      return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n    }\n  }\n\n  function computeWeekdaysParse() {\n    function cmpLenRev(a, b) {\n      return b.length - a.length;\n    }\n\n    var minPieces = [],\n        shortPieces = [],\n        longPieces = [],\n        mixedPieces = [],\n        i,\n        mom,\n        minp,\n        shortp,\n        longp;\n\n    for (i = 0; i < 7; i++) {\n      // make the regex if we don't have it already\n      mom = createUTC([2000, 1]).day(i);\n      minp = regexEscape(this.weekdaysMin(mom, ''));\n      shortp = regexEscape(this.weekdaysShort(mom, ''));\n      longp = regexEscape(this.weekdays(mom, ''));\n      minPieces.push(minp);\n      shortPieces.push(shortp);\n      longPieces.push(longp);\n      mixedPieces.push(minp);\n      mixedPieces.push(shortp);\n      mixedPieces.push(longp);\n    } // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n    // will match the longer piece.\n\n\n    minPieces.sort(cmpLenRev);\n    shortPieces.sort(cmpLenRev);\n    longPieces.sort(cmpLenRev);\n    mixedPieces.sort(cmpLenRev);\n    this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n    this._weekdaysShortRegex = this._weekdaysRegex;\n    this._weekdaysMinRegex = this._weekdaysRegex;\n    this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n    this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n    this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n  } // FORMATTING\n\n\n  function hFormat() {\n    return this.hours() % 12 || 12;\n  }\n\n  function kFormat() {\n    return this.hours() || 24;\n  }\n\n  addFormatToken('H', ['HH', 2], 0, 'hour');\n  addFormatToken('h', ['hh', 2], 0, hFormat);\n  addFormatToken('k', ['kk', 2], 0, kFormat);\n  addFormatToken('hmm', 0, 0, function () {\n    return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n  });\n  addFormatToken('hmmss', 0, 0, function () {\n    return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n  });\n  addFormatToken('Hmm', 0, 0, function () {\n    return '' + this.hours() + zeroFill(this.minutes(), 2);\n  });\n  addFormatToken('Hmmss', 0, 0, function () {\n    return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n  });\n\n  function meridiem(token, lowercase) {\n    addFormatToken(token, 0, 0, function () {\n      return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n    });\n  }\n\n  meridiem('a', true);\n  meridiem('A', false); // ALIASES\n\n  addUnitAlias('hour', 'h'); // PRIORITY\n\n  addUnitPriority('hour', 13); // PARSING\n\n  function matchMeridiem(isStrict, locale) {\n    return locale._meridiemParse;\n  }\n\n  addRegexToken('a', matchMeridiem);\n  addRegexToken('A', matchMeridiem);\n  addRegexToken('H', match1to2);\n  addRegexToken('h', match1to2);\n  addRegexToken('k', match1to2);\n  addRegexToken('HH', match1to2, match2);\n  addRegexToken('hh', match1to2, match2);\n  addRegexToken('kk', match1to2, match2);\n  addRegexToken('hmm', match3to4);\n  addRegexToken('hmmss', match5to6);\n  addRegexToken('Hmm', match3to4);\n  addRegexToken('Hmmss', match5to6);\n  addParseToken(['H', 'HH'], HOUR);\n  addParseToken(['k', 'kk'], function (input, array, config) {\n    var kInput = toInt(input);\n    array[HOUR] = kInput === 24 ? 0 : kInput;\n  });\n  addParseToken(['a', 'A'], function (input, array, config) {\n    config._isPm = config._locale.isPM(input);\n    config._meridiem = input;\n  });\n  addParseToken(['h', 'hh'], function (input, array, config) {\n    array[HOUR] = toInt(input);\n    getParsingFlags(config).bigHour = true;\n  });\n  addParseToken('hmm', function (input, array, config) {\n    var pos = input.length - 2;\n    array[HOUR] = toInt(input.substr(0, pos));\n    array[MINUTE] = toInt(input.substr(pos));\n    getParsingFlags(config).bigHour = true;\n  });\n  addParseToken('hmmss', function (input, array, config) {\n    var pos1 = input.length - 4,\n        pos2 = input.length - 2;\n    array[HOUR] = toInt(input.substr(0, pos1));\n    array[MINUTE] = toInt(input.substr(pos1, 2));\n    array[SECOND] = toInt(input.substr(pos2));\n    getParsingFlags(config).bigHour = true;\n  });\n  addParseToken('Hmm', function (input, array, config) {\n    var pos = input.length - 2;\n    array[HOUR] = toInt(input.substr(0, pos));\n    array[MINUTE] = toInt(input.substr(pos));\n  });\n  addParseToken('Hmmss', function (input, array, config) {\n    var pos1 = input.length - 4,\n        pos2 = input.length - 2;\n    array[HOUR] = toInt(input.substr(0, pos1));\n    array[MINUTE] = toInt(input.substr(pos1, 2));\n    array[SECOND] = toInt(input.substr(pos2));\n  }); // LOCALES\n\n  function localeIsPM(input) {\n    // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n    // Using charAt should be more compatible.\n    return (input + '').toLowerCase().charAt(0) === 'p';\n  }\n\n  var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n      // Setting the hour should keep the time, because the user explicitly\n  // specified which hour they want. So trying to maintain the same hour (in\n  // a new timezone) makes sense. Adding/subtracting hours does not follow\n  // this rule.\n  getSetHour = makeGetSet('Hours', true);\n\n  function localeMeridiem(hours, minutes, isLower) {\n    if (hours > 11) {\n      return isLower ? 'pm' : 'PM';\n    } else {\n      return isLower ? 'am' : 'AM';\n    }\n  }\n\n  var baseConfig = {\n    calendar: defaultCalendar,\n    longDateFormat: defaultLongDateFormat,\n    invalidDate: defaultInvalidDate,\n    ordinal: defaultOrdinal,\n    dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n    relativeTime: defaultRelativeTime,\n    months: defaultLocaleMonths,\n    monthsShort: defaultLocaleMonthsShort,\n    week: defaultLocaleWeek,\n    weekdays: defaultLocaleWeekdays,\n    weekdaysMin: defaultLocaleWeekdaysMin,\n    weekdaysShort: defaultLocaleWeekdaysShort,\n    meridiemParse: defaultLocaleMeridiemParse\n  }; // internal storage for locale config files\n\n  var locales = {},\n      localeFamilies = {},\n      globalLocale;\n\n  function commonPrefix(arr1, arr2) {\n    var i,\n        minl = Math.min(arr1.length, arr2.length);\n\n    for (i = 0; i < minl; i += 1) {\n      if (arr1[i] !== arr2[i]) {\n        return i;\n      }\n    }\n\n    return minl;\n  }\n\n  function normalizeLocale(key) {\n    return key ? key.toLowerCase().replace('_', '-') : key;\n  } // pick the locale from the array\n  // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n  // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n\n\n  function chooseLocale(names) {\n    var i = 0,\n        j,\n        next,\n        locale,\n        split;\n\n    while (i < names.length) {\n      split = normalizeLocale(names[i]).split('-');\n      j = split.length;\n      next = normalizeLocale(names[i + 1]);\n      next = next ? next.split('-') : null;\n\n      while (j > 0) {\n        locale = loadLocale(split.slice(0, j).join('-'));\n\n        if (locale) {\n          return locale;\n        }\n\n        if (next && next.length >= j && commonPrefix(split, next) >= j - 1) {\n          //the next array item is better than a shallower substring of this one\n          break;\n        }\n\n        j--;\n      }\n\n      i++;\n    }\n\n    return globalLocale;\n  }\n\n  function loadLocale(name) {\n    var oldLocale = null,\n        aliasedRequire; // TODO: Find a better way to register and load all the locales in Node\n\n    if (locales[name] === undefined && typeof module !== 'undefined' && module && module.exports) {\n      try {\n        oldLocale = globalLocale._abbr;\n        aliasedRequire = require;\n        aliasedRequire('./locale/' + name);\n        getSetGlobalLocale(oldLocale);\n      } catch (e) {\n        // mark as not found to avoid repeating expensive file require call causing high CPU\n        // when trying to find en-US, en_US, en-us for every format call\n        locales[name] = null; // null means not found\n      }\n    }\n\n    return locales[name];\n  } // This function will load locale and then set the global locale.  If\n  // no arguments are passed in, it will simply return the current global\n  // locale key.\n\n\n  function getSetGlobalLocale(key, values) {\n    var data;\n\n    if (key) {\n      if (isUndefined(values)) {\n        data = getLocale(key);\n      } else {\n        data = defineLocale(key, values);\n      }\n\n      if (data) {\n        // moment.duration._locale = moment._locale = data;\n        globalLocale = data;\n      } else {\n        if (typeof console !== 'undefined' && console.warn) {\n          //warn user if arguments are passed but the locale could not be set\n          console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n        }\n      }\n    }\n\n    return globalLocale._abbr;\n  }\n\n  function defineLocale(name, config) {\n    if (config !== null) {\n      var locale,\n          parentConfig = baseConfig;\n      config.abbr = name;\n\n      if (locales[name] != null) {\n        deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n        parentConfig = locales[name]._config;\n      } else if (config.parentLocale != null) {\n        if (locales[config.parentLocale] != null) {\n          parentConfig = locales[config.parentLocale]._config;\n        } else {\n          locale = loadLocale(config.parentLocale);\n\n          if (locale != null) {\n            parentConfig = locale._config;\n          } else {\n            if (!localeFamilies[config.parentLocale]) {\n              localeFamilies[config.parentLocale] = [];\n            }\n\n            localeFamilies[config.parentLocale].push({\n              name: name,\n              config: config\n            });\n            return null;\n          }\n        }\n      }\n\n      locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n      if (localeFamilies[name]) {\n        localeFamilies[name].forEach(function (x) {\n          defineLocale(x.name, x.config);\n        });\n      } // backwards compat for now: also set the locale\n      // make sure we set the locale AFTER all child locales have been\n      // created, so we won't end up with the child locale set.\n\n\n      getSetGlobalLocale(name);\n      return locales[name];\n    } else {\n      // useful for testing\n      delete locales[name];\n      return null;\n    }\n  }\n\n  function updateLocale(name, config) {\n    if (config != null) {\n      var locale,\n          tmpLocale,\n          parentConfig = baseConfig;\n\n      if (locales[name] != null && locales[name].parentLocale != null) {\n        // Update existing child locale in-place to avoid memory-leaks\n        locales[name].set(mergeConfigs(locales[name]._config, config));\n      } else {\n        // MERGE\n        tmpLocale = loadLocale(name);\n\n        if (tmpLocale != null) {\n          parentConfig = tmpLocale._config;\n        }\n\n        config = mergeConfigs(parentConfig, config);\n\n        if (tmpLocale == null) {\n          // updateLocale is called for creating a new locale\n          // Set abbr so it will have a name (getters return\n          // undefined otherwise).\n          config.abbr = name;\n        }\n\n        locale = new Locale(config);\n        locale.parentLocale = locales[name];\n        locales[name] = locale;\n      } // backwards compat for now: also set the locale\n\n\n      getSetGlobalLocale(name);\n    } else {\n      // pass null for config to unupdate, useful for tests\n      if (locales[name] != null) {\n        if (locales[name].parentLocale != null) {\n          locales[name] = locales[name].parentLocale;\n\n          if (name === getSetGlobalLocale()) {\n            getSetGlobalLocale(name);\n          }\n        } else if (locales[name] != null) {\n          delete locales[name];\n        }\n      }\n    }\n\n    return locales[name];\n  } // returns locale data\n\n\n  function getLocale(key) {\n    var locale;\n\n    if (key && key._locale && key._locale._abbr) {\n      key = key._locale._abbr;\n    }\n\n    if (!key) {\n      return globalLocale;\n    }\n\n    if (!isArray(key)) {\n      //short-circuit everything else\n      locale = loadLocale(key);\n\n      if (locale) {\n        return locale;\n      }\n\n      key = [key];\n    }\n\n    return chooseLocale(key);\n  }\n\n  function listLocales() {\n    return keys(locales);\n  }\n\n  function checkOverflow(m) {\n    var overflow,\n        a = m._a;\n\n    if (a && getParsingFlags(m).overflow === -2) {\n      overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1;\n\n      if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n        overflow = DATE;\n      }\n\n      if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n        overflow = WEEK;\n      }\n\n      if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n        overflow = WEEKDAY;\n      }\n\n      getParsingFlags(m).overflow = overflow;\n    }\n\n    return m;\n  } // iso 8601 regex\n  // 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)\n\n\n  var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n      basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n      tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n      isoDates = [['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/], ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/], ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/], ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false], ['YYYY-DDD', /\\d{4}-\\d{3}/], ['YYYY-MM', /\\d{4}-\\d\\d/, false], ['YYYYYYMMDD', /[+-]\\d{10}/], ['YYYYMMDD', /\\d{8}/], ['GGGG[W]WWE', /\\d{4}W\\d{3}/], ['GGGG[W]WW', /\\d{4}W\\d{2}/, false], ['YYYYDDD', /\\d{7}/], ['YYYYMM', /\\d{6}/, false], ['YYYY', /\\d{4}/, false]],\n      // iso time formats and regexes\n  isoTimes = [['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/], ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/], ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/], ['HH:mm', /\\d\\d:\\d\\d/], ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/], ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/], ['HHmmss', /\\d\\d\\d\\d\\d\\d/], ['HHmm', /\\d\\d\\d\\d/], ['HH', /\\d\\d/]],\n      aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n      // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n  rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n      obsOffsets = {\n    UT: 0,\n    GMT: 0,\n    EDT: -4 * 60,\n    EST: -5 * 60,\n    CDT: -5 * 60,\n    CST: -6 * 60,\n    MDT: -6 * 60,\n    MST: -7 * 60,\n    PDT: -7 * 60,\n    PST: -8 * 60\n  }; // date from iso format\n\n  function configFromISO(config) {\n    var i,\n        l,\n        string = config._i,\n        match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n        allowTime,\n        dateFormat,\n        timeFormat,\n        tzFormat;\n\n    if (match) {\n      getParsingFlags(config).iso = true;\n\n      for (i = 0, l = isoDates.length; i < l; i++) {\n        if (isoDates[i][1].exec(match[1])) {\n          dateFormat = isoDates[i][0];\n          allowTime = isoDates[i][2] !== false;\n          break;\n        }\n      }\n\n      if (dateFormat == null) {\n        config._isValid = false;\n        return;\n      }\n\n      if (match[3]) {\n        for (i = 0, l = isoTimes.length; i < l; i++) {\n          if (isoTimes[i][1].exec(match[3])) {\n            // match[2] should be 'T' or space\n            timeFormat = (match[2] || ' ') + isoTimes[i][0];\n            break;\n          }\n        }\n\n        if (timeFormat == null) {\n          config._isValid = false;\n          return;\n        }\n      }\n\n      if (!allowTime && timeFormat != null) {\n        config._isValid = false;\n        return;\n      }\n\n      if (match[4]) {\n        if (tzRegex.exec(match[4])) {\n          tzFormat = 'Z';\n        } else {\n          config._isValid = false;\n          return;\n        }\n      }\n\n      config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n      configFromStringAndFormat(config);\n    } else {\n      config._isValid = false;\n    }\n  }\n\n  function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n    var result = [untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10)];\n\n    if (secondStr) {\n      result.push(parseInt(secondStr, 10));\n    }\n\n    return result;\n  }\n\n  function untruncateYear(yearStr) {\n    var year = parseInt(yearStr, 10);\n\n    if (year <= 49) {\n      return 2000 + year;\n    } else if (year <= 999) {\n      return 1900 + year;\n    }\n\n    return year;\n  }\n\n  function preprocessRFC2822(s) {\n    // Remove comments and folding whitespace and replace multiple-spaces with a single space\n    return s.replace(/\\([^)]*\\)|[\\n\\t]/g, ' ').replace(/(\\s\\s+)/g, ' ').replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n  }\n\n  function checkWeekday(weekdayStr, parsedInput, config) {\n    if (weekdayStr) {\n      // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n      var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n          weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();\n\n      if (weekdayProvided !== weekdayActual) {\n        getParsingFlags(config).weekdayMismatch = true;\n        config._isValid = false;\n        return false;\n      }\n    }\n\n    return true;\n  }\n\n  function calculateOffset(obsOffset, militaryOffset, numOffset) {\n    if (obsOffset) {\n      return obsOffsets[obsOffset];\n    } else if (militaryOffset) {\n      // the only allowed military tz is Z\n      return 0;\n    } else {\n      var hm = parseInt(numOffset, 10),\n          m = hm % 100,\n          h = (hm - m) / 100;\n      return h * 60 + m;\n    }\n  } // date and time from ref 2822 format\n\n\n  function configFromRFC2822(config) {\n    var match = rfc2822.exec(preprocessRFC2822(config._i)),\n        parsedArray;\n\n    if (match) {\n      parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);\n\n      if (!checkWeekday(match[1], parsedArray, config)) {\n        return;\n      }\n\n      config._a = parsedArray;\n      config._tzm = calculateOffset(match[8], match[9], match[10]);\n      config._d = createUTCDate.apply(null, config._a);\n\n      config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n      getParsingFlags(config).rfc2822 = true;\n    } else {\n      config._isValid = false;\n    }\n  } // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\n\n\n  function configFromString(config) {\n    var matched = aspNetJsonRegex.exec(config._i);\n\n    if (matched !== null) {\n      config._d = new Date(+matched[1]);\n      return;\n    }\n\n    configFromISO(config);\n\n    if (config._isValid === false) {\n      delete config._isValid;\n    } else {\n      return;\n    }\n\n    configFromRFC2822(config);\n\n    if (config._isValid === false) {\n      delete config._isValid;\n    } else {\n      return;\n    }\n\n    if (config._strict) {\n      config._isValid = false;\n    } else {\n      // Final attempt, use Input Fallback\n      hooks.createFromInputFallback(config);\n    }\n  }\n\n  hooks.createFromInputFallback = deprecate('value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) {\n    config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n  }); // Pick the first defined of two or three arguments.\n\n  function defaults(a, b, c) {\n    if (a != null) {\n      return a;\n    }\n\n    if (b != null) {\n      return b;\n    }\n\n    return c;\n  }\n\n  function currentDateArray(config) {\n    // hooks is actually the exported moment object\n    var nowValue = new Date(hooks.now());\n\n    if (config._useUTC) {\n      return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n    }\n\n    return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n  } // convert an array to a date.\n  // the array should mirror the parameters below\n  // note: all values past the year are optional and will default to the lowest possible value.\n  // [year, month, day , hour, minute, second, millisecond]\n\n\n  function configFromArray(config) {\n    var i,\n        date,\n        input = [],\n        currentDate,\n        expectedWeekday,\n        yearToUse;\n\n    if (config._d) {\n      return;\n    }\n\n    currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays\n\n    if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n      dayOfYearFromWeekInfo(config);\n    } //if the day of the year is set, figure out what it is\n\n\n    if (config._dayOfYear != null) {\n      yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n      if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n        getParsingFlags(config)._overflowDayOfYear = true;\n      }\n\n      date = createUTCDate(yearToUse, 0, config._dayOfYear);\n      config._a[MONTH] = date.getUTCMonth();\n      config._a[DATE] = date.getUTCDate();\n    } // Default to current date.\n    // * if no year, month, day of month are given, default to today\n    // * if day of month is given, default month and year\n    // * if month is given, default only year\n    // * if year is given, don't default anything\n\n\n    for (i = 0; i < 3 && config._a[i] == null; ++i) {\n      config._a[i] = input[i] = currentDate[i];\n    } // Zero out whatever was not defaulted, including time\n\n\n    for (; i < 7; i++) {\n      config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n    } // Check for 24:00:00.000\n\n\n    if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n      config._nextDay = true;\n      config._a[HOUR] = 0;\n    }\n\n    config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n    expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed\n    // with parseZone.\n\n    if (config._tzm != null) {\n      config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n    }\n\n    if (config._nextDay) {\n      config._a[HOUR] = 24;\n    } // check for mismatching day of week\n\n\n    if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {\n      getParsingFlags(config).weekdayMismatch = true;\n    }\n  }\n\n  function dayOfYearFromWeekInfo(config) {\n    var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n    w = config._w;\n\n    if (w.GG != null || w.W != null || w.E != null) {\n      dow = 1;\n      doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on\n      // how we interpret now (local, utc, fixed offset). So create\n      // a now version of current config (take local/utc/offset flags, and\n      // create now).\n\n      weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n      week = defaults(w.W, 1);\n      weekday = defaults(w.E, 1);\n\n      if (weekday < 1 || weekday > 7) {\n        weekdayOverflow = true;\n      }\n    } else {\n      dow = config._locale._week.dow;\n      doy = config._locale._week.doy;\n      curWeek = weekOfYear(createLocal(), dow, doy);\n      weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week.\n\n      week = defaults(w.w, curWeek.week);\n\n      if (w.d != null) {\n        // weekday -- low day numbers are considered next week\n        weekday = w.d;\n\n        if (weekday < 0 || weekday > 6) {\n          weekdayOverflow = true;\n        }\n      } else if (w.e != null) {\n        // local weekday -- counting starts from beginning of week\n        weekday = w.e + dow;\n\n        if (w.e < 0 || w.e > 6) {\n          weekdayOverflow = true;\n        }\n      } else {\n        // default to beginning of week\n        weekday = dow;\n      }\n    }\n\n    if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n      getParsingFlags(config)._overflowWeeks = true;\n    } else if (weekdayOverflow != null) {\n      getParsingFlags(config)._overflowWeekday = true;\n    } else {\n      temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n      config._a[YEAR] = temp.year;\n      config._dayOfYear = temp.dayOfYear;\n    }\n  } // constant that refers to the ISO standard\n\n\n  hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form\n\n\n  hooks.RFC_2822 = function () {}; // date from string and format string\n\n\n  function configFromStringAndFormat(config) {\n    // TODO: Move this to another part of the creation flow to prevent circular deps\n    if (config._f === hooks.ISO_8601) {\n      configFromISO(config);\n      return;\n    }\n\n    if (config._f === hooks.RFC_2822) {\n      configFromRFC2822(config);\n      return;\n    }\n\n    config._a = [];\n    getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\n    var string = '' + config._i,\n        i,\n        parsedInput,\n        tokens,\n        token,\n        skipped,\n        stringLength = string.length,\n        totalParsedInputLength = 0,\n        era;\n    tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n    for (i = 0; i < tokens.length; i++) {\n      token = tokens[i];\n      parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n\n      if (parsedInput) {\n        skipped = string.substr(0, string.indexOf(parsedInput));\n\n        if (skipped.length > 0) {\n          getParsingFlags(config).unusedInput.push(skipped);\n        }\n\n        string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n        totalParsedInputLength += parsedInput.length;\n      } // don't parse if it's not a known token\n\n\n      if (formatTokenFunctions[token]) {\n        if (parsedInput) {\n          getParsingFlags(config).empty = false;\n        } else {\n          getParsingFlags(config).unusedTokens.push(token);\n        }\n\n        addTimeToArrayFromToken(token, parsedInput, config);\n      } else if (config._strict && !parsedInput) {\n        getParsingFlags(config).unusedTokens.push(token);\n      }\n    } // add remaining unparsed input length to the string\n\n\n    getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n\n    if (string.length > 0) {\n      getParsingFlags(config).unusedInput.push(string);\n    } // clear _12h flag if hour is <= 12\n\n\n    if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) {\n      getParsingFlags(config).bigHour = undefined;\n    }\n\n    getParsingFlags(config).parsedDateParts = config._a.slice(0);\n    getParsingFlags(config).meridiem = config._meridiem; // handle meridiem\n\n    config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); // handle era\n\n    era = getParsingFlags(config).era;\n\n    if (era !== null) {\n      config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n    }\n\n    configFromArray(config);\n    checkOverflow(config);\n  }\n\n  function meridiemFixWrap(locale, hour, meridiem) {\n    var isPm;\n\n    if (meridiem == null) {\n      // nothing to do\n      return hour;\n    }\n\n    if (locale.meridiemHour != null) {\n      return locale.meridiemHour(hour, meridiem);\n    } else if (locale.isPM != null) {\n      // Fallback\n      isPm = locale.isPM(meridiem);\n\n      if (isPm && hour < 12) {\n        hour += 12;\n      }\n\n      if (!isPm && hour === 12) {\n        hour = 0;\n      }\n\n      return hour;\n    } else {\n      // this is not supposed to happen\n      return hour;\n    }\n  } // date from string and array of format strings\n\n\n  function configFromStringAndArray(config) {\n    var tempConfig,\n        bestMoment,\n        scoreToBeat,\n        i,\n        currentScore,\n        validFormatFound,\n        bestFormatIsValid = false;\n\n    if (config._f.length === 0) {\n      getParsingFlags(config).invalidFormat = true;\n      config._d = new Date(NaN);\n      return;\n    }\n\n    for (i = 0; i < config._f.length; i++) {\n      currentScore = 0;\n      validFormatFound = false;\n      tempConfig = copyConfig({}, config);\n\n      if (config._useUTC != null) {\n        tempConfig._useUTC = config._useUTC;\n      }\n\n      tempConfig._f = config._f[i];\n      configFromStringAndFormat(tempConfig);\n\n      if (isValid(tempConfig)) {\n        validFormatFound = true;\n      } // if there is any input that was not parsed add a penalty for that format\n\n\n      currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens\n\n      currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n      getParsingFlags(tempConfig).score = currentScore;\n\n      if (!bestFormatIsValid) {\n        if (scoreToBeat == null || currentScore < scoreToBeat || validFormatFound) {\n          scoreToBeat = currentScore;\n          bestMoment = tempConfig;\n\n          if (validFormatFound) {\n            bestFormatIsValid = true;\n          }\n        }\n      } else {\n        if (currentScore < scoreToBeat) {\n          scoreToBeat = currentScore;\n          bestMoment = tempConfig;\n        }\n      }\n    }\n\n    extend(config, bestMoment || tempConfig);\n  }\n\n  function configFromObject(config) {\n    if (config._d) {\n      return;\n    }\n\n    var i = normalizeObjectUnits(config._i),\n        dayOrDate = i.day === undefined ? i.date : i.day;\n    config._a = map([i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n      return obj && parseInt(obj, 10);\n    });\n    configFromArray(config);\n  }\n\n  function createFromConfig(config) {\n    var res = new Moment(checkOverflow(prepareConfig(config)));\n\n    if (res._nextDay) {\n      // Adding is smart enough around DST\n      res.add(1, 'd');\n      res._nextDay = undefined;\n    }\n\n    return res;\n  }\n\n  function prepareConfig(config) {\n    var input = config._i,\n        format = config._f;\n    config._locale = config._locale || getLocale(config._l);\n\n    if (input === null || format === undefined && input === '') {\n      return createInvalid({\n        nullInput: true\n      });\n    }\n\n    if (typeof input === 'string') {\n      config._i = input = config._locale.preparse(input);\n    }\n\n    if (isMoment(input)) {\n      return new Moment(checkOverflow(input));\n    } else if (isDate(input)) {\n      config._d = input;\n    } else if (isArray(format)) {\n      configFromStringAndArray(config);\n    } else if (format) {\n      configFromStringAndFormat(config);\n    } else {\n      configFromInput(config);\n    }\n\n    if (!isValid(config)) {\n      config._d = null;\n    }\n\n    return config;\n  }\n\n  function configFromInput(config) {\n    var input = config._i;\n\n    if (isUndefined(input)) {\n      config._d = new Date(hooks.now());\n    } else if (isDate(input)) {\n      config._d = new Date(input.valueOf());\n    } else if (typeof input === 'string') {\n      configFromString(config);\n    } else if (isArray(input)) {\n      config._a = map(input.slice(0), function (obj) {\n        return parseInt(obj, 10);\n      });\n      configFromArray(config);\n    } else if (isObject(input)) {\n      configFromObject(config);\n    } else if (isNumber(input)) {\n      // from milliseconds\n      config._d = new Date(input);\n    } else {\n      hooks.createFromInputFallback(config);\n    }\n  }\n\n  function createLocalOrUTC(input, format, locale, strict, isUTC) {\n    var c = {};\n\n    if (format === true || format === false) {\n      strict = format;\n      format = undefined;\n    }\n\n    if (locale === true || locale === false) {\n      strict = locale;\n      locale = undefined;\n    }\n\n    if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) {\n      input = undefined;\n    } // object construction must be done this way.\n    // https://github.com/moment/moment/issues/1423\n\n\n    c._isAMomentObject = true;\n    c._useUTC = c._isUTC = isUTC;\n    c._l = locale;\n    c._i = input;\n    c._f = format;\n    c._strict = strict;\n    return createFromConfig(c);\n  }\n\n  function createLocal(input, format, locale, strict) {\n    return createLocalOrUTC(input, format, locale, strict, false);\n  }\n\n  var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n    var other = createLocal.apply(null, arguments);\n\n    if (this.isValid() && other.isValid()) {\n      return other < this ? this : other;\n    } else {\n      return createInvalid();\n    }\n  }),\n      prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n    var other = createLocal.apply(null, arguments);\n\n    if (this.isValid() && other.isValid()) {\n      return other > this ? this : other;\n    } else {\n      return createInvalid();\n    }\n  }); // Pick a moment m from moments so that m[fn](other) is true for all\n  // other. This relies on the function fn to be transitive.\n  //\n  // moments should either be an array of moment objects or an array, whose\n  // first element is an array of moment objects.\n\n  function pickBy(fn, moments) {\n    var res, i;\n\n    if (moments.length === 1 && isArray(moments[0])) {\n      moments = moments[0];\n    }\n\n    if (!moments.length) {\n      return createLocal();\n    }\n\n    res = moments[0];\n\n    for (i = 1; i < moments.length; ++i) {\n      if (!moments[i].isValid() || moments[i][fn](res)) {\n        res = moments[i];\n      }\n    }\n\n    return res;\n  } // TODO: Use [].sort instead?\n\n\n  function min() {\n    var args = [].slice.call(arguments, 0);\n    return pickBy('isBefore', args);\n  }\n\n  function max() {\n    var args = [].slice.call(arguments, 0);\n    return pickBy('isAfter', args);\n  }\n\n  var now = function now() {\n    return Date.now ? Date.now() : +new Date();\n  };\n\n  var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\n\n  function isDurationValid(m) {\n    var key,\n        unitHasDecimal = false,\n        i;\n\n    for (key in m) {\n      if (hasOwnProp(m, key) && !(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\n        return false;\n      }\n    }\n\n    for (i = 0; i < ordering.length; ++i) {\n      if (m[ordering[i]]) {\n        if (unitHasDecimal) {\n          return false; // only allow non-integers for smallest unit\n        }\n\n        if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n          unitHasDecimal = true;\n        }\n      }\n    }\n\n    return true;\n  }\n\n  function isValid$1() {\n    return this._isValid;\n  }\n\n  function createInvalid$1() {\n    return createDuration(NaN);\n  }\n\n  function Duration(duration) {\n    var normalizedInput = normalizeObjectUnits(duration),\n        years = normalizedInput.year || 0,\n        quarters = normalizedInput.quarter || 0,\n        months = normalizedInput.month || 0,\n        weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n        days = normalizedInput.day || 0,\n        hours = normalizedInput.hour || 0,\n        minutes = normalizedInput.minute || 0,\n        seconds = normalizedInput.second || 0,\n        milliseconds = normalizedInput.millisecond || 0;\n    this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove\n\n    this._milliseconds = +milliseconds + seconds * 1e3 + // 1000\n    minutes * 6e4 + // 1000 * 60\n    hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n    // Because of dateAddRemove treats 24 hours as different from a\n    // day when working around DST, we need to store them separately\n\n    this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing\n    // which months you are are talking about, so we have to store\n    // it separately.\n\n    this._months = +months + quarters * 3 + years * 12;\n    this._data = {};\n    this._locale = getLocale();\n\n    this._bubble();\n  }\n\n  function isDuration(obj) {\n    return obj instanceof Duration;\n  }\n\n  function absRound(number) {\n    if (number < 0) {\n      return Math.round(-1 * number) * -1;\n    } else {\n      return Math.round(number);\n    }\n  } // compare two arrays, return the number of differences\n\n\n  function compareArrays(array1, array2, dontConvert) {\n    var len = Math.min(array1.length, array2.length),\n        lengthDiff = Math.abs(array1.length - array2.length),\n        diffs = 0,\n        i;\n\n    for (i = 0; i < len; i++) {\n      if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) {\n        diffs++;\n      }\n    }\n\n    return diffs + lengthDiff;\n  } // FORMATTING\n\n\n  function offset(token, separator) {\n    addFormatToken(token, 0, 0, function () {\n      var offset = this.utcOffset(),\n          sign = '+';\n\n      if (offset < 0) {\n        offset = -offset;\n        sign = '-';\n      }\n\n      return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2);\n    });\n  }\n\n  offset('Z', ':');\n  offset('ZZ', ''); // PARSING\n\n  addRegexToken('Z', matchShortOffset);\n  addRegexToken('ZZ', matchShortOffset);\n  addParseToken(['Z', 'ZZ'], function (input, array, config) {\n    config._useUTC = true;\n    config._tzm = offsetFromString(matchShortOffset, input);\n  }); // HELPERS\n  // timezone chunker\n  // '+10:00' > ['10',  '00']\n  // '-1530'  > ['-15', '30']\n\n  var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n  function offsetFromString(matcher, string) {\n    var matches = (string || '').match(matcher),\n        chunk,\n        parts,\n        minutes;\n\n    if (matches === null) {\n      return null;\n    }\n\n    chunk = matches[matches.length - 1] || [];\n    parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n    minutes = +(parts[1] * 60) + toInt(parts[2]);\n    return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n  } // Return a moment from input, that is local/utc/zone equivalent to model.\n\n\n  function cloneWithOffset(input, model) {\n    var res, diff;\n\n    if (model._isUTC) {\n      res = model.clone();\n      diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api.\n\n      res._d.setTime(res._d.valueOf() + diff);\n\n      hooks.updateOffset(res, false);\n      return res;\n    } else {\n      return createLocal(input).local();\n    }\n  }\n\n  function getDateOffset(m) {\n    // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n    // https://github.com/moment/moment/pull/1871\n    return -Math.round(m._d.getTimezoneOffset());\n  } // HOOKS\n  // This function will be called whenever a moment is mutated.\n  // It is intended to keep the offset in sync with the timezone.\n\n\n  hooks.updateOffset = function () {}; // MOMENTS\n  // keepLocalTime = true means only change the timezone, without\n  // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n  // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n  // +0200, so we adjust the time as needed, to be valid.\n  //\n  // Keeping the time actually adds/subtracts (one hour)\n  // from the actual represented time. That is why we call updateOffset\n  // a second time. In case it wants us to change the offset again\n  // _changeInProgress == true case, then we have to adjust, because\n  // there is no such time in the given timezone.\n\n\n  function getSetOffset(input, keepLocalTime, keepMinutes) {\n    var offset = this._offset || 0,\n        localAdjust;\n\n    if (!this.isValid()) {\n      return input != null ? this : NaN;\n    }\n\n    if (input != null) {\n      if (typeof input === 'string') {\n        input = offsetFromString(matchShortOffset, input);\n\n        if (input === null) {\n          return this;\n        }\n      } else if (Math.abs(input) < 16 && !keepMinutes) {\n        input = input * 60;\n      }\n\n      if (!this._isUTC && keepLocalTime) {\n        localAdjust = getDateOffset(this);\n      }\n\n      this._offset = input;\n      this._isUTC = true;\n\n      if (localAdjust != null) {\n        this.add(localAdjust, 'm');\n      }\n\n      if (offset !== input) {\n        if (!keepLocalTime || this._changeInProgress) {\n          addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n        } else if (!this._changeInProgress) {\n          this._changeInProgress = true;\n          hooks.updateOffset(this, true);\n          this._changeInProgress = null;\n        }\n      }\n\n      return this;\n    } else {\n      return this._isUTC ? offset : getDateOffset(this);\n    }\n  }\n\n  function getSetZone(input, keepLocalTime) {\n    if (input != null) {\n      if (typeof input !== 'string') {\n        input = -input;\n      }\n\n      this.utcOffset(input, keepLocalTime);\n      return this;\n    } else {\n      return -this.utcOffset();\n    }\n  }\n\n  function setOffsetToUTC(keepLocalTime) {\n    return this.utcOffset(0, keepLocalTime);\n  }\n\n  function setOffsetToLocal(keepLocalTime) {\n    if (this._isUTC) {\n      this.utcOffset(0, keepLocalTime);\n      this._isUTC = false;\n\n      if (keepLocalTime) {\n        this.subtract(getDateOffset(this), 'm');\n      }\n    }\n\n    return this;\n  }\n\n  function setOffsetToParsedOffset() {\n    if (this._tzm != null) {\n      this.utcOffset(this._tzm, false, true);\n    } else if (typeof this._i === 'string') {\n      var tZone = offsetFromString(matchOffset, this._i);\n\n      if (tZone != null) {\n        this.utcOffset(tZone);\n      } else {\n        this.utcOffset(0, true);\n      }\n    }\n\n    return this;\n  }\n\n  function hasAlignedHourOffset(input) {\n    if (!this.isValid()) {\n      return false;\n    }\n\n    input = input ? createLocal(input).utcOffset() : 0;\n    return (this.utcOffset() - input) % 60 === 0;\n  }\n\n  function isDaylightSavingTime() {\n    return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();\n  }\n\n  function isDaylightSavingTimeShifted() {\n    if (!isUndefined(this._isDSTShifted)) {\n      return this._isDSTShifted;\n    }\n\n    var c = {},\n        other;\n    copyConfig(c, this);\n    c = prepareConfig(c);\n\n    if (c._a) {\n      other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n      this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n    } else {\n      this._isDSTShifted = false;\n    }\n\n    return this._isDSTShifted;\n  }\n\n  function isLocal() {\n    return this.isValid() ? !this._isUTC : false;\n  }\n\n  function isUtcOffset() {\n    return this.isValid() ? this._isUTC : false;\n  }\n\n  function isUtc() {\n    return this.isValid() ? this._isUTC && this._offset === 0 : false;\n  } // ASP.NET json date format regex\n\n\n  var aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n      // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n  // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n  // and further modified to allow for strings containing both week and day\n  isoRegex = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n  function createDuration(input, key) {\n    var duration = input,\n        // matching against regexp is expensive, do it on demand\n    match = null,\n        sign,\n        ret,\n        diffRes;\n\n    if (isDuration(input)) {\n      duration = {\n        ms: input._milliseconds,\n        d: input._days,\n        M: input._months\n      };\n    } else if (isNumber(input) || !isNaN(+input)) {\n      duration = {};\n\n      if (key) {\n        duration[key] = +input;\n      } else {\n        duration.milliseconds = +input;\n      }\n    } else if (match = aspNetRegex.exec(input)) {\n      sign = match[1] === '-' ? -1 : 1;\n      duration = {\n        y: 0,\n        d: toInt(match[DATE]) * sign,\n        h: toInt(match[HOUR]) * sign,\n        m: toInt(match[MINUTE]) * sign,\n        s: toInt(match[SECOND]) * sign,\n        ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n\n      };\n    } else if (match = isoRegex.exec(input)) {\n      sign = match[1] === '-' ? -1 : 1;\n      duration = {\n        y: parseIso(match[2], sign),\n        M: parseIso(match[3], sign),\n        w: parseIso(match[4], sign),\n        d: parseIso(match[5], sign),\n        h: parseIso(match[6], sign),\n        m: parseIso(match[7], sign),\n        s: parseIso(match[8], sign)\n      };\n    } else if (duration == null) {\n      // checks for null or undefined\n      duration = {};\n    } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n      diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n      duration = {};\n      duration.ms = diffRes.milliseconds;\n      duration.M = diffRes.months;\n    }\n\n    ret = new Duration(duration);\n\n    if (isDuration(input) && hasOwnProp(input, '_locale')) {\n      ret._locale = input._locale;\n    }\n\n    if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n      ret._isValid = input._isValid;\n    }\n\n    return ret;\n  }\n\n  createDuration.fn = Duration.prototype;\n  createDuration.invalid = createInvalid$1;\n\n  function parseIso(inp, sign) {\n    // We'd normally use ~~inp for this, but unfortunately it also\n    // converts floats to ints.\n    // inp may be undefined, so careful calling replace on it.\n    var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it\n\n    return (isNaN(res) ? 0 : res) * sign;\n  }\n\n  function positiveMomentsDifference(base, other) {\n    var res = {};\n    res.months = other.month() - base.month() + (other.year() - base.year()) * 12;\n\n    if (base.clone().add(res.months, 'M').isAfter(other)) {\n      --res.months;\n    }\n\n    res.milliseconds = +other - +base.clone().add(res.months, 'M');\n    return res;\n  }\n\n  function momentsDifference(base, other) {\n    var res;\n\n    if (!(base.isValid() && other.isValid())) {\n      return {\n        milliseconds: 0,\n        months: 0\n      };\n    }\n\n    other = cloneWithOffset(other, base);\n\n    if (base.isBefore(other)) {\n      res = positiveMomentsDifference(base, other);\n    } else {\n      res = positiveMomentsDifference(other, base);\n      res.milliseconds = -res.milliseconds;\n      res.months = -res.months;\n    }\n\n    return res;\n  } // TODO: remove 'name' arg after deprecation is removed\n\n\n  function createAdder(direction, name) {\n    return function (val, period) {\n      var dur, tmp; //invert the arguments, but complain about it\n\n      if (period !== null && !isNaN(+period)) {\n        deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n        tmp = val;\n        val = period;\n        period = tmp;\n      }\n\n      dur = createDuration(val, period);\n      addSubtract(this, dur, direction);\n      return this;\n    };\n  }\n\n  function addSubtract(mom, duration, isAdding, updateOffset) {\n    var milliseconds = duration._milliseconds,\n        days = absRound(duration._days),\n        months = absRound(duration._months);\n\n    if (!mom.isValid()) {\n      // No op\n      return;\n    }\n\n    updateOffset = updateOffset == null ? true : updateOffset;\n\n    if (months) {\n      setMonth(mom, get(mom, 'Month') + months * isAdding);\n    }\n\n    if (days) {\n      set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n    }\n\n    if (milliseconds) {\n      mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n    }\n\n    if (updateOffset) {\n      hooks.updateOffset(mom, days || months);\n    }\n  }\n\n  var add = createAdder(1, 'add'),\n      subtract = createAdder(-1, 'subtract');\n\n  function isString(input) {\n    return typeof input === 'string' || input instanceof String;\n  } // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\n\n\n  function isMomentInput(input) {\n    return isMoment(input) || isDate(input) || isString(input) || isNumber(input) || isNumberOrStringArray(input) || isMomentInputObject(input) || input === null || input === undefined;\n  }\n\n  function isMomentInputObject(input) {\n    var objectTest = isObject(input) && !isObjectEmpty(input),\n        propertyTest = false,\n        properties = ['years', 'year', 'y', 'months', 'month', 'M', 'days', 'day', 'd', 'dates', 'date', 'D', 'hours', 'hour', 'h', 'minutes', 'minute', 'm', 'seconds', 'second', 's', 'milliseconds', 'millisecond', 'ms'],\n        i,\n        property;\n\n    for (i = 0; i < properties.length; i += 1) {\n      property = properties[i];\n      propertyTest = propertyTest || hasOwnProp(input, property);\n    }\n\n    return objectTest && propertyTest;\n  }\n\n  function isNumberOrStringArray(input) {\n    var arrayTest = isArray(input),\n        dataTypeTest = false;\n\n    if (arrayTest) {\n      dataTypeTest = input.filter(function (item) {\n        return !isNumber(item) && isString(input);\n      }).length === 0;\n    }\n\n    return arrayTest && dataTypeTest;\n  }\n\n  function isCalendarSpec(input) {\n    var objectTest = isObject(input) && !isObjectEmpty(input),\n        propertyTest = false,\n        properties = ['sameDay', 'nextDay', 'lastDay', 'nextWeek', 'lastWeek', 'sameElse'],\n        i,\n        property;\n\n    for (i = 0; i < properties.length; i += 1) {\n      property = properties[i];\n      propertyTest = propertyTest || hasOwnProp(input, property);\n    }\n\n    return objectTest && propertyTest;\n  }\n\n  function getCalendarFormat(myMoment, now) {\n    var diff = myMoment.diff(now, 'days', true);\n    return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse';\n  }\n\n  function calendar$1(time, formats) {\n    // Support for single parameter, formats only overload to the calendar function\n    if (arguments.length === 1) {\n      if (!arguments[0]) {\n        time = undefined;\n        formats = undefined;\n      } else if (isMomentInput(arguments[0])) {\n        time = arguments[0];\n        formats = undefined;\n      } else if (isCalendarSpec(arguments[0])) {\n        formats = arguments[0];\n        time = undefined;\n      }\n    } // We want to compare the start of today, vs this.\n    // Getting start-of-today depends on whether we're local/utc/offset or not.\n\n\n    var now = time || createLocal(),\n        sod = cloneWithOffset(now, this).startOf('day'),\n        format = hooks.calendarFormat(this, sod) || 'sameElse',\n        output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n    return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n  }\n\n  function clone() {\n    return new Moment(this);\n  }\n\n  function isAfter(input, units) {\n    var localInput = isMoment(input) ? input : createLocal(input);\n\n    if (!(this.isValid() && localInput.isValid())) {\n      return false;\n    }\n\n    units = normalizeUnits(units) || 'millisecond';\n\n    if (units === 'millisecond') {\n      return this.valueOf() > localInput.valueOf();\n    } else {\n      return localInput.valueOf() < this.clone().startOf(units).valueOf();\n    }\n  }\n\n  function isBefore(input, units) {\n    var localInput = isMoment(input) ? input : createLocal(input);\n\n    if (!(this.isValid() && localInput.isValid())) {\n      return false;\n    }\n\n    units = normalizeUnits(units) || 'millisecond';\n\n    if (units === 'millisecond') {\n      return this.valueOf() < localInput.valueOf();\n    } else {\n      return this.clone().endOf(units).valueOf() < localInput.valueOf();\n    }\n  }\n\n  function isBetween(from, to, units, inclusivity) {\n    var localFrom = isMoment(from) ? from : createLocal(from),\n        localTo = isMoment(to) ? to : createLocal(to);\n\n    if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n      return false;\n    }\n\n    inclusivity = inclusivity || '()';\n    return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));\n  }\n\n  function isSame(input, units) {\n    var localInput = isMoment(input) ? input : createLocal(input),\n        inputMs;\n\n    if (!(this.isValid() && localInput.isValid())) {\n      return false;\n    }\n\n    units = normalizeUnits(units) || 'millisecond';\n\n    if (units === 'millisecond') {\n      return this.valueOf() === localInput.valueOf();\n    } else {\n      inputMs = localInput.valueOf();\n      return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n    }\n  }\n\n  function isSameOrAfter(input, units) {\n    return this.isSame(input, units) || this.isAfter(input, units);\n  }\n\n  function isSameOrBefore(input, units) {\n    return this.isSame(input, units) || this.isBefore(input, units);\n  }\n\n  function diff(input, units, asFloat) {\n    var that, zoneDelta, output;\n\n    if (!this.isValid()) {\n      return NaN;\n    }\n\n    that = cloneWithOffset(input, this);\n\n    if (!that.isValid()) {\n      return NaN;\n    }\n\n    zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n    units = normalizeUnits(units);\n\n    switch (units) {\n      case 'year':\n        output = monthDiff(this, that) / 12;\n        break;\n\n      case 'month':\n        output = monthDiff(this, that);\n        break;\n\n      case 'quarter':\n        output = monthDiff(this, that) / 3;\n        break;\n\n      case 'second':\n        output = (this - that) / 1e3;\n        break;\n      // 1000\n\n      case 'minute':\n        output = (this - that) / 6e4;\n        break;\n      // 1000 * 60\n\n      case 'hour':\n        output = (this - that) / 36e5;\n        break;\n      // 1000 * 60 * 60\n\n      case 'day':\n        output = (this - that - zoneDelta) / 864e5;\n        break;\n      // 1000 * 60 * 60 * 24, negate dst\n\n      case 'week':\n        output = (this - that - zoneDelta) / 6048e5;\n        break;\n      // 1000 * 60 * 60 * 24 * 7, negate dst\n\n      default:\n        output = this - that;\n    }\n\n    return asFloat ? output : absFloor(output);\n  }\n\n  function monthDiff(a, b) {\n    if (a.date() < b.date()) {\n      // end-of-month calculations work correct when the start month has more\n      // days than the end month.\n      return -monthDiff(b, a);\n    } // difference in months\n\n\n    var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n        // b is in (anchor - 1 month, anchor + 1 month)\n    anchor = a.clone().add(wholeMonthDiff, 'months'),\n        anchor2,\n        adjust;\n\n    if (b - anchor < 0) {\n      anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month\n\n      adjust = (b - anchor) / (anchor - anchor2);\n    } else {\n      anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month\n\n      adjust = (b - anchor) / (anchor2 - anchor);\n    } //check for negative zero, return zero if negative zero\n\n\n    return -(wholeMonthDiff + adjust) || 0;\n  }\n\n  hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n  hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n  function toString() {\n    return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n  }\n\n  function toISOString(keepOffset) {\n    if (!this.isValid()) {\n      return null;\n    }\n\n    var utc = keepOffset !== true,\n        m = utc ? this.clone().utc() : this;\n\n    if (m.year() < 0 || m.year() > 9999) {\n      return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');\n    }\n\n    if (isFunction(Date.prototype.toISOString)) {\n      // native implementation is ~50x faster, use it when we can\n      if (utc) {\n        return this.toDate().toISOString();\n      } else {\n        return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));\n      }\n    }\n\n    return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');\n  }\n  /**\n   * Return a human readable representation of a moment that can\n   * also be evaluated to get a new moment which is the same\n   *\n   * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n   */\n\n\n  function inspect() {\n    if (!this.isValid()) {\n      return 'moment.invalid(/* ' + this._i + ' */)';\n    }\n\n    var func = 'moment',\n        zone = '',\n        prefix,\n        year,\n        datetime,\n        suffix;\n\n    if (!this.isLocal()) {\n      func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n      zone = 'Z';\n    }\n\n    prefix = '[' + func + '(\"]';\n    year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n    datetime = '-MM-DD[T]HH:mm:ss.SSS';\n    suffix = zone + '[\")]';\n    return this.format(prefix + year + datetime + suffix);\n  }\n\n  function format(inputString) {\n    if (!inputString) {\n      inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n    }\n\n    var output = formatMoment(this, inputString);\n    return this.localeData().postformat(output);\n  }\n\n  function from(time, withoutSuffix) {\n    if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n      return createDuration({\n        to: this,\n        from: time\n      }).locale(this.locale()).humanize(!withoutSuffix);\n    } else {\n      return this.localeData().invalidDate();\n    }\n  }\n\n  function fromNow(withoutSuffix) {\n    return this.from(createLocal(), withoutSuffix);\n  }\n\n  function to(time, withoutSuffix) {\n    if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n      return createDuration({\n        from: this,\n        to: time\n      }).locale(this.locale()).humanize(!withoutSuffix);\n    } else {\n      return this.localeData().invalidDate();\n    }\n  }\n\n  function toNow(withoutSuffix) {\n    return this.to(createLocal(), withoutSuffix);\n  } // If passed a locale key, it will set the locale for this\n  // instance.  Otherwise, it will return the locale configuration\n  // variables for this instance.\n\n\n  function locale(key) {\n    var newLocaleData;\n\n    if (key === undefined) {\n      return this._locale._abbr;\n    } else {\n      newLocaleData = getLocale(key);\n\n      if (newLocaleData != null) {\n        this._locale = newLocaleData;\n      }\n\n      return this;\n    }\n  }\n\n  var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) {\n    if (key === undefined) {\n      return this.localeData();\n    } else {\n      return this.locale(key);\n    }\n  });\n\n  function localeData() {\n    return this._locale;\n  }\n\n  var MS_PER_SECOND = 1000,\n      MS_PER_MINUTE = 60 * MS_PER_SECOND,\n      MS_PER_HOUR = 60 * MS_PER_MINUTE,\n      MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; // actual modulo - handles negative numbers (for dates before 1970):\n\n  function mod$1(dividend, divisor) {\n    return (dividend % divisor + divisor) % divisor;\n  }\n\n  function localStartOfDate(y, m, d) {\n    // the date constructor remaps years 0-99 to 1900-1999\n    if (y < 100 && y >= 0) {\n      // preserve leap years using a full 400 year cycle, then reset\n      return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n    } else {\n      return new Date(y, m, d).valueOf();\n    }\n  }\n\n  function utcStartOfDate(y, m, d) {\n    // Date.UTC remaps years 0-99 to 1900-1999\n    if (y < 100 && y >= 0) {\n      // preserve leap years using a full 400 year cycle, then reset\n      return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n    } else {\n      return Date.UTC(y, m, d);\n    }\n  }\n\n  function startOf(units) {\n    var time, startOfDate;\n    units = normalizeUnits(units);\n\n    if (units === undefined || units === 'millisecond' || !this.isValid()) {\n      return this;\n    }\n\n    startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n    switch (units) {\n      case 'year':\n        time = startOfDate(this.year(), 0, 1);\n        break;\n\n      case 'quarter':\n        time = startOfDate(this.year(), this.month() - this.month() % 3, 1);\n        break;\n\n      case 'month':\n        time = startOfDate(this.year(), this.month(), 1);\n        break;\n\n      case 'week':\n        time = startOfDate(this.year(), this.month(), this.date() - this.weekday());\n        break;\n\n      case 'isoWeek':\n        time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));\n        break;\n\n      case 'day':\n      case 'date':\n        time = startOfDate(this.year(), this.month(), this.date());\n        break;\n\n      case 'hour':\n        time = this._d.valueOf();\n        time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR);\n        break;\n\n      case 'minute':\n        time = this._d.valueOf();\n        time -= mod$1(time, MS_PER_MINUTE);\n        break;\n\n      case 'second':\n        time = this._d.valueOf();\n        time -= mod$1(time, MS_PER_SECOND);\n        break;\n    }\n\n    this._d.setTime(time);\n\n    hooks.updateOffset(this, true);\n    return this;\n  }\n\n  function endOf(units) {\n    var time, startOfDate;\n    units = normalizeUnits(units);\n\n    if (units === undefined || units === 'millisecond' || !this.isValid()) {\n      return this;\n    }\n\n    startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n    switch (units) {\n      case 'year':\n        time = startOfDate(this.year() + 1, 0, 1) - 1;\n        break;\n\n      case 'quarter':\n        time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;\n        break;\n\n      case 'month':\n        time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n        break;\n\n      case 'week':\n        time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;\n        break;\n\n      case 'isoWeek':\n        time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;\n        break;\n\n      case 'day':\n      case 'date':\n        time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n        break;\n\n      case 'hour':\n        time = this._d.valueOf();\n        time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1;\n        break;\n\n      case 'minute':\n        time = this._d.valueOf();\n        time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n        break;\n\n      case 'second':\n        time = this._d.valueOf();\n        time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n        break;\n    }\n\n    this._d.setTime(time);\n\n    hooks.updateOffset(this, true);\n    return this;\n  }\n\n  function valueOf() {\n    return this._d.valueOf() - (this._offset || 0) * 60000;\n  }\n\n  function unix() {\n    return Math.floor(this.valueOf() / 1000);\n  }\n\n  function toDate() {\n    return new Date(this.valueOf());\n  }\n\n  function toArray() {\n    var m = this;\n    return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n  }\n\n  function toObject() {\n    var m = this;\n    return {\n      years: m.year(),\n      months: m.month(),\n      date: m.date(),\n      hours: m.hours(),\n      minutes: m.minutes(),\n      seconds: m.seconds(),\n      milliseconds: m.milliseconds()\n    };\n  }\n\n  function toJSON() {\n    // new Date(NaN).toJSON() === null\n    return this.isValid() ? this.toISOString() : null;\n  }\n\n  function isValid$2() {\n    return isValid(this);\n  }\n\n  function parsingFlags() {\n    return extend({}, getParsingFlags(this));\n  }\n\n  function invalidAt() {\n    return getParsingFlags(this).overflow;\n  }\n\n  function creationData() {\n    return {\n      input: this._i,\n      format: this._f,\n      locale: this._locale,\n      isUTC: this._isUTC,\n      strict: this._strict\n    };\n  }\n\n  addFormatToken('N', 0, 0, 'eraAbbr');\n  addFormatToken('NN', 0, 0, 'eraAbbr');\n  addFormatToken('NNN', 0, 0, 'eraAbbr');\n  addFormatToken('NNNN', 0, 0, 'eraName');\n  addFormatToken('NNNNN', 0, 0, 'eraNarrow');\n  addFormatToken('y', ['y', 1], 'yo', 'eraYear');\n  addFormatToken('y', ['yy', 2], 0, 'eraYear');\n  addFormatToken('y', ['yyy', 3], 0, 'eraYear');\n  addFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n  addRegexToken('N', matchEraAbbr);\n  addRegexToken('NN', matchEraAbbr);\n  addRegexToken('NNN', matchEraAbbr);\n  addRegexToken('NNNN', matchEraName);\n  addRegexToken('NNNNN', matchEraNarrow);\n  addParseToken(['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], function (input, array, config, token) {\n    var era = config._locale.erasParse(input, token, config._strict);\n\n    if (era) {\n      getParsingFlags(config).era = era;\n    } else {\n      getParsingFlags(config).invalidEra = input;\n    }\n  });\n  addRegexToken('y', matchUnsigned);\n  addRegexToken('yy', matchUnsigned);\n  addRegexToken('yyy', matchUnsigned);\n  addRegexToken('yyyy', matchUnsigned);\n  addRegexToken('yo', matchEraYearOrdinal);\n  addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\n  addParseToken(['yo'], function (input, array, config, token) {\n    var match;\n\n    if (config._locale._eraYearOrdinalRegex) {\n      match = input.match(config._locale._eraYearOrdinalRegex);\n    }\n\n    if (config._locale.eraYearOrdinalParse) {\n      array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n    } else {\n      array[YEAR] = parseInt(input, 10);\n    }\n  });\n\n  function localeEras(m, format) {\n    var i,\n        l,\n        date,\n        eras = this._eras || getLocale('en')._eras;\n\n    for (i = 0, l = eras.length; i < l; ++i) {\n      switch (typeof eras[i].since) {\n        case 'string':\n          // truncate time\n          date = hooks(eras[i].since).startOf('day');\n          eras[i].since = date.valueOf();\n          break;\n      }\n\n      switch (typeof eras[i].until) {\n        case 'undefined':\n          eras[i].until = +Infinity;\n          break;\n\n        case 'string':\n          // truncate time\n          date = hooks(eras[i].until).startOf('day').valueOf();\n          eras[i].until = date.valueOf();\n          break;\n      }\n    }\n\n    return eras;\n  }\n\n  function localeErasParse(eraName, format, strict) {\n    var i,\n        l,\n        eras = this.eras(),\n        name,\n        abbr,\n        narrow;\n    eraName = eraName.toUpperCase();\n\n    for (i = 0, l = eras.length; i < l; ++i) {\n      name = eras[i].name.toUpperCase();\n      abbr = eras[i].abbr.toUpperCase();\n      narrow = eras[i].narrow.toUpperCase();\n\n      if (strict) {\n        switch (format) {\n          case 'N':\n          case 'NN':\n          case 'NNN':\n            if (abbr === eraName) {\n              return eras[i];\n            }\n\n            break;\n\n          case 'NNNN':\n            if (name === eraName) {\n              return eras[i];\n            }\n\n            break;\n\n          case 'NNNNN':\n            if (narrow === eraName) {\n              return eras[i];\n            }\n\n            break;\n        }\n      } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n        return eras[i];\n      }\n    }\n  }\n\n  function localeErasConvertYear(era, year) {\n    var dir = era.since <= era.until ? +1 : -1;\n\n    if (year === undefined) {\n      return hooks(era.since).year();\n    } else {\n      return hooks(era.since).year() + (year - era.offset) * dir;\n    }\n  }\n\n  function getEraName() {\n    var i,\n        l,\n        val,\n        eras = this.localeData().eras();\n\n    for (i = 0, l = eras.length; i < l; ++i) {\n      // truncate time\n      val = this.clone().startOf('day').valueOf();\n\n      if (eras[i].since <= val && val <= eras[i].until) {\n        return eras[i].name;\n      }\n\n      if (eras[i].until <= val && val <= eras[i].since) {\n        return eras[i].name;\n      }\n    }\n\n    return '';\n  }\n\n  function getEraNarrow() {\n    var i,\n        l,\n        val,\n        eras = this.localeData().eras();\n\n    for (i = 0, l = eras.length; i < l; ++i) {\n      // truncate time\n      val = this.clone().startOf('day').valueOf();\n\n      if (eras[i].since <= val && val <= eras[i].until) {\n        return eras[i].narrow;\n      }\n\n      if (eras[i].until <= val && val <= eras[i].since) {\n        return eras[i].narrow;\n      }\n    }\n\n    return '';\n  }\n\n  function getEraAbbr() {\n    var i,\n        l,\n        val,\n        eras = this.localeData().eras();\n\n    for (i = 0, l = eras.length; i < l; ++i) {\n      // truncate time\n      val = this.clone().startOf('day').valueOf();\n\n      if (eras[i].since <= val && val <= eras[i].until) {\n        return eras[i].abbr;\n      }\n\n      if (eras[i].until <= val && val <= eras[i].since) {\n        return eras[i].abbr;\n      }\n    }\n\n    return '';\n  }\n\n  function getEraYear() {\n    var i,\n        l,\n        dir,\n        val,\n        eras = this.localeData().eras();\n\n    for (i = 0, l = eras.length; i < l; ++i) {\n      dir = eras[i].since <= eras[i].until ? +1 : -1; // truncate time\n\n      val = this.clone().startOf('day').valueOf();\n\n      if (eras[i].since <= val && val <= eras[i].until || eras[i].until <= val && val <= eras[i].since) {\n        return (this.year() - hooks(eras[i].since).year()) * dir + eras[i].offset;\n      }\n    }\n\n    return this.year();\n  }\n\n  function erasNameRegex(isStrict) {\n    if (!hasOwnProp(this, '_erasNameRegex')) {\n      computeErasParse.call(this);\n    }\n\n    return isStrict ? this._erasNameRegex : this._erasRegex;\n  }\n\n  function erasAbbrRegex(isStrict) {\n    if (!hasOwnProp(this, '_erasAbbrRegex')) {\n      computeErasParse.call(this);\n    }\n\n    return isStrict ? this._erasAbbrRegex : this._erasRegex;\n  }\n\n  function erasNarrowRegex(isStrict) {\n    if (!hasOwnProp(this, '_erasNarrowRegex')) {\n      computeErasParse.call(this);\n    }\n\n    return isStrict ? this._erasNarrowRegex : this._erasRegex;\n  }\n\n  function matchEraAbbr(isStrict, locale) {\n    return locale.erasAbbrRegex(isStrict);\n  }\n\n  function matchEraName(isStrict, locale) {\n    return locale.erasNameRegex(isStrict);\n  }\n\n  function matchEraNarrow(isStrict, locale) {\n    return locale.erasNarrowRegex(isStrict);\n  }\n\n  function matchEraYearOrdinal(isStrict, locale) {\n    return locale._eraYearOrdinalRegex || matchUnsigned;\n  }\n\n  function computeErasParse() {\n    var abbrPieces = [],\n        namePieces = [],\n        narrowPieces = [],\n        mixedPieces = [],\n        i,\n        l,\n        eras = this.eras();\n\n    for (i = 0, l = eras.length; i < l; ++i) {\n      namePieces.push(regexEscape(eras[i].name));\n      abbrPieces.push(regexEscape(eras[i].abbr));\n      narrowPieces.push(regexEscape(eras[i].narrow));\n      mixedPieces.push(regexEscape(eras[i].name));\n      mixedPieces.push(regexEscape(eras[i].abbr));\n      mixedPieces.push(regexEscape(eras[i].narrow));\n    }\n\n    this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n    this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n    this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n    this._erasNarrowRegex = new RegExp('^(' + narrowPieces.join('|') + ')', 'i');\n  } // FORMATTING\n\n\n  addFormatToken(0, ['gg', 2], 0, function () {\n    return this.weekYear() % 100;\n  });\n  addFormatToken(0, ['GG', 2], 0, function () {\n    return this.isoWeekYear() % 100;\n  });\n\n  function addWeekYearFormatToken(token, getter) {\n    addFormatToken(0, [token, token.length], 0, getter);\n  }\n\n  addWeekYearFormatToken('gggg', 'weekYear');\n  addWeekYearFormatToken('ggggg', 'weekYear');\n  addWeekYearFormatToken('GGGG', 'isoWeekYear');\n  addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES\n\n  addUnitAlias('weekYear', 'gg');\n  addUnitAlias('isoWeekYear', 'GG'); // PRIORITY\n\n  addUnitPriority('weekYear', 1);\n  addUnitPriority('isoWeekYear', 1); // PARSING\n\n  addRegexToken('G', matchSigned);\n  addRegexToken('g', matchSigned);\n  addRegexToken('GG', match1to2, match2);\n  addRegexToken('gg', match1to2, match2);\n  addRegexToken('GGGG', match1to4, match4);\n  addRegexToken('gggg', match1to4, match4);\n  addRegexToken('GGGGG', match1to6, match6);\n  addRegexToken('ggggg', match1to6, match6);\n  addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n    week[token.substr(0, 2)] = toInt(input);\n  });\n  addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n    week[token] = hooks.parseTwoDigitYear(input);\n  }); // MOMENTS\n\n  function getSetWeekYear(input) {\n    return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy);\n  }\n\n  function getSetISOWeekYear(input) {\n    return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4);\n  }\n\n  function getISOWeeksInYear() {\n    return weeksInYear(this.year(), 1, 4);\n  }\n\n  function getISOWeeksInISOWeekYear() {\n    return weeksInYear(this.isoWeekYear(), 1, 4);\n  }\n\n  function getWeeksInYear() {\n    var weekInfo = this.localeData()._week;\n\n    return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n  }\n\n  function getWeeksInWeekYear() {\n    var weekInfo = this.localeData()._week;\n\n    return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n  }\n\n  function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n    var weeksTarget;\n\n    if (input == null) {\n      return weekOfYear(this, dow, doy).year;\n    } else {\n      weeksTarget = weeksInYear(input, dow, doy);\n\n      if (week > weeksTarget) {\n        week = weeksTarget;\n      }\n\n      return setWeekAll.call(this, input, week, weekday, dow, doy);\n    }\n  }\n\n  function setWeekAll(weekYear, week, weekday, dow, doy) {\n    var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n        date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n    this.year(date.getUTCFullYear());\n    this.month(date.getUTCMonth());\n    this.date(date.getUTCDate());\n    return this;\n  } // FORMATTING\n\n\n  addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES\n\n  addUnitAlias('quarter', 'Q'); // PRIORITY\n\n  addUnitPriority('quarter', 7); // PARSING\n\n  addRegexToken('Q', match1);\n  addParseToken('Q', function (input, array) {\n    array[MONTH] = (toInt(input) - 1) * 3;\n  }); // MOMENTS\n\n  function getSetQuarter(input) {\n    return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n  } // FORMATTING\n\n\n  addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES\n\n  addUnitAlias('date', 'D'); // PRIORITY\n\n  addUnitPriority('date', 9); // PARSING\n\n  addRegexToken('D', match1to2);\n  addRegexToken('DD', match1to2, match2);\n  addRegexToken('Do', function (isStrict, locale) {\n    // TODO: Remove \"ordinalParse\" fallback in next major release.\n    return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient;\n  });\n  addParseToken(['D', 'DD'], DATE);\n  addParseToken('Do', function (input, array) {\n    array[DATE] = toInt(input.match(match1to2)[0]);\n  }); // MOMENTS\n\n  var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING\n\n  addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES\n\n  addUnitAlias('dayOfYear', 'DDD'); // PRIORITY\n\n  addUnitPriority('dayOfYear', 4); // PARSING\n\n  addRegexToken('DDD', match1to3);\n  addRegexToken('DDDD', match3);\n  addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n    config._dayOfYear = toInt(input);\n  }); // HELPERS\n  // MOMENTS\n\n  function getSetDayOfYear(input) {\n    var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n    return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n  } // FORMATTING\n\n\n  addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES\n\n  addUnitAlias('minute', 'm'); // PRIORITY\n\n  addUnitPriority('minute', 14); // PARSING\n\n  addRegexToken('m', match1to2);\n  addRegexToken('mm', match1to2, match2);\n  addParseToken(['m', 'mm'], MINUTE); // MOMENTS\n\n  var getSetMinute = makeGetSet('Minutes', false); // FORMATTING\n\n  addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES\n\n  addUnitAlias('second', 's'); // PRIORITY\n\n  addUnitPriority('second', 15); // PARSING\n\n  addRegexToken('s', match1to2);\n  addRegexToken('ss', match1to2, match2);\n  addParseToken(['s', 'ss'], SECOND); // MOMENTS\n\n  var getSetSecond = makeGetSet('Seconds', false); // FORMATTING\n\n  addFormatToken('S', 0, 0, function () {\n    return ~~(this.millisecond() / 100);\n  });\n  addFormatToken(0, ['SS', 2], 0, function () {\n    return ~~(this.millisecond() / 10);\n  });\n  addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n  addFormatToken(0, ['SSSS', 4], 0, function () {\n    return this.millisecond() * 10;\n  });\n  addFormatToken(0, ['SSSSS', 5], 0, function () {\n    return this.millisecond() * 100;\n  });\n  addFormatToken(0, ['SSSSSS', 6], 0, function () {\n    return this.millisecond() * 1000;\n  });\n  addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n    return this.millisecond() * 10000;\n  });\n  addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n    return this.millisecond() * 100000;\n  });\n  addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n    return this.millisecond() * 1000000;\n  }); // ALIASES\n\n  addUnitAlias('millisecond', 'ms'); // PRIORITY\n\n  addUnitPriority('millisecond', 16); // PARSING\n\n  addRegexToken('S', match1to3, match1);\n  addRegexToken('SS', match1to3, match2);\n  addRegexToken('SSS', match1to3, match3);\n  var token, getSetMillisecond;\n\n  for (token = 'SSSS'; token.length <= 9; token += 'S') {\n    addRegexToken(token, matchUnsigned);\n  }\n\n  function parseMs(input, array) {\n    array[MILLISECOND] = toInt(('0.' + input) * 1000);\n  }\n\n  for (token = 'S'; token.length <= 9; token += 'S') {\n    addParseToken(token, parseMs);\n  }\n\n  getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING\n\n  addFormatToken('z', 0, 0, 'zoneAbbr');\n  addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS\n\n  function getZoneAbbr() {\n    return this._isUTC ? 'UTC' : '';\n  }\n\n  function getZoneName() {\n    return this._isUTC ? 'Coordinated Universal Time' : '';\n  }\n\n  var proto = Moment.prototype;\n  proto.add = add;\n  proto.calendar = calendar$1;\n  proto.clone = clone;\n  proto.diff = diff;\n  proto.endOf = endOf;\n  proto.format = format;\n  proto.from = from;\n  proto.fromNow = fromNow;\n  proto.to = to;\n  proto.toNow = toNow;\n  proto.get = stringGet;\n  proto.invalidAt = invalidAt;\n  proto.isAfter = isAfter;\n  proto.isBefore = isBefore;\n  proto.isBetween = isBetween;\n  proto.isSame = isSame;\n  proto.isSameOrAfter = isSameOrAfter;\n  proto.isSameOrBefore = isSameOrBefore;\n  proto.isValid = isValid$2;\n  proto.lang = lang;\n  proto.locale = locale;\n  proto.localeData = localeData;\n  proto.max = prototypeMax;\n  proto.min = prototypeMin;\n  proto.parsingFlags = parsingFlags;\n  proto.set = stringSet;\n  proto.startOf = startOf;\n  proto.subtract = subtract;\n  proto.toArray = toArray;\n  proto.toObject = toObject;\n  proto.toDate = toDate;\n  proto.toISOString = toISOString;\n  proto.inspect = inspect;\n\n  if (typeof Symbol !== 'undefined' && Symbol.for != null) {\n    proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n      return 'Moment<' + this.format() + '>';\n    };\n  }\n\n  proto.toJSON = toJSON;\n  proto.toString = toString;\n  proto.unix = unix;\n  proto.valueOf = valueOf;\n  proto.creationData = creationData;\n  proto.eraName = getEraName;\n  proto.eraNarrow = getEraNarrow;\n  proto.eraAbbr = getEraAbbr;\n  proto.eraYear = getEraYear;\n  proto.year = getSetYear;\n  proto.isLeapYear = getIsLeapYear;\n  proto.weekYear = getSetWeekYear;\n  proto.isoWeekYear = getSetISOWeekYear;\n  proto.quarter = proto.quarters = getSetQuarter;\n  proto.month = getSetMonth;\n  proto.daysInMonth = getDaysInMonth;\n  proto.week = proto.weeks = getSetWeek;\n  proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n  proto.weeksInYear = getWeeksInYear;\n  proto.weeksInWeekYear = getWeeksInWeekYear;\n  proto.isoWeeksInYear = getISOWeeksInYear;\n  proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\n  proto.date = getSetDayOfMonth;\n  proto.day = proto.days = getSetDayOfWeek;\n  proto.weekday = getSetLocaleDayOfWeek;\n  proto.isoWeekday = getSetISODayOfWeek;\n  proto.dayOfYear = getSetDayOfYear;\n  proto.hour = proto.hours = getSetHour;\n  proto.minute = proto.minutes = getSetMinute;\n  proto.second = proto.seconds = getSetSecond;\n  proto.millisecond = proto.milliseconds = getSetMillisecond;\n  proto.utcOffset = getSetOffset;\n  proto.utc = setOffsetToUTC;\n  proto.local = setOffsetToLocal;\n  proto.parseZone = setOffsetToParsedOffset;\n  proto.hasAlignedHourOffset = hasAlignedHourOffset;\n  proto.isDST = isDaylightSavingTime;\n  proto.isLocal = isLocal;\n  proto.isUtcOffset = isUtcOffset;\n  proto.isUtc = isUtc;\n  proto.isUTC = isUtc;\n  proto.zoneAbbr = getZoneAbbr;\n  proto.zoneName = getZoneName;\n  proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n  proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n  proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n  proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\n  proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\n  function createUnix(input) {\n    return createLocal(input * 1000);\n  }\n\n  function createInZone() {\n    return createLocal.apply(null, arguments).parseZone();\n  }\n\n  function preParsePostFormat(string) {\n    return string;\n  }\n\n  var proto$1 = Locale.prototype;\n  proto$1.calendar = calendar;\n  proto$1.longDateFormat = longDateFormat;\n  proto$1.invalidDate = invalidDate;\n  proto$1.ordinal = ordinal;\n  proto$1.preparse = preParsePostFormat;\n  proto$1.postformat = preParsePostFormat;\n  proto$1.relativeTime = relativeTime;\n  proto$1.pastFuture = pastFuture;\n  proto$1.set = set;\n  proto$1.eras = localeEras;\n  proto$1.erasParse = localeErasParse;\n  proto$1.erasConvertYear = localeErasConvertYear;\n  proto$1.erasAbbrRegex = erasAbbrRegex;\n  proto$1.erasNameRegex = erasNameRegex;\n  proto$1.erasNarrowRegex = erasNarrowRegex;\n  proto$1.months = localeMonths;\n  proto$1.monthsShort = localeMonthsShort;\n  proto$1.monthsParse = localeMonthsParse;\n  proto$1.monthsRegex = monthsRegex;\n  proto$1.monthsShortRegex = monthsShortRegex;\n  proto$1.week = localeWeek;\n  proto$1.firstDayOfYear = localeFirstDayOfYear;\n  proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n  proto$1.weekdays = localeWeekdays;\n  proto$1.weekdaysMin = localeWeekdaysMin;\n  proto$1.weekdaysShort = localeWeekdaysShort;\n  proto$1.weekdaysParse = localeWeekdaysParse;\n  proto$1.weekdaysRegex = weekdaysRegex;\n  proto$1.weekdaysShortRegex = weekdaysShortRegex;\n  proto$1.weekdaysMinRegex = weekdaysMinRegex;\n  proto$1.isPM = localeIsPM;\n  proto$1.meridiem = localeMeridiem;\n\n  function get$1(format, index, field, setter) {\n    var locale = getLocale(),\n        utc = createUTC().set(setter, index);\n    return locale[field](utc, format);\n  }\n\n  function listMonthsImpl(format, index, field) {\n    if (isNumber(format)) {\n      index = format;\n      format = undefined;\n    }\n\n    format = format || '';\n\n    if (index != null) {\n      return get$1(format, index, field, 'month');\n    }\n\n    var i,\n        out = [];\n\n    for (i = 0; i < 12; i++) {\n      out[i] = get$1(format, i, field, 'month');\n    }\n\n    return out;\n  } // ()\n  // (5)\n  // (fmt, 5)\n  // (fmt)\n  // (true)\n  // (true, 5)\n  // (true, fmt, 5)\n  // (true, fmt)\n\n\n  function listWeekdaysImpl(localeSorted, format, index, field) {\n    if (typeof localeSorted === 'boolean') {\n      if (isNumber(format)) {\n        index = format;\n        format = undefined;\n      }\n\n      format = format || '';\n    } else {\n      format = localeSorted;\n      index = format;\n      localeSorted = false;\n\n      if (isNumber(format)) {\n        index = format;\n        format = undefined;\n      }\n\n      format = format || '';\n    }\n\n    var locale = getLocale(),\n        shift = localeSorted ? locale._week.dow : 0,\n        i,\n        out = [];\n\n    if (index != null) {\n      return get$1(format, (index + shift) % 7, field, 'day');\n    }\n\n    for (i = 0; i < 7; i++) {\n      out[i] = get$1(format, (i + shift) % 7, field, 'day');\n    }\n\n    return out;\n  }\n\n  function listMonths(format, index) {\n    return listMonthsImpl(format, index, 'months');\n  }\n\n  function listMonthsShort(format, index) {\n    return listMonthsImpl(format, index, 'monthsShort');\n  }\n\n  function listWeekdays(localeSorted, format, index) {\n    return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n  }\n\n  function listWeekdaysShort(localeSorted, format, index) {\n    return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n  }\n\n  function listWeekdaysMin(localeSorted, format, index) {\n    return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n  }\n\n  getSetGlobalLocale('en', {\n    eras: [{\n      since: '0001-01-01',\n      until: +Infinity,\n      offset: 1,\n      name: 'Anno Domini',\n      narrow: 'AD',\n      abbr: 'AD'\n    }, {\n      since: '0000-12-31',\n      until: -Infinity,\n      offset: 1,\n      name: 'Before Christ',\n      narrow: 'BC',\n      abbr: 'BC'\n    }],\n    dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n    ordinal: function ordinal(number) {\n      var b = number % 10,\n          output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n      return number + output;\n    }\n  }); // Side effect imports\n\n  hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\n  hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n  var mathAbs = Math.abs;\n\n  function abs() {\n    var data = this._data;\n    this._milliseconds = mathAbs(this._milliseconds);\n    this._days = mathAbs(this._days);\n    this._months = mathAbs(this._months);\n    data.milliseconds = mathAbs(data.milliseconds);\n    data.seconds = mathAbs(data.seconds);\n    data.minutes = mathAbs(data.minutes);\n    data.hours = mathAbs(data.hours);\n    data.months = mathAbs(data.months);\n    data.years = mathAbs(data.years);\n    return this;\n  }\n\n  function addSubtract$1(duration, input, value, direction) {\n    var other = createDuration(input, value);\n    duration._milliseconds += direction * other._milliseconds;\n    duration._days += direction * other._days;\n    duration._months += direction * other._months;\n    return duration._bubble();\n  } // supports only 2.0-style add(1, 's') or add(duration)\n\n\n  function add$1(input, value) {\n    return addSubtract$1(this, input, value, 1);\n  } // supports only 2.0-style subtract(1, 's') or subtract(duration)\n\n\n  function subtract$1(input, value) {\n    return addSubtract$1(this, input, value, -1);\n  }\n\n  function absCeil(number) {\n    if (number < 0) {\n      return Math.floor(number);\n    } else {\n      return Math.ceil(number);\n    }\n  }\n\n  function bubble() {\n    var milliseconds = this._milliseconds,\n        days = this._days,\n        months = this._months,\n        data = this._data,\n        seconds,\n        minutes,\n        hours,\n        years,\n        monthsFromDays; // if we have a mix of positive and negative values, bubble down first\n    // check: https://github.com/moment/moment/issues/2166\n\n    if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) {\n      milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n      days = 0;\n      months = 0;\n    } // The following code bubbles up values, see the tests for\n    // examples of what that means.\n\n\n    data.milliseconds = milliseconds % 1000;\n    seconds = absFloor(milliseconds / 1000);\n    data.seconds = seconds % 60;\n    minutes = absFloor(seconds / 60);\n    data.minutes = minutes % 60;\n    hours = absFloor(minutes / 60);\n    data.hours = hours % 24;\n    days += absFloor(hours / 24); // convert days to months\n\n    monthsFromDays = absFloor(daysToMonths(days));\n    months += monthsFromDays;\n    days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year\n\n    years = absFloor(months / 12);\n    months %= 12;\n    data.days = days;\n    data.months = months;\n    data.years = years;\n    return this;\n  }\n\n  function daysToMonths(days) {\n    // 400 years have 146097 days (taking into account leap year rules)\n    // 400 years have 12 months === 4800\n    return days * 4800 / 146097;\n  }\n\n  function monthsToDays(months) {\n    // the reverse of daysToMonths\n    return months * 146097 / 4800;\n  }\n\n  function as(units) {\n    if (!this.isValid()) {\n      return NaN;\n    }\n\n    var days,\n        months,\n        milliseconds = this._milliseconds;\n    units = normalizeUnits(units);\n\n    if (units === 'month' || units === 'quarter' || units === 'year') {\n      days = this._days + milliseconds / 864e5;\n      months = this._months + daysToMonths(days);\n\n      switch (units) {\n        case 'month':\n          return months;\n\n        case 'quarter':\n          return months / 3;\n\n        case 'year':\n          return months / 12;\n      }\n    } else {\n      // handle milliseconds separately because of floating point math errors (issue #1867)\n      days = this._days + Math.round(monthsToDays(this._months));\n\n      switch (units) {\n        case 'week':\n          return days / 7 + milliseconds / 6048e5;\n\n        case 'day':\n          return days + milliseconds / 864e5;\n\n        case 'hour':\n          return days * 24 + milliseconds / 36e5;\n\n        case 'minute':\n          return days * 1440 + milliseconds / 6e4;\n\n        case 'second':\n          return days * 86400 + milliseconds / 1000;\n        // Math.floor prevents floating point math errors here\n\n        case 'millisecond':\n          return Math.floor(days * 864e5) + milliseconds;\n\n        default:\n          throw new Error('Unknown unit ' + units);\n      }\n    }\n  } // TODO: Use this.as('ms')?\n\n\n  function valueOf$1() {\n    if (!this.isValid()) {\n      return NaN;\n    }\n\n    return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6;\n  }\n\n  function makeAs(alias) {\n    return function () {\n      return this.as(alias);\n    };\n  }\n\n  var asMilliseconds = makeAs('ms'),\n      asSeconds = makeAs('s'),\n      asMinutes = makeAs('m'),\n      asHours = makeAs('h'),\n      asDays = makeAs('d'),\n      asWeeks = makeAs('w'),\n      asMonths = makeAs('M'),\n      asQuarters = makeAs('Q'),\n      asYears = makeAs('y');\n\n  function clone$1() {\n    return createDuration(this);\n  }\n\n  function get$2(units) {\n    units = normalizeUnits(units);\n    return this.isValid() ? this[units + 's']() : NaN;\n  }\n\n  function makeGetter(name) {\n    return function () {\n      return this.isValid() ? this._data[name] : NaN;\n    };\n  }\n\n  var milliseconds = makeGetter('milliseconds'),\n      seconds = makeGetter('seconds'),\n      minutes = makeGetter('minutes'),\n      hours = makeGetter('hours'),\n      days = makeGetter('days'),\n      months = makeGetter('months'),\n      years = makeGetter('years');\n\n  function weeks() {\n    return absFloor(this.days() / 7);\n  }\n\n  var round = Math.round,\n      thresholds = {\n    ss: 44,\n    // a few seconds to seconds\n    s: 45,\n    // seconds to minute\n    m: 45,\n    // minutes to hour\n    h: 22,\n    // hours to day\n    d: 26,\n    // days to month/week\n    w: null,\n    // weeks to month\n    M: 11 // months to year\n\n  }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n\n  function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n    return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n  }\n\n  function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n    var duration = createDuration(posNegDuration).abs(),\n        seconds = round(duration.as('s')),\n        minutes = round(duration.as('m')),\n        hours = round(duration.as('h')),\n        days = round(duration.as('d')),\n        months = round(duration.as('M')),\n        weeks = round(duration.as('w')),\n        years = round(duration.as('y')),\n        a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days];\n\n    if (thresholds.w != null) {\n      a = a || weeks <= 1 && ['w'] || weeks < thresholds.w && ['ww', weeks];\n    }\n\n    a = a || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years];\n    a[2] = withoutSuffix;\n    a[3] = +posNegDuration > 0;\n    a[4] = locale;\n    return substituteTimeAgo.apply(null, a);\n  } // This function allows you to set the rounding function for relative time strings\n\n\n  function getSetRelativeTimeRounding(roundingFunction) {\n    if (roundingFunction === undefined) {\n      return round;\n    }\n\n    if (typeof roundingFunction === 'function') {\n      round = roundingFunction;\n      return true;\n    }\n\n    return false;\n  } // This function allows you to set a threshold for relative time strings\n\n\n  function getSetRelativeTimeThreshold(threshold, limit) {\n    if (thresholds[threshold] === undefined) {\n      return false;\n    }\n\n    if (limit === undefined) {\n      return thresholds[threshold];\n    }\n\n    thresholds[threshold] = limit;\n\n    if (threshold === 's') {\n      thresholds.ss = limit - 1;\n    }\n\n    return true;\n  }\n\n  function humanize(argWithSuffix, argThresholds) {\n    if (!this.isValid()) {\n      return this.localeData().invalidDate();\n    }\n\n    var withSuffix = false,\n        th = thresholds,\n        locale,\n        output;\n\n    if (typeof argWithSuffix === 'object') {\n      argThresholds = argWithSuffix;\n      argWithSuffix = false;\n    }\n\n    if (typeof argWithSuffix === 'boolean') {\n      withSuffix = argWithSuffix;\n    }\n\n    if (typeof argThresholds === 'object') {\n      th = Object.assign({}, thresholds, argThresholds);\n\n      if (argThresholds.s != null && argThresholds.ss == null) {\n        th.ss = argThresholds.s - 1;\n      }\n    }\n\n    locale = this.localeData();\n    output = relativeTime$1(this, !withSuffix, th, locale);\n\n    if (withSuffix) {\n      output = locale.pastFuture(+this, output);\n    }\n\n    return locale.postformat(output);\n  }\n\n  var abs$1 = Math.abs;\n\n  function sign(x) {\n    return (x > 0) - (x < 0) || +x;\n  }\n\n  function toISOString$1() {\n    // for ISO strings we do not use the normal bubbling rules:\n    //  * milliseconds bubble up until they become hours\n    //  * days do not bubble at all\n    //  * months bubble up until they become years\n    // This is because there is no context-free conversion between hours and days\n    // (think of clock changes)\n    // and also not between days and months (28-31 days per month)\n    if (!this.isValid()) {\n      return this.localeData().invalidDate();\n    }\n\n    var seconds = abs$1(this._milliseconds) / 1000,\n        days = abs$1(this._days),\n        months = abs$1(this._months),\n        minutes,\n        hours,\n        years,\n        s,\n        total = this.asSeconds(),\n        totalSign,\n        ymSign,\n        daysSign,\n        hmsSign;\n\n    if (!total) {\n      // this is the same as C#'s (Noda) and python (isodate)...\n      // but not other JS (goog.date)\n      return 'P0D';\n    } // 3600 seconds -> 60 minutes -> 1 hour\n\n\n    minutes = absFloor(seconds / 60);\n    hours = absFloor(minutes / 60);\n    seconds %= 60;\n    minutes %= 60; // 12 months -> 1 year\n\n    years = absFloor(months / 12);\n    months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n\n    s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n    totalSign = total < 0 ? '-' : '';\n    ymSign = sign(this._months) !== sign(total) ? '-' : '';\n    daysSign = sign(this._days) !== sign(total) ? '-' : '';\n    hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n    return totalSign + 'P' + (years ? ymSign + years + 'Y' : '') + (months ? ymSign + months + 'M' : '') + (days ? daysSign + days + 'D' : '') + (hours || minutes || seconds ? 'T' : '') + (hours ? hmsSign + hours + 'H' : '') + (minutes ? hmsSign + minutes + 'M' : '') + (seconds ? hmsSign + s + 'S' : '');\n  }\n\n  var proto$2 = Duration.prototype;\n  proto$2.isValid = isValid$1;\n  proto$2.abs = abs;\n  proto$2.add = add$1;\n  proto$2.subtract = subtract$1;\n  proto$2.as = as;\n  proto$2.asMilliseconds = asMilliseconds;\n  proto$2.asSeconds = asSeconds;\n  proto$2.asMinutes = asMinutes;\n  proto$2.asHours = asHours;\n  proto$2.asDays = asDays;\n  proto$2.asWeeks = asWeeks;\n  proto$2.asMonths = asMonths;\n  proto$2.asQuarters = asQuarters;\n  proto$2.asYears = asYears;\n  proto$2.valueOf = valueOf$1;\n  proto$2._bubble = bubble;\n  proto$2.clone = clone$1;\n  proto$2.get = get$2;\n  proto$2.milliseconds = milliseconds;\n  proto$2.seconds = seconds;\n  proto$2.minutes = minutes;\n  proto$2.hours = hours;\n  proto$2.days = days;\n  proto$2.weeks = weeks;\n  proto$2.months = months;\n  proto$2.years = years;\n  proto$2.humanize = humanize;\n  proto$2.toISOString = toISOString$1;\n  proto$2.toString = toISOString$1;\n  proto$2.toJSON = toISOString$1;\n  proto$2.locale = locale;\n  proto$2.localeData = localeData;\n  proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\n  proto$2.lang = lang; // FORMATTING\n\n  addFormatToken('X', 0, 0, 'unix');\n  addFormatToken('x', 0, 0, 'valueOf'); // PARSING\n\n  addRegexToken('x', matchSigned);\n  addRegexToken('X', matchTimestamp);\n  addParseToken('X', function (input, array, config) {\n    config._d = new Date(parseFloat(input) * 1000);\n  });\n  addParseToken('x', function (input, array, config) {\n    config._d = new Date(toInt(input));\n  }); //! moment.js\n\n  hooks.version = '2.29.1';\n  setHookCallback(createLocal);\n  hooks.fn = proto;\n  hooks.min = min;\n  hooks.max = max;\n  hooks.now = now;\n  hooks.utc = createUTC;\n  hooks.unix = createUnix;\n  hooks.months = listMonths;\n  hooks.isDate = isDate;\n  hooks.locale = getSetGlobalLocale;\n  hooks.invalid = createInvalid;\n  hooks.duration = createDuration;\n  hooks.isMoment = isMoment;\n  hooks.weekdays = listWeekdays;\n  hooks.parseZone = createInZone;\n  hooks.localeData = getLocale;\n  hooks.isDuration = isDuration;\n  hooks.monthsShort = listMonthsShort;\n  hooks.weekdaysMin = listWeekdaysMin;\n  hooks.defineLocale = defineLocale;\n  hooks.updateLocale = updateLocale;\n  hooks.locales = listLocales;\n  hooks.weekdaysShort = listWeekdaysShort;\n  hooks.normalizeUnits = normalizeUnits;\n  hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n  hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n  hooks.calendarFormat = getCalendarFormat;\n  hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats\n\n  hooks.HTML5_FMT = {\n    DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm',\n    // <input type=\"datetime-local\" />\n    DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss',\n    // <input type=\"datetime-local\" step=\"1\" />\n    DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS',\n    // <input type=\"datetime-local\" step=\"0.001\" />\n    DATE: 'YYYY-MM-DD',\n    // <input type=\"date\" />\n    TIME: 'HH:mm',\n    // <input type=\"time\" />\n    TIME_SECONDS: 'HH:mm:ss',\n    // <input type=\"time\" step=\"1\" />\n    TIME_MS: 'HH:mm:ss.SSS',\n    // <input type=\"time\" step=\"0.001\" />\n    WEEK: 'GGGG-[W]WW',\n    // <input type=\"week\" />\n    MONTH: 'YYYY-MM' // <input type=\"month\" />\n\n  };\n  return hooks;\n});","map":null,"metadata":{},"sourceType":"script"}