moment.min.js 80 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020
  1. //! moment.js
  2. //! version : 2.14.1
  3. //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
  4. //! license : MIT
  5. //! momentjs.com
  6. ! function(a, b) {
  7. "object" == typeof exports && "undefined" != typeof module ? module.exports = b() : "function" == typeof define && define.amd ? define(b) : a.moment = b()
  8. }(this, function() {
  9. "use strict";
  10. function a() {
  11. return md.apply(null, arguments)
  12. }
  13. // This is done to register the method called with moment()
  14. // without creating circular dependencies.
  15. function b(a) {
  16. md = a
  17. }
  18. function c(a) {
  19. return a instanceof Array || "[object Array]" === Object.prototype.toString.call(a)
  20. }
  21. function d(a) {
  22. return "[object Object]" === Object.prototype.toString.call(a)
  23. }
  24. function e(a) {
  25. var b;
  26. for (b in a)
  27. // even if its not own property I'd still call it non-empty
  28. return !1;
  29. return !0
  30. }
  31. function f(a) {
  32. return a instanceof Date || "[object Date]" === Object.prototype.toString.call(a)
  33. }
  34. function g(a, b) {
  35. var c, d = [];
  36. for (c = 0; c < a.length; ++c) d.push(b(a[c], c));
  37. return d
  38. }
  39. function h(a, b) {
  40. return Object.prototype.hasOwnProperty.call(a, b)
  41. }
  42. function i(a, b) {
  43. for (var c in b) h(b, c) && (a[c] = b[c]);
  44. return h(b, "toString") && (a.toString = b.toString), h(b, "valueOf") && (a.valueOf = b.valueOf), a
  45. }
  46. function j(a, b, c, d) {
  47. return qb(a, b, c, d, !0).utc()
  48. }
  49. function k() {
  50. // We need to deep clone this object.
  51. return {
  52. empty: !1,
  53. unusedTokens: [],
  54. unusedInput: [],
  55. overflow: -2,
  56. charsLeftOver: 0,
  57. nullInput: !1,
  58. invalidMonth: null,
  59. invalidFormat: !1,
  60. userInvalidated: !1,
  61. iso: !1,
  62. parsedDateParts: [],
  63. meridiem: null
  64. }
  65. }
  66. function l(a) {
  67. return null == a._pf && (a._pf = k()), a._pf
  68. }
  69. function m(a) {
  70. if (null == a._isValid) {
  71. var b = l(a),
  72. c = nd.call(b.parsedDateParts, function(a) {
  73. return null != a
  74. });
  75. a._isValid = !isNaN(a._d.getTime()) && b.overflow < 0 && !b.empty && !b.invalidMonth && !b.invalidWeekday && !b.nullInput && !b.invalidFormat && !b.userInvalidated && (!b.meridiem || b.meridiem && c), a._strict && (a._isValid = a._isValid && 0 === b.charsLeftOver && 0 === b.unusedTokens.length && void 0 === b.bigHour)
  76. }
  77. return a._isValid
  78. }
  79. function n(a) {
  80. var b = j(NaN);
  81. return null != a ? i(l(b), a) : l(b).userInvalidated = !0, b
  82. }
  83. function o(a) {
  84. return void 0 === a
  85. }
  86. function p(a, b) {
  87. var c, d, e;
  88. if (o(b._isAMomentObject) || (a._isAMomentObject = b._isAMomentObject), o(b._i) || (a._i = b._i), o(b._f) || (a._f = b._f), o(b._l) || (a._l = b._l), o(b._strict) || (a._strict = b._strict), o(b._tzm) || (a._tzm = b._tzm), o(b._isUTC) || (a._isUTC = b._isUTC), o(b._offset) || (a._offset = b._offset), o(b._pf) || (a._pf = l(b)), o(b._locale) || (a._locale = b._locale), od.length > 0)
  89. for (c in od) d = od[c], e = b[d], o(e) || (a[d] = e);
  90. return a
  91. }
  92. // Moment prototype object
  93. function q(b) {
  94. p(this, b), this._d = new Date(null != b._d ? b._d.getTime() : NaN), pd === !1 && (pd = !0, a.updateOffset(this), pd = !1)
  95. }
  96. function r(a) {
  97. return a instanceof q || null != a && null != a._isAMomentObject
  98. }
  99. function s(a) {
  100. return 0 > a ? Math.ceil(a) || 0 : Math.floor(a)
  101. }
  102. function t(a) {
  103. var b = +a,
  104. c = 0;
  105. return 0 !== b && isFinite(b) && (c = s(b)), c
  106. }
  107. // compare two arrays, return the number of differences
  108. function u(a, b, c) {
  109. var d, e = Math.min(a.length, b.length),
  110. f = Math.abs(a.length - b.length),
  111. g = 0;
  112. for (d = 0; e > d; d++)(c && a[d] !== b[d] || !c && t(a[d]) !== t(b[d])) && g++;
  113. return g + f
  114. }
  115. function v(b) {
  116. a.suppressDeprecationWarnings === !1 && "undefined" != typeof console && console.warn && console.warn("Deprecation warning: " + b)
  117. }
  118. function w(b, c) {
  119. var d = !0;
  120. return i(function() {
  121. return null != a.deprecationHandler && a.deprecationHandler(null, b), d && (v(b + "\nArguments: " + Array.prototype.slice.call(arguments).join(", ") + "\n" + (new Error).stack), d = !1), c.apply(this, arguments)
  122. }, c)
  123. }
  124. function x(b, c) {
  125. null != a.deprecationHandler && a.deprecationHandler(b, c), qd[b] || (v(c), qd[b] = !0)
  126. }
  127. function y(a) {
  128. return a instanceof Function || "[object Function]" === Object.prototype.toString.call(a)
  129. }
  130. function z(a) {
  131. var b, c;
  132. for (c in a) b = a[c], y(b) ? this[c] = b : this["_" + c] = b;
  133. this._config = a,
  134. // Lenient ordinal parsing accepts just a number in addition to
  135. // number + (possibly) stuff coming from _ordinalParseLenient.
  136. this._ordinalParseLenient = new RegExp(this._ordinalParse.source + "|" + /\d{1,2}/.source)
  137. }
  138. function A(a, b) {
  139. var c, e = i({}, a);
  140. for (c in b) h(b, c) && (d(a[c]) && d(b[c]) ? (e[c] = {}, i(e[c], a[c]), i(e[c], b[c])) : null != b[c] ? e[c] = b[c] : delete e[c]);
  141. for (c in a) h(a, c) && !h(b, c) && d(a[c]) && (
  142. // make sure changes to properties don't modify parent config
  143. e[c] = i({}, e[c]));
  144. return e
  145. }
  146. function B(a) {
  147. null != a && this.set(a)
  148. }
  149. function C(a, b, c) {
  150. var d = this._calendar[a] || this._calendar.sameElse;
  151. return y(d) ? d.call(b, c) : d
  152. }
  153. function D(a) {
  154. var b = this._longDateFormat[a],
  155. c = this._longDateFormat[a.toUpperCase()];
  156. return b || !c ? b : (this._longDateFormat[a] = c.replace(/MMMM|MM|DD|dddd/g, function(a) {
  157. return a.slice(1)
  158. }), this._longDateFormat[a])
  159. }
  160. function E() {
  161. return this._invalidDate
  162. }
  163. function F(a) {
  164. return this._ordinal.replace("%d", a)
  165. }
  166. function G(a, b, c, d) {
  167. var e = this._relativeTime[c];
  168. return y(e) ? e(a, b, c, d) : e.replace(/%d/i, a)
  169. }
  170. function H(a, b) {
  171. var c = this._relativeTime[a > 0 ? "future" : "past"];
  172. return y(c) ? c(b) : c.replace(/%s/i, b)
  173. }
  174. function I(a, b) {
  175. var c = a.toLowerCase();
  176. zd[c] = zd[c + "s"] = zd[b] = a
  177. }
  178. function J(a) {
  179. return "string" == typeof a ? zd[a] || zd[a.toLowerCase()] : void 0
  180. }
  181. function K(a) {
  182. var b, c, d = {};
  183. for (c in a) h(a, c) && (b = J(c), b && (d[b] = a[c]));
  184. return d
  185. }
  186. function L(a, b) {
  187. Ad[a] = b
  188. }
  189. function M(a) {
  190. var b = [];
  191. for (var c in a) b.push({
  192. unit: c,
  193. priority: Ad[c]
  194. });
  195. return b.sort(function(a, b) {
  196. return a.priority - b.priority
  197. }), b
  198. }
  199. function N(b, c) {
  200. return function(d) {
  201. return null != d ? (P(this, b, d), a.updateOffset(this, c), this) : O(this, b)
  202. }
  203. }
  204. function O(a, b) {
  205. return a.isValid() ? a._d["get" + (a._isUTC ? "UTC" : "") + b]() : NaN
  206. }
  207. function P(a, b, c) {
  208. a.isValid() && a._d["set" + (a._isUTC ? "UTC" : "") + b](c)
  209. }
  210. // MOMENTS
  211. function Q(a) {
  212. return a = J(a), y(this[a]) ? this[a]() : this
  213. }
  214. function R(a, b) {
  215. if ("object" == typeof a) {
  216. a = K(a);
  217. for (var c = M(a), d = 0; d < c.length; d++) this[c[d].unit](a[c[d].unit])
  218. } else if (a = J(a), y(this[a])) return this[a](b);
  219. return this
  220. }
  221. function S(a, b, c) {
  222. var d = "" + Math.abs(a),
  223. e = b - d.length,
  224. f = a >= 0;
  225. return (f ? c ? "+" : "" : "-") + Math.pow(10, Math.max(0, e)).toString().substr(1) + d
  226. }
  227. // token: 'M'
  228. // padded: ['MM', 2]
  229. // ordinal: 'Mo'
  230. // callback: function () { this.month() + 1 }
  231. function T(a, b, c, d) {
  232. var e = d;
  233. "string" == typeof d && (e = function() {
  234. return this[d]()
  235. }), a && (Ed[a] = e), b && (Ed[b[0]] = function() {
  236. return S(e.apply(this, arguments), b[1], b[2])
  237. }), c && (Ed[c] = function() {
  238. return this.localeData().ordinal(e.apply(this, arguments), a)
  239. })
  240. }
  241. function U(a) {
  242. return a.match(/\[[\s\S]/) ? a.replace(/^\[|\]$/g, "") : a.replace(/\\/g, "")
  243. }
  244. function V(a) {
  245. var b, c, d = a.match(Bd);
  246. for (b = 0, c = d.length; c > b; b++) Ed[d[b]] ? d[b] = Ed[d[b]] : d[b] = U(d[b]);
  247. return function(b) {
  248. var e, f = "";
  249. for (e = 0; c > e; e++) f += d[e] instanceof Function ? d[e].call(b, a) : d[e];
  250. return f
  251. }
  252. }
  253. // format date using native date object
  254. function W(a, b) {
  255. return a.isValid() ? (b = X(b, a.localeData()), Dd[b] = Dd[b] || V(b), Dd[b](a)) : a.localeData().invalidDate()
  256. }
  257. function X(a, b) {
  258. function c(a) {
  259. return b.longDateFormat(a) || a
  260. }
  261. var d = 5;
  262. for (Cd.lastIndex = 0; d >= 0 && Cd.test(a);) a = a.replace(Cd, c), Cd.lastIndex = 0, d -= 1;
  263. return a
  264. }
  265. function Y(a, b, c) {
  266. Wd[a] = y(b) ? b : function(a, d) {
  267. return a && c ? c : b
  268. }
  269. }
  270. function Z(a, b) {
  271. return h(Wd, a) ? Wd[a](b._strict, b._locale) : new RegExp($(a))
  272. }
  273. // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
  274. function $(a) {
  275. return _(a.replace("\\", "").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function(a, b, c, d, e) {
  276. return b || c || d || e
  277. }))
  278. }
  279. function _(a) {
  280. return a.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&")
  281. }
  282. function aa(a, b) {
  283. var c, d = b;
  284. for ("string" == typeof a && (a = [a]), "number" == typeof b && (d = function(a, c) {
  285. c[b] = t(a)
  286. }), c = 0; c < a.length; c++) Xd[a[c]] = d
  287. }
  288. function ba(a, b) {
  289. aa(a, function(a, c, d, e) {
  290. d._w = d._w || {}, b(a, d._w, d, e)
  291. })
  292. }
  293. function ca(a, b, c) {
  294. null != b && h(Xd, a) && Xd[a](b, c._a, c, a)
  295. }
  296. function da(a, b) {
  297. return new Date(Date.UTC(a, b + 1, 0)).getUTCDate()
  298. }
  299. function ea(a, b) {
  300. return c(this._months) ? this._months[a.month()] : this._months[(this._months.isFormat || fe).test(b) ? "format" : "standalone"][a.month()]
  301. }
  302. function fa(a, b) {
  303. return c(this._monthsShort) ? this._monthsShort[a.month()] : this._monthsShort[fe.test(b) ? "format" : "standalone"][a.month()]
  304. }
  305. function ga(a, b, c) {
  306. var d, e, f, g = a.toLocaleLowerCase();
  307. if (!this._monthsParse)
  308. for (
  309. // this is not used
  310. this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], d = 0; 12 > d; ++d) f = j([2e3, d]), this._shortMonthsParse[d] = this.monthsShort(f, "").toLocaleLowerCase(), this._longMonthsParse[d] = this.months(f, "").toLocaleLowerCase();
  311. return c ? "MMM" === b ? (e = sd.call(this._shortMonthsParse, g), -1 !== e ? e : null) : (e = sd.call(this._longMonthsParse, g), -1 !== e ? e : null) : "MMM" === b ? (e = sd.call(this._shortMonthsParse, g), -1 !== e ? e : (e = sd.call(this._longMonthsParse, g), -1 !== e ? e : null)) : (e = sd.call(this._longMonthsParse, g), -1 !== e ? e : (e = sd.call(this._shortMonthsParse, g), -1 !== e ? e : null))
  312. }
  313. function ha(a, b, c) {
  314. var d, e, f;
  315. if (this._monthsParseExact) return ga.call(this, a, b, c);
  316. // TODO: add sorting
  317. // Sorting makes sure if one month (or abbr) is a prefix of another
  318. // see sorting in computeMonthsParse
  319. for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), d = 0; 12 > d; d++) {
  320. // test the regex
  321. if (e = j([2e3, d]), c && !this._longMonthsParse[d] && (this._longMonthsParse[d] = new RegExp("^" + this.months(e, "").replace(".", "") + "$", "i"), this._shortMonthsParse[d] = new RegExp("^" + this.monthsShort(e, "").replace(".", "") + "$", "i")), c || this._monthsParse[d] || (f = "^" + this.months(e, "") + "|^" + this.monthsShort(e, ""), this._monthsParse[d] = new RegExp(f.replace(".", ""), "i")), c && "MMMM" === b && this._longMonthsParse[d].test(a)) return d;
  322. if (c && "MMM" === b && this._shortMonthsParse[d].test(a)) return d;
  323. if (!c && this._monthsParse[d].test(a)) return d
  324. }
  325. }
  326. // MOMENTS
  327. function ia(a, b) {
  328. var c;
  329. if (!a.isValid())
  330. // No op
  331. return a;
  332. if ("string" == typeof b)
  333. if (/^\d+$/.test(b)) b = t(b);
  334. else
  335. // TODO: Another silent failure?
  336. if (b = a.localeData().monthsParse(b), "number" != typeof b) return a;
  337. return c = Math.min(a.date(), da(a.year(), b)), a._d["set" + (a._isUTC ? "UTC" : "") + "Month"](b, c), a
  338. }
  339. function ja(b) {
  340. return null != b ? (ia(this, b), a.updateOffset(this, !0), this) : O(this, "Month")
  341. }
  342. function ka() {
  343. return da(this.year(), this.month())
  344. }
  345. function la(a) {
  346. return this._monthsParseExact ? (h(this, "_monthsRegex") || na.call(this), a ? this._monthsShortStrictRegex : this._monthsShortRegex) : (h(this, "_monthsShortRegex") || (this._monthsShortRegex = ie), this._monthsShortStrictRegex && a ? this._monthsShortStrictRegex : this._monthsShortRegex)
  347. }
  348. function ma(a) {
  349. return this._monthsParseExact ? (h(this, "_monthsRegex") || na.call(this), a ? this._monthsStrictRegex : this._monthsRegex) : (h(this, "_monthsRegex") || (this._monthsRegex = je), this._monthsStrictRegex && a ? this._monthsStrictRegex : this._monthsRegex)
  350. }
  351. function na() {
  352. function a(a, b) {
  353. return b.length - a.length
  354. }
  355. var b, c, d = [],
  356. e = [],
  357. f = [];
  358. for (b = 0; 12 > b; b++) c = j([2e3, b]), d.push(this.monthsShort(c, "")), e.push(this.months(c, "")), f.push(this.months(c, "")), f.push(this.monthsShort(c, ""));
  359. for (
  360. // Sorting makes sure if one month (or abbr) is a prefix of another it
  361. // will match the longer piece.
  362. d.sort(a), e.sort(a), f.sort(a), b = 0; 12 > b; b++) d[b] = _(d[b]), e[b] = _(e[b]);
  363. for (b = 0; 24 > b; b++) f[b] = _(f[b]);
  364. this._monthsRegex = new RegExp("^(" + f.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp("^(" + e.join("|") + ")", "i"), this._monthsShortStrictRegex = new RegExp("^(" + d.join("|") + ")", "i")
  365. }
  366. // HELPERS
  367. function oa(a) {
  368. return pa(a) ? 366 : 365
  369. }
  370. function pa(a) {
  371. return a % 4 === 0 && a % 100 !== 0 || a % 400 === 0
  372. }
  373. function qa() {
  374. return pa(this.year())
  375. }
  376. function ra(a, b, c, d, e, f, g) {
  377. //can't just apply() to create a date:
  378. //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply
  379. var h = new Date(a, b, c, d, e, f, g);
  380. //the date constructor remaps years 0-99 to 1900-1999
  381. return 100 > a && a >= 0 && isFinite(h.getFullYear()) && h.setFullYear(a), h
  382. }
  383. function sa(a) {
  384. var b = new Date(Date.UTC.apply(null, arguments));
  385. //the Date.UTC function remaps years 0-99 to 1900-1999
  386. return 100 > a && a >= 0 && isFinite(b.getUTCFullYear()) && b.setUTCFullYear(a), b
  387. }
  388. // start-of-first-week - start-of-year
  389. function ta(a, b, c) {
  390. var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
  391. d = 7 + b - c,
  392. // first-week day local weekday -- which local weekday is fwd
  393. e = (7 + sa(a, 0, d).getUTCDay() - b) % 7;
  394. return -e + d - 1
  395. }
  396. //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
  397. function ua(a, b, c, d, e) {
  398. var f, g, h = (7 + c - d) % 7,
  399. i = ta(a, d, e),
  400. j = 1 + 7 * (b - 1) + h + i;
  401. return 0 >= j ? (f = a - 1, g = oa(f) + j) : j > oa(a) ? (f = a + 1, g = j - oa(a)) : (f = a, g = j), {
  402. year: f,
  403. dayOfYear: g
  404. }
  405. }
  406. function va(a, b, c) {
  407. var d, e, f = ta(a.year(), b, c),
  408. g = Math.floor((a.dayOfYear() - f - 1) / 7) + 1;
  409. return 1 > g ? (e = a.year() - 1, d = g + wa(e, b, c)) : g > wa(a.year(), b, c) ? (d = g - wa(a.year(), b, c), e = a.year() + 1) : (e = a.year(), d = g), {
  410. week: d,
  411. year: e
  412. }
  413. }
  414. function wa(a, b, c) {
  415. var d = ta(a, b, c),
  416. e = ta(a + 1, b, c);
  417. return (oa(a) - d + e) / 7
  418. }
  419. // HELPERS
  420. // LOCALES
  421. function xa(a) {
  422. return va(a, this._week.dow, this._week.doy).week
  423. }
  424. function ya() {
  425. return this._week.dow
  426. }
  427. function za() {
  428. return this._week.doy
  429. }
  430. // MOMENTS
  431. function Aa(a) {
  432. var b = this.localeData().week(this);
  433. return null == a ? b : this.add(7 * (a - b), "d")
  434. }
  435. function Ba(a) {
  436. var b = va(this, 1, 4).week;
  437. return null == a ? b : this.add(7 * (a - b), "d")
  438. }
  439. // HELPERS
  440. function Ca(a, b) {
  441. return "string" != typeof a ? a : isNaN(a) ? (a = b.weekdaysParse(a), "number" == typeof a ? a : null) : parseInt(a, 10)
  442. }
  443. function Da(a, b) {
  444. return "string" == typeof a ? b.weekdaysParse(a) % 7 || 7 : isNaN(a) ? null : a
  445. }
  446. function Ea(a, b) {
  447. return c(this._weekdays) ? this._weekdays[a.day()] : this._weekdays[this._weekdays.isFormat.test(b) ? "format" : "standalone"][a.day()]
  448. }
  449. function Fa(a) {
  450. return this._weekdaysShort[a.day()]
  451. }
  452. function Ga(a) {
  453. return this._weekdaysMin[a.day()]
  454. }
  455. function Ha(a, b, c) {
  456. var d, e, f, g = a.toLocaleLowerCase();
  457. if (!this._weekdaysParse)
  458. for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], d = 0; 7 > d; ++d) f = j([2e3, 1]).day(d), this._minWeekdaysParse[d] = this.weekdaysMin(f, "").toLocaleLowerCase(), this._shortWeekdaysParse[d] = this.weekdaysShort(f, "").toLocaleLowerCase(), this._weekdaysParse[d] = this.weekdays(f, "").toLocaleLowerCase();
  459. return c ? "dddd" === b ? (e = sd.call(this._weekdaysParse, g), -1 !== e ? e : null) : "ddd" === b ? (e = sd.call(this._shortWeekdaysParse, g), -1 !== e ? e : null) : (e = sd.call(this._minWeekdaysParse, g), -1 !== e ? e : null) : "dddd" === b ? (e = sd.call(this._weekdaysParse, g), -1 !== e ? e : (e = sd.call(this._shortWeekdaysParse, g), -1 !== e ? e : (e = sd.call(this._minWeekdaysParse, g), -1 !== e ? e : null))) : "ddd" === b ? (e = sd.call(this._shortWeekdaysParse, g), -1 !== e ? e : (e = sd.call(this._weekdaysParse, g), -1 !== e ? e : (e = sd.call(this._minWeekdaysParse, g), -1 !== e ? e : null))) : (e = sd.call(this._minWeekdaysParse, g), -1 !== e ? e : (e = sd.call(this._weekdaysParse, g), -1 !== e ? e : (e = sd.call(this._shortWeekdaysParse, g), -1 !== e ? e : null)))
  460. }
  461. function Ia(a, b, c) {
  462. var d, e, f;
  463. if (this._weekdaysParseExact) return Ha.call(this, a, b, c);
  464. for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), d = 0; 7 > d; d++) {
  465. // test the regex
  466. if (e = j([2e3, 1]).day(d), c && !this._fullWeekdaysParse[d] && (this._fullWeekdaysParse[d] = new RegExp("^" + this.weekdays(e, "").replace(".", ".?") + "$", "i"), this._shortWeekdaysParse[d] = new RegExp("^" + this.weekdaysShort(e, "").replace(".", ".?") + "$", "i"), this._minWeekdaysParse[d] = new RegExp("^" + this.weekdaysMin(e, "").replace(".", ".?") + "$", "i")), this._weekdaysParse[d] || (f = "^" + this.weekdays(e, "") + "|^" + this.weekdaysShort(e, "") + "|^" + this.weekdaysMin(e, ""), this._weekdaysParse[d] = new RegExp(f.replace(".", ""), "i")), c && "dddd" === b && this._fullWeekdaysParse[d].test(a)) return d;
  467. if (c && "ddd" === b && this._shortWeekdaysParse[d].test(a)) return d;
  468. if (c && "dd" === b && this._minWeekdaysParse[d].test(a)) return d;
  469. if (!c && this._weekdaysParse[d].test(a)) return d
  470. }
  471. }
  472. // MOMENTS
  473. function Ja(a) {
  474. if (!this.isValid()) return null != a ? this : NaN;
  475. var b = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
  476. return null != a ? (a = Ca(a, this.localeData()), this.add(a - b, "d")) : b
  477. }
  478. function Ka(a) {
  479. if (!this.isValid()) return null != a ? this : NaN;
  480. var b = (this.day() + 7 - this.localeData()._week.dow) % 7;
  481. return null == a ? b : this.add(a - b, "d")
  482. }
  483. function La(a) {
  484. if (!this.isValid()) return null != a ? this : NaN;
  485. // behaves the same as moment#day except
  486. // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
  487. // as a setter, sunday should belong to the previous week.
  488. if (null != a) {
  489. var b = Da(a, this.localeData());
  490. return this.day(this.day() % 7 ? b : b - 7)
  491. }
  492. return this.day() || 7
  493. }
  494. function Ma(a) {
  495. return this._weekdaysParseExact ? (h(this, "_weekdaysRegex") || Pa.call(this), a ? this._weekdaysStrictRegex : this._weekdaysRegex) : (h(this, "_weekdaysRegex") || (this._weekdaysRegex = pe), this._weekdaysStrictRegex && a ? this._weekdaysStrictRegex : this._weekdaysRegex)
  496. }
  497. function Na(a) {
  498. return this._weekdaysParseExact ? (h(this, "_weekdaysRegex") || Pa.call(this), a ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (h(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = qe), this._weekdaysShortStrictRegex && a ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex)
  499. }
  500. function Oa(a) {
  501. return this._weekdaysParseExact ? (h(this, "_weekdaysRegex") || Pa.call(this), a ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (h(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = re), this._weekdaysMinStrictRegex && a ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex)
  502. }
  503. function Pa() {
  504. function a(a, b) {
  505. return b.length - a.length
  506. }
  507. var b, c, d, e, f, g = [],
  508. h = [],
  509. i = [],
  510. k = [];
  511. for (b = 0; 7 > b; b++) c = j([2e3, 1]).day(b), d = this.weekdaysMin(c, ""), e = this.weekdaysShort(c, ""), f = this.weekdays(c, ""), g.push(d), h.push(e), i.push(f), k.push(d), k.push(e), k.push(f);
  512. for (
  513. // Sorting makes sure if one weekday (or abbr) is a prefix of another it
  514. // will match the longer piece.
  515. g.sort(a), h.sort(a), i.sort(a), k.sort(a), b = 0; 7 > b; b++) h[b] = _(h[b]), i[b] = _(i[b]), k[b] = _(k[b]);
  516. this._weekdaysRegex = new RegExp("^(" + k.join("|") + ")", "i"), this._weekdaysShortRegex = this._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp("^(" + i.join("|") + ")", "i"), this._weekdaysShortStrictRegex = new RegExp("^(" + h.join("|") + ")", "i"), this._weekdaysMinStrictRegex = new RegExp("^(" + g.join("|") + ")", "i")
  517. }
  518. // FORMATTING
  519. function Qa() {
  520. return this.hours() % 12 || 12
  521. }
  522. function Ra() {
  523. return this.hours() || 24
  524. }
  525. function Sa(a, b) {
  526. T(a, 0, 0, function() {
  527. return this.localeData().meridiem(this.hours(), this.minutes(), b)
  528. })
  529. }
  530. // PARSING
  531. function Ta(a, b) {
  532. return b._meridiemParse
  533. }
  534. // LOCALES
  535. function Ua(a) {
  536. // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
  537. // Using charAt should be more compatible.
  538. return "p" === (a + "").toLowerCase().charAt(0)
  539. }
  540. function Va(a, b, c) {
  541. return a > 11 ? c ? "pm" : "PM" : c ? "am" : "AM"
  542. }
  543. function Wa(a) {
  544. return a ? a.toLowerCase().replace("_", "-") : a
  545. }
  546. // pick the locale from the array
  547. // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
  548. // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
  549. function Xa(a) {
  550. for (var b, c, d, e, f = 0; f < a.length;) {
  551. for (e = Wa(a[f]).split("-"), b = e.length, c = Wa(a[f + 1]), c = c ? c.split("-") : null; b > 0;) {
  552. if (d = Ya(e.slice(0, b).join("-"))) return d;
  553. if (c && c.length >= b && u(e, c, !0) >= b - 1)
  554. //the next array item is better than a shallower substring of this one
  555. break;
  556. b--
  557. }
  558. f++
  559. }
  560. return null
  561. }
  562. function Ya(a) {
  563. var b = null;
  564. // TODO: Find a better way to register and load all the locales in Node
  565. if (!we[a] && "undefined" != typeof module && module && module.exports) try {
  566. b = se._abbr, require("./locale/" + a),
  567. // because defineLocale currently also sets the global locale, we
  568. // want to undo that for lazy loaded locales
  569. Za(b)
  570. } catch (c) {}
  571. return we[a]
  572. }
  573. // This function will load locale and then set the global locale. If
  574. // no arguments are passed in, it will simply return the current global
  575. // locale key.
  576. function Za(a, b) {
  577. var c;
  578. // moment.duration._locale = moment._locale = data;
  579. return a && (c = o(b) ? ab(a) : $a(a, b), c && (se = c)), se._abbr
  580. }
  581. function $a(a, b) {
  582. if (null !== b) {
  583. var c = ve;
  584. // treat as if there is no base config
  585. // backwards compat for now: also set the locale
  586. return b.abbr = a, null != we[a] ? (x("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."), c = we[a]._config) : null != b.parentLocale && (null != we[b.parentLocale] ? c = we[b.parentLocale]._config : x("parentLocaleUndefined", "specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/")), we[a] = new B(A(c, b)), Za(a), we[a]
  587. }
  588. // useful for testing
  589. return delete we[a], null
  590. }
  591. function _a(a, b) {
  592. if (null != b) {
  593. var c, d = ve;
  594. // MERGE
  595. null != we[a] && (d = we[a]._config), b = A(d, b), c = new B(b), c.parentLocale = we[a], we[a] = c,
  596. // backwards compat for now: also set the locale
  597. Za(a)
  598. } else
  599. // pass null for config to unupdate, useful for tests
  600. null != we[a] && (null != we[a].parentLocale ? we[a] = we[a].parentLocale : null != we[a] && delete we[a]);
  601. return we[a]
  602. }
  603. // returns locale data
  604. function ab(a) {
  605. var b;
  606. if (a && a._locale && a._locale._abbr && (a = a._locale._abbr), !a) return se;
  607. if (!c(a)) {
  608. if (b = Ya(a)) return b;
  609. a = [a]
  610. }
  611. return Xa(a)
  612. }
  613. function bb() {
  614. return rd(we)
  615. }
  616. function cb(a) {
  617. var b, c = a._a;
  618. return c && -2 === l(a).overflow && (b = c[Zd] < 0 || c[Zd] > 11 ? Zd : c[$d] < 1 || c[$d] > da(c[Yd], c[Zd]) ? $d : c[_d] < 0 || c[_d] > 24 || 24 === c[_d] && (0 !== c[ae] || 0 !== c[be] || 0 !== c[ce]) ? _d : c[ae] < 0 || c[ae] > 59 ? ae : c[be] < 0 || c[be] > 59 ? be : c[ce] < 0 || c[ce] > 999 ? ce : -1, l(a)._overflowDayOfYear && (Yd > b || b > $d) && (b = $d), l(a)._overflowWeeks && -1 === b && (b = de), l(a)._overflowWeekday && -1 === b && (b = ee), l(a).overflow = b), a
  619. }
  620. // date from iso format
  621. function db(a) {
  622. var b, c, d, e, f, g, h = a._i,
  623. i = xe.exec(h) || ye.exec(h);
  624. if (i) {
  625. for (l(a).iso = !0, b = 0, c = Ae.length; c > b; b++)
  626. if (Ae[b][1].exec(i[1])) {
  627. e = Ae[b][0], d = Ae[b][2] !== !1;
  628. break
  629. }
  630. if (null == e) return void(a._isValid = !1);
  631. if (i[3]) {
  632. for (b = 0, c = Be.length; c > b; b++)
  633. if (Be[b][1].exec(i[3])) {
  634. // match[2] should be 'T' or space
  635. f = (i[2] || " ") + Be[b][0];
  636. break
  637. }
  638. if (null == f) return void(a._isValid = !1)
  639. }
  640. if (!d && null != f) return void(a._isValid = !1);
  641. if (i[4]) {
  642. if (!ze.exec(i[4])) return void(a._isValid = !1);
  643. g = "Z"
  644. }
  645. a._f = e + (f || "") + (g || ""), jb(a)
  646. } else a._isValid = !1
  647. }
  648. // date from iso format or fallback
  649. function eb(b) {
  650. var c = Ce.exec(b._i);
  651. return null !== c ? void(b._d = new Date(+c[1])) : (db(b), void(b._isValid === !1 && (delete b._isValid, a.createFromInputFallback(b))))
  652. }
  653. // Pick the first defined of two or three arguments.
  654. function fb(a, b, c) {
  655. return null != a ? a : null != b ? b : c
  656. }
  657. function gb(b) {
  658. // hooks is actually the exported moment object
  659. var c = new Date(a.now());
  660. return b._useUTC ? [c.getUTCFullYear(), c.getUTCMonth(), c.getUTCDate()] : [c.getFullYear(), c.getMonth(), c.getDate()]
  661. }
  662. // convert an array to a date.
  663. // the array should mirror the parameters below
  664. // note: all values past the year are optional and will default to the lowest possible value.
  665. // [year, month, day , hour, minute, second, millisecond]
  666. function hb(a) {
  667. var b, c, d, e, f = [];
  668. if (!a._d) {
  669. // Default to current date.
  670. // * if no year, month, day of month are given, default to today
  671. // * if day of month is given, default month and year
  672. // * if month is given, default only year
  673. // * if year is given, don't default anything
  674. for (d = gb(a), a._w && null == a._a[$d] && null == a._a[Zd] && ib(a), a._dayOfYear && (e = fb(a._a[Yd], d[Yd]), a._dayOfYear > oa(e) && (l(a)._overflowDayOfYear = !0), c = sa(e, 0, a._dayOfYear), a._a[Zd] = c.getUTCMonth(), a._a[$d] = c.getUTCDate()), b = 0; 3 > b && null == a._a[b]; ++b) a._a[b] = f[b] = d[b];
  675. // Zero out whatever was not defaulted, including time
  676. for (; 7 > b; b++) a._a[b] = f[b] = null == a._a[b] ? 2 === b ? 1 : 0 : a._a[b];
  677. // Check for 24:00:00.000
  678. 24 === a._a[_d] && 0 === a._a[ae] && 0 === a._a[be] && 0 === a._a[ce] && (a._nextDay = !0, a._a[_d] = 0), a._d = (a._useUTC ? sa : ra).apply(null, f),
  679. // Apply timezone offset from input. The actual utcOffset can be changed
  680. // with parseZone.
  681. null != a._tzm && a._d.setUTCMinutes(a._d.getUTCMinutes() - a._tzm), a._nextDay && (a._a[_d] = 24)
  682. }
  683. }
  684. function ib(a) {
  685. var b, c, d, e, f, g, h, i;
  686. b = a._w, null != b.GG || null != b.W || null != b.E ? (f = 1, g = 4, c = fb(b.GG, a._a[Yd], va(rb(), 1, 4).year), d = fb(b.W, 1), e = fb(b.E, 1), (1 > e || e > 7) && (i = !0)) : (f = a._locale._week.dow, g = a._locale._week.doy, c = fb(b.gg, a._a[Yd], va(rb(), f, g).year), d = fb(b.w, 1), null != b.d ? (e = b.d, (0 > e || e > 6) && (i = !0)) : null != b.e ? (e = b.e + f, (b.e < 0 || b.e > 6) && (i = !0)) : e = f), 1 > d || d > wa(c, f, g) ? l(a)._overflowWeeks = !0 : null != i ? l(a)._overflowWeekday = !0 : (h = ua(c, d, e, f, g), a._a[Yd] = h.year, a._dayOfYear = h.dayOfYear)
  687. }
  688. // date from string and format string
  689. function jb(b) {
  690. // TODO: Move this to another part of the creation flow to prevent circular deps
  691. if (b._f === a.ISO_8601) return void db(b);
  692. b._a = [], l(b).empty = !0;
  693. // This array is used to make a Date, either with `new Date` or `Date.UTC`
  694. var c, d, e, f, g, h = "" + b._i,
  695. i = h.length,
  696. j = 0;
  697. for (e = X(b._f, b._locale).match(Bd) || [], c = 0; c < e.length; c++) f = e[c], d = (h.match(Z(f, b)) || [])[0], d && (g = h.substr(0, h.indexOf(d)), g.length > 0 && l(b).unusedInput.push(g), h = h.slice(h.indexOf(d) + d.length), j += d.length), Ed[f] ? (d ? l(b).empty = !1 : l(b).unusedTokens.push(f), ca(f, d, b)) : b._strict && !d && l(b).unusedTokens.push(f);
  698. // add remaining unparsed input length to the string
  699. l(b).charsLeftOver = i - j, h.length > 0 && l(b).unusedInput.push(h),
  700. // clear _12h flag if hour is <= 12
  701. b._a[_d] <= 12 && l(b).bigHour === !0 && b._a[_d] > 0 && (l(b).bigHour = void 0), l(b).parsedDateParts = b._a.slice(0), l(b).meridiem = b._meridiem,
  702. // handle meridiem
  703. b._a[_d] = kb(b._locale, b._a[_d], b._meridiem), hb(b), cb(b)
  704. }
  705. function kb(a, b, c) {
  706. var d;
  707. // Fallback
  708. return null == c ? b : null != a.meridiemHour ? a.meridiemHour(b, c) : null != a.isPM ? (d = a.isPM(c), d && 12 > b && (b += 12), d || 12 !== b || (b = 0), b) : b
  709. }
  710. // date from string and array of format strings
  711. function lb(a) {
  712. var b, c, d, e, f;
  713. if (0 === a._f.length) return l(a).invalidFormat = !0, void(a._d = new Date(NaN));
  714. for (e = 0; e < a._f.length; e++) f = 0, b = p({}, a), null != a._useUTC && (b._useUTC = a._useUTC), b._f = a._f[e], jb(b), m(b) && (f += l(b).charsLeftOver, f += 10 * l(b).unusedTokens.length, l(b).score = f, (null == d || d > f) && (d = f, c = b));
  715. i(a, c || b)
  716. }
  717. function mb(a) {
  718. if (!a._d) {
  719. var b = K(a._i);
  720. a._a = g([b.year, b.month, b.day || b.date, b.hour, b.minute, b.second, b.millisecond], function(a) {
  721. return a && parseInt(a, 10)
  722. }), hb(a)
  723. }
  724. }
  725. function nb(a) {
  726. var b = new q(cb(ob(a)));
  727. // Adding is smart enough around DST
  728. return b._nextDay && (b.add(1, "d"), b._nextDay = void 0), b
  729. }
  730. function ob(a) {
  731. var b = a._i,
  732. d = a._f;
  733. return a._locale = a._locale || ab(a._l), null === b || void 0 === d && "" === b ? n({
  734. nullInput: !0
  735. }) : ("string" == typeof b && (a._i = b = a._locale.preparse(b)), r(b) ? new q(cb(b)) : (c(d) ? lb(a) : f(b) ? a._d = b : d ? jb(a) : pb(a), m(a) || (a._d = null), a))
  736. }
  737. function pb(b) {
  738. var d = b._i;
  739. void 0 === d ? b._d = new Date(a.now()) : f(d) ? b._d = new Date(d.valueOf()) : "string" == typeof d ? eb(b) : c(d) ? (b._a = g(d.slice(0), function(a) {
  740. return parseInt(a, 10)
  741. }), hb(b)) : "object" == typeof d ? mb(b) : "number" == typeof d ?
  742. // from milliseconds
  743. b._d = new Date(d) : a.createFromInputFallback(b)
  744. }
  745. function qb(a, b, f, g, h) {
  746. var i = {};
  747. // object construction must be done this way.
  748. // https://github.com/moment/moment/issues/1423
  749. return "boolean" == typeof f && (g = f, f = void 0), (d(a) && e(a) || c(a) && 0 === a.length) && (a = void 0), i._isAMomentObject = !0, i._useUTC = i._isUTC = h, i._l = f, i._i = a, i._f = b, i._strict = g, nb(i)
  750. }
  751. function rb(a, b, c, d) {
  752. return qb(a, b, c, d, !1)
  753. }
  754. // Pick a moment m from moments so that m[fn](other) is true for all
  755. // other. This relies on the function fn to be transitive.
  756. //
  757. // moments should either be an array of moment objects or an array, whose
  758. // first element is an array of moment objects.
  759. function sb(a, b) {
  760. var d, e;
  761. if (1 === b.length && c(b[0]) && (b = b[0]), !b.length) return rb();
  762. for (d = b[0], e = 1; e < b.length; ++e) b[e].isValid() && !b[e][a](d) || (d = b[e]);
  763. return d
  764. }
  765. // TODO: Use [].sort instead?
  766. function tb() {
  767. var a = [].slice.call(arguments, 0);
  768. return sb("isBefore", a)
  769. }
  770. function ub() {
  771. var a = [].slice.call(arguments, 0);
  772. return sb("isAfter", a)
  773. }
  774. function vb(a) {
  775. var b = K(a),
  776. c = b.year || 0,
  777. d = b.quarter || 0,
  778. e = b.month || 0,
  779. f = b.week || 0,
  780. g = b.day || 0,
  781. h = b.hour || 0,
  782. i = b.minute || 0,
  783. j = b.second || 0,
  784. k = b.millisecond || 0;
  785. // representation for dateAddRemove
  786. this._milliseconds = +k + 1e3 * j + // 1000
  787. 6e4 * i + // 1000 * 60
  788. 1e3 * h * 60 * 60, //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
  789. // Because of dateAddRemove treats 24 hours as different from a
  790. // day when working around DST, we need to store them separately
  791. this._days = +g + 7 * f,
  792. // It is impossible translate months into days without knowing
  793. // which months you are are talking about, so we have to store
  794. // it separately.
  795. this._months = +e + 3 * d + 12 * c, this._data = {}, this._locale = ab(), this._bubble()
  796. }
  797. function wb(a) {
  798. return a instanceof vb
  799. }
  800. // FORMATTING
  801. function xb(a, b) {
  802. T(a, 0, 0, function() {
  803. var a = this.utcOffset(),
  804. c = "+";
  805. return 0 > a && (a = -a, c = "-"), c + S(~~(a / 60), 2) + b + S(~~a % 60, 2)
  806. })
  807. }
  808. function yb(a, b) {
  809. var c = (b || "").match(a) || [],
  810. d = c[c.length - 1] || [],
  811. e = (d + "").match(Ge) || ["-", 0, 0],
  812. f = +(60 * e[1]) + t(e[2]);
  813. return "+" === e[0] ? f : -f
  814. }
  815. // Return a moment from input, that is local/utc/zone equivalent to model.
  816. function zb(b, c) {
  817. var d, e;
  818. // Use low-level api, because this fn is low-level api.
  819. return c._isUTC ? (d = c.clone(), e = (r(b) || f(b) ? b.valueOf() : rb(b).valueOf()) - d.valueOf(), d._d.setTime(d._d.valueOf() + e), a.updateOffset(d, !1), d) : rb(b).local()
  820. }
  821. function Ab(a) {
  822. // On Firefox.24 Date#getTimezoneOffset returns a floating point.
  823. // https://github.com/moment/moment/pull/1871
  824. return 15 * -Math.round(a._d.getTimezoneOffset() / 15)
  825. }
  826. // MOMENTS
  827. // keepLocalTime = true means only change the timezone, without
  828. // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
  829. // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
  830. // +0200, so we adjust the time as needed, to be valid.
  831. //
  832. // Keeping the time actually adds/subtracts (one hour)
  833. // from the actual represented time. That is why we call updateOffset
  834. // a second time. In case it wants us to change the offset again
  835. // _changeInProgress == true case, then we have to adjust, because
  836. // there is no such time in the given timezone.
  837. function Bb(b, c) {
  838. var d, e = this._offset || 0;
  839. return this.isValid() ? null != b ? ("string" == typeof b ? b = yb(Td, b) : Math.abs(b) < 16 && (b = 60 * b), !this._isUTC && c && (d = Ab(this)), this._offset = b, this._isUTC = !0, null != d && this.add(d, "m"), e !== b && (!c || this._changeInProgress ? Sb(this, Mb(b - e, "m"), 1, !1) : this._changeInProgress || (this._changeInProgress = !0, a.updateOffset(this, !0), this._changeInProgress = null)), this) : this._isUTC ? e : Ab(this) : null != b ? this : NaN
  840. }
  841. function Cb(a, b) {
  842. return null != a ? ("string" != typeof a && (a = -a), this.utcOffset(a, b), this) : -this.utcOffset()
  843. }
  844. function Db(a) {
  845. return this.utcOffset(0, a)
  846. }
  847. function Eb(a) {
  848. return this._isUTC && (this.utcOffset(0, a), this._isUTC = !1, a && this.subtract(Ab(this), "m")), this
  849. }
  850. function Fb() {
  851. return this._tzm ? this.utcOffset(this._tzm) : "string" == typeof this._i && this.utcOffset(yb(Sd, this._i)), this
  852. }
  853. function Gb(a) {
  854. return this.isValid() ? (a = a ? rb(a).utcOffset() : 0, (this.utcOffset() - a) % 60 === 0) : !1
  855. }
  856. function Hb() {
  857. return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset()
  858. }
  859. function Ib() {
  860. if (!o(this._isDSTShifted)) return this._isDSTShifted;
  861. var a = {};
  862. if (p(a, this), a = ob(a), a._a) {
  863. var b = a._isUTC ? j(a._a) : rb(a._a);
  864. this._isDSTShifted = this.isValid() && u(a._a, b.toArray()) > 0
  865. } else this._isDSTShifted = !1;
  866. return this._isDSTShifted
  867. }
  868. function Jb() {
  869. return this.isValid() ? !this._isUTC : !1
  870. }
  871. function Kb() {
  872. return this.isValid() ? this._isUTC : !1
  873. }
  874. function Lb() {
  875. return this.isValid() ? this._isUTC && 0 === this._offset : !1
  876. }
  877. function Mb(a, b) {
  878. var c, d, e, f = a,
  879. // matching against regexp is expensive, do it on demand
  880. g = null; // checks for null or undefined
  881. return wb(a) ? f = {
  882. ms: a._milliseconds,
  883. d: a._days,
  884. M: a._months
  885. } : "number" == typeof a ? (f = {}, b ? f[b] = a : f.milliseconds = a) : (g = He.exec(a)) ? (c = "-" === g[1] ? -1 : 1, f = {
  886. y: 0,
  887. d: t(g[$d]) * c,
  888. h: t(g[_d]) * c,
  889. m: t(g[ae]) * c,
  890. s: t(g[be]) * c,
  891. ms: t(g[ce]) * c
  892. }) : (g = Ie.exec(a)) ? (c = "-" === g[1] ? -1 : 1, f = {
  893. y: Nb(g[2], c),
  894. M: Nb(g[3], c),
  895. w: Nb(g[4], c),
  896. d: Nb(g[5], c),
  897. h: Nb(g[6], c),
  898. m: Nb(g[7], c),
  899. s: Nb(g[8], c)
  900. }) : null == f ? f = {} : "object" == typeof f && ("from" in f || "to" in f) && (e = Pb(rb(f.from), rb(f.to)), f = {}, f.ms = e.milliseconds, f.M = e.months), d = new vb(f), wb(a) && h(a, "_locale") && (d._locale = a._locale), d
  901. }
  902. function Nb(a, b) {
  903. // We'd normally use ~~inp for this, but unfortunately it also
  904. // converts floats to ints.
  905. // inp may be undefined, so careful calling replace on it.
  906. var c = a && parseFloat(a.replace(",", "."));
  907. // apply sign while we're at it
  908. return (isNaN(c) ? 0 : c) * b
  909. }
  910. function Ob(a, b) {
  911. var c = {
  912. milliseconds: 0,
  913. months: 0
  914. };
  915. return c.months = b.month() - a.month() + 12 * (b.year() - a.year()), a.clone().add(c.months, "M").isAfter(b) && --c.months, c.milliseconds = +b - +a.clone().add(c.months, "M"), c
  916. }
  917. function Pb(a, b) {
  918. var c;
  919. return a.isValid() && b.isValid() ? (b = zb(b, a), a.isBefore(b) ? c = Ob(a, b) : (c = Ob(b, a), c.milliseconds = -c.milliseconds, c.months = -c.months), c) : {
  920. milliseconds: 0,
  921. months: 0
  922. }
  923. }
  924. function Qb(a) {
  925. return 0 > a ? -1 * Math.round(-1 * a) : Math.round(a)
  926. }
  927. // TODO: remove 'name' arg after deprecation is removed
  928. function Rb(a, b) {
  929. return function(c, d) {
  930. var e, f;
  931. //invert the arguments, but complain about it
  932. return null === d || isNaN(+d) || (x(b, "moment()." + b + "(period, number) is deprecated. Please use moment()." + b + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."), f = c, c = d, d = f), c = "string" == typeof c ? +c : c, e = Mb(c, d), Sb(this, e, a), this
  933. }
  934. }
  935. function Sb(b, c, d, e) {
  936. var f = c._milliseconds,
  937. g = Qb(c._days),
  938. h = Qb(c._months);
  939. b.isValid() && (e = null == e ? !0 : e, f && b._d.setTime(b._d.valueOf() + f * d), g && P(b, "Date", O(b, "Date") + g * d), h && ia(b, O(b, "Month") + h * d), e && a.updateOffset(b, g || h))
  940. }
  941. function Tb(a, b) {
  942. var c = a.diff(b, "days", !0);
  943. return -6 > c ? "sameElse" : -1 > c ? "lastWeek" : 0 > c ? "lastDay" : 1 > c ? "sameDay" : 2 > c ? "nextDay" : 7 > c ? "nextWeek" : "sameElse"
  944. }
  945. function Ub(b, c) {
  946. // We want to compare the start of today, vs this.
  947. // Getting start-of-today depends on whether we're local/utc/offset or not.
  948. var d = b || rb(),
  949. e = zb(d, this).startOf("day"),
  950. f = a.calendarFormat(this, e) || "sameElse",
  951. g = c && (y(c[f]) ? c[f].call(this, d) : c[f]);
  952. return this.format(g || this.localeData().calendar(f, this, rb(d)))
  953. }
  954. function Vb() {
  955. return new q(this)
  956. }
  957. function Wb(a, b) {
  958. var c = r(a) ? a : rb(a);
  959. return this.isValid() && c.isValid() ? (b = J(o(b) ? "millisecond" : b), "millisecond" === b ? this.valueOf() > c.valueOf() : c.valueOf() < this.clone().startOf(b).valueOf()) : !1
  960. }
  961. function Xb(a, b) {
  962. var c = r(a) ? a : rb(a);
  963. return this.isValid() && c.isValid() ? (b = J(o(b) ? "millisecond" : b), "millisecond" === b ? this.valueOf() < c.valueOf() : this.clone().endOf(b).valueOf() < c.valueOf()) : !1
  964. }
  965. function Yb(a, b, c, d) {
  966. return d = d || "()", ("(" === d[0] ? this.isAfter(a, c) : !this.isBefore(a, c)) && (")" === d[1] ? this.isBefore(b, c) : !this.isAfter(b, c))
  967. }
  968. function Zb(a, b) {
  969. var c, d = r(a) ? a : rb(a);
  970. return this.isValid() && d.isValid() ? (b = J(b || "millisecond"), "millisecond" === b ? this.valueOf() === d.valueOf() : (c = d.valueOf(), this.clone().startOf(b).valueOf() <= c && c <= this.clone().endOf(b).valueOf())) : !1
  971. }
  972. function $b(a, b) {
  973. return this.isSame(a, b) || this.isAfter(a, b)
  974. }
  975. function _b(a, b) {
  976. return this.isSame(a, b) || this.isBefore(a, b)
  977. }
  978. function ac(a, b, c) {
  979. var d, e, f, g; // 1000
  980. // 1000 * 60
  981. // 1000 * 60 * 60
  982. // 1000 * 60 * 60 * 24, negate dst
  983. // 1000 * 60 * 60 * 24 * 7, negate dst
  984. return this.isValid() ? (d = zb(a, this), d.isValid() ? (e = 6e4 * (d.utcOffset() - this.utcOffset()), b = J(b), "year" === b || "month" === b || "quarter" === b ? (g = bc(this, d), "quarter" === b ? g /= 3 : "year" === b && (g /= 12)) : (f = this - d, g = "second" === b ? f / 1e3 : "minute" === b ? f / 6e4 : "hour" === b ? f / 36e5 : "day" === b ? (f - e) / 864e5 : "week" === b ? (f - e) / 6048e5 : f), c ? g : s(g)) : NaN) : NaN
  985. }
  986. function bc(a, b) {
  987. // difference in months
  988. var c, d, e = 12 * (b.year() - a.year()) + (b.month() - a.month()),
  989. // b is in (anchor - 1 month, anchor + 1 month)
  990. f = a.clone().add(e, "months");
  991. //check for negative zero, return zero if negative zero
  992. // linear across the month
  993. // linear across the month
  994. return 0 > b - f ? (c = a.clone().add(e - 1, "months"), d = (b - f) / (f - c)) : (c = a.clone().add(e + 1, "months"), d = (b - f) / (c - f)), -(e + d) || 0
  995. }
  996. function cc() {
  997. return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")
  998. }
  999. function dc() {
  1000. var a = this.clone().utc();
  1001. return 0 < a.year() && a.year() <= 9999 ? y(Date.prototype.toISOString) ? this.toDate().toISOString() : W(a, "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]") : W(a, "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")
  1002. }
  1003. function ec(b) {
  1004. b || (b = this.isUtc() ? a.defaultFormatUtc : a.defaultFormat);
  1005. var c = W(this, b);
  1006. return this.localeData().postformat(c)
  1007. }
  1008. function fc(a, b) {
  1009. return this.isValid() && (r(a) && a.isValid() || rb(a).isValid()) ? Mb({
  1010. to: this,
  1011. from: a
  1012. }).locale(this.locale()).humanize(!b) : this.localeData().invalidDate()
  1013. }
  1014. function gc(a) {
  1015. return this.from(rb(), a)
  1016. }
  1017. function hc(a, b) {
  1018. return this.isValid() && (r(a) && a.isValid() || rb(a).isValid()) ? Mb({
  1019. from: this,
  1020. to: a
  1021. }).locale(this.locale()).humanize(!b) : this.localeData().invalidDate()
  1022. }
  1023. function ic(a) {
  1024. return this.to(rb(), a)
  1025. }
  1026. // If passed a locale key, it will set the locale for this
  1027. // instance. Otherwise, it will return the locale configuration
  1028. // variables for this instance.
  1029. function jc(a) {
  1030. var b;
  1031. return void 0 === a ? this._locale._abbr : (b = ab(a), null != b && (this._locale = b), this)
  1032. }
  1033. function kc() {
  1034. return this._locale
  1035. }
  1036. function lc(a) {
  1037. // the following switch intentionally omits break keywords
  1038. // to utilize falling through the cases.
  1039. switch (a = J(a)) {
  1040. case "year":
  1041. this.month(0); /* falls through */
  1042. case "quarter":
  1043. case "month":
  1044. this.date(1); /* falls through */
  1045. case "week":
  1046. case "isoWeek":
  1047. case "day":
  1048. case "date":
  1049. this.hours(0); /* falls through */
  1050. case "hour":
  1051. this.minutes(0); /* falls through */
  1052. case "minute":
  1053. this.seconds(0); /* falls through */
  1054. case "second":
  1055. this.milliseconds(0)
  1056. }
  1057. // weeks are a special case
  1058. // quarters are also special
  1059. return "week" === a && this.weekday(0), "isoWeek" === a && this.isoWeekday(1), "quarter" === a && this.month(3 * Math.floor(this.month() / 3)), this
  1060. }
  1061. function mc(a) {
  1062. // 'date' is an alias for 'day', so it should be considered as such.
  1063. return a = J(a), void 0 === a || "millisecond" === a ? this : ("date" === a && (a = "day"), this.startOf(a).add(1, "isoWeek" === a ? "week" : a).subtract(1, "ms"))
  1064. }
  1065. function nc() {
  1066. return this._d.valueOf() - 6e4 * (this._offset || 0)
  1067. }
  1068. function oc() {
  1069. return Math.floor(this.valueOf() / 1e3)
  1070. }
  1071. function pc() {
  1072. return new Date(this.valueOf())
  1073. }
  1074. function qc() {
  1075. var a = this;
  1076. return [a.year(), a.month(), a.date(), a.hour(), a.minute(), a.second(), a.millisecond()]
  1077. }
  1078. function rc() {
  1079. var a = this;
  1080. return {
  1081. years: a.year(),
  1082. months: a.month(),
  1083. date: a.date(),
  1084. hours: a.hours(),
  1085. minutes: a.minutes(),
  1086. seconds: a.seconds(),
  1087. milliseconds: a.milliseconds()
  1088. }
  1089. }
  1090. function sc() {
  1091. // new Date(NaN).toJSON() === null
  1092. return this.isValid() ? this.toISOString() : null
  1093. }
  1094. function tc() {
  1095. return m(this)
  1096. }
  1097. function uc() {
  1098. return i({}, l(this))
  1099. }
  1100. function vc() {
  1101. return l(this).overflow
  1102. }
  1103. function wc() {
  1104. return {
  1105. input: this._i,
  1106. format: this._f,
  1107. locale: this._locale,
  1108. isUTC: this._isUTC,
  1109. strict: this._strict
  1110. }
  1111. }
  1112. function xc(a, b) {
  1113. T(0, [a, a.length], 0, b)
  1114. }
  1115. // MOMENTS
  1116. function yc(a) {
  1117. return Cc.call(this, a, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy)
  1118. }
  1119. function zc(a) {
  1120. return Cc.call(this, a, this.isoWeek(), this.isoWeekday(), 1, 4)
  1121. }
  1122. function Ac() {
  1123. return wa(this.year(), 1, 4)
  1124. }
  1125. function Bc() {
  1126. var a = this.localeData()._week;
  1127. return wa(this.year(), a.dow, a.doy)
  1128. }
  1129. function Cc(a, b, c, d, e) {
  1130. var f;
  1131. return null == a ? va(this, d, e).year : (f = wa(a, d, e), b > f && (b = f), Dc.call(this, a, b, c, d, e))
  1132. }
  1133. function Dc(a, b, c, d, e) {
  1134. var f = ua(a, b, c, d, e),
  1135. g = sa(f.year, 0, f.dayOfYear);
  1136. return this.year(g.getUTCFullYear()), this.month(g.getUTCMonth()), this.date(g.getUTCDate()), this
  1137. }
  1138. // MOMENTS
  1139. function Ec(a) {
  1140. return null == a ? Math.ceil((this.month() + 1) / 3) : this.month(3 * (a - 1) + this.month() % 3)
  1141. }
  1142. // HELPERS
  1143. // MOMENTS
  1144. function Fc(a) {
  1145. var b = Math.round((this.clone().startOf("day") - this.clone().startOf("year")) / 864e5) + 1;
  1146. return null == a ? b : this.add(a - b, "d")
  1147. }
  1148. function Gc(a, b) {
  1149. b[ce] = t(1e3 * ("0." + a))
  1150. }
  1151. // MOMENTS
  1152. function Hc() {
  1153. return this._isUTC ? "UTC" : ""
  1154. }
  1155. function Ic() {
  1156. return this._isUTC ? "Coordinated Universal Time" : ""
  1157. }
  1158. function Jc(a) {
  1159. return rb(1e3 * a)
  1160. }
  1161. function Kc() {
  1162. return rb.apply(null, arguments).parseZone()
  1163. }
  1164. function Lc(a) {
  1165. return a
  1166. }
  1167. function Mc(a, b, c, d) {
  1168. var e = ab(),
  1169. f = j().set(d, b);
  1170. return e[c](f, a)
  1171. }
  1172. function Nc(a, b, c) {
  1173. if ("number" == typeof a && (b = a, a = void 0), a = a || "", null != b) return Mc(a, b, c, "month");
  1174. var d, e = [];
  1175. for (d = 0; 12 > d; d++) e[d] = Mc(a, d, c, "month");
  1176. return e
  1177. }
  1178. // ()
  1179. // (5)
  1180. // (fmt, 5)
  1181. // (fmt)
  1182. // (true)
  1183. // (true, 5)
  1184. // (true, fmt, 5)
  1185. // (true, fmt)
  1186. function Oc(a, b, c, d) {
  1187. "boolean" == typeof a ? ("number" == typeof b && (c = b, b = void 0), b = b || "") : (b = a, c = b, a = !1, "number" == typeof b && (c = b, b = void 0), b = b || "");
  1188. var e = ab(),
  1189. f = a ? e._week.dow : 0;
  1190. if (null != c) return Mc(b, (c + f) % 7, d, "day");
  1191. var g, h = [];
  1192. for (g = 0; 7 > g; g++) h[g] = Mc(b, (g + f) % 7, d, "day");
  1193. return h
  1194. }
  1195. function Pc(a, b) {
  1196. return Nc(a, b, "months")
  1197. }
  1198. function Qc(a, b) {
  1199. return Nc(a, b, "monthsShort")
  1200. }
  1201. function Rc(a, b, c) {
  1202. return Oc(a, b, c, "weekdays")
  1203. }
  1204. function Sc(a, b, c) {
  1205. return Oc(a, b, c, "weekdaysShort")
  1206. }
  1207. function Tc(a, b, c) {
  1208. return Oc(a, b, c, "weekdaysMin")
  1209. }
  1210. function Uc() {
  1211. var a = this._data;
  1212. return this._milliseconds = Ue(this._milliseconds), this._days = Ue(this._days), this._months = Ue(this._months), a.milliseconds = Ue(a.milliseconds), a.seconds = Ue(a.seconds), a.minutes = Ue(a.minutes), a.hours = Ue(a.hours), a.months = Ue(a.months), a.years = Ue(a.years), this
  1213. }
  1214. function Vc(a, b, c, d) {
  1215. var e = Mb(b, c);
  1216. return a._milliseconds += d * e._milliseconds, a._days += d * e._days, a._months += d * e._months, a._bubble()
  1217. }
  1218. // supports only 2.0-style add(1, 's') or add(duration)
  1219. function Wc(a, b) {
  1220. return Vc(this, a, b, 1)
  1221. }
  1222. // supports only 2.0-style subtract(1, 's') or subtract(duration)
  1223. function Xc(a, b) {
  1224. return Vc(this, a, b, -1)
  1225. }
  1226. function Yc(a) {
  1227. return 0 > a ? Math.floor(a) : Math.ceil(a)
  1228. }
  1229. function Zc() {
  1230. var a, b, c, d, e, f = this._milliseconds,
  1231. g = this._days,
  1232. h = this._months,
  1233. i = this._data;
  1234. // if we have a mix of positive and negative values, bubble down first
  1235. // check: https://github.com/moment/moment/issues/2166
  1236. // The following code bubbles up values, see the tests for
  1237. // examples of what that means.
  1238. // convert days to months
  1239. // 12 months -> 1 year
  1240. return f >= 0 && g >= 0 && h >= 0 || 0 >= f && 0 >= g && 0 >= h || (f += 864e5 * Yc(_c(h) + g), g = 0, h = 0), i.milliseconds = f % 1e3, a = s(f / 1e3), i.seconds = a % 60, b = s(a / 60), i.minutes = b % 60, c = s(b / 60), i.hours = c % 24, g += s(c / 24), e = s($c(g)), h += e, g -= Yc(_c(e)), d = s(h / 12), h %= 12, i.days = g, i.months = h, i.years = d, this
  1241. }
  1242. function $c(a) {
  1243. // 400 years have 146097 days (taking into account leap year rules)
  1244. // 400 years have 12 months === 4800
  1245. return 4800 * a / 146097
  1246. }
  1247. function _c(a) {
  1248. // the reverse of daysToMonths
  1249. return 146097 * a / 4800
  1250. }
  1251. function ad(a) {
  1252. var b, c, d = this._milliseconds;
  1253. if (a = J(a), "month" === a || "year" === a) return b = this._days + d / 864e5, c = this._months + $c(b), "month" === a ? c : c / 12;
  1254. switch (b = this._days + Math.round(_c(this._months)), a) {
  1255. case "week":
  1256. return b / 7 + d / 6048e5;
  1257. case "day":
  1258. return b + d / 864e5;
  1259. case "hour":
  1260. return 24 * b + d / 36e5;
  1261. case "minute":
  1262. return 1440 * b + d / 6e4;
  1263. case "second":
  1264. return 86400 * b + d / 1e3;
  1265. // Math.floor prevents floating point math errors here
  1266. case "millisecond":
  1267. return Math.floor(864e5 * b) + d;
  1268. default:
  1269. throw new Error("Unknown unit " + a)
  1270. }
  1271. }
  1272. // TODO: Use this.as('ms')?
  1273. function bd() {
  1274. return this._milliseconds + 864e5 * this._days + this._months % 12 * 2592e6 + 31536e6 * t(this._months / 12)
  1275. }
  1276. function cd(a) {
  1277. return function() {
  1278. return this.as(a)
  1279. }
  1280. }
  1281. function dd(a) {
  1282. return a = J(a), this[a + "s"]()
  1283. }
  1284. function ed(a) {
  1285. return function() {
  1286. return this._data[a]
  1287. }
  1288. }
  1289. function fd() {
  1290. return s(this.days() / 7)
  1291. }
  1292. // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
  1293. function gd(a, b, c, d, e) {
  1294. return e.relativeTime(b || 1, !!c, a, d)
  1295. }
  1296. function hd(a, b, c) {
  1297. var d = Mb(a).abs(),
  1298. e = jf(d.as("s")),
  1299. f = jf(d.as("m")),
  1300. g = jf(d.as("h")),
  1301. h = jf(d.as("d")),
  1302. i = jf(d.as("M")),
  1303. j = jf(d.as("y")),
  1304. k = e < kf.s && ["s", e] || 1 >= f && ["m"] || f < kf.m && ["mm", f] || 1 >= g && ["h"] || g < kf.h && ["hh", g] || 1 >= h && ["d"] || h < kf.d && ["dd", h] || 1 >= i && ["M"] || i < kf.M && ["MM", i] || 1 >= j && ["y"] || ["yy", j];
  1305. return k[2] = b, k[3] = +a > 0, k[4] = c, gd.apply(null, k)
  1306. }
  1307. // This function allows you to set the rounding function for relative time strings
  1308. function id(a) {
  1309. return void 0 === a ? jf : "function" == typeof a ? (jf = a, !0) : !1
  1310. }
  1311. // This function allows you to set a threshold for relative time strings
  1312. function jd(a, b) {
  1313. return void 0 === kf[a] ? !1 : void 0 === b ? kf[a] : (kf[a] = b, !0)
  1314. }
  1315. function kd(a) {
  1316. var b = this.localeData(),
  1317. c = hd(this, !a, b);
  1318. return a && (c = b.pastFuture(+this, c)), b.postformat(c)
  1319. }
  1320. function ld() {
  1321. // for ISO strings we do not use the normal bubbling rules:
  1322. // * milliseconds bubble up until they become hours
  1323. // * days do not bubble at all
  1324. // * months bubble up until they become years
  1325. // This is because there is no context-free conversion between hours and days
  1326. // (think of clock changes)
  1327. // and also not between days and months (28-31 days per month)
  1328. var a, b, c, d = lf(this._milliseconds) / 1e3,
  1329. e = lf(this._days),
  1330. f = lf(this._months);
  1331. a = s(d / 60), b = s(a / 60), d %= 60, a %= 60, c = s(f / 12), f %= 12;
  1332. // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
  1333. var g = c,
  1334. h = f,
  1335. i = e,
  1336. j = b,
  1337. k = a,
  1338. l = d,
  1339. m = this.asSeconds();
  1340. return m ? (0 > m ? "-" : "") + "P" + (g ? g + "Y" : "") + (h ? h + "M" : "") + (i ? i + "D" : "") + (j || k || l ? "T" : "") + (j ? j + "H" : "") + (k ? k + "M" : "") + (l ? l + "S" : "") : "P0D"
  1341. }
  1342. var md, nd;
  1343. nd = Array.prototype.some ? Array.prototype.some : function(a) {
  1344. for (var b = Object(this), c = b.length >>> 0, d = 0; c > d; d++)
  1345. if (d in b && a.call(this, b[d], d, b)) return !0;
  1346. return !1
  1347. };
  1348. // Plugins that add properties should also add the key here (null value),
  1349. // so we can properly clone ourselves.
  1350. var od = a.momentProperties = [],
  1351. pd = !1,
  1352. qd = {};
  1353. a.suppressDeprecationWarnings = !1, a.deprecationHandler = null;
  1354. var rd;
  1355. rd = Object.keys ? Object.keys : function(a) {
  1356. var b, c = [];
  1357. for (b in a) h(a, b) && c.push(b);
  1358. return c
  1359. };
  1360. var sd, td = {
  1361. sameDay: "[Today at] LT",
  1362. nextDay: "[Tomorrow at] LT",
  1363. nextWeek: "dddd [at] LT",
  1364. lastDay: "[Yesterday at] LT",
  1365. lastWeek: "[Last] dddd [at] LT",
  1366. sameElse: "L"
  1367. },
  1368. ud = {
  1369. LTS: "h:mm:ss A",
  1370. LT: "h:mm A",
  1371. L: "MM/DD/YYYY",
  1372. LL: "MMMM D, YYYY",
  1373. LLL: "MMMM D, YYYY h:mm A",
  1374. LLLL: "dddd, MMMM D, YYYY h:mm A"
  1375. },
  1376. vd = "Invalid date",
  1377. wd = "%d",
  1378. xd = /\d{1,2}/,
  1379. yd = {
  1380. future: "in %s",
  1381. past: "%s ago",
  1382. s: "a few seconds",
  1383. m: "a minute",
  1384. mm: "%d minutes",
  1385. h: "an hour",
  1386. hh: "%d hours",
  1387. d: "a day",
  1388. dd: "%d days",
  1389. M: "a month",
  1390. MM: "%d months",
  1391. y: "a year",
  1392. yy: "%d years"
  1393. },
  1394. zd = {},
  1395. Ad = {},
  1396. Bd = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
  1397. Cd = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
  1398. Dd = {},
  1399. Ed = {},
  1400. Fd = /\d/,
  1401. Gd = /\d\d/,
  1402. Hd = /\d{3}/,
  1403. Id = /\d{4}/,
  1404. Jd = /[+-]?\d{6}/,
  1405. Kd = /\d\d?/,
  1406. Ld = /\d\d\d\d?/,
  1407. Md = /\d\d\d\d\d\d?/,
  1408. Nd = /\d{1,3}/,
  1409. Od = /\d{1,4}/,
  1410. Pd = /[+-]?\d{1,6}/,
  1411. Qd = /\d+/,
  1412. Rd = /[+-]?\d+/,
  1413. Sd = /Z|[+-]\d\d:?\d\d/gi,
  1414. Td = /Z|[+-]\d\d(?::?\d\d)?/gi,
  1415. Ud = /[+-]?\d+(\.\d{1,3})?/,
  1416. Vd = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,
  1417. Wd = {},
  1418. Xd = {},
  1419. Yd = 0,
  1420. Zd = 1,
  1421. $d = 2,
  1422. _d = 3,
  1423. ae = 4,
  1424. be = 5,
  1425. ce = 6,
  1426. de = 7,
  1427. ee = 8;
  1428. sd = Array.prototype.indexOf ? Array.prototype.indexOf : function(a) {
  1429. // I know
  1430. var b;
  1431. for (b = 0; b < this.length; ++b)
  1432. if (this[b] === a) return b;
  1433. return -1
  1434. }, T("M", ["MM", 2], "Mo", function() {
  1435. return this.month() + 1
  1436. }), T("MMM", 0, 0, function(a) {
  1437. return this.localeData().monthsShort(this, a)
  1438. }), T("MMMM", 0, 0, function(a) {
  1439. return this.localeData().months(this, a)
  1440. }), I("month", "M"), L("month", 8), Y("M", Kd), Y("MM", Kd, Gd), Y("MMM", function(a, b) {
  1441. return b.monthsShortRegex(a)
  1442. }), Y("MMMM", function(a, b) {
  1443. return b.monthsRegex(a)
  1444. }), aa(["M", "MM"], function(a, b) {
  1445. b[Zd] = t(a) - 1
  1446. }), aa(["MMM", "MMMM"], function(a, b, c, d) {
  1447. var e = c._locale.monthsParse(a, d, c._strict);
  1448. null != e ? b[Zd] = e : l(c).invalidMonth = a
  1449. });
  1450. // LOCALES
  1451. var fe = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,
  1452. ge = "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
  1453. he = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),
  1454. ie = Vd,
  1455. je = Vd;
  1456. // FORMATTING
  1457. T("Y", 0, 0, function() {
  1458. var a = this.year();
  1459. return 9999 >= a ? "" + a : "+" + a
  1460. }), T(0, ["YY", 2], 0, function() {
  1461. return this.year() % 100
  1462. }), T(0, ["YYYY", 4], 0, "year"), T(0, ["YYYYY", 5], 0, "year"), T(0, ["YYYYYY", 6, !0], 0, "year"),
  1463. // ALIASES
  1464. I("year", "y"),
  1465. // PRIORITIES
  1466. L("year", 1),
  1467. // PARSING
  1468. Y("Y", Rd), Y("YY", Kd, Gd), Y("YYYY", Od, Id), Y("YYYYY", Pd, Jd), Y("YYYYYY", Pd, Jd), aa(["YYYYY", "YYYYYY"], Yd), aa("YYYY", function(b, c) {
  1469. c[Yd] = 2 === b.length ? a.parseTwoDigitYear(b) : t(b)
  1470. }), aa("YY", function(b, c) {
  1471. c[Yd] = a.parseTwoDigitYear(b)
  1472. }), aa("Y", function(a, b) {
  1473. b[Yd] = parseInt(a, 10)
  1474. }),
  1475. // HOOKS
  1476. a.parseTwoDigitYear = function(a) {
  1477. return t(a) + (t(a) > 68 ? 1900 : 2e3)
  1478. };
  1479. // MOMENTS
  1480. var ke = N("FullYear", !0);
  1481. // FORMATTING
  1482. T("w", ["ww", 2], "wo", "week"), T("W", ["WW", 2], "Wo", "isoWeek"),
  1483. // ALIASES
  1484. I("week", "w"), I("isoWeek", "W"),
  1485. // PRIORITIES
  1486. L("week", 5), L("isoWeek", 5),
  1487. // PARSING
  1488. Y("w", Kd), Y("ww", Kd, Gd), Y("W", Kd), Y("WW", Kd, Gd), ba(["w", "ww", "W", "WW"], function(a, b, c, d) {
  1489. b[d.substr(0, 1)] = t(a)
  1490. });
  1491. var le = {
  1492. dow: 0, // Sunday is the first day of the week.
  1493. doy: 6
  1494. };
  1495. // FORMATTING
  1496. T("d", 0, "do", "day"), T("dd", 0, 0, function(a) {
  1497. return this.localeData().weekdaysMin(this, a)
  1498. }), T("ddd", 0, 0, function(a) {
  1499. return this.localeData().weekdaysShort(this, a)
  1500. }), T("dddd", 0, 0, function(a) {
  1501. return this.localeData().weekdays(this, a)
  1502. }), T("e", 0, 0, "weekday"), T("E", 0, 0, "isoWeekday"),
  1503. // ALIASES
  1504. I("day", "d"), I("weekday", "e"), I("isoWeekday", "E"),
  1505. // PRIORITY
  1506. L("day", 11), L("weekday", 11), L("isoWeekday", 11),
  1507. // PARSING
  1508. Y("d", Kd), Y("e", Kd), Y("E", Kd), Y("dd", function(a, b) {
  1509. return b.weekdaysMinRegex(a)
  1510. }), Y("ddd", function(a, b) {
  1511. return b.weekdaysShortRegex(a)
  1512. }), Y("dddd", function(a, b) {
  1513. return b.weekdaysRegex(a)
  1514. }), ba(["dd", "ddd", "dddd"], function(a, b, c, d) {
  1515. var e = c._locale.weekdaysParse(a, d, c._strict);
  1516. // if we didn't get a weekday name, mark the date as invalid
  1517. null != e ? b.d = e : l(c).invalidWeekday = a
  1518. }), ba(["d", "e", "E"], function(a, b, c, d) {
  1519. b[d] = t(a)
  1520. });
  1521. // LOCALES
  1522. var me = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
  1523. ne = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),
  1524. oe = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"),
  1525. pe = Vd,
  1526. qe = Vd,
  1527. re = Vd;
  1528. T("H", ["HH", 2], 0, "hour"), T("h", ["hh", 2], 0, Qa), T("k", ["kk", 2], 0, Ra), T("hmm", 0, 0, function() {
  1529. return "" + Qa.apply(this) + S(this.minutes(), 2)
  1530. }), T("hmmss", 0, 0, function() {
  1531. return "" + Qa.apply(this) + S(this.minutes(), 2) + S(this.seconds(), 2)
  1532. }), T("Hmm", 0, 0, function() {
  1533. return "" + this.hours() + S(this.minutes(), 2)
  1534. }), T("Hmmss", 0, 0, function() {
  1535. return "" + this.hours() + S(this.minutes(), 2) + S(this.seconds(), 2)
  1536. }), Sa("a", !0), Sa("A", !1),
  1537. // ALIASES
  1538. I("hour", "h"),
  1539. // PRIORITY
  1540. L("hour", 13), Y("a", Ta), Y("A", Ta), Y("H", Kd), Y("h", Kd), Y("HH", Kd, Gd), Y("hh", Kd, Gd), Y("hmm", Ld), Y("hmmss", Md), Y("Hmm", Ld), Y("Hmmss", Md), aa(["H", "HH"], _d), aa(["a", "A"], function(a, b, c) {
  1541. c._isPm = c._locale.isPM(a), c._meridiem = a
  1542. }), aa(["h", "hh"], function(a, b, c) {
  1543. b[_d] = t(a), l(c).bigHour = !0
  1544. }), aa("hmm", function(a, b, c) {
  1545. var d = a.length - 2;
  1546. b[_d] = t(a.substr(0, d)), b[ae] = t(a.substr(d)), l(c).bigHour = !0
  1547. }), aa("hmmss", function(a, b, c) {
  1548. var d = a.length - 4,
  1549. e = a.length - 2;
  1550. b[_d] = t(a.substr(0, d)), b[ae] = t(a.substr(d, 2)), b[be] = t(a.substr(e)), l(c).bigHour = !0
  1551. }), aa("Hmm", function(a, b, c) {
  1552. var d = a.length - 2;
  1553. b[_d] = t(a.substr(0, d)), b[ae] = t(a.substr(d))
  1554. }), aa("Hmmss", function(a, b, c) {
  1555. var d = a.length - 4,
  1556. e = a.length - 2;
  1557. b[_d] = t(a.substr(0, d)), b[ae] = t(a.substr(d, 2)), b[be] = t(a.substr(e))
  1558. });
  1559. var se, te = /[ap]\.?m?\.?/i,
  1560. ue = N("Hours", !0),
  1561. ve = {
  1562. calendar: td,
  1563. longDateFormat: ud,
  1564. invalidDate: vd,
  1565. ordinal: wd,
  1566. ordinalParse: xd,
  1567. relativeTime: yd,
  1568. months: ge,
  1569. monthsShort: he,
  1570. week: le,
  1571. weekdays: me,
  1572. weekdaysMin: oe,
  1573. weekdaysShort: ne,
  1574. meridiemParse: te
  1575. },
  1576. we = {},
  1577. xe = /^\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)?)?/,
  1578. ye = /^\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)?)?/,
  1579. ze = /Z|[+-]\d\d(?::?\d\d)?/,
  1580. Ae = [
  1581. ["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/],
  1582. ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/],
  1583. ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/],
  1584. ["GGGG-[W]WW", /\d{4}-W\d\d/, !1],
  1585. ["YYYY-DDD", /\d{4}-\d{3}/],
  1586. ["YYYY-MM", /\d{4}-\d\d/, !1],
  1587. ["YYYYYYMMDD", /[+-]\d{10}/],
  1588. ["YYYYMMDD", /\d{8}/],
  1589. // YYYYMM is NOT allowed by the standard
  1590. ["GGGG[W]WWE", /\d{4}W\d{3}/],
  1591. ["GGGG[W]WW", /\d{4}W\d{2}/, !1],
  1592. ["YYYYDDD", /\d{7}/]
  1593. ],
  1594. Be = [
  1595. ["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/],
  1596. ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/],
  1597. ["HH:mm:ss", /\d\d:\d\d:\d\d/],
  1598. ["HH:mm", /\d\d:\d\d/],
  1599. ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/],
  1600. ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/],
  1601. ["HHmmss", /\d\d\d\d\d\d/],
  1602. ["HHmm", /\d\d\d\d/],
  1603. ["HH", /\d\d/]
  1604. ],
  1605. Ce = /^\/?Date\((\-?\d+)/i;
  1606. a.createFromInputFallback = w("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.", function(a) {
  1607. a._d = new Date(a._i + (a._useUTC ? " UTC" : ""))
  1608. }),
  1609. // constant that refers to the ISO standard
  1610. a.ISO_8601 = function() {};
  1611. var De = w("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/", function() {
  1612. var a = rb.apply(null, arguments);
  1613. return this.isValid() && a.isValid() ? this > a ? this : a : n()
  1614. }),
  1615. Ee = w("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/", function() {
  1616. var a = rb.apply(null, arguments);
  1617. return this.isValid() && a.isValid() ? a > this ? this : a : n()
  1618. }),
  1619. Fe = function() {
  1620. return Date.now ? Date.now() : +new Date
  1621. };
  1622. xb("Z", ":"), xb("ZZ", ""),
  1623. // PARSING
  1624. Y("Z", Td), Y("ZZ", Td), aa(["Z", "ZZ"], function(a, b, c) {
  1625. c._useUTC = !0, c._tzm = yb(Td, a)
  1626. });
  1627. // HELPERS
  1628. // timezone chunker
  1629. // '+10:00' > ['10', '00']
  1630. // '-1530' > ['-15', '30']
  1631. var Ge = /([\+\-]|\d\d)/gi;
  1632. // HOOKS
  1633. // This function will be called whenever a moment is mutated.
  1634. // It is intended to keep the offset in sync with the timezone.
  1635. a.updateOffset = function() {};
  1636. // ASP.NET json date format regex
  1637. var He = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,
  1638. Ie = /^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;
  1639. Mb.fn = vb.prototype;
  1640. var Je = Rb(1, "add"),
  1641. Ke = Rb(-1, "subtract");
  1642. a.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ", a.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]";
  1643. var Le = w("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.", function(a) {
  1644. return void 0 === a ? this.localeData() : this.locale(a)
  1645. });
  1646. // FORMATTING
  1647. T(0, ["gg", 2], 0, function() {
  1648. return this.weekYear() % 100
  1649. }), T(0, ["GG", 2], 0, function() {
  1650. return this.isoWeekYear() % 100
  1651. }), xc("gggg", "weekYear"), xc("ggggg", "weekYear"), xc("GGGG", "isoWeekYear"), xc("GGGGG", "isoWeekYear"),
  1652. // ALIASES
  1653. I("weekYear", "gg"), I("isoWeekYear", "GG"),
  1654. // PRIORITY
  1655. L("weekYear", 1), L("isoWeekYear", 1),
  1656. // PARSING
  1657. Y("G", Rd), Y("g", Rd), Y("GG", Kd, Gd), Y("gg", Kd, Gd), Y("GGGG", Od, Id), Y("gggg", Od, Id), Y("GGGGG", Pd, Jd), Y("ggggg", Pd, Jd), ba(["gggg", "ggggg", "GGGG", "GGGGG"], function(a, b, c, d) {
  1658. b[d.substr(0, 2)] = t(a)
  1659. }), ba(["gg", "GG"], function(b, c, d, e) {
  1660. c[e] = a.parseTwoDigitYear(b)
  1661. }),
  1662. // FORMATTING
  1663. T("Q", 0, "Qo", "quarter"),
  1664. // ALIASES
  1665. I("quarter", "Q"),
  1666. // PRIORITY
  1667. L("quarter", 7),
  1668. // PARSING
  1669. Y("Q", Fd), aa("Q", function(a, b) {
  1670. b[Zd] = 3 * (t(a) - 1)
  1671. }),
  1672. // FORMATTING
  1673. T("D", ["DD", 2], "Do", "date"),
  1674. // ALIASES
  1675. I("date", "D"),
  1676. // PRIOROITY
  1677. L("date", 9),
  1678. // PARSING
  1679. Y("D", Kd), Y("DD", Kd, Gd), Y("Do", function(a, b) {
  1680. return a ? b._ordinalParse : b._ordinalParseLenient
  1681. }), aa(["D", "DD"], $d), aa("Do", function(a, b) {
  1682. b[$d] = t(a.match(Kd)[0], 10)
  1683. });
  1684. // MOMENTS
  1685. var Me = N("Date", !0);
  1686. // FORMATTING
  1687. T("DDD", ["DDDD", 3], "DDDo", "dayOfYear"),
  1688. // ALIASES
  1689. I("dayOfYear", "DDD"),
  1690. // PRIORITY
  1691. L("dayOfYear", 4),
  1692. // PARSING
  1693. Y("DDD", Nd), Y("DDDD", Hd), aa(["DDD", "DDDD"], function(a, b, c) {
  1694. c._dayOfYear = t(a)
  1695. }),
  1696. // FORMATTING
  1697. T("m", ["mm", 2], 0, "minute"),
  1698. // ALIASES
  1699. I("minute", "m"),
  1700. // PRIORITY
  1701. L("minute", 14),
  1702. // PARSING
  1703. Y("m", Kd), Y("mm", Kd, Gd), aa(["m", "mm"], ae);
  1704. // MOMENTS
  1705. var Ne = N("Minutes", !1);
  1706. // FORMATTING
  1707. T("s", ["ss", 2], 0, "second"),
  1708. // ALIASES
  1709. I("second", "s"),
  1710. // PRIORITY
  1711. L("second", 15),
  1712. // PARSING
  1713. Y("s", Kd), Y("ss", Kd, Gd), aa(["s", "ss"], be);
  1714. // MOMENTS
  1715. var Oe = N("Seconds", !1);
  1716. // FORMATTING
  1717. T("S", 0, 0, function() {
  1718. return ~~(this.millisecond() / 100)
  1719. }), T(0, ["SS", 2], 0, function() {
  1720. return ~~(this.millisecond() / 10)
  1721. }), T(0, ["SSS", 3], 0, "millisecond"), T(0, ["SSSS", 4], 0, function() {
  1722. return 10 * this.millisecond()
  1723. }), T(0, ["SSSSS", 5], 0, function() {
  1724. return 100 * this.millisecond()
  1725. }), T(0, ["SSSSSS", 6], 0, function() {
  1726. return 1e3 * this.millisecond()
  1727. }), T(0, ["SSSSSSS", 7], 0, function() {
  1728. return 1e4 * this.millisecond()
  1729. }), T(0, ["SSSSSSSS", 8], 0, function() {
  1730. return 1e5 * this.millisecond()
  1731. }), T(0, ["SSSSSSSSS", 9], 0, function() {
  1732. return 1e6 * this.millisecond()
  1733. }),
  1734. // ALIASES
  1735. I("millisecond", "ms"),
  1736. // PRIORITY
  1737. L("millisecond", 16),
  1738. // PARSING
  1739. Y("S", Nd, Fd), Y("SS", Nd, Gd), Y("SSS", Nd, Hd);
  1740. var Pe;
  1741. for (Pe = "SSSS"; Pe.length <= 9; Pe += "S") Y(Pe, Qd);
  1742. for (Pe = "S"; Pe.length <= 9; Pe += "S") aa(Pe, Gc);
  1743. // MOMENTS
  1744. var Qe = N("Milliseconds", !1);
  1745. // FORMATTING
  1746. T("z", 0, 0, "zoneAbbr"), T("zz", 0, 0, "zoneName");
  1747. var Re = q.prototype;
  1748. Re.add = Je, Re.calendar = Ub, Re.clone = Vb, Re.diff = ac, Re.endOf = mc, Re.format = ec, Re.from = fc, Re.fromNow = gc, Re.to = hc, Re.toNow = ic, Re.get = Q, Re.invalidAt = vc, Re.isAfter = Wb, Re.isBefore = Xb, Re.isBetween = Yb, Re.isSame = Zb, Re.isSameOrAfter = $b, Re.isSameOrBefore = _b, Re.isValid = tc, Re.lang = Le, Re.locale = jc, Re.localeData = kc, Re.max = Ee, Re.min = De, Re.parsingFlags = uc, Re.set = R, Re.startOf = lc, Re.subtract = Ke, Re.toArray = qc, Re.toObject = rc, Re.toDate = pc, Re.toISOString = dc, Re.toJSON = sc, Re.toString = cc, Re.unix = oc, Re.valueOf = nc, Re.creationData = wc,
  1749. // Year
  1750. Re.year = ke, Re.isLeapYear = qa,
  1751. // Week Year
  1752. Re.weekYear = yc, Re.isoWeekYear = zc,
  1753. // Quarter
  1754. Re.quarter = Re.quarters = Ec,
  1755. // Month
  1756. Re.month = ja, Re.daysInMonth = ka,
  1757. // Week
  1758. Re.week = Re.weeks = Aa, Re.isoWeek = Re.isoWeeks = Ba, Re.weeksInYear = Bc, Re.isoWeeksInYear = Ac,
  1759. // Day
  1760. Re.date = Me, Re.day = Re.days = Ja, Re.weekday = Ka, Re.isoWeekday = La, Re.dayOfYear = Fc,
  1761. // Hour
  1762. Re.hour = Re.hours = ue,
  1763. // Minute
  1764. Re.minute = Re.minutes = Ne,
  1765. // Second
  1766. Re.second = Re.seconds = Oe,
  1767. // Millisecond
  1768. Re.millisecond = Re.milliseconds = Qe,
  1769. // Offset
  1770. Re.utcOffset = Bb, Re.utc = Db, Re.local = Eb, Re.parseZone = Fb, Re.hasAlignedHourOffset = Gb, Re.isDST = Hb, Re.isLocal = Jb, Re.isUtcOffset = Kb, Re.isUtc = Lb, Re.isUTC = Lb,
  1771. // Timezone
  1772. Re.zoneAbbr = Hc, Re.zoneName = Ic,
  1773. // Deprecations
  1774. Re.dates = w("dates accessor is deprecated. Use date instead.", Me), Re.months = w("months accessor is deprecated. Use month instead", ja), Re.years = w("years accessor is deprecated. Use year instead", ke), Re.zone = w("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/", Cb), Re.isDSTShifted = w("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information", Ib);
  1775. var Se = Re,
  1776. Te = B.prototype;
  1777. Te.calendar = C, Te.longDateFormat = D, Te.invalidDate = E, Te.ordinal = F, Te.preparse = Lc, Te.postformat = Lc, Te.relativeTime = G, Te.pastFuture = H, Te.set = z,
  1778. // Month
  1779. Te.months = ea, Te.monthsShort = fa, Te.monthsParse = ha, Te.monthsRegex = ma, Te.monthsShortRegex = la,
  1780. // Week
  1781. Te.week = xa, Te.firstDayOfYear = za, Te.firstDayOfWeek = ya,
  1782. // Day of Week
  1783. Te.weekdays = Ea, Te.weekdaysMin = Ga, Te.weekdaysShort = Fa, Te.weekdaysParse = Ia, Te.weekdaysRegex = Ma, Te.weekdaysShortRegex = Na, Te.weekdaysMinRegex = Oa,
  1784. // Hours
  1785. Te.isPM = Ua, Te.meridiem = Va, Za("en", {
  1786. ordinalParse: /\d{1,2}(th|st|nd|rd)/,
  1787. ordinal: function(a) {
  1788. var b = a % 10,
  1789. c = 1 === t(a % 100 / 10) ? "th" : 1 === b ? "st" : 2 === b ? "nd" : 3 === b ? "rd" : "th";
  1790. return a + c
  1791. }
  1792. }),
  1793. // Side effect imports
  1794. a.lang = w("moment.lang is deprecated. Use moment.locale instead.", Za), a.langData = w("moment.langData is deprecated. Use moment.localeData instead.", ab);
  1795. var Ue = Math.abs,
  1796. Ve = cd("ms"),
  1797. We = cd("s"),
  1798. Xe = cd("m"),
  1799. Ye = cd("h"),
  1800. Ze = cd("d"),
  1801. $e = cd("w"),
  1802. _e = cd("M"),
  1803. af = cd("y"),
  1804. bf = ed("milliseconds"),
  1805. cf = ed("seconds"),
  1806. df = ed("minutes"),
  1807. ef = ed("hours"),
  1808. ff = ed("days"),
  1809. gf = ed("months"),
  1810. hf = ed("years"),
  1811. jf = Math.round,
  1812. kf = {
  1813. s: 45, // seconds to minute
  1814. m: 45, // minutes to hour
  1815. h: 22, // hours to day
  1816. d: 26, // days to month
  1817. M: 11
  1818. },
  1819. lf = Math.abs,
  1820. mf = vb.prototype;
  1821. mf.abs = Uc, mf.add = Wc, mf.subtract = Xc, mf.as = ad, mf.asMilliseconds = Ve, mf.asSeconds = We, mf.asMinutes = Xe, mf.asHours = Ye, mf.asDays = Ze, mf.asWeeks = $e, mf.asMonths = _e, mf.asYears = af, mf.valueOf = bd, mf._bubble = Zc, mf.get = dd, mf.milliseconds = bf, mf.seconds = cf, mf.minutes = df, mf.hours = ef, mf.days = ff, mf.weeks = fd, mf.months = gf, mf.years = hf, mf.humanize = kd, mf.toISOString = ld, mf.toString = ld, mf.toJSON = ld, mf.locale = jc, mf.localeData = kc,
  1822. // Deprecations
  1823. mf.toIsoString = w("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", ld), mf.lang = Le,
  1824. // Side effect imports
  1825. // FORMATTING
  1826. T("X", 0, 0, "unix"), T("x", 0, 0, "valueOf"),
  1827. // PARSING
  1828. Y("x", Rd), Y("X", Ud), aa("X", function(a, b, c) {
  1829. c._d = new Date(1e3 * parseFloat(a, 10))
  1830. }), aa("x", function(a, b, c) {
  1831. c._d = new Date(t(a))
  1832. }),
  1833. // Side effect imports
  1834. a.version = "2.14.1", b(rb), a.fn = Se, a.min = tb, a.max = ub, a.now = Fe, a.utc = j, a.unix = Jc, a.months = Pc, a.isDate = f, a.locale = Za, a.invalid = n, a.duration = Mb, a.isMoment = r, a.weekdays = Rc, a.parseZone = Kc, a.localeData = ab, a.isDuration = wb, a.monthsShort = Qc, a.weekdaysMin = Tc, a.defineLocale = $a, a.updateLocale = _a, a.locales = bb, a.weekdaysShort = Sc, a.normalizeUnits = J, a.relativeTimeRounding = id, a.relativeTimeThreshold = jd, a.calendarFormat = Tb, a.prototype = Se;
  1835. var nf = a;
  1836. return nf
  1837. });