react-moment 0.7.5 → 0.7.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,233 +1,240 @@
1
1
  TN:
2
- SF:/media/sean/work1/www/react-moment/src/index.jsx
3
- FN:60,(anonymous_0)
4
- FN:61,(anonymous_1)
5
- FN:79,(anonymous_2)
6
- FN:81,(anonymous_3)
7
- FN:82,(anonymous_4)
8
- FN:93,(anonymous_5)
9
- FN:106,(anonymous_6)
10
- FN:121,(anonymous_7)
11
- FN:134,(anonymous_8)
12
- FN:170,(anonymous_9)
13
- FN:184,(anonymous_10)
14
- FN:191,(anonymous_11)
15
- FN:203,(anonymous_12)
16
- FN:212,(anonymous_13)
17
- FN:221,(anonymous_14)
18
- FN:228,(anonymous_15)
19
- FN:232,(anonymous_16)
20
- FN:241,(anonymous_17)
21
- FN:254,(anonymous_18)
22
- FN:294,(anonymous_19)
23
- FN:299,(anonymous_20)
2
+ SF:/media/sean/work2/www/react-moment/src/index.jsx
3
+ FN:61,(anonymous_0)
4
+ FN:62,(anonymous_1)
5
+ FN:80,(anonymous_2)
6
+ FN:82,(anonymous_3)
7
+ FN:83,(anonymous_4)
8
+ FN:94,(anonymous_5)
9
+ FN:107,(anonymous_6)
10
+ FN:122,(anonymous_7)
11
+ FN:135,(anonymous_8)
12
+ FN:171,(anonymous_9)
13
+ FN:185,(anonymous_10)
14
+ FN:192,(anonymous_11)
15
+ FN:204,(anonymous_12)
16
+ FN:213,(anonymous_13)
17
+ FN:222,(anonymous_14)
18
+ FN:229,(anonymous_15)
19
+ FN:233,(anonymous_16)
20
+ FN:242,(anonymous_17)
21
+ FN:255,(anonymous_18)
22
+ FN:296,(anonymous_19)
23
+ FN:301,(anonymous_20)
24
24
  FNF:21
25
25
  FNH:18
26
- FNDA:35,(anonymous_0)
27
- FNDA:36,(anonymous_1)
26
+ FNDA:37,(anonymous_0)
27
+ FNDA:38,(anonymous_1)
28
28
  FNDA:1,(anonymous_2)
29
29
  FNDA:0,(anonymous_3)
30
30
  FNDA:0,(anonymous_4)
31
31
  FNDA:1,(anonymous_5)
32
32
  FNDA:3,(anonymous_6)
33
33
  FNDA:4,(anonymous_7)
34
- FNDA:72,(anonymous_8)
35
- FNDA:35,(anonymous_9)
36
- FNDA:35,(anonymous_10)
37
- FNDA:35,(anonymous_11)
34
+ FNDA:76,(anonymous_8)
35
+ FNDA:37,(anonymous_9)
36
+ FNDA:37,(anonymous_10)
37
+ FNDA:37,(anonymous_11)
38
38
  FNDA:1,(anonymous_12)
39
39
  FNDA:1,(anonymous_13)
40
40
  FNDA:1,(anonymous_14)
41
- FNDA:35,(anonymous_15)
41
+ FNDA:37,(anonymous_15)
42
42
  FNDA:0,(anonymous_16)
43
- FNDA:36,(anonymous_17)
44
- FNDA:36,(anonymous_18)
45
- FNDA:36,(anonymous_19)
46
- FNDA:36,(anonymous_20)
43
+ FNDA:38,(anonymous_17)
44
+ FNDA:38,(anonymous_18)
45
+ FNDA:38,(anonymous_19)
46
+ FNDA:38,(anonymous_20)
47
47
  DA:6,1
48
48
  DA:13,1
49
49
  DA:18,1
50
- DA:60,35
51
- DA:80,1
50
+ DA:61,37
52
51
  DA:81,1
53
- DA:82,0
52
+ DA:82,1
54
53
  DA:83,0
55
54
  DA:84,0
56
- DA:94,1
57
- DA:95,0
55
+ DA:85,0
56
+ DA:95,1
58
57
  DA:96,0
59
58
  DA:97,0
60
- DA:107,3
61
- DA:108,0
59
+ DA:98,0
60
+ DA:108,3
62
61
  DA:109,0
63
- DA:111,3
62
+ DA:110,0
64
63
  DA:112,3
65
- DA:122,4
64
+ DA:113,3
66
65
  DA:123,4
67
- DA:124,1
68
- DA:135,72
69
- DA:136,72
70
- DA:138,72
71
- DA:139,72
72
- DA:140,72
73
- DA:141,72
74
- DA:142,4
75
- DA:144,68
76
- DA:147,72
77
- DA:148,72
78
- DA:149,2
79
- DA:150,70
80
- DA:154,6
81
- DA:156,64
82
- DA:158,72
83
- DA:159,4
84
- DA:162,72
85
- DA:171,35
86
- DA:172,35
87
- DA:173,1
88
- DA:175,35
89
- DA:178,35
90
- DA:185,35
91
- DA:192,35
92
- DA:193,35
93
- DA:194,3
94
- DA:204,1
95
- DA:213,1
96
- DA:214,0
97
- DA:222,1
98
- DA:229,35
99
- DA:230,35
100
- DA:231,35
101
- DA:232,32
102
- DA:233,0
103
- DA:242,36
104
- DA:243,0
66
+ DA:124,4
67
+ DA:125,1
68
+ DA:136,76
69
+ DA:137,76
70
+ DA:139,76
71
+ DA:140,76
72
+ DA:141,76
73
+ DA:142,76
74
+ DA:143,4
75
+ DA:145,72
76
+ DA:148,76
77
+ DA:149,76
78
+ DA:150,2
79
+ DA:151,74
80
+ DA:155,6
81
+ DA:157,68
82
+ DA:159,76
83
+ DA:160,4
84
+ DA:163,76
85
+ DA:172,37
86
+ DA:173,37
87
+ DA:174,1
88
+ DA:176,37
89
+ DA:179,37
90
+ DA:186,37
91
+ DA:193,37
92
+ DA:194,37
93
+ DA:195,3
94
+ DA:205,1
95
+ DA:214,1
96
+ DA:215,0
97
+ DA:223,1
98
+ DA:230,37
99
+ DA:231,37
100
+ DA:232,37
101
+ DA:233,34
102
+ DA:234,0
103
+ DA:243,38
105
104
  DA:244,0
106
- DA:246,36
107
- DA:247,4
108
- DA:255,36
109
- DA:259,36
110
- DA:261,36
111
- DA:263,36
112
- DA:264,36
113
- DA:265,36
114
- DA:266,1
115
- DA:268,36
116
- DA:269,1
117
- DA:272,36
118
- DA:273,36
119
- DA:274,3
120
- DA:275,33
121
- DA:276,2
122
- DA:277,31
123
- DA:278,4
124
- DA:279,27
125
- DA:280,2
126
- DA:281,25
105
+ DA:245,0
106
+ DA:247,38
107
+ DA:248,4
108
+ DA:256,38
109
+ DA:260,38
110
+ DA:262,38
111
+ DA:264,38
112
+ DA:265,38
113
+ DA:266,38
114
+ DA:267,1
115
+ DA:269,38
116
+ DA:270,1
117
+ DA:273,38
118
+ DA:274,38
119
+ DA:275,38
120
+ DA:276,4
121
+ DA:277,34
122
+ DA:278,2
123
+ DA:279,32
124
+ DA:280,5
125
+ DA:281,27
127
126
  DA:282,2
128
- DA:283,23
127
+ DA:283,25
129
128
  DA:284,2
130
- DA:285,21
131
- DA:286,4
132
- DA:288,17
133
- DA:291,36
134
- DA:292,36
135
- DA:294,36
136
- DA:295,36
137
- DA:300,36
138
- DA:301,36
139
- LF:92
140
- LH:80
141
- BRDA:79,0,0,0
142
- BRDA:83,1,0,0
143
- BRDA:83,1,1,0
144
- BRDA:94,2,0,0
145
- BRDA:94,2,1,1
146
- BRDA:107,3,0,0
147
- BRDA:107,3,1,3
148
- BRDA:111,4,0,3
149
- BRDA:111,4,1,0
150
- BRDA:123,5,0,1
151
- BRDA:123,5,1,3
152
- BRDA:138,6,0,72
153
- BRDA:138,6,1,64
154
- BRDA:139,7,0,72
155
- BRDA:139,7,1,66
156
- BRDA:140,8,0,72
157
- BRDA:140,8,1,70
158
- BRDA:141,9,0,4
159
- BRDA:141,9,1,68
160
- BRDA:144,10,0,68
161
- BRDA:144,10,1,68
162
- BRDA:148,11,0,2
163
- BRDA:148,11,1,70
164
- BRDA:150,12,0,6
165
- BRDA:150,12,1,64
166
- BRDA:158,13,0,4
167
- BRDA:158,13,1,68
168
- BRDA:172,14,0,1
169
- BRDA:172,14,1,34
170
- BRDA:193,15,0,3
171
- BRDA:193,15,1,32
172
- BRDA:213,16,0,0
173
- BRDA:213,16,1,1
174
- BRDA:231,17,0,32
175
- BRDA:231,17,1,3
176
- BRDA:231,18,0,35
177
- BRDA:231,18,1,32
178
- BRDA:242,19,0,0
179
- BRDA:242,19,1,36
180
- BRDA:242,20,0,36
181
- BRDA:242,20,1,32
182
- BRDA:246,21,0,4
183
- BRDA:246,21,1,32
184
- BRDA:246,22,0,36
185
- BRDA:246,22,1,4
186
- BRDA:255,23,0,36
187
- BRDA:255,23,1,0
188
- BRDA:263,24,0,36
189
- BRDA:263,24,1,33
190
- BRDA:265,25,0,1
191
- BRDA:265,25,1,35
192
- BRDA:268,26,0,1
193
- BRDA:268,26,1,35
194
- BRDA:273,27,0,3
195
- BRDA:273,27,1,33
196
- BRDA:275,28,0,2
197
- BRDA:275,28,1,31
198
- BRDA:277,29,0,4
199
- BRDA:277,29,1,27
200
- BRDA:279,30,0,2
201
- BRDA:279,30,1,25
202
- BRDA:281,31,0,2
203
- BRDA:281,31,1,23
204
- BRDA:283,32,0,2
205
- BRDA:283,32,1,21
206
- BRDA:285,33,0,4
207
- BRDA:285,33,1,17
208
- BRDA:291,34,0,36
209
- BRDA:291,34,1,36
210
- BRDA:301,35,0,36
211
- BRDA:301,35,1,36
212
- BRF:71
213
- BRH:62
129
+ DA:285,23
130
+ DA:286,2
131
+ DA:287,21
132
+ DA:288,4
133
+ DA:290,17
134
+ DA:293,38
135
+ DA:294,38
136
+ DA:296,38
137
+ DA:297,38
138
+ DA:302,38
139
+ DA:303,38
140
+ LF:93
141
+ LH:81
142
+ BRDA:80,0,0,0
143
+ BRDA:84,1,0,0
144
+ BRDA:84,1,1,0
145
+ BRDA:95,2,0,0
146
+ BRDA:95,2,1,1
147
+ BRDA:108,3,0,0
148
+ BRDA:108,3,1,3
149
+ BRDA:112,4,0,3
150
+ BRDA:112,4,1,0
151
+ BRDA:124,5,0,1
152
+ BRDA:124,5,1,3
153
+ BRDA:139,6,0,76
154
+ BRDA:139,6,1,68
155
+ BRDA:140,7,0,76
156
+ BRDA:140,7,1,70
157
+ BRDA:141,8,0,76
158
+ BRDA:141,8,1,74
159
+ BRDA:142,9,0,4
160
+ BRDA:142,9,1,72
161
+ BRDA:145,10,0,72
162
+ BRDA:145,10,1,72
163
+ BRDA:149,11,0,2
164
+ BRDA:149,11,1,74
165
+ BRDA:151,12,0,6
166
+ BRDA:151,12,1,68
167
+ BRDA:159,13,0,4
168
+ BRDA:159,13,1,72
169
+ BRDA:173,14,0,1
170
+ BRDA:173,14,1,36
171
+ BRDA:194,15,0,3
172
+ BRDA:194,15,1,34
173
+ BRDA:214,16,0,0
174
+ BRDA:214,16,1,1
175
+ BRDA:232,17,0,34
176
+ BRDA:232,17,1,3
177
+ BRDA:232,18,0,37
178
+ BRDA:232,18,1,34
179
+ BRDA:243,19,0,0
180
+ BRDA:243,19,1,38
181
+ BRDA:243,20,0,38
182
+ BRDA:243,20,1,34
183
+ BRDA:247,21,0,4
184
+ BRDA:247,21,1,34
185
+ BRDA:247,22,0,38
186
+ BRDA:247,22,1,4
187
+ BRDA:256,23,0,38
188
+ BRDA:256,23,1,0
189
+ BRDA:264,24,0,38
190
+ BRDA:264,24,1,33
191
+ BRDA:266,25,0,1
192
+ BRDA:266,25,1,37
193
+ BRDA:269,26,0,1
194
+ BRDA:269,26,1,37
195
+ BRDA:273,27,0,38
196
+ BRDA:273,27,1,2
197
+ BRDA:275,28,0,4
198
+ BRDA:275,28,1,34
199
+ BRDA:275,29,0,38
200
+ BRDA:275,29,1,5
201
+ BRDA:277,30,0,2
202
+ BRDA:277,30,1,32
203
+ BRDA:279,31,0,5
204
+ BRDA:279,31,1,27
205
+ BRDA:279,32,0,32
206
+ BRDA:279,32,1,28
207
+ BRDA:281,33,0,2
208
+ BRDA:281,33,1,25
209
+ BRDA:283,34,0,2
210
+ BRDA:283,34,1,23
211
+ BRDA:285,35,0,2
212
+ BRDA:285,35,1,21
213
+ BRDA:287,36,0,4
214
+ BRDA:287,36,1,17
215
+ BRDA:293,37,0,38
216
+ BRDA:293,37,1,38
217
+ BRDA:303,38,0,38
218
+ BRDA:303,38,1,38
219
+ BRF:77
220
+ BRH:68
214
221
  end_of_record
215
222
  TN:
216
- SF:/media/sean/work1/www/react-moment/src/objects.js
223
+ SF:/media/sean/work2/www/react-moment/src/objects.js
217
224
  FN:26,objectKeyFilter
218
225
  FN:30,(anonymous_1)
219
226
  FN:31,(anonymous_2)
220
227
  FNF:3
221
228
  FNH:3
222
- FNDA:37,objectKeyFilter
223
- FNDA:486,(anonymous_1)
224
- FNDA:454,(anonymous_2)
225
- DA:27,37
226
- DA:28,37
227
- DA:29,37
228
- DA:30,486
229
- DA:31,454
230
- DA:33,37
229
+ FNDA:39,objectKeyFilter
230
+ FNDA:516,(anonymous_1)
231
+ FNDA:482,(anonymous_2)
232
+ DA:27,39
233
+ DA:28,39
234
+ DA:29,39
235
+ DA:30,516
236
+ DA:31,482
237
+ DA:33,39
231
238
  LF:6
232
239
  LH:6
233
240
  BRF:0
package/dist/index.d.ts CHANGED
@@ -1,31 +1,69 @@
1
- import * as React from 'react';
1
+ import { Component, ComponentClass, SFC, CSSProperties } from 'react';
2
2
 
3
- export interface MomentProps {
4
- element?: string | React.SFC<any> | React.ComponentClass<any>;
5
- date?: string | number | Array<any> | object;
6
- parse?: string | Array<any>;
7
- format?: string;
8
- ago?: boolean;
9
- fromNow?: boolean;
10
- from?: string | number | Array<any> | object;
11
- toNow?: boolean;
12
- to?: string | number | Array<any> | object;
13
- filter?: (d: string) => string,
14
- calendar?: boolean | object;
15
- diff?: string | number | Array<any> | object;
16
- unit?: string;
17
- decimal?: boolean;
18
- unix?: boolean;
19
- utc?: boolean;
20
- tz?: string;
21
- locale?: string;
22
- interval?: number;
3
+ type elementTypes = string | SFC<any> | ComponentClass<any>;
4
+ type subtractOrAddTypes = {
5
+ years?: number,
6
+ y?: number,
7
+ quarters?: number,
8
+ Q?: number,
9
+ months?: number,
10
+ M?: number,
11
+ weeks?: number,
12
+ w?: number,
13
+ days?: number,
14
+ d?: number,
15
+ hours?: number,
16
+ h?: number,
17
+ minutes?: number,
18
+ m?: number,
19
+ seconds?: number,
20
+ s?: number,
21
+ milliseconds?: number,
22
+ ms?: number
23
+ };
24
+ type dateTypes = string|number|Array<string|number|object>|object;
25
+ type calendarTypes = boolean|object;
23
26
 
24
- children?: string | number;
27
+ export interface MomentProps {
28
+ element?: elementTypes,
29
+ date?: dateTypes,
30
+ parse?: string | Array<any>,
31
+ format?: string,
32
+ ago?: boolean,
33
+ fromNow?: boolean,
34
+ fromNowDuring?: number,
35
+ from?: dateTypes,
36
+ toNow?: boolean,
37
+ to?: dateTypes,
38
+ calendar?: calendarTypes,
39
+ diff?: dateTypes,
40
+ unit?: string,
41
+ decimal?: boolean,
42
+ unix?: boolean,
43
+ utc?: boolean,
44
+ tz?: string,
45
+ locale?: string,
46
+ interval?: number,
47
+ subtract?: subtractOrAddTypes,
48
+ add?: subtractOrAddTypes,
49
+ children?: string | number,
50
+ style?: CSSProperties,
51
+ filter?: (date: string) => string,
52
+ onChange?: (content:any) => any
25
53
  }
26
54
 
27
- declare class Moment extends React.Component<MomentProps, any> {
28
-
55
+ declare class Moment extends Component<MomentProps, any> {
56
+ constructor(props:MomentProps);
57
+ public static globalMoment: Function;
58
+ public static globalLocale: string;
59
+ public static globalFormat: string;
60
+ public static globalParse: string;
61
+ public static globalTimezone: string;
62
+ public static globalElement: any;
63
+ public static globalFilter: Function;
64
+ public static startPooledTimer(interval?: number): void;
65
+ public static clearPooledTimer(): void;
66
+ public static getDatetime(props: MomentProps): any;
29
67
  }
30
68
 
31
69
  export default Moment;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("moment"),require("react")):"function"==typeof define&&define.amd?define(["moment","react"],t):"object"==typeof exports?exports["react-moment"]=t(require("moment"),require("react")):e["react-moment"]=t(e.moment,e.react)}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(13),f=r(c),s=n(11),p=r(s),d=n(12),y=r(d),m=n(6),v=[p.default.string,p.default.number,p.default.array,p.default.object],h=[p.default.string,p.default.array],b=[p.default.object,p.default.bool],g=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setTimer=function(){n.clearTimer();var e=n.props.interval;t.pooledTimer||0===e||(n.timer=setInterval(function(){n.update(n.props)},e))},n.clearTimer=function(){!t.pooledTimer&&n.timer&&(clearInterval(n.timer),n.timer=null),t.pooledTimer&&!n.timer&&t.removePooledElement(n)},t.globalMoment||(t.globalMoment=y.default),n.state={content:""},n.timer=null,n}return a(t,e),l(t,null,[{key:"startPooledTimer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6e4;t.clearPooledTimer(),t.pooledTimer=setInterval(function(){t.pooledElements.forEach(function(e){0!==e.props.interval&&e.update()})},e)}},{key:"clearPooledTimer",value:function(){t.pooledTimer&&(clearInterval(t.pooledTimer),t.pooledTimer=null,t.pooledElements=[])}},{key:"pushPooledElement",value:function(e){return e instanceof t?void(t.pooledElements.indexOf(e)===-1&&t.pooledElements.push(e)):void console.error("Element not an instance of Moment.")}},{key:"removePooledElement",value:function(e){var n=t.pooledElements.indexOf(e);n!==-1&&t.pooledElements.splice(n,1)}},{key:"getDatetime",value:function(e){var n=e.utc,r=e.unix,o=e.tz,i=e.date,a=e.locale,u=e.parse;i=i||e.children,u=u||t.globalParse,a=t.globalLocale?t.globalLocale:a||t.globalMoment.locale();var l=null;return l=n?t.globalMoment.utc(i,u,a):r?t.globalMoment(1e3*i,u,a):t.globalMoment(i,u,a),o&&(l=l.tz(o)),l}}]),l(t,[{key:"componentWillMount",value:function(){this.update(this.props)}},{key:"componentDidMount",value:function(){this.setTimer(),t.pooledTimer&&t.pushPooledElement(this)}},{key:"componentWillReceiveProps",value:function(e){this.update(e)}},{key:"componentDidUpdate",value:function(e){e.interval!==this.props.interval&&this.setTimer()}},{key:"componentWillUnmount",value:function(){this.clearTimer()}},{key:"update",value:function(e){var n=this;e=e||this.props;var r=e,o=r.fromNow,i=r.from,a=r.add,u=r.subtract,l=r.toNow,c=r.to,f=r.ago,s=r.calendar,p=r.diff,d=r.unit,y=r.decimal,m=e,v=m.format;v=v||t.globalFormat;var h=t.getDatetime(e);a&&h.add(a),u&&h.subtract(u);var b="";b=v?h.format(v):i?h.from(i,f):o?h.fromNow(f):c?h.to(c,f):l?h.toNow(f):s?h.calendar(null,s):p?h.diff(p,d,y):h.toString();var g=t.globalFilter||this.props.filter;b=g(b),this.setState({content:b},function(){n.props.onChange(b)})}},{key:"render",value:function(){var e=(0,m.objectKeyFilter)(this.props,t.propTypes);return f.default.createElement(t.globalElement||this.props.element,u({dateTime:t.getDatetime(this.props)},e),this.state.content)}}]),t}(f.default.Component);g.propTypes={element:p.default.any,date:p.default.oneOfType(v),parse:p.default.oneOfType(h),format:p.default.string,add:p.default.object,subtract:p.default.object,ago:p.default.bool,fromNow:p.default.bool,from:p.default.oneOfType(v),toNow:p.default.bool,to:p.default.oneOfType(v),calendar:p.default.oneOfType(b),unix:p.default.bool,utc:p.default.bool,tz:p.default.string,locale:p.default.string,interval:p.default.number,diff:p.default.oneOfType(v),unit:p.default.string,decimal:p.default.bool,filter:p.default.func,onChange:p.default.func},g.defaultProps={element:"time",fromNow:!1,toNow:!1,calendar:!1,ago:!1,unix:!1,utc:!1,unit:null,decimal:!1,interval:6e4,filter:function(e){return e},onChange:function(){}},g.globalMoment=null,g.globalLocale=null,g.globalFormat=null,g.globalParse=null,g.globalFilter=null,g.globalElement=null,g.pooledElements=[],g.pooledTimer=null,t.default=g},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(f===setTimeout)return setTimeout(e,0);if((f===n||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function i(e){if(s===clearTimeout)return clearTimeout(e);if((s===r||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(e);try{return s(e)}catch(t){try{return s.call(null,e)}catch(t){return s.call(this,e)}}}function a(){m&&d&&(m=!1,d.length?y=d.concat(y):v=-1,y.length&&u())}function u(){if(!m){var e=o(a);m=!0;for(var t=y.length;t;){for(d=y,y=[];++v<t;)d&&d[v].run();v=-1,t=y.length}d=null,m=!1,i(e)}}function l(e,t){this.fun=e,this.array=t}function c(){}var f,s,p=e.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:n}catch(e){f=n}try{s="function"==typeof clearTimeout?clearTimeout:r}catch(e){s=r}}();var d,y=[],m=!1,v=-1;p.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];y.push(new l(e,t)),1!==y.length||m||o(u)},l.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.prependListener=c,p.prependOnceListener=c,p.listeners=function(e){return[]},p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){(function(t){"use strict";function n(e,t,n,o,i,a,u,l){if(r(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[n,o,i,a,u,l],s=0;c=new Error(t.replace(/%s/g,function(){return f[s++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var r=function(e){};"production"!==t.env.NODE_ENV&&(r=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")}),e.exports=n}).call(t,n(1))},function(e,t){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=n},function(e,t,n){(function(t){"use strict";var r=n(2),o=r;if("production"!==t.env.NODE_ENV){var i=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,function(){return n[o++]});"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}};o=function(e,t){if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==t.indexOf("Failed Composite propType: ")&&!e){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];i.apply(void 0,[t].concat(r))}}}e.exports=o}).call(t,n(1))},function(e,t){"use strict";function n(e,t){var n=Object.keys(t),r=Object.assign({},e);return Object.keys(r).filter(function(e){return n.indexOf(e)!==-1}).forEach(function(e){return delete r[e]}),r}Object.defineProperty(t,"__esModule",{value:!0}),t.objectKeyFilter=n},function(e,t){/*
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("moment"),require("react")):"function"==typeof define&&define.amd?define(["moment","react"],t):"object"==typeof exports?exports["react-moment"]=t(require("moment"),require("react")):e["react-moment"]=t(e.moment,e.react)}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(13),f=r(c),s=n(11),p=r(s),d=n(12),m=r(d),y=n(6),v=[p.default.string,p.default.number,p.default.array,p.default.object],b=[p.default.string,p.default.array],h=[p.default.object,p.default.bool],g=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setTimer=function(){n.clearTimer();var e=n.props.interval;t.pooledTimer||0===e||(n.timer=setInterval(function(){n.update(n.props)},e))},n.clearTimer=function(){!t.pooledTimer&&n.timer&&(clearInterval(n.timer),n.timer=null),t.pooledTimer&&!n.timer&&t.removePooledElement(n)},t.globalMoment||(t.globalMoment=m.default),n.state={content:""},n.timer=null,n}return a(t,e),l(t,null,[{key:"startPooledTimer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6e4;t.clearPooledTimer(),t.pooledTimer=setInterval(function(){t.pooledElements.forEach(function(e){0!==e.props.interval&&e.update()})},e)}},{key:"clearPooledTimer",value:function(){t.pooledTimer&&(clearInterval(t.pooledTimer),t.pooledTimer=null,t.pooledElements=[])}},{key:"pushPooledElement",value:function(e){return e instanceof t?void(t.pooledElements.indexOf(e)===-1&&t.pooledElements.push(e)):void console.error("Element not an instance of Moment.")}},{key:"removePooledElement",value:function(e){var n=t.pooledElements.indexOf(e);n!==-1&&t.pooledElements.splice(n,1)}},{key:"getDatetime",value:function(e){var n=e.utc,r=e.unix,o=e.date,i=e.locale,a=e.parse,u=e.tz;o=o||e.children,a=a||t.globalParse,u=u||t.globalTimezone,i=t.globalLocale?t.globalLocale:i||t.globalMoment.locale();var l=null;return l=n?t.globalMoment.utc(o,a,i):r?t.globalMoment(1e3*o,a,i):t.globalMoment(o,a,i),u&&(l=l.tz(u)),l}}]),l(t,[{key:"componentWillMount",value:function(){this.update(this.props)}},{key:"componentDidMount",value:function(){this.setTimer(),t.pooledTimer&&t.pushPooledElement(this)}},{key:"componentWillReceiveProps",value:function(e){this.update(e)}},{key:"componentDidUpdate",value:function(e){e.interval!==this.props.interval&&this.setTimer()}},{key:"componentWillUnmount",value:function(){this.clearTimer()}},{key:"update",value:function(e){var n=this;e=e||this.props;var r=e,o=r.fromNow,i=r.fromNowDuring,a=r.from,u=r.add,l=r.subtract,c=r.toNow,f=r.to,s=r.ago,p=r.calendar,d=r.diff,y=r.unit,v=r.decimal,b=e,h=b.format;h=h||t.globalFormat;var g=t.getDatetime(e);u&&g.add(u),l&&g.subtract(l);var O=Boolean(i)&&-g.diff((0,m.default)())<i,T="";T=h&&!O?g.format(h):a?g.from(a,s):o||O?g.fromNow(s):f?g.to(f,s):c?g.toNow(s):p?g.calendar(null,p):d?g.diff(d,y,v):g.toString();var w=t.globalFilter||this.props.filter;T=w(T),this.setState({content:T},function(){n.props.onChange(T)})}},{key:"render",value:function(){var e=(0,y.objectKeyFilter)(this.props,t.propTypes);return f.default.createElement(t.globalElement||this.props.element,u({dateTime:t.getDatetime(this.props)},e),this.state.content)}}]),t}(f.default.Component);g.propTypes={element:p.default.any,date:p.default.oneOfType(v),parse:p.default.oneOfType(b),format:p.default.string,add:p.default.object,subtract:p.default.object,ago:p.default.bool,fromNow:p.default.bool,fromNowDuring:p.default.number,from:p.default.oneOfType(v),toNow:p.default.bool,to:p.default.oneOfType(v),calendar:p.default.oneOfType(h),unix:p.default.bool,utc:p.default.bool,tz:p.default.string,locale:p.default.string,interval:p.default.number,diff:p.default.oneOfType(v),unit:p.default.string,decimal:p.default.bool,filter:p.default.func,onChange:p.default.func},g.defaultProps={element:"time",fromNow:!1,toNow:!1,calendar:!1,ago:!1,unix:!1,utc:!1,unit:null,decimal:!1,interval:6e4,filter:function(e){return e},onChange:function(){}},g.globalMoment=null,g.globalLocale=null,g.globalFormat=null,g.globalParse=null,g.globalFilter=null,g.globalElement=null,g.globalTimezone=null,g.pooledElements=[],g.pooledTimer=null,t.default=g},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(f===setTimeout)return setTimeout(e,0);if((f===n||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function i(e){if(s===clearTimeout)return clearTimeout(e);if((s===r||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(e);try{return s(e)}catch(t){try{return s.call(null,e)}catch(t){return s.call(this,e)}}}function a(){y&&d&&(y=!1,d.length?m=d.concat(m):v=-1,m.length&&u())}function u(){if(!y){var e=o(a);y=!0;for(var t=m.length;t;){for(d=m,m=[];++v<t;)d&&d[v].run();v=-1,t=m.length}d=null,y=!1,i(e)}}function l(e,t){this.fun=e,this.array=t}function c(){}var f,s,p=e.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:n}catch(e){f=n}try{s="function"==typeof clearTimeout?clearTimeout:r}catch(e){s=r}}();var d,m=[],y=!1,v=-1;p.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];m.push(new l(e,t)),1!==m.length||y||o(u)},l.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.prependListener=c,p.prependOnceListener=c,p.listeners=function(e){return[]},p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){(function(t){"use strict";function n(e,t,n,o,i,a,u,l){if(r(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[n,o,i,a,u,l],s=0;c=new Error(t.replace(/%s/g,function(){return f[s++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var r=function(e){};"production"!==t.env.NODE_ENV&&(r=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")}),e.exports=n}).call(t,n(1))},function(e,t){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=n},function(e,t,n){(function(t){"use strict";var r=n(2),o=r;if("production"!==t.env.NODE_ENV){var i=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,function(){return n[o++]});"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}};o=function(e,t){if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==t.indexOf("Failed Composite propType: ")&&!e){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];i.apply(void 0,[t].concat(r))}}}e.exports=o}).call(t,n(1))},function(e,t){"use strict";function n(e,t){var n=Object.keys(t),r=Object.assign({},e);return Object.keys(r).filter(function(e){return n.indexOf(e)!==-1}).forEach(function(e){return delete r[e]}),r}Object.defineProperty(t,"__esModule",{value:!0}),t.objectKeyFilter=n},function(e,t){/*
2
2
  object-assign
3
3
  (c) Sindre Sorhus
4
4
  @license MIT
5
5
  */
6
- "use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,u,l=n(e),c=1;c<arguments.length;c++){r=Object(arguments[c]);for(var f in r)i.call(r,f)&&(l[f]=r[f]);if(o){u=o(r);for(var s=0;s<u.length;s++)a.call(r,u[s])&&(l[u[s]]=r[u[s]])}}return l}},function(e,t,n){(function(t){"use strict";function r(e,n,r,l,c){if("production"!==t.env.NODE_ENV)for(var f in e)if(e.hasOwnProperty(f)){var s;try{o("function"==typeof e[f],"%s: %s type `%s` is invalid; it must be a function, usually from the `prop-types` package, but received `%s`.",l||"React class",r,f,typeof e[f]),s=e[f](n,f,l,r,null,a)}catch(e){s=e}if(i(!s||s instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",l||"React class",r,f,typeof s),s instanceof Error&&!(s.message in u)){u[s.message]=!0;var p=c?c():"";i(!1,"Failed %s type: %s%s",r,s.message,null!=p?p:"")}}}if("production"!==t.env.NODE_ENV)var o=n(3),i=n(5),a=n(4),u={};e.exports=r}).call(t,n(1))},function(e,t,n){"use strict";var r=n(2),o=n(3),i=n(4);e.exports=function(){function e(e,t,n,r,a,u){u!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){(function(t){"use strict";var r=n(2),o=n(3),i=n(5),a=n(7),u=n(4),l=n(8);e.exports=function(e,n){function c(e){var t=e&&(R&&e[R]||e[I]);if("function"==typeof t)return t}function f(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function s(e){this.message=e,this.stack=""}function p(e){function r(r,c,f,p,d,y,m){if(p=p||S,y=y||f,m!==u)if(n)o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==t.env.NODE_ENV&&"undefined"!=typeof console){var v=p+":"+f;!a[v]&&l<3&&(i(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",y,p),a[v]=!0,l++)}return null==c[f]?r?new s(null===c[f]?"The "+d+" `"+y+"` is marked as required "+("in `"+p+"`, but its value is `null`."):"The "+d+" `"+y+"` is marked as required in "+("`"+p+"`, but its value is `undefined`.")):null:e(c,f,p,d,y)}if("production"!==t.env.NODE_ENV)var a={},l=0;var c=r.bind(null,!1);return c.isRequired=r.bind(null,!0),c}function d(e){function t(t,n,r,o,i,a){var u=t[n],l=P(u);if(l!==e){var c=k(u);return new s("Invalid "+o+" `"+i+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return p(t)}function y(){return p(r.thatReturnsNull)}function m(e){function t(t,n,r,o,i){if("function"!=typeof e)return new s("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a)){var l=P(a);return new s("Invalid "+o+" `"+i+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an array."))}for(var c=0;c<a.length;c++){var f=e(a,c,r,o,i+"["+c+"]",u);if(f instanceof Error)return f}return null}return p(t)}function v(){function t(t,n,r,o,i){var a=t[n];if(!e(a)){var u=P(a);return new s("Invalid "+o+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return p(t)}function h(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||S,u=_(t[n]);return new s("Invalid "+o+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("instance of `"+a+"`."))}return null}return p(t)}function b(e){function n(t,n,r,o,i){for(var a=t[n],u=0;u<e.length;u++)if(f(a,e[u]))return null;var l=JSON.stringify(e);return new s("Invalid "+o+" `"+i+"` of value `"+a+"` "+("supplied to `"+r+"`, expected one of "+l+"."))}return Array.isArray(e)?p(n):("production"!==t.env.NODE_ENV?i(!1,"Invalid argument supplied to oneOf, expected an instance of array."):void 0,r.thatReturnsNull)}function g(e){function t(t,n,r,o,i){if("function"!=typeof e)return new s("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var a=t[n],l=P(a);if("object"!==l)return new s("Invalid "+o+" `"+i+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an object."));for(var c in a)if(a.hasOwnProperty(c)){var f=e(a,c,r,o,i+"."+c,u);if(f instanceof Error)return f}return null}return p(t)}function O(e){function n(t,n,r,o,i){for(var a=0;a<e.length;a++){var l=e[a];if(null==l(t,n,r,o,i,u))return null}return new s("Invalid "+o+" `"+i+"` supplied to "+("`"+r+"`."))}if(!Array.isArray(e))return"production"!==t.env.NODE_ENV?i(!1,"Invalid argument supplied to oneOfType, expected an instance of array."):void 0,r.thatReturnsNull;for(var o=0;o<e.length;o++){var a=e[o];if("function"!=typeof a)return i(!1,"Invalid argument supplied to oneOfType. Expected an array of check functions, but received %s at index %s.",N(a),o),r.thatReturnsNull}return p(n)}function T(){function e(e,t,n,r,o){return j(e[t])?null:new s("Invalid "+r+" `"+o+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return p(e)}function w(e){function t(t,n,r,o,i){var a=t[n],l=P(a);if("object"!==l)return new s("Invalid "+o+" `"+i+"` of type `"+l+"` "+("supplied to `"+r+"`, expected `object`."));for(var c in e){var f=e[c];if(f){var p=f(a,c,r,o,i+"."+c,u);if(p)return p}}return null}return p(t)}function E(e){function t(t,n,r,o,i){var l=t[n],c=P(l);if("object"!==c)return new s("Invalid "+o+" `"+i+"` of type `"+c+"` "+("supplied to `"+r+"`, expected `object`."));var f=a({},t[n],e);for(var p in f){var d=e[p];if(!d)return new s("Invalid "+o+" `"+i+"` key `"+p+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var y=d(l,p,r,o,i+"."+p,u);if(y)return y}return null}return p(t)}function j(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(j);if(null===t||e(t))return!0;var n=c(t);if(!n)return!1;var r,o=n.call(t);if(n!==t.entries){for(;!(r=o.next()).done;)if(!j(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!j(i[1]))return!1}return!0;default:return!1}}function x(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function P(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":x(t,e)?"symbol":t}function k(e){if("undefined"==typeof e||null===e)return""+e;var t=P(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function N(e){var t=k(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function _(e){return e.constructor&&e.constructor.name?e.constructor.name:S}var R="function"==typeof Symbol&&Symbol.iterator,I="@@iterator",S="<<anonymous>>",D={array:d("array"),bool:d("boolean"),func:d("function"),number:d("number"),object:d("object"),string:d("string"),symbol:d("symbol"),any:y(),arrayOf:m,element:v(),instanceOf:h,node:T(),objectOf:g,oneOf:b,oneOfType:O,shape:w,exact:E};return s.prototype=Error.prototype,D.checkPropTypes=l,D.PropTypes=D,D}}).call(t,n(1))},function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},i=!0;e.exports=n(10)(o,i)}else e.exports=n(9)()}).call(t,n(1))},function(t,n){t.exports=e},function(e,n){e.exports=t}])});
6
+ "use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,u,l=n(e),c=1;c<arguments.length;c++){r=Object(arguments[c]);for(var f in r)i.call(r,f)&&(l[f]=r[f]);if(o){u=o(r);for(var s=0;s<u.length;s++)a.call(r,u[s])&&(l[u[s]]=r[u[s]])}}return l}},function(e,t,n){(function(t){"use strict";function r(e,n,r,l,c){if("production"!==t.env.NODE_ENV)for(var f in e)if(e.hasOwnProperty(f)){var s;try{o("function"==typeof e[f],"%s: %s type `%s` is invalid; it must be a function, usually from the `prop-types` package, but received `%s`.",l||"React class",r,f,typeof e[f]),s=e[f](n,f,l,r,null,a)}catch(e){s=e}if(i(!s||s instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",l||"React class",r,f,typeof s),s instanceof Error&&!(s.message in u)){u[s.message]=!0;var p=c?c():"";i(!1,"Failed %s type: %s%s",r,s.message,null!=p?p:"")}}}if("production"!==t.env.NODE_ENV)var o=n(3),i=n(5),a=n(4),u={};e.exports=r}).call(t,n(1))},function(e,t,n){"use strict";var r=n(2),o=n(3),i=n(4);e.exports=function(){function e(e,t,n,r,a,u){u!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){(function(t){"use strict";var r=n(2),o=n(3),i=n(5),a=n(7),u=n(4),l=n(8);e.exports=function(e,n){function c(e){var t=e&&(R&&e[R]||e[I]);if("function"==typeof t)return t}function f(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function s(e){this.message=e,this.stack=""}function p(e){function r(r,c,f,p,d,m,y){if(p=p||S,m=m||f,y!==u)if(n)o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==t.env.NODE_ENV&&"undefined"!=typeof console){var v=p+":"+f;!a[v]&&l<3&&(i(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",m,p),a[v]=!0,l++)}return null==c[f]?r?new s(null===c[f]?"The "+d+" `"+m+"` is marked as required "+("in `"+p+"`, but its value is `null`."):"The "+d+" `"+m+"` is marked as required in "+("`"+p+"`, but its value is `undefined`.")):null:e(c,f,p,d,m)}if("production"!==t.env.NODE_ENV)var a={},l=0;var c=r.bind(null,!1);return c.isRequired=r.bind(null,!0),c}function d(e){function t(t,n,r,o,i,a){var u=t[n],l=P(u);if(l!==e){var c=N(u);return new s("Invalid "+o+" `"+i+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return p(t)}function m(){return p(r.thatReturnsNull)}function y(e){function t(t,n,r,o,i){if("function"!=typeof e)return new s("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a)){var l=P(a);return new s("Invalid "+o+" `"+i+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an array."))}for(var c=0;c<a.length;c++){var f=e(a,c,r,o,i+"["+c+"]",u);if(f instanceof Error)return f}return null}return p(t)}function v(){function t(t,n,r,o,i){var a=t[n];if(!e(a)){var u=P(a);return new s("Invalid "+o+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return p(t)}function b(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||S,u=_(t[n]);return new s("Invalid "+o+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("instance of `"+a+"`."))}return null}return p(t)}function h(e){function n(t,n,r,o,i){for(var a=t[n],u=0;u<e.length;u++)if(f(a,e[u]))return null;var l=JSON.stringify(e);return new s("Invalid "+o+" `"+i+"` of value `"+a+"` "+("supplied to `"+r+"`, expected one of "+l+"."))}return Array.isArray(e)?p(n):("production"!==t.env.NODE_ENV?i(!1,"Invalid argument supplied to oneOf, expected an instance of array."):void 0,r.thatReturnsNull)}function g(e){function t(t,n,r,o,i){if("function"!=typeof e)return new s("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var a=t[n],l=P(a);if("object"!==l)return new s("Invalid "+o+" `"+i+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an object."));for(var c in a)if(a.hasOwnProperty(c)){var f=e(a,c,r,o,i+"."+c,u);if(f instanceof Error)return f}return null}return p(t)}function O(e){function n(t,n,r,o,i){for(var a=0;a<e.length;a++){var l=e[a];if(null==l(t,n,r,o,i,u))return null}return new s("Invalid "+o+" `"+i+"` supplied to "+("`"+r+"`."))}if(!Array.isArray(e))return"production"!==t.env.NODE_ENV?i(!1,"Invalid argument supplied to oneOfType, expected an instance of array."):void 0,r.thatReturnsNull;for(var o=0;o<e.length;o++){var a=e[o];if("function"!=typeof a)return i(!1,"Invalid argument supplied to oneOfType. Expected an array of check functions, but received %s at index %s.",k(a),o),r.thatReturnsNull}return p(n)}function T(){function e(e,t,n,r,o){return j(e[t])?null:new s("Invalid "+r+" `"+o+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return p(e)}function w(e){function t(t,n,r,o,i){var a=t[n],l=P(a);if("object"!==l)return new s("Invalid "+o+" `"+i+"` of type `"+l+"` "+("supplied to `"+r+"`, expected `object`."));for(var c in e){var f=e[c];if(f){var p=f(a,c,r,o,i+"."+c,u);if(p)return p}}return null}return p(t)}function E(e){function t(t,n,r,o,i){var l=t[n],c=P(l);if("object"!==c)return new s("Invalid "+o+" `"+i+"` of type `"+c+"` "+("supplied to `"+r+"`, expected `object`."));var f=a({},t[n],e);for(var p in f){var d=e[p];if(!d)return new s("Invalid "+o+" `"+i+"` key `"+p+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=d(l,p,r,o,i+"."+p,u);if(m)return m}return null}return p(t)}function j(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(j);if(null===t||e(t))return!0;var n=c(t);if(!n)return!1;var r,o=n.call(t);if(n!==t.entries){for(;!(r=o.next()).done;)if(!j(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!j(i[1]))return!1}return!0;default:return!1}}function x(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function P(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":x(t,e)?"symbol":t}function N(e){if("undefined"==typeof e||null===e)return""+e;var t=P(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function k(e){var t=N(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function _(e){return e.constructor&&e.constructor.name?e.constructor.name:S}var R="function"==typeof Symbol&&Symbol.iterator,I="@@iterator",S="<<anonymous>>",D={array:d("array"),bool:d("boolean"),func:d("function"),number:d("number"),object:d("object"),string:d("string"),symbol:d("symbol"),any:m(),arrayOf:y,element:v(),instanceOf:b,node:T(),objectOf:g,oneOf:h,oneOfType:O,shape:w,exact:E};return s.prototype=Error.prototype,D.checkPropTypes=l,D.PropTypes=D,D}}).call(t,n(1))},function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},i=!0;e.exports=n(10)(o,i)}else e.exports=n(9)()}).call(t,n(1))},function(t,n){t.exports=e},function(e,n){e.exports=t}])});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-moment",
3
3
  "description": "React component for the moment date library.",
4
- "version": "0.7.5",
4
+ "version": "0.7.9",
5
5
  "author": {
6
6
  "name": "Sean Hickey",
7
7
  "web": "http://headzoo.io"
package/src/index.jsx CHANGED
@@ -270,9 +270,9 @@ export default class Moment extends React.Component {
270
270
  datetime.subtract(subtract);
271
271
  }
272
272
 
273
- const fromNowPeriod = Boolean(fromNowDuring) && - datetime.diff(moment()) < fromNowDuring;
273
+ const fromNowPeriod = Boolean(fromNowDuring) && -datetime.diff(moment()) < fromNowDuring;
274
274
  let content = '';
275
- if (format && !fromNowPeriod ) {
275
+ if (format && !fromNowPeriod) {
276
276
  content = datetime.format(format);
277
277
  } else if (from) {
278
278
  content = datetime.from(from, ago);