aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/common.js
diff options
context:
space:
mode:
Diffstat (limited to 'examples/common.js')
-rw-r--r--examples/common.js11752
1 files changed, 6187 insertions, 5565 deletions
diff --git a/examples/common.js b/examples/common.js
index 20a0b7d..3471ad5 100644
--- a/examples/common.js
+++ b/examples/common.js
@@ -30,7 +30,7 @@
30/******/ // "0" means "already loaded" 30/******/ // "0" means "already loaded"
31/******/ // Array means "loading", array contains callbacks 31/******/ // Array means "loading", array contains callbacks
32/******/ var installedChunks = { 32/******/ var installedChunks = {
33/******/ 4:0 33/******/ 5:0
34/******/ }; 34/******/ };
35/******/ 35/******/
36/******/ // The require function 36/******/ // The require function
@@ -76,7 +76,7 @@
76/******/ script.charset = 'utf-8'; 76/******/ script.charset = 'utf-8';
77/******/ script.async = true; 77/******/ script.async = true;
78/******/ 78/******/
79/******/ script.src = __webpack_require__.p + "" + chunkId + "." + ({"0":"disabled","1":"hidden","2":"pick-time","3":"value-and-defaultValue"}[chunkId]||chunkId) + ".js"; 79/******/ script.src = __webpack_require__.p + "" + chunkId + "." + ({"0":"disabled","1":"format","2":"hidden","3":"pick-time","4":"value-and-defaultValue"}[chunkId]||chunkId) + ".js";
80/******/ head.appendChild(script); 80/******/ head.appendChild(script);
81/******/ } 81/******/ }
82/******/ }; 82/******/ };
@@ -133,10 +133,10 @@
133 var ReactClass = __webpack_require__(23); 133 var ReactClass = __webpack_require__(23);
134 var ReactDOMFactories = __webpack_require__(28); 134 var ReactDOMFactories = __webpack_require__(28);
135 var ReactElement = __webpack_require__(11); 135 var ReactElement = __webpack_require__(11);
136 var ReactPropTypes = __webpack_require__(34); 136 var ReactPropTypes = __webpack_require__(33);
137 var ReactVersion = __webpack_require__(35); 137 var ReactVersion = __webpack_require__(34);
138 138
139 var onlyChild = __webpack_require__(36); 139 var onlyChild = __webpack_require__(35);
140 var warning = __webpack_require__(13); 140 var warning = __webpack_require__(13);
141 141
142 var createElement = ReactElement.createElement; 142 var createElement = ReactElement.createElement;
@@ -144,7 +144,7 @@
144 var cloneElement = ReactElement.cloneElement; 144 var cloneElement = ReactElement.cloneElement;
145 145
146 if (process.env.NODE_ENV !== 'production') { 146 if (process.env.NODE_ENV !== 'production') {
147 var ReactElementValidator = __webpack_require__(30); 147 var ReactElementValidator = __webpack_require__(29);
148 createElement = ReactElementValidator.createElement; 148 createElement = ReactElementValidator.createElement;
149 createFactory = ReactElementValidator.createFactory; 149 createFactory = ReactElementValidator.createFactory;
150 cloneElement = ReactElementValidator.cloneElement; 150 cloneElement = ReactElementValidator.cloneElement;
@@ -218,35 +218,83 @@
218 var cachedSetTimeout; 218 var cachedSetTimeout;
219 var cachedClearTimeout; 219 var cachedClearTimeout;
220 220
221 function defaultSetTimout() {
222 throw new Error('setTimeout has not been defined');
223 }
224 function defaultClearTimeout () {
225 throw new Error('clearTimeout has not been defined');
226 }
221 (function () { 227 (function () {
222 try { 228 try {
223 cachedSetTimeout = setTimeout; 229 if (typeof setTimeout === 'function') {
224 } catch (e) { 230 cachedSetTimeout = setTimeout;
225 cachedSetTimeout = function () { 231 } else {
226 throw new Error('setTimeout is not defined'); 232 cachedSetTimeout = defaultSetTimout;
227 } 233 }
234 } catch (e) {
235 cachedSetTimeout = defaultSetTimout;
228 } 236 }
229 try { 237 try {
230 cachedClearTimeout = clearTimeout; 238 if (typeof clearTimeout === 'function') {
231 } catch (e) { 239 cachedClearTimeout = clearTimeout;
232 cachedClearTimeout = function () { 240 } else {
233 throw new Error('clearTimeout is not defined'); 241 cachedClearTimeout = defaultClearTimeout;
234 } 242 }
243 } catch (e) {
244 cachedClearTimeout = defaultClearTimeout;
235 } 245 }
236 } ()) 246 } ())
237 function runTimeout(fun) { 247 function runTimeout(fun) {
238 if (cachedSetTimeout === setTimeout) { 248 if (cachedSetTimeout === setTimeout) {
249 //normal enviroments in sane situations
239 return setTimeout(fun, 0); 250 return setTimeout(fun, 0);
240 } else {
241 return cachedSetTimeout.call(null, fun, 0);
242 } 251 }
252 // if setTimeout wasn't available but was latter defined
253 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
254 cachedSetTimeout = setTimeout;
255 return setTimeout(fun, 0);
256 }
257 try {
258 // when when somebody has screwed with setTimeout but no I.E. maddness
259 return cachedSetTimeout(fun, 0);
260 } catch(e){
261 try {
262 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
263 return cachedSetTimeout.call(null, fun, 0);
264 } catch(e){
265 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
266 return cachedSetTimeout.call(this, fun, 0);
267 }
268 }
269
270
243 } 271 }
244 function runClearTimeout(marker) { 272 function runClearTimeout(marker) {
245 if (cachedClearTimeout === clearTimeout) { 273 if (cachedClearTimeout === clearTimeout) {
246 clearTimeout(marker); 274 //normal enviroments in sane situations
247 } else { 275 return clearTimeout(marker);
248 cachedClearTimeout.call(null, marker);
249 } 276 }
277 // if clearTimeout wasn't available but was latter defined
278 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
279 cachedClearTimeout = clearTimeout;
280 return clearTimeout(marker);
281 }
282 try {
283 // when when somebody has screwed with setTimeout but no I.E. maddness
284 return cachedClearTimeout(marker);
285 } catch (e){
286 try {
287 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
288 return cachedClearTimeout.call(null, marker);
289 } catch (e){
290 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
291 // Some versions of I.E. have different rules for clearTimeout vs setTimeout
292 return cachedClearTimeout.call(this, marker);
293 }
294 }
295
296
297
250 } 298 }
251 var queue = []; 299 var queue = [];
252 var draining = false; 300 var draining = false;
@@ -914,6 +962,34 @@
914 return config.key !== undefined; 962 return config.key !== undefined;
915 } 963 }
916 964
965 function defineKeyPropWarningGetter(props, displayName) {
966 var warnAboutAccessingKey = function () {
967 if (!specialPropKeyWarningShown) {
968 specialPropKeyWarningShown = true;
969 process.env.NODE_ENV !== 'production' ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
970 }
971 };
972 warnAboutAccessingKey.isReactWarning = true;
973 Object.defineProperty(props, 'key', {
974 get: warnAboutAccessingKey,
975 configurable: true
976 });
977 }
978
979 function defineRefPropWarningGetter(props, displayName) {
980 var warnAboutAccessingRef = function () {
981 if (!specialPropRefWarningShown) {
982 specialPropRefWarningShown = true;
983 process.env.NODE_ENV !== 'production' ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
984 }
985 };
986 warnAboutAccessingRef.isReactWarning = true;
987 Object.defineProperty(props, 'ref', {
988 get: warnAboutAccessingRef,
989 configurable: true
990 });
991 }
992
917 /** 993 /**
918 * Factory method to create a new React element. This no longer adheres to 994 * Factory method to create a new React element. This no longer adheres to
919 * the class pattern, so do not use new to call it. Also, no instanceof check 995 * the class pattern, so do not use new to call it. Also, no instanceof check
@@ -1020,14 +1096,6 @@
1020 var source = null; 1096 var source = null;
1021 1097
1022 if (config != null) { 1098 if (config != null) {
1023 if (process.env.NODE_ENV !== 'production') {
1024 process.env.NODE_ENV !== 'production' ? warning(
1025 /* eslint-disable no-proto */
1026 config.__proto__ == null || config.__proto__ === Object.prototype,
1027 /* eslint-enable no-proto */
1028 'React.createElement(...): Expected props argument to be a plain object. ' + 'Properties defined in its prototype chain will be ignored.') : void 0;
1029 }
1030
1031 if (hasValidRef(config)) { 1099 if (hasValidRef(config)) {
1032 ref = config.ref; 1100 ref = config.ref;
1033 } 1101 }
@@ -1068,39 +1136,15 @@
1068 } 1136 }
1069 } 1137 }
1070 if (process.env.NODE_ENV !== 'production') { 1138 if (process.env.NODE_ENV !== 'production') {
1071 var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; 1139 if (key || ref) {
1072 1140 if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {
1073 // Create dummy `key` and `ref` property to `props` to warn users against its use 1141 var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
1074 var warnAboutAccessingKey = function () { 1142 if (key) {
1075 if (!specialPropKeyWarningShown) { 1143 defineKeyPropWarningGetter(props, displayName);
1076 specialPropKeyWarningShown = true; 1144 }
1077 process.env.NODE_ENV !== 'production' ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0; 1145 if (ref) {
1078 } 1146 defineRefPropWarningGetter(props, displayName);
1079 return undefined; 1147 }
1080 };
1081 warnAboutAccessingKey.isReactWarning = true;
1082
1083 var warnAboutAccessingRef = function () {
1084 if (!specialPropRefWarningShown) {
1085 specialPropRefWarningShown = true;
1086 process.env.NODE_ENV !== 'production' ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
1087 }
1088 return undefined;
1089 };
1090 warnAboutAccessingRef.isReactWarning = true;
1091
1092 if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {
1093 if (!props.hasOwnProperty('key')) {
1094 Object.defineProperty(props, 'key', {
1095 get: warnAboutAccessingKey,
1096 configurable: true
1097 });
1098 }
1099 if (!props.hasOwnProperty('ref')) {
1100 Object.defineProperty(props, 'ref', {
1101 get: warnAboutAccessingRef,
1102 configurable: true
1103 });
1104 } 1148 }
1105 } 1149 }
1106 } 1150 }
@@ -1152,14 +1196,6 @@
1152 var owner = element._owner; 1196 var owner = element._owner;
1153 1197
1154 if (config != null) { 1198 if (config != null) {
1155 if (process.env.NODE_ENV !== 'production') {
1156 process.env.NODE_ENV !== 'production' ? warning(
1157 /* eslint-disable no-proto */
1158 config.__proto__ == null || config.__proto__ === Object.prototype,
1159 /* eslint-enable no-proto */
1160 'React.cloneElement(...): Expected props argument to be a plain object. ' + 'Properties defined in its prototype chain will be ignored.') : void 0;
1161 }
1162
1163 if (hasValidRef(config)) { 1199 if (hasValidRef(config)) {
1164 // Silently steal the ref from the parent. 1200 // Silently steal the ref from the parent.
1165 ref = config.ref; 1201 ref = config.ref;
@@ -1282,20 +1318,12 @@
1282 var warning = emptyFunction; 1318 var warning = emptyFunction;
1283 1319
1284 if (process.env.NODE_ENV !== 'production') { 1320 if (process.env.NODE_ENV !== 'production') {
1285 warning = function warning(condition, format) { 1321 (function () {
1286 for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { 1322 var printWarning = function printWarning(format) {
1287 args[_key - 2] = arguments[_key]; 1323 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1288 } 1324 args[_key - 1] = arguments[_key];
1289 1325 }
1290 if (format === undefined) {
1291 throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
1292 }
1293
1294 if (format.indexOf('Failed Composite propType: ') === 0) {
1295 return; // Ignore CompositeComponent proptype check.
1296 }
1297 1326
1298 if (!condition) {
1299 var argIndex = 0; 1327 var argIndex = 0;
1300 var message = 'Warning: ' + format.replace(/%s/g, function () { 1328 var message = 'Warning: ' + format.replace(/%s/g, function () {
1301 return args[argIndex++]; 1329 return args[argIndex++];
@@ -1309,8 +1337,26 @@
1309 // to find the callsite that caused this warning to fire. 1337 // to find the callsite that caused this warning to fire.
1310 throw new Error(message); 1338 throw new Error(message);
1311 } catch (x) {} 1339 } catch (x) {}
1312 } 1340 };
1313 }; 1341
1342 warning = function warning(condition, format) {
1343 if (format === undefined) {
1344 throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
1345 }
1346
1347 if (format.indexOf('Failed Composite propType: ') === 0) {
1348 return; // Ignore CompositeComponent proptype check.
1349 }
1350
1351 if (!condition) {
1352 for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
1353 args[_key2 - 2] = arguments[_key2];
1354 }
1355
1356 printWarning.apply(undefined, [format].concat(args));
1357 }
1358 };
1359 })();
1314 } 1360 }
1315 1361
1316 module.exports = warning; 1362 module.exports = warning;
@@ -2876,20 +2922,15 @@
2876 2922
2877 var ReactElement = __webpack_require__(11); 2923 var ReactElement = __webpack_require__(11);
2878 2924
2879 var mapObject = __webpack_require__(29);
2880
2881 /** 2925 /**
2882 * Create a factory that creates HTML tag elements. 2926 * Create a factory that creates HTML tag elements.
2883 * 2927 *
2884 * @param {string} tag Tag name (e.g. `div`).
2885 * @private 2928 * @private
2886 */ 2929 */
2887 function createDOMFactory(tag) { 2930 var createDOMFactory = ReactElement.createFactory;
2888 if (process.env.NODE_ENV !== 'production') { 2931 if (process.env.NODE_ENV !== 'production') {
2889 var ReactElementValidator = __webpack_require__(30); 2932 var ReactElementValidator = __webpack_require__(29);
2890 return ReactElementValidator.createFactory(tag); 2933 createDOMFactory = ReactElementValidator.createFactory;
2891 }
2892 return ReactElement.createFactory(tag);
2893 } 2934 }
2894 2935
2895 /** 2936 /**
@@ -2898,204 +2939,148 @@
2898 * 2939 *
2899 * @public 2940 * @public
2900 */ 2941 */
2901 var ReactDOMFactories = mapObject({ 2942 var ReactDOMFactories = {
2902 a: 'a', 2943 a: createDOMFactory('a'),
2903 abbr: 'abbr', 2944 abbr: createDOMFactory('abbr'),
2904 address: 'address', 2945 address: createDOMFactory('address'),
2905 area: 'area', 2946 area: createDOMFactory('area'),
2906 article: 'article', 2947 article: createDOMFactory('article'),
2907 aside: 'aside', 2948 aside: createDOMFactory('aside'),
2908 audio: 'audio', 2949 audio: createDOMFactory('audio'),
2909 b: 'b', 2950 b: createDOMFactory('b'),
2910 base: 'base', 2951 base: createDOMFactory('base'),
2911 bdi: 'bdi', 2952 bdi: createDOMFactory('bdi'),
2912 bdo: 'bdo', 2953 bdo: createDOMFactory('bdo'),
2913 big: 'big', 2954 big: createDOMFactory('big'),
2914 blockquote: 'blockquote', 2955 blockquote: createDOMFactory('blockquote'),
2915 body: 'body', 2956 body: createDOMFactory('body'),
2916 br: 'br', 2957 br: createDOMFactory('br'),
2917 button: 'button', 2958 button: createDOMFactory('button'),
2918 canvas: 'canvas', 2959 canvas: createDOMFactory('canvas'),
2919 caption: 'caption', 2960 caption: createDOMFactory('caption'),
2920 cite: 'cite', 2961 cite: createDOMFactory('cite'),
2921 code: 'code', 2962 code: createDOMFactory('code'),
2922 col: 'col', 2963 col: createDOMFactory('col'),
2923 colgroup: 'colgroup', 2964 colgroup: createDOMFactory('colgroup'),
2924 data: 'data', 2965 data: createDOMFactory('data'),
2925 datalist: 'datalist', 2966 datalist: createDOMFactory('datalist'),
2926 dd: 'dd', 2967 dd: createDOMFactory('dd'),
2927 del: 'del', 2968 del: createDOMFactory('del'),
2928 details: 'details', 2969 details: createDOMFactory('details'),
2929 dfn: 'dfn', 2970 dfn: createDOMFactory('dfn'),
2930 dialog: 'dialog', 2971 dialog: createDOMFactory('dialog'),
2931 div: 'div', 2972 div: createDOMFactory('div'),
2932 dl: 'dl', 2973 dl: createDOMFactory('dl'),
2933 dt: 'dt', 2974 dt: createDOMFactory('dt'),
2934 em: 'em', 2975 em: createDOMFactory('em'),
2935 embed: 'embed', 2976 embed: createDOMFactory('embed'),
2936 fieldset: 'fieldset', 2977 fieldset: createDOMFactory('fieldset'),
2937 figcaption: 'figcaption', 2978 figcaption: createDOMFactory('figcaption'),
2938 figure: 'figure', 2979 figure: createDOMFactory('figure'),
2939 footer: 'footer', 2980 footer: createDOMFactory('footer'),
2940 form: 'form', 2981 form: createDOMFactory('form'),
2941 h1: 'h1', 2982 h1: createDOMFactory('h1'),
2942 h2: 'h2', 2983 h2: createDOMFactory('h2'),
2943 h3: 'h3', 2984 h3: createDOMFactory('h3'),
2944 h4: 'h4', 2985 h4: createDOMFactory('h4'),
2945 h5: 'h5', 2986 h5: createDOMFactory('h5'),
2946 h6: 'h6', 2987 h6: createDOMFactory('h6'),
2947 head: 'head', 2988 head: createDOMFactory('head'),
2948 header: 'header', 2989 header: createDOMFactory('header'),
2949 hgroup: 'hgroup', 2990 hgroup: createDOMFactory('hgroup'),
2950 hr: 'hr', 2991 hr: createDOMFactory('hr'),
2951 html: 'html', 2992 html: createDOMFactory('html'),
2952 i: 'i', 2993 i: createDOMFactory('i'),
2953 iframe: 'iframe', 2994 iframe: createDOMFactory('iframe'),
2954 img: 'img', 2995 img: createDOMFactory('img'),
2955 input: 'input', 2996 input: createDOMFactory('input'),
2956 ins: 'ins', 2997 ins: createDOMFactory('ins'),
2957 kbd: 'kbd', 2998 kbd: createDOMFactory('kbd'),
2958 keygen: 'keygen', 2999 keygen: createDOMFactory('keygen'),
2959 label: 'label', 3000 label: createDOMFactory('label'),
2960 legend: 'legend', 3001 legend: createDOMFactory('legend'),
2961 li: 'li', 3002 li: createDOMFactory('li'),
2962 link: 'link', 3003 link: createDOMFactory('link'),
2963 main: 'main', 3004 main: createDOMFactory('main'),
2964 map: 'map', 3005 map: createDOMFactory('map'),
2965 mark: 'mark', 3006 mark: createDOMFactory('mark'),
2966 menu: 'menu', 3007 menu: createDOMFactory('menu'),
2967 menuitem: 'menuitem', 3008 menuitem: createDOMFactory('menuitem'),
2968 meta: 'meta', 3009 meta: createDOMFactory('meta'),
2969 meter: 'meter', 3010 meter: createDOMFactory('meter'),
2970 nav: 'nav', 3011 nav: createDOMFactory('nav'),
2971 noscript: 'noscript', 3012 noscript: createDOMFactory('noscript'),
2972 object: 'object', 3013 object: createDOMFactory('object'),
2973 ol: 'ol', 3014 ol: createDOMFactory('ol'),
2974 optgroup: 'optgroup', 3015 optgroup: createDOMFactory('optgroup'),
2975 option: 'option', 3016 option: createDOMFactory('option'),
2976 output: 'output', 3017 output: createDOMFactory('output'),
2977 p: 'p', 3018 p: createDOMFactory('p'),
2978 param: 'param', 3019 param: createDOMFactory('param'),
2979 picture: 'picture', 3020 picture: createDOMFactory('picture'),
2980 pre: 'pre', 3021 pre: createDOMFactory('pre'),
2981 progress: 'progress', 3022 progress: createDOMFactory('progress'),
2982 q: 'q', 3023 q: createDOMFactory('q'),
2983 rp: 'rp', 3024 rp: createDOMFactory('rp'),
2984 rt: 'rt', 3025 rt: createDOMFactory('rt'),
2985 ruby: 'ruby', 3026 ruby: createDOMFactory('ruby'),
2986 s: 's', 3027 s: createDOMFactory('s'),
2987 samp: 'samp', 3028 samp: createDOMFactory('samp'),
2988 script: 'script', 3029 script: createDOMFactory('script'),
2989 section: 'section', 3030 section: createDOMFactory('section'),
2990 select: 'select', 3031 select: createDOMFactory('select'),
2991 small: 'small', 3032 small: createDOMFactory('small'),
2992 source: 'source', 3033 source: createDOMFactory('source'),
2993 span: 'span', 3034 span: createDOMFactory('span'),
2994 strong: 'strong', 3035 strong: createDOMFactory('strong'),
2995 style: 'style', 3036 style: createDOMFactory('style'),
2996 sub: 'sub', 3037 sub: createDOMFactory('sub'),
2997 summary: 'summary', 3038 summary: createDOMFactory('summary'),
2998 sup: 'sup', 3039 sup: createDOMFactory('sup'),
2999 table: 'table', 3040 table: createDOMFactory('table'),
3000 tbody: 'tbody', 3041 tbody: createDOMFactory('tbody'),
3001 td: 'td', 3042 td: createDOMFactory('td'),
3002 textarea: 'textarea', 3043 textarea: createDOMFactory('textarea'),
3003 tfoot: 'tfoot', 3044 tfoot: createDOMFactory('tfoot'),
3004 th: 'th', 3045 th: createDOMFactory('th'),
3005 thead: 'thead', 3046 thead: createDOMFactory('thead'),
3006 time: 'time', 3047 time: createDOMFactory('time'),
3007 title: 'title', 3048 title: createDOMFactory('title'),
3008 tr: 'tr', 3049 tr: createDOMFactory('tr'),
3009 track: 'track', 3050 track: createDOMFactory('track'),
3010 u: 'u', 3051 u: createDOMFactory('u'),
3011 ul: 'ul', 3052 ul: createDOMFactory('ul'),
3012 'var': 'var', 3053 'var': createDOMFactory('var'),
3013 video: 'video', 3054 video: createDOMFactory('video'),
3014 wbr: 'wbr', 3055 wbr: createDOMFactory('wbr'),
3015 3056
3016 // SVG 3057 // SVG
3017 circle: 'circle', 3058 circle: createDOMFactory('circle'),
3018 clipPath: 'clipPath', 3059 clipPath: createDOMFactory('clipPath'),
3019 defs: 'defs', 3060 defs: createDOMFactory('defs'),
3020 ellipse: 'ellipse', 3061 ellipse: createDOMFactory('ellipse'),
3021 g: 'g', 3062 g: createDOMFactory('g'),
3022 image: 'image', 3063 image: createDOMFactory('image'),
3023 line: 'line', 3064 line: createDOMFactory('line'),
3024 linearGradient: 'linearGradient', 3065 linearGradient: createDOMFactory('linearGradient'),
3025 mask: 'mask', 3066 mask: createDOMFactory('mask'),
3026 path: 'path', 3067 path: createDOMFactory('path'),
3027 pattern: 'pattern', 3068 pattern: createDOMFactory('pattern'),
3028 polygon: 'polygon', 3069 polygon: createDOMFactory('polygon'),
3029 polyline: 'polyline', 3070 polyline: createDOMFactory('polyline'),
3030 radialGradient: 'radialGradient', 3071 radialGradient: createDOMFactory('radialGradient'),
3031 rect: 'rect', 3072 rect: createDOMFactory('rect'),
3032 stop: 'stop', 3073 stop: createDOMFactory('stop'),
3033 svg: 'svg', 3074 svg: createDOMFactory('svg'),
3034 text: 'text', 3075 text: createDOMFactory('text'),
3035 tspan: 'tspan' 3076 tspan: createDOMFactory('tspan')
3036 3077 };
3037 }, createDOMFactory);
3038 3078
3039 module.exports = ReactDOMFactories; 3079 module.exports = ReactDOMFactories;
3040 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 3080 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
3041 3081
3042/***/ }, 3082/***/ },
3043/* 29 */ 3083/* 29 */
3044/***/ function(module, exports) {
3045
3046 /**
3047 * Copyright (c) 2013-present, Facebook, Inc.
3048 * All rights reserved.
3049 *
3050 * This source code is licensed under the BSD-style license found in the
3051 * LICENSE file in the root directory of this source tree. An additional grant
3052 * of patent rights can be found in the PATENTS file in the same directory.
3053 *
3054 */
3055
3056 'use strict';
3057
3058 var hasOwnProperty = Object.prototype.hasOwnProperty;
3059
3060 /**
3061 * Executes the provided `callback` once for each enumerable own property in the
3062 * object and constructs a new object from the results. The `callback` is
3063 * invoked with three arguments:
3064 *
3065 * - the property value
3066 * - the property name
3067 * - the object being traversed
3068 *
3069 * Properties that are added after the call to `mapObject` will not be visited
3070 * by `callback`. If the values of existing properties are changed, the value
3071 * passed to `callback` will be the value at the time `mapObject` visits them.
3072 * Properties that are deleted before being visited are not visited.
3073 *
3074 * @grep function objectMap()
3075 * @grep function objMap()
3076 *
3077 * @param {?object} object
3078 * @param {function} callback
3079 * @param {*} context
3080 * @return {?object}
3081 */
3082 function mapObject(object, callback, context) {
3083 if (!object) {
3084 return null;
3085 }
3086 var result = {};
3087 for (var name in object) {
3088 if (hasOwnProperty.call(object, name)) {
3089 result[name] = callback.call(context, object[name], name, object);
3090 }
3091 }
3092 return result;
3093 }
3094
3095 module.exports = mapObject;
3096
3097/***/ },
3098/* 30 */
3099/***/ function(module, exports, __webpack_require__) { 3084/***/ function(module, exports, __webpack_require__) {
3100 3085
3101 /* WEBPACK VAR INJECTION */(function(process) {/** 3086 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -3119,11 +3104,11 @@
3119 'use strict'; 3104 'use strict';
3120 3105
3121 var ReactCurrentOwner = __webpack_require__(12); 3106 var ReactCurrentOwner = __webpack_require__(12);
3122 var ReactComponentTreeDevtool = __webpack_require__(31); 3107 var ReactComponentTreeHook = __webpack_require__(30);
3123 var ReactElement = __webpack_require__(11); 3108 var ReactElement = __webpack_require__(11);
3124 var ReactPropTypeLocations = __webpack_require__(24); 3109 var ReactPropTypeLocations = __webpack_require__(24);
3125 3110
3126 var checkReactTypeSpec = __webpack_require__(32); 3111 var checkReactTypeSpec = __webpack_require__(31);
3127 3112
3128 var canDefineProperty = __webpack_require__(15); 3113 var canDefineProperty = __webpack_require__(15);
3129 var getIteratorFn = __webpack_require__(17); 3114 var getIteratorFn = __webpack_require__(17);
@@ -3192,7 +3177,7 @@
3192 childOwner = ' It was passed a child from ' + element._owner.getName() + '.'; 3177 childOwner = ' It was passed a child from ' + element._owner.getName() + '.';
3193 } 3178 }
3194 3179
3195 process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeDevtool.getCurrentStackAddendum(element)) : void 0; 3180 process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeHook.getCurrentStackAddendum(element)) : void 0;
3196 } 3181 }
3197 3182
3198 /** 3183 /**
@@ -3263,7 +3248,9 @@
3263 var validType = typeof type === 'string' || typeof type === 'function'; 3248 var validType = typeof type === 'string' || typeof type === 'function';
3264 // We warn in this case but don't throw. We expect the element creation to 3249 // We warn in this case but don't throw. We expect the element creation to
3265 // succeed and there will likely be errors in render. 3250 // succeed and there will likely be errors in render.
3266 process.env.NODE_ENV !== 'production' ? warning(validType, 'React.createElement: type should not be null, undefined, boolean, or ' + 'number. It should be a string (for DOM elements) or a ReactClass ' + '(for composite components).%s', getDeclarationErrorAddendum()) : void 0; 3251 if (!validType) {
3252 process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type should not be null, undefined, boolean, or ' + 'number. It should be a string (for DOM elements) or a ReactClass ' + '(for composite components).%s', getDeclarationErrorAddendum()) : void 0;
3253 }
3267 3254
3268 var element = ReactElement.createElement.apply(this, arguments); 3255 var element = ReactElement.createElement.apply(this, arguments);
3269 3256
@@ -3327,7 +3314,7 @@
3327 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 3314 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
3328 3315
3329/***/ }, 3316/***/ },
3330/* 31 */ 3317/* 30 */
3331/***/ function(module, exports, __webpack_require__) { 3318/***/ function(module, exports, __webpack_require__) {
3332 3319
3333 /* WEBPACK VAR INJECTION */(function(process) {/** 3320 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -3338,7 +3325,7 @@
3338 * LICENSE file in the root directory of this source tree. An additional grant 3325 * LICENSE file in the root directory of this source tree. An additional grant
3339 * of patent rights can be found in the PATENTS file in the same directory. 3326 * of patent rights can be found in the PATENTS file in the same directory.
3340 * 3327 *
3341 * @providesModule ReactComponentTreeDevtool 3328 * @providesModule ReactComponentTreeHook
3342 */ 3329 */
3343 3330
3344 'use strict'; 3331 'use strict';
@@ -3350,32 +3337,138 @@
3350 var invariant = __webpack_require__(10); 3337 var invariant = __webpack_require__(10);
3351 var warning = __webpack_require__(13); 3338 var warning = __webpack_require__(13);
3352 3339
3353 var tree = {}; 3340 function isNative(fn) {
3354 var unmountedIDs = {}; 3341 // Based on isNative() from Lodash
3355 var rootIDs = {}; 3342 var funcToString = Function.prototype.toString;
3343 var hasOwnProperty = Object.prototype.hasOwnProperty;
3344 var reIsNative = RegExp('^' + funcToString
3345 // Take an example native function source for comparison
3346 .call(hasOwnProperty)
3347 // Strip regex characters so we can use it for regex
3348 .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
3349 // Remove hasOwnProperty from the template to make it generic
3350 .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
3351 try {
3352 var source = funcToString.call(fn);
3353 return reIsNative.test(source);
3354 } catch (err) {
3355 return false;
3356 }
3357 }
3356 3358
3357 function updateTree(id, update) { 3359 var canUseCollections =
3358 if (!tree[id]) { 3360 // Array.from
3359 tree[id] = { 3361 typeof Array.from === 'function' &&
3360 element: null, 3362 // Map
3361 parentID: null, 3363 typeof Map === 'function' && isNative(Map) &&
3362 ownerID: null, 3364 // Map.prototype.keys
3363 text: null, 3365 Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
3364 childIDs: [], 3366 // Set
3365 displayName: 'Unknown', 3367 typeof Set === 'function' && isNative(Set) &&
3366 isMounted: false, 3368 // Set.prototype.keys
3367 updateCount: 0 3369 Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
3368 }; 3370
3371 var itemMap;
3372 var rootIDSet;
3373
3374 var itemByKey;
3375 var rootByKey;
3376
3377 if (canUseCollections) {
3378 itemMap = new Map();
3379 rootIDSet = new Set();
3380 } else {
3381 itemByKey = {};
3382 rootByKey = {};
3383 }
3384
3385 var unmountedIDs = [];
3386
3387 // Use non-numeric keys to prevent V8 performance issues:
3388 // https://github.com/facebook/react/pull/7232
3389 function getKeyFromID(id) {
3390 return '.' + id;
3391 }
3392 function getIDFromKey(key) {
3393 return parseInt(key.substr(1), 10);
3394 }
3395
3396 function get(id) {
3397 if (canUseCollections) {
3398 return itemMap.get(id);
3399 } else {
3400 var key = getKeyFromID(id);
3401 return itemByKey[key];
3402 }
3403 }
3404
3405 function remove(id) {
3406 if (canUseCollections) {
3407 itemMap['delete'](id);
3408 } else {
3409 var key = getKeyFromID(id);
3410 delete itemByKey[key];
3411 }
3412 }
3413
3414 function create(id, element, parentID) {
3415 var item = {
3416 element: element,
3417 parentID: parentID,
3418 text: null,
3419 childIDs: [],
3420 isMounted: false,
3421 updateCount: 0
3422 };
3423
3424 if (canUseCollections) {
3425 itemMap.set(id, item);
3426 } else {
3427 var key = getKeyFromID(id);
3428 itemByKey[key] = item;
3429 }
3430 }
3431
3432 function addRoot(id) {
3433 if (canUseCollections) {
3434 rootIDSet.add(id);
3435 } else {
3436 var key = getKeyFromID(id);
3437 rootByKey[key] = true;
3438 }
3439 }
3440
3441 function removeRoot(id) {
3442 if (canUseCollections) {
3443 rootIDSet['delete'](id);
3444 } else {
3445 var key = getKeyFromID(id);
3446 delete rootByKey[key];
3447 }
3448 }
3449
3450 function getRegisteredIDs() {
3451 if (canUseCollections) {
3452 return Array.from(itemMap.keys());
3453 } else {
3454 return Object.keys(itemByKey).map(getIDFromKey);
3455 }
3456 }
3457
3458 function getRootIDs() {
3459 if (canUseCollections) {
3460 return Array.from(rootIDSet.keys());
3461 } else {
3462 return Object.keys(rootByKey).map(getIDFromKey);
3369 } 3463 }
3370 update(tree[id]);
3371 } 3464 }
3372 3465
3373 function purgeDeep(id) { 3466 function purgeDeep(id) {
3374 var item = tree[id]; 3467 var item = get(id);
3375 if (item) { 3468 if (item) {
3376 var childIDs = item.childIDs; 3469 var childIDs = item.childIDs;
3377 3470
3378 delete tree[id]; 3471 remove(id);
3379 childIDs.forEach(purgeDeep); 3472 childIDs.forEach(purgeDeep);
3380 } 3473 }
3381 } 3474 }
@@ -3384,102 +3477,109 @@
3384 return '\n in ' + name + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : ''); 3477 return '\n in ' + name + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
3385 } 3478 }
3386 3479
3480 function getDisplayName(element) {
3481 if (element == null) {
3482 return '#empty';
3483 } else if (typeof element === 'string' || typeof element === 'number') {
3484 return '#text';
3485 } else if (typeof element.type === 'string') {
3486 return element.type;
3487 } else {
3488 return element.type.displayName || element.type.name || 'Unknown';
3489 }
3490 }
3491
3387 function describeID(id) { 3492 function describeID(id) {
3388 var name = ReactComponentTreeDevtool.getDisplayName(id); 3493 var name = ReactComponentTreeHook.getDisplayName(id);
3389 var element = ReactComponentTreeDevtool.getElement(id); 3494 var element = ReactComponentTreeHook.getElement(id);
3390 var ownerID = ReactComponentTreeDevtool.getOwnerID(id); 3495 var ownerID = ReactComponentTreeHook.getOwnerID(id);
3391 var ownerName; 3496 var ownerName;
3392 if (ownerID) { 3497 if (ownerID) {
3393 ownerName = ReactComponentTreeDevtool.getDisplayName(ownerID); 3498 ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
3394 } 3499 }
3395 process.env.NODE_ENV !== 'production' ? warning(element, 'ReactComponentTreeDevtool: Missing React element for debugID %s when ' + 'building stack', id) : void 0; 3500 process.env.NODE_ENV !== 'production' ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0;
3396 return describeComponentFrame(name, element && element._source, ownerName); 3501 return describeComponentFrame(name, element && element._source, ownerName);
3397 } 3502 }
3398 3503
3399 var ReactComponentTreeDevtool = { 3504 var ReactComponentTreeHook = {
3400 onSetDisplayName: function (id, displayName) {
3401 updateTree(id, function (item) {
3402 return item.displayName = displayName;
3403 });
3404 },
3405 onSetChildren: function (id, nextChildIDs) { 3505 onSetChildren: function (id, nextChildIDs) {
3406 updateTree(id, function (item) { 3506 var item = get(id);
3407 item.childIDs = nextChildIDs; 3507 item.childIDs = nextChildIDs;
3408 3508
3409 nextChildIDs.forEach(function (nextChildID) { 3509 for (var i = 0; i < nextChildIDs.length; i++) {
3410 var nextChild = tree[nextChildID]; 3510 var nextChildID = nextChildIDs[i];
3411 !nextChild ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected devtool events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('68') : void 0; 3511 var nextChild = get(nextChildID);
3412 !(nextChild.displayName != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetDisplayName() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('69') : void 0; 3512 !nextChild ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0;
3413 !(nextChild.childIDs != null || nextChild.text != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetChildren() or onSetText() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('70') : void 0; 3513 !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0;
3414 !nextChild.isMounted ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0; 3514 !nextChild.isMounted ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0;
3415 if (nextChild.parentID == null) { 3515 if (nextChild.parentID == null) {
3416 nextChild.parentID = id; 3516 nextChild.parentID = id;
3417 // TODO: This shouldn't be necessary but mounting a new root during in 3517 // TODO: This shouldn't be necessary but mounting a new root during in
3418 // componentWillMount currently causes not-yet-mounted components to 3518 // componentWillMount currently causes not-yet-mounted components to
3419 // be purged from our tree data so their parent ID is missing. 3519 // be purged from our tree data so their parent ID is missing.
3420 } 3520 }
3421 !(nextChild.parentID === id) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetParent() and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('72', nextChildID, nextChild.parentID, id) : void 0; 3521 !(nextChild.parentID === id) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0;
3422 }); 3522 }
3423 });
3424 },
3425 onSetOwner: function (id, ownerID) {
3426 updateTree(id, function (item) {
3427 return item.ownerID = ownerID;
3428 });
3429 },
3430 onSetParent: function (id, parentID) {
3431 updateTree(id, function (item) {
3432 return item.parentID = parentID;
3433 });
3434 },
3435 onSetText: function (id, text) {
3436 updateTree(id, function (item) {
3437 return item.text = text;
3438 });
3439 }, 3523 },
3440 onBeforeMountComponent: function (id, element) { 3524 onBeforeMountComponent: function (id, element, parentID) {
3441 updateTree(id, function (item) { 3525 create(id, element, parentID);
3442 return item.element = element;
3443 });
3444 }, 3526 },
3445 onBeforeUpdateComponent: function (id, element) { 3527 onBeforeUpdateComponent: function (id, element) {
3446 updateTree(id, function (item) { 3528 var item = get(id);
3447 return item.element = element; 3529 if (!item || !item.isMounted) {
3448 }); 3530 // We may end up here as a result of setState() in componentWillUnmount().
3531 // In this case, ignore the element.
3532 return;
3533 }
3534 item.element = element;
3449 }, 3535 },
3450 onMountComponent: function (id) { 3536 onMountComponent: function (id) {
3451 updateTree(id, function (item) { 3537 var item = get(id);
3452 return item.isMounted = true; 3538 item.isMounted = true;
3453 }); 3539 var isRoot = item.parentID === 0;
3454 }, 3540 if (isRoot) {
3455 onMountRootComponent: function (id) { 3541 addRoot(id);
3456 rootIDs[id] = true; 3542 }
3457 }, 3543 },
3458 onUpdateComponent: function (id) { 3544 onUpdateComponent: function (id) {
3459 updateTree(id, function (item) { 3545 var item = get(id);
3460 return item.updateCount++; 3546 if (!item || !item.isMounted) {
3461 }); 3547 // We may end up here as a result of setState() in componentWillUnmount().
3548 // In this case, ignore the element.
3549 return;
3550 }
3551 item.updateCount++;
3462 }, 3552 },
3463 onUnmountComponent: function (id) { 3553 onUnmountComponent: function (id) {
3464 updateTree(id, function (item) { 3554 var item = get(id);
3465 return item.isMounted = false; 3555 if (item) {
3466 }); 3556 // We need to check if it exists.
3467 unmountedIDs[id] = true; 3557 // `item` might not exist if it is inside an error boundary, and a sibling
3468 delete rootIDs[id]; 3558 // error boundary child threw while mounting. Then this instance never
3559 // got a chance to mount, but it still gets an unmounting event during
3560 // the error boundary cleanup.
3561 item.isMounted = false;
3562 var isRoot = item.parentID === 0;
3563 if (isRoot) {
3564 removeRoot(id);
3565 }
3566 }
3567 unmountedIDs.push(id);
3469 }, 3568 },
3470 purgeUnmountedComponents: function () { 3569 purgeUnmountedComponents: function () {
3471 if (ReactComponentTreeDevtool._preventPurging) { 3570 if (ReactComponentTreeHook._preventPurging) {
3472 // Should only be used for testing. 3571 // Should only be used for testing.
3473 return; 3572 return;
3474 } 3573 }
3475 3574
3476 for (var id in unmountedIDs) { 3575 for (var i = 0; i < unmountedIDs.length; i++) {
3576 var id = unmountedIDs[i];
3477 purgeDeep(id); 3577 purgeDeep(id);
3478 } 3578 }
3479 unmountedIDs = {}; 3579 unmountedIDs.length = 0;
3480 }, 3580 },
3481 isMounted: function (id) { 3581 isMounted: function (id) {
3482 var item = tree[id]; 3582 var item = get(id);
3483 return item ? item.isMounted : false; 3583 return item ? item.isMounted : false;
3484 }, 3584 },
3485 getCurrentStackAddendum: function (topElement) { 3585 getCurrentStackAddendum: function (topElement) {
@@ -3494,64 +3594,75 @@
3494 var currentOwner = ReactCurrentOwner.current; 3594 var currentOwner = ReactCurrentOwner.current;
3495 var id = currentOwner && currentOwner._debugID; 3595 var id = currentOwner && currentOwner._debugID;
3496 3596
3497 info += ReactComponentTreeDevtool.getStackAddendumByID(id); 3597 info += ReactComponentTreeHook.getStackAddendumByID(id);
3498 return info; 3598 return info;
3499 }, 3599 },
3500 getStackAddendumByID: function (id) { 3600 getStackAddendumByID: function (id) {
3501 var info = ''; 3601 var info = '';
3502 while (id) { 3602 while (id) {
3503 info += describeID(id); 3603 info += describeID(id);
3504 id = ReactComponentTreeDevtool.getParentID(id); 3604 id = ReactComponentTreeHook.getParentID(id);
3505 } 3605 }
3506 return info; 3606 return info;
3507 }, 3607 },
3508 getChildIDs: function (id) { 3608 getChildIDs: function (id) {
3509 var item = tree[id]; 3609 var item = get(id);
3510 return item ? item.childIDs : []; 3610 return item ? item.childIDs : [];
3511 }, 3611 },
3512 getDisplayName: function (id) { 3612 getDisplayName: function (id) {
3513 var item = tree[id]; 3613 var element = ReactComponentTreeHook.getElement(id);
3514 return item ? item.displayName : 'Unknown'; 3614 if (!element) {
3615 return null;
3616 }
3617 return getDisplayName(element);
3515 }, 3618 },
3516 getElement: function (id) { 3619 getElement: function (id) {
3517 var item = tree[id]; 3620 var item = get(id);
3518 return item ? item.element : null; 3621 return item ? item.element : null;
3519 }, 3622 },
3520 getOwnerID: function (id) { 3623 getOwnerID: function (id) {
3521 var item = tree[id]; 3624 var element = ReactComponentTreeHook.getElement(id);
3522 return item ? item.ownerID : null; 3625 if (!element || !element._owner) {
3626 return null;
3627 }
3628 return element._owner._debugID;
3523 }, 3629 },
3524 getParentID: function (id) { 3630 getParentID: function (id) {
3525 var item = tree[id]; 3631 var item = get(id);
3526 return item ? item.parentID : null; 3632 return item ? item.parentID : null;
3527 }, 3633 },
3528 getSource: function (id) { 3634 getSource: function (id) {
3529 var item = tree[id]; 3635 var item = get(id);
3530 var element = item ? item.element : null; 3636 var element = item ? item.element : null;
3531 var source = element != null ? element._source : null; 3637 var source = element != null ? element._source : null;
3532 return source; 3638 return source;
3533 }, 3639 },
3534 getText: function (id) { 3640 getText: function (id) {
3535 var item = tree[id]; 3641 var element = ReactComponentTreeHook.getElement(id);
3536 return item ? item.text : null; 3642 if (typeof element === 'string') {
3643 return element;
3644 } else if (typeof element === 'number') {
3645 return '' + element;
3646 } else {
3647 return null;
3648 }
3537 }, 3649 },
3538 getUpdateCount: function (id) { 3650 getUpdateCount: function (id) {
3539 var item = tree[id]; 3651 var item = get(id);
3540 return item ? item.updateCount : 0; 3652 return item ? item.updateCount : 0;
3541 }, 3653 },
3542 getRootIDs: function () { 3654
3543 return Object.keys(rootIDs); 3655
3544 }, 3656 getRegisteredIDs: getRegisteredIDs,
3545 getRegisteredIDs: function () { 3657
3546 return Object.keys(tree); 3658 getRootIDs: getRootIDs
3547 }
3548 }; 3659 };
3549 3660
3550 module.exports = ReactComponentTreeDevtool; 3661 module.exports = ReactComponentTreeHook;
3551 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 3662 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
3552 3663
3553/***/ }, 3664/***/ },
3554/* 32 */ 3665/* 31 */
3555/***/ function(module, exports, __webpack_require__) { 3666/***/ function(module, exports, __webpack_require__) {
3556 3667
3557 /* WEBPACK VAR INJECTION */(function(process) {/** 3668 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -3570,12 +3681,12 @@
3570 var _prodInvariant = __webpack_require__(9); 3681 var _prodInvariant = __webpack_require__(9);
3571 3682
3572 var ReactPropTypeLocationNames = __webpack_require__(26); 3683 var ReactPropTypeLocationNames = __webpack_require__(26);
3573 var ReactPropTypesSecret = __webpack_require__(33); 3684 var ReactPropTypesSecret = __webpack_require__(32);
3574 3685
3575 var invariant = __webpack_require__(10); 3686 var invariant = __webpack_require__(10);
3576 var warning = __webpack_require__(13); 3687 var warning = __webpack_require__(13);
3577 3688
3578 var ReactComponentTreeDevtool; 3689 var ReactComponentTreeHook;
3579 3690
3580 if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { 3691 if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
3581 // Temporary hack. 3692 // Temporary hack.
@@ -3583,7 +3694,7 @@
3583 // https://github.com/facebook/react/issues/7240 3694 // https://github.com/facebook/react/issues/7240
3584 // Remove the inline requires when we don't need them anymore: 3695 // Remove the inline requires when we don't need them anymore:
3585 // https://github.com/facebook/react/pull/7178 3696 // https://github.com/facebook/react/pull/7178
3586 ReactComponentTreeDevtool = __webpack_require__(31); 3697 ReactComponentTreeHook = __webpack_require__(30);
3587 } 3698 }
3588 3699
3589 var loggedTypeFailures = {}; 3700 var loggedTypeFailures = {};
@@ -3624,13 +3735,13 @@
3624 var componentStackInfo = ''; 3735 var componentStackInfo = '';
3625 3736
3626 if (process.env.NODE_ENV !== 'production') { 3737 if (process.env.NODE_ENV !== 'production') {
3627 if (!ReactComponentTreeDevtool) { 3738 if (!ReactComponentTreeHook) {
3628 ReactComponentTreeDevtool = __webpack_require__(31); 3739 ReactComponentTreeHook = __webpack_require__(30);
3629 } 3740 }
3630 if (debugID !== null) { 3741 if (debugID !== null) {
3631 componentStackInfo = ReactComponentTreeDevtool.getStackAddendumByID(debugID); 3742 componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
3632 } else if (element !== null) { 3743 } else if (element !== null) {
3633 componentStackInfo = ReactComponentTreeDevtool.getCurrentStackAddendum(element); 3744 componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
3634 } 3745 }
3635 } 3746 }
3636 3747
@@ -3644,7 +3755,7 @@
3644 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 3755 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
3645 3756
3646/***/ }, 3757/***/ },
3647/* 33 */ 3758/* 32 */
3648/***/ function(module, exports) { 3759/***/ function(module, exports) {
3649 3760
3650 /** 3761 /**
@@ -3665,7 +3776,7 @@
3665 module.exports = ReactPropTypesSecret; 3776 module.exports = ReactPropTypesSecret;
3666 3777
3667/***/ }, 3778/***/ },
3668/* 34 */ 3779/* 33 */
3669/***/ function(module, exports, __webpack_require__) { 3780/***/ function(module, exports, __webpack_require__) {
3670 3781
3671 /* WEBPACK VAR INJECTION */(function(process) {/** 3782 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -3683,7 +3794,7 @@
3683 3794
3684 var ReactElement = __webpack_require__(11); 3795 var ReactElement = __webpack_require__(11);
3685 var ReactPropTypeLocationNames = __webpack_require__(26); 3796 var ReactPropTypeLocationNames = __webpack_require__(26);
3686 var ReactPropTypesSecret = __webpack_require__(33); 3797 var ReactPropTypesSecret = __webpack_require__(32);
3687 3798
3688 var emptyFunction = __webpack_require__(14); 3799 var emptyFunction = __webpack_require__(14);
3689 var getIteratorFn = __webpack_require__(17); 3800 var getIteratorFn = __webpack_require__(17);
@@ -3776,6 +3887,20 @@
3776 } 3887 }
3777 /*eslint-enable no-self-compare*/ 3888 /*eslint-enable no-self-compare*/
3778 3889
3890 /**
3891 * We use an Error-like object for backward compatibility as people may call
3892 * PropTypes directly and inspect their output. However we don't use real
3893 * Errors anymore. We don't inspect their stack anyway, and creating them
3894 * is prohibitively expensive if they are created too often, such as what
3895 * happens in oneOfType() for any type before the one that matched.
3896 */
3897 function PropTypeError(message) {
3898 this.message = message;
3899 this.stack = '';
3900 }
3901 // Make `instanceof Error` still work for returned errors.
3902 PropTypeError.prototype = Error.prototype;
3903
3779 function createChainableTypeChecker(validate) { 3904 function createChainableTypeChecker(validate) {
3780 if (process.env.NODE_ENV !== 'production') { 3905 if (process.env.NODE_ENV !== 'production') {
3781 var manualPropTypeCallCache = {}; 3906 var manualPropTypeCallCache = {};
@@ -3795,7 +3920,7 @@
3795 if (props[propName] == null) { 3920 if (props[propName] == null) {
3796 var locationName = ReactPropTypeLocationNames[location]; 3921 var locationName = ReactPropTypeLocationNames[location];
3797 if (isRequired) { 3922 if (isRequired) {
3798 return new Error('Required ' + locationName + ' `' + propFullName + '` was not specified in ' + ('`' + componentName + '`.')); 3923 return new PropTypeError('Required ' + locationName + ' `' + propFullName + '` was not specified in ' + ('`' + componentName + '`.'));
3799 } 3924 }
3800 return null; 3925 return null;
3801 } else { 3926 } else {
@@ -3820,7 +3945,7 @@
3820 // 'of type `object`'. 3945 // 'of type `object`'.
3821 var preciseType = getPreciseType(propValue); 3946 var preciseType = getPreciseType(propValue);
3822 3947
3823 return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); 3948 return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
3824 } 3949 }
3825 return null; 3950 return null;
3826 } 3951 }
@@ -3834,13 +3959,13 @@
3834 function createArrayOfTypeChecker(typeChecker) { 3959 function createArrayOfTypeChecker(typeChecker) {
3835 function validate(props, propName, componentName, location, propFullName) { 3960 function validate(props, propName, componentName, location, propFullName) {
3836 if (typeof typeChecker !== 'function') { 3961 if (typeof typeChecker !== 'function') {
3837 return new Error('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); 3962 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
3838 } 3963 }
3839 var propValue = props[propName]; 3964 var propValue = props[propName];
3840 if (!Array.isArray(propValue)) { 3965 if (!Array.isArray(propValue)) {
3841 var locationName = ReactPropTypeLocationNames[location]; 3966 var locationName = ReactPropTypeLocationNames[location];
3842 var propType = getPropType(propValue); 3967 var propType = getPropType(propValue);
3843 return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); 3968 return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
3844 } 3969 }
3845 for (var i = 0; i < propValue.length; i++) { 3970 for (var i = 0; i < propValue.length; i++) {
3846 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); 3971 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
@@ -3859,7 +3984,7 @@
3859 if (!ReactElement.isValidElement(propValue)) { 3984 if (!ReactElement.isValidElement(propValue)) {
3860 var locationName = ReactPropTypeLocationNames[location]; 3985 var locationName = ReactPropTypeLocationNames[location];
3861 var propType = getPropType(propValue); 3986 var propType = getPropType(propValue);
3862 return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); 3987 return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
3863 } 3988 }
3864 return null; 3989 return null;
3865 } 3990 }
@@ -3872,7 +3997,7 @@
3872 var locationName = ReactPropTypeLocationNames[location]; 3997 var locationName = ReactPropTypeLocationNames[location];
3873 var expectedClassName = expectedClass.name || ANONYMOUS; 3998 var expectedClassName = expectedClass.name || ANONYMOUS;
3874 var actualClassName = getClassName(props[propName]); 3999 var actualClassName = getClassName(props[propName]);
3875 return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); 4000 return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
3876 } 4001 }
3877 return null; 4002 return null;
3878 } 4003 }
@@ -3895,7 +4020,7 @@
3895 4020
3896 var locationName = ReactPropTypeLocationNames[location]; 4021 var locationName = ReactPropTypeLocationNames[location];
3897 var valuesString = JSON.stringify(expectedValues); 4022 var valuesString = JSON.stringify(expectedValues);
3898 return new Error('Invalid ' + locationName + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); 4023 return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
3899 } 4024 }
3900 return createChainableTypeChecker(validate); 4025 return createChainableTypeChecker(validate);
3901 } 4026 }
@@ -3903,13 +4028,13 @@
3903 function createObjectOfTypeChecker(typeChecker) { 4028 function createObjectOfTypeChecker(typeChecker) {
3904 function validate(props, propName, componentName, location, propFullName) { 4029 function validate(props, propName, componentName, location, propFullName) {
3905 if (typeof typeChecker !== 'function') { 4030 if (typeof typeChecker !== 'function') {
3906 return new Error('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); 4031 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
3907 } 4032 }
3908 var propValue = props[propName]; 4033 var propValue = props[propName];
3909 var propType = getPropType(propValue); 4034 var propType = getPropType(propValue);
3910 if (propType !== 'object') { 4035 if (propType !== 'object') {
3911 var locationName = ReactPropTypeLocationNames[location]; 4036 var locationName = ReactPropTypeLocationNames[location];
3912 return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); 4037 return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
3913 } 4038 }
3914 for (var key in propValue) { 4039 for (var key in propValue) {
3915 if (propValue.hasOwnProperty(key)) { 4040 if (propValue.hasOwnProperty(key)) {
@@ -3939,7 +4064,7 @@
3939 } 4064 }
3940 4065
3941 var locationName = ReactPropTypeLocationNames[location]; 4066 var locationName = ReactPropTypeLocationNames[location];
3942 return new Error('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); 4067 return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
3943 } 4068 }
3944 return createChainableTypeChecker(validate); 4069 return createChainableTypeChecker(validate);
3945 } 4070 }
@@ -3948,7 +4073,7 @@
3948 function validate(props, propName, componentName, location, propFullName) { 4073 function validate(props, propName, componentName, location, propFullName) {
3949 if (!isNode(props[propName])) { 4074 if (!isNode(props[propName])) {
3950 var locationName = ReactPropTypeLocationNames[location]; 4075 var locationName = ReactPropTypeLocationNames[location];
3951 return new Error('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); 4076 return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
3952 } 4077 }
3953 return null; 4078 return null;
3954 } 4079 }
@@ -3961,7 +4086,7 @@
3961 var propType = getPropType(propValue); 4086 var propType = getPropType(propValue);
3962 if (propType !== 'object') { 4087 if (propType !== 'object') {
3963 var locationName = ReactPropTypeLocationNames[location]; 4088 var locationName = ReactPropTypeLocationNames[location];
3964 return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); 4089 return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
3965 } 4090 }
3966 for (var key in shapeTypes) { 4091 for (var key in shapeTypes) {
3967 var checker = shapeTypes[key]; 4092 var checker = shapeTypes[key];
@@ -4088,7 +4213,7 @@
4088 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 4213 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
4089 4214
4090/***/ }, 4215/***/ },
4091/* 35 */ 4216/* 34 */
4092/***/ function(module, exports) { 4217/***/ function(module, exports) {
4093 4218
4094 /** 4219 /**
@@ -4104,10 +4229,10 @@
4104 4229
4105 'use strict'; 4230 'use strict';
4106 4231
4107 module.exports = '15.3.0'; 4232 module.exports = '15.3.2';
4108 4233
4109/***/ }, 4234/***/ },
4110/* 36 */ 4235/* 35 */
4111/***/ function(module, exports, __webpack_require__) { 4236/***/ function(module, exports, __webpack_require__) {
4112 4237
4113 /* WEBPACK VAR INJECTION */(function(process) {/** 4238 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -4143,7 +4268,7 @@
4143 * structure. 4268 * structure.
4144 */ 4269 */
4145 function onlyChild(children) { 4270 function onlyChild(children) {
4146 !ReactElement.isValidElement(children) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'onlyChild must be passed a children with exactly one child.') : _prodInvariant('23') : void 0; 4271 !ReactElement.isValidElement(children) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0;
4147 return children; 4272 return children;
4148 } 4273 }
4149 4274
@@ -4151,16 +4276,16 @@
4151 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 4276 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
4152 4277
4153/***/ }, 4278/***/ },
4154/* 37 */ 4279/* 36 */
4155/***/ function(module, exports, __webpack_require__) { 4280/***/ function(module, exports, __webpack_require__) {
4156 4281
4157 'use strict'; 4282 'use strict';
4158 4283
4159 module.exports = __webpack_require__(38); 4284 module.exports = __webpack_require__(37);
4160 4285
4161 4286
4162/***/ }, 4287/***/ },
4163/* 38 */ 4288/* 37 */
4164/***/ function(module, exports, __webpack_require__) { 4289/***/ function(module, exports, __webpack_require__) {
4165 4290
4166 /* WEBPACK VAR INJECTION */(function(process) {/** 4291 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -4178,16 +4303,16 @@
4178 4303
4179 'use strict'; 4304 'use strict';
4180 4305
4181 var ReactDOMComponentTree = __webpack_require__(39); 4306 var ReactDOMComponentTree = __webpack_require__(38);
4182 var ReactDefaultInjection = __webpack_require__(42); 4307 var ReactDefaultInjection = __webpack_require__(41);
4183 var ReactMount = __webpack_require__(169); 4308 var ReactMount = __webpack_require__(164);
4184 var ReactReconciler = __webpack_require__(62); 4309 var ReactReconciler = __webpack_require__(61);
4185 var ReactUpdates = __webpack_require__(59); 4310 var ReactUpdates = __webpack_require__(58);
4186 var ReactVersion = __webpack_require__(35); 4311 var ReactVersion = __webpack_require__(34);
4187 4312
4188 var findDOMNode = __webpack_require__(174); 4313 var findDOMNode = __webpack_require__(169);
4189 var getHostComponentFromComposite = __webpack_require__(175); 4314 var getHostComponentFromComposite = __webpack_require__(170);
4190 var renderSubtreeIntoContainer = __webpack_require__(176); 4315 var renderSubtreeIntoContainer = __webpack_require__(171);
4191 var warning = __webpack_require__(13); 4316 var warning = __webpack_require__(13);
4192 4317
4193 ReactDefaultInjection.inject(); 4318 ReactDefaultInjection.inject();
@@ -4228,7 +4353,7 @@
4228 } 4353 }
4229 4354
4230 if (process.env.NODE_ENV !== 'production') { 4355 if (process.env.NODE_ENV !== 'production') {
4231 var ExecutionEnvironment = __webpack_require__(52); 4356 var ExecutionEnvironment = __webpack_require__(51);
4232 if (ExecutionEnvironment.canUseDOM && window.top === window.self) { 4357 if (ExecutionEnvironment.canUseDOM && window.top === window.self) {
4233 4358
4234 // First check if devtools is not installed 4359 // First check if devtools is not installed
@@ -4263,11 +4388,20 @@
4263 } 4388 }
4264 } 4389 }
4265 4390
4391 if (process.env.NODE_ENV !== 'production') {
4392 var ReactInstrumentation = __webpack_require__(64);
4393 var ReactDOMUnknownPropertyHook = __webpack_require__(172);
4394 var ReactDOMNullInputValuePropHook = __webpack_require__(173);
4395
4396 ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook);
4397 ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook);
4398 }
4399
4266 module.exports = ReactDOM; 4400 module.exports = ReactDOM;
4267 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 4401 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
4268 4402
4269/***/ }, 4403/***/ },
4270/* 39 */ 4404/* 38 */
4271/***/ function(module, exports, __webpack_require__) { 4405/***/ function(module, exports, __webpack_require__) {
4272 4406
4273 /* WEBPACK VAR INJECTION */(function(process) {/** 4407 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -4285,8 +4419,8 @@
4285 4419
4286 var _prodInvariant = __webpack_require__(9); 4420 var _prodInvariant = __webpack_require__(9);
4287 4421
4288 var DOMProperty = __webpack_require__(40); 4422 var DOMProperty = __webpack_require__(39);
4289 var ReactDOMComponentFlags = __webpack_require__(41); 4423 var ReactDOMComponentFlags = __webpack_require__(40);
4290 4424
4291 var invariant = __webpack_require__(10); 4425 var invariant = __webpack_require__(10);
4292 4426
@@ -4354,7 +4488,7 @@
4354 } 4488 }
4355 var childInst = children[name]; 4489 var childInst = children[name];
4356 var childID = getRenderedHostOrTextFromComponent(childInst)._domID; 4490 var childID = getRenderedHostOrTextFromComponent(childInst)._domID;
4357 if (childID == null) { 4491 if (childID === 0) {
4358 // We're currently unmounting this child in ReactMultiChild; skip it. 4492 // We're currently unmounting this child in ReactMultiChild; skip it.
4359 continue; 4493 continue;
4360 } 4494 }
@@ -4461,7 +4595,7 @@
4461 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 4595 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
4462 4596
4463/***/ }, 4597/***/ },
4464/* 40 */ 4598/* 39 */
4465/***/ function(module, exports, __webpack_require__) { 4599/***/ function(module, exports, __webpack_require__) {
4466 4600
4467 /* WEBPACK VAR INJECTION */(function(process) {/** 4601 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -4673,7 +4807,7 @@
4673 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 4807 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
4674 4808
4675/***/ }, 4809/***/ },
4676/* 41 */ 4810/* 40 */
4677/***/ function(module, exports) { 4811/***/ function(module, exports) {
4678 4812
4679 /** 4813 /**
@@ -4696,7 +4830,7 @@
4696 module.exports = ReactDOMComponentFlags; 4830 module.exports = ReactDOMComponentFlags;
4697 4831
4698/***/ }, 4832/***/ },
4699/* 42 */ 4833/* 41 */
4700/***/ function(module, exports, __webpack_require__) { 4834/***/ function(module, exports, __webpack_require__) {
4701 4835
4702 /** 4836 /**
@@ -4712,24 +4846,24 @@
4712 4846
4713 'use strict'; 4847 'use strict';
4714 4848
4715 var BeforeInputEventPlugin = __webpack_require__(43); 4849 var BeforeInputEventPlugin = __webpack_require__(42);
4716 var ChangeEventPlugin = __webpack_require__(58); 4850 var ChangeEventPlugin = __webpack_require__(57);
4717 var DefaultEventPluginOrder = __webpack_require__(76); 4851 var DefaultEventPluginOrder = __webpack_require__(75);
4718 var EnterLeaveEventPlugin = __webpack_require__(77); 4852 var EnterLeaveEventPlugin = __webpack_require__(76);
4719 var HTMLDOMPropertyConfig = __webpack_require__(82); 4853 var HTMLDOMPropertyConfig = __webpack_require__(81);
4720 var ReactComponentBrowserEnvironment = __webpack_require__(83); 4854 var ReactComponentBrowserEnvironment = __webpack_require__(82);
4721 var ReactDOMComponent = __webpack_require__(97); 4855 var ReactDOMComponent = __webpack_require__(96);
4722 var ReactDOMComponentTree = __webpack_require__(39); 4856 var ReactDOMComponentTree = __webpack_require__(38);
4723 var ReactDOMEmptyComponent = __webpack_require__(140); 4857 var ReactDOMEmptyComponent = __webpack_require__(135);
4724 var ReactDOMTreeTraversal = __webpack_require__(141); 4858 var ReactDOMTreeTraversal = __webpack_require__(136);
4725 var ReactDOMTextComponent = __webpack_require__(142); 4859 var ReactDOMTextComponent = __webpack_require__(137);
4726 var ReactDefaultBatchingStrategy = __webpack_require__(143); 4860 var ReactDefaultBatchingStrategy = __webpack_require__(138);
4727 var ReactEventListener = __webpack_require__(144); 4861 var ReactEventListener = __webpack_require__(139);
4728 var ReactInjection = __webpack_require__(147); 4862 var ReactInjection = __webpack_require__(142);
4729 var ReactReconcileTransaction = __webpack_require__(148); 4863 var ReactReconcileTransaction = __webpack_require__(143);
4730 var SVGDOMPropertyConfig = __webpack_require__(156); 4864 var SVGDOMPropertyConfig = __webpack_require__(151);
4731 var SelectEventPlugin = __webpack_require__(157); 4865 var SelectEventPlugin = __webpack_require__(152);
4732 var SimpleEventPlugin = __webpack_require__(158); 4866 var SimpleEventPlugin = __webpack_require__(153);
4733 4867
4734 var alreadyInjected = false; 4868 var alreadyInjected = false;
4735 4869
@@ -4785,7 +4919,7 @@
4785 }; 4919 };
4786 4920
4787/***/ }, 4921/***/ },
4788/* 43 */ 4922/* 42 */
4789/***/ function(module, exports, __webpack_require__) { 4923/***/ function(module, exports, __webpack_require__) {
4790 4924
4791 /** 4925 /**
@@ -4801,12 +4935,12 @@
4801 4935
4802 'use strict'; 4936 'use strict';
4803 4937
4804 var EventConstants = __webpack_require__(44); 4938 var EventConstants = __webpack_require__(43);
4805 var EventPropagators = __webpack_require__(45); 4939 var EventPropagators = __webpack_require__(44);
4806 var ExecutionEnvironment = __webpack_require__(52); 4940 var ExecutionEnvironment = __webpack_require__(51);
4807 var FallbackCompositionState = __webpack_require__(53); 4941 var FallbackCompositionState = __webpack_require__(52);
4808 var SyntheticCompositionEvent = __webpack_require__(55); 4942 var SyntheticCompositionEvent = __webpack_require__(54);
4809 var SyntheticInputEvent = __webpack_require__(57); 4943 var SyntheticInputEvent = __webpack_require__(56);
4810 4944
4811 var keyOf = __webpack_require__(27); 4945 var keyOf = __webpack_require__(27);
4812 4946
@@ -5077,8 +5211,10 @@
5077 function getFallbackBeforeInputChars(topLevelType, nativeEvent) { 5211 function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
5078 // If we are currently composing (IME) and using a fallback to do so, 5212 // If we are currently composing (IME) and using a fallback to do so,
5079 // try to extract the composed characters from the fallback object. 5213 // try to extract the composed characters from the fallback object.
5214 // If composition event is available, we extract a string only at
5215 // compositionevent, otherwise extract it at fallback events.
5080 if (currentComposition) { 5216 if (currentComposition) {
5081 if (topLevelType === topLevelTypes.topCompositionEnd || isFallbackCompositionEnd(topLevelType, nativeEvent)) { 5217 if (topLevelType === topLevelTypes.topCompositionEnd || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
5082 var chars = currentComposition.getData(); 5218 var chars = currentComposition.getData();
5083 FallbackCompositionState.release(currentComposition); 5219 FallbackCompositionState.release(currentComposition);
5084 currentComposition = null; 5220 currentComposition = null;
@@ -5178,7 +5314,7 @@
5178 module.exports = BeforeInputEventPlugin; 5314 module.exports = BeforeInputEventPlugin;
5179 5315
5180/***/ }, 5316/***/ },
5181/* 44 */ 5317/* 43 */
5182/***/ function(module, exports, __webpack_require__) { 5318/***/ function(module, exports, __webpack_require__) {
5183 5319
5184 /** 5320 /**
@@ -5280,7 +5416,7 @@
5280 module.exports = EventConstants; 5416 module.exports = EventConstants;
5281 5417
5282/***/ }, 5418/***/ },
5283/* 45 */ 5419/* 44 */
5284/***/ function(module, exports, __webpack_require__) { 5420/***/ function(module, exports, __webpack_require__) {
5285 5421
5286 /* WEBPACK VAR INJECTION */(function(process) {/** 5422 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -5296,12 +5432,12 @@
5296 5432
5297 'use strict'; 5433 'use strict';
5298 5434
5299 var EventConstants = __webpack_require__(44); 5435 var EventConstants = __webpack_require__(43);
5300 var EventPluginHub = __webpack_require__(46); 5436 var EventPluginHub = __webpack_require__(45);
5301 var EventPluginUtils = __webpack_require__(48); 5437 var EventPluginUtils = __webpack_require__(47);
5302 5438
5303 var accumulateInto = __webpack_require__(50); 5439 var accumulateInto = __webpack_require__(49);
5304 var forEachAccumulated = __webpack_require__(51); 5440 var forEachAccumulated = __webpack_require__(50);
5305 var warning = __webpack_require__(13); 5441 var warning = __webpack_require__(13);
5306 5442
5307 var PropagationPhases = EventConstants.PropagationPhases; 5443 var PropagationPhases = EventConstants.PropagationPhases;
@@ -5423,7 +5559,7 @@
5423 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 5559 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
5424 5560
5425/***/ }, 5561/***/ },
5426/* 46 */ 5562/* 45 */
5427/***/ function(module, exports, __webpack_require__) { 5563/***/ function(module, exports, __webpack_require__) {
5428 5564
5429 /* WEBPACK VAR INJECTION */(function(process) {/** 5565 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -5441,12 +5577,12 @@
5441 5577
5442 var _prodInvariant = __webpack_require__(9); 5578 var _prodInvariant = __webpack_require__(9);
5443 5579
5444 var EventPluginRegistry = __webpack_require__(47); 5580 var EventPluginRegistry = __webpack_require__(46);
5445 var EventPluginUtils = __webpack_require__(48); 5581 var EventPluginUtils = __webpack_require__(47);
5446 var ReactErrorUtils = __webpack_require__(49); 5582 var ReactErrorUtils = __webpack_require__(48);
5447 5583
5448 var accumulateInto = __webpack_require__(50); 5584 var accumulateInto = __webpack_require__(49);
5449 var forEachAccumulated = __webpack_require__(51); 5585 var forEachAccumulated = __webpack_require__(50);
5450 var invariant = __webpack_require__(10); 5586 var invariant = __webpack_require__(10);
5451 5587
5452 /** 5588 /**
@@ -5484,6 +5620,8 @@
5484 }; 5620 };
5485 5621
5486 var getDictionaryKey = function (inst) { 5622 var getDictionaryKey = function (inst) {
5623 // Prevents V8 performance issue:
5624 // https://github.com/facebook/react/pull/7232
5487 return '.' + inst._rootNodeID; 5625 return '.' + inst._rootNodeID;
5488 }; 5626 };
5489 5627
@@ -5678,7 +5816,7 @@
5678 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 5816 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
5679 5817
5680/***/ }, 5818/***/ },
5681/* 47 */ 5819/* 46 */
5682/***/ function(module, exports, __webpack_require__) { 5820/***/ function(module, exports, __webpack_require__) {
5683 5821
5684 /* WEBPACK VAR INJECTION */(function(process) {/** 5822 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -5931,7 +6069,7 @@
5931 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 6069 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
5932 6070
5933/***/ }, 6071/***/ },
5934/* 48 */ 6072/* 47 */
5935/***/ function(module, exports, __webpack_require__) { 6073/***/ function(module, exports, __webpack_require__) {
5936 6074
5937 /* WEBPACK VAR INJECTION */(function(process) {/** 6075 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -5949,8 +6087,8 @@
5949 6087
5950 var _prodInvariant = __webpack_require__(9); 6088 var _prodInvariant = __webpack_require__(9);
5951 6089
5952 var EventConstants = __webpack_require__(44); 6090 var EventConstants = __webpack_require__(43);
5953 var ReactErrorUtils = __webpack_require__(49); 6091 var ReactErrorUtils = __webpack_require__(48);
5954 6092
5955 var invariant = __webpack_require__(10); 6093 var invariant = __webpack_require__(10);
5956 var warning = __webpack_require__(13); 6094 var warning = __webpack_require__(13);
@@ -6166,7 +6304,7 @@
6166 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 6304 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
6167 6305
6168/***/ }, 6306/***/ },
6169/* 49 */ 6307/* 48 */
6170/***/ function(module, exports, __webpack_require__) { 6308/***/ function(module, exports, __webpack_require__) {
6171 6309
6172 /* WEBPACK VAR INJECTION */(function(process) {/** 6310 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -6248,7 +6386,7 @@
6248 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 6386 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
6249 6387
6250/***/ }, 6388/***/ },
6251/* 50 */ 6389/* 49 */
6252/***/ function(module, exports, __webpack_require__) { 6390/***/ function(module, exports, __webpack_require__) {
6253 6391
6254 /* WEBPACK VAR INJECTION */(function(process) {/** 6392 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -6312,7 +6450,7 @@
6312 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 6450 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
6313 6451
6314/***/ }, 6452/***/ },
6315/* 51 */ 6453/* 50 */
6316/***/ function(module, exports) { 6454/***/ function(module, exports) {
6317 6455
6318 /** 6456 /**
@@ -6348,7 +6486,7 @@
6348 module.exports = forEachAccumulated; 6486 module.exports = forEachAccumulated;
6349 6487
6350/***/ }, 6488/***/ },
6351/* 52 */ 6489/* 51 */
6352/***/ function(module, exports) { 6490/***/ function(module, exports) {
6353 6491
6354 /** 6492 /**
@@ -6388,7 +6526,7 @@
6388 module.exports = ExecutionEnvironment; 6526 module.exports = ExecutionEnvironment;
6389 6527
6390/***/ }, 6528/***/ },
6391/* 53 */ 6529/* 52 */
6392/***/ function(module, exports, __webpack_require__) { 6530/***/ function(module, exports, __webpack_require__) {
6393 6531
6394 /** 6532 /**
@@ -6408,7 +6546,7 @@
6408 6546
6409 var PooledClass = __webpack_require__(8); 6547 var PooledClass = __webpack_require__(8);
6410 6548
6411 var getTextContentAccessor = __webpack_require__(54); 6549 var getTextContentAccessor = __webpack_require__(53);
6412 6550
6413 /** 6551 /**
6414 * This helper class stores information about text content of a target node, 6552 * This helper class stores information about text content of a target node,
@@ -6488,7 +6626,7 @@
6488 module.exports = FallbackCompositionState; 6626 module.exports = FallbackCompositionState;
6489 6627
6490/***/ }, 6628/***/ },
6491/* 54 */ 6629/* 53 */
6492/***/ function(module, exports, __webpack_require__) { 6630/***/ function(module, exports, __webpack_require__) {
6493 6631
6494 /** 6632 /**
@@ -6504,7 +6642,7 @@
6504 6642
6505 'use strict'; 6643 'use strict';
6506 6644
6507 var ExecutionEnvironment = __webpack_require__(52); 6645 var ExecutionEnvironment = __webpack_require__(51);
6508 6646
6509 var contentKey = null; 6647 var contentKey = null;
6510 6648
@@ -6526,7 +6664,7 @@
6526 module.exports = getTextContentAccessor; 6664 module.exports = getTextContentAccessor;
6527 6665
6528/***/ }, 6666/***/ },
6529/* 55 */ 6667/* 54 */
6530/***/ function(module, exports, __webpack_require__) { 6668/***/ function(module, exports, __webpack_require__) {
6531 6669
6532 /** 6670 /**
@@ -6542,7 +6680,7 @@
6542 6680
6543 'use strict'; 6681 'use strict';
6544 6682
6545 var SyntheticEvent = __webpack_require__(56); 6683 var SyntheticEvent = __webpack_require__(55);
6546 6684
6547 /** 6685 /**
6548 * @interface Event 6686 * @interface Event
@@ -6567,7 +6705,7 @@
6567 module.exports = SyntheticCompositionEvent; 6705 module.exports = SyntheticCompositionEvent;
6568 6706
6569/***/ }, 6707/***/ },
6570/* 56 */ 6708/* 55 */
6571/***/ function(module, exports, __webpack_require__) { 6709/***/ function(module, exports, __webpack_require__) {
6572 6710
6573 /* WEBPACK VAR INJECTION */(function(process) {/** 6711 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -6685,7 +6823,8 @@
6685 6823
6686 if (event.preventDefault) { 6824 if (event.preventDefault) {
6687 event.preventDefault(); 6825 event.preventDefault();
6688 } else { 6826 } else if (typeof event.returnValue !== 'unknown') {
6827 // eslint-disable-line valid-typeof
6689 event.returnValue = false; 6828 event.returnValue = false;
6690 } 6829 }
6691 this.isDefaultPrevented = emptyFunction.thatReturnsTrue; 6830 this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
@@ -6699,9 +6838,16 @@
6699 6838
6700 if (event.stopPropagation) { 6839 if (event.stopPropagation) {
6701 event.stopPropagation(); 6840 event.stopPropagation();
6702 } else { 6841 } else if (typeof event.cancelBubble !== 'unknown') {
6842 // eslint-disable-line valid-typeof
6843 // The ChangeEventPlugin registers a "propertychange" event for
6844 // IE. This event does not support bubbling or cancelling, and
6845 // any references to cancelBubble throw "Member not found". A
6846 // typeof check of "unknown" circumvents this issue (and is also
6847 // IE specific).
6703 event.cancelBubble = true; 6848 event.cancelBubble = true;
6704 } 6849 }
6850
6705 this.isPropagationStopped = emptyFunction.thatReturnsTrue; 6851 this.isPropagationStopped = emptyFunction.thatReturnsTrue;
6706 }, 6852 },
6707 6853
@@ -6833,7 +6979,7 @@
6833 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 6979 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
6834 6980
6835/***/ }, 6981/***/ },
6836/* 57 */ 6982/* 56 */
6837/***/ function(module, exports, __webpack_require__) { 6983/***/ function(module, exports, __webpack_require__) {
6838 6984
6839 /** 6985 /**
@@ -6849,7 +6995,7 @@
6849 6995
6850 'use strict'; 6996 'use strict';
6851 6997
6852 var SyntheticEvent = __webpack_require__(56); 6998 var SyntheticEvent = __webpack_require__(55);
6853 6999
6854 /** 7000 /**
6855 * @interface Event 7001 * @interface Event
@@ -6875,7 +7021,7 @@
6875 module.exports = SyntheticInputEvent; 7021 module.exports = SyntheticInputEvent;
6876 7022
6877/***/ }, 7023/***/ },
6878/* 58 */ 7024/* 57 */
6879/***/ function(module, exports, __webpack_require__) { 7025/***/ function(module, exports, __webpack_require__) {
6880 7026
6881 /** 7027 /**
@@ -6891,17 +7037,17 @@
6891 7037
6892 'use strict'; 7038 'use strict';
6893 7039
6894 var EventConstants = __webpack_require__(44); 7040 var EventConstants = __webpack_require__(43);
6895 var EventPluginHub = __webpack_require__(46); 7041 var EventPluginHub = __webpack_require__(45);
6896 var EventPropagators = __webpack_require__(45); 7042 var EventPropagators = __webpack_require__(44);
6897 var ExecutionEnvironment = __webpack_require__(52); 7043 var ExecutionEnvironment = __webpack_require__(51);
6898 var ReactDOMComponentTree = __webpack_require__(39); 7044 var ReactDOMComponentTree = __webpack_require__(38);
6899 var ReactUpdates = __webpack_require__(59); 7045 var ReactUpdates = __webpack_require__(58);
6900 var SyntheticEvent = __webpack_require__(56); 7046 var SyntheticEvent = __webpack_require__(55);
6901 7047
6902 var getEventTarget = __webpack_require__(73); 7048 var getEventTarget = __webpack_require__(72);
6903 var isEventSupported = __webpack_require__(74); 7049 var isEventSupported = __webpack_require__(73);
6904 var isTextInputElement = __webpack_require__(75); 7050 var isTextInputElement = __webpack_require__(74);
6905 var keyOf = __webpack_require__(27); 7051 var keyOf = __webpack_require__(27);
6906 7052
6907 var topLevelTypes = EventConstants.topLevelTypes; 7053 var topLevelTypes = EventConstants.topLevelTypes;
@@ -6935,7 +7081,7 @@
6935 var doesChangeEventBubble = false; 7081 var doesChangeEventBubble = false;
6936 if (ExecutionEnvironment.canUseDOM) { 7082 if (ExecutionEnvironment.canUseDOM) {
6937 // See `handleChange` comment below 7083 // See `handleChange` comment below
6938 doesChangeEventBubble = isEventSupported('change') && (!('documentMode' in document) || document.documentMode > 8); 7084 doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8);
6939 } 7085 }
6940 7086
6941 function manualDispatchChangeEvent(nativeEvent) { 7087 function manualDispatchChangeEvent(nativeEvent) {
@@ -7001,7 +7147,7 @@
7001 // deleting text, so we ignore its input events. 7147 // deleting text, so we ignore its input events.
7002 // IE10+ fire input events to often, such when a placeholder 7148 // IE10+ fire input events to often, such when a placeholder
7003 // changes or when an input with a placeholder is focused. 7149 // changes or when an input with a placeholder is focused.
7004 isInputEventSupported = isEventSupported('input') && (!('documentMode' in document) || document.documentMode > 11); 7150 isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 11);
7005 } 7151 }
7006 7152
7007 /** 7153 /**
@@ -7205,7 +7351,7 @@
7205 module.exports = ChangeEventPlugin; 7351 module.exports = ChangeEventPlugin;
7206 7352
7207/***/ }, 7353/***/ },
7208/* 59 */ 7354/* 58 */
7209/***/ function(module, exports, __webpack_require__) { 7355/***/ function(module, exports, __webpack_require__) {
7210 7356
7211 /* WEBPACK VAR INJECTION */(function(process) {/** 7357 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -7224,11 +7370,11 @@
7224 var _prodInvariant = __webpack_require__(9), 7370 var _prodInvariant = __webpack_require__(9),
7225 _assign = __webpack_require__(6); 7371 _assign = __webpack_require__(6);
7226 7372
7227 var CallbackQueue = __webpack_require__(60); 7373 var CallbackQueue = __webpack_require__(59);
7228 var PooledClass = __webpack_require__(8); 7374 var PooledClass = __webpack_require__(8);
7229 var ReactFeatureFlags = __webpack_require__(61); 7375 var ReactFeatureFlags = __webpack_require__(60);
7230 var ReactReconciler = __webpack_require__(62); 7376 var ReactReconciler = __webpack_require__(61);
7231 var Transaction = __webpack_require__(72); 7377 var Transaction = __webpack_require__(71);
7232 7378
7233 var invariant = __webpack_require__(10); 7379 var invariant = __webpack_require__(10);
7234 7380
@@ -7462,7 +7608,7 @@
7462 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 7608 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
7463 7609
7464/***/ }, 7610/***/ },
7465/* 60 */ 7611/* 59 */
7466/***/ function(module, exports, __webpack_require__) { 7612/***/ function(module, exports, __webpack_require__) {
7467 7613
7468 /* WEBPACK VAR INJECTION */(function(process) {/** 7614 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -7574,7 +7720,7 @@
7574 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 7720 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
7575 7721
7576/***/ }, 7722/***/ },
7577/* 61 */ 7723/* 60 */
7578/***/ function(module, exports) { 7724/***/ function(module, exports) {
7579 7725
7580 /** 7726 /**
@@ -7601,7 +7747,7 @@
7601 module.exports = ReactFeatureFlags; 7747 module.exports = ReactFeatureFlags;
7602 7748
7603/***/ }, 7749/***/ },
7604/* 62 */ 7750/* 61 */
7605/***/ function(module, exports, __webpack_require__) { 7751/***/ function(module, exports, __webpack_require__) {
7606 7752
7607 /* WEBPACK VAR INJECTION */(function(process) {/** 7753 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -7617,8 +7763,8 @@
7617 7763
7618 'use strict'; 7764 'use strict';
7619 7765
7620 var ReactRef = __webpack_require__(63); 7766 var ReactRef = __webpack_require__(62);
7621 var ReactInstrumentation = __webpack_require__(65); 7767 var ReactInstrumentation = __webpack_require__(64);
7622 7768
7623 var warning = __webpack_require__(13); 7769 var warning = __webpack_require__(13);
7624 7770
@@ -7643,20 +7789,19 @@
7643 * @final 7789 * @final
7644 * @internal 7790 * @internal
7645 */ 7791 */
7646 mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context) { 7792 mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID // 0 in production and for roots
7793 ) {
7647 if (process.env.NODE_ENV !== 'production') { 7794 if (process.env.NODE_ENV !== 'production') {
7648 if (internalInstance._debugID !== 0) { 7795 if (internalInstance._debugID !== 0) {
7649 ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement); 7796 ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
7650 ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'mountComponent');
7651 } 7797 }
7652 } 7798 }
7653 var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context); 7799 var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);
7654 if (internalInstance._currentElement && internalInstance._currentElement.ref != null) { 7800 if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
7655 transaction.getReactMountReady().enqueue(attachRefs, internalInstance); 7801 transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
7656 } 7802 }
7657 if (process.env.NODE_ENV !== 'production') { 7803 if (process.env.NODE_ENV !== 'production') {
7658 if (internalInstance._debugID !== 0) { 7804 if (internalInstance._debugID !== 0) {
7659 ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'mountComponent');
7660 ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID); 7805 ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID);
7661 } 7806 }
7662 } 7807 }
@@ -7680,14 +7825,13 @@
7680 unmountComponent: function (internalInstance, safely) { 7825 unmountComponent: function (internalInstance, safely) {
7681 if (process.env.NODE_ENV !== 'production') { 7826 if (process.env.NODE_ENV !== 'production') {
7682 if (internalInstance._debugID !== 0) { 7827 if (internalInstance._debugID !== 0) {
7683 ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'unmountComponent'); 7828 ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID);
7684 } 7829 }
7685 } 7830 }
7686 ReactRef.detachRefs(internalInstance, internalInstance._currentElement); 7831 ReactRef.detachRefs(internalInstance, internalInstance._currentElement);
7687 internalInstance.unmountComponent(safely); 7832 internalInstance.unmountComponent(safely);
7688 if (process.env.NODE_ENV !== 'production') { 7833 if (process.env.NODE_ENV !== 'production') {
7689 if (internalInstance._debugID !== 0) { 7834 if (internalInstance._debugID !== 0) {
7690 ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'unmountComponent');
7691 ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID); 7835 ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID);
7692 } 7836 }
7693 } 7837 }
@@ -7722,7 +7866,6 @@
7722 if (process.env.NODE_ENV !== 'production') { 7866 if (process.env.NODE_ENV !== 'production') {
7723 if (internalInstance._debugID !== 0) { 7867 if (internalInstance._debugID !== 0) {
7724 ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement); 7868 ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement);
7725 ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'receiveComponent');
7726 } 7869 }
7727 } 7870 }
7728 7871
@@ -7740,7 +7883,6 @@
7740 7883
7741 if (process.env.NODE_ENV !== 'production') { 7884 if (process.env.NODE_ENV !== 'production') {
7742 if (internalInstance._debugID !== 0) { 7885 if (internalInstance._debugID !== 0) {
7743 ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'receiveComponent');
7744 ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); 7886 ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
7745 } 7887 }
7746 } 7888 }
@@ -7762,14 +7904,12 @@
7762 } 7904 }
7763 if (process.env.NODE_ENV !== 'production') { 7905 if (process.env.NODE_ENV !== 'production') {
7764 if (internalInstance._debugID !== 0) { 7906 if (internalInstance._debugID !== 0) {
7765 ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'performUpdateIfNecessary');
7766 ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement); 7907 ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement);
7767 } 7908 }
7768 } 7909 }
7769 internalInstance.performUpdateIfNecessary(transaction); 7910 internalInstance.performUpdateIfNecessary(transaction);
7770 if (process.env.NODE_ENV !== 'production') { 7911 if (process.env.NODE_ENV !== 'production') {
7771 if (internalInstance._debugID !== 0) { 7912 if (internalInstance._debugID !== 0) {
7772 ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'performUpdateIfNecessary');
7773 ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); 7913 ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
7774 } 7914 }
7775 } 7915 }
@@ -7781,7 +7921,7 @@
7781 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 7921 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
7782 7922
7783/***/ }, 7923/***/ },
7784/* 63 */ 7924/* 62 */
7785/***/ function(module, exports, __webpack_require__) { 7925/***/ function(module, exports, __webpack_require__) {
7786 7926
7787 /** 7927 /**
@@ -7797,7 +7937,7 @@
7797 7937
7798 'use strict'; 7938 'use strict';
7799 7939
7800 var ReactOwner = __webpack_require__(64); 7940 var ReactOwner = __webpack_require__(63);
7801 7941
7802 var ReactRef = {}; 7942 var ReactRef = {};
7803 7943
@@ -7845,7 +7985,7 @@
7845 var prevEmpty = prevElement === null || prevElement === false; 7985 var prevEmpty = prevElement === null || prevElement === false;
7846 var nextEmpty = nextElement === null || nextElement === false; 7986 var nextEmpty = nextElement === null || nextElement === false;
7847 7987
7848 return( 7988 return (
7849 // This has a few false positives w/r/t empty components. 7989 // This has a few false positives w/r/t empty components.
7850 prevEmpty || nextEmpty || nextElement.ref !== prevElement.ref || 7990 prevEmpty || nextEmpty || nextElement.ref !== prevElement.ref ||
7851 // If owner changes but we have an unchanged function ref, don't update refs 7991 // If owner changes but we have an unchanged function ref, don't update refs
@@ -7866,7 +8006,7 @@
7866 module.exports = ReactRef; 8006 module.exports = ReactRef;
7867 8007
7868/***/ }, 8008/***/ },
7869/* 64 */ 8009/* 63 */
7870/***/ function(module, exports, __webpack_require__) { 8010/***/ function(module, exports, __webpack_require__) {
7871 8011
7872 /* WEBPACK VAR INJECTION */(function(process) {/** 8012 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -7966,7 +8106,7 @@
7966 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 8106 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
7967 8107
7968/***/ }, 8108/***/ },
7969/* 65 */ 8109/* 64 */
7970/***/ function(module, exports, __webpack_require__) { 8110/***/ function(module, exports, __webpack_require__) {
7971 8111
7972 /* WEBPACK VAR INJECTION */(function(process) {/** 8112 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -7985,7 +8125,7 @@
7985 var debugTool = null; 8125 var debugTool = null;
7986 8126
7987 if (process.env.NODE_ENV !== 'production') { 8127 if (process.env.NODE_ENV !== 'production') {
7988 var ReactDebugTool = __webpack_require__(66); 8128 var ReactDebugTool = __webpack_require__(65);
7989 debugTool = ReactDebugTool; 8129 debugTool = ReactDebugTool;
7990 } 8130 }
7991 8131
@@ -7993,7 +8133,7 @@
7993 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 8133 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
7994 8134
7995/***/ }, 8135/***/ },
7996/* 66 */ 8136/* 65 */
7997/***/ function(module, exports, __webpack_require__) { 8137/***/ function(module, exports, __webpack_require__) {
7998 8138
7999 /* WEBPACK VAR INJECTION */(function(process) {/** 8139 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -8009,29 +8149,35 @@
8009 8149
8010 'use strict'; 8150 'use strict';
8011 8151
8012 var ReactInvalidSetStateWarningDevTool = __webpack_require__(67); 8152 var ReactInvalidSetStateWarningHook = __webpack_require__(66);
8013 var ReactHostOperationHistoryDevtool = __webpack_require__(68); 8153 var ReactHostOperationHistoryHook = __webpack_require__(67);
8014 var ReactComponentTreeDevtool = __webpack_require__(31); 8154 var ReactComponentTreeHook = __webpack_require__(30);
8015 var ReactChildrenMutationWarningDevtool = __webpack_require__(69); 8155 var ReactChildrenMutationWarningHook = __webpack_require__(68);
8016 var ExecutionEnvironment = __webpack_require__(52); 8156 var ExecutionEnvironment = __webpack_require__(51);
8017 8157
8018 var performanceNow = __webpack_require__(70); 8158 var performanceNow = __webpack_require__(69);
8019 var warning = __webpack_require__(13); 8159 var warning = __webpack_require__(13);
8020 8160
8021 var eventHandlers = []; 8161 var hooks = [];
8022 var handlerDoesThrowForEvent = {}; 8162 var didHookThrowForEvent = {};
8023 8163
8024 function emitEvent(handlerFunctionName, arg1, arg2, arg3, arg4, arg5) { 8164 function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) {
8025 eventHandlers.forEach(function (handler) { 8165 try {
8026 try { 8166 fn.call(context, arg1, arg2, arg3, arg4, arg5);
8027 if (handler[handlerFunctionName]) { 8167 } catch (e) {
8028 handler[handlerFunctionName](arg1, arg2, arg3, arg4, arg5); 8168 process.env.NODE_ENV !== 'production' ? warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack) : void 0;
8029 } 8169 didHookThrowForEvent[event] = true;
8030 } catch (e) { 8170 }
8031 process.env.NODE_ENV !== 'production' ? warning(handlerDoesThrowForEvent[handlerFunctionName], 'exception thrown by devtool while handling %s: %s', handlerFunctionName, e + '\n' + e.stack) : void 0; 8171 }
8032 handlerDoesThrowForEvent[handlerFunctionName] = true; 8172
8173 function emitEvent(event, arg1, arg2, arg3, arg4, arg5) {
8174 for (var i = 0; i < hooks.length; i++) {
8175 var hook = hooks[i];
8176 var fn = hook[event];
8177 if (fn) {
8178 callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5);
8033 } 8179 }
8034 }); 8180 }
8035 } 8181 }
8036 8182
8037 var isProfiling = false; 8183 var isProfiling = false;
@@ -8048,21 +8194,21 @@
8048 var lifeCycleTimerHasWarned = false; 8194 var lifeCycleTimerHasWarned = false;
8049 8195
8050 function clearHistory() { 8196 function clearHistory() {
8051 ReactComponentTreeDevtool.purgeUnmountedComponents(); 8197 ReactComponentTreeHook.purgeUnmountedComponents();
8052 ReactHostOperationHistoryDevtool.clearHistory(); 8198 ReactHostOperationHistoryHook.clearHistory();
8053 } 8199 }
8054 8200
8055 function getTreeSnapshot(registeredIDs) { 8201 function getTreeSnapshot(registeredIDs) {
8056 return registeredIDs.reduce(function (tree, id) { 8202 return registeredIDs.reduce(function (tree, id) {
8057 var ownerID = ReactComponentTreeDevtool.getOwnerID(id); 8203 var ownerID = ReactComponentTreeHook.getOwnerID(id);
8058 var parentID = ReactComponentTreeDevtool.getParentID(id); 8204 var parentID = ReactComponentTreeHook.getParentID(id);
8059 tree[id] = { 8205 tree[id] = {
8060 displayName: ReactComponentTreeDevtool.getDisplayName(id), 8206 displayName: ReactComponentTreeHook.getDisplayName(id),
8061 text: ReactComponentTreeDevtool.getText(id), 8207 text: ReactComponentTreeHook.getText(id),
8062 updateCount: ReactComponentTreeDevtool.getUpdateCount(id), 8208 updateCount: ReactComponentTreeHook.getUpdateCount(id),
8063 childIDs: ReactComponentTreeDevtool.getChildIDs(id), 8209 childIDs: ReactComponentTreeHook.getChildIDs(id),
8064 // Text nodes don't have owners but this is close enough. 8210 // Text nodes don't have owners but this is close enough.
8065 ownerID: ownerID || ReactComponentTreeDevtool.getOwnerID(parentID), 8211 ownerID: ownerID || ReactComponentTreeHook.getOwnerID(parentID),
8066 parentID: parentID 8212 parentID: parentID
8067 }; 8213 };
8068 return tree; 8214 return tree;
@@ -8072,7 +8218,7 @@
8072 function resetMeasurements() { 8218 function resetMeasurements() {
8073 var previousStartTime = currentFlushStartTime; 8219 var previousStartTime = currentFlushStartTime;
8074 var previousMeasurements = currentFlushMeasurements || []; 8220 var previousMeasurements = currentFlushMeasurements || [];
8075 var previousOperations = ReactHostOperationHistoryDevtool.getHistory(); 8221 var previousOperations = ReactHostOperationHistoryHook.getHistory();
8076 8222
8077 if (currentFlushNesting === 0) { 8223 if (currentFlushNesting === 0) {
8078 currentFlushStartTime = null; 8224 currentFlushStartTime = null;
@@ -8082,7 +8228,7 @@
8082 } 8228 }
8083 8229
8084 if (previousMeasurements.length || previousOperations.length) { 8230 if (previousMeasurements.length || previousOperations.length) {
8085 var registeredIDs = ReactComponentTreeDevtool.getRegisteredIDs(); 8231 var registeredIDs = ReactComponentTreeHook.getRegisteredIDs();
8086 flushHistory.push({ 8232 flushHistory.push({
8087 duration: performanceNow() - previousStartTime, 8233 duration: performanceNow() - previousStartTime,
8088 measurements: previousMeasurements || [], 8234 measurements: previousMeasurements || [],
@@ -8097,7 +8243,14 @@
8097 } 8243 }
8098 8244
8099 function checkDebugID(debugID) { 8245 function checkDebugID(debugID) {
8100 process.env.NODE_ENV !== 'production' ? warning(debugID, 'ReactDebugTool: debugID may not be empty.') : void 0; 8246 var allowRoot = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
8247
8248 if (allowRoot && debugID === 0) {
8249 return;
8250 }
8251 if (!debugID) {
8252 process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0;
8253 }
8101 } 8254 }
8102 8255
8103 function beginLifeCycleTimer(debugID, timerType) { 8256 function beginLifeCycleTimer(debugID, timerType) {
@@ -8165,13 +8318,13 @@
8165 } 8318 }
8166 8319
8167 var ReactDebugTool = { 8320 var ReactDebugTool = {
8168 addDevtool: function (devtool) { 8321 addHook: function (hook) {
8169 eventHandlers.push(devtool); 8322 hooks.push(hook);
8170 }, 8323 },
8171 removeDevtool: function (devtool) { 8324 removeHook: function (hook) {
8172 for (var i = 0; i < eventHandlers.length; i++) { 8325 for (var i = 0; i < hooks.length; i++) {
8173 if (eventHandlers[i] === devtool) { 8326 if (hooks[i] === hook) {
8174 eventHandlers.splice(i, 1); 8327 hooks.splice(i, 1);
8175 i--; 8328 i--;
8176 } 8329 }
8177 } 8330 }
@@ -8187,7 +8340,7 @@
8187 isProfiling = true; 8340 isProfiling = true;
8188 flushHistory.length = 0; 8341 flushHistory.length = 0;
8189 resetMeasurements(); 8342 resetMeasurements();
8190 ReactDebugTool.addDevtool(ReactHostOperationHistoryDevtool); 8343 ReactDebugTool.addHook(ReactHostOperationHistoryHook);
8191 }, 8344 },
8192 endProfiling: function () { 8345 endProfiling: function () {
8193 if (!isProfiling) { 8346 if (!isProfiling) {
@@ -8196,7 +8349,7 @@
8196 8349
8197 isProfiling = false; 8350 isProfiling = false;
8198 resetMeasurements(); 8351 resetMeasurements();
8199 ReactDebugTool.removeDevtool(ReactHostOperationHistoryDevtool); 8352 ReactDebugTool.removeHook(ReactHostOperationHistoryHook);
8200 }, 8353 },
8201 getFlushHistory: function () { 8354 getFlushHistory: function () {
8202 return flushHistory; 8355 return flushHistory;
@@ -8223,20 +8376,6 @@
8223 endLifeCycleTimer(debugID, timerType); 8376 endLifeCycleTimer(debugID, timerType);
8224 emitEvent('onEndLifeCycleTimer', debugID, timerType); 8377 emitEvent('onEndLifeCycleTimer', debugID, timerType);
8225 }, 8378 },
8226 onBeginReconcilerTimer: function (debugID, timerType) {
8227 checkDebugID(debugID);
8228 emitEvent('onBeginReconcilerTimer', debugID, timerType);
8229 },
8230 onEndReconcilerTimer: function (debugID, timerType) {
8231 checkDebugID(debugID);
8232 emitEvent('onEndReconcilerTimer', debugID, timerType);
8233 },
8234 onError: function (debugID) {
8235 if (currentTimerDebugID != null) {
8236 endLifeCycleTimer(currentTimerDebugID, currentTimerType);
8237 }
8238 emitEvent('onError', debugID);
8239 },
8240 onBeginProcessingChildContext: function () { 8379 onBeginProcessingChildContext: function () {
8241 emitEvent('onBeginProcessingChildContext'); 8380 emitEvent('onBeginProcessingChildContext');
8242 }, 8381 },
@@ -8247,45 +8386,18 @@
8247 checkDebugID(debugID); 8386 checkDebugID(debugID);
8248 emitEvent('onHostOperation', debugID, type, payload); 8387 emitEvent('onHostOperation', debugID, type, payload);
8249 }, 8388 },
8250 onComponentHasMounted: function (debugID) {
8251 checkDebugID(debugID);
8252 emitEvent('onComponentHasMounted', debugID);
8253 },
8254 onComponentHasUpdated: function (debugID) {
8255 checkDebugID(debugID);
8256 emitEvent('onComponentHasUpdated', debugID);
8257 },
8258 onSetState: function () { 8389 onSetState: function () {
8259 emitEvent('onSetState'); 8390 emitEvent('onSetState');
8260 }, 8391 },
8261 onSetDisplayName: function (debugID, displayName) {
8262 checkDebugID(debugID);
8263 emitEvent('onSetDisplayName', debugID, displayName);
8264 },
8265 onSetChildren: function (debugID, childDebugIDs) { 8392 onSetChildren: function (debugID, childDebugIDs) {
8266 checkDebugID(debugID); 8393 checkDebugID(debugID);
8267 childDebugIDs.forEach(checkDebugID); 8394 childDebugIDs.forEach(checkDebugID);
8268 emitEvent('onSetChildren', debugID, childDebugIDs); 8395 emitEvent('onSetChildren', debugID, childDebugIDs);
8269 }, 8396 },
8270 onSetOwner: function (debugID, ownerDebugID) { 8397 onBeforeMountComponent: function (debugID, element, parentDebugID) {
8271 checkDebugID(debugID);
8272 emitEvent('onSetOwner', debugID, ownerDebugID);
8273 },
8274 onSetParent: function (debugID, parentDebugID) {
8275 checkDebugID(debugID);
8276 emitEvent('onSetParent', debugID, parentDebugID);
8277 },
8278 onSetText: function (debugID, text) {
8279 checkDebugID(debugID); 8398 checkDebugID(debugID);
8280 emitEvent('onSetText', debugID, text); 8399 checkDebugID(parentDebugID, true);
8281 }, 8400 emitEvent('onBeforeMountComponent', debugID, element, parentDebugID);
8282 onMountRootComponent: function (debugID) {
8283 checkDebugID(debugID);
8284 emitEvent('onMountRootComponent', debugID);
8285 },
8286 onBeforeMountComponent: function (debugID, element) {
8287 checkDebugID(debugID);
8288 emitEvent('onBeforeMountComponent', debugID, element);
8289 }, 8401 },
8290 onMountComponent: function (debugID) { 8402 onMountComponent: function (debugID) {
8291 checkDebugID(debugID); 8403 checkDebugID(debugID);
@@ -8299,6 +8411,10 @@
8299 checkDebugID(debugID); 8411 checkDebugID(debugID);
8300 emitEvent('onUpdateComponent', debugID); 8412 emitEvent('onUpdateComponent', debugID);
8301 }, 8413 },
8414 onBeforeUnmountComponent: function (debugID) {
8415 checkDebugID(debugID);
8416 emitEvent('onBeforeUnmountComponent', debugID);
8417 },
8302 onUnmountComponent: function (debugID) { 8418 onUnmountComponent: function (debugID) {
8303 checkDebugID(debugID); 8419 checkDebugID(debugID);
8304 emitEvent('onUnmountComponent', debugID); 8420 emitEvent('onUnmountComponent', debugID);
@@ -8308,9 +8424,13 @@
8308 } 8424 }
8309 }; 8425 };
8310 8426
8311 ReactDebugTool.addDevtool(ReactInvalidSetStateWarningDevTool); 8427 // TODO remove these when RN/www gets updated
8312 ReactDebugTool.addDevtool(ReactComponentTreeDevtool); 8428 ReactDebugTool.addDevtool = ReactDebugTool.addHook;
8313 ReactDebugTool.addDevtool(ReactChildrenMutationWarningDevtool); 8429 ReactDebugTool.removeDevtool = ReactDebugTool.removeHook;
8430
8431 ReactDebugTool.addHook(ReactInvalidSetStateWarningHook);
8432 ReactDebugTool.addHook(ReactComponentTreeHook);
8433 ReactDebugTool.addHook(ReactChildrenMutationWarningHook);
8314 var url = ExecutionEnvironment.canUseDOM && window.location.href || ''; 8434 var url = ExecutionEnvironment.canUseDOM && window.location.href || '';
8315 if (/[?&]react_perf\b/.test(url)) { 8435 if (/[?&]react_perf\b/.test(url)) {
8316 ReactDebugTool.beginProfiling(); 8436 ReactDebugTool.beginProfiling();
@@ -8320,7 +8440,7 @@
8320 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 8440 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
8321 8441
8322/***/ }, 8442/***/ },
8323/* 67 */ 8443/* 66 */
8324/***/ function(module, exports, __webpack_require__) { 8444/***/ function(module, exports, __webpack_require__) {
8325 8445
8326 /* WEBPACK VAR INJECTION */(function(process) {/** 8446 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -8331,7 +8451,7 @@
8331 * LICENSE file in the root directory of this source tree. An additional grant 8451 * LICENSE file in the root directory of this source tree. An additional grant
8332 * of patent rights can be found in the PATENTS file in the same directory. 8452 * of patent rights can be found in the PATENTS file in the same directory.
8333 * 8453 *
8334 * @providesModule ReactInvalidSetStateWarningDevTool 8454 * @providesModule ReactInvalidSetStateWarningHook
8335 */ 8455 */
8336 8456
8337 'use strict'; 8457 'use strict';
@@ -8346,7 +8466,7 @@
8346 }; 8466 };
8347 } 8467 }
8348 8468
8349 var ReactInvalidSetStateWarningDevTool = { 8469 var ReactInvalidSetStateWarningHook = {
8350 onBeginProcessingChildContext: function () { 8470 onBeginProcessingChildContext: function () {
8351 processingChildContext = true; 8471 processingChildContext = true;
8352 }, 8472 },
@@ -8358,11 +8478,11 @@
8358 } 8478 }
8359 }; 8479 };
8360 8480
8361 module.exports = ReactInvalidSetStateWarningDevTool; 8481 module.exports = ReactInvalidSetStateWarningHook;
8362 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 8482 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
8363 8483
8364/***/ }, 8484/***/ },
8365/* 68 */ 8485/* 67 */
8366/***/ function(module, exports) { 8486/***/ function(module, exports) {
8367 8487
8368 /** 8488 /**
@@ -8373,14 +8493,14 @@
8373 * LICENSE file in the root directory of this source tree. An additional grant 8493 * LICENSE file in the root directory of this source tree. An additional grant
8374 * of patent rights can be found in the PATENTS file in the same directory. 8494 * of patent rights can be found in the PATENTS file in the same directory.
8375 * 8495 *
8376 * @providesModule ReactHostOperationHistoryDevtool 8496 * @providesModule ReactHostOperationHistoryHook
8377 */ 8497 */
8378 8498
8379 'use strict'; 8499 'use strict';
8380 8500
8381 var history = []; 8501 var history = [];
8382 8502
8383 var ReactHostOperationHistoryDevtool = { 8503 var ReactHostOperationHistoryHook = {
8384 onHostOperation: function (debugID, type, payload) { 8504 onHostOperation: function (debugID, type, payload) {
8385 history.push({ 8505 history.push({
8386 instanceID: debugID, 8506 instanceID: debugID,
@@ -8389,7 +8509,7 @@
8389 }); 8509 });
8390 }, 8510 },
8391 clearHistory: function () { 8511 clearHistory: function () {
8392 if (ReactHostOperationHistoryDevtool._preventClearing) { 8512 if (ReactHostOperationHistoryHook._preventClearing) {
8393 // Should only be used for tests. 8513 // Should only be used for tests.
8394 return; 8514 return;
8395 } 8515 }
@@ -8401,10 +8521,10 @@
8401 } 8521 }
8402 }; 8522 };
8403 8523
8404 module.exports = ReactHostOperationHistoryDevtool; 8524 module.exports = ReactHostOperationHistoryHook;
8405 8525
8406/***/ }, 8526/***/ },
8407/* 69 */ 8527/* 68 */
8408/***/ function(module, exports, __webpack_require__) { 8528/***/ function(module, exports, __webpack_require__) {
8409 8529
8410 /* WEBPACK VAR INJECTION */(function(process) {/** 8530 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -8415,17 +8535,15 @@
8415 * LICENSE file in the root directory of this source tree. An additional grant 8535 * LICENSE file in the root directory of this source tree. An additional grant
8416 * of patent rights can be found in the PATENTS file in the same directory. 8536 * of patent rights can be found in the PATENTS file in the same directory.
8417 * 8537 *
8418 * @providesModule ReactChildrenMutationWarningDevtool 8538 * @providesModule ReactChildrenMutationWarningHook
8419 */ 8539 */
8420 8540
8421 'use strict'; 8541 'use strict';
8422 8542
8423 var ReactComponentTreeDevtool = __webpack_require__(31); 8543 var ReactComponentTreeHook = __webpack_require__(30);
8424 8544
8425 var warning = __webpack_require__(13); 8545 var warning = __webpack_require__(13);
8426 8546
8427 var elements = {};
8428
8429 function handleElement(debugID, element) { 8547 function handleElement(debugID, element) {
8430 if (element == null) { 8548 if (element == null) {
8431 return; 8549 return;
@@ -8448,31 +8566,25 @@
8448 isMutated = true; 8566 isMutated = true;
8449 } 8567 }
8450 } 8568 }
8451 process.env.NODE_ENV !== 'production' ? warning(Array.isArray(element._shadowChildren) && !isMutated, 'Component\'s children should not be mutated.%s', ReactComponentTreeDevtool.getStackAddendumByID(debugID)) : void 0; 8569 if (!Array.isArray(element._shadowChildren) || isMutated) {
8570 process.env.NODE_ENV !== 'production' ? warning(false, 'Component\'s children should not be mutated.%s', ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
8571 }
8452 } 8572 }
8453 8573
8454 var ReactDOMUnknownPropertyDevtool = { 8574 var ReactChildrenMutationWarningHook = {
8455 onBeforeMountComponent: function (debugID, element) { 8575 onMountComponent: function (debugID) {
8456 elements[debugID] = element; 8576 handleElement(debugID, ReactComponentTreeHook.getElement(debugID));
8457 },
8458 onBeforeUpdateComponent: function (debugID, element) {
8459 elements[debugID] = element;
8460 },
8461 onComponentHasMounted: function (debugID) {
8462 handleElement(debugID, elements[debugID]);
8463 delete elements[debugID];
8464 }, 8577 },
8465 onComponentHasUpdated: function (debugID) { 8578 onUpdateComponent: function (debugID) {
8466 handleElement(debugID, elements[debugID]); 8579 handleElement(debugID, ReactComponentTreeHook.getElement(debugID));
8467 delete elements[debugID];
8468 } 8580 }
8469 }; 8581 };
8470 8582
8471 module.exports = ReactDOMUnknownPropertyDevtool; 8583 module.exports = ReactChildrenMutationWarningHook;
8472 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 8584 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
8473 8585
8474/***/ }, 8586/***/ },
8475/* 70 */ 8587/* 69 */
8476/***/ function(module, exports, __webpack_require__) { 8588/***/ function(module, exports, __webpack_require__) {
8477 8589
8478 'use strict'; 8590 'use strict';
@@ -8488,7 +8600,7 @@
8488 * @typechecks 8600 * @typechecks
8489 */ 8601 */
8490 8602
8491 var performance = __webpack_require__(71); 8603 var performance = __webpack_require__(70);
8492 8604
8493 var performanceNow; 8605 var performanceNow;
8494 8606
@@ -8510,7 +8622,7 @@
8510 module.exports = performanceNow; 8622 module.exports = performanceNow;
8511 8623
8512/***/ }, 8624/***/ },
8513/* 71 */ 8625/* 70 */
8514/***/ function(module, exports, __webpack_require__) { 8626/***/ function(module, exports, __webpack_require__) {
8515 8627
8516 /** 8628 /**
@@ -8526,7 +8638,7 @@
8526 8638
8527 'use strict'; 8639 'use strict';
8528 8640
8529 var ExecutionEnvironment = __webpack_require__(52); 8641 var ExecutionEnvironment = __webpack_require__(51);
8530 8642
8531 var performance; 8643 var performance;
8532 8644
@@ -8537,7 +8649,7 @@
8537 module.exports = performance || {}; 8649 module.exports = performance || {};
8538 8650
8539/***/ }, 8651/***/ },
8540/* 72 */ 8652/* 71 */
8541/***/ function(module, exports, __webpack_require__) { 8653/***/ function(module, exports, __webpack_require__) {
8542 8654
8543 /* WEBPACK VAR INJECTION */(function(process) {/** 8655 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -8776,7 +8888,7 @@
8776 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 8888 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
8777 8889
8778/***/ }, 8890/***/ },
8779/* 73 */ 8891/* 72 */
8780/***/ function(module, exports) { 8892/***/ function(module, exports) {
8781 8893
8782 /** 8894 /**
@@ -8816,7 +8928,7 @@
8816 module.exports = getEventTarget; 8928 module.exports = getEventTarget;
8817 8929
8818/***/ }, 8930/***/ },
8819/* 74 */ 8931/* 73 */
8820/***/ function(module, exports, __webpack_require__) { 8932/***/ function(module, exports, __webpack_require__) {
8821 8933
8822 /** 8934 /**
@@ -8832,7 +8944,7 @@
8832 8944
8833 'use strict'; 8945 'use strict';
8834 8946
8835 var ExecutionEnvironment = __webpack_require__(52); 8947 var ExecutionEnvironment = __webpack_require__(51);
8836 8948
8837 var useHasFeature; 8949 var useHasFeature;
8838 if (ExecutionEnvironment.canUseDOM) { 8950 if (ExecutionEnvironment.canUseDOM) {
@@ -8881,7 +8993,7 @@
8881 module.exports = isEventSupported; 8993 module.exports = isEventSupported;
8882 8994
8883/***/ }, 8995/***/ },
8884/* 75 */ 8996/* 74 */
8885/***/ function(module, exports) { 8997/***/ function(module, exports) {
8886 8998
8887 /** 8999 /**
@@ -8937,7 +9049,7 @@
8937 module.exports = isTextInputElement; 9049 module.exports = isTextInputElement;
8938 9050
8939/***/ }, 9051/***/ },
8940/* 76 */ 9052/* 75 */
8941/***/ function(module, exports, __webpack_require__) { 9053/***/ function(module, exports, __webpack_require__) {
8942 9054
8943 /** 9055 /**
@@ -8969,7 +9081,7 @@
8969 module.exports = DefaultEventPluginOrder; 9081 module.exports = DefaultEventPluginOrder;
8970 9082
8971/***/ }, 9083/***/ },
8972/* 77 */ 9084/* 76 */
8973/***/ function(module, exports, __webpack_require__) { 9085/***/ function(module, exports, __webpack_require__) {
8974 9086
8975 /** 9087 /**
@@ -8985,10 +9097,10 @@
8985 9097
8986 'use strict'; 9098 'use strict';
8987 9099
8988 var EventConstants = __webpack_require__(44); 9100 var EventConstants = __webpack_require__(43);
8989 var EventPropagators = __webpack_require__(45); 9101 var EventPropagators = __webpack_require__(44);
8990 var ReactDOMComponentTree = __webpack_require__(39); 9102 var ReactDOMComponentTree = __webpack_require__(38);
8991 var SyntheticMouseEvent = __webpack_require__(78); 9103 var SyntheticMouseEvent = __webpack_require__(77);
8992 9104
8993 var keyOf = __webpack_require__(27); 9105 var keyOf = __webpack_require__(27);
8994 9106
@@ -9079,7 +9191,7 @@
9079 module.exports = EnterLeaveEventPlugin; 9191 module.exports = EnterLeaveEventPlugin;
9080 9192
9081/***/ }, 9193/***/ },
9082/* 78 */ 9194/* 77 */
9083/***/ function(module, exports, __webpack_require__) { 9195/***/ function(module, exports, __webpack_require__) {
9084 9196
9085 /** 9197 /**
@@ -9095,10 +9207,10 @@
9095 9207
9096 'use strict'; 9208 'use strict';
9097 9209
9098 var SyntheticUIEvent = __webpack_require__(79); 9210 var SyntheticUIEvent = __webpack_require__(78);
9099 var ViewportMetrics = __webpack_require__(80); 9211 var ViewportMetrics = __webpack_require__(79);
9100 9212
9101 var getEventModifierState = __webpack_require__(81); 9213 var getEventModifierState = __webpack_require__(80);
9102 9214
9103 /** 9215 /**
9104 * @interface MouseEvent 9216 * @interface MouseEvent
@@ -9156,7 +9268,7 @@
9156 module.exports = SyntheticMouseEvent; 9268 module.exports = SyntheticMouseEvent;
9157 9269
9158/***/ }, 9270/***/ },
9159/* 79 */ 9271/* 78 */
9160/***/ function(module, exports, __webpack_require__) { 9272/***/ function(module, exports, __webpack_require__) {
9161 9273
9162 /** 9274 /**
@@ -9172,9 +9284,9 @@
9172 9284
9173 'use strict'; 9285 'use strict';
9174 9286
9175 var SyntheticEvent = __webpack_require__(56); 9287 var SyntheticEvent = __webpack_require__(55);
9176 9288
9177 var getEventTarget = __webpack_require__(73); 9289 var getEventTarget = __webpack_require__(72);
9178 9290
9179 /** 9291 /**
9180 * @interface UIEvent 9292 * @interface UIEvent
@@ -9220,7 +9332,7 @@
9220 module.exports = SyntheticUIEvent; 9332 module.exports = SyntheticUIEvent;
9221 9333
9222/***/ }, 9334/***/ },
9223/* 80 */ 9335/* 79 */
9224/***/ function(module, exports) { 9336/***/ function(module, exports) {
9225 9337
9226 /** 9338 /**
@@ -9252,7 +9364,7 @@
9252 module.exports = ViewportMetrics; 9364 module.exports = ViewportMetrics;
9253 9365
9254/***/ }, 9366/***/ },
9255/* 81 */ 9367/* 80 */
9256/***/ function(module, exports) { 9368/***/ function(module, exports) {
9257 9369
9258 /** 9370 /**
@@ -9300,7 +9412,7 @@
9300 module.exports = getEventModifierState; 9412 module.exports = getEventModifierState;
9301 9413
9302/***/ }, 9414/***/ },
9303/* 82 */ 9415/* 81 */
9304/***/ function(module, exports, __webpack_require__) { 9416/***/ function(module, exports, __webpack_require__) {
9305 9417
9306 /** 9418 /**
@@ -9316,7 +9428,7 @@
9316 9428
9317 'use strict'; 9429 'use strict';
9318 9430
9319 var DOMProperty = __webpack_require__(40); 9431 var DOMProperty = __webpack_require__(39);
9320 9432
9321 var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY; 9433 var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
9322 var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE; 9434 var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
@@ -9337,6 +9449,8 @@
9337 allowFullScreen: HAS_BOOLEAN_VALUE, 9449 allowFullScreen: HAS_BOOLEAN_VALUE,
9338 allowTransparency: 0, 9450 allowTransparency: 0,
9339 alt: 0, 9451 alt: 0,
9452 // specifies target context for links with `preload` type
9453 as: 0,
9340 async: HAS_BOOLEAN_VALUE, 9454 async: HAS_BOOLEAN_VALUE,
9341 autoComplete: 0, 9455 autoComplete: 0,
9342 // autoFocus is polyfilled/normalized by AutoFocusUtils 9456 // autoFocus is polyfilled/normalized by AutoFocusUtils
@@ -9417,6 +9531,7 @@
9417 optimum: 0, 9531 optimum: 0,
9418 pattern: 0, 9532 pattern: 0,
9419 placeholder: 0, 9533 placeholder: 0,
9534 playsInline: HAS_BOOLEAN_VALUE,
9420 poster: 0, 9535 poster: 0,
9421 preload: 0, 9536 preload: 0,
9422 profile: 0, 9537 profile: 0,
@@ -9514,7 +9629,7 @@
9514 module.exports = HTMLDOMPropertyConfig; 9629 module.exports = HTMLDOMPropertyConfig;
9515 9630
9516/***/ }, 9631/***/ },
9517/* 83 */ 9632/* 82 */
9518/***/ function(module, exports, __webpack_require__) { 9633/***/ function(module, exports, __webpack_require__) {
9519 9634
9520 /** 9635 /**
@@ -9530,8 +9645,8 @@
9530 9645
9531 'use strict'; 9646 'use strict';
9532 9647
9533 var DOMChildrenOperations = __webpack_require__(84); 9648 var DOMChildrenOperations = __webpack_require__(83);
9534 var ReactDOMIDOperations = __webpack_require__(96); 9649 var ReactDOMIDOperations = __webpack_require__(95);
9535 9650
9536 /** 9651 /**
9537 * Abstracts away all functionality of the reconciler that requires knowledge of 9652 * Abstracts away all functionality of the reconciler that requires knowledge of
@@ -9542,23 +9657,14 @@
9542 9657
9543 processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, 9658 processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,
9544 9659
9545 replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup, 9660 replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup
9546
9547 /**
9548 * If a particular environment requires that some resources be cleaned up,
9549 * specify this in the injected Mixin. In the DOM, we would likely want to
9550 * purge any cached node ID lookups.
9551 *
9552 * @private
9553 */
9554 unmountIDFromEnvironment: function (rootNodeID) {}
9555 9661
9556 }; 9662 };
9557 9663
9558 module.exports = ReactComponentBrowserEnvironment; 9664 module.exports = ReactComponentBrowserEnvironment;
9559 9665
9560/***/ }, 9666/***/ },
9561/* 84 */ 9667/* 83 */
9562/***/ function(module, exports, __webpack_require__) { 9668/***/ function(module, exports, __webpack_require__) {
9563 9669
9564 /* WEBPACK VAR INJECTION */(function(process) {/** 9670 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -9574,15 +9680,15 @@
9574 9680
9575 'use strict'; 9681 'use strict';
9576 9682
9577 var DOMLazyTree = __webpack_require__(85); 9683 var DOMLazyTree = __webpack_require__(84);
9578 var Danger = __webpack_require__(91); 9684 var Danger = __webpack_require__(90);
9579 var ReactMultiChildUpdateTypes = __webpack_require__(95); 9685 var ReactMultiChildUpdateTypes = __webpack_require__(94);
9580 var ReactDOMComponentTree = __webpack_require__(39); 9686 var ReactDOMComponentTree = __webpack_require__(38);
9581 var ReactInstrumentation = __webpack_require__(65); 9687 var ReactInstrumentation = __webpack_require__(64);
9582 9688
9583 var createMicrosoftUnsafeLocalFunction = __webpack_require__(88); 9689 var createMicrosoftUnsafeLocalFunction = __webpack_require__(87);
9584 var setInnerHTML = __webpack_require__(87); 9690 var setInnerHTML = __webpack_require__(86);
9585 var setTextContent = __webpack_require__(89); 9691 var setTextContent = __webpack_require__(88);
9586 9692
9587 function getNodeAfter(parentNode, node) { 9693 function getNodeAfter(parentNode, node) {
9588 // Special case for text components, which return [open, close] comments 9694 // Special case for text components, which return [open, close] comments
@@ -9758,7 +9864,7 @@
9758 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 9864 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
9759 9865
9760/***/ }, 9866/***/ },
9761/* 85 */ 9867/* 84 */
9762/***/ function(module, exports, __webpack_require__) { 9868/***/ function(module, exports, __webpack_require__) {
9763 9869
9764 /** 9870 /**
@@ -9774,11 +9880,11 @@
9774 9880
9775 'use strict'; 9881 'use strict';
9776 9882
9777 var DOMNamespaces = __webpack_require__(86); 9883 var DOMNamespaces = __webpack_require__(85);
9778 var setInnerHTML = __webpack_require__(87); 9884 var setInnerHTML = __webpack_require__(86);
9779 9885
9780 var createMicrosoftUnsafeLocalFunction = __webpack_require__(88); 9886 var createMicrosoftUnsafeLocalFunction = __webpack_require__(87);
9781 var setTextContent = __webpack_require__(89); 9887 var setTextContent = __webpack_require__(88);
9782 9888
9783 var ELEMENT_NODE_TYPE = 1; 9889 var ELEMENT_NODE_TYPE = 1;
9784 var DOCUMENT_FRAGMENT_NODE_TYPE = 11; 9890 var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
@@ -9881,7 +9987,7 @@
9881 module.exports = DOMLazyTree; 9987 module.exports = DOMLazyTree;
9882 9988
9883/***/ }, 9989/***/ },
9884/* 86 */ 9990/* 85 */
9885/***/ function(module, exports) { 9991/***/ function(module, exports) {
9886 9992
9887 /** 9993 /**
@@ -9906,7 +10012,7 @@
9906 module.exports = DOMNamespaces; 10012 module.exports = DOMNamespaces;
9907 10013
9908/***/ }, 10014/***/ },
9909/* 87 */ 10015/* 86 */
9910/***/ function(module, exports, __webpack_require__) { 10016/***/ function(module, exports, __webpack_require__) {
9911 10017
9912 /** 10018 /**
@@ -9922,13 +10028,13 @@
9922 10028
9923 'use strict'; 10029 'use strict';
9924 10030
9925 var ExecutionEnvironment = __webpack_require__(52); 10031 var ExecutionEnvironment = __webpack_require__(51);
9926 var DOMNamespaces = __webpack_require__(86); 10032 var DOMNamespaces = __webpack_require__(85);
9927 10033
9928 var WHITESPACE_TEST = /^[ \r\n\t\f]/; 10034 var WHITESPACE_TEST = /^[ \r\n\t\f]/;
9929 var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/; 10035 var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/;
9930 10036
9931 var createMicrosoftUnsafeLocalFunction = __webpack_require__(88); 10037 var createMicrosoftUnsafeLocalFunction = __webpack_require__(87);
9932 10038
9933 // SVG temp container for IE lacking innerHTML 10039 // SVG temp container for IE lacking innerHTML
9934 var reusableSVGContainer; 10040 var reusableSVGContainer;
@@ -9948,9 +10054,9 @@
9948 if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) { 10054 if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) {
9949 reusableSVGContainer = reusableSVGContainer || document.createElement('div'); 10055 reusableSVGContainer = reusableSVGContainer || document.createElement('div');
9950 reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>'; 10056 reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>';
9951 var newNodes = reusableSVGContainer.firstChild.childNodes; 10057 var svgNode = reusableSVGContainer.firstChild;
9952 for (var i = 0; i < newNodes.length; i++) { 10058 while (svgNode.firstChild) {
9953 node.appendChild(newNodes[i]); 10059 node.appendChild(svgNode.firstChild);
9954 } 10060 }
9955 } else { 10061 } else {
9956 node.innerHTML = html; 10062 node.innerHTML = html;
@@ -10009,7 +10115,7 @@
10009 module.exports = setInnerHTML; 10115 module.exports = setInnerHTML;
10010 10116
10011/***/ }, 10117/***/ },
10012/* 88 */ 10118/* 87 */
10013/***/ function(module, exports) { 10119/***/ function(module, exports) {
10014 10120
10015 /** 10121 /**
@@ -10046,7 +10152,7 @@
10046 module.exports = createMicrosoftUnsafeLocalFunction; 10152 module.exports = createMicrosoftUnsafeLocalFunction;
10047 10153
10048/***/ }, 10154/***/ },
10049/* 89 */ 10155/* 88 */
10050/***/ function(module, exports, __webpack_require__) { 10156/***/ function(module, exports, __webpack_require__) {
10051 10157
10052 /** 10158 /**
@@ -10062,9 +10168,9 @@
10062 10168
10063 'use strict'; 10169 'use strict';
10064 10170
10065 var ExecutionEnvironment = __webpack_require__(52); 10171 var ExecutionEnvironment = __webpack_require__(51);
10066 var escapeTextContentForBrowser = __webpack_require__(90); 10172 var escapeTextContentForBrowser = __webpack_require__(89);
10067 var setInnerHTML = __webpack_require__(87); 10173 var setInnerHTML = __webpack_require__(86);
10068 10174
10069 /** 10175 /**
10070 * Set the textContent property of a node, ensuring that whitespace is preserved 10176 * Set the textContent property of a node, ensuring that whitespace is preserved
@@ -10099,7 +10205,7 @@
10099 module.exports = setTextContent; 10205 module.exports = setTextContent;
10100 10206
10101/***/ }, 10207/***/ },
10102/* 90 */ 10208/* 89 */
10103/***/ function(module, exports) { 10209/***/ function(module, exports) {
10104 10210
10105 /** 10211 /**
@@ -10207,6 +10313,7 @@
10207 } 10313 }
10208 // end code copied and modified from escape-html 10314 // end code copied and modified from escape-html
10209 10315
10316
10210 /** 10317 /**
10211 * Escapes text to prevent scripting attacks. 10318 * Escapes text to prevent scripting attacks.
10212 * 10319 *
@@ -10226,7 +10333,7 @@
10226 module.exports = escapeTextContentForBrowser; 10333 module.exports = escapeTextContentForBrowser;
10227 10334
10228/***/ }, 10335/***/ },
10229/* 91 */ 10336/* 90 */
10230/***/ function(module, exports, __webpack_require__) { 10337/***/ function(module, exports, __webpack_require__) {
10231 10338
10232 /* WEBPACK VAR INJECTION */(function(process) {/** 10339 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -10244,10 +10351,10 @@
10244 10351
10245 var _prodInvariant = __webpack_require__(9); 10352 var _prodInvariant = __webpack_require__(9);
10246 10353
10247 var DOMLazyTree = __webpack_require__(85); 10354 var DOMLazyTree = __webpack_require__(84);
10248 var ExecutionEnvironment = __webpack_require__(52); 10355 var ExecutionEnvironment = __webpack_require__(51);
10249 10356
10250 var createNodesFromMarkup = __webpack_require__(92); 10357 var createNodesFromMarkup = __webpack_require__(91);
10251 var emptyFunction = __webpack_require__(14); 10358 var emptyFunction = __webpack_require__(14);
10252 var invariant = __webpack_require__(10); 10359 var invariant = __webpack_require__(10);
10253 10360
@@ -10280,7 +10387,7 @@
10280 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 10387 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
10281 10388
10282/***/ }, 10389/***/ },
10283/* 92 */ 10390/* 91 */
10284/***/ function(module, exports, __webpack_require__) { 10391/***/ function(module, exports, __webpack_require__) {
10285 10392
10286 /* WEBPACK VAR INJECTION */(function(process) {'use strict'; 10393 /* WEBPACK VAR INJECTION */(function(process) {'use strict';
@@ -10298,10 +10405,10 @@
10298 10405
10299 /*eslint-disable fb-www/unsafe-html*/ 10406 /*eslint-disable fb-www/unsafe-html*/
10300 10407
10301 var ExecutionEnvironment = __webpack_require__(52); 10408 var ExecutionEnvironment = __webpack_require__(51);
10302 10409
10303 var createArrayFromMixed = __webpack_require__(93); 10410 var createArrayFromMixed = __webpack_require__(92);
10304 var getMarkupWrap = __webpack_require__(94); 10411 var getMarkupWrap = __webpack_require__(93);
10305 var invariant = __webpack_require__(10); 10412 var invariant = __webpack_require__(10);
10306 10413
10307 /** 10414 /**
@@ -10369,7 +10476,7 @@
10369 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 10476 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
10370 10477
10371/***/ }, 10478/***/ },
10372/* 93 */ 10479/* 92 */
10373/***/ function(module, exports, __webpack_require__) { 10480/***/ function(module, exports, __webpack_require__) {
10374 10481
10375 /* WEBPACK VAR INJECTION */(function(process) {'use strict'; 10482 /* WEBPACK VAR INJECTION */(function(process) {'use strict';
@@ -10445,7 +10552,7 @@
10445 * @return {boolean} 10552 * @return {boolean}
10446 */ 10553 */
10447 function hasArrayNature(obj) { 10554 function hasArrayNature(obj) {
10448 return( 10555 return (
10449 // not null/false 10556 // not null/false
10450 !!obj && ( 10557 !!obj && (
10451 // arrays are objects, NodeLists are functions in Safari 10558 // arrays are objects, NodeLists are functions in Safari
@@ -10501,7 +10608,7 @@
10501 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 10608 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
10502 10609
10503/***/ }, 10610/***/ },
10504/* 94 */ 10611/* 93 */
10505/***/ function(module, exports, __webpack_require__) { 10612/***/ function(module, exports, __webpack_require__) {
10506 10613
10507 /* WEBPACK VAR INJECTION */(function(process) {'use strict'; 10614 /* WEBPACK VAR INJECTION */(function(process) {'use strict';
@@ -10518,7 +10625,7 @@
10518 10625
10519 /*eslint-disable fb-www/unsafe-html */ 10626 /*eslint-disable fb-www/unsafe-html */
10520 10627
10521 var ExecutionEnvironment = __webpack_require__(52); 10628 var ExecutionEnvironment = __webpack_require__(51);
10522 10629
10523 var invariant = __webpack_require__(10); 10630 var invariant = __webpack_require__(10);
10524 10631
@@ -10601,7 +10708,7 @@
10601 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 10708 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
10602 10709
10603/***/ }, 10710/***/ },
10604/* 95 */ 10711/* 94 */
10605/***/ function(module, exports, __webpack_require__) { 10712/***/ function(module, exports, __webpack_require__) {
10606 10713
10607 /** 10714 /**
@@ -10638,7 +10745,7 @@
10638 module.exports = ReactMultiChildUpdateTypes; 10745 module.exports = ReactMultiChildUpdateTypes;
10639 10746
10640/***/ }, 10747/***/ },
10641/* 96 */ 10748/* 95 */
10642/***/ function(module, exports, __webpack_require__) { 10749/***/ function(module, exports, __webpack_require__) {
10643 10750
10644 /** 10751 /**
@@ -10654,8 +10761,8 @@
10654 10761
10655 'use strict'; 10762 'use strict';
10656 10763
10657 var DOMChildrenOperations = __webpack_require__(84); 10764 var DOMChildrenOperations = __webpack_require__(83);
10658 var ReactDOMComponentTree = __webpack_require__(39); 10765 var ReactDOMComponentTree = __webpack_require__(38);
10659 10766
10660 /** 10767 /**
10661 * Operations used to process updates to DOM nodes. 10768 * Operations used to process updates to DOM nodes.
@@ -10677,7 +10784,7 @@
10677 module.exports = ReactDOMIDOperations; 10784 module.exports = ReactDOMIDOperations;
10678 10785
10679/***/ }, 10786/***/ },
10680/* 97 */ 10787/* 96 */
10681/***/ function(module, exports, __webpack_require__) { 10788/***/ function(module, exports, __webpack_require__) {
10682 10789
10683 /* WEBPACK VAR INJECTION */(function(process) {/** 10790 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -10698,35 +10805,34 @@
10698 var _prodInvariant = __webpack_require__(9), 10805 var _prodInvariant = __webpack_require__(9),
10699 _assign = __webpack_require__(6); 10806 _assign = __webpack_require__(6);
10700 10807
10701 var AutoFocusUtils = __webpack_require__(98); 10808 var AutoFocusUtils = __webpack_require__(97);
10702 var CSSPropertyOperations = __webpack_require__(100); 10809 var CSSPropertyOperations = __webpack_require__(99);
10703 var DOMLazyTree = __webpack_require__(85); 10810 var DOMLazyTree = __webpack_require__(84);
10704 var DOMNamespaces = __webpack_require__(86); 10811 var DOMNamespaces = __webpack_require__(85);
10705 var DOMProperty = __webpack_require__(40); 10812 var DOMProperty = __webpack_require__(39);
10706 var DOMPropertyOperations = __webpack_require__(108); 10813 var DOMPropertyOperations = __webpack_require__(107);
10707 var EventConstants = __webpack_require__(44); 10814 var EventConstants = __webpack_require__(43);
10708 var EventPluginHub = __webpack_require__(46); 10815 var EventPluginHub = __webpack_require__(45);
10709 var EventPluginRegistry = __webpack_require__(47); 10816 var EventPluginRegistry = __webpack_require__(46);
10710 var ReactBrowserEventEmitter = __webpack_require__(114); 10817 var ReactBrowserEventEmitter = __webpack_require__(109);
10711 var ReactComponentBrowserEnvironment = __webpack_require__(83); 10818 var ReactDOMButton = __webpack_require__(112);
10712 var ReactDOMButton = __webpack_require__(117); 10819 var ReactDOMComponentFlags = __webpack_require__(40);
10713 var ReactDOMComponentFlags = __webpack_require__(41); 10820 var ReactDOMComponentTree = __webpack_require__(38);
10714 var ReactDOMComponentTree = __webpack_require__(39); 10821 var ReactDOMInput = __webpack_require__(114);
10715 var ReactDOMInput = __webpack_require__(119); 10822 var ReactDOMOption = __webpack_require__(116);
10716 var ReactDOMOption = __webpack_require__(121); 10823 var ReactDOMSelect = __webpack_require__(117);
10717 var ReactDOMSelect = __webpack_require__(122); 10824 var ReactDOMTextarea = __webpack_require__(118);
10718 var ReactDOMTextarea = __webpack_require__(123); 10825 var ReactInstrumentation = __webpack_require__(64);
10719 var ReactInstrumentation = __webpack_require__(65); 10826 var ReactMultiChild = __webpack_require__(119);
10720 var ReactMultiChild = __webpack_require__(124); 10827 var ReactServerRenderingTransaction = __webpack_require__(131);
10721 var ReactServerRenderingTransaction = __webpack_require__(136);
10722 10828
10723 var emptyFunction = __webpack_require__(14); 10829 var emptyFunction = __webpack_require__(14);
10724 var escapeTextContentForBrowser = __webpack_require__(90); 10830 var escapeTextContentForBrowser = __webpack_require__(89);
10725 var invariant = __webpack_require__(10); 10831 var invariant = __webpack_require__(10);
10726 var isEventSupported = __webpack_require__(74); 10832 var isEventSupported = __webpack_require__(73);
10727 var keyOf = __webpack_require__(27); 10833 var keyOf = __webpack_require__(27);
10728 var shallowEqual = __webpack_require__(131); 10834 var shallowEqual = __webpack_require__(126);
10729 var validateDOMNesting = __webpack_require__(139); 10835 var validateDOMNesting = __webpack_require__(134);
10730 var warning = __webpack_require__(13); 10836 var warning = __webpack_require__(13);
10731 10837
10732 var Flags = ReactDOMComponentFlags; 10838 var Flags = ReactDOMComponentFlags;
@@ -10878,12 +10984,13 @@
10878 ReactDOMOption.postMountWrapper(inst); 10984 ReactDOMOption.postMountWrapper(inst);
10879 } 10985 }
10880 10986
10881 var setContentChildForInstrumentation = emptyFunction; 10987 var setAndValidateContentChildDev = emptyFunction;
10882 if (process.env.NODE_ENV !== 'production') { 10988 if (process.env.NODE_ENV !== 'production') {
10883 setContentChildForInstrumentation = function (content) { 10989 setAndValidateContentChildDev = function (content) {
10884 var hasExistingContent = this._contentDebugID != null; 10990 var hasExistingContent = this._contentDebugID != null;
10885 var debugID = this._debugID; 10991 var debugID = this._debugID;
10886 var contentDebugID = debugID + '#text'; 10992 // This ID represents the inlined child that has no backing instance:
10993 var contentDebugID = -debugID;
10887 10994
10888 if (content == null) { 10995 if (content == null) {
10889 if (hasExistingContent) { 10996 if (hasExistingContent) {
@@ -10893,18 +11000,13 @@
10893 return; 11000 return;
10894 } 11001 }
10895 11002
11003 validateDOMNesting(null, String(content), this, this._ancestorInfo);
10896 this._contentDebugID = contentDebugID; 11004 this._contentDebugID = contentDebugID;
10897 var text = '' + content;
10898
10899 ReactInstrumentation.debugTool.onSetDisplayName(contentDebugID, '#text');
10900 ReactInstrumentation.debugTool.onSetParent(contentDebugID, debugID);
10901 ReactInstrumentation.debugTool.onSetText(contentDebugID, text);
10902
10903 if (hasExistingContent) { 11005 if (hasExistingContent) {
10904 ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content); 11006 ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content);
10905 ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID); 11007 ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID);
10906 } else { 11008 } else {
10907 ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content); 11009 ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID);
10908 ReactInstrumentation.debugTool.onMountComponent(contentDebugID); 11010 ReactInstrumentation.debugTool.onMountComponent(contentDebugID);
10909 ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]); 11011 ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]);
10910 } 11012 }
@@ -11065,15 +11167,15 @@
11065 this._previousStyleCopy = null; 11167 this._previousStyleCopy = null;
11066 this._hostNode = null; 11168 this._hostNode = null;
11067 this._hostParent = null; 11169 this._hostParent = null;
11068 this._rootNodeID = null; 11170 this._rootNodeID = 0;
11069 this._domID = null; 11171 this._domID = 0;
11070 this._hostContainerInfo = null; 11172 this._hostContainerInfo = null;
11071 this._wrapperState = null; 11173 this._wrapperState = null;
11072 this._topLevelWrapper = null; 11174 this._topLevelWrapper = null;
11073 this._flags = 0; 11175 this._flags = 0;
11074 if (process.env.NODE_ENV !== 'production') { 11176 if (process.env.NODE_ENV !== 'production') {
11075 this._ancestorInfo = null; 11177 this._ancestorInfo = null;
11076 setContentChildForInstrumentation.call(this, null); 11178 setAndValidateContentChildDev.call(this, null);
11077 } 11179 }
11078 } 11180 }
11079 11181
@@ -11087,14 +11189,12 @@
11087 * 11189 *
11088 * @internal 11190 * @internal
11089 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction 11191 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
11090 * @param {?ReactDOMComponent} the containing DOM component instance 11192 * @param {?ReactDOMComponent} the parent component instance
11091 * @param {?object} info about the host container 11193 * @param {?object} info about the host container
11092 * @param {object} context 11194 * @param {object} context
11093 * @return {string} The computed markup. 11195 * @return {string} The computed markup.
11094 */ 11196 */
11095 mountComponent: function (transaction, hostParent, hostContainerInfo, context) { 11197 mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
11096 var _this = this;
11097
11098 this._rootNodeID = globalIdCounter++; 11198 this._rootNodeID = globalIdCounter++;
11099 this._domID = hostContainerInfo._idCounter++; 11199 this._domID = hostContainerInfo._idCounter++;
11100 this._hostParent = hostParent; 11200 this._hostParent = hostParent;
@@ -11175,7 +11275,7 @@
11175 if (parentInfo) { 11275 if (parentInfo) {
11176 // parentInfo should always be present except for the top-level 11276 // parentInfo should always be present except for the top-level
11177 // component when server rendering 11277 // component when server rendering
11178 validateDOMNesting(this._tag, this, parentInfo); 11278 validateDOMNesting(this._tag, null, this, parentInfo);
11179 } 11279 }
11180 this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this); 11280 this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this);
11181 } 11281 }
@@ -11250,15 +11350,6 @@
11250 break; 11350 break;
11251 } 11351 }
11252 11352
11253 if (process.env.NODE_ENV !== 'production') {
11254 if (this._debugID) {
11255 var callback = function () {
11256 return ReactInstrumentation.debugTool.onComponentHasMounted(_this._debugID);
11257 };
11258 transaction.getReactMountReady().enqueue(callback, this);
11259 }
11260 }
11261
11262 return mountImage; 11353 return mountImage;
11263 }, 11354 },
11264 11355
@@ -11353,7 +11444,7 @@
11353 // TODO: Validate that text is allowed as a child of this node 11444 // TODO: Validate that text is allowed as a child of this node
11354 ret = escapeTextContentForBrowser(contentToUse); 11445 ret = escapeTextContentForBrowser(contentToUse);
11355 if (process.env.NODE_ENV !== 'production') { 11446 if (process.env.NODE_ENV !== 'production') {
11356 setContentChildForInstrumentation.call(this, contentToUse); 11447 setAndValidateContentChildDev.call(this, contentToUse);
11357 } 11448 }
11358 } else if (childrenToUse != null) { 11449 } else if (childrenToUse != null) {
11359 var mountImages = this.mountChildren(childrenToUse, transaction, context); 11450 var mountImages = this.mountChildren(childrenToUse, transaction, context);
@@ -11390,7 +11481,7 @@
11390 if (contentToUse != null) { 11481 if (contentToUse != null) {
11391 // TODO: Validate that text is allowed as a child of this node 11482 // TODO: Validate that text is allowed as a child of this node
11392 if (process.env.NODE_ENV !== 'production') { 11483 if (process.env.NODE_ENV !== 'production') {
11393 setContentChildForInstrumentation.call(this, contentToUse); 11484 setAndValidateContentChildDev.call(this, contentToUse);
11394 } 11485 }
11395 DOMLazyTree.queueText(lazyTree, contentToUse); 11486 DOMLazyTree.queueText(lazyTree, contentToUse);
11396 } else if (childrenToUse != null) { 11487 } else if (childrenToUse != null) {
@@ -11427,8 +11518,6 @@
11427 * @overridable 11518 * @overridable
11428 */ 11519 */
11429 updateComponent: function (transaction, prevElement, nextElement, context) { 11520 updateComponent: function (transaction, prevElement, nextElement, context) {
11430 var _this2 = this;
11431
11432 var lastProps = prevElement.props; 11521 var lastProps = prevElement.props;
11433 var nextProps = this._currentElement.props; 11522 var nextProps = this._currentElement.props;
11434 11523
@@ -11438,7 +11527,6 @@
11438 nextProps = ReactDOMButton.getHostProps(this, nextProps); 11527 nextProps = ReactDOMButton.getHostProps(this, nextProps);
11439 break; 11528 break;
11440 case 'input': 11529 case 'input':
11441 ReactDOMInput.updateWrapper(this);
11442 lastProps = ReactDOMInput.getHostProps(this, lastProps); 11530 lastProps = ReactDOMInput.getHostProps(this, lastProps);
11443 nextProps = ReactDOMInput.getHostProps(this, nextProps); 11531 nextProps = ReactDOMInput.getHostProps(this, nextProps);
11444 break; 11532 break;
@@ -11451,7 +11539,6 @@
11451 nextProps = ReactDOMSelect.getHostProps(this, nextProps); 11539 nextProps = ReactDOMSelect.getHostProps(this, nextProps);
11452 break; 11540 break;
11453 case 'textarea': 11541 case 'textarea':
11454 ReactDOMTextarea.updateWrapper(this);
11455 lastProps = ReactDOMTextarea.getHostProps(this, lastProps); 11542 lastProps = ReactDOMTextarea.getHostProps(this, lastProps);
11456 nextProps = ReactDOMTextarea.getHostProps(this, nextProps); 11543 nextProps = ReactDOMTextarea.getHostProps(this, nextProps);
11457 break; 11544 break;
@@ -11461,19 +11548,21 @@
11461 this._updateDOMProperties(lastProps, nextProps, transaction); 11548 this._updateDOMProperties(lastProps, nextProps, transaction);
11462 this._updateDOMChildren(lastProps, nextProps, transaction, context); 11549 this._updateDOMChildren(lastProps, nextProps, transaction, context);
11463 11550
11464 if (this._tag === 'select') { 11551 switch (this._tag) {
11465 // <select> value update needs to occur after <option> children 11552 case 'input':
11466 // reconciliation 11553 // Update the wrapper around inputs *after* updating props. This has to
11467 transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this); 11554 // happen after `_updateDOMProperties`. Otherwise HTML5 input validations
11468 } 11555 // raise warnings and prevent the new value from being assigned.
11469 11556 ReactDOMInput.updateWrapper(this);
11470 if (process.env.NODE_ENV !== 'production') { 11557 break;
11471 if (this._debugID) { 11558 case 'textarea':
11472 var callback = function () { 11559 ReactDOMTextarea.updateWrapper(this);
11473 return ReactInstrumentation.debugTool.onComponentHasUpdated(_this2._debugID); 11560 break;
11474 }; 11561 case 'select':
11475 transaction.getReactMountReady().enqueue(callback, this); 11562 // <select> value update needs to occur after <option> children
11476 } 11563 // reconciliation
11564 transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this);
11565 break;
11477 } 11566 }
11478 }, 11567 },
11479 11568
@@ -11624,7 +11713,7 @@
11624 if (lastContent !== nextContent) { 11713 if (lastContent !== nextContent) {
11625 this.updateTextContent('' + nextContent); 11714 this.updateTextContent('' + nextContent);
11626 if (process.env.NODE_ENV !== 'production') { 11715 if (process.env.NODE_ENV !== 'production') {
11627 setContentChildForInstrumentation.call(this, nextContent); 11716 setAndValidateContentChildDev.call(this, nextContent);
11628 } 11717 }
11629 } 11718 }
11630 } else if (nextHtml != null) { 11719 } else if (nextHtml != null) {
@@ -11636,7 +11725,7 @@
11636 } 11725 }
11637 } else if (nextChildren != null) { 11726 } else if (nextChildren != null) {
11638 if (process.env.NODE_ENV !== 'production') { 11727 if (process.env.NODE_ENV !== 'production') {
11639 setContentChildForInstrumentation.call(this, null); 11728 setAndValidateContentChildDev.call(this, null);
11640 } 11729 }
11641 11730
11642 this.updateChildren(nextChildren, transaction, context); 11731 this.updateChildren(nextChildren, transaction, context);
@@ -11686,13 +11775,12 @@
11686 this.unmountChildren(safely); 11775 this.unmountChildren(safely);
11687 ReactDOMComponentTree.uncacheNode(this); 11776 ReactDOMComponentTree.uncacheNode(this);
11688 EventPluginHub.deleteAllListeners(this); 11777 EventPluginHub.deleteAllListeners(this);
11689 ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID); 11778 this._rootNodeID = 0;
11690 this._rootNodeID = null; 11779 this._domID = 0;
11691 this._domID = null;
11692 this._wrapperState = null; 11780 this._wrapperState = null;
11693 11781
11694 if (process.env.NODE_ENV !== 'production') { 11782 if (process.env.NODE_ENV !== 'production') {
11695 setContentChildForInstrumentation.call(this, null); 11783 setAndValidateContentChildDev.call(this, null);
11696 } 11784 }
11697 }, 11785 },
11698 11786
@@ -11708,7 +11796,7 @@
11708 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 11796 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
11709 11797
11710/***/ }, 11798/***/ },
11711/* 98 */ 11799/* 97 */
11712/***/ function(module, exports, __webpack_require__) { 11800/***/ function(module, exports, __webpack_require__) {
11713 11801
11714 /** 11802 /**
@@ -11724,9 +11812,9 @@
11724 11812
11725 'use strict'; 11813 'use strict';
11726 11814
11727 var ReactDOMComponentTree = __webpack_require__(39); 11815 var ReactDOMComponentTree = __webpack_require__(38);
11728 11816
11729 var focusNode = __webpack_require__(99); 11817 var focusNode = __webpack_require__(98);
11730 11818
11731 var AutoFocusUtils = { 11819 var AutoFocusUtils = {
11732 focusDOMComponent: function () { 11820 focusDOMComponent: function () {
@@ -11737,7 +11825,7 @@
11737 module.exports = AutoFocusUtils; 11825 module.exports = AutoFocusUtils;
11738 11826
11739/***/ }, 11827/***/ },
11740/* 99 */ 11828/* 98 */
11741/***/ function(module, exports) { 11829/***/ function(module, exports) {
11742 11830
11743 /** 11831 /**
@@ -11768,7 +11856,7 @@
11768 module.exports = focusNode; 11856 module.exports = focusNode;
11769 11857
11770/***/ }, 11858/***/ },
11771/* 100 */ 11859/* 99 */
11772/***/ function(module, exports, __webpack_require__) { 11860/***/ function(module, exports, __webpack_require__) {
11773 11861
11774 /* WEBPACK VAR INJECTION */(function(process) {/** 11862 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -11784,14 +11872,14 @@
11784 11872
11785 'use strict'; 11873 'use strict';
11786 11874
11787 var CSSProperty = __webpack_require__(101); 11875 var CSSProperty = __webpack_require__(100);
11788 var ExecutionEnvironment = __webpack_require__(52); 11876 var ExecutionEnvironment = __webpack_require__(51);
11789 var ReactInstrumentation = __webpack_require__(65); 11877 var ReactInstrumentation = __webpack_require__(64);
11790 11878
11791 var camelizeStyleName = __webpack_require__(102); 11879 var camelizeStyleName = __webpack_require__(101);
11792 var dangerousStyleValue = __webpack_require__(104); 11880 var dangerousStyleValue = __webpack_require__(103);
11793 var hyphenateStyleName = __webpack_require__(105); 11881 var hyphenateStyleName = __webpack_require__(104);
11794 var memoizeStringOnly = __webpack_require__(107); 11882 var memoizeStringOnly = __webpack_require__(106);
11795 var warning = __webpack_require__(13); 11883 var warning = __webpack_require__(13);
11796 11884
11797 var processStyleName = memoizeStringOnly(function (styleName) { 11885 var processStyleName = memoizeStringOnly(function (styleName) {
@@ -11979,7 +12067,7 @@
11979 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 12067 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
11980 12068
11981/***/ }, 12069/***/ },
11982/* 101 */ 12070/* 100 */
11983/***/ function(module, exports) { 12071/***/ function(module, exports) {
11984 12072
11985 /** 12073 /**
@@ -12132,7 +12220,7 @@
12132 module.exports = CSSProperty; 12220 module.exports = CSSProperty;
12133 12221
12134/***/ }, 12222/***/ },
12135/* 102 */ 12223/* 101 */
12136/***/ function(module, exports, __webpack_require__) { 12224/***/ function(module, exports, __webpack_require__) {
12137 12225
12138 /** 12226 /**
@@ -12148,7 +12236,7 @@
12148 12236
12149 'use strict'; 12237 'use strict';
12150 12238
12151 var camelize = __webpack_require__(103); 12239 var camelize = __webpack_require__(102);
12152 12240
12153 var msPattern = /^-ms-/; 12241 var msPattern = /^-ms-/;
12154 12242
@@ -12176,7 +12264,7 @@
12176 module.exports = camelizeStyleName; 12264 module.exports = camelizeStyleName;
12177 12265
12178/***/ }, 12266/***/ },
12179/* 103 */ 12267/* 102 */
12180/***/ function(module, exports) { 12268/***/ function(module, exports) {
12181 12269
12182 "use strict"; 12270 "use strict";
@@ -12212,7 +12300,7 @@
12212 module.exports = camelize; 12300 module.exports = camelize;
12213 12301
12214/***/ }, 12302/***/ },
12215/* 104 */ 12303/* 103 */
12216/***/ function(module, exports, __webpack_require__) { 12304/***/ function(module, exports, __webpack_require__) {
12217 12305
12218 /* WEBPACK VAR INJECTION */(function(process) {/** 12306 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -12228,7 +12316,7 @@
12228 12316
12229 'use strict'; 12317 'use strict';
12230 12318
12231 var CSSProperty = __webpack_require__(101); 12319 var CSSProperty = __webpack_require__(100);
12232 var warning = __webpack_require__(13); 12320 var warning = __webpack_require__(13);
12233 12321
12234 var isUnitlessNumber = CSSProperty.isUnitlessNumber; 12322 var isUnitlessNumber = CSSProperty.isUnitlessNumber;
@@ -12297,7 +12385,7 @@
12297 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 12385 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
12298 12386
12299/***/ }, 12387/***/ },
12300/* 105 */ 12388/* 104 */
12301/***/ function(module, exports, __webpack_require__) { 12389/***/ function(module, exports, __webpack_require__) {
12302 12390
12303 /** 12391 /**
@@ -12313,7 +12401,7 @@
12313 12401
12314 'use strict'; 12402 'use strict';
12315 12403
12316 var hyphenate = __webpack_require__(106); 12404 var hyphenate = __webpack_require__(105);
12317 12405
12318 var msPattern = /^ms-/; 12406 var msPattern = /^ms-/;
12319 12407
@@ -12340,7 +12428,7 @@
12340 module.exports = hyphenateStyleName; 12428 module.exports = hyphenateStyleName;
12341 12429
12342/***/ }, 12430/***/ },
12343/* 106 */ 12431/* 105 */
12344/***/ function(module, exports) { 12432/***/ function(module, exports) {
12345 12433
12346 'use strict'; 12434 'use strict';
@@ -12377,7 +12465,7 @@
12377 module.exports = hyphenate; 12465 module.exports = hyphenate;
12378 12466
12379/***/ }, 12467/***/ },
12380/* 107 */ 12468/* 106 */
12381/***/ function(module, exports) { 12469/***/ function(module, exports) {
12382 12470
12383 /** 12471 /**
@@ -12411,7 +12499,7 @@
12411 module.exports = memoizeStringOnly; 12499 module.exports = memoizeStringOnly;
12412 12500
12413/***/ }, 12501/***/ },
12414/* 108 */ 12502/* 107 */
12415/***/ function(module, exports, __webpack_require__) { 12503/***/ function(module, exports, __webpack_require__) {
12416 12504
12417 /* WEBPACK VAR INJECTION */(function(process) {/** 12505 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -12427,12 +12515,11 @@
12427 12515
12428 'use strict'; 12516 'use strict';
12429 12517
12430 var DOMProperty = __webpack_require__(40); 12518 var DOMProperty = __webpack_require__(39);
12431 var ReactDOMComponentTree = __webpack_require__(39); 12519 var ReactDOMComponentTree = __webpack_require__(38);
12432 var ReactDOMInstrumentation = __webpack_require__(109); 12520 var ReactInstrumentation = __webpack_require__(64);
12433 var ReactInstrumentation = __webpack_require__(65);
12434 12521
12435 var quoteAttributeValueForBrowser = __webpack_require__(113); 12522 var quoteAttributeValueForBrowser = __webpack_require__(108);
12436 var warning = __webpack_require__(13); 12523 var warning = __webpack_require__(13);
12437 12524
12438 var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$'); 12525 var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');
@@ -12494,9 +12581,6 @@
12494 * @return {?string} Markup string, or null if the property was invalid. 12581 * @return {?string} Markup string, or null if the property was invalid.
12495 */ 12582 */
12496 createMarkupForProperty: function (name, value) { 12583 createMarkupForProperty: function (name, value) {
12497 if (process.env.NODE_ENV !== 'production') {
12498 ReactDOMInstrumentation.debugTool.onCreateMarkupForProperty(name, value);
12499 }
12500 var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null; 12584 var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
12501 if (propertyInfo) { 12585 if (propertyInfo) {
12502 if (shouldIgnoreValue(propertyInfo, value)) { 12586 if (shouldIgnoreValue(propertyInfo, value)) {
@@ -12569,7 +12653,6 @@
12569 } 12653 }
12570 12654
12571 if (process.env.NODE_ENV !== 'production') { 12655 if (process.env.NODE_ENV !== 'production') {
12572 ReactDOMInstrumentation.debugTool.onSetValueForProperty(node, name, value);
12573 var payload = {}; 12656 var payload = {};
12574 payload[name] = value; 12657 payload[name] = value;
12575 ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'update attribute', payload); 12658 ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'update attribute', payload);
@@ -12602,7 +12685,6 @@
12602 deleteValueForAttribute: function (node, name) { 12685 deleteValueForAttribute: function (node, name) {
12603 node.removeAttribute(name); 12686 node.removeAttribute(name);
12604 if (process.env.NODE_ENV !== 'production') { 12687 if (process.env.NODE_ENV !== 'production') {
12605 ReactDOMInstrumentation.debugTool.onDeleteValueForProperty(node, name);
12606 ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'remove attribute', name); 12688 ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'remove attribute', name);
12607 } 12689 }
12608 }, 12690 },
@@ -12634,7 +12716,6 @@
12634 } 12716 }
12635 12717
12636 if (process.env.NODE_ENV !== 'production') { 12718 if (process.env.NODE_ENV !== 'production') {
12637 ReactDOMInstrumentation.debugTool.onDeleteValueForProperty(node, name);
12638 ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'remove attribute', name); 12719 ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'remove attribute', name);
12639 } 12720 }
12640 } 12721 }
@@ -12645,274 +12726,7 @@
12645 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 12726 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
12646 12727
12647/***/ }, 12728/***/ },
12648/* 109 */ 12729/* 108 */
12649/***/ function(module, exports, __webpack_require__) {
12650
12651 /* WEBPACK VAR INJECTION */(function(process) {/**
12652 * Copyright 2013-present, Facebook, Inc.
12653 * All rights reserved.
12654 *
12655 * This source code is licensed under the BSD-style license found in the
12656 * LICENSE file in the root directory of this source tree. An additional grant
12657 * of patent rights can be found in the PATENTS file in the same directory.
12658 *
12659 * @providesModule ReactDOMInstrumentation
12660 */
12661
12662 'use strict';
12663
12664 var debugTool = null;
12665
12666 if (process.env.NODE_ENV !== 'production') {
12667 var ReactDOMDebugTool = __webpack_require__(110);
12668 debugTool = ReactDOMDebugTool;
12669 }
12670
12671 module.exports = { debugTool: debugTool };
12672 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
12673
12674/***/ },
12675/* 110 */
12676/***/ function(module, exports, __webpack_require__) {
12677
12678 /* WEBPACK VAR INJECTION */(function(process) {/**
12679 * Copyright 2013-present, Facebook, Inc.
12680 * All rights reserved.
12681 *
12682 * This source code is licensed under the BSD-style license found in the
12683 * LICENSE file in the root directory of this source tree. An additional grant
12684 * of patent rights can be found in the PATENTS file in the same directory.
12685 *
12686 * @providesModule ReactDOMDebugTool
12687 */
12688
12689 'use strict';
12690
12691 var ReactDOMNullInputValuePropDevtool = __webpack_require__(111);
12692 var ReactDOMUnknownPropertyDevtool = __webpack_require__(112);
12693 var ReactDebugTool = __webpack_require__(66);
12694
12695 var warning = __webpack_require__(13);
12696
12697 var eventHandlers = [];
12698 var handlerDoesThrowForEvent = {};
12699
12700 function emitEvent(handlerFunctionName, arg1, arg2, arg3, arg4, arg5) {
12701 eventHandlers.forEach(function (handler) {
12702 try {
12703 if (handler[handlerFunctionName]) {
12704 handler[handlerFunctionName](arg1, arg2, arg3, arg4, arg5);
12705 }
12706 } catch (e) {
12707 process.env.NODE_ENV !== 'production' ? warning(handlerDoesThrowForEvent[handlerFunctionName], 'exception thrown by devtool while handling %s: %s', handlerFunctionName, e + '\n' + e.stack) : void 0;
12708 handlerDoesThrowForEvent[handlerFunctionName] = true;
12709 }
12710 });
12711 }
12712
12713 var ReactDOMDebugTool = {
12714 addDevtool: function (devtool) {
12715 ReactDebugTool.addDevtool(devtool);
12716 eventHandlers.push(devtool);
12717 },
12718 removeDevtool: function (devtool) {
12719 ReactDebugTool.removeDevtool(devtool);
12720 for (var i = 0; i < eventHandlers.length; i++) {
12721 if (eventHandlers[i] === devtool) {
12722 eventHandlers.splice(i, 1);
12723 i--;
12724 }
12725 }
12726 },
12727 onCreateMarkupForProperty: function (name, value) {
12728 emitEvent('onCreateMarkupForProperty', name, value);
12729 },
12730 onSetValueForProperty: function (node, name, value) {
12731 emitEvent('onSetValueForProperty', node, name, value);
12732 },
12733 onDeleteValueForProperty: function (node, name) {
12734 emitEvent('onDeleteValueForProperty', node, name);
12735 },
12736 onTestEvent: function () {
12737 emitEvent('onTestEvent');
12738 }
12739 };
12740
12741 ReactDOMDebugTool.addDevtool(ReactDOMUnknownPropertyDevtool);
12742 ReactDOMDebugTool.addDevtool(ReactDOMNullInputValuePropDevtool);
12743
12744 module.exports = ReactDOMDebugTool;
12745 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
12746
12747/***/ },
12748/* 111 */
12749/***/ function(module, exports, __webpack_require__) {
12750
12751 /* WEBPACK VAR INJECTION */(function(process) {/**
12752 * Copyright 2013-present, Facebook, Inc.
12753 * All rights reserved.
12754 *
12755 * This source code is licensed under the BSD-style license found in the
12756 * LICENSE file in the root directory of this source tree. An additional grant
12757 * of patent rights can be found in the PATENTS file in the same directory.
12758 *
12759 * @providesModule ReactDOMNullInputValuePropDevtool
12760 */
12761
12762 'use strict';
12763
12764 var ReactComponentTreeDevtool = __webpack_require__(31);
12765
12766 var warning = __webpack_require__(13);
12767
12768 var didWarnValueNull = false;
12769
12770 function handleElement(debugID, element) {
12771 if (element == null) {
12772 return;
12773 }
12774 if (element.type !== 'input' && element.type !== 'textarea' && element.type !== 'select') {
12775 return;
12776 }
12777 if (element.props != null && element.props.value === null && !didWarnValueNull) {
12778 process.env.NODE_ENV !== 'production' ? warning(false, '`value` prop on `%s` should not be null. ' + 'Consider using the empty string to clear the component or `undefined` ' + 'for uncontrolled components.%s', element.type, ReactComponentTreeDevtool.getStackAddendumByID(debugID)) : void 0;
12779
12780 didWarnValueNull = true;
12781 }
12782 }
12783
12784 var ReactDOMUnknownPropertyDevtool = {
12785 onBeforeMountComponent: function (debugID, element) {
12786 handleElement(debugID, element);
12787 },
12788 onBeforeUpdateComponent: function (debugID, element) {
12789 handleElement(debugID, element);
12790 }
12791 };
12792
12793 module.exports = ReactDOMUnknownPropertyDevtool;
12794 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
12795
12796/***/ },
12797/* 112 */
12798/***/ function(module, exports, __webpack_require__) {
12799
12800 /* WEBPACK VAR INJECTION */(function(process) {/**
12801 * Copyright 2013-present, Facebook, Inc.
12802 * All rights reserved.
12803 *
12804 * This source code is licensed under the BSD-style license found in the
12805 * LICENSE file in the root directory of this source tree. An additional grant
12806 * of patent rights can be found in the PATENTS file in the same directory.
12807 *
12808 * @providesModule ReactDOMUnknownPropertyDevtool
12809 */
12810
12811 'use strict';
12812
12813 var DOMProperty = __webpack_require__(40);
12814 var EventPluginRegistry = __webpack_require__(47);
12815 var ReactComponentTreeDevtool = __webpack_require__(31);
12816
12817 var warning = __webpack_require__(13);
12818
12819 if (process.env.NODE_ENV !== 'production') {
12820 var reactProps = {
12821 children: true,
12822 dangerouslySetInnerHTML: true,
12823 key: true,
12824 ref: true,
12825
12826 autoFocus: true,
12827 defaultValue: true,
12828 valueLink: true,
12829 defaultChecked: true,
12830 checkedLink: true,
12831 innerHTML: true,
12832 suppressContentEditableWarning: true,
12833 onFocusIn: true,
12834 onFocusOut: true
12835 };
12836 var warnedProperties = {};
12837
12838 var validateProperty = function (tagName, name, debugID) {
12839 if (DOMProperty.properties.hasOwnProperty(name) || DOMProperty.isCustomAttribute(name)) {
12840 return true;
12841 }
12842 if (reactProps.hasOwnProperty(name) && reactProps[name] || warnedProperties.hasOwnProperty(name) && warnedProperties[name]) {
12843 return true;
12844 }
12845 if (EventPluginRegistry.registrationNameModules.hasOwnProperty(name)) {
12846 return true;
12847 }
12848 warnedProperties[name] = true;
12849 var lowerCasedName = name.toLowerCase();
12850
12851 // data-* attributes should be lowercase; suggest the lowercase version
12852 var standardName = DOMProperty.isCustomAttribute(lowerCasedName) ? lowerCasedName : DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null;
12853
12854 var registrationName = EventPluginRegistry.possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? EventPluginRegistry.possibleRegistrationNames[lowerCasedName] : null;
12855
12856 if (standardName != null) {
12857 process.env.NODE_ENV !== 'production' ? warning(standardName == null, 'Unknown DOM property %s. Did you mean %s?%s', name, standardName, ReactComponentTreeDevtool.getStackAddendumByID(debugID)) : void 0;
12858 return true;
12859 } else if (registrationName != null) {
12860 process.env.NODE_ENV !== 'production' ? warning(registrationName == null, 'Unknown event handler property %s. Did you mean `%s`?%s', name, registrationName, ReactComponentTreeDevtool.getStackAddendumByID(debugID)) : void 0;
12861 return true;
12862 } else {
12863 // We were unable to guess which prop the user intended.
12864 // It is likely that the user was just blindly spreading/forwarding props
12865 // Components should be careful to only render valid props/attributes.
12866 // Warning will be invoked in warnUnknownProperties to allow grouping.
12867 return false;
12868 }
12869 };
12870 }
12871
12872 var warnUnknownProperties = function (debugID, element) {
12873 var unknownProps = [];
12874 for (var key in element.props) {
12875 var isValid = validateProperty(element.type, key, debugID);
12876 if (!isValid) {
12877 unknownProps.push(key);
12878 }
12879 }
12880
12881 var unknownPropString = unknownProps.map(function (prop) {
12882 return '`' + prop + '`';
12883 }).join(', ');
12884
12885 if (unknownProps.length === 1) {
12886 process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown prop %s on <%s> tag. Remove this prop from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeDevtool.getStackAddendumByID(debugID)) : void 0;
12887 } else if (unknownProps.length > 1) {
12888 process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown props %s on <%s> tag. Remove these props from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeDevtool.getStackAddendumByID(debugID)) : void 0;
12889 }
12890 };
12891
12892 function handleElement(debugID, element) {
12893 if (element == null || typeof element.type !== 'string') {
12894 return;
12895 }
12896 if (element.type.indexOf('-') >= 0 || element.props.is) {
12897 return;
12898 }
12899 warnUnknownProperties(debugID, element);
12900 }
12901
12902 var ReactDOMUnknownPropertyDevtool = {
12903 onBeforeMountComponent: function (debugID, element) {
12904 handleElement(debugID, element);
12905 },
12906 onBeforeUpdateComponent: function (debugID, element) {
12907 handleElement(debugID, element);
12908 }
12909 };
12910
12911 module.exports = ReactDOMUnknownPropertyDevtool;
12912 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
12913
12914/***/ },
12915/* 113 */
12916/***/ function(module, exports, __webpack_require__) { 12730/***/ function(module, exports, __webpack_require__) {
12917 12731
12918 /** 12732 /**
@@ -12928,7 +12742,7 @@
12928 12742
12929 'use strict'; 12743 'use strict';
12930 12744
12931 var escapeTextContentForBrowser = __webpack_require__(90); 12745 var escapeTextContentForBrowser = __webpack_require__(89);
12932 12746
12933 /** 12747 /**
12934 * Escapes attribute value to prevent scripting attacks. 12748 * Escapes attribute value to prevent scripting attacks.
@@ -12943,7 +12757,7 @@
12943 module.exports = quoteAttributeValueForBrowser; 12757 module.exports = quoteAttributeValueForBrowser;
12944 12758
12945/***/ }, 12759/***/ },
12946/* 114 */ 12760/* 109 */
12947/***/ function(module, exports, __webpack_require__) { 12761/***/ function(module, exports, __webpack_require__) {
12948 12762
12949 /** 12763 /**
@@ -12961,13 +12775,13 @@
12961 12775
12962 var _assign = __webpack_require__(6); 12776 var _assign = __webpack_require__(6);
12963 12777
12964 var EventConstants = __webpack_require__(44); 12778 var EventConstants = __webpack_require__(43);
12965 var EventPluginRegistry = __webpack_require__(47); 12779 var EventPluginRegistry = __webpack_require__(46);
12966 var ReactEventEmitterMixin = __webpack_require__(115); 12780 var ReactEventEmitterMixin = __webpack_require__(110);
12967 var ViewportMetrics = __webpack_require__(80); 12781 var ViewportMetrics = __webpack_require__(79);
12968 12782
12969 var getVendorPrefixedEventName = __webpack_require__(116); 12783 var getVendorPrefixedEventName = __webpack_require__(111);
12970 var isEventSupported = __webpack_require__(74); 12784 var isEventSupported = __webpack_require__(73);
12971 12785
12972 /** 12786 /**
12973 * Summary of `ReactBrowserEventEmitter` event handling: 12787 * Summary of `ReactBrowserEventEmitter` event handling:
@@ -13239,6 +13053,19 @@
13239 }, 13053 },
13240 13054
13241 /** 13055 /**
13056 * Protect against document.createEvent() returning null
13057 * Some popup blocker extensions appear to do this:
13058 * https://github.com/facebook/react/issues/6887
13059 */
13060 supportsEventPageXY: function () {
13061 if (!document.createEvent) {
13062 return false;
13063 }
13064 var ev = document.createEvent('MouseEvent');
13065 return ev != null && 'pageX' in ev;
13066 },
13067
13068 /**
13242 * Listens to window scroll and resize events. We cache scroll values so that 13069 * Listens to window scroll and resize events. We cache scroll values so that
13243 * application code can access them without triggering reflows. 13070 * application code can access them without triggering reflows.
13244 * 13071 *
@@ -13251,7 +13078,7 @@
13251 */ 13078 */
13252 ensureScrollValueMonitoring: function () { 13079 ensureScrollValueMonitoring: function () {
13253 if (hasEventPageXY === undefined) { 13080 if (hasEventPageXY === undefined) {
13254 hasEventPageXY = document.createEvent && 'pageX' in document.createEvent('MouseEvent'); 13081 hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY();
13255 } 13082 }
13256 if (!hasEventPageXY && !isMonitoringScrollValue) { 13083 if (!hasEventPageXY && !isMonitoringScrollValue) {
13257 var refresh = ViewportMetrics.refreshScrollValues; 13084 var refresh = ViewportMetrics.refreshScrollValues;
@@ -13265,7 +13092,7 @@
13265 module.exports = ReactBrowserEventEmitter; 13092 module.exports = ReactBrowserEventEmitter;
13266 13093
13267/***/ }, 13094/***/ },
13268/* 115 */ 13095/* 110 */
13269/***/ function(module, exports, __webpack_require__) { 13096/***/ function(module, exports, __webpack_require__) {
13270 13097
13271 /** 13098 /**
@@ -13281,7 +13108,7 @@
13281 13108
13282 'use strict'; 13109 'use strict';
13283 13110
13284 var EventPluginHub = __webpack_require__(46); 13111 var EventPluginHub = __webpack_require__(45);
13285 13112
13286 function runEventQueueInBatch(events) { 13113 function runEventQueueInBatch(events) {
13287 EventPluginHub.enqueueEvents(events); 13114 EventPluginHub.enqueueEvents(events);
@@ -13303,7 +13130,7 @@
13303 module.exports = ReactEventEmitterMixin; 13130 module.exports = ReactEventEmitterMixin;
13304 13131
13305/***/ }, 13132/***/ },
13306/* 116 */ 13133/* 111 */
13307/***/ function(module, exports, __webpack_require__) { 13134/***/ function(module, exports, __webpack_require__) {
13308 13135
13309 /** 13136 /**
@@ -13319,7 +13146,7 @@
13319 13146
13320 'use strict'; 13147 'use strict';
13321 13148
13322 var ExecutionEnvironment = __webpack_require__(52); 13149 var ExecutionEnvironment = __webpack_require__(51);
13323 13150
13324 /** 13151 /**
13325 * Generate a mapping of standard vendor prefixes using the defined style property and event name. 13152 * Generate a mapping of standard vendor prefixes using the defined style property and event name.
@@ -13409,7 +13236,7 @@
13409 module.exports = getVendorPrefixedEventName; 13236 module.exports = getVendorPrefixedEventName;
13410 13237
13411/***/ }, 13238/***/ },
13412/* 117 */ 13239/* 112 */
13413/***/ function(module, exports, __webpack_require__) { 13240/***/ function(module, exports, __webpack_require__) {
13414 13241
13415 /** 13242 /**
@@ -13425,7 +13252,7 @@
13425 13252
13426 'use strict'; 13253 'use strict';
13427 13254
13428 var DisabledInputUtils = __webpack_require__(118); 13255 var DisabledInputUtils = __webpack_require__(113);
13429 13256
13430 /** 13257 /**
13431 * Implements a <button> host component that does not receive mouse events 13258 * Implements a <button> host component that does not receive mouse events
@@ -13438,7 +13265,7 @@
13438 module.exports = ReactDOMButton; 13265 module.exports = ReactDOMButton;
13439 13266
13440/***/ }, 13267/***/ },
13441/* 118 */ 13268/* 113 */
13442/***/ function(module, exports) { 13269/***/ function(module, exports) {
13443 13270
13444 /** 13271 /**
@@ -13493,7 +13320,7 @@
13493 module.exports = DisabledInputUtils; 13320 module.exports = DisabledInputUtils;
13494 13321
13495/***/ }, 13322/***/ },
13496/* 119 */ 13323/* 114 */
13497/***/ function(module, exports, __webpack_require__) { 13324/***/ function(module, exports, __webpack_require__) {
13498 13325
13499 /* WEBPACK VAR INJECTION */(function(process) {/** 13326 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -13512,11 +13339,11 @@
13512 var _prodInvariant = __webpack_require__(9), 13339 var _prodInvariant = __webpack_require__(9),
13513 _assign = __webpack_require__(6); 13340 _assign = __webpack_require__(6);
13514 13341
13515 var DisabledInputUtils = __webpack_require__(118); 13342 var DisabledInputUtils = __webpack_require__(113);
13516 var DOMPropertyOperations = __webpack_require__(108); 13343 var DOMPropertyOperations = __webpack_require__(107);
13517 var LinkedValueUtils = __webpack_require__(120); 13344 var LinkedValueUtils = __webpack_require__(115);
13518 var ReactDOMComponentTree = __webpack_require__(39); 13345 var ReactDOMComponentTree = __webpack_require__(38);
13519 var ReactUpdates = __webpack_require__(59); 13346 var ReactUpdates = __webpack_require__(58);
13520 13347
13521 var invariant = __webpack_require__(10); 13348 var invariant = __webpack_require__(10);
13522 var warning = __webpack_require__(13); 13349 var warning = __webpack_require__(13);
@@ -13537,7 +13364,7 @@
13537 13364
13538 function isControlled(props) { 13365 function isControlled(props) {
13539 var usesChecked = props.type === 'checkbox' || props.type === 'radio'; 13366 var usesChecked = props.type === 'checkbox' || props.type === 'radio';
13540 return usesChecked ? props.checked !== undefined : props.value !== undefined; 13367 return usesChecked ? props.checked != null : props.value != null;
13541 } 13368 }
13542 13369
13543 /** 13370 /**
@@ -13567,7 +13394,11 @@
13567 type: undefined, 13394 type: undefined,
13568 // Make sure we set .step before .value (setting .value before .step 13395 // Make sure we set .step before .value (setting .value before .step
13569 // means .value is rounded on mount, based upon step precision) 13396 // means .value is rounded on mount, based upon step precision)
13570 step: undefined 13397 step: undefined,
13398 // Make sure we set .min & .max before .value (to ensure proper order
13399 // in corner cases such as min or max deriving from value, e.g. Issue #7170)
13400 min: undefined,
13401 max: undefined
13571 }, DisabledInputUtils.getHostProps(inst, props), { 13402 }, DisabledInputUtils.getHostProps(inst, props), {
13572 defaultChecked: undefined, 13403 defaultChecked: undefined,
13573 defaultValue: undefined, 13404 defaultValue: undefined,
@@ -13673,8 +13504,26 @@
13673 // are not resetable nodes so this operation doesn't matter and actually 13504 // are not resetable nodes so this operation doesn't matter and actually
13674 // removes browser-default values (eg "Submit Query") when no value is 13505 // removes browser-default values (eg "Submit Query") when no value is
13675 // provided. 13506 // provided.
13676 if (props.type !== 'submit' && props.type !== 'reset') { 13507
13677 node.value = node.value; 13508 switch (props.type) {
13509 case 'submit':
13510 case 'reset':
13511 break;
13512 case 'color':
13513 case 'date':
13514 case 'datetime':
13515 case 'datetime-local':
13516 case 'month':
13517 case 'time':
13518 case 'week':
13519 // This fixes the no-show issue on iOS Safari and Android Chrome:
13520 // https://github.com/facebook/react/issues/7233
13521 node.value = '';
13522 node.value = node.defaultValue;
13523 break;
13524 default:
13525 node.value = node.value;
13526 break;
13678 } 13527 }
13679 13528
13680 // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug 13529 // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug
@@ -13746,7 +13595,7 @@
13746 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 13595 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
13747 13596
13748/***/ }, 13597/***/ },
13749/* 120 */ 13598/* 115 */
13750/***/ function(module, exports, __webpack_require__) { 13599/***/ function(module, exports, __webpack_require__) {
13751 13600
13752 /* WEBPACK VAR INJECTION */(function(process) {/** 13601 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -13764,9 +13613,9 @@
13764 13613
13765 var _prodInvariant = __webpack_require__(9); 13614 var _prodInvariant = __webpack_require__(9);
13766 13615
13767 var ReactPropTypes = __webpack_require__(34); 13616 var ReactPropTypes = __webpack_require__(33);
13768 var ReactPropTypeLocations = __webpack_require__(24); 13617 var ReactPropTypeLocations = __webpack_require__(24);
13769 var ReactPropTypesSecret = __webpack_require__(33); 13618 var ReactPropTypesSecret = __webpack_require__(32);
13770 13619
13771 var invariant = __webpack_require__(10); 13620 var invariant = __webpack_require__(10);
13772 var warning = __webpack_require__(13); 13621 var warning = __webpack_require__(13);
@@ -13888,7 +13737,7 @@
13888 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 13737 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
13889 13738
13890/***/ }, 13739/***/ },
13891/* 121 */ 13740/* 116 */
13892/***/ function(module, exports, __webpack_require__) { 13741/***/ function(module, exports, __webpack_require__) {
13893 13742
13894 /* WEBPACK VAR INJECTION */(function(process) {/** 13743 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -13907,8 +13756,8 @@
13907 var _assign = __webpack_require__(6); 13756 var _assign = __webpack_require__(6);
13908 13757
13909 var ReactChildren = __webpack_require__(7); 13758 var ReactChildren = __webpack_require__(7);
13910 var ReactDOMComponentTree = __webpack_require__(39); 13759 var ReactDOMComponentTree = __webpack_require__(38);
13911 var ReactDOMSelect = __webpack_require__(122); 13760 var ReactDOMSelect = __webpack_require__(117);
13912 13761
13913 var warning = __webpack_require__(13); 13762 var warning = __webpack_require__(13);
13914 var didWarnInvalidOptionChildren = false; 13763 var didWarnInvalidOptionChildren = false;
@@ -14017,7 +13866,7 @@
14017 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 13866 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
14018 13867
14019/***/ }, 13868/***/ },
14020/* 122 */ 13869/* 117 */
14021/***/ function(module, exports, __webpack_require__) { 13870/***/ function(module, exports, __webpack_require__) {
14022 13871
14023 /* WEBPACK VAR INJECTION */(function(process) {/** 13872 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -14035,10 +13884,10 @@
14035 13884
14036 var _assign = __webpack_require__(6); 13885 var _assign = __webpack_require__(6);
14037 13886
14038 var DisabledInputUtils = __webpack_require__(118); 13887 var DisabledInputUtils = __webpack_require__(113);
14039 var LinkedValueUtils = __webpack_require__(120); 13888 var LinkedValueUtils = __webpack_require__(115);
14040 var ReactDOMComponentTree = __webpack_require__(39); 13889 var ReactDOMComponentTree = __webpack_require__(38);
14041 var ReactUpdates = __webpack_require__(59); 13890 var ReactUpdates = __webpack_require__(58);
14042 13891
14043 var warning = __webpack_require__(13); 13892 var warning = __webpack_require__(13);
14044 13893
@@ -14088,10 +13937,11 @@
14088 if (props[propName] == null) { 13937 if (props[propName] == null) {
14089 continue; 13938 continue;
14090 } 13939 }
14091 if (props.multiple) { 13940 var isArray = Array.isArray(props[propName]);
14092 process.env.NODE_ENV !== 'production' ? warning(Array.isArray(props[propName]), 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0; 13941 if (props.multiple && !isArray) {
14093 } else { 13942 process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
14094 process.env.NODE_ENV !== 'production' ? warning(!Array.isArray(props[propName]), 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0; 13943 } else if (!props.multiple && isArray) {
13944 process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
14095 } 13945 }
14096 } 13946 }
14097 } 13947 }
@@ -14223,7 +14073,7 @@
14223 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 14073 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
14224 14074
14225/***/ }, 14075/***/ },
14226/* 123 */ 14076/* 118 */
14227/***/ function(module, exports, __webpack_require__) { 14077/***/ function(module, exports, __webpack_require__) {
14228 14078
14229 /* WEBPACK VAR INJECTION */(function(process) {/** 14079 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -14242,10 +14092,10 @@
14242 var _prodInvariant = __webpack_require__(9), 14092 var _prodInvariant = __webpack_require__(9),
14243 _assign = __webpack_require__(6); 14093 _assign = __webpack_require__(6);
14244 14094
14245 var DisabledInputUtils = __webpack_require__(118); 14095 var DisabledInputUtils = __webpack_require__(113);
14246 var LinkedValueUtils = __webpack_require__(120); 14096 var LinkedValueUtils = __webpack_require__(115);
14247 var ReactDOMComponentTree = __webpack_require__(39); 14097 var ReactDOMComponentTree = __webpack_require__(38);
14248 var ReactUpdates = __webpack_require__(59); 14098 var ReactUpdates = __webpack_require__(58);
14249 14099
14250 var invariant = __webpack_require__(10); 14100 var invariant = __webpack_require__(10);
14251 var warning = __webpack_require__(13); 14101 var warning = __webpack_require__(13);
@@ -14384,7 +14234,7 @@
14384 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 14234 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
14385 14235
14386/***/ }, 14236/***/ },
14387/* 124 */ 14237/* 119 */
14388/***/ function(module, exports, __webpack_require__) { 14238/***/ function(module, exports, __webpack_require__) {
14389 14239
14390 /* WEBPACK VAR INJECTION */(function(process) {/** 14240 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -14402,17 +14252,17 @@
14402 14252
14403 var _prodInvariant = __webpack_require__(9); 14253 var _prodInvariant = __webpack_require__(9);
14404 14254
14405 var ReactComponentEnvironment = __webpack_require__(125); 14255 var ReactComponentEnvironment = __webpack_require__(120);
14406 var ReactInstanceMap = __webpack_require__(126); 14256 var ReactInstanceMap = __webpack_require__(121);
14407 var ReactInstrumentation = __webpack_require__(65); 14257 var ReactInstrumentation = __webpack_require__(64);
14408 var ReactMultiChildUpdateTypes = __webpack_require__(95); 14258 var ReactMultiChildUpdateTypes = __webpack_require__(94);
14409 14259
14410 var ReactCurrentOwner = __webpack_require__(12); 14260 var ReactCurrentOwner = __webpack_require__(12);
14411 var ReactReconciler = __webpack_require__(62); 14261 var ReactReconciler = __webpack_require__(61);
14412 var ReactChildReconciler = __webpack_require__(127); 14262 var ReactChildReconciler = __webpack_require__(122);
14413 14263
14414 var emptyFunction = __webpack_require__(14); 14264 var emptyFunction = __webpack_require__(14);
14415 var flattenChildren = __webpack_require__(135); 14265 var flattenChildren = __webpack_require__(130);
14416 var invariant = __webpack_require__(10); 14266 var invariant = __webpack_require__(10);
14417 14267
14418 /** 14268 /**
@@ -14528,7 +14378,6 @@
14528 ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue); 14378 ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue);
14529 } 14379 }
14530 14380
14531 var setParentForInstrumentation = emptyFunction;
14532 var setChildrenForInstrumentation = emptyFunction; 14381 var setChildrenForInstrumentation = emptyFunction;
14533 if (process.env.NODE_ENV !== 'production') { 14382 if (process.env.NODE_ENV !== 'production') {
14534 var getDebugID = function (inst) { 14383 var getDebugID = function (inst) {
@@ -14541,11 +14390,6 @@
14541 } 14390 }
14542 return inst._debugID; 14391 return inst._debugID;
14543 }; 14392 };
14544 setParentForInstrumentation = function (child) {
14545 if (child._debugID !== 0) {
14546 ReactInstrumentation.debugTool.onSetParent(child._debugID, getDebugID(this));
14547 }
14548 };
14549 setChildrenForInstrumentation = function (children) { 14393 setChildrenForInstrumentation = function (children) {
14550 var debugID = getDebugID(this); 14394 var debugID = getDebugID(this);
14551 // TODO: React Native empty components are also multichild. 14395 // TODO: React Native empty components are also multichild.
@@ -14577,10 +14421,11 @@
14577 14421
14578 _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) { 14422 _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) {
14579 if (process.env.NODE_ENV !== 'production') { 14423 if (process.env.NODE_ENV !== 'production') {
14424 var selfDebugID = getDebugID(this);
14580 if (this._currentElement) { 14425 if (this._currentElement) {
14581 try { 14426 try {
14582 ReactCurrentOwner.current = this._currentElement._owner; 14427 ReactCurrentOwner.current = this._currentElement._owner;
14583 return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, this._debugID); 14428 return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID);
14584 } finally { 14429 } finally {
14585 ReactCurrentOwner.current = null; 14430 ReactCurrentOwner.current = null;
14586 } 14431 }
@@ -14591,20 +14436,22 @@
14591 14436
14592 _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) { 14437 _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) {
14593 var nextChildren; 14438 var nextChildren;
14439 var selfDebugID = 0;
14594 if (process.env.NODE_ENV !== 'production') { 14440 if (process.env.NODE_ENV !== 'production') {
14441 selfDebugID = getDebugID(this);
14595 if (this._currentElement) { 14442 if (this._currentElement) {
14596 try { 14443 try {
14597 ReactCurrentOwner.current = this._currentElement._owner; 14444 ReactCurrentOwner.current = this._currentElement._owner;
14598 nextChildren = flattenChildren(nextNestedChildrenElements, this._debugID); 14445 nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
14599 } finally { 14446 } finally {
14600 ReactCurrentOwner.current = null; 14447 ReactCurrentOwner.current = null;
14601 } 14448 }
14602 ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context); 14449 ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
14603 return nextChildren; 14450 return nextChildren;
14604 } 14451 }
14605 } 14452 }
14606 nextChildren = flattenChildren(nextNestedChildrenElements); 14453 nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
14607 ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context); 14454 ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
14608 return nextChildren; 14455 return nextChildren;
14609 }, 14456 },
14610 14457
@@ -14625,10 +14472,11 @@
14625 for (var name in children) { 14472 for (var name in children) {
14626 if (children.hasOwnProperty(name)) { 14473 if (children.hasOwnProperty(name)) {
14627 var child = children[name]; 14474 var child = children[name];
14475 var selfDebugID = 0;
14628 if (process.env.NODE_ENV !== 'production') { 14476 if (process.env.NODE_ENV !== 'production') {
14629 setParentForInstrumentation.call(this, child); 14477 selfDebugID = getDebugID(this);
14630 } 14478 }
14631 var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context); 14479 var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID);
14632 child._mountIndex = index++; 14480 child._mountIndex = index++;
14633 mountImages.push(mountImage); 14481 mountImages.push(mountImage);
14634 } 14482 }
@@ -14843,7 +14691,7 @@
14843 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 14691 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
14844 14692
14845/***/ }, 14693/***/ },
14846/* 125 */ 14694/* 120 */
14847/***/ function(module, exports, __webpack_require__) { 14695/***/ function(module, exports, __webpack_require__) {
14848 14696
14849 /* WEBPACK VAR INJECTION */(function(process) {/** 14697 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -14868,13 +14716,6 @@
14868 var ReactComponentEnvironment = { 14716 var ReactComponentEnvironment = {
14869 14717
14870 /** 14718 /**
14871 * Optionally injectable environment dependent cleanup hook. (server vs.
14872 * browser etc). Example: A browser system caches DOM nodes based on component
14873 * ID and must remove that cache entry when this instance is unmounted.
14874 */
14875 unmountIDFromEnvironment: null,
14876
14877 /**
14878 * Optionally injectable hook for swapping out mount images in the middle of 14719 * Optionally injectable hook for swapping out mount images in the middle of
14879 * the tree. 14720 * the tree.
14880 */ 14721 */
@@ -14889,7 +14730,6 @@
14889 injection: { 14730 injection: {
14890 injectEnvironment: function (environment) { 14731 injectEnvironment: function (environment) {
14891 !!injected ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : _prodInvariant('104') : void 0; 14732 !!injected ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : _prodInvariant('104') : void 0;
14892 ReactComponentEnvironment.unmountIDFromEnvironment = environment.unmountIDFromEnvironment;
14893 ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup; 14733 ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup;
14894 ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates; 14734 ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates;
14895 injected = true; 14735 injected = true;
@@ -14902,7 +14742,7 @@
14902 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 14742 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
14903 14743
14904/***/ }, 14744/***/ },
14905/* 126 */ 14745/* 121 */
14906/***/ function(module, exports) { 14746/***/ function(module, exports) {
14907 14747
14908 /** 14748 /**
@@ -14955,7 +14795,7 @@
14955 module.exports = ReactInstanceMap; 14795 module.exports = ReactInstanceMap;
14956 14796
14957/***/ }, 14797/***/ },
14958/* 127 */ 14798/* 122 */
14959/***/ function(module, exports, __webpack_require__) { 14799/***/ function(module, exports, __webpack_require__) {
14960 14800
14961 /* WEBPACK VAR INJECTION */(function(process) {/** 14801 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -14971,15 +14811,15 @@
14971 14811
14972 'use strict'; 14812 'use strict';
14973 14813
14974 var ReactReconciler = __webpack_require__(62); 14814 var ReactReconciler = __webpack_require__(61);
14975 14815
14976 var instantiateReactComponent = __webpack_require__(128); 14816 var instantiateReactComponent = __webpack_require__(123);
14977 var KeyEscapeUtils = __webpack_require__(18); 14817 var KeyEscapeUtils = __webpack_require__(18);
14978 var shouldUpdateReactComponent = __webpack_require__(132); 14818 var shouldUpdateReactComponent = __webpack_require__(127);
14979 var traverseAllChildren = __webpack_require__(16); 14819 var traverseAllChildren = __webpack_require__(16);
14980 var warning = __webpack_require__(13); 14820 var warning = __webpack_require__(13);
14981 14821
14982 var ReactComponentTreeDevtool; 14822 var ReactComponentTreeHook;
14983 14823
14984 if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { 14824 if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
14985 // Temporary hack. 14825 // Temporary hack.
@@ -14987,17 +14827,19 @@
14987 // https://github.com/facebook/react/issues/7240 14827 // https://github.com/facebook/react/issues/7240
14988 // Remove the inline requires when we don't need them anymore: 14828 // Remove the inline requires when we don't need them anymore:
14989 // https://github.com/facebook/react/pull/7178 14829 // https://github.com/facebook/react/pull/7178
14990 ReactComponentTreeDevtool = __webpack_require__(31); 14830 ReactComponentTreeHook = __webpack_require__(30);
14991 } 14831 }
14992 14832
14993 function instantiateChild(childInstances, child, name, selfDebugID) { 14833 function instantiateChild(childInstances, child, name, selfDebugID) {
14994 // We found a component instance. 14834 // We found a component instance.
14995 var keyUnique = childInstances[name] === undefined; 14835 var keyUnique = childInstances[name] === undefined;
14996 if (process.env.NODE_ENV !== 'production') { 14836 if (process.env.NODE_ENV !== 'production') {
14997 if (!ReactComponentTreeDevtool) { 14837 if (!ReactComponentTreeHook) {
14998 ReactComponentTreeDevtool = __webpack_require__(31); 14838 ReactComponentTreeHook = __webpack_require__(30);
14839 }
14840 if (!keyUnique) {
14841 process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;
14999 } 14842 }
15000 process.env.NODE_ENV !== 'production' ? warning(keyUnique, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeDevtool.getStackAddendumByID(selfDebugID)) : void 0;
15001 } 14843 }
15002 if (child != null && keyUnique) { 14844 if (child != null && keyUnique) {
15003 childInstances[name] = instantiateReactComponent(child, true); 14845 childInstances[name] = instantiateReactComponent(child, true);
@@ -15018,7 +14860,7 @@
15018 * @return {?object} A set of child instances. 14860 * @return {?object} A set of child instances.
15019 * @internal 14861 * @internal
15020 */ 14862 */
15021 instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID // __DEV__ only 14863 instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID // 0 in production and for roots
15022 ) { 14864 ) {
15023 if (nestedChildNodes == null) { 14865 if (nestedChildNodes == null) {
15024 return null; 14866 return null;
@@ -15045,7 +14887,8 @@
15045 * @return {?object} A new set of child instances. 14887 * @return {?object} A new set of child instances.
15046 * @internal 14888 * @internal
15047 */ 14889 */
15048 updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context) { 14890 updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID // 0 in production and for roots
14891 ) {
15049 // We currently don't have a way to track moves here but if we use iterators 14892 // We currently don't have a way to track moves here but if we use iterators
15050 // instead of for..in we can zip the iterators and check if an item has 14893 // instead of for..in we can zip the iterators and check if an item has
15051 // moved. 14894 // moved.
@@ -15076,7 +14919,7 @@
15076 nextChildren[name] = nextChildInstance; 14919 nextChildren[name] = nextChildInstance;
15077 // Creating mount image now ensures refs are resolved in right order 14920 // Creating mount image now ensures refs are resolved in right order
15078 // (see https://github.com/facebook/react/pull/7101 for explanation). 14921 // (see https://github.com/facebook/react/pull/7101 for explanation).
15079 var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context); 14922 var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID);
15080 mountImages.push(nextChildMountImage); 14923 mountImages.push(nextChildMountImage);
15081 } 14924 }
15082 } 14925 }
@@ -15112,7 +14955,7 @@
15112 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 14955 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
15113 14956
15114/***/ }, 14957/***/ },
15115/* 128 */ 14958/* 123 */
15116/***/ function(module, exports, __webpack_require__) { 14959/***/ function(module, exports, __webpack_require__) {
15117 14960
15118 /* WEBPACK VAR INJECTION */(function(process) {/** 14961 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -15131,10 +14974,9 @@
15131 var _prodInvariant = __webpack_require__(9), 14974 var _prodInvariant = __webpack_require__(9),
15132 _assign = __webpack_require__(6); 14975 _assign = __webpack_require__(6);
15133 14976
15134 var ReactCompositeComponent = __webpack_require__(129); 14977 var ReactCompositeComponent = __webpack_require__(124);
15135 var ReactEmptyComponent = __webpack_require__(133); 14978 var ReactEmptyComponent = __webpack_require__(128);
15136 var ReactHostComponent = __webpack_require__(134); 14979 var ReactHostComponent = __webpack_require__(129);
15137 var ReactInstrumentation = __webpack_require__(65);
15138 14980
15139 var invariant = __webpack_require__(10); 14981 var invariant = __webpack_require__(10);
15140 var warning = __webpack_require__(13); 14982 var warning = __webpack_require__(13);
@@ -15157,21 +14999,6 @@
15157 return ''; 14999 return '';
15158 } 15000 }
15159 15001
15160 function getDisplayName(instance) {
15161 var element = instance._currentElement;
15162 if (element == null) {
15163 return '#empty';
15164 } else if (typeof element === 'string' || typeof element === 'number') {
15165 return '#text';
15166 } else if (typeof element.type === 'string') {
15167 return element.type;
15168 } else if (instance.getName) {
15169 return instance.getName() || 'Unknown';
15170 } else {
15171 return element.type.displayName || element.type.name || 'Unknown';
15172 }
15173 }
15174
15175 /** 15002 /**
15176 * Check if the type reference is a known internal type. I.e. not a user 15003 * Check if the type reference is a known internal type. I.e. not a user
15177 * provided composite type. 15004 * provided composite type.
@@ -15235,18 +15062,7 @@
15235 instance._mountImage = null; 15062 instance._mountImage = null;
15236 15063
15237 if (process.env.NODE_ENV !== 'production') { 15064 if (process.env.NODE_ENV !== 'production') {
15238 if (shouldHaveDebugID) { 15065 instance._debugID = shouldHaveDebugID ? nextDebugID++ : 0;
15239 var debugID = nextDebugID++;
15240 instance._debugID = debugID;
15241 var displayName = getDisplayName(instance);
15242 ReactInstrumentation.debugTool.onSetDisplayName(debugID, displayName);
15243 var owner = node && node._owner;
15244 if (owner) {
15245 ReactInstrumentation.debugTool.onSetOwner(debugID, owner._debugID);
15246 }
15247 } else {
15248 instance._debugID = 0;
15249 }
15250 } 15066 }
15251 15067
15252 // Internal instances should fully constructed at this point, so they should 15068 // Internal instances should fully constructed at this point, so they should
@@ -15264,7 +15080,7 @@
15264 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 15080 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
15265 15081
15266/***/ }, 15082/***/ },
15267/* 129 */ 15083/* 124 */
15268/***/ function(module, exports, __webpack_require__) { 15084/***/ function(module, exports, __webpack_require__) {
15269 15085
15270 /* WEBPACK VAR INJECTION */(function(process) {/** 15086 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -15283,21 +15099,21 @@
15283 var _prodInvariant = __webpack_require__(9), 15099 var _prodInvariant = __webpack_require__(9),
15284 _assign = __webpack_require__(6); 15100 _assign = __webpack_require__(6);
15285 15101
15286 var ReactComponentEnvironment = __webpack_require__(125); 15102 var ReactComponentEnvironment = __webpack_require__(120);
15287 var ReactCurrentOwner = __webpack_require__(12); 15103 var ReactCurrentOwner = __webpack_require__(12);
15288 var ReactElement = __webpack_require__(11); 15104 var ReactElement = __webpack_require__(11);
15289 var ReactErrorUtils = __webpack_require__(49); 15105 var ReactErrorUtils = __webpack_require__(48);
15290 var ReactInstanceMap = __webpack_require__(126); 15106 var ReactInstanceMap = __webpack_require__(121);
15291 var ReactInstrumentation = __webpack_require__(65); 15107 var ReactInstrumentation = __webpack_require__(64);
15292 var ReactNodeTypes = __webpack_require__(130); 15108 var ReactNodeTypes = __webpack_require__(125);
15293 var ReactPropTypeLocations = __webpack_require__(24); 15109 var ReactPropTypeLocations = __webpack_require__(24);
15294 var ReactReconciler = __webpack_require__(62); 15110 var ReactReconciler = __webpack_require__(61);
15295 15111
15296 var checkReactTypeSpec = __webpack_require__(32); 15112 var checkReactTypeSpec = __webpack_require__(31);
15297 var emptyObject = __webpack_require__(21); 15113 var emptyObject = __webpack_require__(21);
15298 var invariant = __webpack_require__(10); 15114 var invariant = __webpack_require__(10);
15299 var shallowEqual = __webpack_require__(131); 15115 var shallowEqual = __webpack_require__(126);
15300 var shouldUpdateReactComponent = __webpack_require__(132); 15116 var shouldUpdateReactComponent = __webpack_require__(127);
15301 var warning = __webpack_require__(13); 15117 var warning = __webpack_require__(13);
15302 15118
15303 var CompositeTypes = { 15119 var CompositeTypes = {
@@ -15321,28 +15137,6 @@
15321 } 15137 }
15322 } 15138 }
15323 15139
15324 function invokeComponentDidMountWithTimer() {
15325 var publicInstance = this._instance;
15326 if (this._debugID !== 0) {
15327 ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'componentDidMount');
15328 }
15329 publicInstance.componentDidMount();
15330 if (this._debugID !== 0) {
15331 ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'componentDidMount');
15332 }
15333 }
15334
15335 function invokeComponentDidUpdateWithTimer(prevProps, prevState, prevContext) {
15336 var publicInstance = this._instance;
15337 if (this._debugID !== 0) {
15338 ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'componentDidUpdate');
15339 }
15340 publicInstance.componentDidUpdate(prevProps, prevState, prevContext);
15341 if (this._debugID !== 0) {
15342 ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'componentDidUpdate');
15343 }
15344 }
15345
15346 function shouldConstruct(Component) { 15140 function shouldConstruct(Component) {
15347 return !!(Component.prototype && Component.prototype.isReactComponent); 15141 return !!(Component.prototype && Component.prototype.isReactComponent);
15348 } 15142 }
@@ -15351,6 +15145,23 @@
15351 return !!(Component.prototype && Component.prototype.isPureReactComponent); 15145 return !!(Component.prototype && Component.prototype.isPureReactComponent);
15352 } 15146 }
15353 15147
15148 // Separated into a function to contain deoptimizations caused by try/finally.
15149 function measureLifeCyclePerf(fn, debugID, timerType) {
15150 if (debugID === 0) {
15151 // Top-level wrappers (see ReactMount) and empty components (see
15152 // ReactDOMEmptyComponent) are invisible to hooks and devtools.
15153 // Both are implementation details that should go away in the future.
15154 return fn();
15155 }
15156
15157 ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType);
15158 try {
15159 return fn();
15160 } finally {
15161 ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType);
15162 }
15163 }
15164
15354 /** 15165 /**
15355 * ------------------ The Life-Cycle of a Composite Component ------------------ 15166 * ------------------ The Life-Cycle of a Composite Component ------------------
15356 * 15167 *
@@ -15400,7 +15211,7 @@
15400 */ 15211 */
15401 construct: function (element) { 15212 construct: function (element) {
15402 this._currentElement = element; 15213 this._currentElement = element;
15403 this._rootNodeID = null; 15214 this._rootNodeID = 0;
15404 this._compositeType = null; 15215 this._compositeType = null;
15405 this._instance = null; 15216 this._instance = null;
15406 this._hostParent = null; 15217 this._hostParent = null;
@@ -15533,21 +15344,16 @@
15533 15344
15534 if (inst.componentDidMount) { 15345 if (inst.componentDidMount) {
15535 if (process.env.NODE_ENV !== 'production') { 15346 if (process.env.NODE_ENV !== 'production') {
15536 transaction.getReactMountReady().enqueue(invokeComponentDidMountWithTimer, this); 15347 transaction.getReactMountReady().enqueue(function () {
15348 measureLifeCyclePerf(function () {
15349 return inst.componentDidMount();
15350 }, _this._debugID, 'componentDidMount');
15351 });
15537 } else { 15352 } else {
15538 transaction.getReactMountReady().enqueue(inst.componentDidMount, inst); 15353 transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);
15539 } 15354 }
15540 } 15355 }
15541 15356
15542 if (process.env.NODE_ENV !== 'production') {
15543 if (this._debugID) {
15544 var callback = function (component) {
15545 return ReactInstrumentation.debugTool.onComponentHasMounted(_this._debugID);
15546 };
15547 transaction.getReactMountReady().enqueue(callback, this);
15548 }
15549 }
15550
15551 return markup; 15357 return markup;
15552 }, 15358 },
15553 15359
@@ -15566,35 +15372,26 @@
15566 15372
15567 _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) { 15373 _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) {
15568 var Component = this._currentElement.type; 15374 var Component = this._currentElement.type;
15569 var instanceOrElement; 15375
15570 if (doConstruct) { 15376 if (doConstruct) {
15571 if (process.env.NODE_ENV !== 'production') { 15377 if (process.env.NODE_ENV !== 'production') {
15572 if (this._debugID !== 0) { 15378 return measureLifeCyclePerf(function () {
15573 ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'ctor'); 15379 return new Component(publicProps, publicContext, updateQueue);
15574 } 15380 }, this._debugID, 'ctor');
15575 } 15381 } else {
15576 instanceOrElement = new Component(publicProps, publicContext, updateQueue); 15382 return new Component(publicProps, publicContext, updateQueue);
15577 if (process.env.NODE_ENV !== 'production') {
15578 if (this._debugID !== 0) {
15579 ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'ctor');
15580 }
15581 } 15383 }
15384 }
15385
15386 // This can still be an instance in case of factory components
15387 // but we'll count this as time spent rendering as the more common case.
15388 if (process.env.NODE_ENV !== 'production') {
15389 return measureLifeCyclePerf(function () {
15390 return Component(publicProps, publicContext, updateQueue);
15391 }, this._debugID, 'render');
15582 } else { 15392 } else {
15583 // This can still be an instance in case of factory components 15393 return Component(publicProps, publicContext, updateQueue);
15584 // but we'll count this as time spent rendering as the more common case.
15585 if (process.env.NODE_ENV !== 'production') {
15586 if (this._debugID !== 0) {
15587 ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'render');
15588 }
15589 }
15590 instanceOrElement = Component(publicProps, publicContext, updateQueue);
15591 if (process.env.NODE_ENV !== 'production') {
15592 if (this._debugID !== 0) {
15593 ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'render');
15594 }
15595 }
15596 } 15394 }
15597 return instanceOrElement;
15598 }, 15395 },
15599 15396
15600 performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) { 15397 performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
@@ -15603,11 +15400,6 @@
15603 try { 15400 try {
15604 markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); 15401 markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
15605 } catch (e) { 15402 } catch (e) {
15606 if (process.env.NODE_ENV !== 'production') {
15607 if (this._debugID !== 0) {
15608 ReactInstrumentation.debugTool.onError();
15609 }
15610 }
15611 // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint 15403 // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint
15612 transaction.rollback(checkpoint); 15404 transaction.rollback(checkpoint);
15613 this._instance.unstable_handleError(e); 15405 this._instance.unstable_handleError(e);
@@ -15628,17 +15420,19 @@
15628 15420
15629 performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) { 15421 performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
15630 var inst = this._instance; 15422 var inst = this._instance;
15423
15424 var debugID = 0;
15425 if (process.env.NODE_ENV !== 'production') {
15426 debugID = this._debugID;
15427 }
15428
15631 if (inst.componentWillMount) { 15429 if (inst.componentWillMount) {
15632 if (process.env.NODE_ENV !== 'production') { 15430 if (process.env.NODE_ENV !== 'production') {
15633 if (this._debugID !== 0) { 15431 measureLifeCyclePerf(function () {
15634 ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'componentWillMount'); 15432 return inst.componentWillMount();
15635 } 15433 }, debugID, 'componentWillMount');
15636 } 15434 } else {
15637 inst.componentWillMount(); 15435 inst.componentWillMount();
15638 if (process.env.NODE_ENV !== 'production') {
15639 if (this._debugID !== 0) {
15640 ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'componentWillMount');
15641 }
15642 } 15436 }
15643 // When mounting, calls to `setState` by `componentWillMount` will set 15437 // When mounting, calls to `setState` by `componentWillMount` will set
15644 // `this._pendingStateQueue` without triggering a re-render. 15438 // `this._pendingStateQueue` without triggering a re-render.
@@ -15657,17 +15451,13 @@
15657 var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */ 15451 var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */
15658 ); 15452 );
15659 this._renderedComponent = child; 15453 this._renderedComponent = child;
15660 if (process.env.NODE_ENV !== 'production') {
15661 if (child._debugID !== 0 && this._debugID !== 0) {
15662 ReactInstrumentation.debugTool.onSetParent(child._debugID, this._debugID);
15663 }
15664 }
15665 15454
15666 var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context)); 15455 var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);
15667 15456
15668 if (process.env.NODE_ENV !== 'production') { 15457 if (process.env.NODE_ENV !== 'production') {
15669 if (this._debugID !== 0) { 15458 if (debugID !== 0) {
15670 ReactInstrumentation.debugTool.onSetChildren(this._debugID, child._debugID !== 0 ? [child._debugID] : []); 15459 var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
15460 ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
15671 } 15461 }
15672 } 15462 }
15673 15463
@@ -15688,24 +15478,22 @@
15688 if (!this._renderedComponent) { 15478 if (!this._renderedComponent) {
15689 return; 15479 return;
15690 } 15480 }
15481
15691 var inst = this._instance; 15482 var inst = this._instance;
15692 15483
15693 if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) { 15484 if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) {
15694 inst._calledComponentWillUnmount = true; 15485 inst._calledComponentWillUnmount = true;
15695 if (process.env.NODE_ENV !== 'production') { 15486
15696 if (this._debugID !== 0) {
15697 ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'componentWillUnmount');
15698 }
15699 }
15700 if (safely) { 15487 if (safely) {
15701 var name = this.getName() + '.componentWillUnmount()'; 15488 var name = this.getName() + '.componentWillUnmount()';
15702 ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst)); 15489 ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst));
15703 } else { 15490 } else {
15704 inst.componentWillUnmount(); 15491 if (process.env.NODE_ENV !== 'production') {
15705 } 15492 measureLifeCyclePerf(function () {
15706 if (process.env.NODE_ENV !== 'production') { 15493 return inst.componentWillUnmount();
15707 if (this._debugID !== 0) { 15494 }, this._debugID, 'componentWillUnmount');
15708 ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'componentWillUnmount'); 15495 } else {
15496 inst.componentWillUnmount();
15709 } 15497 }
15710 } 15498 }
15711 } 15499 }
@@ -15729,7 +15517,7 @@
15729 // These fields do not really need to be reset since this object is no 15517 // These fields do not really need to be reset since this object is no
15730 // longer accessible. 15518 // longer accessible.
15731 this._context = null; 15519 this._context = null;
15732 this._rootNodeID = null; 15520 this._rootNodeID = 0;
15733 this._topLevelWrapper = null; 15521 this._topLevelWrapper = null;
15734 15522
15735 // Delete the reference from the instance to this internal representation 15523 // Delete the reference from the instance to this internal representation
@@ -15792,13 +15580,21 @@
15792 _processChildContext: function (currentContext) { 15580 _processChildContext: function (currentContext) {
15793 var Component = this._currentElement.type; 15581 var Component = this._currentElement.type;
15794 var inst = this._instance; 15582 var inst = this._instance;
15795 if (process.env.NODE_ENV !== 'production') { 15583 var childContext;
15796 ReactInstrumentation.debugTool.onBeginProcessingChildContext(); 15584
15797 } 15585 if (inst.getChildContext) {
15798 var childContext = inst.getChildContext && inst.getChildContext(); 15586 if (process.env.NODE_ENV !== 'production') {
15799 if (process.env.NODE_ENV !== 'production') { 15587 ReactInstrumentation.debugTool.onBeginProcessingChildContext();
15800 ReactInstrumentation.debugTool.onEndProcessingChildContext(); 15588 try {
15589 childContext = inst.getChildContext();
15590 } finally {
15591 ReactInstrumentation.debugTool.onEndProcessingChildContext();
15592 }
15593 } else {
15594 childContext = inst.getChildContext();
15595 }
15801 } 15596 }
15597
15802 if (childContext) { 15598 if (childContext) {
15803 !(typeof Component.childContextTypes === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0; 15599 !(typeof Component.childContextTypes === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0;
15804 if (process.env.NODE_ENV !== 'production') { 15600 if (process.env.NODE_ENV !== 'production') {
@@ -15893,15 +15689,11 @@
15893 // immediately reconciled instead of waiting for the next batch. 15689 // immediately reconciled instead of waiting for the next batch.
15894 if (willReceive && inst.componentWillReceiveProps) { 15690 if (willReceive && inst.componentWillReceiveProps) {
15895 if (process.env.NODE_ENV !== 'production') { 15691 if (process.env.NODE_ENV !== 'production') {
15896 if (this._debugID !== 0) { 15692 measureLifeCyclePerf(function () {
15897 ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'componentWillReceiveProps'); 15693 return inst.componentWillReceiveProps(nextProps, nextContext);
15898 } 15694 }, this._debugID, 'componentWillReceiveProps');
15899 } 15695 } else {
15900 inst.componentWillReceiveProps(nextProps, nextContext); 15696 inst.componentWillReceiveProps(nextProps, nextContext);
15901 if (process.env.NODE_ENV !== 'production') {
15902 if (this._debugID !== 0) {
15903 ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'componentWillReceiveProps');
15904 }
15905 } 15697 }
15906 } 15698 }
15907 15699
@@ -15911,15 +15703,11 @@
15911 if (!this._pendingForceUpdate) { 15703 if (!this._pendingForceUpdate) {
15912 if (inst.shouldComponentUpdate) { 15704 if (inst.shouldComponentUpdate) {
15913 if (process.env.NODE_ENV !== 'production') { 15705 if (process.env.NODE_ENV !== 'production') {
15914 if (this._debugID !== 0) { 15706 shouldUpdate = measureLifeCyclePerf(function () {
15915 ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'shouldComponentUpdate'); 15707 return inst.shouldComponentUpdate(nextProps, nextState, nextContext);
15916 } 15708 }, this._debugID, 'shouldComponentUpdate');
15917 } 15709 } else {
15918 shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext); 15710 shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext);
15919 if (process.env.NODE_ENV !== 'production') {
15920 if (this._debugID !== 0) {
15921 ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'shouldComponentUpdate');
15922 }
15923 } 15711 }
15924 } else { 15712 } else {
15925 if (this._compositeType === CompositeTypes.PureClass) { 15713 if (this._compositeType === CompositeTypes.PureClass) {
@@ -16001,15 +15789,11 @@
16001 15789
16002 if (inst.componentWillUpdate) { 15790 if (inst.componentWillUpdate) {
16003 if (process.env.NODE_ENV !== 'production') { 15791 if (process.env.NODE_ENV !== 'production') {
16004 if (this._debugID !== 0) { 15792 measureLifeCyclePerf(function () {
16005 ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'componentWillUpdate'); 15793 return inst.componentWillUpdate(nextProps, nextState, nextContext);
16006 } 15794 }, this._debugID, 'componentWillUpdate');
16007 } 15795 } else {
16008 inst.componentWillUpdate(nextProps, nextState, nextContext); 15796 inst.componentWillUpdate(nextProps, nextState, nextContext);
16009 if (process.env.NODE_ENV !== 'production') {
16010 if (this._debugID !== 0) {
16011 ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'componentWillUpdate');
16012 }
16013 } 15797 }
16014 } 15798 }
16015 15799
@@ -16023,20 +15807,13 @@
16023 15807
16024 if (hasComponentDidUpdate) { 15808 if (hasComponentDidUpdate) {
16025 if (process.env.NODE_ENV !== 'production') { 15809 if (process.env.NODE_ENV !== 'production') {
16026 transaction.getReactMountReady().enqueue(invokeComponentDidUpdateWithTimer.bind(this, prevProps, prevState, prevContext), this); 15810 transaction.getReactMountReady().enqueue(function () {
15811 measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate');
15812 });
16027 } else { 15813 } else {
16028 transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst); 15814 transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst);
16029 } 15815 }
16030 } 15816 }
16031
16032 if (process.env.NODE_ENV !== 'production') {
16033 if (this._debugID) {
16034 var callback = function () {
16035 return ReactInstrumentation.debugTool.onComponentHasUpdated(_this2._debugID);
16036 };
16037 transaction.getReactMountReady().enqueue(callback, this);
16038 }
16039 }
16040 }, 15817 },
16041 15818
16042 /** 15819 /**
@@ -16049,6 +15826,12 @@
16049 var prevComponentInstance = this._renderedComponent; 15826 var prevComponentInstance = this._renderedComponent;
16050 var prevRenderedElement = prevComponentInstance._currentElement; 15827 var prevRenderedElement = prevComponentInstance._currentElement;
16051 var nextRenderedElement = this._renderValidatedComponent(); 15828 var nextRenderedElement = this._renderValidatedComponent();
15829
15830 var debugID = 0;
15831 if (process.env.NODE_ENV !== 'production') {
15832 debugID = this._debugID;
15833 }
15834
16052 if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) { 15835 if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {
16053 ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context)); 15836 ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context));
16054 } else { 15837 } else {
@@ -16060,17 +15843,13 @@
16060 var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */ 15843 var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */
16061 ); 15844 );
16062 this._renderedComponent = child; 15845 this._renderedComponent = child;
16063 if (process.env.NODE_ENV !== 'production') {
16064 if (child._debugID !== 0 && this._debugID !== 0) {
16065 ReactInstrumentation.debugTool.onSetParent(child._debugID, this._debugID);
16066 }
16067 }
16068 15846
16069 var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context)); 15847 var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID);
16070 15848
16071 if (process.env.NODE_ENV !== 'production') { 15849 if (process.env.NODE_ENV !== 'production') {
16072 if (this._debugID !== 0) { 15850 if (debugID !== 0) {
16073 ReactInstrumentation.debugTool.onSetChildren(this._debugID, child._debugID !== 0 ? [child._debugID] : []); 15851 var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
15852 ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
16074 } 15853 }
16075 } 15854 }
16076 15855
@@ -16092,17 +15871,14 @@
16092 */ 15871 */
16093 _renderValidatedComponentWithoutOwnerOrContext: function () { 15872 _renderValidatedComponentWithoutOwnerOrContext: function () {
16094 var inst = this._instance; 15873 var inst = this._instance;
15874 var renderedComponent;
16095 15875
16096 if (process.env.NODE_ENV !== 'production') { 15876 if (process.env.NODE_ENV !== 'production') {
16097 if (this._debugID !== 0) { 15877 renderedComponent = measureLifeCyclePerf(function () {
16098 ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'render'); 15878 return inst.render();
16099 } 15879 }, this._debugID, 'render');
16100 } 15880 } else {
16101 var renderedComponent = inst.render(); 15881 renderedComponent = inst.render();
16102 if (process.env.NODE_ENV !== 'production') {
16103 if (this._debugID !== 0) {
16104 ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'render');
16105 }
16106 } 15882 }
16107 15883
16108 if (process.env.NODE_ENV !== 'production') { 15884 if (process.env.NODE_ENV !== 'production') {
@@ -16153,7 +15929,7 @@
16153 var publicComponentInstance = component.getPublicInstance(); 15929 var publicComponentInstance = component.getPublicInstance();
16154 if (process.env.NODE_ENV !== 'production') { 15930 if (process.env.NODE_ENV !== 'production') {
16155 var componentName = component && component.getName ? component.getName() : 'a component'; 15931 var componentName = component && component.getName ? component.getName() : 'a component';
16156 process.env.NODE_ENV !== 'production' ? warning(publicComponentInstance != null, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0; 15932 process.env.NODE_ENV !== 'production' ? warning(publicComponentInstance != null || component._compositeType !== CompositeTypes.StatelessFunctional, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0;
16157 } 15933 }
16158 var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs; 15934 var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;
16159 refs[ref] = publicComponentInstance; 15935 refs[ref] = publicComponentInstance;
@@ -16214,7 +15990,7 @@
16214 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 15990 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
16215 15991
16216/***/ }, 15992/***/ },
16217/* 130 */ 15993/* 125 */
16218/***/ function(module, exports, __webpack_require__) { 15994/***/ function(module, exports, __webpack_require__) {
16219 15995
16220 /* WEBPACK VAR INJECTION */(function(process) {/** 15996 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -16260,7 +16036,7 @@
16260 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 16036 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
16261 16037
16262/***/ }, 16038/***/ },
16263/* 131 */ 16039/* 126 */
16264/***/ function(module, exports) { 16040/***/ function(module, exports) {
16265 16041
16266 /** 16042 /**
@@ -16290,7 +16066,8 @@
16290 if (x === y) { 16066 if (x === y) {
16291 // Steps 1-5, 7-10 16067 // Steps 1-5, 7-10
16292 // Steps 6.b-6.e: +0 != -0 16068 // Steps 6.b-6.e: +0 != -0
16293 return x !== 0 || 1 / x === 1 / y; 16069 // Added the nonzero y check to make Flow happy, but it is redundant
16070 return x !== 0 || y !== 0 || 1 / x === 1 / y;
16294 } else { 16071 } else {
16295 // Step 6.a: NaN == NaN 16072 // Step 6.a: NaN == NaN
16296 return x !== x && y !== y; 16073 return x !== x && y !== y;
@@ -16331,7 +16108,7 @@
16331 module.exports = shallowEqual; 16108 module.exports = shallowEqual;
16332 16109
16333/***/ }, 16110/***/ },
16334/* 132 */ 16111/* 127 */
16335/***/ function(module, exports) { 16112/***/ function(module, exports) {
16336 16113
16337 /** 16114 /**
@@ -16378,7 +16155,7 @@
16378 module.exports = shouldUpdateReactComponent; 16155 module.exports = shouldUpdateReactComponent;
16379 16156
16380/***/ }, 16157/***/ },
16381/* 133 */ 16158/* 128 */
16382/***/ function(module, exports) { 16159/***/ function(module, exports) {
16383 16160
16384 /** 16161 /**
@@ -16413,7 +16190,7 @@
16413 module.exports = ReactEmptyComponent; 16190 module.exports = ReactEmptyComponent;
16414 16191
16415/***/ }, 16192/***/ },
16416/* 134 */ 16193/* 129 */
16417/***/ function(module, exports, __webpack_require__) { 16194/***/ function(module, exports, __webpack_require__) {
16418 16195
16419 /* WEBPACK VAR INJECTION */(function(process) {/** 16196 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -16495,7 +16272,7 @@
16495 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 16272 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
16496 16273
16497/***/ }, 16274/***/ },
16498/* 135 */ 16275/* 130 */
16499/***/ function(module, exports, __webpack_require__) { 16276/***/ function(module, exports, __webpack_require__) {
16500 16277
16501 /* WEBPACK VAR INJECTION */(function(process) {/** 16278 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -16516,7 +16293,7 @@
16516 var traverseAllChildren = __webpack_require__(16); 16293 var traverseAllChildren = __webpack_require__(16);
16517 var warning = __webpack_require__(13); 16294 var warning = __webpack_require__(13);
16518 16295
16519 var ReactComponentTreeDevtool; 16296 var ReactComponentTreeHook;
16520 16297
16521 if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { 16298 if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
16522 // Temporary hack. 16299 // Temporary hack.
@@ -16524,7 +16301,7 @@
16524 // https://github.com/facebook/react/issues/7240 16301 // https://github.com/facebook/react/issues/7240
16525 // Remove the inline requires when we don't need them anymore: 16302 // Remove the inline requires when we don't need them anymore:
16526 // https://github.com/facebook/react/pull/7178 16303 // https://github.com/facebook/react/pull/7178
16527 ReactComponentTreeDevtool = __webpack_require__(31); 16304 ReactComponentTreeHook = __webpack_require__(30);
16528 } 16305 }
16529 16306
16530 /** 16307 /**
@@ -16539,10 +16316,12 @@
16539 var result = traverseContext; 16316 var result = traverseContext;
16540 var keyUnique = result[name] === undefined; 16317 var keyUnique = result[name] === undefined;
16541 if (process.env.NODE_ENV !== 'production') { 16318 if (process.env.NODE_ENV !== 'production') {
16542 if (!ReactComponentTreeDevtool) { 16319 if (!ReactComponentTreeHook) {
16543 ReactComponentTreeDevtool = __webpack_require__(31); 16320 ReactComponentTreeHook = __webpack_require__(30);
16321 }
16322 if (!keyUnique) {
16323 process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;
16544 } 16324 }
16545 process.env.NODE_ENV !== 'production' ? warning(keyUnique, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeDevtool.getStackAddendumByID(selfDebugID)) : void 0;
16546 } 16325 }
16547 if (keyUnique && child != null) { 16326 if (keyUnique && child != null) {
16548 result[name] = child; 16327 result[name] = child;
@@ -16575,7 +16354,7 @@
16575 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 16354 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
16576 16355
16577/***/ }, 16356/***/ },
16578/* 136 */ 16357/* 131 */
16579/***/ function(module, exports, __webpack_require__) { 16358/***/ function(module, exports, __webpack_require__) {
16580 16359
16581 /* WEBPACK VAR INJECTION */(function(process) {/** 16360 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -16594,9 +16373,9 @@
16594 var _assign = __webpack_require__(6); 16373 var _assign = __webpack_require__(6);
16595 16374
16596 var PooledClass = __webpack_require__(8); 16375 var PooledClass = __webpack_require__(8);
16597 var Transaction = __webpack_require__(72); 16376 var Transaction = __webpack_require__(71);
16598 var ReactInstrumentation = __webpack_require__(65); 16377 var ReactInstrumentation = __webpack_require__(64);
16599 var ReactServerUpdateQueue = __webpack_require__(137); 16378 var ReactServerUpdateQueue = __webpack_require__(132);
16600 16379
16601 /** 16380 /**
16602 * Executed within the scope of the `Transaction` instance. Consider these as 16381 * Executed within the scope of the `Transaction` instance. Consider these as
@@ -16671,7 +16450,7 @@
16671 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 16450 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
16672 16451
16673/***/ }, 16452/***/ },
16674/* 137 */ 16453/* 132 */
16675/***/ function(module, exports, __webpack_require__) { 16454/***/ function(module, exports, __webpack_require__) {
16676 16455
16677 /* WEBPACK VAR INJECTION */(function(process) {/** 16456 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -16690,8 +16469,8 @@
16690 16469
16691 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 16470 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
16692 16471
16693 var ReactUpdateQueue = __webpack_require__(138); 16472 var ReactUpdateQueue = __webpack_require__(133);
16694 var Transaction = __webpack_require__(72); 16473 var Transaction = __webpack_require__(71);
16695 var warning = __webpack_require__(13); 16474 var warning = __webpack_require__(13);
16696 16475
16697 function warnNoop(publicInstance, callerName) { 16476 function warnNoop(publicInstance, callerName) {
@@ -16818,7 +16597,7 @@
16818 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 16597 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
16819 16598
16820/***/ }, 16599/***/ },
16821/* 138 */ 16600/* 133 */
16822/***/ function(module, exports, __webpack_require__) { 16601/***/ function(module, exports, __webpack_require__) {
16823 16602
16824 /* WEBPACK VAR INJECTION */(function(process) {/** 16603 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -16837,9 +16616,9 @@
16837 var _prodInvariant = __webpack_require__(9); 16616 var _prodInvariant = __webpack_require__(9);
16838 16617
16839 var ReactCurrentOwner = __webpack_require__(12); 16618 var ReactCurrentOwner = __webpack_require__(12);
16840 var ReactInstanceMap = __webpack_require__(126); 16619 var ReactInstanceMap = __webpack_require__(121);
16841 var ReactInstrumentation = __webpack_require__(65); 16620 var ReactInstrumentation = __webpack_require__(64);
16842 var ReactUpdates = __webpack_require__(59); 16621 var ReactUpdates = __webpack_require__(58);
16843 16622
16844 var invariant = __webpack_require__(10); 16623 var invariant = __webpack_require__(10);
16845 var warning = __webpack_require__(13); 16624 var warning = __webpack_require__(13);
@@ -17050,7 +16829,7 @@
17050 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 16829 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
17051 16830
17052/***/ }, 16831/***/ },
17053/* 139 */ 16832/* 134 */
17054/***/ function(module, exports, __webpack_require__) { 16833/***/ function(module, exports, __webpack_require__) {
17055 16834
17056 /* WEBPACK VAR INJECTION */(function(process) {/** 16835 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -17342,11 +17121,16 @@
17342 17121
17343 var didWarn = {}; 17122 var didWarn = {};
17344 17123
17345 validateDOMNesting = function (childTag, childInstance, ancestorInfo) { 17124 validateDOMNesting = function (childTag, childText, childInstance, ancestorInfo) {
17346 ancestorInfo = ancestorInfo || emptyAncestorInfo; 17125 ancestorInfo = ancestorInfo || emptyAncestorInfo;
17347 var parentInfo = ancestorInfo.current; 17126 var parentInfo = ancestorInfo.current;
17348 var parentTag = parentInfo && parentInfo.tag; 17127 var parentTag = parentInfo && parentInfo.tag;
17349 17128
17129 if (childText != null) {
17130 process.env.NODE_ENV !== 'production' ? warning(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0;
17131 childTag = '#text';
17132 }
17133
17350 var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo; 17134 var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
17351 var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo); 17135 var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
17352 var problematic = invalidParent || invalidAncestor; 17136 var problematic = invalidParent || invalidAncestor;
@@ -17394,7 +17178,15 @@
17394 didWarn[warnKey] = true; 17178 didWarn[warnKey] = true;
17395 17179
17396 var tagDisplayName = childTag; 17180 var tagDisplayName = childTag;
17397 if (childTag !== '#text') { 17181 var whitespaceInfo = '';
17182 if (childTag === '#text') {
17183 if (/\S/.test(childText)) {
17184 tagDisplayName = 'Text nodes';
17185 } else {
17186 tagDisplayName = 'Whitespace text nodes';
17187 whitespaceInfo = ' Make sure you don\'t have any extra whitespace between tags on ' + 'each line of your source code.';
17188 }
17189 } else {
17398 tagDisplayName = '<' + childTag + '>'; 17190 tagDisplayName = '<' + childTag + '>';
17399 } 17191 }
17400 17192
@@ -17403,7 +17195,7 @@
17403 if (ancestorTag === 'table' && childTag === 'tr') { 17195 if (ancestorTag === 'table' && childTag === 'tr') {
17404 info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.'; 17196 info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.';
17405 } 17197 }
17406 process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>. ' + 'See %s.%s', tagDisplayName, ancestorTag, ownerInfo, info) : void 0; 17198 process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s ' + 'See %s.%s', tagDisplayName, ancestorTag, whitespaceInfo, ownerInfo, info) : void 0;
17407 } else { 17199 } else {
17408 process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) : void 0; 17200 process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) : void 0;
17409 } 17201 }
@@ -17425,7 +17217,7 @@
17425 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 17217 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
17426 17218
17427/***/ }, 17219/***/ },
17428/* 140 */ 17220/* 135 */
17429/***/ function(module, exports, __webpack_require__) { 17221/***/ function(module, exports, __webpack_require__) {
17430 17222
17431 /** 17223 /**
@@ -17443,8 +17235,8 @@
17443 17235
17444 var _assign = __webpack_require__(6); 17236 var _assign = __webpack_require__(6);
17445 17237
17446 var DOMLazyTree = __webpack_require__(85); 17238 var DOMLazyTree = __webpack_require__(84);
17447 var ReactDOMComponentTree = __webpack_require__(39); 17239 var ReactDOMComponentTree = __webpack_require__(38);
17448 17240
17449 var ReactDOMEmptyComponent = function (instantiate) { 17241 var ReactDOMEmptyComponent = function (instantiate) {
17450 // ReactCompositeComponent uses this: 17242 // ReactCompositeComponent uses this:
@@ -17453,7 +17245,7 @@
17453 this._hostNode = null; 17245 this._hostNode = null;
17454 this._hostParent = null; 17246 this._hostParent = null;
17455 this._hostContainerInfo = null; 17247 this._hostContainerInfo = null;
17456 this._domID = null; 17248 this._domID = 0;
17457 }; 17249 };
17458 _assign(ReactDOMEmptyComponent.prototype, { 17250 _assign(ReactDOMEmptyComponent.prototype, {
17459 mountComponent: function (transaction, hostParent, hostContainerInfo, context) { 17251 mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
@@ -17490,7 +17282,7 @@
17490 module.exports = ReactDOMEmptyComponent; 17282 module.exports = ReactDOMEmptyComponent;
17491 17283
17492/***/ }, 17284/***/ },
17493/* 141 */ 17285/* 136 */
17494/***/ function(module, exports, __webpack_require__) { 17286/***/ function(module, exports, __webpack_require__) {
17495 17287
17496 /* WEBPACK VAR INJECTION */(function(process) {/** 17288 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -17632,7 +17424,7 @@
17632 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 17424 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
17633 17425
17634/***/ }, 17426/***/ },
17635/* 142 */ 17427/* 137 */
17636/***/ function(module, exports, __webpack_require__) { 17428/***/ function(module, exports, __webpack_require__) {
17637 17429
17638 /* WEBPACK VAR INJECTION */(function(process) {/** 17430 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -17651,14 +17443,13 @@
17651 var _prodInvariant = __webpack_require__(9), 17443 var _prodInvariant = __webpack_require__(9),
17652 _assign = __webpack_require__(6); 17444 _assign = __webpack_require__(6);
17653 17445
17654 var DOMChildrenOperations = __webpack_require__(84); 17446 var DOMChildrenOperations = __webpack_require__(83);
17655 var DOMLazyTree = __webpack_require__(85); 17447 var DOMLazyTree = __webpack_require__(84);
17656 var ReactDOMComponentTree = __webpack_require__(39); 17448 var ReactDOMComponentTree = __webpack_require__(38);
17657 var ReactInstrumentation = __webpack_require__(65);
17658 17449
17659 var escapeTextContentForBrowser = __webpack_require__(90); 17450 var escapeTextContentForBrowser = __webpack_require__(89);
17660 var invariant = __webpack_require__(10); 17451 var invariant = __webpack_require__(10);
17661 var validateDOMNesting = __webpack_require__(139); 17452 var validateDOMNesting = __webpack_require__(134);
17662 17453
17663 /** 17454 /**
17664 * Text nodes violate a couple assumptions that React makes about components: 17455 * Text nodes violate a couple assumptions that React makes about components:
@@ -17684,7 +17475,7 @@
17684 this._hostParent = null; 17475 this._hostParent = null;
17685 17476
17686 // Properties 17477 // Properties
17687 this._domID = null; 17478 this._domID = 0;
17688 this._mountIndex = 0; 17479 this._mountIndex = 0;
17689 this._closingComment = null; 17480 this._closingComment = null;
17690 this._commentNodes = null; 17481 this._commentNodes = null;
@@ -17702,8 +17493,6 @@
17702 */ 17493 */
17703 mountComponent: function (transaction, hostParent, hostContainerInfo, context) { 17494 mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
17704 if (process.env.NODE_ENV !== 'production') { 17495 if (process.env.NODE_ENV !== 'production') {
17705 ReactInstrumentation.debugTool.onSetText(this._debugID, this._stringText);
17706
17707 var parentInfo; 17496 var parentInfo;
17708 if (hostParent != null) { 17497 if (hostParent != null) {
17709 parentInfo = hostParent._ancestorInfo; 17498 parentInfo = hostParent._ancestorInfo;
@@ -17713,7 +17502,7 @@
17713 if (parentInfo) { 17502 if (parentInfo) {
17714 // parentInfo should always be present except for the top-level 17503 // parentInfo should always be present except for the top-level
17715 // component when server rendering 17504 // component when server rendering
17716 validateDOMNesting('#text', this, parentInfo); 17505 validateDOMNesting(null, this._stringText, this, parentInfo);
17717 } 17506 }
17718 } 17507 }
17719 17508
@@ -17767,10 +17556,6 @@
17767 this._stringText = nextStringText; 17556 this._stringText = nextStringText;
17768 var commentNodes = this.getHostNode(); 17557 var commentNodes = this.getHostNode();
17769 DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText); 17558 DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText);
17770
17771 if (process.env.NODE_ENV !== 'production') {
17772 ReactInstrumentation.debugTool.onSetText(this._debugID, nextStringText);
17773 }
17774 } 17559 }
17775 } 17560 }
17776 }, 17561 },
@@ -17809,7 +17594,7 @@
17809 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 17594 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
17810 17595
17811/***/ }, 17596/***/ },
17812/* 143 */ 17597/* 138 */
17813/***/ function(module, exports, __webpack_require__) { 17598/***/ function(module, exports, __webpack_require__) {
17814 17599
17815 /** 17600 /**
@@ -17827,8 +17612,8 @@
17827 17612
17828 var _assign = __webpack_require__(6); 17613 var _assign = __webpack_require__(6);
17829 17614
17830 var ReactUpdates = __webpack_require__(59); 17615 var ReactUpdates = __webpack_require__(58);
17831 var Transaction = __webpack_require__(72); 17616 var Transaction = __webpack_require__(71);
17832 17617
17833 var emptyFunction = __webpack_require__(14); 17618 var emptyFunction = __webpack_require__(14);
17834 17619
@@ -17882,7 +17667,7 @@
17882 module.exports = ReactDefaultBatchingStrategy; 17667 module.exports = ReactDefaultBatchingStrategy;
17883 17668
17884/***/ }, 17669/***/ },
17885/* 144 */ 17670/* 139 */
17886/***/ function(module, exports, __webpack_require__) { 17671/***/ function(module, exports, __webpack_require__) {
17887 17672
17888 /** 17673 /**
@@ -17900,14 +17685,14 @@
17900 17685
17901 var _assign = __webpack_require__(6); 17686 var _assign = __webpack_require__(6);
17902 17687
17903 var EventListener = __webpack_require__(145); 17688 var EventListener = __webpack_require__(140);
17904 var ExecutionEnvironment = __webpack_require__(52); 17689 var ExecutionEnvironment = __webpack_require__(51);
17905 var PooledClass = __webpack_require__(8); 17690 var PooledClass = __webpack_require__(8);
17906 var ReactDOMComponentTree = __webpack_require__(39); 17691 var ReactDOMComponentTree = __webpack_require__(38);
17907 var ReactUpdates = __webpack_require__(59); 17692 var ReactUpdates = __webpack_require__(58);
17908 17693
17909 var getEventTarget = __webpack_require__(73); 17694 var getEventTarget = __webpack_require__(72);
17910 var getUnboundedScrollPosition = __webpack_require__(146); 17695 var getUnboundedScrollPosition = __webpack_require__(141);
17911 17696
17912 /** 17697 /**
17913 * Find the deepest React component completely containing the root of the 17698 * Find the deepest React component completely containing the root of the
@@ -18044,7 +17829,7 @@
18044 module.exports = ReactEventListener; 17829 module.exports = ReactEventListener;
18045 17830
18046/***/ }, 17831/***/ },
18047/* 145 */ 17832/* 140 */
18048/***/ function(module, exports, __webpack_require__) { 17833/***/ function(module, exports, __webpack_require__) {
18049 17834
18050 /* WEBPACK VAR INJECTION */(function(process) {'use strict'; 17835 /* WEBPACK VAR INJECTION */(function(process) {'use strict';
@@ -18133,7 +17918,7 @@
18133 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 17918 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
18134 17919
18135/***/ }, 17920/***/ },
18136/* 146 */ 17921/* 141 */
18137/***/ function(module, exports) { 17922/***/ function(module, exports) {
18138 17923
18139 /** 17924 /**
@@ -18176,7 +17961,7 @@
18176 module.exports = getUnboundedScrollPosition; 17961 module.exports = getUnboundedScrollPosition;
18177 17962
18178/***/ }, 17963/***/ },
18179/* 147 */ 17964/* 142 */
18180/***/ function(module, exports, __webpack_require__) { 17965/***/ function(module, exports, __webpack_require__) {
18181 17966
18182 /** 17967 /**
@@ -18192,15 +17977,15 @@
18192 17977
18193 'use strict'; 17978 'use strict';
18194 17979
18195 var DOMProperty = __webpack_require__(40); 17980 var DOMProperty = __webpack_require__(39);
18196 var EventPluginHub = __webpack_require__(46); 17981 var EventPluginHub = __webpack_require__(45);
18197 var EventPluginUtils = __webpack_require__(48); 17982 var EventPluginUtils = __webpack_require__(47);
18198 var ReactComponentEnvironment = __webpack_require__(125); 17983 var ReactComponentEnvironment = __webpack_require__(120);
18199 var ReactClass = __webpack_require__(23); 17984 var ReactClass = __webpack_require__(23);
18200 var ReactEmptyComponent = __webpack_require__(133); 17985 var ReactEmptyComponent = __webpack_require__(128);
18201 var ReactBrowserEventEmitter = __webpack_require__(114); 17986 var ReactBrowserEventEmitter = __webpack_require__(109);
18202 var ReactHostComponent = __webpack_require__(134); 17987 var ReactHostComponent = __webpack_require__(129);
18203 var ReactUpdates = __webpack_require__(59); 17988 var ReactUpdates = __webpack_require__(58);
18204 17989
18205 var ReactInjection = { 17990 var ReactInjection = {
18206 Component: ReactComponentEnvironment.injection, 17991 Component: ReactComponentEnvironment.injection,
@@ -18217,7 +18002,7 @@
18217 module.exports = ReactInjection; 18002 module.exports = ReactInjection;
18218 18003
18219/***/ }, 18004/***/ },
18220/* 148 */ 18005/* 143 */
18221/***/ function(module, exports, __webpack_require__) { 18006/***/ function(module, exports, __webpack_require__) {
18222 18007
18223 /* WEBPACK VAR INJECTION */(function(process) {/** 18008 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -18235,13 +18020,13 @@
18235 18020
18236 var _assign = __webpack_require__(6); 18021 var _assign = __webpack_require__(6);
18237 18022
18238 var CallbackQueue = __webpack_require__(60); 18023 var CallbackQueue = __webpack_require__(59);
18239 var PooledClass = __webpack_require__(8); 18024 var PooledClass = __webpack_require__(8);
18240 var ReactBrowserEventEmitter = __webpack_require__(114); 18025 var ReactBrowserEventEmitter = __webpack_require__(109);
18241 var ReactInputSelection = __webpack_require__(149); 18026 var ReactInputSelection = __webpack_require__(144);
18242 var ReactInstrumentation = __webpack_require__(65); 18027 var ReactInstrumentation = __webpack_require__(64);
18243 var Transaction = __webpack_require__(72); 18028 var Transaction = __webpack_require__(71);
18244 var ReactUpdateQueue = __webpack_require__(138); 18029 var ReactUpdateQueue = __webpack_require__(133);
18245 18030
18246 /** 18031 /**
18247 * Ensures that, when possible, the selection range (currently selected text 18032 * Ensures that, when possible, the selection range (currently selected text
@@ -18401,7 +18186,7 @@
18401 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 18186 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
18402 18187
18403/***/ }, 18188/***/ },
18404/* 149 */ 18189/* 144 */
18405/***/ function(module, exports, __webpack_require__) { 18190/***/ function(module, exports, __webpack_require__) {
18406 18191
18407 /** 18192 /**
@@ -18417,11 +18202,11 @@
18417 18202
18418 'use strict'; 18203 'use strict';
18419 18204
18420 var ReactDOMSelection = __webpack_require__(150); 18205 var ReactDOMSelection = __webpack_require__(145);
18421 18206
18422 var containsNode = __webpack_require__(152); 18207 var containsNode = __webpack_require__(147);
18423 var focusNode = __webpack_require__(99); 18208 var focusNode = __webpack_require__(98);
18424 var getActiveElement = __webpack_require__(155); 18209 var getActiveElement = __webpack_require__(150);
18425 18210
18426 function isInDocument(node) { 18211 function isInDocument(node) {
18427 return containsNode(document.documentElement, node); 18212 return containsNode(document.documentElement, node);
@@ -18530,7 +18315,7 @@
18530 module.exports = ReactInputSelection; 18315 module.exports = ReactInputSelection;
18531 18316
18532/***/ }, 18317/***/ },
18533/* 150 */ 18318/* 145 */
18534/***/ function(module, exports, __webpack_require__) { 18319/***/ function(module, exports, __webpack_require__) {
18535 18320
18536 /** 18321 /**
@@ -18546,10 +18331,10 @@
18546 18331
18547 'use strict'; 18332 'use strict';
18548 18333
18549 var ExecutionEnvironment = __webpack_require__(52); 18334 var ExecutionEnvironment = __webpack_require__(51);
18550 18335
18551 var getNodeForCharacterOffset = __webpack_require__(151); 18336 var getNodeForCharacterOffset = __webpack_require__(146);
18552 var getTextContentAccessor = __webpack_require__(54); 18337 var getTextContentAccessor = __webpack_require__(53);
18553 18338
18554 /** 18339 /**
18555 * While `isCollapsed` is available on the Selection object and `collapsed` 18340 * While `isCollapsed` is available on the Selection object and `collapsed`
@@ -18747,7 +18532,7 @@
18747 module.exports = ReactDOMSelection; 18532 module.exports = ReactDOMSelection;
18748 18533
18749/***/ }, 18534/***/ },
18750/* 151 */ 18535/* 146 */
18751/***/ function(module, exports) { 18536/***/ function(module, exports) {
18752 18537
18753 /** 18538 /**
@@ -18826,7 +18611,7 @@
18826 module.exports = getNodeForCharacterOffset; 18611 module.exports = getNodeForCharacterOffset;
18827 18612
18828/***/ }, 18613/***/ },
18829/* 152 */ 18614/* 147 */
18830/***/ function(module, exports, __webpack_require__) { 18615/***/ function(module, exports, __webpack_require__) {
18831 18616
18832 'use strict'; 18617 'use strict';
@@ -18842,7 +18627,7 @@
18842 * 18627 *
18843 */ 18628 */
18844 18629
18845 var isTextNode = __webpack_require__(153); 18630 var isTextNode = __webpack_require__(148);
18846 18631
18847 /*eslint-disable no-bitwise */ 18632 /*eslint-disable no-bitwise */
18848 18633
@@ -18870,7 +18655,7 @@
18870 module.exports = containsNode; 18655 module.exports = containsNode;
18871 18656
18872/***/ }, 18657/***/ },
18873/* 153 */ 18658/* 148 */
18874/***/ function(module, exports, __webpack_require__) { 18659/***/ function(module, exports, __webpack_require__) {
18875 18660
18876 'use strict'; 18661 'use strict';
@@ -18886,7 +18671,7 @@
18886 * @typechecks 18671 * @typechecks
18887 */ 18672 */
18888 18673
18889 var isNode = __webpack_require__(154); 18674 var isNode = __webpack_require__(149);
18890 18675
18891 /** 18676 /**
18892 * @param {*} object The object to check. 18677 * @param {*} object The object to check.
@@ -18899,7 +18684,7 @@
18899 module.exports = isTextNode; 18684 module.exports = isTextNode;
18900 18685
18901/***/ }, 18686/***/ },
18902/* 154 */ 18687/* 149 */
18903/***/ function(module, exports) { 18688/***/ function(module, exports) {
18904 18689
18905 'use strict'; 18690 'use strict';
@@ -18926,7 +18711,7 @@
18926 module.exports = isNode; 18711 module.exports = isNode;
18927 18712
18928/***/ }, 18713/***/ },
18929/* 155 */ 18714/* 150 */
18930/***/ function(module, exports) { 18715/***/ function(module, exports) {
18931 18716
18932 'use strict'; 18717 'use strict';
@@ -18965,7 +18750,7 @@
18965 module.exports = getActiveElement; 18750 module.exports = getActiveElement;
18966 18751
18967/***/ }, 18752/***/ },
18968/* 156 */ 18753/* 151 */
18969/***/ function(module, exports) { 18754/***/ function(module, exports) {
18970 18755
18971 /** 18756 /**
@@ -19272,7 +19057,7 @@
19272 module.exports = SVGDOMPropertyConfig; 19057 module.exports = SVGDOMPropertyConfig;
19273 19058
19274/***/ }, 19059/***/ },
19275/* 157 */ 19060/* 152 */
19276/***/ function(module, exports, __webpack_require__) { 19061/***/ function(module, exports, __webpack_require__) {
19277 19062
19278 /** 19063 /**
@@ -19288,17 +19073,17 @@
19288 19073
19289 'use strict'; 19074 'use strict';
19290 19075
19291 var EventConstants = __webpack_require__(44); 19076 var EventConstants = __webpack_require__(43);
19292 var EventPropagators = __webpack_require__(45); 19077 var EventPropagators = __webpack_require__(44);
19293 var ExecutionEnvironment = __webpack_require__(52); 19078 var ExecutionEnvironment = __webpack_require__(51);
19294 var ReactDOMComponentTree = __webpack_require__(39); 19079 var ReactDOMComponentTree = __webpack_require__(38);
19295 var ReactInputSelection = __webpack_require__(149); 19080 var ReactInputSelection = __webpack_require__(144);
19296 var SyntheticEvent = __webpack_require__(56); 19081 var SyntheticEvent = __webpack_require__(55);
19297 19082
19298 var getActiveElement = __webpack_require__(155); 19083 var getActiveElement = __webpack_require__(150);
19299 var isTextInputElement = __webpack_require__(75); 19084 var isTextInputElement = __webpack_require__(74);
19300 var keyOf = __webpack_require__(27); 19085 var keyOf = __webpack_require__(27);
19301 var shallowEqual = __webpack_require__(131); 19086 var shallowEqual = __webpack_require__(126);
19302 19087
19303 var topLevelTypes = EventConstants.topLevelTypes; 19088 var topLevelTypes = EventConstants.topLevelTypes;
19304 19089
@@ -19310,7 +19095,7 @@
19310 bubbled: keyOf({ onSelect: null }), 19095 bubbled: keyOf({ onSelect: null }),
19311 captured: keyOf({ onSelectCapture: null }) 19096 captured: keyOf({ onSelectCapture: null })
19312 }, 19097 },
19313 dependencies: [topLevelTypes.topBlur, topLevelTypes.topContextMenu, topLevelTypes.topFocus, topLevelTypes.topKeyDown, topLevelTypes.topMouseDown, topLevelTypes.topMouseUp, topLevelTypes.topSelectionChange] 19098 dependencies: [topLevelTypes.topBlur, topLevelTypes.topContextMenu, topLevelTypes.topFocus, topLevelTypes.topKeyDown, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown, topLevelTypes.topMouseUp, topLevelTypes.topSelectionChange]
19314 } 19099 }
19315 }; 19100 };
19316 19101
@@ -19473,7 +19258,7 @@
19473 module.exports = SelectEventPlugin; 19258 module.exports = SelectEventPlugin;
19474 19259
19475/***/ }, 19260/***/ },
19476/* 158 */ 19261/* 153 */
19477/***/ function(module, exports, __webpack_require__) { 19262/***/ function(module, exports, __webpack_require__) {
19478 19263
19479 /* WEBPACK VAR INJECTION */(function(process) {/** 19264 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -19491,24 +19276,24 @@
19491 19276
19492 var _prodInvariant = __webpack_require__(9); 19277 var _prodInvariant = __webpack_require__(9);
19493 19278
19494 var EventConstants = __webpack_require__(44); 19279 var EventConstants = __webpack_require__(43);
19495 var EventListener = __webpack_require__(145); 19280 var EventListener = __webpack_require__(140);
19496 var EventPropagators = __webpack_require__(45); 19281 var EventPropagators = __webpack_require__(44);
19497 var ReactDOMComponentTree = __webpack_require__(39); 19282 var ReactDOMComponentTree = __webpack_require__(38);
19498 var SyntheticAnimationEvent = __webpack_require__(159); 19283 var SyntheticAnimationEvent = __webpack_require__(154);
19499 var SyntheticClipboardEvent = __webpack_require__(160); 19284 var SyntheticClipboardEvent = __webpack_require__(155);
19500 var SyntheticEvent = __webpack_require__(56); 19285 var SyntheticEvent = __webpack_require__(55);
19501 var SyntheticFocusEvent = __webpack_require__(161); 19286 var SyntheticFocusEvent = __webpack_require__(156);
19502 var SyntheticKeyboardEvent = __webpack_require__(162); 19287 var SyntheticKeyboardEvent = __webpack_require__(157);
19503 var SyntheticMouseEvent = __webpack_require__(78); 19288 var SyntheticMouseEvent = __webpack_require__(77);
19504 var SyntheticDragEvent = __webpack_require__(165); 19289 var SyntheticDragEvent = __webpack_require__(160);
19505 var SyntheticTouchEvent = __webpack_require__(166); 19290 var SyntheticTouchEvent = __webpack_require__(161);
19506 var SyntheticTransitionEvent = __webpack_require__(167); 19291 var SyntheticTransitionEvent = __webpack_require__(162);
19507 var SyntheticUIEvent = __webpack_require__(79); 19292 var SyntheticUIEvent = __webpack_require__(78);
19508 var SyntheticWheelEvent = __webpack_require__(168); 19293 var SyntheticWheelEvent = __webpack_require__(163);
19509 19294
19510 var emptyFunction = __webpack_require__(14); 19295 var emptyFunction = __webpack_require__(14);
19511 var getEventCharCode = __webpack_require__(163); 19296 var getEventCharCode = __webpack_require__(158);
19512 var invariant = __webpack_require__(10); 19297 var invariant = __webpack_require__(10);
19513 var keyOf = __webpack_require__(27); 19298 var keyOf = __webpack_require__(27);
19514 19299
@@ -19964,6 +19749,8 @@
19964 var onClickListeners = {}; 19749 var onClickListeners = {};
19965 19750
19966 function getDictionaryKey(inst) { 19751 function getDictionaryKey(inst) {
19752 // Prevents V8 performance issue:
19753 // https://github.com/facebook/react/pull/7232
19967 return '.' + inst._rootNodeID; 19754 return '.' + inst._rootNodeID;
19968 } 19755 }
19969 19756
@@ -20112,7 +19899,7 @@
20112 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 19899 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
20113 19900
20114/***/ }, 19901/***/ },
20115/* 159 */ 19902/* 154 */
20116/***/ function(module, exports, __webpack_require__) { 19903/***/ function(module, exports, __webpack_require__) {
20117 19904
20118 /** 19905 /**
@@ -20128,7 +19915,7 @@
20128 19915
20129 'use strict'; 19916 'use strict';
20130 19917
20131 var SyntheticEvent = __webpack_require__(56); 19918 var SyntheticEvent = __webpack_require__(55);
20132 19919
20133 /** 19920 /**
20134 * @interface Event 19921 * @interface Event
@@ -20156,7 +19943,7 @@
20156 module.exports = SyntheticAnimationEvent; 19943 module.exports = SyntheticAnimationEvent;
20157 19944
20158/***/ }, 19945/***/ },
20159/* 160 */ 19946/* 155 */
20160/***/ function(module, exports, __webpack_require__) { 19947/***/ function(module, exports, __webpack_require__) {
20161 19948
20162 /** 19949 /**
@@ -20172,7 +19959,7 @@
20172 19959
20173 'use strict'; 19960 'use strict';
20174 19961
20175 var SyntheticEvent = __webpack_require__(56); 19962 var SyntheticEvent = __webpack_require__(55);
20176 19963
20177 /** 19964 /**
20178 * @interface Event 19965 * @interface Event
@@ -20199,7 +19986,7 @@
20199 module.exports = SyntheticClipboardEvent; 19986 module.exports = SyntheticClipboardEvent;
20200 19987
20201/***/ }, 19988/***/ },
20202/* 161 */ 19989/* 156 */
20203/***/ function(module, exports, __webpack_require__) { 19990/***/ function(module, exports, __webpack_require__) {
20204 19991
20205 /** 19992 /**
@@ -20215,7 +20002,7 @@
20215 20002
20216 'use strict'; 20003 'use strict';
20217 20004
20218 var SyntheticUIEvent = __webpack_require__(79); 20005 var SyntheticUIEvent = __webpack_require__(78);
20219 20006
20220 /** 20007 /**
20221 * @interface FocusEvent 20008 * @interface FocusEvent
@@ -20240,7 +20027,7 @@
20240 module.exports = SyntheticFocusEvent; 20027 module.exports = SyntheticFocusEvent;
20241 20028
20242/***/ }, 20029/***/ },
20243/* 162 */ 20030/* 157 */
20244/***/ function(module, exports, __webpack_require__) { 20031/***/ function(module, exports, __webpack_require__) {
20245 20032
20246 /** 20033 /**
@@ -20256,11 +20043,11 @@
20256 20043
20257 'use strict'; 20044 'use strict';
20258 20045
20259 var SyntheticUIEvent = __webpack_require__(79); 20046 var SyntheticUIEvent = __webpack_require__(78);
20260 20047
20261 var getEventCharCode = __webpack_require__(163); 20048 var getEventCharCode = __webpack_require__(158);
20262 var getEventKey = __webpack_require__(164); 20049 var getEventKey = __webpack_require__(159);
20263 var getEventModifierState = __webpack_require__(81); 20050 var getEventModifierState = __webpack_require__(80);
20264 20051
20265 /** 20052 /**
20266 * @interface KeyboardEvent 20053 * @interface KeyboardEvent
@@ -20329,7 +20116,7 @@
20329 module.exports = SyntheticKeyboardEvent; 20116 module.exports = SyntheticKeyboardEvent;
20330 20117
20331/***/ }, 20118/***/ },
20332/* 163 */ 20119/* 158 */
20333/***/ function(module, exports) { 20120/***/ function(module, exports) {
20334 20121
20335 /** 20122 /**
@@ -20384,7 +20171,7 @@
20384 module.exports = getEventCharCode; 20171 module.exports = getEventCharCode;
20385 20172
20386/***/ }, 20173/***/ },
20387/* 164 */ 20174/* 159 */
20388/***/ function(module, exports, __webpack_require__) { 20175/***/ function(module, exports, __webpack_require__) {
20389 20176
20390 /** 20177 /**
@@ -20400,7 +20187,7 @@
20400 20187
20401 'use strict'; 20188 'use strict';
20402 20189
20403 var getEventCharCode = __webpack_require__(163); 20190 var getEventCharCode = __webpack_require__(158);
20404 20191
20405 /** 20192 /**
20406 * Normalization of deprecated HTML5 `key` values 20193 * Normalization of deprecated HTML5 `key` values
@@ -20491,7 +20278,7 @@
20491 module.exports = getEventKey; 20278 module.exports = getEventKey;
20492 20279
20493/***/ }, 20280/***/ },
20494/* 165 */ 20281/* 160 */
20495/***/ function(module, exports, __webpack_require__) { 20282/***/ function(module, exports, __webpack_require__) {
20496 20283
20497 /** 20284 /**
@@ -20507,7 +20294,7 @@
20507 20294
20508 'use strict'; 20295 'use strict';
20509 20296
20510 var SyntheticMouseEvent = __webpack_require__(78); 20297 var SyntheticMouseEvent = __webpack_require__(77);
20511 20298
20512 /** 20299 /**
20513 * @interface DragEvent 20300 * @interface DragEvent
@@ -20532,7 +20319,7 @@
20532 module.exports = SyntheticDragEvent; 20319 module.exports = SyntheticDragEvent;
20533 20320
20534/***/ }, 20321/***/ },
20535/* 166 */ 20322/* 161 */
20536/***/ function(module, exports, __webpack_require__) { 20323/***/ function(module, exports, __webpack_require__) {
20537 20324
20538 /** 20325 /**
@@ -20548,9 +20335,9 @@
20548 20335
20549 'use strict'; 20336 'use strict';
20550 20337
20551 var SyntheticUIEvent = __webpack_require__(79); 20338 var SyntheticUIEvent = __webpack_require__(78);
20552 20339
20553 var getEventModifierState = __webpack_require__(81); 20340 var getEventModifierState = __webpack_require__(80);
20554 20341
20555 /** 20342 /**
20556 * @interface TouchEvent 20343 * @interface TouchEvent
@@ -20582,7 +20369,7 @@
20582 module.exports = SyntheticTouchEvent; 20369 module.exports = SyntheticTouchEvent;
20583 20370
20584/***/ }, 20371/***/ },
20585/* 167 */ 20372/* 162 */
20586/***/ function(module, exports, __webpack_require__) { 20373/***/ function(module, exports, __webpack_require__) {
20587 20374
20588 /** 20375 /**
@@ -20598,7 +20385,7 @@
20598 20385
20599 'use strict'; 20386 'use strict';
20600 20387
20601 var SyntheticEvent = __webpack_require__(56); 20388 var SyntheticEvent = __webpack_require__(55);
20602 20389
20603 /** 20390 /**
20604 * @interface Event 20391 * @interface Event
@@ -20626,7 +20413,7 @@
20626 module.exports = SyntheticTransitionEvent; 20413 module.exports = SyntheticTransitionEvent;
20627 20414
20628/***/ }, 20415/***/ },
20629/* 168 */ 20416/* 163 */
20630/***/ function(module, exports, __webpack_require__) { 20417/***/ function(module, exports, __webpack_require__) {
20631 20418
20632 /** 20419 /**
@@ -20642,7 +20429,7 @@
20642 20429
20643 'use strict'; 20430 'use strict';
20644 20431
20645 var SyntheticMouseEvent = __webpack_require__(78); 20432 var SyntheticMouseEvent = __webpack_require__(77);
20646 20433
20647 /** 20434 /**
20648 * @interface WheelEvent 20435 * @interface WheelEvent
@@ -20685,7 +20472,7 @@
20685 module.exports = SyntheticWheelEvent; 20472 module.exports = SyntheticWheelEvent;
20686 20473
20687/***/ }, 20474/***/ },
20688/* 169 */ 20475/* 164 */
20689/***/ function(module, exports, __webpack_require__) { 20476/***/ function(module, exports, __webpack_require__) {
20690 20477
20691 /* WEBPACK VAR INJECTION */(function(process) {/** 20478 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -20703,27 +20490,27 @@
20703 20490
20704 var _prodInvariant = __webpack_require__(9); 20491 var _prodInvariant = __webpack_require__(9);
20705 20492
20706 var DOMLazyTree = __webpack_require__(85); 20493 var DOMLazyTree = __webpack_require__(84);
20707 var DOMProperty = __webpack_require__(40); 20494 var DOMProperty = __webpack_require__(39);
20708 var ReactBrowserEventEmitter = __webpack_require__(114); 20495 var ReactBrowserEventEmitter = __webpack_require__(109);
20709 var ReactCurrentOwner = __webpack_require__(12); 20496 var ReactCurrentOwner = __webpack_require__(12);
20710 var ReactDOMComponentTree = __webpack_require__(39); 20497 var ReactDOMComponentTree = __webpack_require__(38);
20711 var ReactDOMContainerInfo = __webpack_require__(170); 20498 var ReactDOMContainerInfo = __webpack_require__(165);
20712 var ReactDOMFeatureFlags = __webpack_require__(171); 20499 var ReactDOMFeatureFlags = __webpack_require__(166);
20713 var ReactElement = __webpack_require__(11); 20500 var ReactElement = __webpack_require__(11);
20714 var ReactFeatureFlags = __webpack_require__(61); 20501 var ReactFeatureFlags = __webpack_require__(60);
20715 var ReactInstanceMap = __webpack_require__(126); 20502 var ReactInstanceMap = __webpack_require__(121);
20716 var ReactInstrumentation = __webpack_require__(65); 20503 var ReactInstrumentation = __webpack_require__(64);
20717 var ReactMarkupChecksum = __webpack_require__(172); 20504 var ReactMarkupChecksum = __webpack_require__(167);
20718 var ReactReconciler = __webpack_require__(62); 20505 var ReactReconciler = __webpack_require__(61);
20719 var ReactUpdateQueue = __webpack_require__(138); 20506 var ReactUpdateQueue = __webpack_require__(133);
20720 var ReactUpdates = __webpack_require__(59); 20507 var ReactUpdates = __webpack_require__(58);
20721 20508
20722 var emptyObject = __webpack_require__(21); 20509 var emptyObject = __webpack_require__(21);
20723 var instantiateReactComponent = __webpack_require__(128); 20510 var instantiateReactComponent = __webpack_require__(123);
20724 var invariant = __webpack_require__(10); 20511 var invariant = __webpack_require__(10);
20725 var setInnerHTML = __webpack_require__(87); 20512 var setInnerHTML = __webpack_require__(86);
20726 var shouldUpdateReactComponent = __webpack_require__(132); 20513 var shouldUpdateReactComponent = __webpack_require__(127);
20727 var warning = __webpack_require__(13); 20514 var warning = __webpack_require__(13);
20728 20515
20729 var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; 20516 var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
@@ -20792,7 +20579,8 @@
20792 console.time(markerName); 20579 console.time(markerName);
20793 } 20580 }
20794 20581
20795 var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context); 20582 var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context, 0 /* parentDebugID */
20583 );
20796 20584
20797 if (markerName) { 20585 if (markerName) {
20798 console.timeEnd(markerName); 20586 console.timeEnd(markerName);
@@ -20863,6 +20651,41 @@
20863 } 20651 }
20864 } 20652 }
20865 20653
20654 /**
20655 * True if the supplied DOM node is a React DOM element and
20656 * it has been rendered by another copy of React.
20657 *
20658 * @param {?DOMElement} node The candidate DOM node.
20659 * @return {boolean} True if the DOM has been rendered by another copy of React
20660 * @internal
20661 */
20662 function nodeIsRenderedByOtherInstance(container) {
20663 var rootEl = getReactRootElementInContainer(container);
20664 return !!(rootEl && isReactNode(rootEl) && !ReactDOMComponentTree.getInstanceFromNode(rootEl));
20665 }
20666
20667 /**
20668 * True if the supplied DOM node is a valid node element.
20669 *
20670 * @param {?DOMElement} node The candidate DOM node.
20671 * @return {boolean} True if the DOM is a valid DOM node.
20672 * @internal
20673 */
20674 function isValidContainer(node) {
20675 return !!(node && (node.nodeType === ELEMENT_NODE_TYPE || node.nodeType === DOC_NODE_TYPE || node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE));
20676 }
20677
20678 /**
20679 * True if the supplied DOM node is a valid React node element.
20680 *
20681 * @param {?DOMElement} node The candidate DOM node.
20682 * @return {boolean} True if the DOM is a valid React DOM node.
20683 * @internal
20684 */
20685 function isReactNode(node) {
20686 return isValidContainer(node) && (node.hasAttribute(ROOT_ATTR_NAME) || node.hasAttribute(ATTR_NAME));
20687 }
20688
20866 function getHostRootInstanceInContainer(container) { 20689 function getHostRootInstanceInContainer(container) {
20867 var rootEl = getReactRootElementInContainer(container); 20690 var rootEl = getReactRootElementInContainer(container);
20868 var prevHostInstance = rootEl && ReactDOMComponentTree.getInstanceFromNode(rootEl); 20691 var prevHostInstance = rootEl && ReactDOMComponentTree.getInstanceFromNode(rootEl);
@@ -20950,7 +20773,7 @@
20950 }, 20773 },
20951 20774
20952 /** 20775 /**
20953 * Render a new component into the DOM. Hooked by devtools! 20776 * Render a new component into the DOM. Hooked by hooks!
20954 * 20777 *
20955 * @param {ReactElement} nextElement element to render 20778 * @param {ReactElement} nextElement element to render
20956 * @param {DOMElement} container container to render into 20779 * @param {DOMElement} container container to render into
@@ -20963,7 +20786,7 @@
20963 // verify that that's the case. 20786 // verify that that's the case.
20964 process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '_renderNewRootComponent(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from ' + 'render is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0; 20787 process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '_renderNewRootComponent(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from ' + 'render is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0;
20965 20788
20966 !(container && (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE || container.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '_registerComponent(...): Target container is not a DOM element.') : _prodInvariant('37') : void 0; 20789 !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, '_registerComponent(...): Target container is not a DOM element.') : _prodInvariant('37') : void 0;
20967 20790
20968 ReactBrowserEventEmitter.ensureScrollValueMonitoring(); 20791 ReactBrowserEventEmitter.ensureScrollValueMonitoring();
20969 var componentInstance = instantiateReactComponent(nextElement, false); 20792 var componentInstance = instantiateReactComponent(nextElement, false);
@@ -20977,11 +20800,6 @@
20977 var wrapperID = componentInstance._instance.rootID; 20800 var wrapperID = componentInstance._instance.rootID;
20978 instancesByReactRootID[wrapperID] = componentInstance; 20801 instancesByReactRootID[wrapperID] = componentInstance;
20979 20802
20980 if (process.env.NODE_ENV !== 'production') {
20981 // The instance here is TopLevelWrapper so we report mount for its child.
20982 ReactInstrumentation.debugTool.onMountRootComponent(componentInstance._renderedComponent._debugID);
20983 }
20984
20985 return componentInstance; 20803 return componentInstance;
20986 }, 20804 },
20987 20805
@@ -21097,7 +20915,11 @@
21097 // render but we still don't expect to be in a render call here.) 20915 // render but we still don't expect to be in a render call here.)
21098 process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, 'unmountComponentAtNode(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from render ' + 'is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0; 20916 process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, 'unmountComponentAtNode(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from render ' + 'is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0;
21099 20917
21100 !(container && (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE || container.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : _prodInvariant('40') : void 0; 20918 !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : _prodInvariant('40') : void 0;
20919
20920 if (process.env.NODE_ENV !== 'production') {
20921 process.env.NODE_ENV !== 'production' ? warning(!nodeIsRenderedByOtherInstance(container), 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by another copy of React.') : void 0;
20922 }
21101 20923
21102 var prevComponent = getTopLevelWrapperInContainer(container); 20924 var prevComponent = getTopLevelWrapperInContainer(container);
21103 if (!prevComponent) { 20925 if (!prevComponent) {
@@ -21120,7 +20942,7 @@
21120 }, 20942 },
21121 20943
21122 _mountImageIntoNode: function (markup, container, instance, shouldReuseMarkup, transaction) { 20944 _mountImageIntoNode: function (markup, container, instance, shouldReuseMarkup, transaction) {
21123 !(container && (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE || container.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mountComponentIntoNode(...): Target container is not valid.') : _prodInvariant('41') : void 0; 20945 !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mountComponentIntoNode(...): Target container is not valid.') : _prodInvariant('41') : void 0;
21124 20946
21125 if (shouldReuseMarkup) { 20947 if (shouldReuseMarkup) {
21126 var rootElement = getReactRootElementInContainer(container); 20948 var rootElement = getReactRootElementInContainer(container);
@@ -21190,7 +21012,7 @@
21190 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 21012 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
21191 21013
21192/***/ }, 21014/***/ },
21193/* 170 */ 21015/* 165 */
21194/***/ function(module, exports, __webpack_require__) { 21016/***/ function(module, exports, __webpack_require__) {
21195 21017
21196 /* WEBPACK VAR INJECTION */(function(process) {/** 21018 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -21206,7 +21028,7 @@
21206 21028
21207 'use strict'; 21029 'use strict';
21208 21030
21209 var validateDOMNesting = __webpack_require__(139); 21031 var validateDOMNesting = __webpack_require__(134);
21210 21032
21211 var DOC_NODE_TYPE = 9; 21033 var DOC_NODE_TYPE = 9;
21212 21034
@@ -21229,7 +21051,7 @@
21229 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 21051 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
21230 21052
21231/***/ }, 21053/***/ },
21232/* 171 */ 21054/* 166 */
21233/***/ function(module, exports) { 21055/***/ function(module, exports) {
21234 21056
21235 /** 21057 /**
@@ -21252,7 +21074,7 @@
21252 module.exports = ReactDOMFeatureFlags; 21074 module.exports = ReactDOMFeatureFlags;
21253 21075
21254/***/ }, 21076/***/ },
21255/* 172 */ 21077/* 167 */
21256/***/ function(module, exports, __webpack_require__) { 21078/***/ function(module, exports, __webpack_require__) {
21257 21079
21258 /** 21080 /**
@@ -21268,7 +21090,7 @@
21268 21090
21269 'use strict'; 21091 'use strict';
21270 21092
21271 var adler32 = __webpack_require__(173); 21093 var adler32 = __webpack_require__(168);
21272 21094
21273 var TAG_END = /\/?>/; 21095 var TAG_END = /\/?>/;
21274 var COMMENT_START = /^<\!\-\-/; 21096 var COMMENT_START = /^<\!\-\-/;
@@ -21307,7 +21129,7 @@
21307 module.exports = ReactMarkupChecksum; 21129 module.exports = ReactMarkupChecksum;
21308 21130
21309/***/ }, 21131/***/ },
21310/* 173 */ 21132/* 168 */
21311/***/ function(module, exports) { 21133/***/ function(module, exports) {
21312 21134
21313 /** 21135 /**
@@ -21356,7 +21178,7 @@
21356 module.exports = adler32; 21178 module.exports = adler32;
21357 21179
21358/***/ }, 21180/***/ },
21359/* 174 */ 21181/* 169 */
21360/***/ function(module, exports, __webpack_require__) { 21182/***/ function(module, exports, __webpack_require__) {
21361 21183
21362 /* WEBPACK VAR INJECTION */(function(process) {/** 21184 /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -21375,10 +21197,10 @@
21375 var _prodInvariant = __webpack_require__(9); 21197 var _prodInvariant = __webpack_require__(9);
21376 21198
21377 var ReactCurrentOwner = __webpack_require__(12); 21199 var ReactCurrentOwner = __webpack_require__(12);
21378 var ReactDOMComponentTree = __webpack_require__(39); 21200 var ReactDOMComponentTree = __webpack_require__(38);
21379 var ReactInstanceMap = __webpack_require__(126); 21201 var ReactInstanceMap = __webpack_require__(121);
21380 21202
21381 var getHostComponentFromComposite = __webpack_require__(175); 21203 var getHostComponentFromComposite = __webpack_require__(170);
21382 var invariant = __webpack_require__(10); 21204 var invariant = __webpack_require__(10);
21383 var warning = __webpack_require__(13); 21205 var warning = __webpack_require__(13);
21384 21206
@@ -21422,7 +21244,7 @@
21422 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) 21244 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
21423 21245
21424/***/ }, 21246/***/ },
21425/* 175 */ 21247/* 170 */
21426/***/ function(module, exports, __webpack_require__) { 21248/***/ function(module, exports, __webpack_require__) {
21427 21249
21428 /** 21250 /**
@@ -21438,7 +21260,7 @@
21438 21260
21439 'use strict'; 21261 'use strict';
21440 21262
21441 var ReactNodeTypes = __webpack_require__(130); 21263 var ReactNodeTypes = __webpack_require__(125);
21442 21264
21443 function getHostComponentFromComposite(inst) { 21265 function getHostComponentFromComposite(inst) {
21444 var type; 21266 var type;
@@ -21457,7 +21279,7 @@
21457 module.exports = getHostComponentFromComposite; 21279 module.exports = getHostComponentFromComposite;
21458 21280
21459/***/ }, 21281/***/ },
21460/* 176 */ 21282/* 171 */
21461/***/ function(module, exports, __webpack_require__) { 21283/***/ function(module, exports, __webpack_require__) {
21462 21284
21463 /** 21285 /**
@@ -21473,16 +21295,183 @@
21473 21295
21474 'use strict'; 21296 'use strict';
21475 21297
21476 var ReactMount = __webpack_require__(169); 21298 var ReactMount = __webpack_require__(164);
21477 21299
21478 module.exports = ReactMount.renderSubtreeIntoContainer; 21300 module.exports = ReactMount.renderSubtreeIntoContainer;
21479 21301
21480/***/ }, 21302/***/ },
21481/* 177 */ 21303/* 172 */
21304/***/ function(module, exports, __webpack_require__) {
21305
21306 /* WEBPACK VAR INJECTION */(function(process) {/**
21307 * Copyright 2013-present, Facebook, Inc.
21308 * All rights reserved.
21309 *
21310 * This source code is licensed under the BSD-style license found in the
21311 * LICENSE file in the root directory of this source tree. An additional grant
21312 * of patent rights can be found in the PATENTS file in the same directory.
21313 *
21314 * @providesModule ReactDOMUnknownPropertyHook
21315 */
21316
21317 'use strict';
21318
21319 var DOMProperty = __webpack_require__(39);
21320 var EventPluginRegistry = __webpack_require__(46);
21321 var ReactComponentTreeHook = __webpack_require__(30);
21322
21323 var warning = __webpack_require__(13);
21324
21325 if (process.env.NODE_ENV !== 'production') {
21326 var reactProps = {
21327 children: true,
21328 dangerouslySetInnerHTML: true,
21329 key: true,
21330 ref: true,
21331
21332 autoFocus: true,
21333 defaultValue: true,
21334 valueLink: true,
21335 defaultChecked: true,
21336 checkedLink: true,
21337 innerHTML: true,
21338 suppressContentEditableWarning: true,
21339 onFocusIn: true,
21340 onFocusOut: true
21341 };
21342 var warnedProperties = {};
21343
21344 var validateProperty = function (tagName, name, debugID) {
21345 if (DOMProperty.properties.hasOwnProperty(name) || DOMProperty.isCustomAttribute(name)) {
21346 return true;
21347 }
21348 if (reactProps.hasOwnProperty(name) && reactProps[name] || warnedProperties.hasOwnProperty(name) && warnedProperties[name]) {
21349 return true;
21350 }
21351 if (EventPluginRegistry.registrationNameModules.hasOwnProperty(name)) {
21352 return true;
21353 }
21354 warnedProperties[name] = true;
21355 var lowerCasedName = name.toLowerCase();
21356
21357 // data-* attributes should be lowercase; suggest the lowercase version
21358 var standardName = DOMProperty.isCustomAttribute(lowerCasedName) ? lowerCasedName : DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null;
21359
21360 var registrationName = EventPluginRegistry.possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? EventPluginRegistry.possibleRegistrationNames[lowerCasedName] : null;
21361
21362 if (standardName != null) {
21363 process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown DOM property %s. Did you mean %s?%s', name, standardName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
21364 return true;
21365 } else if (registrationName != null) {
21366 process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown event handler property %s. Did you mean `%s`?%s', name, registrationName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
21367 return true;
21368 } else {
21369 // We were unable to guess which prop the user intended.
21370 // It is likely that the user was just blindly spreading/forwarding props
21371 // Components should be careful to only render valid props/attributes.
21372 // Warning will be invoked in warnUnknownProperties to allow grouping.
21373 return false;
21374 }
21375 };
21376 }
21377
21378 var warnUnknownProperties = function (debugID, element) {
21379 var unknownProps = [];
21380 for (var key in element.props) {
21381 var isValid = validateProperty(element.type, key, debugID);
21382 if (!isValid) {
21383 unknownProps.push(key);
21384 }
21385 }
21386
21387 var unknownPropString = unknownProps.map(function (prop) {
21388 return '`' + prop + '`';
21389 }).join(', ');
21390
21391 if (unknownProps.length === 1) {
21392 process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown prop %s on <%s> tag. Remove this prop from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
21393 } else if (unknownProps.length > 1) {
21394 process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown props %s on <%s> tag. Remove these props from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
21395 }
21396 };
21397
21398 function handleElement(debugID, element) {
21399 if (element == null || typeof element.type !== 'string') {
21400 return;
21401 }
21402 if (element.type.indexOf('-') >= 0 || element.props.is) {
21403 return;
21404 }
21405 warnUnknownProperties(debugID, element);
21406 }
21407
21408 var ReactDOMUnknownPropertyHook = {
21409 onBeforeMountComponent: function (debugID, element) {
21410 handleElement(debugID, element);
21411 },
21412 onBeforeUpdateComponent: function (debugID, element) {
21413 handleElement(debugID, element);
21414 }
21415 };
21416
21417 module.exports = ReactDOMUnknownPropertyHook;
21418 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
21419
21420/***/ },
21421/* 173 */
21422/***/ function(module, exports, __webpack_require__) {
21423
21424 /* WEBPACK VAR INJECTION */(function(process) {/**
21425 * Copyright 2013-present, Facebook, Inc.
21426 * All rights reserved.
21427 *
21428 * This source code is licensed under the BSD-style license found in the
21429 * LICENSE file in the root directory of this source tree. An additional grant
21430 * of patent rights can be found in the PATENTS file in the same directory.
21431 *
21432 * @providesModule ReactDOMNullInputValuePropHook
21433 */
21434
21435 'use strict';
21436
21437 var ReactComponentTreeHook = __webpack_require__(30);
21438
21439 var warning = __webpack_require__(13);
21440
21441 var didWarnValueNull = false;
21442
21443 function handleElement(debugID, element) {
21444 if (element == null) {
21445 return;
21446 }
21447 if (element.type !== 'input' && element.type !== 'textarea' && element.type !== 'select') {
21448 return;
21449 }
21450 if (element.props != null && element.props.value === null && !didWarnValueNull) {
21451 process.env.NODE_ENV !== 'production' ? warning(false, '`value` prop on `%s` should not be null. ' + 'Consider using the empty string to clear the component or `undefined` ' + 'for uncontrolled components.%s', element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
21452
21453 didWarnValueNull = true;
21454 }
21455 }
21456
21457 var ReactDOMNullInputValuePropHook = {
21458 onBeforeMountComponent: function (debugID, element) {
21459 handleElement(debugID, element);
21460 },
21461 onBeforeUpdateComponent: function (debugID, element) {
21462 handleElement(debugID, element);
21463 }
21464 };
21465
21466 module.exports = ReactDOMNullInputValuePropHook;
21467 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
21468
21469/***/ },
21470/* 174 */
21482/***/ function(module, exports) { 21471/***/ function(module, exports) {
21483 21472
21484 //! moment.js 21473 //! moment.js
21485 //! version : 2.14.1 21474 //! version : 2.16.0
21486 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors 21475 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
21487 //! license : MIT 21476 //! license : MIT
21488 //! momentjs.com 21477 //! momentjs.com
@@ -21491,4194 +21480,4298 @@
21491 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : 21480 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
21492 typeof define === 'function' && define.amd ? define(factory) : 21481 typeof define === 'function' && define.amd ? define(factory) :
21493 global.moment = factory() 21482 global.moment = factory()
21494 }(this, function () { 'use strict'; 21483 }(this, (function () { 'use strict';
21495 21484
21496 var hookCallback; 21485 var hookCallback;
21497 21486
21498 function utils_hooks__hooks () { 21487 function hooks () {
21499 return hookCallback.apply(null, arguments); 21488 return hookCallback.apply(null, arguments);
21500 } 21489 }
21501 21490
21502 // This is done to register the method called with moment() 21491 // This is done to register the method called with moment()
21503 // without creating circular dependencies. 21492 // without creating circular dependencies.
21504 function setHookCallback (callback) { 21493 function setHookCallback (callback) {
21505 hookCallback = callback; 21494 hookCallback = callback;
21506 } 21495 }
21507 21496
21508 function isArray(input) { 21497 function isArray(input) {
21509 return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; 21498 return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';
21510 } 21499 }
21511 21500
21512 function isObject(input) { 21501 function isObject(input) {
21513 return Object.prototype.toString.call(input) === '[object Object]'; 21502 // IE8 will treat undefined and null as object if it wasn't for
21514 } 21503 // input != null
21504 return input != null && Object.prototype.toString.call(input) === '[object Object]';
21505 }
21515 21506
21516 function isObjectEmpty(obj) { 21507 function isObjectEmpty(obj) {
21517 var k; 21508 var k;
21518 for (k in obj) { 21509 for (k in obj) {
21519 // even if its not own property I'd still call it non-empty 21510 // even if its not own property I'd still call it non-empty
21520 return false; 21511 return false;
21521 }
21522 return true;
21523 } 21512 }
21513 return true;
21514 }
21524 21515
21525 function isDate(input) { 21516 function isNumber(input) {
21526 return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; 21517 return typeof value === 'number' || Object.prototype.toString.call(input) === '[object Number]';
21527 } 21518 }
21528 21519
21529 function map(arr, fn) { 21520 function isDate(input) {
21530 var res = [], i; 21521 return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';
21531 for (i = 0; i < arr.length; ++i) { 21522 }
21532 res.push(fn(arr[i], i));
21533 }
21534 return res;
21535 }
21536 21523
21537 function hasOwnProp(a, b) { 21524 function map(arr, fn) {
21538 return Object.prototype.hasOwnProperty.call(a, b); 21525 var res = [], i;
21526 for (i = 0; i < arr.length; ++i) {
21527 res.push(fn(arr[i], i));
21539 } 21528 }
21529 return res;
21530 }
21540 21531
21541 function extend(a, b) { 21532 function hasOwnProp(a, b) {
21542 for (var i in b) { 21533 return Object.prototype.hasOwnProperty.call(a, b);
21543 if (hasOwnProp(b, i)) { 21534 }
21544 a[i] = b[i];
21545 }
21546 }
21547
21548 if (hasOwnProp(b, 'toString')) {
21549 a.toString = b.toString;
21550 }
21551 21535
21552 if (hasOwnProp(b, 'valueOf')) { 21536 function extend(a, b) {
21553 a.valueOf = b.valueOf; 21537 for (var i in b) {
21538 if (hasOwnProp(b, i)) {
21539 a[i] = b[i];
21554 } 21540 }
21555
21556 return a;
21557 } 21541 }
21558 21542
21559 function create_utc__createUTC (input, format, locale, strict) { 21543 if (hasOwnProp(b, 'toString')) {
21560 return createLocalOrUTC(input, format, locale, strict, true).utc(); 21544 a.toString = b.toString;
21561 } 21545 }
21562 21546
21563 function defaultParsingFlags() { 21547 if (hasOwnProp(b, 'valueOf')) {
21564 // We need to deep clone this object. 21548 a.valueOf = b.valueOf;
21565 return {
21566 empty : false,
21567 unusedTokens : [],
21568 unusedInput : [],
21569 overflow : -2,
21570 charsLeftOver : 0,
21571 nullInput : false,
21572 invalidMonth : null,
21573 invalidFormat : false,
21574 userInvalidated : false,
21575 iso : false,
21576 parsedDateParts : [],
21577 meridiem : null
21578 };
21579 } 21549 }
21580 21550
21581 function getParsingFlags(m) { 21551 return a;
21582 if (m._pf == null) { 21552 }
21583 m._pf = defaultParsingFlags();
21584 }
21585 return m._pf;
21586 }
21587 21553
21588 var some; 21554 function createUTC (input, format, locale, strict) {
21589 if (Array.prototype.some) { 21555 return createLocalOrUTC(input, format, locale, strict, true).utc();
21590 some = Array.prototype.some; 21556 }
21591 } else {
21592 some = function (fun) {
21593 var t = Object(this);
21594 var len = t.length >>> 0;
21595 21557
21596 for (var i = 0; i < len; i++) { 21558 function defaultParsingFlags() {
21597 if (i in t && fun.call(this, t[i], i, t)) { 21559 // We need to deep clone this object.
21598 return true; 21560 return {
21599 } 21561 empty : false,
21600 } 21562 unusedTokens : [],
21563 unusedInput : [],
21564 overflow : -2,
21565 charsLeftOver : 0,
21566 nullInput : false,
21567 invalidMonth : null,
21568 invalidFormat : false,
21569 userInvalidated : false,
21570 iso : false,
21571 parsedDateParts : [],
21572 meridiem : null
21573 };
21574 }
21601 21575
21602 return false; 21576 function getParsingFlags(m) {
21603 }; 21577 if (m._pf == null) {
21578 m._pf = defaultParsingFlags();
21604 } 21579 }
21580 return m._pf;
21581 }
21605 21582
21606 function valid__isValid(m) { 21583 var some;
21607 if (m._isValid == null) { 21584 if (Array.prototype.some) {
21608 var flags = getParsingFlags(m); 21585 some = Array.prototype.some;
21609 var parsedParts = some.call(flags.parsedDateParts, function (i) { 21586 } else {
21610 return i != null; 21587 some = function (fun) {
21611 }); 21588 var t = Object(this);
21612 m._isValid = !isNaN(m._d.getTime()) && 21589 var len = t.length >>> 0;
21613 flags.overflow < 0 && 21590
21614 !flags.empty && 21591 for (var i = 0; i < len; i++) {
21615 !flags.invalidMonth && 21592 if (i in t && fun.call(this, t[i], i, t)) {
21616 !flags.invalidWeekday && 21593 return true;
21617 !flags.nullInput &&
21618 !flags.invalidFormat &&
21619 !flags.userInvalidated &&
21620 (!flags.meridiem || (flags.meridiem && parsedParts));
21621
21622 if (m._strict) {
21623 m._isValid = m._isValid &&
21624 flags.charsLeftOver === 0 &&
21625 flags.unusedTokens.length === 0 &&
21626 flags.bigHour === undefined;
21627 } 21594 }
21628 } 21595 }
21629 return m._isValid;
21630 }
21631 21596
21632 function valid__createInvalid (flags) { 21597 return false;
21633 var m = create_utc__createUTC(NaN); 21598 };
21634 if (flags != null) { 21599 }
21635 extend(getParsingFlags(m), flags); 21600
21601 var some$1 = some;
21602
21603 function isValid(m) {
21604 if (m._isValid == null) {
21605 var flags = getParsingFlags(m);
21606 var parsedParts = some$1.call(flags.parsedDateParts, function (i) {
21607 return i != null;
21608 });
21609 var isNowValid = !isNaN(m._d.getTime()) &&
21610 flags.overflow < 0 &&
21611 !flags.empty &&
21612 !flags.invalidMonth &&
21613 !flags.invalidWeekday &&
21614 !flags.nullInput &&
21615 !flags.invalidFormat &&
21616 !flags.userInvalidated &&
21617 (!flags.meridiem || (flags.meridiem && parsedParts));
21618
21619 if (m._strict) {
21620 isNowValid = isNowValid &&
21621 flags.charsLeftOver === 0 &&
21622 flags.unusedTokens.length === 0 &&
21623 flags.bigHour === undefined;
21624 }
21625
21626 if (Object.isFrozen == null || !Object.isFrozen(m)) {
21627 m._isValid = isNowValid;
21636 } 21628 }
21637 else { 21629 else {
21638 getParsingFlags(m).userInvalidated = true; 21630 return isNowValid;
21639 } 21631 }
21640
21641 return m;
21642 } 21632 }
21633 return m._isValid;
21634 }
21643 21635
21644 function isUndefined(input) { 21636 function createInvalid (flags) {
21645 return input === void 0; 21637 var m = createUTC(NaN);
21638 if (flags != null) {
21639 extend(getParsingFlags(m), flags);
21640 }
21641 else {
21642 getParsingFlags(m).userInvalidated = true;
21646 } 21643 }
21647 21644
21648 // Plugins that add properties should also add the key here (null value), 21645 return m;
21649 // so we can properly clone ourselves. 21646 }
21650 var momentProperties = utils_hooks__hooks.momentProperties = [];
21651 21647
21652 function copyConfig(to, from) { 21648 function isUndefined(input) {
21653 var i, prop, val; 21649 return input === void 0;
21650 }
21654 21651
21655 if (!isUndefined(from._isAMomentObject)) { 21652 // Plugins that add properties should also add the key here (null value),
21656 to._isAMomentObject = from._isAMomentObject; 21653 // so we can properly clone ourselves.
21657 } 21654 var momentProperties = hooks.momentProperties = [];
21658 if (!isUndefined(from._i)) {
21659 to._i = from._i;
21660 }
21661 if (!isUndefined(from._f)) {
21662 to._f = from._f;
21663 }
21664 if (!isUndefined(from._l)) {
21665 to._l = from._l;
21666 }
21667 if (!isUndefined(from._strict)) {
21668 to._strict = from._strict;
21669 }
21670 if (!isUndefined(from._tzm)) {
21671 to._tzm = from._tzm;
21672 }
21673 if (!isUndefined(from._isUTC)) {
21674 to._isUTC = from._isUTC;
21675 }
21676 if (!isUndefined(from._offset)) {
21677 to._offset = from._offset;
21678 }
21679 if (!isUndefined(from._pf)) {
21680 to._pf = getParsingFlags(from);
21681 }
21682 if (!isUndefined(from._locale)) {
21683 to._locale = from._locale;
21684 }
21685 21655
21686 if (momentProperties.length > 0) { 21656 function copyConfig(to, from) {
21687 for (i in momentProperties) { 21657 var i, prop, val;
21688 prop = momentProperties[i];
21689 val = from[prop];
21690 if (!isUndefined(val)) {
21691 to[prop] = val;
21692 }
21693 }
21694 }
21695 21658
21696 return to; 21659 if (!isUndefined(from._isAMomentObject)) {
21660 to._isAMomentObject = from._isAMomentObject;
21697 } 21661 }
21698 21662 if (!isUndefined(from._i)) {
21699 var updateInProgress = false; 21663 to._i = from._i;
21700
21701 // Moment prototype object
21702 function Moment(config) {
21703 copyConfig(this, config);
21704 this._d = new Date(config._d != null ? config._d.getTime() : NaN);
21705 // Prevent infinite loop in case updateOffset creates new moment
21706 // objects.
21707 if (updateInProgress === false) {
21708 updateInProgress = true;
21709 utils_hooks__hooks.updateOffset(this);
21710 updateInProgress = false;
21711 }
21712 } 21664 }
21713 21665 if (!isUndefined(from._f)) {
21714 function isMoment (obj) { 21666 to._f = from._f;
21715 return obj instanceof Moment || (obj != null && obj._isAMomentObject != null); 21667 }
21668 if (!isUndefined(from._l)) {
21669 to._l = from._l;
21670 }
21671 if (!isUndefined(from._strict)) {
21672 to._strict = from._strict;
21673 }
21674 if (!isUndefined(from._tzm)) {
21675 to._tzm = from._tzm;
21676 }
21677 if (!isUndefined(from._isUTC)) {
21678 to._isUTC = from._isUTC;
21679 }
21680 if (!isUndefined(from._offset)) {
21681 to._offset = from._offset;
21682 }
21683 if (!isUndefined(from._pf)) {
21684 to._pf = getParsingFlags(from);
21685 }
21686 if (!isUndefined(from._locale)) {
21687 to._locale = from._locale;
21716 } 21688 }
21717 21689
21718 function absFloor (number) { 21690 if (momentProperties.length > 0) {
21719 if (number < 0) { 21691 for (i in momentProperties) {
21720 // -0 -> 0 21692 prop = momentProperties[i];
21721 return Math.ceil(number) || 0; 21693 val = from[prop];
21722 } else { 21694 if (!isUndefined(val)) {
21723 return Math.floor(number); 21695 to[prop] = val;
21696 }
21724 } 21697 }
21725 } 21698 }
21726 21699
21727 function toInt(argumentForCoercion) { 21700 return to;
21728 var coercedNumber = +argumentForCoercion, 21701 }
21729 value = 0;
21730 21702
21731 if (coercedNumber !== 0 && isFinite(coercedNumber)) { 21703 var updateInProgress = false;
21732 value = absFloor(coercedNumber);
21733 }
21734 21704
21735 return value; 21705 // Moment prototype object
21706 function Moment(config) {
21707 copyConfig(this, config);
21708 this._d = new Date(config._d != null ? config._d.getTime() : NaN);
21709 // Prevent infinite loop in case updateOffset creates new moment
21710 // objects.
21711 if (updateInProgress === false) {
21712 updateInProgress = true;
21713 hooks.updateOffset(this);
21714 updateInProgress = false;
21736 } 21715 }
21716 }
21737 21717
21738 // compare two arrays, return the number of differences 21718 function isMoment (obj) {
21739 function compareArrays(array1, array2, dontConvert) { 21719 return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);
21740 var len = Math.min(array1.length, array2.length), 21720 }
21741 lengthDiff = Math.abs(array1.length - array2.length),
21742 diffs = 0,
21743 i;
21744 for (i = 0; i < len; i++) {
21745 if ((dontConvert && array1[i] !== array2[i]) ||
21746 (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
21747 diffs++;
21748 }
21749 }
21750 return diffs + lengthDiff;
21751 }
21752 21721
21753 function warn(msg) { 21722 function absFloor (number) {
21754 if (utils_hooks__hooks.suppressDeprecationWarnings === false && 21723 if (number < 0) {
21755 (typeof console !== 'undefined') && console.warn) { 21724 // -0 -> 0
21756 console.warn('Deprecation warning: ' + msg); 21725 return Math.ceil(number) || 0;
21757 } 21726 } else {
21727 return Math.floor(number);
21758 } 21728 }
21729 }
21759 21730
21760 function deprecate(msg, fn) { 21731 function toInt(argumentForCoercion) {
21761 var firstTime = true; 21732 var coercedNumber = +argumentForCoercion,
21733 value = 0;
21762 21734
21763 return extend(function () { 21735 if (coercedNumber !== 0 && isFinite(coercedNumber)) {
21764 if (utils_hooks__hooks.deprecationHandler != null) { 21736 value = absFloor(coercedNumber);
21765 utils_hooks__hooks.deprecationHandler(null, msg);
21766 }
21767 if (firstTime) {
21768 warn(msg + '\nArguments: ' + Array.prototype.slice.call(arguments).join(', ') + '\n' + (new Error()).stack);
21769 firstTime = false;
21770 }
21771 return fn.apply(this, arguments);
21772 }, fn);
21773 } 21737 }
21774 21738
21775 var deprecations = {}; 21739 return value;
21740 }
21776 21741
21777 function deprecateSimple(name, msg) { 21742 // compare two arrays, return the number of differences
21778 if (utils_hooks__hooks.deprecationHandler != null) { 21743 function compareArrays(array1, array2, dontConvert) {
21779 utils_hooks__hooks.deprecationHandler(name, msg); 21744 var len = Math.min(array1.length, array2.length),
21780 } 21745 lengthDiff = Math.abs(array1.length - array2.length),
21781 if (!deprecations[name]) { 21746 diffs = 0,
21782 warn(msg); 21747 i;
21783 deprecations[name] = true; 21748 for (i = 0; i < len; i++) {
21749 if ((dontConvert && array1[i] !== array2[i]) ||
21750 (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
21751 diffs++;
21784 } 21752 }
21785 } 21753 }
21754 return diffs + lengthDiff;
21755 }
21786 21756
21787 utils_hooks__hooks.suppressDeprecationWarnings = false; 21757 function warn(msg) {
21788 utils_hooks__hooks.deprecationHandler = null; 21758 if (hooks.suppressDeprecationWarnings === false &&
21789 21759 (typeof console !== 'undefined') && console.warn) {
21790 function isFunction(input) { 21760 console.warn('Deprecation warning: ' + msg);
21791 return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
21792 } 21761 }
21762 }
21793 21763
21794 function locale_set__set (config) { 21764 function deprecate(msg, fn) {
21795 var prop, i; 21765 var firstTime = true;
21796 for (i in config) { 21766
21797 prop = config[i]; 21767 return extend(function () {
21798 if (isFunction(prop)) { 21768 if (hooks.deprecationHandler != null) {
21799 this[i] = prop; 21769 hooks.deprecationHandler(null, msg);
21800 } else {
21801 this['_' + i] = prop;
21802 }
21803 } 21770 }
21804 this._config = config; 21771 if (firstTime) {
21805 // Lenient ordinal parsing accepts just a number in addition to 21772 var args = [];
21806 // number + (possibly) stuff coming from _ordinalParseLenient. 21773 var arg;
21807 this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\d{1,2}/).source); 21774 for (var i = 0; i < arguments.length; i++) {
21808 } 21775 arg = '';
21809 21776 if (typeof arguments[i] === 'object') {
21810 function mergeConfigs(parentConfig, childConfig) { 21777 arg += '\n[' + i + '] ';
21811 var res = extend({}, parentConfig), prop; 21778 for (var key in arguments[0]) {
21812 for (prop in childConfig) { 21779 arg += key + ': ' + arguments[0][key] + ', ';
21813 if (hasOwnProp(childConfig, prop)) { 21780 }
21814 if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { 21781 arg = arg.slice(0, -2); // Remove trailing comma and space
21815 res[prop] = {};
21816 extend(res[prop], parentConfig[prop]);
21817 extend(res[prop], childConfig[prop]);
21818 } else if (childConfig[prop] != null) {
21819 res[prop] = childConfig[prop];
21820 } else { 21782 } else {
21821 delete res[prop]; 21783 arg = arguments[i];
21822 } 21784 }
21785 args.push(arg);
21823 } 21786 }
21787 warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack);
21788 firstTime = false;
21824 } 21789 }
21825 for (prop in parentConfig) { 21790 return fn.apply(this, arguments);
21826 if (hasOwnProp(parentConfig, prop) && 21791 }, fn);
21827 !hasOwnProp(childConfig, prop) && 21792 }
21828 isObject(parentConfig[prop])) { 21793
21829 // make sure changes to properties don't modify parent config 21794 var deprecations = {};
21830 res[prop] = extend({}, res[prop]); 21795
21831 } 21796 function deprecateSimple(name, msg) {
21832 } 21797 if (hooks.deprecationHandler != null) {
21833 return res; 21798 hooks.deprecationHandler(name, msg);
21834 } 21799 }
21800 if (!deprecations[name]) {
21801 warn(msg);
21802 deprecations[name] = true;
21803 }
21804 }
21805
21806 hooks.suppressDeprecationWarnings = false;
21807 hooks.deprecationHandler = null;
21835 21808
21836 function Locale(config) { 21809 function isFunction(input) {
21837 if (config != null) { 21810 return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
21838 this.set(config); 21811 }
21812
21813 function set (config) {
21814 var prop, i;
21815 for (i in config) {
21816 prop = config[i];
21817 if (isFunction(prop)) {
21818 this[i] = prop;
21819 } else {
21820 this['_' + i] = prop;
21839 } 21821 }
21840 } 21822 }
21823 this._config = config;
21824 // Lenient ordinal parsing accepts just a number in addition to
21825 // number + (possibly) stuff coming from _ordinalParseLenient.
21826 this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\d{1,2}/).source);
21827 }
21841 21828
21842 var keys; 21829 function mergeConfigs(parentConfig, childConfig) {
21843 21830 var res = extend({}, parentConfig), prop;
21844 if (Object.keys) { 21831 for (prop in childConfig) {
21845 keys = Object.keys; 21832 if (hasOwnProp(childConfig, prop)) {
21846 } else { 21833 if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
21847 keys = function (obj) { 21834 res[prop] = {};
21848 var i, res = []; 21835 extend(res[prop], parentConfig[prop]);
21849 for (i in obj) { 21836 extend(res[prop], childConfig[prop]);
21850 if (hasOwnProp(obj, i)) { 21837 } else if (childConfig[prop] != null) {
21851 res.push(i); 21838 res[prop] = childConfig[prop];
21852 } 21839 } else {
21840 delete res[prop];
21853 } 21841 }
21854 return res; 21842 }
21855 };
21856 } 21843 }
21844 for (prop in parentConfig) {
21845 if (hasOwnProp(parentConfig, prop) &&
21846 !hasOwnProp(childConfig, prop) &&
21847 isObject(parentConfig[prop])) {
21848 // make sure changes to properties don't modify parent config
21849 res[prop] = extend({}, res[prop]);
21850 }
21851 }
21852 return res;
21853 }
21857 21854
21858 var defaultCalendar = { 21855 function Locale(config) {
21859 sameDay : '[Today at] LT', 21856 if (config != null) {
21860 nextDay : '[Tomorrow at] LT', 21857 this.set(config);
21861 nextWeek : 'dddd [at] LT',
21862 lastDay : '[Yesterday at] LT',
21863 lastWeek : '[Last] dddd [at] LT',
21864 sameElse : 'L'
21865 };
21866
21867 function locale_calendar__calendar (key, mom, now) {
21868 var output = this._calendar[key] || this._calendar['sameElse'];
21869 return isFunction(output) ? output.call(mom, now) : output;
21870 } 21858 }
21859 }
21860
21861 var keys;
21871 21862
21872 var defaultLongDateFormat = { 21863 if (Object.keys) {
21873 LTS : 'h:mm:ss A', 21864 keys = Object.keys;
21874 LT : 'h:mm A', 21865 } else {
21875 L : 'MM/DD/YYYY', 21866 keys = function (obj) {
21876 LL : 'MMMM D, YYYY', 21867 var i, res = [];
21877 LLL : 'MMMM D, YYYY h:mm A', 21868 for (i in obj) {
21878 LLLL : 'dddd, MMMM D, YYYY h:mm A' 21869 if (hasOwnProp(obj, i)) {
21870 res.push(i);
21871 }
21872 }
21873 return res;
21879 }; 21874 };
21875 }
21880 21876
21881 function longDateFormat (key) { 21877 var keys$1 = keys;
21882 var format = this._longDateFormat[key],
21883 formatUpper = this._longDateFormat[key.toUpperCase()];
21884 21878
21885 if (format || !formatUpper) { 21879 var defaultCalendar = {
21886 return format; 21880 sameDay : '[Today at] LT',
21887 } 21881 nextDay : '[Tomorrow at] LT',
21882 nextWeek : 'dddd [at] LT',
21883 lastDay : '[Yesterday at] LT',
21884 lastWeek : '[Last] dddd [at] LT',
21885 sameElse : 'L'
21886 };
21888 21887
21889 this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { 21888 function calendar (key, mom, now) {
21890 return val.slice(1); 21889 var output = this._calendar[key] || this._calendar['sameElse'];
21891 }); 21890 return isFunction(output) ? output.call(mom, now) : output;
21891 }
21892 21892
21893 return this._longDateFormat[key]; 21893 var defaultLongDateFormat = {
21894 } 21894 LTS : 'h:mm:ss A',
21895 LT : 'h:mm A',
21896 L : 'MM/DD/YYYY',
21897 LL : 'MMMM D, YYYY',
21898 LLL : 'MMMM D, YYYY h:mm A',
21899 LLLL : 'dddd, MMMM D, YYYY h:mm A'
21900 };
21895 21901
21896 var defaultInvalidDate = 'Invalid date'; 21902 function longDateFormat (key) {
21903 var format = this._longDateFormat[key],
21904 formatUpper = this._longDateFormat[key.toUpperCase()];
21897 21905
21898 function invalidDate () { 21906 if (format || !formatUpper) {
21899 return this._invalidDate; 21907 return format;
21900 } 21908 }
21901 21909
21902 var defaultOrdinal = '%d'; 21910 this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {
21903 var defaultOrdinalParse = /\d{1,2}/; 21911 return val.slice(1);
21912 });
21904 21913
21905 function ordinal (number) { 21914 return this._longDateFormat[key];
21906 return this._ordinal.replace('%d', number); 21915 }
21907 }
21908 21916
21909 var defaultRelativeTime = { 21917 var defaultInvalidDate = 'Invalid date';
21910 future : 'in %s',
21911 past : '%s ago',
21912 s : 'a few seconds',
21913 m : 'a minute',
21914 mm : '%d minutes',
21915 h : 'an hour',
21916 hh : '%d hours',
21917 d : 'a day',
21918 dd : '%d days',
21919 M : 'a month',
21920 MM : '%d months',
21921 y : 'a year',
21922 yy : '%d years'
21923 };
21924 21918
21925 function relative__relativeTime (number, withoutSuffix, string, isFuture) { 21919 function invalidDate () {
21926 var output = this._relativeTime[string]; 21920 return this._invalidDate;
21927 return (isFunction(output)) ? 21921 }
21928 output(number, withoutSuffix, string, isFuture) :
21929 output.replace(/%d/i, number);
21930 }
21931 21922
21932 function pastFuture (diff, output) { 21923 var defaultOrdinal = '%d';
21933 var format = this._relativeTime[diff > 0 ? 'future' : 'past']; 21924 var defaultOrdinalParse = /\d{1,2}/;
21934 return isFunction(format) ? format(output) : format.replace(/%s/i, output);
21935 }
21936 21925
21937 var aliases = {}; 21926 function ordinal (number) {
21927 return this._ordinal.replace('%d', number);
21928 }
21938 21929
21939 function addUnitAlias (unit, shorthand) { 21930 var defaultRelativeTime = {
21940 var lowerCase = unit.toLowerCase(); 21931 future : 'in %s',
21941 aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; 21932 past : '%s ago',
21942 } 21933 s : 'a few seconds',
21934 m : 'a minute',
21935 mm : '%d minutes',
21936 h : 'an hour',
21937 hh : '%d hours',
21938 d : 'a day',
21939 dd : '%d days',
21940 M : 'a month',
21941 MM : '%d months',
21942 y : 'a year',
21943 yy : '%d years'
21944 };
21943 21945
21944 function normalizeUnits(units) { 21946 function relativeTime (number, withoutSuffix, string, isFuture) {
21945 return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; 21947 var output = this._relativeTime[string];
21946 } 21948 return (isFunction(output)) ?
21949 output(number, withoutSuffix, string, isFuture) :
21950 output.replace(/%d/i, number);
21951 }
21947 21952
21948 function normalizeObjectUnits(inputObject) { 21953 function pastFuture (diff, output) {
21949 var normalizedInput = {}, 21954 var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
21950 normalizedProp, 21955 return isFunction(format) ? format(output) : format.replace(/%s/i, output);
21951 prop; 21956 }
21952 21957
21953 for (prop in inputObject) { 21958 var aliases = {};
21954 if (hasOwnProp(inputObject, prop)) {
21955 normalizedProp = normalizeUnits(prop);
21956 if (normalizedProp) {
21957 normalizedInput[normalizedProp] = inputObject[prop];
21958 }
21959 }
21960 }
21961 21959
21962 return normalizedInput; 21960 function addUnitAlias (unit, shorthand) {
21963 } 21961 var lowerCase = unit.toLowerCase();
21962 aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
21963 }
21964 21964
21965 var priorities = {}; 21965 function normalizeUnits(units) {
21966 return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;
21967 }
21966 21968
21967 function addUnitPriority(unit, priority) { 21969 function normalizeObjectUnits(inputObject) {
21968 priorities[unit] = priority; 21970 var normalizedInput = {},
21969 } 21971 normalizedProp,
21972 prop;
21970 21973
21971 function getPrioritizedUnits(unitsObj) { 21974 for (prop in inputObject) {
21972 var units = []; 21975 if (hasOwnProp(inputObject, prop)) {
21973 for (var u in unitsObj) { 21976 normalizedProp = normalizeUnits(prop);
21974 units.push({unit: u, priority: priorities[u]}); 21977 if (normalizedProp) {
21978 normalizedInput[normalizedProp] = inputObject[prop];
21979 }
21975 } 21980 }
21976 units.sort(function (a, b) {
21977 return a.priority - b.priority;
21978 });
21979 return units;
21980 } 21981 }
21981 21982
21982 function makeGetSet (unit, keepTime) { 21983 return normalizedInput;
21983 return function (value) { 21984 }
21984 if (value != null) { 21985
21985 get_set__set(this, unit, value); 21986 var priorities = {};
21986 utils_hooks__hooks.updateOffset(this, keepTime); 21987
21987 return this; 21988 function addUnitPriority(unit, priority) {
21988 } else { 21989 priorities[unit] = priority;
21989 return get_set__get(this, unit); 21990 }
21990 }
21991 };
21992 }
21993 21991
21994 function get_set__get (mom, unit) { 21992 function getPrioritizedUnits(unitsObj) {
21995 return mom.isValid() ? 21993 var units = [];
21996 mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; 21994 for (var u in unitsObj) {
21995 units.push({unit: u, priority: priorities[u]});
21997 } 21996 }
21997 units.sort(function (a, b) {
21998 return a.priority - b.priority;
21999 });
22000 return units;
22001 }
21998 22002
21999 function get_set__set (mom, unit, value) { 22003 function makeGetSet (unit, keepTime) {
22000 if (mom.isValid()) { 22004 return function (value) {
22001 mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); 22005 if (value != null) {
22006 set$1(this, unit, value);
22007 hooks.updateOffset(this, keepTime);
22008 return this;
22009 } else {
22010 return get(this, unit);
22002 } 22011 }
22012 };
22013 }
22014
22015 function get (mom, unit) {
22016 return mom.isValid() ?
22017 mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;
22018 }
22019
22020 function set$1 (mom, unit, value) {
22021 if (mom.isValid()) {
22022 mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
22003 } 22023 }
22024 }
22004 22025
22005 // MOMENTS 22026 // MOMENTS
22006 22027
22007 function stringGet (units) { 22028 function stringGet (units) {
22008 units = normalizeUnits(units); 22029 units = normalizeUnits(units);
22009 if (isFunction(this[units])) { 22030 if (isFunction(this[units])) {
22010 return this[units](); 22031 return this[units]();
22011 }
22012 return this;
22013 } 22032 }
22033 return this;
22034 }
22014 22035
22015 22036
22016 function stringSet (units, value) { 22037 function stringSet (units, value) {
22017 if (typeof units === 'object') { 22038 if (typeof units === 'object') {
22018 units = normalizeObjectUnits(units); 22039 units = normalizeObjectUnits(units);
22019 var prioritized = getPrioritizedUnits(units); 22040 var prioritized = getPrioritizedUnits(units);
22020 for (var i = 0; i < prioritized.length; i++) { 22041 for (var i = 0; i < prioritized.length; i++) {
22021 this[prioritized[i].unit](units[prioritized[i].unit]); 22042 this[prioritized[i].unit](units[prioritized[i].unit]);
22022 } 22043 }
22023 } else { 22044 } else {
22024 units = normalizeUnits(units); 22045 units = normalizeUnits(units);
22025 if (isFunction(this[units])) { 22046 if (isFunction(this[units])) {
22026 return this[units](value); 22047 return this[units](value);
22027 }
22028 } 22048 }
22029 return this;
22030 } 22049 }
22050 return this;
22051 }
22031 22052
22032 function zeroFill(number, targetLength, forceSign) { 22053 function zeroFill(number, targetLength, forceSign) {
22033 var absNumber = '' + Math.abs(number), 22054 var absNumber = '' + Math.abs(number),
22034 zerosToFill = targetLength - absNumber.length, 22055 zerosToFill = targetLength - absNumber.length,
22035 sign = number >= 0; 22056 sign = number >= 0;
22036 return (sign ? (forceSign ? '+' : '') : '-') + 22057 return (sign ? (forceSign ? '+' : '') : '-') +
22037 Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; 22058 Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
22038 } 22059 }
22039 22060
22040 var formattingTokens = /(\[[^\[]*\])|(\\)?([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; 22061 var formattingTokens = /(\[[^\[]*\])|(\\)?([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;
22041 22062
22042 var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; 22063 var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;
22043 22064
22044 var formatFunctions = {}; 22065 var formatFunctions = {};
22045 22066
22046 var formatTokenFunctions = {}; 22067 var formatTokenFunctions = {};
22047 22068
22048 // token: 'M' 22069 // token: 'M'
22049 // padded: ['MM', 2] 22070 // padded: ['MM', 2]
22050 // ordinal: 'Mo' 22071 // ordinal: 'Mo'
22051 // callback: function () { this.month() + 1 } 22072 // callback: function () { this.month() + 1 }
22052 function addFormatToken (token, padded, ordinal, callback) { 22073 function addFormatToken (token, padded, ordinal, callback) {
22053 var func = callback; 22074 var func = callback;
22054 if (typeof callback === 'string') { 22075 if (typeof callback === 'string') {
22055 func = function () { 22076 func = function () {
22056 return this[callback](); 22077 return this[callback]();
22057 }; 22078 };
22058 } 22079 }
22059 if (token) { 22080 if (token) {
22060 formatTokenFunctions[token] = func; 22081 formatTokenFunctions[token] = func;
22061 } 22082 }
22062 if (padded) { 22083 if (padded) {
22063 formatTokenFunctions[padded[0]] = function () { 22084 formatTokenFunctions[padded[0]] = function () {
22064 return zeroFill(func.apply(this, arguments), padded[1], padded[2]); 22085 return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
22065 }; 22086 };
22066 } 22087 }
22067 if (ordinal) { 22088 if (ordinal) {
22068 formatTokenFunctions[ordinal] = function () { 22089 formatTokenFunctions[ordinal] = function () {
22069 return this.localeData().ordinal(func.apply(this, arguments), token); 22090 return this.localeData().ordinal(func.apply(this, arguments), token);
22070 }; 22091 };
22071 }
22072 } 22092 }
22093 }
22073 22094
22074 function removeFormattingTokens(input) { 22095 function removeFormattingTokens(input) {
22075 if (input.match(/\[[\s\S]/)) { 22096 if (input.match(/\[[\s\S]/)) {
22076 return input.replace(/^\[|\]$/g, ''); 22097 return input.replace(/^\[|\]$/g, '');
22077 }
22078 return input.replace(/\\/g, '');
22079 } 22098 }
22099 return input.replace(/\\/g, '');
22100 }
22080 22101
22081 function makeFormatFunction(format) { 22102 function makeFormatFunction(format) {
22082 var array = format.match(formattingTokens), i, length; 22103 var array = format.match(formattingTokens), i, length;
22083 22104
22084 for (i = 0, length = array.length; i < length; i++) { 22105 for (i = 0, length = array.length; i < length; i++) {
22085 if (formatTokenFunctions[array[i]]) { 22106 if (formatTokenFunctions[array[i]]) {
22086 array[i] = formatTokenFunctions[array[i]]; 22107 array[i] = formatTokenFunctions[array[i]];
22087 } else { 22108 } else {
22088 array[i] = removeFormattingTokens(array[i]); 22109 array[i] = removeFormattingTokens(array[i]);
22089 }
22090 } 22110 }
22091
22092 return function (mom) {
22093 var output = '', i;
22094 for (i = 0; i < length; i++) {
22095 output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];
22096 }
22097 return output;
22098 };
22099 } 22111 }
22100 22112
22101 // format date using native date object 22113 return function (mom) {
22102 function formatMoment(m, format) { 22114 var output = '', i;
22103 if (!m.isValid()) { 22115 for (i = 0; i < length; i++) {
22104 return m.localeData().invalidDate(); 22116 output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];
22105 } 22117 }
22118 return output;
22119 };
22120 }
22106 22121
22107 format = expandFormat(format, m.localeData()); 22122 // format date using native date object
22108 formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); 22123 function formatMoment(m, format) {
22109 22124 if (!m.isValid()) {
22110 return formatFunctions[format](m); 22125 return m.localeData().invalidDate();
22111 } 22126 }
22112 22127
22113 function expandFormat(format, locale) { 22128 format = expandFormat(format, m.localeData());
22114 var i = 5; 22129 formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);
22115 22130
22116 function replaceLongDateFormatTokens(input) { 22131 return formatFunctions[format](m);
22117 return locale.longDateFormat(input) || input; 22132 }
22118 }
22119 22133
22120 localFormattingTokens.lastIndex = 0; 22134 function expandFormat(format, locale) {
22121 while (i >= 0 && localFormattingTokens.test(format)) { 22135 var i = 5;
22122 format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
22123 localFormattingTokens.lastIndex = 0;
22124 i -= 1;
22125 }
22126 22136
22127 return format; 22137 function replaceLongDateFormatTokens(input) {
22138 return locale.longDateFormat(input) || input;
22128 } 22139 }
22129 22140
22130 var match1 = /\d/; // 0 - 9 22141 localFormattingTokens.lastIndex = 0;
22131 var match2 = /\d\d/; // 00 - 99 22142 while (i >= 0 && localFormattingTokens.test(format)) {
22132 var match3 = /\d{3}/; // 000 - 999 22143 format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
22133 var match4 = /\d{4}/; // 0000 - 9999 22144 localFormattingTokens.lastIndex = 0;
22134 var match6 = /[+-]?\d{6}/; // -999999 - 999999 22145 i -= 1;
22135 var match1to2 = /\d\d?/; // 0 - 99 22146 }
22136 var match3to4 = /\d\d\d\d?/; // 999 - 9999
22137 var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999
22138 var match1to3 = /\d{1,3}/; // 0 - 999
22139 var match1to4 = /\d{1,4}/; // 0 - 9999
22140 var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999
22141 22147
22142 var matchUnsigned = /\d+/; // 0 - inf 22148 return format;
22143 var matchSigned = /[+-]?\d+/; // -inf - inf 22149 }
22144 22150
22145 var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z 22151 var match1 = /\d/; // 0 - 9
22146 var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z 22152 var match2 = /\d\d/; // 00 - 99
22153 var match3 = /\d{3}/; // 000 - 999
22154 var match4 = /\d{4}/; // 0000 - 9999
22155 var match6 = /[+-]?\d{6}/; // -999999 - 999999
22156 var match1to2 = /\d\d?/; // 0 - 99
22157 var match3to4 = /\d\d\d\d?/; // 999 - 9999
22158 var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999
22159 var match1to3 = /\d{1,3}/; // 0 - 999
22160 var match1to4 = /\d{1,4}/; // 0 - 9999
22161 var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999
22147 22162
22148 var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 22163 var matchUnsigned = /\d+/; // 0 - inf
22164 var matchSigned = /[+-]?\d+/; // -inf - inf
22149 22165
22150 // any word (or two) characters or numbers including two/three word month in arabic. 22166 var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z
22151 // includes scottish gaelic two word and hyphenated months 22167 var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z
22152 var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i;
22153 22168
22169 var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123
22154 22170
22155 var regexes = {}; 22171 // any word (or two) characters or numbers including two/three word month in arabic.
22172 // includes scottish gaelic two word and hyphenated months
22173 var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i;
22156 22174
22157 function addRegexToken (token, regex, strictRegex) {
22158 regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {
22159 return (isStrict && strictRegex) ? strictRegex : regex;
22160 };
22161 }
22162 22175
22163 function getParseRegexForToken (token, config) { 22176 var regexes = {};
22164 if (!hasOwnProp(regexes, token)) {
22165 return new RegExp(unescapeFormat(token));
22166 }
22167 22177
22168 return regexes[token](config._strict, config._locale); 22178 function addRegexToken (token, regex, strictRegex) {
22169 } 22179 regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {
22180 return (isStrict && strictRegex) ? strictRegex : regex;
22181 };
22182 }
22170 22183
22171 // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript 22184 function getParseRegexForToken (token, config) {
22172 function unescapeFormat(s) { 22185 if (!hasOwnProp(regexes, token)) {
22173 return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { 22186 return new RegExp(unescapeFormat(token));
22174 return p1 || p2 || p3 || p4;
22175 }));
22176 } 22187 }
22177 22188
22178 function regexEscape(s) { 22189 return regexes[token](config._strict, config._locale);
22179 return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); 22190 }
22180 }
22181 22191
22182 var tokens = {}; 22192 // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
22193 function unescapeFormat(s) {
22194 return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
22195 return p1 || p2 || p3 || p4;
22196 }));
22197 }
22183 22198
22184 function addParseToken (token, callback) { 22199 function regexEscape(s) {
22185 var i, func = callback; 22200 return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
22186 if (typeof token === 'string') { 22201 }
22187 token = [token];
22188 }
22189 if (typeof callback === 'number') {
22190 func = function (input, array) {
22191 array[callback] = toInt(input);
22192 };
22193 }
22194 for (i = 0; i < token.length; i++) {
22195 tokens[token[i]] = func;
22196 }
22197 }
22198 22202
22199 function addWeekParseToken (token, callback) { 22203 var tokens = {};
22200 addParseToken(token, function (input, array, config, token) { 22204
22201 config._w = config._w || {}; 22205 function addParseToken (token, callback) {
22202 callback(input, config._w, config, token); 22206 var i, func = callback;
22203 }); 22207 if (typeof token === 'string') {
22208 token = [token];
22204 } 22209 }
22210 if (isNumber(callback)) {
22211 func = function (input, array) {
22212 array[callback] = toInt(input);
22213 };
22214 }
22215 for (i = 0; i < token.length; i++) {
22216 tokens[token[i]] = func;
22217 }
22218 }
22205 22219
22206 function addTimeToArrayFromToken(token, input, config) { 22220 function addWeekParseToken (token, callback) {
22207 if (input != null && hasOwnProp(tokens, token)) { 22221 addParseToken(token, function (input, array, config, token) {
22208 tokens[token](input, config._a, config, token); 22222 config._w = config._w || {};
22209 } 22223 callback(input, config._w, config, token);
22224 });
22225 }
22226
22227 function addTimeToArrayFromToken(token, input, config) {
22228 if (input != null && hasOwnProp(tokens, token)) {
22229 tokens[token](input, config._a, config, token);
22210 } 22230 }
22231 }
22211 22232
22212 var YEAR = 0; 22233 var YEAR = 0;
22213 var MONTH = 1; 22234 var MONTH = 1;
22214 var DATE = 2; 22235 var DATE = 2;
22215 var HOUR = 3; 22236 var HOUR = 3;
22216 var MINUTE = 4; 22237 var MINUTE = 4;
22217 var SECOND = 5; 22238 var SECOND = 5;
22218 var MILLISECOND = 6; 22239 var MILLISECOND = 6;
22219 var WEEK = 7; 22240 var WEEK = 7;
22220 var WEEKDAY = 8; 22241 var WEEKDAY = 8;
22221 22242
22222 var indexOf; 22243 var indexOf;
22223 22244
22224 if (Array.prototype.indexOf) { 22245 if (Array.prototype.indexOf) {
22225 indexOf = Array.prototype.indexOf; 22246 indexOf = Array.prototype.indexOf;
22226 } else { 22247 } else {
22227 indexOf = function (o) { 22248 indexOf = function (o) {
22228 // I know 22249 // I know
22229 var i; 22250 var i;
22230 for (i = 0; i < this.length; ++i) { 22251 for (i = 0; i < this.length; ++i) {
22231 if (this[i] === o) { 22252 if (this[i] === o) {
22232 return i; 22253 return i;
22233 }
22234 } 22254 }
22235 return -1; 22255 }
22236 }; 22256 return -1;
22237 } 22257 };
22258 }
22238 22259
22239 function daysInMonth(year, month) { 22260 var indexOf$1 = indexOf;
22240 return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
22241 }
22242 22261
22243 // FORMATTING 22262 function daysInMonth(year, month) {
22263 return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
22264 }
22244 22265
22245 addFormatToken('M', ['MM', 2], 'Mo', function () { 22266 // FORMATTING
22246 return this.month() + 1;
22247 });
22248 22267
22249 addFormatToken('MMM', 0, 0, function (format) { 22268 addFormatToken('M', ['MM', 2], 'Mo', function () {
22250 return this.localeData().monthsShort(this, format); 22269 return this.month() + 1;
22251 }); 22270 });
22252 22271
22253 addFormatToken('MMMM', 0, 0, function (format) { 22272 addFormatToken('MMM', 0, 0, function (format) {
22254 return this.localeData().months(this, format); 22273 return this.localeData().monthsShort(this, format);
22255 }); 22274 });
22256 22275
22257 // ALIASES 22276 addFormatToken('MMMM', 0, 0, function (format) {
22277 return this.localeData().months(this, format);
22278 });
22258 22279
22259 addUnitAlias('month', 'M'); 22280 // ALIASES
22260 22281
22261 // PRIORITY 22282 addUnitAlias('month', 'M');
22262 22283
22263 addUnitPriority('month', 8); 22284 // PRIORITY
22264 22285
22265 // PARSING 22286 addUnitPriority('month', 8);
22266 22287
22267 addRegexToken('M', match1to2); 22288 // PARSING
22268 addRegexToken('MM', match1to2, match2);
22269 addRegexToken('MMM', function (isStrict, locale) {
22270 return locale.monthsShortRegex(isStrict);
22271 });
22272 addRegexToken('MMMM', function (isStrict, locale) {
22273 return locale.monthsRegex(isStrict);
22274 });
22275 22289
22276 addParseToken(['M', 'MM'], function (input, array) { 22290 addRegexToken('M', match1to2);
22277 array[MONTH] = toInt(input) - 1; 22291 addRegexToken('MM', match1to2, match2);
22278 }); 22292 addRegexToken('MMM', function (isStrict, locale) {
22293 return locale.monthsShortRegex(isStrict);
22294 });
22295 addRegexToken('MMMM', function (isStrict, locale) {
22296 return locale.monthsRegex(isStrict);
22297 });
22279 22298
22280 addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { 22299 addParseToken(['M', 'MM'], function (input, array) {
22281 var month = config._locale.monthsParse(input, token, config._strict); 22300 array[MONTH] = toInt(input) - 1;
22282 // if we didn't find a month name, mark the date as invalid. 22301 });
22283 if (month != null) {
22284 array[MONTH] = month;
22285 } else {
22286 getParsingFlags(config).invalidMonth = input;
22287 }
22288 });
22289 22302
22290 // LOCALES 22303 addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
22304 var month = config._locale.monthsParse(input, token, config._strict);
22305 // if we didn't find a month name, mark the date as invalid.
22306 if (month != null) {
22307 array[MONTH] = month;
22308 } else {
22309 getParsingFlags(config).invalidMonth = input;
22310 }
22311 });
22312
22313 // LOCALES
22291 22314
22292 var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/; 22315 var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;
22293 var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); 22316 var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
22294 function localeMonths (m, format) { 22317 function localeMonths (m, format) {
22295 return isArray(this._months) ? this._months[m.month()] : 22318 if (!m) {
22296 this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()]; 22319 return this._months;
22297 } 22320 }
22321 return isArray(this._months) ? this._months[m.month()] :
22322 this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];
22323 }
22298 22324
22299 var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); 22325 var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
22300 function localeMonthsShort (m, format) { 22326 function localeMonthsShort (m, format) {
22301 return isArray(this._monthsShort) ? this._monthsShort[m.month()] : 22327 if (!m) {
22302 this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; 22328 return this._monthsShort;
22303 } 22329 }
22330 return isArray(this._monthsShort) ? this._monthsShort[m.month()] :
22331 this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
22332 }
22304 22333
22305 function units_month__handleStrictParse(monthName, format, strict) { 22334 function handleStrictParse(monthName, format, strict) {
22306 var i, ii, mom, llc = monthName.toLocaleLowerCase(); 22335 var i, ii, mom, llc = monthName.toLocaleLowerCase();
22307 if (!this._monthsParse) { 22336 if (!this._monthsParse) {
22308 // this is not used 22337 // this is not used
22309 this._monthsParse = []; 22338 this._monthsParse = [];
22310 this._longMonthsParse = []; 22339 this._longMonthsParse = [];
22311 this._shortMonthsParse = []; 22340 this._shortMonthsParse = [];
22312 for (i = 0; i < 12; ++i) { 22341 for (i = 0; i < 12; ++i) {
22313 mom = create_utc__createUTC([2000, i]); 22342 mom = createUTC([2000, i]);
22314 this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase(); 22343 this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();
22315 this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); 22344 this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
22316 }
22317 } 22345 }
22346 }
22318 22347
22319 if (strict) { 22348 if (strict) {
22320 if (format === 'MMM') { 22349 if (format === 'MMM') {
22321 ii = indexOf.call(this._shortMonthsParse, llc); 22350 ii = indexOf$1.call(this._shortMonthsParse, llc);
22322 return ii !== -1 ? ii : null; 22351 return ii !== -1 ? ii : null;
22323 } else { 22352 } else {
22324 ii = indexOf.call(this._longMonthsParse, llc); 22353 ii = indexOf$1.call(this._longMonthsParse, llc);
22325 return ii !== -1 ? ii : null; 22354 return ii !== -1 ? ii : null;
22355 }
22356 } else {
22357 if (format === 'MMM') {
22358 ii = indexOf$1.call(this._shortMonthsParse, llc);
22359 if (ii !== -1) {
22360 return ii;
22326 } 22361 }
22362 ii = indexOf$1.call(this._longMonthsParse, llc);
22363 return ii !== -1 ? ii : null;
22327 } else { 22364 } else {
22328 if (format === 'MMM') { 22365 ii = indexOf$1.call(this._longMonthsParse, llc);
22329 ii = indexOf.call(this._shortMonthsParse, llc); 22366 if (ii !== -1) {
22330 if (ii !== -1) { 22367 return ii;
22331 return ii;
22332 }
22333 ii = indexOf.call(this._longMonthsParse, llc);
22334 return ii !== -1 ? ii : null;
22335 } else {
22336 ii = indexOf.call(this._longMonthsParse, llc);
22337 if (ii !== -1) {
22338 return ii;
22339 }
22340 ii = indexOf.call(this._shortMonthsParse, llc);
22341 return ii !== -1 ? ii : null;
22342 } 22368 }
22369 ii = indexOf$1.call(this._shortMonthsParse, llc);
22370 return ii !== -1 ? ii : null;
22343 } 22371 }
22344 } 22372 }
22373 }
22345 22374
22346 function localeMonthsParse (monthName, format, strict) { 22375 function localeMonthsParse (monthName, format, strict) {
22347 var i, mom, regex; 22376 var i, mom, regex;
22348 22377
22349 if (this._monthsParseExact) { 22378 if (this._monthsParseExact) {
22350 return units_month__handleStrictParse.call(this, monthName, format, strict); 22379 return handleStrictParse.call(this, monthName, format, strict);
22351 } 22380 }
22352 22381
22353 if (!this._monthsParse) { 22382 if (!this._monthsParse) {
22354 this._monthsParse = []; 22383 this._monthsParse = [];
22355 this._longMonthsParse = []; 22384 this._longMonthsParse = [];
22356 this._shortMonthsParse = []; 22385 this._shortMonthsParse = [];
22357 } 22386 }
22358 22387
22359 // TODO: add sorting 22388 // TODO: add sorting
22360 // Sorting makes sure if one month (or abbr) is a prefix of another 22389 // Sorting makes sure if one month (or abbr) is a prefix of another
22361 // see sorting in computeMonthsParse 22390 // see sorting in computeMonthsParse
22362 for (i = 0; i < 12; i++) { 22391 for (i = 0; i < 12; i++) {
22363 // make the regex if we don't have it already 22392 // make the regex if we don't have it already
22364 mom = create_utc__createUTC([2000, i]); 22393 mom = createUTC([2000, i]);
22365 if (strict && !this._longMonthsParse[i]) { 22394 if (strict && !this._longMonthsParse[i]) {
22366 this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); 22395 this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');
22367 this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); 22396 this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');
22368 } 22397 }
22369 if (!strict && !this._monthsParse[i]) { 22398 if (!strict && !this._monthsParse[i]) {
22370 regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); 22399 regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
22371 this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); 22400 this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
22372 } 22401 }
22373 // test the regex 22402 // test the regex
22374 if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { 22403 if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {
22375 return i; 22404 return i;
22376 } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { 22405 } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {
22377 return i; 22406 return i;
22378 } else if (!strict && this._monthsParse[i].test(monthName)) { 22407 } else if (!strict && this._monthsParse[i].test(monthName)) {
22379 return i; 22408 return i;
22380 }
22381 } 22409 }
22382 } 22410 }
22411 }
22383 22412
22384 // MOMENTS 22413 // MOMENTS
22385
22386 function setMonth (mom, value) {
22387 var dayOfMonth;
22388 22414
22389 if (!mom.isValid()) { 22415 function setMonth (mom, value) {
22390 // No op 22416 var dayOfMonth;
22391 return mom;
22392 }
22393 22417
22394 if (typeof value === 'string') { 22418 if (!mom.isValid()) {
22395 if (/^\d+$/.test(value)) { 22419 // No op
22396 value = toInt(value);
22397 } else {
22398 value = mom.localeData().monthsParse(value);
22399 // TODO: Another silent failure?
22400 if (typeof value !== 'number') {
22401 return mom;
22402 }
22403 }
22404 }
22405
22406 dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
22407 mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
22408 return mom; 22420 return mom;
22409 } 22421 }
22410 22422
22411 function getSetMonth (value) { 22423 if (typeof value === 'string') {
22412 if (value != null) { 22424 if (/^\d+$/.test(value)) {
22413 setMonth(this, value); 22425 value = toInt(value);
22414 utils_hooks__hooks.updateOffset(this, true);
22415 return this;
22416 } else { 22426 } else {
22417 return get_set__get(this, 'Month'); 22427 value = mom.localeData().monthsParse(value);
22428 // TODO: Another silent failure?
22429 if (!isNumber(value)) {
22430 return mom;
22431 }
22418 } 22432 }
22419 } 22433 }
22420 22434
22421 function getDaysInMonth () { 22435 dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
22422 return daysInMonth(this.year(), this.month()); 22436 mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
22423 } 22437 return mom;
22438 }
22424 22439
22425 var defaultMonthsShortRegex = matchWord; 22440 function getSetMonth (value) {
22426 function monthsShortRegex (isStrict) { 22441 if (value != null) {
22427 if (this._monthsParseExact) { 22442 setMonth(this, value);
22428 if (!hasOwnProp(this, '_monthsRegex')) { 22443 hooks.updateOffset(this, true);
22429 computeMonthsParse.call(this); 22444 return this;
22430 } 22445 } else {
22431 if (isStrict) { 22446 return get(this, 'Month');
22432 return this._monthsShortStrictRegex;
22433 } else {
22434 return this._monthsShortRegex;
22435 }
22436 } else {
22437 if (!hasOwnProp(this, '_monthsShortRegex')) {
22438 this._monthsShortRegex = defaultMonthsShortRegex;
22439 }
22440 return this._monthsShortStrictRegex && isStrict ?
22441 this._monthsShortStrictRegex : this._monthsShortRegex;
22442 }
22443 } 22447 }
22448 }
22444 22449
22445 var defaultMonthsRegex = matchWord; 22450 function getDaysInMonth () {
22446 function monthsRegex (isStrict) { 22451 return daysInMonth(this.year(), this.month());
22447 if (this._monthsParseExact) { 22452 }
22448 if (!hasOwnProp(this, '_monthsRegex')) { 22453
22449 computeMonthsParse.call(this); 22454 var defaultMonthsShortRegex = matchWord;
22450 } 22455 function monthsShortRegex (isStrict) {
22451 if (isStrict) { 22456 if (this._monthsParseExact) {
22452 return this._monthsStrictRegex; 22457 if (!hasOwnProp(this, '_monthsRegex')) {
22453 } else { 22458 computeMonthsParse.call(this);
22454 return this._monthsRegex; 22459 }
22455 } 22460 if (isStrict) {
22461 return this._monthsShortStrictRegex;
22456 } else { 22462 } else {
22457 if (!hasOwnProp(this, '_monthsRegex')) { 22463 return this._monthsShortRegex;
22458 this._monthsRegex = defaultMonthsRegex;
22459 }
22460 return this._monthsStrictRegex && isStrict ?
22461 this._monthsStrictRegex : this._monthsRegex;
22462 } 22464 }
22463 } 22465 } else {
22464 22466 if (!hasOwnProp(this, '_monthsShortRegex')) {
22465 function computeMonthsParse () { 22467 this._monthsShortRegex = defaultMonthsShortRegex;
22466 function cmpLenRev(a, b) {
22467 return b.length - a.length;
22468 } 22468 }
22469 return this._monthsShortStrictRegex && isStrict ?
22470 this._monthsShortStrictRegex : this._monthsShortRegex;
22471 }
22472 }
22469 22473
22470 var shortPieces = [], longPieces = [], mixedPieces = [], 22474 var defaultMonthsRegex = matchWord;
22471 i, mom; 22475 function monthsRegex (isStrict) {
22472 for (i = 0; i < 12; i++) { 22476 if (this._monthsParseExact) {
22473 // make the regex if we don't have it already 22477 if (!hasOwnProp(this, '_monthsRegex')) {
22474 mom = create_utc__createUTC([2000, i]); 22478 computeMonthsParse.call(this);
22475 shortPieces.push(this.monthsShort(mom, ''));
22476 longPieces.push(this.months(mom, ''));
22477 mixedPieces.push(this.months(mom, ''));
22478 mixedPieces.push(this.monthsShort(mom, ''));
22479 } 22479 }
22480 // Sorting makes sure if one month (or abbr) is a prefix of another it 22480 if (isStrict) {
22481 // will match the longer piece. 22481 return this._monthsStrictRegex;
22482 shortPieces.sort(cmpLenRev); 22482 } else {
22483 longPieces.sort(cmpLenRev); 22483 return this._monthsRegex;
22484 mixedPieces.sort(cmpLenRev);
22485 for (i = 0; i < 12; i++) {
22486 shortPieces[i] = regexEscape(shortPieces[i]);
22487 longPieces[i] = regexEscape(longPieces[i]);
22488 } 22484 }
22489 for (i = 0; i < 24; i++) { 22485 } else {
22490 mixedPieces[i] = regexEscape(mixedPieces[i]); 22486 if (!hasOwnProp(this, '_monthsRegex')) {
22487 this._monthsRegex = defaultMonthsRegex;
22491 } 22488 }
22489 return this._monthsStrictRegex && isStrict ?
22490 this._monthsStrictRegex : this._monthsRegex;
22491 }
22492 }
22492 22493
22493 this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); 22494 function computeMonthsParse () {
22494 this._monthsShortRegex = this._monthsRegex; 22495 function cmpLenRev(a, b) {
22495 this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); 22496 return b.length - a.length;
22496 this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
22497 } 22497 }
22498 22498
22499 // FORMATTING 22499 var shortPieces = [], longPieces = [], mixedPieces = [],
22500 i, mom;
22501 for (i = 0; i < 12; i++) {
22502 // make the regex if we don't have it already
22503 mom = createUTC([2000, i]);
22504 shortPieces.push(this.monthsShort(mom, ''));
22505 longPieces.push(this.months(mom, ''));
22506 mixedPieces.push(this.months(mom, ''));
22507 mixedPieces.push(this.monthsShort(mom, ''));
22508 }
22509 // Sorting makes sure if one month (or abbr) is a prefix of another it
22510 // will match the longer piece.
22511 shortPieces.sort(cmpLenRev);
22512 longPieces.sort(cmpLenRev);
22513 mixedPieces.sort(cmpLenRev);
22514 for (i = 0; i < 12; i++) {
22515 shortPieces[i] = regexEscape(shortPieces[i]);
22516 longPieces[i] = regexEscape(longPieces[i]);
22517 }
22518 for (i = 0; i < 24; i++) {
22519 mixedPieces[i] = regexEscape(mixedPieces[i]);
22520 }
22500 22521
22501 addFormatToken('Y', 0, 0, function () { 22522 this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
22502 var y = this.year(); 22523 this._monthsShortRegex = this._monthsRegex;
22503 return y <= 9999 ? '' + y : '+' + y; 22524 this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
22504 }); 22525 this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
22526 }
22505 22527
22506 addFormatToken(0, ['YY', 2], 0, function () { 22528 // FORMATTING
22507 return this.year() % 100;
22508 });
22509 22529
22510 addFormatToken(0, ['YYYY', 4], 0, 'year'); 22530 addFormatToken('Y', 0, 0, function () {
22511 addFormatToken(0, ['YYYYY', 5], 0, 'year'); 22531 var y = this.year();
22512 addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); 22532 return y <= 9999 ? '' + y : '+' + y;
22533 });
22513 22534
22514 // ALIASES 22535 addFormatToken(0, ['YY', 2], 0, function () {
22536 return this.year() % 100;
22537 });
22515 22538
22516 addUnitAlias('year', 'y'); 22539 addFormatToken(0, ['YYYY', 4], 0, 'year');
22540 addFormatToken(0, ['YYYYY', 5], 0, 'year');
22541 addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
22517 22542
22518 // PRIORITIES 22543 // ALIASES
22519 22544
22520 addUnitPriority('year', 1); 22545 addUnitAlias('year', 'y');
22521 22546
22522 // PARSING 22547 // PRIORITIES
22523 22548
22524 addRegexToken('Y', matchSigned); 22549 addUnitPriority('year', 1);
22525 addRegexToken('YY', match1to2, match2);
22526 addRegexToken('YYYY', match1to4, match4);
22527 addRegexToken('YYYYY', match1to6, match6);
22528 addRegexToken('YYYYYY', match1to6, match6);
22529 22550
22530 addParseToken(['YYYYY', 'YYYYYY'], YEAR); 22551 // PARSING
22531 addParseToken('YYYY', function (input, array) {
22532 array[YEAR] = input.length === 2 ? utils_hooks__hooks.parseTwoDigitYear(input) : toInt(input);
22533 });
22534 addParseToken('YY', function (input, array) {
22535 array[YEAR] = utils_hooks__hooks.parseTwoDigitYear(input);
22536 });
22537 addParseToken('Y', function (input, array) {
22538 array[YEAR] = parseInt(input, 10);
22539 });
22540 22552
22541 // HELPERS 22553 addRegexToken('Y', matchSigned);
22554 addRegexToken('YY', match1to2, match2);
22555 addRegexToken('YYYY', match1to4, match4);
22556 addRegexToken('YYYYY', match1to6, match6);
22557 addRegexToken('YYYYYY', match1to6, match6);
22542 22558
22543 function daysInYear(year) { 22559 addParseToken(['YYYYY', 'YYYYYY'], YEAR);
22544 return isLeapYear(year) ? 366 : 365; 22560 addParseToken('YYYY', function (input, array) {
22545 } 22561 array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
22562 });
22563 addParseToken('YY', function (input, array) {
22564 array[YEAR] = hooks.parseTwoDigitYear(input);
22565 });
22566 addParseToken('Y', function (input, array) {
22567 array[YEAR] = parseInt(input, 10);
22568 });
22546 22569
22547 function isLeapYear(year) { 22570 // HELPERS
22548 return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
22549 }
22550 22571
22551 // HOOKS 22572 function daysInYear(year) {
22573 return isLeapYear(year) ? 366 : 365;
22574 }
22552 22575
22553 utils_hooks__hooks.parseTwoDigitYear = function (input) { 22576 function isLeapYear(year) {
22554 return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); 22577 return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
22555 }; 22578 }
22556 22579
22557 // MOMENTS 22580 // HOOKS
22558 22581
22559 var getSetYear = makeGetSet('FullYear', true); 22582 hooks.parseTwoDigitYear = function (input) {
22583 return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
22584 };
22560 22585
22561 function getIsLeapYear () { 22586 // MOMENTS
22562 return isLeapYear(this.year());
22563 }
22564 22587
22565 function createDate (y, m, d, h, M, s, ms) { 22588 var getSetYear = makeGetSet('FullYear', true);
22566 //can't just apply() to create a date:
22567 //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply
22568 var date = new Date(y, m, d, h, M, s, ms);
22569 22589
22570 //the date constructor remaps years 0-99 to 1900-1999 22590 function getIsLeapYear () {
22571 if (y < 100 && y >= 0 && isFinite(date.getFullYear())) { 22591 return isLeapYear(this.year());
22572 date.setFullYear(y); 22592 }
22573 }
22574 return date;
22575 }
22576 22593
22577 function createUTCDate (y) { 22594 function createDate (y, m, d, h, M, s, ms) {
22578 var date = new Date(Date.UTC.apply(null, arguments)); 22595 //can't just apply() to create a date:
22596 //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply
22597 var date = new Date(y, m, d, h, M, s, ms);
22579 22598
22580 //the Date.UTC function remaps years 0-99 to 1900-1999 22599 //the date constructor remaps years 0-99 to 1900-1999
22581 if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) { 22600 if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
22582 date.setUTCFullYear(y); 22601 date.setFullYear(y);
22583 }
22584 return date;
22585 } 22602 }
22603 return date;
22604 }
22586 22605
22587 // start-of-first-week - start-of-year 22606 function createUTCDate (y) {
22588 function firstWeekOffset(year, dow, doy) { 22607 var date = new Date(Date.UTC.apply(null, arguments));
22589 var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
22590 fwd = 7 + dow - doy,
22591 // first-week day local weekday -- which local weekday is fwd
22592 fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
22593 22608
22594 return -fwdlw + fwd - 1; 22609 //the Date.UTC function remaps years 0-99 to 1900-1999
22610 if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
22611 date.setUTCFullYear(y);
22595 } 22612 }
22613 return date;
22614 }
22596 22615
22597 //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday 22616 // start-of-first-week - start-of-year
22598 function dayOfYearFromWeeks(year, week, weekday, dow, doy) { 22617 function firstWeekOffset(year, dow, doy) {
22599 var localWeekday = (7 + weekday - dow) % 7, 22618 var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
22600 weekOffset = firstWeekOffset(year, dow, doy), 22619 fwd = 7 + dow - doy,
22601 dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, 22620 // first-week day local weekday -- which local weekday is fwd
22602 resYear, resDayOfYear; 22621 fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
22603 22622
22604 if (dayOfYear <= 0) { 22623 return -fwdlw + fwd - 1;
22605 resYear = year - 1; 22624 }
22606 resDayOfYear = daysInYear(resYear) + dayOfYear;
22607 } else if (dayOfYear > daysInYear(year)) {
22608 resYear = year + 1;
22609 resDayOfYear = dayOfYear - daysInYear(year);
22610 } else {
22611 resYear = year;
22612 resDayOfYear = dayOfYear;
22613 }
22614 22625
22615 return { 22626 //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
22616 year: resYear, 22627 function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
22617 dayOfYear: resDayOfYear 22628 var localWeekday = (7 + weekday - dow) % 7,
22618 }; 22629 weekOffset = firstWeekOffset(year, dow, doy),
22619 } 22630 dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
22631 resYear, resDayOfYear;
22620 22632
22621 function weekOfYear(mom, dow, doy) { 22633 if (dayOfYear <= 0) {
22622 var weekOffset = firstWeekOffset(mom.year(), dow, doy), 22634 resYear = year - 1;
22623 week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, 22635 resDayOfYear = daysInYear(resYear) + dayOfYear;
22624 resWeek, resYear; 22636 } else if (dayOfYear > daysInYear(year)) {
22637 resYear = year + 1;
22638 resDayOfYear = dayOfYear - daysInYear(year);
22639 } else {
22640 resYear = year;
22641 resDayOfYear = dayOfYear;
22642 }
22625 22643
22626 if (week < 1) { 22644 return {
22627 resYear = mom.year() - 1; 22645 year: resYear,
22628 resWeek = week + weeksInYear(resYear, dow, doy); 22646 dayOfYear: resDayOfYear
22629 } else if (week > weeksInYear(mom.year(), dow, doy)) { 22647 };
22630 resWeek = week - weeksInYear(mom.year(), dow, doy); 22648 }
22631 resYear = mom.year() + 1;
22632 } else {
22633 resYear = mom.year();
22634 resWeek = week;
22635 }
22636 22649
22637 return { 22650 function weekOfYear(mom, dow, doy) {
22638 week: resWeek, 22651 var weekOffset = firstWeekOffset(mom.year(), dow, doy),
22639 year: resYear 22652 week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
22640 }; 22653 resWeek, resYear;
22641 }
22642 22654
22643 function weeksInYear(year, dow, doy) { 22655 if (week < 1) {
22644 var weekOffset = firstWeekOffset(year, dow, doy), 22656 resYear = mom.year() - 1;
22645 weekOffsetNext = firstWeekOffset(year + 1, dow, doy); 22657 resWeek = week + weeksInYear(resYear, dow, doy);
22646 return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; 22658 } else if (week > weeksInYear(mom.year(), dow, doy)) {
22659 resWeek = week - weeksInYear(mom.year(), dow, doy);
22660 resYear = mom.year() + 1;
22661 } else {
22662 resYear = mom.year();
22663 resWeek = week;
22647 } 22664 }
22648 22665
22649 // FORMATTING 22666 return {
22667 week: resWeek,
22668 year: resYear
22669 };
22670 }
22650 22671
22651 addFormatToken('w', ['ww', 2], 'wo', 'week'); 22672 function weeksInYear(year, dow, doy) {
22652 addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); 22673 var weekOffset = firstWeekOffset(year, dow, doy),
22674 weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
22675 return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
22676 }
22653 22677
22654 // ALIASES 22678 // FORMATTING
22655 22679
22656 addUnitAlias('week', 'w'); 22680 addFormatToken('w', ['ww', 2], 'wo', 'week');
22657 addUnitAlias('isoWeek', 'W'); 22681 addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
22658 22682
22659 // PRIORITIES 22683 // ALIASES
22660 22684
22661 addUnitPriority('week', 5); 22685 addUnitAlias('week', 'w');
22662 addUnitPriority('isoWeek', 5); 22686 addUnitAlias('isoWeek', 'W');
22663 22687
22664 // PARSING 22688 // PRIORITIES
22665 22689
22666 addRegexToken('w', match1to2); 22690 addUnitPriority('week', 5);
22667 addRegexToken('ww', match1to2, match2); 22691 addUnitPriority('isoWeek', 5);
22668 addRegexToken('W', match1to2);
22669 addRegexToken('WW', match1to2, match2);
22670 22692
22671 addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { 22693 // PARSING
22672 week[token.substr(0, 1)] = toInt(input);
22673 });
22674 22694
22675 // HELPERS 22695 addRegexToken('w', match1to2);
22696 addRegexToken('ww', match1to2, match2);
22697 addRegexToken('W', match1to2);
22698 addRegexToken('WW', match1to2, match2);
22676 22699
22677 // LOCALES 22700 addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {
22701 week[token.substr(0, 1)] = toInt(input);
22702 });
22678 22703
22679 function localeWeek (mom) { 22704 // HELPERS
22680 return weekOfYear(mom, this._week.dow, this._week.doy).week;
22681 }
22682 22705
22683 var defaultLocaleWeek = { 22706 // LOCALES
22684 dow : 0, // Sunday is the first day of the week.
22685 doy : 6 // The week that contains Jan 1st is the first week of the year.
22686 };
22687 22707
22688 function localeFirstDayOfWeek () { 22708 function localeWeek (mom) {
22689 return this._week.dow; 22709 return weekOfYear(mom, this._week.dow, this._week.doy).week;
22690 } 22710 }
22691 22711
22692 function localeFirstDayOfYear () { 22712 var defaultLocaleWeek = {
22693 return this._week.doy; 22713 dow : 0, // Sunday is the first day of the week.
22694 } 22714 doy : 6 // The week that contains Jan 1st is the first week of the year.
22715 };
22695 22716
22696 // MOMENTS 22717 function localeFirstDayOfWeek () {
22718 return this._week.dow;
22719 }
22697 22720
22698 function getSetWeek (input) { 22721 function localeFirstDayOfYear () {
22699 var week = this.localeData().week(this); 22722 return this._week.doy;
22700 return input == null ? week : this.add((input - week) * 7, 'd'); 22723 }
22701 }
22702 22724
22703 function getSetISOWeek (input) { 22725 // MOMENTS
22704 var week = weekOfYear(this, 1, 4).week;
22705 return input == null ? week : this.add((input - week) * 7, 'd');
22706 }
22707 22726
22708 // FORMATTING 22727 function getSetWeek (input) {
22728 var week = this.localeData().week(this);
22729 return input == null ? week : this.add((input - week) * 7, 'd');
22730 }
22709 22731
22710 addFormatToken('d', 0, 'do', 'day'); 22732 function getSetISOWeek (input) {
22733 var week = weekOfYear(this, 1, 4).week;
22734 return input == null ? week : this.add((input - week) * 7, 'd');
22735 }
22711 22736
22712 addFormatToken('dd', 0, 0, function (format) { 22737 // FORMATTING
22713 return this.localeData().weekdaysMin(this, format);
22714 });
22715 22738
22716 addFormatToken('ddd', 0, 0, function (format) { 22739 addFormatToken('d', 0, 'do', 'day');
22717 return this.localeData().weekdaysShort(this, format);
22718 });
22719 22740
22720 addFormatToken('dddd', 0, 0, function (format) { 22741 addFormatToken('dd', 0, 0, function (format) {
22721 return this.localeData().weekdays(this, format); 22742 return this.localeData().weekdaysMin(this, format);
22722 }); 22743 });
22723 22744
22724 addFormatToken('e', 0, 0, 'weekday'); 22745 addFormatToken('ddd', 0, 0, function (format) {
22725 addFormatToken('E', 0, 0, 'isoWeekday'); 22746 return this.localeData().weekdaysShort(this, format);
22747 });
22726 22748
22727 // ALIASES 22749 addFormatToken('dddd', 0, 0, function (format) {
22750 return this.localeData().weekdays(this, format);
22751 });
22728 22752
22729 addUnitAlias('day', 'd'); 22753 addFormatToken('e', 0, 0, 'weekday');
22730 addUnitAlias('weekday', 'e'); 22754 addFormatToken('E', 0, 0, 'isoWeekday');
22731 addUnitAlias('isoWeekday', 'E');
22732 22755
22733 // PRIORITY 22756 // ALIASES
22734 addUnitPriority('day', 11);
22735 addUnitPriority('weekday', 11);
22736 addUnitPriority('isoWeekday', 11);
22737 22757
22738 // PARSING 22758 addUnitAlias('day', 'd');
22759 addUnitAlias('weekday', 'e');
22760 addUnitAlias('isoWeekday', 'E');
22739 22761
22740 addRegexToken('d', match1to2); 22762 // PRIORITY
22741 addRegexToken('e', match1to2); 22763 addUnitPriority('day', 11);
22742 addRegexToken('E', match1to2); 22764 addUnitPriority('weekday', 11);
22743 addRegexToken('dd', function (isStrict, locale) { 22765 addUnitPriority('isoWeekday', 11);
22744 return locale.weekdaysMinRegex(isStrict);
22745 });
22746 addRegexToken('ddd', function (isStrict, locale) {
22747 return locale.weekdaysShortRegex(isStrict);
22748 });
22749 addRegexToken('dddd', function (isStrict, locale) {
22750 return locale.weekdaysRegex(isStrict);
22751 });
22752 22766
22753 addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { 22767 // PARSING
22754 var weekday = config._locale.weekdaysParse(input, token, config._strict);
22755 // if we didn't get a weekday name, mark the date as invalid
22756 if (weekday != null) {
22757 week.d = weekday;
22758 } else {
22759 getParsingFlags(config).invalidWeekday = input;
22760 }
22761 });
22762 22768
22763 addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { 22769 addRegexToken('d', match1to2);
22764 week[token] = toInt(input); 22770 addRegexToken('e', match1to2);
22765 }); 22771 addRegexToken('E', match1to2);
22772 addRegexToken('dd', function (isStrict, locale) {
22773 return locale.weekdaysMinRegex(isStrict);
22774 });
22775 addRegexToken('ddd', function (isStrict, locale) {
22776 return locale.weekdaysShortRegex(isStrict);
22777 });
22778 addRegexToken('dddd', function (isStrict, locale) {
22779 return locale.weekdaysRegex(isStrict);
22780 });
22766 22781
22767 // HELPERS 22782 addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
22783 var weekday = config._locale.weekdaysParse(input, token, config._strict);
22784 // if we didn't get a weekday name, mark the date as invalid
22785 if (weekday != null) {
22786 week.d = weekday;
22787 } else {
22788 getParsingFlags(config).invalidWeekday = input;
22789 }
22790 });
22768 22791
22769 function parseWeekday(input, locale) { 22792 addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
22770 if (typeof input !== 'string') { 22793 week[token] = toInt(input);
22771 return input; 22794 });
22772 }
22773 22795
22774 if (!isNaN(input)) { 22796 // HELPERS
22775 return parseInt(input, 10);
22776 }
22777 22797
22778 input = locale.weekdaysParse(input); 22798 function parseWeekday(input, locale) {
22779 if (typeof input === 'number') { 22799 if (typeof input !== 'string') {
22780 return input; 22800 return input;
22781 } 22801 }
22782 22802
22783 return null; 22803 if (!isNaN(input)) {
22804 return parseInt(input, 10);
22784 } 22805 }
22785 22806
22786 function parseIsoWeekday(input, locale) { 22807 input = locale.weekdaysParse(input);
22787 if (typeof input === 'string') { 22808 if (typeof input === 'number') {
22788 return locale.weekdaysParse(input) % 7 || 7; 22809 return input;
22789 }
22790 return isNaN(input) ? null : input;
22791 } 22810 }
22792 22811
22793 // LOCALES 22812 return null;
22813 }
22794 22814
22795 var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); 22815 function parseIsoWeekday(input, locale) {
22796 function localeWeekdays (m, format) { 22816 if (typeof input === 'string') {
22797 return isArray(this._weekdays) ? this._weekdays[m.day()] : 22817 return locale.weekdaysParse(input) % 7 || 7;
22798 this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];
22799 } 22818 }
22819 return isNaN(input) ? null : input;
22820 }
22800 22821
22801 var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); 22822 // LOCALES
22802 function localeWeekdaysShort (m) {
22803 return this._weekdaysShort[m.day()];
22804 }
22805 22823
22806 var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); 22824 var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
22807 function localeWeekdaysMin (m) { 22825 function localeWeekdays (m, format) {
22808 return this._weekdaysMin[m.day()]; 22826 if (!m) {
22827 return this._weekdays;
22809 } 22828 }
22829 return isArray(this._weekdays) ? this._weekdays[m.day()] :
22830 this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];
22831 }
22832
22833 var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');
22834 function localeWeekdaysShort (m) {
22835 return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;
22836 }
22810 22837
22811 function day_of_week__handleStrictParse(weekdayName, format, strict) { 22838 var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');
22812 var i, ii, mom, llc = weekdayName.toLocaleLowerCase(); 22839 function localeWeekdaysMin (m) {
22813 if (!this._weekdaysParse) { 22840 return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;
22814 this._weekdaysParse = []; 22841 }
22815 this._shortWeekdaysParse = [];
22816 this._minWeekdaysParse = [];
22817 22842
22818 for (i = 0; i < 7; ++i) { 22843 function handleStrictParse$1(weekdayName, format, strict) {
22819 mom = create_utc__createUTC([2000, 1]).day(i); 22844 var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
22820 this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); 22845 if (!this._weekdaysParse) {
22821 this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); 22846 this._weekdaysParse = [];
22822 this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); 22847 this._shortWeekdaysParse = [];
22823 } 22848 this._minWeekdaysParse = [];
22849
22850 for (i = 0; i < 7; ++i) {
22851 mom = createUTC([2000, 1]).day(i);
22852 this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();
22853 this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();
22854 this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
22824 } 22855 }
22856 }
22825 22857
22826 if (strict) { 22858 if (strict) {
22827 if (format === 'dddd') { 22859 if (format === 'dddd') {
22828 ii = indexOf.call(this._weekdaysParse, llc); 22860 ii = indexOf$1.call(this._weekdaysParse, llc);
22829 return ii !== -1 ? ii : null; 22861 return ii !== -1 ? ii : null;
22830 } else if (format === 'ddd') { 22862 } else if (format === 'ddd') {
22831 ii = indexOf.call(this._shortWeekdaysParse, llc); 22863 ii = indexOf$1.call(this._shortWeekdaysParse, llc);
22832 return ii !== -1 ? ii : null; 22864 return ii !== -1 ? ii : null;
22833 } else { 22865 } else {
22834 ii = indexOf.call(this._minWeekdaysParse, llc); 22866 ii = indexOf$1.call(this._minWeekdaysParse, llc);
22835 return ii !== -1 ? ii : null; 22867 return ii !== -1 ? ii : null;
22868 }
22869 } else {
22870 if (format === 'dddd') {
22871 ii = indexOf$1.call(this._weekdaysParse, llc);
22872 if (ii !== -1) {
22873 return ii;
22836 } 22874 }
22875 ii = indexOf$1.call(this._shortWeekdaysParse, llc);
22876 if (ii !== -1) {
22877 return ii;
22878 }
22879 ii = indexOf$1.call(this._minWeekdaysParse, llc);
22880 return ii !== -1 ? ii : null;
22881 } else if (format === 'ddd') {
22882 ii = indexOf$1.call(this._shortWeekdaysParse, llc);
22883 if (ii !== -1) {
22884 return ii;
22885 }
22886 ii = indexOf$1.call(this._weekdaysParse, llc);
22887 if (ii !== -1) {
22888 return ii;
22889 }
22890 ii = indexOf$1.call(this._minWeekdaysParse, llc);
22891 return ii !== -1 ? ii : null;
22837 } else { 22892 } else {
22838 if (format === 'dddd') { 22893 ii = indexOf$1.call(this._minWeekdaysParse, llc);
22839 ii = indexOf.call(this._weekdaysParse, llc); 22894 if (ii !== -1) {
22840 if (ii !== -1) { 22895 return ii;
22841 return ii;
22842 }
22843 ii = indexOf.call(this._shortWeekdaysParse, llc);
22844 if (ii !== -1) {
22845 return ii;
22846 }
22847 ii = indexOf.call(this._minWeekdaysParse, llc);
22848 return ii !== -1 ? ii : null;
22849 } else if (format === 'ddd') {
22850 ii = indexOf.call(this._shortWeekdaysParse, llc);
22851 if (ii !== -1) {
22852 return ii;
22853 }
22854 ii = indexOf.call(this._weekdaysParse, llc);
22855 if (ii !== -1) {
22856 return ii;
22857 }
22858 ii = indexOf.call(this._minWeekdaysParse, llc);
22859 return ii !== -1 ? ii : null;
22860 } else {
22861 ii = indexOf.call(this._minWeekdaysParse, llc);
22862 if (ii !== -1) {
22863 return ii;
22864 }
22865 ii = indexOf.call(this._weekdaysParse, llc);
22866 if (ii !== -1) {
22867 return ii;
22868 }
22869 ii = indexOf.call(this._shortWeekdaysParse, llc);
22870 return ii !== -1 ? ii : null;
22871 } 22896 }
22897 ii = indexOf$1.call(this._weekdaysParse, llc);
22898 if (ii !== -1) {
22899 return ii;
22900 }
22901 ii = indexOf$1.call(this._shortWeekdaysParse, llc);
22902 return ii !== -1 ? ii : null;
22872 } 22903 }
22873 } 22904 }
22905 }
22874 22906
22875 function localeWeekdaysParse (weekdayName, format, strict) { 22907 function localeWeekdaysParse (weekdayName, format, strict) {
22876 var i, mom, regex; 22908 var i, mom, regex;
22877 22909
22878 if (this._weekdaysParseExact) { 22910 if (this._weekdaysParseExact) {
22879 return day_of_week__handleStrictParse.call(this, weekdayName, format, strict); 22911 return handleStrictParse$1.call(this, weekdayName, format, strict);
22880 } 22912 }
22881 22913
22882 if (!this._weekdaysParse) { 22914 if (!this._weekdaysParse) {
22883 this._weekdaysParse = []; 22915 this._weekdaysParse = [];
22884 this._minWeekdaysParse = []; 22916 this._minWeekdaysParse = [];
22885 this._shortWeekdaysParse = []; 22917 this._shortWeekdaysParse = [];
22886 this._fullWeekdaysParse = []; 22918 this._fullWeekdaysParse = [];
22887 } 22919 }
22888 22920
22889 for (i = 0; i < 7; i++) { 22921 for (i = 0; i < 7; i++) {
22890 // make the regex if we don't have it already 22922 // make the regex if we don't have it already
22891 22923
22892 mom = create_utc__createUTC([2000, 1]).day(i); 22924 mom = createUTC([2000, 1]).day(i);
22893 if (strict && !this._fullWeekdaysParse[i]) { 22925 if (strict && !this._fullWeekdaysParse[i]) {
22894 this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i'); 22926 this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i');
22895 this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i'); 22927 this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i');
22896 this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i'); 22928 this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i');
22897 } 22929 }
22898 if (!this._weekdaysParse[i]) { 22930 if (!this._weekdaysParse[i]) {
22899 regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); 22931 regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
22900 this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); 22932 this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
22901 } 22933 }
22902 // test the regex 22934 // test the regex
22903 if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { 22935 if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {
22904 return i; 22936 return i;
22905 } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { 22937 } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {
22906 return i; 22938 return i;
22907 } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { 22939 } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {
22908 return i; 22940 return i;
22909 } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { 22941 } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
22910 return i; 22942 return i;
22911 }
22912 } 22943 }
22913 } 22944 }
22945 }
22914 22946
22915 // MOMENTS 22947 // MOMENTS
22916 22948
22917 function getSetDayOfWeek (input) { 22949 function getSetDayOfWeek (input) {
22918 if (!this.isValid()) { 22950 if (!this.isValid()) {
22919 return input != null ? this : NaN; 22951 return input != null ? this : NaN;
22920 }
22921 var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
22922 if (input != null) {
22923 input = parseWeekday(input, this.localeData());
22924 return this.add(input - day, 'd');
22925 } else {
22926 return day;
22927 }
22928 } 22952 }
22953 var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
22954 if (input != null) {
22955 input = parseWeekday(input, this.localeData());
22956 return this.add(input - day, 'd');
22957 } else {
22958 return day;
22959 }
22960 }
22929 22961
22930 function getSetLocaleDayOfWeek (input) { 22962 function getSetLocaleDayOfWeek (input) {
22931 if (!this.isValid()) { 22963 if (!this.isValid()) {
22932 return input != null ? this : NaN; 22964 return input != null ? this : NaN;
22933 }
22934 var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
22935 return input == null ? weekday : this.add(input - weekday, 'd');
22936 } 22965 }
22966 var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
22967 return input == null ? weekday : this.add(input - weekday, 'd');
22968 }
22937 22969
22938 function getSetISODayOfWeek (input) { 22970 function getSetISODayOfWeek (input) {
22939 if (!this.isValid()) { 22971 if (!this.isValid()) {
22940 return input != null ? this : NaN; 22972 return input != null ? this : NaN;
22941 } 22973 }
22942 22974
22943 // behaves the same as moment#day except 22975 // behaves the same as moment#day except
22944 // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) 22976 // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
22945 // as a setter, sunday should belong to the previous week. 22977 // as a setter, sunday should belong to the previous week.
22946 22978
22947 if (input != null) { 22979 if (input != null) {
22948 var weekday = parseIsoWeekday(input, this.localeData()); 22980 var weekday = parseIsoWeekday(input, this.localeData());
22949 return this.day(this.day() % 7 ? weekday : weekday - 7); 22981 return this.day(this.day() % 7 ? weekday : weekday - 7);
22950 } else { 22982 } else {
22951 return this.day() || 7; 22983 return this.day() || 7;
22952 }
22953 } 22984 }
22985 }
22954 22986
22955 var defaultWeekdaysRegex = matchWord; 22987 var defaultWeekdaysRegex = matchWord;
22956 function weekdaysRegex (isStrict) { 22988 function weekdaysRegex (isStrict) {
22957 if (this._weekdaysParseExact) { 22989 if (this._weekdaysParseExact) {
22958 if (!hasOwnProp(this, '_weekdaysRegex')) { 22990 if (!hasOwnProp(this, '_weekdaysRegex')) {
22959 computeWeekdaysParse.call(this); 22991 computeWeekdaysParse.call(this);
22960 } 22992 }
22961 if (isStrict) { 22993 if (isStrict) {
22962 return this._weekdaysStrictRegex; 22994 return this._weekdaysStrictRegex;
22963 } else {
22964 return this._weekdaysRegex;
22965 }
22966 } else { 22995 } else {
22967 if (!hasOwnProp(this, '_weekdaysRegex')) { 22996 return this._weekdaysRegex;
22968 this._weekdaysRegex = defaultWeekdaysRegex;
22969 }
22970 return this._weekdaysStrictRegex && isStrict ?
22971 this._weekdaysStrictRegex : this._weekdaysRegex;
22972 } 22997 }
22998 } else {
22999 if (!hasOwnProp(this, '_weekdaysRegex')) {
23000 this._weekdaysRegex = defaultWeekdaysRegex;
23001 }
23002 return this._weekdaysStrictRegex && isStrict ?
23003 this._weekdaysStrictRegex : this._weekdaysRegex;
22973 } 23004 }
23005 }
22974 23006
22975 var defaultWeekdaysShortRegex = matchWord; 23007 var defaultWeekdaysShortRegex = matchWord;
22976 function weekdaysShortRegex (isStrict) { 23008 function weekdaysShortRegex (isStrict) {
22977 if (this._weekdaysParseExact) { 23009 if (this._weekdaysParseExact) {
22978 if (!hasOwnProp(this, '_weekdaysRegex')) { 23010 if (!hasOwnProp(this, '_weekdaysRegex')) {
22979 computeWeekdaysParse.call(this); 23011 computeWeekdaysParse.call(this);
22980 } 23012 }
22981 if (isStrict) { 23013 if (isStrict) {
22982 return this._weekdaysShortStrictRegex; 23014 return this._weekdaysShortStrictRegex;
22983 } else {
22984 return this._weekdaysShortRegex;
22985 }
22986 } else { 23015 } else {
22987 if (!hasOwnProp(this, '_weekdaysShortRegex')) { 23016 return this._weekdaysShortRegex;
22988 this._weekdaysShortRegex = defaultWeekdaysShortRegex; 23017 }
22989 } 23018 } else {
22990 return this._weekdaysShortStrictRegex && isStrict ? 23019 if (!hasOwnProp(this, '_weekdaysShortRegex')) {
22991 this._weekdaysShortStrictRegex : this._weekdaysShortRegex; 23020 this._weekdaysShortRegex = defaultWeekdaysShortRegex;
22992 } 23021 }
23022 return this._weekdaysShortStrictRegex && isStrict ?
23023 this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
22993 } 23024 }
23025 }
22994 23026
22995 var defaultWeekdaysMinRegex = matchWord; 23027 var defaultWeekdaysMinRegex = matchWord;
22996 function weekdaysMinRegex (isStrict) { 23028 function weekdaysMinRegex (isStrict) {
22997 if (this._weekdaysParseExact) { 23029 if (this._weekdaysParseExact) {
22998 if (!hasOwnProp(this, '_weekdaysRegex')) { 23030 if (!hasOwnProp(this, '_weekdaysRegex')) {
22999 computeWeekdaysParse.call(this); 23031 computeWeekdaysParse.call(this);
23000 } 23032 }
23001 if (isStrict) { 23033 if (isStrict) {
23002 return this._weekdaysMinStrictRegex; 23034 return this._weekdaysMinStrictRegex;
23003 } else {
23004 return this._weekdaysMinRegex;
23005 }
23006 } else { 23035 } else {
23007 if (!hasOwnProp(this, '_weekdaysMinRegex')) { 23036 return this._weekdaysMinRegex;
23008 this._weekdaysMinRegex = defaultWeekdaysMinRegex;
23009 }
23010 return this._weekdaysMinStrictRegex && isStrict ?
23011 this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
23012 } 23037 }
23038 } else {
23039 if (!hasOwnProp(this, '_weekdaysMinRegex')) {
23040 this._weekdaysMinRegex = defaultWeekdaysMinRegex;
23041 }
23042 return this._weekdaysMinStrictRegex && isStrict ?
23043 this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
23013 } 23044 }
23045 }
23014 23046
23015 23047
23016 function computeWeekdaysParse () { 23048 function computeWeekdaysParse () {
23017 function cmpLenRev(a, b) { 23049 function cmpLenRev(a, b) {
23018 return b.length - a.length; 23050 return b.length - a.length;
23019 } 23051 }
23020 23052
23021 var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], 23053 var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],
23022 i, mom, minp, shortp, longp; 23054 i, mom, minp, shortp, longp;
23023 for (i = 0; i < 7; i++) { 23055 for (i = 0; i < 7; i++) {
23024 // make the regex if we don't have it already 23056 // make the regex if we don't have it already
23025 mom = create_utc__createUTC([2000, 1]).day(i); 23057 mom = createUTC([2000, 1]).day(i);
23026 minp = this.weekdaysMin(mom, ''); 23058 minp = this.weekdaysMin(mom, '');
23027 shortp = this.weekdaysShort(mom, ''); 23059 shortp = this.weekdaysShort(mom, '');
23028 longp = this.weekdays(mom, ''); 23060 longp = this.weekdays(mom, '');
23029 minPieces.push(minp); 23061 minPieces.push(minp);
23030 shortPieces.push(shortp); 23062 shortPieces.push(shortp);
23031 longPieces.push(longp); 23063 longPieces.push(longp);
23032 mixedPieces.push(minp); 23064 mixedPieces.push(minp);
23033 mixedPieces.push(shortp); 23065 mixedPieces.push(shortp);
23034 mixedPieces.push(longp); 23066 mixedPieces.push(longp);
23035 } 23067 }
23036 // Sorting makes sure if one weekday (or abbr) is a prefix of another it 23068 // Sorting makes sure if one weekday (or abbr) is a prefix of another it
23037 // will match the longer piece. 23069 // will match the longer piece.
23038 minPieces.sort(cmpLenRev); 23070 minPieces.sort(cmpLenRev);
23039 shortPieces.sort(cmpLenRev); 23071 shortPieces.sort(cmpLenRev);
23040 longPieces.sort(cmpLenRev); 23072 longPieces.sort(cmpLenRev);
23041 mixedPieces.sort(cmpLenRev); 23073 mixedPieces.sort(cmpLenRev);
23042 for (i = 0; i < 7; i++) { 23074 for (i = 0; i < 7; i++) {
23043 shortPieces[i] = regexEscape(shortPieces[i]); 23075 shortPieces[i] = regexEscape(shortPieces[i]);
23044 longPieces[i] = regexEscape(longPieces[i]); 23076 longPieces[i] = regexEscape(longPieces[i]);
23045 mixedPieces[i] = regexEscape(mixedPieces[i]); 23077 mixedPieces[i] = regexEscape(mixedPieces[i]);
23046 } 23078 }
23047 23079
23048 this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); 23080 this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
23049 this._weekdaysShortRegex = this._weekdaysRegex; 23081 this._weekdaysShortRegex = this._weekdaysRegex;
23050 this._weekdaysMinRegex = this._weekdaysRegex; 23082 this._weekdaysMinRegex = this._weekdaysRegex;
23051 23083
23052 this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); 23084 this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
23053 this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); 23085 this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
23054 this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); 23086 this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');
23055 } 23087 }
23056 23088
23057 // FORMATTING 23089 // FORMATTING
23058 23090
23059 function hFormat() { 23091 function hFormat() {
23060 return this.hours() % 12 || 12; 23092 return this.hours() % 12 || 12;
23061 } 23093 }
23062 23094
23063 function kFormat() { 23095 function kFormat() {
23064 return this.hours() || 24; 23096 return this.hours() || 24;
23065 } 23097 }
23066 23098
23067 addFormatToken('H', ['HH', 2], 0, 'hour'); 23099 addFormatToken('H', ['HH', 2], 0, 'hour');
23068 addFormatToken('h', ['hh', 2], 0, hFormat); 23100 addFormatToken('h', ['hh', 2], 0, hFormat);
23069 addFormatToken('k', ['kk', 2], 0, kFormat); 23101 addFormatToken('k', ['kk', 2], 0, kFormat);
23070 23102
23071 addFormatToken('hmm', 0, 0, function () { 23103 addFormatToken('hmm', 0, 0, function () {
23072 return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); 23104 return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
23073 }); 23105 });
23074 23106
23075 addFormatToken('hmmss', 0, 0, function () { 23107 addFormatToken('hmmss', 0, 0, function () {
23076 return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + 23108 return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +
23077 zeroFill(this.seconds(), 2); 23109 zeroFill(this.seconds(), 2);
23078 }); 23110 });
23079 23111
23080 addFormatToken('Hmm', 0, 0, function () { 23112 addFormatToken('Hmm', 0, 0, function () {
23081 return '' + this.hours() + zeroFill(this.minutes(), 2); 23113 return '' + this.hours() + zeroFill(this.minutes(), 2);
23082 }); 23114 });
23083 23115
23084 addFormatToken('Hmmss', 0, 0, function () { 23116 addFormatToken('Hmmss', 0, 0, function () {
23085 return '' + this.hours() + zeroFill(this.minutes(), 2) + 23117 return '' + this.hours() + zeroFill(this.minutes(), 2) +
23086 zeroFill(this.seconds(), 2); 23118 zeroFill(this.seconds(), 2);
23119 });
23120
23121 function meridiem (token, lowercase) {
23122 addFormatToken(token, 0, 0, function () {
23123 return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);
23087 }); 23124 });
23125 }
23088 23126
23089 function meridiem (token, lowercase) { 23127 meridiem('a', true);
23090 addFormatToken(token, 0, 0, function () { 23128 meridiem('A', false);
23091 return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);
23092 });
23093 }
23094 23129
23095 meridiem('a', true); 23130 // ALIASES
23096 meridiem('A', false);
23097 23131
23098 // ALIASES 23132 addUnitAlias('hour', 'h');
23099 23133
23100 addUnitAlias('hour', 'h'); 23134 // PRIORITY
23135 addUnitPriority('hour', 13);
23101 23136
23102 // PRIORITY 23137 // PARSING
23103 addUnitPriority('hour', 13);
23104 23138
23105 // PARSING 23139 function matchMeridiem (isStrict, locale) {
23140 return locale._meridiemParse;
23141 }
23106 23142
23107 function matchMeridiem (isStrict, locale) { 23143 addRegexToken('a', matchMeridiem);
23108 return locale._meridiemParse; 23144 addRegexToken('A', matchMeridiem);
23109 } 23145 addRegexToken('H', match1to2);
23146 addRegexToken('h', match1to2);
23147 addRegexToken('HH', match1to2, match2);
23148 addRegexToken('hh', match1to2, match2);
23110 23149
23111 addRegexToken('a', matchMeridiem); 23150 addRegexToken('hmm', match3to4);
23112 addRegexToken('A', matchMeridiem); 23151 addRegexToken('hmmss', match5to6);
23113 addRegexToken('H', match1to2); 23152 addRegexToken('Hmm', match3to4);
23114 addRegexToken('h', match1to2); 23153 addRegexToken('Hmmss', match5to6);
23115 addRegexToken('HH', match1to2, match2);
23116 addRegexToken('hh', match1to2, match2);
23117 23154
23118 addRegexToken('hmm', match3to4); 23155 addParseToken(['H', 'HH'], HOUR);
23119 addRegexToken('hmmss', match5to6); 23156 addParseToken(['a', 'A'], function (input, array, config) {
23120 addRegexToken('Hmm', match3to4); 23157 config._isPm = config._locale.isPM(input);
23121 addRegexToken('Hmmss', match5to6); 23158 config._meridiem = input;
23159 });
23160 addParseToken(['h', 'hh'], function (input, array, config) {
23161 array[HOUR] = toInt(input);
23162 getParsingFlags(config).bigHour = true;
23163 });
23164 addParseToken('hmm', function (input, array, config) {
23165 var pos = input.length - 2;
23166 array[HOUR] = toInt(input.substr(0, pos));
23167 array[MINUTE] = toInt(input.substr(pos));
23168 getParsingFlags(config).bigHour = true;
23169 });
23170 addParseToken('hmmss', function (input, array, config) {
23171 var pos1 = input.length - 4;
23172 var pos2 = input.length - 2;
23173 array[HOUR] = toInt(input.substr(0, pos1));
23174 array[MINUTE] = toInt(input.substr(pos1, 2));
23175 array[SECOND] = toInt(input.substr(pos2));
23176 getParsingFlags(config).bigHour = true;
23177 });
23178 addParseToken('Hmm', function (input, array, config) {
23179 var pos = input.length - 2;
23180 array[HOUR] = toInt(input.substr(0, pos));
23181 array[MINUTE] = toInt(input.substr(pos));
23182 });
23183 addParseToken('Hmmss', function (input, array, config) {
23184 var pos1 = input.length - 4;
23185 var pos2 = input.length - 2;
23186 array[HOUR] = toInt(input.substr(0, pos1));
23187 array[MINUTE] = toInt(input.substr(pos1, 2));
23188 array[SECOND] = toInt(input.substr(pos2));
23189 });
23122 23190
23123 addParseToken(['H', 'HH'], HOUR); 23191 // LOCALES
23124 addParseToken(['a', 'A'], function (input, array, config) {
23125 config._isPm = config._locale.isPM(input);
23126 config._meridiem = input;
23127 });
23128 addParseToken(['h', 'hh'], function (input, array, config) {
23129 array[HOUR] = toInt(input);
23130 getParsingFlags(config).bigHour = true;
23131 });
23132 addParseToken('hmm', function (input, array, config) {
23133 var pos = input.length - 2;
23134 array[HOUR] = toInt(input.substr(0, pos));
23135 array[MINUTE] = toInt(input.substr(pos));
23136 getParsingFlags(config).bigHour = true;
23137 });
23138 addParseToken('hmmss', function (input, array, config) {
23139 var pos1 = input.length - 4;
23140 var pos2 = input.length - 2;
23141 array[HOUR] = toInt(input.substr(0, pos1));
23142 array[MINUTE] = toInt(input.substr(pos1, 2));
23143 array[SECOND] = toInt(input.substr(pos2));
23144 getParsingFlags(config).bigHour = true;
23145 });
23146 addParseToken('Hmm', function (input, array, config) {
23147 var pos = input.length - 2;
23148 array[HOUR] = toInt(input.substr(0, pos));
23149 array[MINUTE] = toInt(input.substr(pos));
23150 });
23151 addParseToken('Hmmss', function (input, array, config) {
23152 var pos1 = input.length - 4;
23153 var pos2 = input.length - 2;
23154 array[HOUR] = toInt(input.substr(0, pos1));
23155 array[MINUTE] = toInt(input.substr(pos1, 2));
23156 array[SECOND] = toInt(input.substr(pos2));
23157 });
23158 23192
23159 // LOCALES 23193 function localeIsPM (input) {
23194 // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
23195 // Using charAt should be more compatible.
23196 return ((input + '').toLowerCase().charAt(0) === 'p');
23197 }
23160 23198
23161 function localeIsPM (input) { 23199 var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i;
23162 // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays 23200 function localeMeridiem (hours, minutes, isLower) {
23163 // Using charAt should be more compatible. 23201 if (hours > 11) {
23164 return ((input + '').toLowerCase().charAt(0) === 'p'); 23202 return isLower ? 'pm' : 'PM';
23203 } else {
23204 return isLower ? 'am' : 'AM';
23165 } 23205 }
23206 }
23166 23207
23167 var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i;
23168 function localeMeridiem (hours, minutes, isLower) {
23169 if (hours > 11) {
23170 return isLower ? 'pm' : 'PM';
23171 } else {
23172 return isLower ? 'am' : 'AM';
23173 }
23174 }
23175 23208
23209 // MOMENTS
23176 23210
23177 // MOMENTS 23211 // Setting the hour should keep the time, because the user explicitly
23212 // specified which hour he wants. So trying to maintain the same hour (in
23213 // a new timezone) makes sense. Adding/subtracting hours does not follow
23214 // this rule.
23215 var getSetHour = makeGetSet('Hours', true);
23178 23216
23179 // Setting the hour should keep the time, because the user explicitly 23217 // months
23180 // specified which hour he wants. So trying to maintain the same hour (in 23218 // week
23181 // a new timezone) makes sense. Adding/subtracting hours does not follow 23219 // weekdays
23182 // this rule. 23220 // meridiem
23183 var getSetHour = makeGetSet('Hours', true); 23221 var baseConfig = {
23222 calendar: defaultCalendar,
23223 longDateFormat: defaultLongDateFormat,
23224 invalidDate: defaultInvalidDate,
23225 ordinal: defaultOrdinal,
23226 ordinalParse: defaultOrdinalParse,
23227 relativeTime: defaultRelativeTime,
23184 23228
23185 var baseConfig = { 23229 months: defaultLocaleMonths,
23186 calendar: defaultCalendar, 23230 monthsShort: defaultLocaleMonthsShort,
23187 longDateFormat: defaultLongDateFormat,
23188 invalidDate: defaultInvalidDate,
23189 ordinal: defaultOrdinal,
23190 ordinalParse: defaultOrdinalParse,
23191 relativeTime: defaultRelativeTime,
23192 23231
23193 months: defaultLocaleMonths, 23232 week: defaultLocaleWeek,
23194 monthsShort: defaultLocaleMonthsShort,
23195 23233
23196 week: defaultLocaleWeek, 23234 weekdays: defaultLocaleWeekdays,
23235 weekdaysMin: defaultLocaleWeekdaysMin,
23236 weekdaysShort: defaultLocaleWeekdaysShort,
23197 23237
23198 weekdays: defaultLocaleWeekdays, 23238 meridiemParse: defaultLocaleMeridiemParse
23199 weekdaysMin: defaultLocaleWeekdaysMin, 23239 };
23200 weekdaysShort: defaultLocaleWeekdaysShort,
23201 23240
23202 meridiemParse: defaultLocaleMeridiemParse 23241 // internal storage for locale config files
23203 }; 23242 var locales = {};
23243 var localeFamilies = {};
23244 var globalLocale;
23204 23245
23205 // internal storage for locale config files 23246 function normalizeLocale(key) {
23206 var locales = {}; 23247 return key ? key.toLowerCase().replace('_', '-') : key;
23207 var globalLocale; 23248 }
23208 23249
23209 function normalizeLocale(key) { 23250 // pick the locale from the array
23210 return key ? key.toLowerCase().replace('_', '-') : key; 23251 // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
23211 } 23252 // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
23212 23253 function chooseLocale(names) {
23213 // pick the locale from the array 23254 var i = 0, j, next, locale, split;
23214 // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each 23255
23215 // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root 23256 while (i < names.length) {
23216 function chooseLocale(names) { 23257 split = normalizeLocale(names[i]).split('-');
23217 var i = 0, j, next, locale, split; 23258 j = split.length;
23218 23259 next = normalizeLocale(names[i + 1]);
23219 while (i < names.length) { 23260 next = next ? next.split('-') : null;
23220 split = normalizeLocale(names[i]).split('-'); 23261 while (j > 0) {
23221 j = split.length; 23262 locale = loadLocale(split.slice(0, j).join('-'));
23222 next = normalizeLocale(names[i + 1]); 23263 if (locale) {
23223 next = next ? next.split('-') : null; 23264 return locale;
23224 while (j > 0) { 23265 }
23225 locale = loadLocale(split.slice(0, j).join('-')); 23266 if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
23226 if (locale) { 23267 //the next array item is better than a shallower substring of this one
23227 return locale; 23268 break;
23228 }
23229 if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
23230 //the next array item is better than a shallower substring of this one
23231 break;
23232 }
23233 j--;
23234 } 23269 }
23235 i++; 23270 j--;
23236 } 23271 }
23237 return null; 23272 i++;
23238 } 23273 }
23274 return null;
23275 }
23239 23276
23240 function loadLocale(name) { 23277 function loadLocale(name) {
23241 var oldLocale = null; 23278 var oldLocale = null;
23242 // TODO: Find a better way to register and load all the locales in Node 23279 // TODO: Find a better way to register and load all the locales in Node
23243 if (!locales[name] && (typeof module !== 'undefined') && 23280 if (!locales[name] && (typeof module !== 'undefined') &&
23244 module && module.exports) { 23281 module && module.exports) {
23245 try { 23282 try {
23246 oldLocale = globalLocale._abbr; 23283 oldLocale = globalLocale._abbr;
23247 require('./locale/' + name); 23284 require('./locale/' + name);
23248 // because defineLocale currently also sets the global locale, we 23285 // because defineLocale currently also sets the global locale, we
23249 // want to undo that for lazy loaded locales 23286 // want to undo that for lazy loaded locales
23250 locale_locales__getSetGlobalLocale(oldLocale); 23287 getSetGlobalLocale(oldLocale);
23251 } catch (e) { } 23288 } catch (e) { }
23252 }
23253 return locales[name];
23254 } 23289 }
23290 return locales[name];
23291 }
23255 23292
23256 // This function will load locale and then set the global locale. If 23293 // This function will load locale and then set the global locale. If
23257 // no arguments are passed in, it will simply return the current global 23294 // no arguments are passed in, it will simply return the current global
23258 // locale key. 23295 // locale key.
23259 function locale_locales__getSetGlobalLocale (key, values) { 23296 function getSetGlobalLocale (key, values) {
23260 var data; 23297 var data;
23261 if (key) { 23298 if (key) {
23262 if (isUndefined(values)) { 23299 if (isUndefined(values)) {
23263 data = locale_locales__getLocale(key); 23300 data = getLocale(key);
23264 } 23301 }
23265 else { 23302 else {
23266 data = defineLocale(key, values); 23303 data = defineLocale(key, values);
23267 } 23304 }
23268 23305
23269 if (data) { 23306 if (data) {
23270 // moment.duration._locale = moment._locale = data; 23307 // moment.duration._locale = moment._locale = data;
23271 globalLocale = data; 23308 globalLocale = data;
23272 }
23273 } 23309 }
23310 }
23274 23311
23275 return globalLocale._abbr; 23312 return globalLocale._abbr;
23276 } 23313 }
23277 23314
23278 function defineLocale (name, config) { 23315 function defineLocale (name, config) {
23279 if (config !== null) { 23316 if (config !== null) {
23280 var parentConfig = baseConfig; 23317 var parentConfig = baseConfig;
23281 config.abbr = name; 23318 config.abbr = name;
23282 if (locales[name] != null) { 23319 if (locales[name] != null) {
23283 deprecateSimple('defineLocaleOverride', 23320 deprecateSimple('defineLocaleOverride',
23284 'use moment.updateLocale(localeName, config) to change ' + 23321 'use moment.updateLocale(localeName, config) to change ' +
23285 'an existing locale. moment.defineLocale(localeName, ' + 23322 'an existing locale. moment.defineLocale(localeName, ' +
23286 'config) should only be used for creating a new locale ' + 23323 'config) should only be used for creating a new locale ' +
23287 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'); 23324 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');
23288 parentConfig = locales[name]._config; 23325 parentConfig = locales[name]._config;
23289 } else if (config.parentLocale != null) { 23326 } else if (config.parentLocale != null) {
23290 if (locales[config.parentLocale] != null) { 23327 if (locales[config.parentLocale] != null) {
23291 parentConfig = locales[config.parentLocale]._config; 23328 parentConfig = locales[config.parentLocale]._config;
23292 } else { 23329 } else {
23293 // treat as if there is no base config 23330 if (!localeFamilies[config.parentLocale]) {
23294 deprecateSimple('parentLocaleUndefined', 23331 localeFamilies[config.parentLocale] = [];
23295 'specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/');
23296 } 23332 }
23333 localeFamilies[config.parentLocale].push({
23334 name: name,
23335 config: config
23336 });
23337 return null;
23297 } 23338 }
23298 locales[name] = new Locale(mergeConfigs(parentConfig, config)); 23339 }
23299 23340 locales[name] = new Locale(mergeConfigs(parentConfig, config));
23300 // backwards compat for now: also set the locale
23301 locale_locales__getSetGlobalLocale(name);
23302 23341
23303 return locales[name]; 23342 if (localeFamilies[name]) {
23304 } else { 23343 localeFamilies[name].forEach(function (x) {
23305 // useful for testing 23344 defineLocale(x.name, x.config);
23306 delete locales[name]; 23345 });
23307 return null;
23308 } 23346 }
23347
23348 // backwards compat for now: also set the locale
23349 // make sure we set the locale AFTER all child locales have been
23350 // created, so we won't end up with the child locale set.
23351 getSetGlobalLocale(name);
23352
23353
23354 return locales[name];
23355 } else {
23356 // useful for testing
23357 delete locales[name];
23358 return null;
23309 } 23359 }
23360 }
23310 23361
23311 function updateLocale(name, config) { 23362 function updateLocale(name, config) {
23312 if (config != null) { 23363 if (config != null) {
23313 var locale, parentConfig = baseConfig; 23364 var locale, parentConfig = baseConfig;
23314 // MERGE 23365 // MERGE
23315 if (locales[name] != null) { 23366 if (locales[name] != null) {
23316 parentConfig = locales[name]._config; 23367 parentConfig = locales[name]._config;
23317 } 23368 }
23318 config = mergeConfigs(parentConfig, config); 23369 config = mergeConfigs(parentConfig, config);
23319 locale = new Locale(config); 23370 locale = new Locale(config);
23320 locale.parentLocale = locales[name]; 23371 locale.parentLocale = locales[name];
23321 locales[name] = locale; 23372 locales[name] = locale;
23322 23373
23323 // backwards compat for now: also set the locale 23374 // backwards compat for now: also set the locale
23324 locale_locales__getSetGlobalLocale(name); 23375 getSetGlobalLocale(name);
23325 } else { 23376 } else {
23326 // pass null for config to unupdate, useful for tests 23377 // pass null for config to unupdate, useful for tests
23327 if (locales[name] != null) { 23378 if (locales[name] != null) {
23328 if (locales[name].parentLocale != null) { 23379 if (locales[name].parentLocale != null) {
23329 locales[name] = locales[name].parentLocale; 23380 locales[name] = locales[name].parentLocale;
23330 } else if (locales[name] != null) { 23381 } else if (locales[name] != null) {
23331 delete locales[name]; 23382 delete locales[name];
23332 }
23333 } 23383 }
23334 } 23384 }
23335 return locales[name];
23336 } 23385 }
23386 return locales[name];
23387 }
23337 23388
23338 // returns locale data 23389 // returns locale data
23339 function locale_locales__getLocale (key) { 23390 function getLocale (key) {
23340 var locale; 23391 var locale;
23341 23392
23342 if (key && key._locale && key._locale._abbr) { 23393 if (key && key._locale && key._locale._abbr) {
23343 key = key._locale._abbr; 23394 key = key._locale._abbr;
23344 } 23395 }
23345 23396
23346 if (!key) { 23397 if (!key) {
23347 return globalLocale; 23398 return globalLocale;
23399 }
23400
23401 if (!isArray(key)) {
23402 //short-circuit everything else
23403 locale = loadLocale(key);
23404 if (locale) {
23405 return locale;
23348 } 23406 }
23407 key = [key];
23408 }
23349 23409
23350 if (!isArray(key)) { 23410 return chooseLocale(key);
23351 //short-circuit everything else 23411 }
23352 locale = loadLocale(key); 23412
23353 if (locale) { 23413 function listLocales() {
23354 return locale; 23414 return keys$1(locales);
23355 } 23415 }
23356 key = [key]; 23416
23417 function checkOverflow (m) {
23418 var overflow;
23419 var a = m._a;
23420
23421 if (a && getParsingFlags(m).overflow === -2) {
23422 overflow =
23423 a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
23424 a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
23425 a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
23426 a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :
23427 a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :
23428 a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
23429 -1;
23430
23431 if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
23432 overflow = DATE;
23433 }
23434 if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
23435 overflow = WEEK;
23436 }
23437 if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
23438 overflow = WEEKDAY;
23357 } 23439 }
23358 23440
23359 return chooseLocale(key); 23441 getParsingFlags(m).overflow = overflow;
23360 } 23442 }
23361 23443
23362 function locale_locales__listLocales() { 23444 return m;
23363 return keys(locales); 23445 }
23364 }
23365 23446
23366 function checkOverflow (m) { 23447 // iso 8601 regex
23367 var overflow; 23448 // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
23368 var a = m._a; 23449 var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/;
23450 var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/;
23369 23451
23370 if (a && getParsingFlags(m).overflow === -2) { 23452 var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/;
23371 overflow =
23372 a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
23373 a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
23374 a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
23375 a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :
23376 a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :
23377 a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
23378 -1;
23379 23453
23380 if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { 23454 var isoDates = [
23381 overflow = DATE; 23455 ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
23382 } 23456 ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
23383 if (getParsingFlags(m)._overflowWeeks && overflow === -1) { 23457 ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
23384 overflow = WEEK; 23458 ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
23385 } 23459 ['YYYY-DDD', /\d{4}-\d{3}/],
23386 if (getParsingFlags(m)._overflowWeekday && overflow === -1) { 23460 ['YYYY-MM', /\d{4}-\d\d/, false],
23387 overflow = WEEKDAY; 23461 ['YYYYYYMMDD', /[+-]\d{10}/],
23388 } 23462 ['YYYYMMDD', /\d{8}/],
23463 // YYYYMM is NOT allowed by the standard
23464 ['GGGG[W]WWE', /\d{4}W\d{3}/],
23465 ['GGGG[W]WW', /\d{4}W\d{2}/, false],
23466 ['YYYYDDD', /\d{7}/]
23467 ];
23389 23468
23390 getParsingFlags(m).overflow = overflow; 23469 // iso time formats and regexes
23391 } 23470 var isoTimes = [
23471 ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
23472 ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
23473 ['HH:mm:ss', /\d\d:\d\d:\d\d/],
23474 ['HH:mm', /\d\d:\d\d/],
23475 ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
23476 ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
23477 ['HHmmss', /\d\d\d\d\d\d/],
23478 ['HHmm', /\d\d\d\d/],
23479 ['HH', /\d\d/]
23480 ];
23481
23482 var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i;
23392 23483
23393 return m; 23484 // date from iso format
23394 } 23485 function configFromISO(config) {
23395 23486 var i, l,
23396 // iso 8601 regex 23487 string = config._i,
23397 // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) 23488 match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
23398 var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/; 23489 allowTime, dateFormat, timeFormat, tzFormat;
23399 var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/; 23490
23400 23491 if (match) {
23401 var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; 23492 getParsingFlags(config).iso = true;
23402 23493
23403 var isoDates = [ 23494 for (i = 0, l = isoDates.length; i < l; i++) {
23404 ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], 23495 if (isoDates[i][1].exec(match[1])) {
23405 ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], 23496 dateFormat = isoDates[i][0];
23406 ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], 23497 allowTime = isoDates[i][2] !== false;
23407 ['GGGG-[W]WW', /\d{4}-W\d\d/, false], 23498 break;
23408 ['YYYY-DDD', /\d{4}-\d{3}/], 23499 }
23409 ['YYYY-MM', /\d{4}-\d\d/, false], 23500 }
23410 ['YYYYYYMMDD', /[+-]\d{10}/], 23501 if (dateFormat == null) {
23411 ['YYYYMMDD', /\d{8}/], 23502 config._isValid = false;
23412 // YYYYMM is NOT allowed by the standard 23503 return;
23413 ['GGGG[W]WWE', /\d{4}W\d{3}/], 23504 }
23414 ['GGGG[W]WW', /\d{4}W\d{2}/, false], 23505 if (match[3]) {
23415 ['YYYYDDD', /\d{7}/] 23506 for (i = 0, l = isoTimes.length; i < l; i++) {
23416 ]; 23507 if (isoTimes[i][1].exec(match[3])) {
23417 23508 // match[2] should be 'T' or space
23418 // iso time formats and regexes 23509 timeFormat = (match[2] || ' ') + isoTimes[i][0];
23419 var isoTimes = [
23420 ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
23421 ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
23422 ['HH:mm:ss', /\d\d:\d\d:\d\d/],
23423 ['HH:mm', /\d\d:\d\d/],
23424 ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
23425 ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
23426 ['HHmmss', /\d\d\d\d\d\d/],
23427 ['HHmm', /\d\d\d\d/],
23428 ['HH', /\d\d/]
23429 ];
23430
23431 var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i;
23432
23433 // date from iso format
23434 function configFromISO(config) {
23435 var i, l,
23436 string = config._i,
23437 match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
23438 allowTime, dateFormat, timeFormat, tzFormat;
23439
23440 if (match) {
23441 getParsingFlags(config).iso = true;
23442
23443 for (i = 0, l = isoDates.length; i < l; i++) {
23444 if (isoDates[i][1].exec(match[1])) {
23445 dateFormat = isoDates[i][0];
23446 allowTime = isoDates[i][2] !== false;
23447 break; 23510 break;
23448 } 23511 }
23449 } 23512 }
23450 if (dateFormat == null) { 23513 if (timeFormat == null) {
23451 config._isValid = false; 23514 config._isValid = false;
23452 return; 23515 return;
23453 } 23516 }
23454 if (match[3]) { 23517 }
23455 for (i = 0, l = isoTimes.length; i < l; i++) { 23518 if (!allowTime && timeFormat != null) {
23456 if (isoTimes[i][1].exec(match[3])) { 23519 config._isValid = false;
23457 // match[2] should be 'T' or space 23520 return;
23458 timeFormat = (match[2] || ' ') + isoTimes[i][0]; 23521 }
23459 break; 23522 if (match[4]) {
23460 } 23523 if (tzRegex.exec(match[4])) {
23461 } 23524 tzFormat = 'Z';
23462 if (timeFormat == null) { 23525 } else {
23463 config._isValid = false;
23464 return;
23465 }
23466 }
23467 if (!allowTime && timeFormat != null) {
23468 config._isValid = false; 23526 config._isValid = false;
23469 return; 23527 return;
23470 } 23528 }
23471 if (match[4]) {
23472 if (tzRegex.exec(match[4])) {
23473 tzFormat = 'Z';
23474 } else {
23475 config._isValid = false;
23476 return;
23477 }
23478 }
23479 config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
23480 configFromStringAndFormat(config);
23481 } else {
23482 config._isValid = false;
23483 } 23529 }
23530 config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
23531 configFromStringAndFormat(config);
23532 } else {
23533 config._isValid = false;
23484 } 23534 }
23535 }
23485 23536
23486 // date from iso format or fallback 23537 // date from iso format or fallback
23487 function configFromString(config) { 23538 function configFromString(config) {
23488 var matched = aspNetJsonRegex.exec(config._i); 23539 var matched = aspNetJsonRegex.exec(config._i);
23489 23540
23490 if (matched !== null) { 23541 if (matched !== null) {
23491 config._d = new Date(+matched[1]); 23542 config._d = new Date(+matched[1]);
23492 return; 23543 return;
23493 } 23544 }
23494 23545
23495 configFromISO(config); 23546 configFromISO(config);
23496 if (config._isValid === false) { 23547 if (config._isValid === false) {
23497 delete config._isValid; 23548 delete config._isValid;
23498 utils_hooks__hooks.createFromInputFallback(config); 23549 hooks.createFromInputFallback(config);
23499 }
23500 } 23550 }
23551 }
23501 23552
23502 utils_hooks__hooks.createFromInputFallback = deprecate( 23553 hooks.createFromInputFallback = deprecate(
23503 'moment construction falls back to js Date. This is ' + 23554 'value provided is not in a recognized ISO format. moment construction falls back to js Date(), ' +
23504 'discouraged and will be removed in upcoming major ' + 23555 'which is not reliable across all browsers and versions. Non ISO date formats are ' +
23505 'release. Please refer to ' + 23556 'discouraged and will be removed in an upcoming major release. Please refer to ' +
23506 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', 23557 'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
23507 function (config) { 23558 function (config) {
23508 config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); 23559 config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
23509 } 23560 }
23510 ); 23561 );
23511 23562
23512 // Pick the first defined of two or three arguments. 23563 // Pick the first defined of two or three arguments.
23513 function defaults(a, b, c) { 23564 function defaults(a, b, c) {
23514 if (a != null) { 23565 if (a != null) {
23515 return a; 23566 return a;
23516 } 23567 }
23517 if (b != null) { 23568 if (b != null) {
23518 return b; 23569 return b;
23519 }
23520 return c;
23521 } 23570 }
23571 return c;
23572 }
23522 23573
23523 function currentDateArray(config) { 23574 function currentDateArray(config) {
23524 // hooks is actually the exported moment object 23575 // hooks is actually the exported moment object
23525 var nowValue = new Date(utils_hooks__hooks.now()); 23576 var nowValue = new Date(hooks.now());
23526 if (config._useUTC) { 23577 if (config._useUTC) {
23527 return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; 23578 return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];
23528 }
23529 return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
23530 } 23579 }
23580 return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
23581 }
23531 23582
23532 // convert an array to a date. 23583 // convert an array to a date.
23533 // the array should mirror the parameters below 23584 // the array should mirror the parameters below
23534 // note: all values past the year are optional and will default to the lowest possible value. 23585 // note: all values past the year are optional and will default to the lowest possible value.
23535 // [year, month, day , hour, minute, second, millisecond] 23586 // [year, month, day , hour, minute, second, millisecond]
23536 function configFromArray (config) { 23587 function configFromArray (config) {
23537 var i, date, input = [], currentDate, yearToUse; 23588 var i, date, input = [], currentDate, yearToUse;
23538 23589
23539 if (config._d) { 23590 if (config._d) {
23540 return; 23591 return;
23541 } 23592 }
23593
23594 currentDate = currentDateArray(config);
23595
23596 //compute day of the year from weeks and weekdays
23597 if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
23598 dayOfYearFromWeekInfo(config);
23599 }
23542 23600
23543 currentDate = currentDateArray(config); 23601 //if the day of the year is set, figure out what it is
23602 if (config._dayOfYear) {
23603 yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
23544 23604
23545 //compute day of the year from weeks and weekdays 23605 if (config._dayOfYear > daysInYear(yearToUse)) {
23546 if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { 23606 getParsingFlags(config)._overflowDayOfYear = true;
23547 dayOfYearFromWeekInfo(config);
23548 } 23607 }
23549 23608
23550 //if the day of the year is set, figure out what it is 23609 date = createUTCDate(yearToUse, 0, config._dayOfYear);
23551 if (config._dayOfYear) { 23610 config._a[MONTH] = date.getUTCMonth();
23552 yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); 23611 config._a[DATE] = date.getUTCDate();
23612 }
23553 23613
23554 if (config._dayOfYear > daysInYear(yearToUse)) { 23614 // Default to current date.
23555 getParsingFlags(config)._overflowDayOfYear = true; 23615 // * if no year, month, day of month are given, default to today
23556 } 23616 // * if day of month is given, default month and year
23617 // * if month is given, default only year
23618 // * if year is given, don't default anything
23619 for (i = 0; i < 3 && config._a[i] == null; ++i) {
23620 config._a[i] = input[i] = currentDate[i];
23621 }
23557 23622
23558 date = createUTCDate(yearToUse, 0, config._dayOfYear); 23623 // Zero out whatever was not defaulted, including time
23559 config._a[MONTH] = date.getUTCMonth(); 23624 for (; i < 7; i++) {
23560 config._a[DATE] = date.getUTCDate(); 23625 config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
23561 } 23626 }
23562 23627
23563 // Default to current date. 23628 // Check for 24:00:00.000
23564 // * if no year, month, day of month are given, default to today 23629 if (config._a[HOUR] === 24 &&
23565 // * if day of month is given, default month and year 23630 config._a[MINUTE] === 0 &&
23566 // * if month is given, default only year 23631 config._a[SECOND] === 0 &&
23567 // * if year is given, don't default anything 23632 config._a[MILLISECOND] === 0) {
23568 for (i = 0; i < 3 && config._a[i] == null; ++i) { 23633 config._nextDay = true;
23569 config._a[i] = input[i] = currentDate[i]; 23634 config._a[HOUR] = 0;
23570 } 23635 }
23571 23636
23572 // Zero out whatever was not defaulted, including time 23637 config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
23573 for (; i < 7; i++) { 23638 // Apply timezone offset from input. The actual utcOffset can be changed
23574 config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i]; 23639 // with parseZone.
23575 } 23640 if (config._tzm != null) {
23641 config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
23642 }
23576 23643
23577 // Check for 24:00:00.000 23644 if (config._nextDay) {
23578 if (config._a[HOUR] === 24 && 23645 config._a[HOUR] = 24;
23579 config._a[MINUTE] === 0 && 23646 }
23580 config._a[SECOND] === 0 && 23647 }
23581 config._a[MILLISECOND] === 0) {
23582 config._nextDay = true;
23583 config._a[HOUR] = 0;
23584 }
23585 23648
23586 config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); 23649 function dayOfYearFromWeekInfo(config) {
23587 // Apply timezone offset from input. The actual utcOffset can be changed 23650 var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;
23588 // with parseZone. 23651
23589 if (config._tzm != null) { 23652 w = config._w;
23590 config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); 23653 if (w.GG != null || w.W != null || w.E != null) {
23591 } 23654 dow = 1;
23655 doy = 4;
23592 23656
23593 if (config._nextDay) { 23657 // TODO: We need to take the current isoWeekYear, but that depends on
23594 config._a[HOUR] = 24; 23658 // how we interpret now (local, utc, fixed offset). So create
23659 // a now version of current config (take local/utc/offset flags, and
23660 // create now).
23661 weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);
23662 week = defaults(w.W, 1);
23663 weekday = defaults(w.E, 1);
23664 if (weekday < 1 || weekday > 7) {
23665 weekdayOverflow = true;
23595 } 23666 }
23596 } 23667 } else {
23668 dow = config._locale._week.dow;
23669 doy = config._locale._week.doy;
23670
23671 var curWeek = weekOfYear(createLocal(), dow, doy);
23597 23672
23598 function dayOfYearFromWeekInfo(config) { 23673 weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
23599 var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;
23600 23674
23601 w = config._w; 23675 // Default to current week.
23602 if (w.GG != null || w.W != null || w.E != null) { 23676 week = defaults(w.w, curWeek.week);
23603 dow = 1;
23604 doy = 4;
23605 23677
23606 // TODO: We need to take the current isoWeekYear, but that depends on 23678 if (w.d != null) {
23607 // how we interpret now (local, utc, fixed offset). So create 23679 // weekday -- low day numbers are considered next week
23608 // a now version of current config (take local/utc/offset flags, and 23680 weekday = w.d;
23609 // create now). 23681 if (weekday < 0 || weekday > 6) {
23610 weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(local__createLocal(), 1, 4).year);
23611 week = defaults(w.W, 1);
23612 weekday = defaults(w.E, 1);
23613 if (weekday < 1 || weekday > 7) {
23614 weekdayOverflow = true; 23682 weekdayOverflow = true;
23615 } 23683 }
23616 } else { 23684 } else if (w.e != null) {
23617 dow = config._locale._week.dow; 23685 // local weekday -- counting starts from begining of week
23618 doy = config._locale._week.doy; 23686 weekday = w.e + dow;
23619 23687 if (w.e < 0 || w.e > 6) {
23620 weekYear = defaults(w.gg, config._a[YEAR], weekOfYear(local__createLocal(), dow, doy).year); 23688 weekdayOverflow = true;
23621 week = defaults(w.w, 1);
23622
23623 if (w.d != null) {
23624 // weekday -- low day numbers are considered next week
23625 weekday = w.d;
23626 if (weekday < 0 || weekday > 6) {
23627 weekdayOverflow = true;
23628 }
23629 } else if (w.e != null) {
23630 // local weekday -- counting starts from begining of week
23631 weekday = w.e + dow;
23632 if (w.e < 0 || w.e > 6) {
23633 weekdayOverflow = true;
23634 }
23635 } else {
23636 // default to begining of week
23637 weekday = dow;
23638 } 23689 }
23639 }
23640 if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
23641 getParsingFlags(config)._overflowWeeks = true;
23642 } else if (weekdayOverflow != null) {
23643 getParsingFlags(config)._overflowWeekday = true;
23644 } else { 23690 } else {
23645 temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); 23691 // default to begining of week
23646 config._a[YEAR] = temp.year; 23692 weekday = dow;
23647 config._dayOfYear = temp.dayOfYear;
23648 } 23693 }
23649 } 23694 }
23695 if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
23696 getParsingFlags(config)._overflowWeeks = true;
23697 } else if (weekdayOverflow != null) {
23698 getParsingFlags(config)._overflowWeekday = true;
23699 } else {
23700 temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
23701 config._a[YEAR] = temp.year;
23702 config._dayOfYear = temp.dayOfYear;
23703 }
23704 }
23650 23705
23651 // constant that refers to the ISO standard 23706 // constant that refers to the ISO standard
23652 utils_hooks__hooks.ISO_8601 = function () {}; 23707 hooks.ISO_8601 = function () {};
23653 23708
23654 // date from string and format string 23709 // date from string and format string
23655 function configFromStringAndFormat(config) { 23710 function configFromStringAndFormat(config) {
23656 // TODO: Move this to another part of the creation flow to prevent circular deps 23711 // TODO: Move this to another part of the creation flow to prevent circular deps
23657 if (config._f === utils_hooks__hooks.ISO_8601) { 23712 if (config._f === hooks.ISO_8601) {
23658 configFromISO(config); 23713 configFromISO(config);
23659 return; 23714 return;
23660 } 23715 }
23661 23716
23662 config._a = []; 23717 config._a = [];
23663 getParsingFlags(config).empty = true; 23718 getParsingFlags(config).empty = true;
23664 23719
23665 // This array is used to make a Date, either with `new Date` or `Date.UTC` 23720 // This array is used to make a Date, either with `new Date` or `Date.UTC`
23666 var string = '' + config._i, 23721 var string = '' + config._i,
23667 i, parsedInput, tokens, token, skipped, 23722 i, parsedInput, tokens, token, skipped,
23668 stringLength = string.length, 23723 stringLength = string.length,
23669 totalParsedInputLength = 0; 23724 totalParsedInputLength = 0;
23670 23725
23671 tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; 23726 tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
23672 23727
23673 for (i = 0; i < tokens.length; i++) { 23728 for (i = 0; i < tokens.length; i++) {
23674 token = tokens[i]; 23729 token = tokens[i];
23675 parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; 23730 parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
23676 // console.log('token', token, 'parsedInput', parsedInput, 23731 // console.log('token', token, 'parsedInput', parsedInput,
23677 // 'regex', getParseRegexForToken(token, config)); 23732 // 'regex', getParseRegexForToken(token, config));
23678 if (parsedInput) { 23733 if (parsedInput) {
23679 skipped = string.substr(0, string.indexOf(parsedInput)); 23734 skipped = string.substr(0, string.indexOf(parsedInput));
23680 if (skipped.length > 0) { 23735 if (skipped.length > 0) {
23681 getParsingFlags(config).unusedInput.push(skipped); 23736 getParsingFlags(config).unusedInput.push(skipped);
23682 }
23683 string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
23684 totalParsedInputLength += parsedInput.length;
23685 } 23737 }
23686 // don't parse if it's not a known token 23738 string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
23687 if (formatTokenFunctions[token]) { 23739 totalParsedInputLength += parsedInput.length;
23688 if (parsedInput) { 23740 }
23689 getParsingFlags(config).empty = false; 23741 // don't parse if it's not a known token
23690 } 23742 if (formatTokenFunctions[token]) {
23691 else { 23743 if (parsedInput) {
23692 getParsingFlags(config).unusedTokens.push(token); 23744 getParsingFlags(config).empty = false;
23693 }
23694 addTimeToArrayFromToken(token, parsedInput, config);
23695 } 23745 }
23696 else if (config._strict && !parsedInput) { 23746 else {
23697 getParsingFlags(config).unusedTokens.push(token); 23747 getParsingFlags(config).unusedTokens.push(token);
23698 } 23748 }
23749 addTimeToArrayFromToken(token, parsedInput, config);
23699 } 23750 }
23700 23751 else if (config._strict && !parsedInput) {
23701 // add remaining unparsed input length to the string 23752 getParsingFlags(config).unusedTokens.push(token);
23702 getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;
23703 if (string.length > 0) {
23704 getParsingFlags(config).unusedInput.push(string);
23705 }
23706
23707 // clear _12h flag if hour is <= 12
23708 if (config._a[HOUR] <= 12 &&
23709 getParsingFlags(config).bigHour === true &&
23710 config._a[HOUR] > 0) {
23711 getParsingFlags(config).bigHour = undefined;
23712 } 23753 }
23754 }
23713 23755
23714 getParsingFlags(config).parsedDateParts = config._a.slice(0); 23756 // add remaining unparsed input length to the string
23715 getParsingFlags(config).meridiem = config._meridiem; 23757 getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;
23716 // handle meridiem 23758 if (string.length > 0) {
23717 config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); 23759 getParsingFlags(config).unusedInput.push(string);
23760 }
23718 23761
23719 configFromArray(config); 23762 // clear _12h flag if hour is <= 12
23720 checkOverflow(config); 23763 if (config._a[HOUR] <= 12 &&
23764 getParsingFlags(config).bigHour === true &&
23765 config._a[HOUR] > 0) {
23766 getParsingFlags(config).bigHour = undefined;
23721 } 23767 }
23722 23768
23769 getParsingFlags(config).parsedDateParts = config._a.slice(0);
23770 getParsingFlags(config).meridiem = config._meridiem;
23771 // handle meridiem
23772 config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
23773
23774 configFromArray(config);
23775 checkOverflow(config);
23776 }
23777
23723 23778
23724 function meridiemFixWrap (locale, hour, meridiem) { 23779 function meridiemFixWrap (locale, hour, meridiem) {
23725 var isPm; 23780 var isPm;
23726 23781
23727 if (meridiem == null) { 23782 if (meridiem == null) {
23728 // nothing to do 23783 // nothing to do
23729 return hour; 23784 return hour;
23785 }
23786 if (locale.meridiemHour != null) {
23787 return locale.meridiemHour(hour, meridiem);
23788 } else if (locale.isPM != null) {
23789 // Fallback
23790 isPm = locale.isPM(meridiem);
23791 if (isPm && hour < 12) {
23792 hour += 12;
23730 } 23793 }
23731 if (locale.meridiemHour != null) { 23794 if (!isPm && hour === 12) {
23732 return locale.meridiemHour(hour, meridiem); 23795 hour = 0;
23733 } else if (locale.isPM != null) {
23734 // Fallback
23735 isPm = locale.isPM(meridiem);
23736 if (isPm && hour < 12) {
23737 hour += 12;
23738 }
23739 if (!isPm && hour === 12) {
23740 hour = 0;
23741 }
23742 return hour;
23743 } else {
23744 // this is not supposed to happen
23745 return hour;
23746 } 23796 }
23797 return hour;
23798 } else {
23799 // this is not supposed to happen
23800 return hour;
23747 } 23801 }
23802 }
23748 23803
23749 // date from string and array of format strings 23804 // date from string and array of format strings
23750 function configFromStringAndArray(config) { 23805 function configFromStringAndArray(config) {
23751 var tempConfig, 23806 var tempConfig,
23752 bestMoment, 23807 bestMoment,
23753 23808
23754 scoreToBeat, 23809 scoreToBeat,
23755 i, 23810 i,
23756 currentScore; 23811 currentScore;
23757 23812
23758 if (config._f.length === 0) { 23813 if (config._f.length === 0) {
23759 getParsingFlags(config).invalidFormat = true; 23814 getParsingFlags(config).invalidFormat = true;
23760 config._d = new Date(NaN); 23815 config._d = new Date(NaN);
23761 return; 23816 return;
23762 } 23817 }
23763 23818
23764 for (i = 0; i < config._f.length; i++) { 23819 for (i = 0; i < config._f.length; i++) {
23765 currentScore = 0; 23820 currentScore = 0;
23766 tempConfig = copyConfig({}, config); 23821 tempConfig = copyConfig({}, config);
23767 if (config._useUTC != null) { 23822 if (config._useUTC != null) {
23768 tempConfig._useUTC = config._useUTC; 23823 tempConfig._useUTC = config._useUTC;
23769 } 23824 }
23770 tempConfig._f = config._f[i]; 23825 tempConfig._f = config._f[i];
23771 configFromStringAndFormat(tempConfig); 23826 configFromStringAndFormat(tempConfig);
23772 23827
23773 if (!valid__isValid(tempConfig)) { 23828 if (!isValid(tempConfig)) {
23774 continue; 23829 continue;
23775 } 23830 }
23776 23831
23777 // if there is any input that was not parsed add a penalty for that format 23832 // if there is any input that was not parsed add a penalty for that format
23778 currentScore += getParsingFlags(tempConfig).charsLeftOver; 23833 currentScore += getParsingFlags(tempConfig).charsLeftOver;
23779 23834
23780 //or tokens 23835 //or tokens
23781 currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; 23836 currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
23782 23837
23783 getParsingFlags(tempConfig).score = currentScore; 23838 getParsingFlags(tempConfig).score = currentScore;
23784 23839
23785 if (scoreToBeat == null || currentScore < scoreToBeat) { 23840 if (scoreToBeat == null || currentScore < scoreToBeat) {
23786 scoreToBeat = currentScore; 23841 scoreToBeat = currentScore;
23787 bestMoment = tempConfig; 23842 bestMoment = tempConfig;
23788 }
23789 } 23843 }
23790
23791 extend(config, bestMoment || tempConfig);
23792 } 23844 }
23793 23845
23794 function configFromObject(config) { 23846 extend(config, bestMoment || tempConfig);
23795 if (config._d) { 23847 }
23796 return;
23797 }
23798
23799 var i = normalizeObjectUnits(config._i);
23800 config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {
23801 return obj && parseInt(obj, 10);
23802 });
23803 23848
23804 configFromArray(config); 23849 function configFromObject(config) {
23850 if (config._d) {
23851 return;
23805 } 23852 }
23806 23853
23807 function createFromConfig (config) { 23854 var i = normalizeObjectUnits(config._i);
23808 var res = new Moment(checkOverflow(prepareConfig(config))); 23855 config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {
23809 if (res._nextDay) { 23856 return obj && parseInt(obj, 10);
23810 // Adding is smart enough around DST 23857 });
23811 res.add(1, 'd');
23812 res._nextDay = undefined;
23813 }
23814 23858
23815 return res; 23859 configFromArray(config);
23860 }
23861
23862 function createFromConfig (config) {
23863 var res = new Moment(checkOverflow(prepareConfig(config)));
23864 if (res._nextDay) {
23865 // Adding is smart enough around DST
23866 res.add(1, 'd');
23867 res._nextDay = undefined;
23816 } 23868 }
23817 23869
23818 function prepareConfig (config) { 23870 return res;
23819 var input = config._i, 23871 }
23820 format = config._f;
23821 23872
23822 config._locale = config._locale || locale_locales__getLocale(config._l); 23873 function prepareConfig (config) {
23874 var input = config._i,
23875 format = config._f;
23823 23876
23824 if (input === null || (format === undefined && input === '')) { 23877 config._locale = config._locale || getLocale(config._l);
23825 return valid__createInvalid({nullInput: true});
23826 }
23827 23878
23828 if (typeof input === 'string') { 23879 if (input === null || (format === undefined && input === '')) {
23829 config._i = input = config._locale.preparse(input); 23880 return createInvalid({nullInput: true});
23830 } 23881 }
23831
23832 if (isMoment(input)) {
23833 return new Moment(checkOverflow(input));
23834 } else if (isArray(format)) {
23835 configFromStringAndArray(config);
23836 } else if (isDate(input)) {
23837 config._d = input;
23838 } else if (format) {
23839 configFromStringAndFormat(config);
23840 } else {
23841 configFromInput(config);
23842 }
23843 23882
23844 if (!valid__isValid(config)) { 23883 if (typeof input === 'string') {
23845 config._d = null; 23884 config._i = input = config._locale.preparse(input);
23846 } 23885 }
23847 23886
23848 return config; 23887 if (isMoment(input)) {
23888 return new Moment(checkOverflow(input));
23889 } else if (isDate(input)) {
23890 config._d = input;
23891 } else if (isArray(format)) {
23892 configFromStringAndArray(config);
23893 } else if (format) {
23894 configFromStringAndFormat(config);
23895 } else {
23896 configFromInput(config);
23849 } 23897 }
23850 23898
23851 function configFromInput(config) { 23899 if (!isValid(config)) {
23852 var input = config._i; 23900 config._d = null;
23853 if (input === undefined) {
23854 config._d = new Date(utils_hooks__hooks.now());
23855 } else if (isDate(input)) {
23856 config._d = new Date(input.valueOf());
23857 } else if (typeof input === 'string') {
23858 configFromString(config);
23859 } else if (isArray(input)) {
23860 config._a = map(input.slice(0), function (obj) {
23861 return parseInt(obj, 10);
23862 });
23863 configFromArray(config);
23864 } else if (typeof(input) === 'object') {
23865 configFromObject(config);
23866 } else if (typeof(input) === 'number') {
23867 // from milliseconds
23868 config._d = new Date(input);
23869 } else {
23870 utils_hooks__hooks.createFromInputFallback(config);
23871 }
23872 } 23901 }
23873 23902
23874 function createLocalOrUTC (input, format, locale, strict, isUTC) { 23903 return config;
23875 var c = {}; 23904 }
23876 23905
23877 if (typeof(locale) === 'boolean') { 23906 function configFromInput(config) {
23878 strict = locale; 23907 var input = config._i;
23879 locale = undefined; 23908 if (input === undefined) {
23880 } 23909 config._d = new Date(hooks.now());
23910 } else if (isDate(input)) {
23911 config._d = new Date(input.valueOf());
23912 } else if (typeof input === 'string') {
23913 configFromString(config);
23914 } else if (isArray(input)) {
23915 config._a = map(input.slice(0), function (obj) {
23916 return parseInt(obj, 10);
23917 });
23918 configFromArray(config);
23919 } else if (typeof(input) === 'object') {
23920 configFromObject(config);
23921 } else if (isNumber(input)) {
23922 // from milliseconds
23923 config._d = new Date(input);
23924 } else {
23925 hooks.createFromInputFallback(config);
23926 }
23927 }
23881 23928
23882 if ((isObject(input) && isObjectEmpty(input)) || 23929 function createLocalOrUTC (input, format, locale, strict, isUTC) {
23883 (isArray(input) && input.length === 0)) { 23930 var c = {};
23884 input = undefined;
23885 }
23886 // object construction must be done this way.
23887 // https://github.com/moment/moment/issues/1423
23888 c._isAMomentObject = true;
23889 c._useUTC = c._isUTC = isUTC;
23890 c._l = locale;
23891 c._i = input;
23892 c._f = format;
23893 c._strict = strict;
23894 23931
23895 return createFromConfig(c); 23932 if (locale === true || locale === false) {
23933 strict = locale;
23934 locale = undefined;
23896 } 23935 }
23897 23936
23898 function local__createLocal (input, format, locale, strict) { 23937 if ((isObject(input) && isObjectEmpty(input)) ||
23899 return createLocalOrUTC(input, format, locale, strict, false); 23938 (isArray(input) && input.length === 0)) {
23939 input = undefined;
23900 } 23940 }
23941 // object construction must be done this way.
23942 // https://github.com/moment/moment/issues/1423
23943 c._isAMomentObject = true;
23944 c._useUTC = c._isUTC = isUTC;
23945 c._l = locale;
23946 c._i = input;
23947 c._f = format;
23948 c._strict = strict;
23901 23949
23902 var prototypeMin = deprecate( 23950 return createFromConfig(c);
23903 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', 23951 }
23904 function () {
23905 var other = local__createLocal.apply(null, arguments);
23906 if (this.isValid() && other.isValid()) {
23907 return other < this ? this : other;
23908 } else {
23909 return valid__createInvalid();
23910 }
23911 }
23912 );
23913 23952
23914 var prototypeMax = deprecate( 23953 function createLocal (input, format, locale, strict) {
23915 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', 23954 return createLocalOrUTC(input, format, locale, strict, false);
23916 function () { 23955 }
23917 var other = local__createLocal.apply(null, arguments);
23918 if (this.isValid() && other.isValid()) {
23919 return other > this ? this : other;
23920 } else {
23921 return valid__createInvalid();
23922 }
23923 }
23924 );
23925 23956
23926 // Pick a moment m from moments so that m[fn](other) is true for all 23957 var prototypeMin = deprecate(
23927 // other. This relies on the function fn to be transitive. 23958 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
23928 // 23959 function () {
23929 // moments should either be an array of moment objects or an array, whose 23960 var other = createLocal.apply(null, arguments);
23930 // first element is an array of moment objects. 23961 if (this.isValid() && other.isValid()) {
23931 function pickBy(fn, moments) { 23962 return other < this ? this : other;
23932 var res, i; 23963 } else {
23933 if (moments.length === 1 && isArray(moments[0])) { 23964 return createInvalid();
23934 moments = moments[0];
23935 } 23965 }
23936 if (!moments.length) { 23966 }
23937 return local__createLocal(); 23967 );
23968
23969 var prototypeMax = deprecate(
23970 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
23971 function () {
23972 var other = createLocal.apply(null, arguments);
23973 if (this.isValid() && other.isValid()) {
23974 return other > this ? this : other;
23975 } else {
23976 return createInvalid();
23938 } 23977 }
23939 res = moments[0]; 23978 }
23940 for (i = 1; i < moments.length; ++i) { 23979 );
23941 if (!moments[i].isValid() || moments[i][fn](res)) { 23980
23942 res = moments[i]; 23981 // Pick a moment m from moments so that m[fn](other) is true for all
23943 } 23982 // other. This relies on the function fn to be transitive.
23983 //
23984 // moments should either be an array of moment objects or an array, whose
23985 // first element is an array of moment objects.
23986 function pickBy(fn, moments) {
23987 var res, i;
23988 if (moments.length === 1 && isArray(moments[0])) {
23989 moments = moments[0];
23990 }
23991 if (!moments.length) {
23992 return createLocal();
23993 }
23994 res = moments[0];
23995 for (i = 1; i < moments.length; ++i) {
23996 if (!moments[i].isValid() || moments[i][fn](res)) {
23997 res = moments[i];
23944 } 23998 }
23945 return res;
23946 } 23999 }
24000 return res;
24001 }
23947 24002
23948 // TODO: Use [].sort instead? 24003 // TODO: Use [].sort instead?
23949 function min () { 24004 function min () {
23950 var args = [].slice.call(arguments, 0); 24005 var args = [].slice.call(arguments, 0);
23951 24006
23952 return pickBy('isBefore', args); 24007 return pickBy('isBefore', args);
23953 } 24008 }
23954 24009
23955 function max () { 24010 function max () {
23956 var args = [].slice.call(arguments, 0); 24011 var args = [].slice.call(arguments, 0);
23957 24012
23958 return pickBy('isAfter', args); 24013 return pickBy('isAfter', args);
23959 } 24014 }
23960 24015
23961 var now = function () { 24016 var now = function () {
23962 return Date.now ? Date.now() : +(new Date()); 24017 return Date.now ? Date.now() : +(new Date());
23963 }; 24018 };
23964 24019
23965 function Duration (duration) { 24020 function Duration (duration) {
23966 var normalizedInput = normalizeObjectUnits(duration), 24021 var normalizedInput = normalizeObjectUnits(duration),
23967 years = normalizedInput.year || 0, 24022 years = normalizedInput.year || 0,
23968 quarters = normalizedInput.quarter || 0, 24023 quarters = normalizedInput.quarter || 0,
23969 months = normalizedInput.month || 0, 24024 months = normalizedInput.month || 0,
23970 weeks = normalizedInput.week || 0, 24025 weeks = normalizedInput.week || 0,
23971 days = normalizedInput.day || 0, 24026 days = normalizedInput.day || 0,
23972 hours = normalizedInput.hour || 0, 24027 hours = normalizedInput.hour || 0,
23973 minutes = normalizedInput.minute || 0, 24028 minutes = normalizedInput.minute || 0,
23974 seconds = normalizedInput.second || 0, 24029 seconds = normalizedInput.second || 0,
23975 milliseconds = normalizedInput.millisecond || 0; 24030 milliseconds = normalizedInput.millisecond || 0;
23976 24031
23977 // representation for dateAddRemove 24032 // representation for dateAddRemove
23978 this._milliseconds = +milliseconds + 24033 this._milliseconds = +milliseconds +
23979 seconds * 1e3 + // 1000 24034 seconds * 1e3 + // 1000
23980 minutes * 6e4 + // 1000 * 60 24035 minutes * 6e4 + // 1000 * 60
23981 hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 24036 hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
23982 // Because of dateAddRemove treats 24 hours as different from a 24037 // Because of dateAddRemove treats 24 hours as different from a
23983 // day when working around DST, we need to store them separately 24038 // day when working around DST, we need to store them separately
23984 this._days = +days + 24039 this._days = +days +
23985 weeks * 7; 24040 weeks * 7;
23986 // It is impossible translate months into days without knowing 24041 // It is impossible translate months into days without knowing
23987 // which months you are are talking about, so we have to store 24042 // which months you are are talking about, so we have to store
23988 // it separately. 24043 // it separately.
23989 this._months = +months + 24044 this._months = +months +
23990 quarters * 3 + 24045 quarters * 3 +
23991 years * 12; 24046 years * 12;
23992 24047
23993 this._data = {}; 24048 this._data = {};
23994 24049
23995 this._locale = locale_locales__getLocale(); 24050 this._locale = getLocale();
23996 24051
23997 this._bubble(); 24052 this._bubble();
23998 } 24053 }
23999 24054
24000 function isDuration (obj) { 24055 function isDuration (obj) {
24001 return obj instanceof Duration; 24056 return obj instanceof Duration;
24002 } 24057 }
24003 24058
24004 // FORMATTING 24059 function absRound (number) {
24005 24060 if (number < 0) {
24006 function offset (token, separator) { 24061 return Math.round(-1 * number) * -1;
24007 addFormatToken(token, 0, 0, function () { 24062 } else {
24008 var offset = this.utcOffset(); 24063 return Math.round(number);
24009 var sign = '+';
24010 if (offset < 0) {
24011 offset = -offset;
24012 sign = '-';
24013 }
24014 return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);
24015 });
24016 } 24064 }
24065 }
24017 24066
24018 offset('Z', ':'); 24067 // FORMATTING
24019 offset('ZZ', '');
24020
24021 // PARSING
24022 24068
24023 addRegexToken('Z', matchShortOffset); 24069 function offset (token, separator) {
24024 addRegexToken('ZZ', matchShortOffset); 24070 addFormatToken(token, 0, 0, function () {
24025 addParseToken(['Z', 'ZZ'], function (input, array, config) { 24071 var offset = this.utcOffset();
24026 config._useUTC = true; 24072 var sign = '+';
24027 config._tzm = offsetFromString(matchShortOffset, input); 24073 if (offset < 0) {
24074 offset = -offset;
24075 sign = '-';
24076 }
24077 return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);
24028 }); 24078 });
24079 }
24029 24080
24030 // HELPERS 24081 offset('Z', ':');
24082 offset('ZZ', '');
24031 24083
24032 // timezone chunker 24084 // PARSING
24033 // '+10:00' > ['10', '00']
24034 // '-1530' > ['-15', '30']
24035 var chunkOffset = /([\+\-]|\d\d)/gi;
24036 24085
24037 function offsetFromString(matcher, string) { 24086 addRegexToken('Z', matchShortOffset);
24038 var matches = ((string || '').match(matcher) || []); 24087 addRegexToken('ZZ', matchShortOffset);
24039 var chunk = matches[matches.length - 1] || []; 24088 addParseToken(['Z', 'ZZ'], function (input, array, config) {
24040 var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; 24089 config._useUTC = true;
24041 var minutes = +(parts[1] * 60) + toInt(parts[2]); 24090 config._tzm = offsetFromString(matchShortOffset, input);
24091 });
24042 24092
24043 return parts[0] === '+' ? minutes : -minutes; 24093 // HELPERS
24044 }
24045 24094
24046 // Return a moment from input, that is local/utc/zone equivalent to model. 24095 // timezone chunker
24047 function cloneWithOffset(input, model) { 24096 // '+10:00' > ['10', '00']
24048 var res, diff; 24097 // '-1530' > ['-15', '30']
24049 if (model._isUTC) { 24098 var chunkOffset = /([\+\-]|\d\d)/gi;
24050 res = model.clone();
24051 diff = (isMoment(input) || isDate(input) ? input.valueOf() : local__createLocal(input).valueOf()) - res.valueOf();
24052 // Use low-level api, because this fn is low-level api.
24053 res._d.setTime(res._d.valueOf() + diff);
24054 utils_hooks__hooks.updateOffset(res, false);
24055 return res;
24056 } else {
24057 return local__createLocal(input).local();
24058 }
24059 }
24060 24099
24061 function getDateOffset (m) { 24100 function offsetFromString(matcher, string) {
24062 // On Firefox.24 Date#getTimezoneOffset returns a floating point. 24101 var matches = (string || '').match(matcher);
24063 // https://github.com/moment/moment/pull/1871
24064 return -Math.round(m._d.getTimezoneOffset() / 15) * 15;
24065 }
24066 24102
24067 // HOOKS 24103 if (matches === null) {
24104 return null;
24105 }
24068 24106
24069 // This function will be called whenever a moment is mutated. 24107 var chunk = matches[matches.length - 1] || [];
24070 // It is intended to keep the offset in sync with the timezone. 24108 var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
24071 utils_hooks__hooks.updateOffset = function () {}; 24109 var minutes = +(parts[1] * 60) + toInt(parts[2]);
24072 24110
24073 // MOMENTS 24111 return minutes === 0 ?
24112 0 :
24113 parts[0] === '+' ? minutes : -minutes;
24114 }
24074 24115
24075 // keepLocalTime = true means only change the timezone, without 24116 // Return a moment from input, that is local/utc/zone equivalent to model.
24076 // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> 24117 function cloneWithOffset(input, model) {
24077 // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset 24118 var res, diff;
24078 // +0200, so we adjust the time as needed, to be valid. 24119 if (model._isUTC) {
24079 // 24120 res = model.clone();
24080 // Keeping the time actually adds/subtracts (one hour) 24121 diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();
24081 // from the actual represented time. That is why we call updateOffset 24122 // Use low-level api, because this fn is low-level api.
24082 // a second time. In case it wants us to change the offset again 24123 res._d.setTime(res._d.valueOf() + diff);
24083 // _changeInProgress == true case, then we have to adjust, because 24124 hooks.updateOffset(res, false);
24084 // there is no such time in the given timezone. 24125 return res;
24085 function getSetOffset (input, keepLocalTime) { 24126 } else {
24086 var offset = this._offset || 0, 24127 return createLocal(input).local();
24087 localAdjust;
24088 if (!this.isValid()) {
24089 return input != null ? this : NaN;
24090 }
24091 if (input != null) {
24092 if (typeof input === 'string') {
24093 input = offsetFromString(matchShortOffset, input);
24094 } else if (Math.abs(input) < 16) {
24095 input = input * 60;
24096 }
24097 if (!this._isUTC && keepLocalTime) {
24098 localAdjust = getDateOffset(this);
24099 }
24100 this._offset = input;
24101 this._isUTC = true;
24102 if (localAdjust != null) {
24103 this.add(localAdjust, 'm');
24104 }
24105 if (offset !== input) {
24106 if (!keepLocalTime || this._changeInProgress) {
24107 add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);
24108 } else if (!this._changeInProgress) {
24109 this._changeInProgress = true;
24110 utils_hooks__hooks.updateOffset(this, true);
24111 this._changeInProgress = null;
24112 }
24113 }
24114 return this;
24115 } else {
24116 return this._isUTC ? offset : getDateOffset(this);
24117 }
24118 } 24128 }
24129 }
24119 24130
24120 function getSetZone (input, keepLocalTime) { 24131 function getDateOffset (m) {
24121 if (input != null) { 24132 // On Firefox.24 Date#getTimezoneOffset returns a floating point.
24122 if (typeof input !== 'string') { 24133 // https://github.com/moment/moment/pull/1871
24123 input = -input; 24134 return -Math.round(m._d.getTimezoneOffset() / 15) * 15;
24124 } 24135 }
24125
24126 this.utcOffset(input, keepLocalTime);
24127 24136
24128 return this; 24137 // HOOKS
24129 } else {
24130 return -this.utcOffset();
24131 }
24132 }
24133 24138
24134 function setOffsetToUTC (keepLocalTime) { 24139 // This function will be called whenever a moment is mutated.
24135 return this.utcOffset(0, keepLocalTime); 24140 // It is intended to keep the offset in sync with the timezone.
24136 } 24141 hooks.updateOffset = function () {};
24137 24142
24138 function setOffsetToLocal (keepLocalTime) { 24143 // MOMENTS
24139 if (this._isUTC) {
24140 this.utcOffset(0, keepLocalTime);
24141 this._isUTC = false;
24142 24144
24143 if (keepLocalTime) { 24145 // keepLocalTime = true means only change the timezone, without
24144 this.subtract(getDateOffset(this), 'm'); 24146 // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
24147 // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
24148 // +0200, so we adjust the time as needed, to be valid.
24149 //
24150 // Keeping the time actually adds/subtracts (one hour)
24151 // from the actual represented time. That is why we call updateOffset
24152 // a second time. In case it wants us to change the offset again
24153 // _changeInProgress == true case, then we have to adjust, because
24154 // there is no such time in the given timezone.
24155 function getSetOffset (input, keepLocalTime) {
24156 var offset = this._offset || 0,
24157 localAdjust;
24158 if (!this.isValid()) {
24159 return input != null ? this : NaN;
24160 }
24161 if (input != null) {
24162 if (typeof input === 'string') {
24163 input = offsetFromString(matchShortOffset, input);
24164 if (input === null) {
24165 return this;
24166 }
24167 } else if (Math.abs(input) < 16) {
24168 input = input * 60;
24169 }
24170 if (!this._isUTC && keepLocalTime) {
24171 localAdjust = getDateOffset(this);
24172 }
24173 this._offset = input;
24174 this._isUTC = true;
24175 if (localAdjust != null) {
24176 this.add(localAdjust, 'm');
24177 }
24178 if (offset !== input) {
24179 if (!keepLocalTime || this._changeInProgress) {
24180 addSubtract(this, createDuration(input - offset, 'm'), 1, false);
24181 } else if (!this._changeInProgress) {
24182 this._changeInProgress = true;
24183 hooks.updateOffset(this, true);
24184 this._changeInProgress = null;
24145 } 24185 }
24146 } 24186 }
24147 return this; 24187 return this;
24188 } else {
24189 return this._isUTC ? offset : getDateOffset(this);
24148 } 24190 }
24191 }
24149 24192
24150 function setOffsetToParsedOffset () { 24193 function getSetZone (input, keepLocalTime) {
24151 if (this._tzm) { 24194 if (input != null) {
24152 this.utcOffset(this._tzm); 24195 if (typeof input !== 'string') {
24153 } else if (typeof this._i === 'string') { 24196 input = -input;
24154 this.utcOffset(offsetFromString(matchOffset, this._i));
24155 } 24197 }
24198
24199 this.utcOffset(input, keepLocalTime);
24200
24156 return this; 24201 return this;
24202 } else {
24203 return -this.utcOffset();
24157 } 24204 }
24205 }
24158 24206
24159 function hasAlignedHourOffset (input) { 24207 function setOffsetToUTC (keepLocalTime) {
24160 if (!this.isValid()) { 24208 return this.utcOffset(0, keepLocalTime);
24161 return false; 24209 }
24162 }
24163 input = input ? local__createLocal(input).utcOffset() : 0;
24164 24210
24165 return (this.utcOffset() - input) % 60 === 0; 24211 function setOffsetToLocal (keepLocalTime) {
24166 } 24212 if (this._isUTC) {
24213 this.utcOffset(0, keepLocalTime);
24214 this._isUTC = false;
24167 24215
24168 function isDaylightSavingTime () { 24216 if (keepLocalTime) {
24169 return ( 24217 this.subtract(getDateOffset(this), 'm');
24170 this.utcOffset() > this.clone().month(0).utcOffset() || 24218 }
24171 this.utcOffset() > this.clone().month(5).utcOffset()
24172 );
24173 } 24219 }
24220 return this;
24221 }
24174 24222
24175 function isDaylightSavingTimeShifted () { 24223 function setOffsetToParsedOffset () {
24176 if (!isUndefined(this._isDSTShifted)) { 24224 if (this._tzm != null) {
24177 return this._isDSTShifted; 24225 this.utcOffset(this._tzm);
24226 } else if (typeof this._i === 'string') {
24227 var tZone = offsetFromString(matchOffset, this._i);
24228 if (tZone != null) {
24229 this.utcOffset(tZone);
24230 }
24231 else {
24232 this.utcOffset(0, true);
24178 } 24233 }
24234 }
24235 return this;
24236 }
24179 24237
24180 var c = {}; 24238 function hasAlignedHourOffset (input) {
24239 if (!this.isValid()) {
24240 return false;
24241 }
24242 input = input ? createLocal(input).utcOffset() : 0;
24181 24243
24182 copyConfig(c, this); 24244 return (this.utcOffset() - input) % 60 === 0;
24183 c = prepareConfig(c); 24245 }
24184 24246
24185 if (c._a) { 24247 function isDaylightSavingTime () {
24186 var other = c._isUTC ? create_utc__createUTC(c._a) : local__createLocal(c._a); 24248 return (
24187 this._isDSTShifted = this.isValid() && 24249 this.utcOffset() > this.clone().month(0).utcOffset() ||
24188 compareArrays(c._a, other.toArray()) > 0; 24250 this.utcOffset() > this.clone().month(5).utcOffset()
24189 } else { 24251 );
24190 this._isDSTShifted = false; 24252 }
24191 }
24192 24253
24254 function isDaylightSavingTimeShifted () {
24255 if (!isUndefined(this._isDSTShifted)) {
24193 return this._isDSTShifted; 24256 return this._isDSTShifted;
24194 } 24257 }
24195 24258
24196 function isLocal () { 24259 var c = {};
24197 return this.isValid() ? !this._isUTC : false;
24198 }
24199 24260
24200 function isUtcOffset () { 24261 copyConfig(c, this);
24201 return this.isValid() ? this._isUTC : false; 24262 c = prepareConfig(c);
24202 }
24203 24263
24204 function isUtc () { 24264 if (c._a) {
24205 return this.isValid() ? this._isUTC && this._offset === 0 : false; 24265 var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
24266 this._isDSTShifted = this.isValid() &&
24267 compareArrays(c._a, other.toArray()) > 0;
24268 } else {
24269 this._isDSTShifted = false;
24206 } 24270 }
24207 24271
24208 // ASP.NET json date format regex 24272 return this._isDSTShifted;
24209 var aspNetRegex = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/; 24273 }
24210 24274
24211 // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html 24275 function isLocal () {
24212 // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere 24276 return this.isValid() ? !this._isUTC : false;
24213 // and further modified to allow for strings containing both week and day 24277 }
24214 var isoRegex = /^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;
24215 24278
24216 function create__createDuration (input, key) { 24279 function isUtcOffset () {
24217 var duration = input, 24280 return this.isValid() ? this._isUTC : false;
24218 // matching against regexp is expensive, do it on demand 24281 }
24219 match = null,
24220 sign,
24221 ret,
24222 diffRes;
24223 24282
24224 if (isDuration(input)) { 24283 function isUtc () {
24225 duration = { 24284 return this.isValid() ? this._isUTC && this._offset === 0 : false;
24226 ms : input._milliseconds, 24285 }
24227 d : input._days,
24228 M : input._months
24229 };
24230 } else if (typeof input === 'number') {
24231 duration = {};
24232 if (key) {
24233 duration[key] = input;
24234 } else {
24235 duration.milliseconds = input;
24236 }
24237 } else if (!!(match = aspNetRegex.exec(input))) {
24238 sign = (match[1] === '-') ? -1 : 1;
24239 duration = {
24240 y : 0,
24241 d : toInt(match[DATE]) * sign,
24242 h : toInt(match[HOUR]) * sign,
24243 m : toInt(match[MINUTE]) * sign,
24244 s : toInt(match[SECOND]) * sign,
24245 ms : toInt(match[MILLISECOND]) * sign
24246 };
24247 } else if (!!(match = isoRegex.exec(input))) {
24248 sign = (match[1] === '-') ? -1 : 1;
24249 duration = {
24250 y : parseIso(match[2], sign),
24251 M : parseIso(match[3], sign),
24252 w : parseIso(match[4], sign),
24253 d : parseIso(match[5], sign),
24254 h : parseIso(match[6], sign),
24255 m : parseIso(match[7], sign),
24256 s : parseIso(match[8], sign)
24257 };
24258 } else if (duration == null) {// checks for null or undefined
24259 duration = {};
24260 } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {
24261 diffRes = momentsDifference(local__createLocal(duration.from), local__createLocal(duration.to));
24262
24263 duration = {};
24264 duration.ms = diffRes.milliseconds;
24265 duration.M = diffRes.months;
24266 }
24267 24286
24268 ret = new Duration(duration); 24287 // ASP.NET json date format regex
24288 var aspNetRegex = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/;
24269 24289
24270 if (isDuration(input) && hasOwnProp(input, '_locale')) { 24290 // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
24271 ret._locale = input._locale; 24291 // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
24272 } 24292 // and further modified to allow for strings containing both week and day
24293 var isoRegex = /^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;
24273 24294
24274 return ret; 24295 function createDuration (input, key) {
24275 } 24296 var duration = input,
24297 // matching against regexp is expensive, do it on demand
24298 match = null,
24299 sign,
24300 ret,
24301 diffRes;
24276 24302
24277 create__createDuration.fn = Duration.prototype; 24303 if (isDuration(input)) {
24304 duration = {
24305 ms : input._milliseconds,
24306 d : input._days,
24307 M : input._months
24308 };
24309 } else if (isNumber(input)) {
24310 duration = {};
24311 if (key) {
24312 duration[key] = input;
24313 } else {
24314 duration.milliseconds = input;
24315 }
24316 } else if (!!(match = aspNetRegex.exec(input))) {
24317 sign = (match[1] === '-') ? -1 : 1;
24318 duration = {
24319 y : 0,
24320 d : toInt(match[DATE]) * sign,
24321 h : toInt(match[HOUR]) * sign,
24322 m : toInt(match[MINUTE]) * sign,
24323 s : toInt(match[SECOND]) * sign,
24324 ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match
24325 };
24326 } else if (!!(match = isoRegex.exec(input))) {
24327 sign = (match[1] === '-') ? -1 : 1;
24328 duration = {
24329 y : parseIso(match[2], sign),
24330 M : parseIso(match[3], sign),
24331 w : parseIso(match[4], sign),
24332 d : parseIso(match[5], sign),
24333 h : parseIso(match[6], sign),
24334 m : parseIso(match[7], sign),
24335 s : parseIso(match[8], sign)
24336 };
24337 } else if (duration == null) {// checks for null or undefined
24338 duration = {};
24339 } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {
24340 diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));
24278 24341
24279 function parseIso (inp, sign) { 24342 duration = {};
24280 // We'd normally use ~~inp for this, but unfortunately it also 24343 duration.ms = diffRes.milliseconds;
24281 // converts floats to ints. 24344 duration.M = diffRes.months;
24282 // inp may be undefined, so careful calling replace on it.
24283 var res = inp && parseFloat(inp.replace(',', '.'));
24284 // apply sign while we're at it
24285 return (isNaN(res) ? 0 : res) * sign;
24286 } 24345 }
24287 24346
24288 function positiveMomentsDifference(base, other) { 24347 ret = new Duration(duration);
24289 var res = {milliseconds: 0, months: 0};
24290 24348
24291 res.months = other.month() - base.month() + 24349 if (isDuration(input) && hasOwnProp(input, '_locale')) {
24292 (other.year() - base.year()) * 12; 24350 ret._locale = input._locale;
24293 if (base.clone().add(res.months, 'M').isAfter(other)) { 24351 }
24294 --res.months;
24295 }
24296 24352
24297 res.milliseconds = +other - +(base.clone().add(res.months, 'M')); 24353 return ret;
24354 }
24298 24355
24299 return res; 24356 createDuration.fn = Duration.prototype;
24300 }
24301 24357
24302 function momentsDifference(base, other) { 24358 function parseIso (inp, sign) {
24303 var res; 24359 // We'd normally use ~~inp for this, but unfortunately it also
24304 if (!(base.isValid() && other.isValid())) { 24360 // converts floats to ints.
24305 return {milliseconds: 0, months: 0}; 24361 // inp may be undefined, so careful calling replace on it.
24306 } 24362 var res = inp && parseFloat(inp.replace(',', '.'));
24363 // apply sign while we're at it
24364 return (isNaN(res) ? 0 : res) * sign;
24365 }
24307 24366
24308 other = cloneWithOffset(other, base); 24367 function positiveMomentsDifference(base, other) {
24309 if (base.isBefore(other)) { 24368 var res = {milliseconds: 0, months: 0};
24310 res = positiveMomentsDifference(base, other);
24311 } else {
24312 res = positiveMomentsDifference(other, base);
24313 res.milliseconds = -res.milliseconds;
24314 res.months = -res.months;
24315 }
24316 24369
24317 return res; 24370 res.months = other.month() - base.month() +
24371 (other.year() - base.year()) * 12;
24372 if (base.clone().add(res.months, 'M').isAfter(other)) {
24373 --res.months;
24318 } 24374 }
24319 24375
24320 function absRound (number) { 24376 res.milliseconds = +other - +(base.clone().add(res.months, 'M'));
24321 if (number < 0) {
24322 return Math.round(-1 * number) * -1;
24323 } else {
24324 return Math.round(number);
24325 }
24326 }
24327 24377
24328 // TODO: remove 'name' arg after deprecation is removed 24378 return res;
24329 function createAdder(direction, name) { 24379 }
24330 return function (val, period) {
24331 var dur, tmp;
24332 //invert the arguments, but complain about it
24333 if (period !== null && !isNaN(+period)) {
24334 deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +
24335 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');
24336 tmp = val; val = period; period = tmp;
24337 }
24338 24380
24339 val = typeof val === 'string' ? +val : val; 24381 function momentsDifference(base, other) {
24340 dur = create__createDuration(val, period); 24382 var res;
24341 add_subtract__addSubtract(this, dur, direction); 24383 if (!(base.isValid() && other.isValid())) {
24342 return this; 24384 return {milliseconds: 0, months: 0};
24343 };
24344 } 24385 }
24345 24386
24346 function add_subtract__addSubtract (mom, duration, isAdding, updateOffset) { 24387 other = cloneWithOffset(other, base);
24347 var milliseconds = duration._milliseconds, 24388 if (base.isBefore(other)) {
24348 days = absRound(duration._days), 24389 res = positiveMomentsDifference(base, other);
24349 months = absRound(duration._months); 24390 } else {
24391 res = positiveMomentsDifference(other, base);
24392 res.milliseconds = -res.milliseconds;
24393 res.months = -res.months;
24394 }
24350 24395
24351 if (!mom.isValid()) { 24396 return res;
24352 // No op 24397 }
24353 return; 24398
24399 // TODO: remove 'name' arg after deprecation is removed
24400 function createAdder(direction, name) {
24401 return function (val, period) {
24402 var dur, tmp;
24403 //invert the arguments, but complain about it
24404 if (period !== null && !isNaN(+period)) {
24405 deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +
24406 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');
24407 tmp = val; val = period; period = tmp;
24354 } 24408 }
24355 24409
24356 updateOffset = updateOffset == null ? true : updateOffset; 24410 val = typeof val === 'string' ? +val : val;
24411 dur = createDuration(val, period);
24412 addSubtract(this, dur, direction);
24413 return this;
24414 };
24415 }
24357 24416
24358 if (milliseconds) { 24417 function addSubtract (mom, duration, isAdding, updateOffset) {
24359 mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); 24418 var milliseconds = duration._milliseconds,
24360 } 24419 days = absRound(duration._days),
24361 if (days) { 24420 months = absRound(duration._months);
24362 get_set__set(mom, 'Date', get_set__get(mom, 'Date') + days * isAdding); 24421
24363 } 24422 if (!mom.isValid()) {
24364 if (months) { 24423 // No op
24365 setMonth(mom, get_set__get(mom, 'Month') + months * isAdding); 24424 return;
24366 }
24367 if (updateOffset) {
24368 utils_hooks__hooks.updateOffset(mom, days || months);
24369 }
24370 } 24425 }
24371 24426
24372 var add_subtract__add = createAdder(1, 'add'); 24427 updateOffset = updateOffset == null ? true : updateOffset;
24373 var add_subtract__subtract = createAdder(-1, 'subtract');
24374 24428
24375 function getCalendarFormat(myMoment, now) { 24429 if (milliseconds) {
24376 var diff = myMoment.diff(now, 'days', true); 24430 mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
24377 return diff < -6 ? 'sameElse' : 24431 }
24378 diff < -1 ? 'lastWeek' : 24432 if (days) {
24379 diff < 0 ? 'lastDay' : 24433 set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
24380 diff < 1 ? 'sameDay' :
24381 diff < 2 ? 'nextDay' :
24382 diff < 7 ? 'nextWeek' : 'sameElse';
24383 } 24434 }
24435 if (months) {
24436 setMonth(mom, get(mom, 'Month') + months * isAdding);
24437 }
24438 if (updateOffset) {
24439 hooks.updateOffset(mom, days || months);
24440 }
24441 }
24384 24442
24385 function moment_calendar__calendar (time, formats) { 24443 var add = createAdder(1, 'add');
24386 // We want to compare the start of today, vs this. 24444 var subtract = createAdder(-1, 'subtract');
24387 // Getting start-of-today depends on whether we're local/utc/offset or not.
24388 var now = time || local__createLocal(),
24389 sod = cloneWithOffset(now, this).startOf('day'),
24390 format = utils_hooks__hooks.calendarFormat(this, sod) || 'sameElse';
24391 24445
24392 var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); 24446 function getCalendarFormat(myMoment, now) {
24447 var diff = myMoment.diff(now, 'days', true);
24448 return diff < -6 ? 'sameElse' :
24449 diff < -1 ? 'lastWeek' :
24450 diff < 0 ? 'lastDay' :
24451 diff < 1 ? 'sameDay' :
24452 diff < 2 ? 'nextDay' :
24453 diff < 7 ? 'nextWeek' : 'sameElse';
24454 }
24393 24455
24394 return this.format(output || this.localeData().calendar(format, this, local__createLocal(now))); 24456 function calendar$1 (time, formats) {
24395 } 24457 // We want to compare the start of today, vs this.
24458 // Getting start-of-today depends on whether we're local/utc/offset or not.
24459 var now = time || createLocal(),
24460 sod = cloneWithOffset(now, this).startOf('day'),
24461 format = hooks.calendarFormat(this, sod) || 'sameElse';
24396 24462
24397 function clone () { 24463 var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);
24398 return new Moment(this);
24399 }
24400 24464
24401 function isAfter (input, units) { 24465 return this.format(output || this.localeData().calendar(format, this, createLocal(now)));
24402 var localInput = isMoment(input) ? input : local__createLocal(input); 24466 }
24403 if (!(this.isValid() && localInput.isValid())) {
24404 return false;
24405 }
24406 units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
24407 if (units === 'millisecond') {
24408 return this.valueOf() > localInput.valueOf();
24409 } else {
24410 return localInput.valueOf() < this.clone().startOf(units).valueOf();
24411 }
24412 }
24413 24467
24414 function isBefore (input, units) { 24468 function clone () {
24415 var localInput = isMoment(input) ? input : local__createLocal(input); 24469 return new Moment(this);
24416 if (!(this.isValid() && localInput.isValid())) { 24470 }
24417 return false;
24418 }
24419 units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
24420 if (units === 'millisecond') {
24421 return this.valueOf() < localInput.valueOf();
24422 } else {
24423 return this.clone().endOf(units).valueOf() < localInput.valueOf();
24424 }
24425 }
24426 24471
24427 function isBetween (from, to, units, inclusivity) { 24472 function isAfter (input, units) {
24428 inclusivity = inclusivity || '()'; 24473 var localInput = isMoment(input) ? input : createLocal(input);
24429 return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) && 24474 if (!(this.isValid() && localInput.isValid())) {
24430 (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units)); 24475 return false;
24431 } 24476 }
24432 24477 units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
24433 function isSame (input, units) { 24478 if (units === 'millisecond') {
24434 var localInput = isMoment(input) ? input : local__createLocal(input), 24479 return this.valueOf() > localInput.valueOf();
24435 inputMs; 24480 } else {
24436 if (!(this.isValid() && localInput.isValid())) { 24481 return localInput.valueOf() < this.clone().startOf(units).valueOf();
24437 return false;
24438 }
24439 units = normalizeUnits(units || 'millisecond');
24440 if (units === 'millisecond') {
24441 return this.valueOf() === localInput.valueOf();
24442 } else {
24443 inputMs = localInput.valueOf();
24444 return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();
24445 }
24446 } 24482 }
24483 }
24447 24484
24448 function isSameOrAfter (input, units) { 24485 function isBefore (input, units) {
24449 return this.isSame(input, units) || this.isAfter(input,units); 24486 var localInput = isMoment(input) ? input : createLocal(input);
24487 if (!(this.isValid() && localInput.isValid())) {
24488 return false;
24450 } 24489 }
24451 24490 units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
24452 function isSameOrBefore (input, units) { 24491 if (units === 'millisecond') {
24453 return this.isSame(input, units) || this.isBefore(input,units); 24492 return this.valueOf() < localInput.valueOf();
24493 } else {
24494 return this.clone().endOf(units).valueOf() < localInput.valueOf();
24454 } 24495 }
24496 }
24455 24497
24456 function diff (input, units, asFloat) { 24498 function isBetween (from, to, units, inclusivity) {
24457 var that, 24499 inclusivity = inclusivity || '()';
24458 zoneDelta, 24500 return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) &&
24459 delta, output; 24501 (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));
24502 }
24460 24503
24461 if (!this.isValid()) { 24504 function isSame (input, units) {
24462 return NaN; 24505 var localInput = isMoment(input) ? input : createLocal(input),
24463 } 24506 inputMs;
24507 if (!(this.isValid() && localInput.isValid())) {
24508 return false;
24509 }
24510 units = normalizeUnits(units || 'millisecond');
24511 if (units === 'millisecond') {
24512 return this.valueOf() === localInput.valueOf();
24513 } else {
24514 inputMs = localInput.valueOf();
24515 return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();
24516 }
24517 }
24464 24518
24465 that = cloneWithOffset(input, this); 24519 function isSameOrAfter (input, units) {
24520 return this.isSame(input, units) || this.isAfter(input,units);
24521 }
24466 24522
24467 if (!that.isValid()) { 24523 function isSameOrBefore (input, units) {
24468 return NaN; 24524 return this.isSame(input, units) || this.isBefore(input,units);
24469 } 24525 }
24470 24526
24471 zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; 24527 function diff (input, units, asFloat) {
24528 var that,
24529 zoneDelta,
24530 delta, output;
24472 24531
24473 units = normalizeUnits(units); 24532 if (!this.isValid()) {
24474 24533 return NaN;
24475 if (units === 'year' || units === 'month' || units === 'quarter') {
24476 output = monthDiff(this, that);
24477 if (units === 'quarter') {
24478 output = output / 3;
24479 } else if (units === 'year') {
24480 output = output / 12;
24481 }
24482 } else {
24483 delta = this - that;
24484 output = units === 'second' ? delta / 1e3 : // 1000
24485 units === 'minute' ? delta / 6e4 : // 1000 * 60
24486 units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60
24487 units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst
24488 units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst
24489 delta;
24490 }
24491 return asFloat ? output : absFloor(output);
24492 } 24534 }
24493 24535
24494 function monthDiff (a, b) { 24536 that = cloneWithOffset(input, this);
24495 // difference in months
24496 var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),
24497 // b is in (anchor - 1 month, anchor + 1 month)
24498 anchor = a.clone().add(wholeMonthDiff, 'months'),
24499 anchor2, adjust;
24500
24501 if (b - anchor < 0) {
24502 anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
24503 // linear across the month
24504 adjust = (b - anchor) / (anchor - anchor2);
24505 } else {
24506 anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
24507 // linear across the month
24508 adjust = (b - anchor) / (anchor2 - anchor);
24509 }
24510 24537
24511 //check for negative zero, return zero if negative zero 24538 if (!that.isValid()) {
24512 return -(wholeMonthDiff + adjust) || 0; 24539 return NaN;
24513 } 24540 }
24514 24541
24515 utils_hooks__hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; 24542 zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
24516 utils_hooks__hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
24517 24543
24518 function toString () { 24544 units = normalizeUnits(units);
24519 return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
24520 }
24521 24545
24522 function moment_format__toISOString () { 24546 if (units === 'year' || units === 'month' || units === 'quarter') {
24523 var m = this.clone().utc(); 24547 output = monthDiff(this, that);
24524 if (0 < m.year() && m.year() <= 9999) { 24548 if (units === 'quarter') {
24525 if (isFunction(Date.prototype.toISOString)) { 24549 output = output / 3;
24526 // native implementation is ~50x faster, use it when we can 24550 } else if (units === 'year') {
24527 return this.toDate().toISOString(); 24551 output = output / 12;
24528 } else {
24529 return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
24530 }
24531 } else {
24532 return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
24533 } 24552 }
24553 } else {
24554 delta = this - that;
24555 output = units === 'second' ? delta / 1e3 : // 1000
24556 units === 'minute' ? delta / 6e4 : // 1000 * 60
24557 units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60
24558 units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst
24559 units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst
24560 delta;
24561 }
24562 return asFloat ? output : absFloor(output);
24563 }
24564
24565 function monthDiff (a, b) {
24566 // difference in months
24567 var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),
24568 // b is in (anchor - 1 month, anchor + 1 month)
24569 anchor = a.clone().add(wholeMonthDiff, 'months'),
24570 anchor2, adjust;
24571
24572 if (b - anchor < 0) {
24573 anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
24574 // linear across the month
24575 adjust = (b - anchor) / (anchor - anchor2);
24576 } else {
24577 anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
24578 // linear across the month
24579 adjust = (b - anchor) / (anchor2 - anchor);
24534 } 24580 }
24535 24581
24536 function format (inputString) { 24582 //check for negative zero, return zero if negative zero
24537 if (!inputString) { 24583 return -(wholeMonthDiff + adjust) || 0;
24538 inputString = this.isUtc() ? utils_hooks__hooks.defaultFormatUtc : utils_hooks__hooks.defaultFormat; 24584 }
24539 }
24540 var output = formatMoment(this, inputString);
24541 return this.localeData().postformat(output);
24542 }
24543 24585
24544 function from (time, withoutSuffix) { 24586 hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
24545 if (this.isValid() && 24587 hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
24546 ((isMoment(time) && time.isValid()) ||
24547 local__createLocal(time).isValid())) {
24548 return create__createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
24549 } else {
24550 return this.localeData().invalidDate();
24551 }
24552 }
24553 24588
24554 function fromNow (withoutSuffix) { 24589 function toString () {
24555 return this.from(local__createLocal(), withoutSuffix); 24590 return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
24556 } 24591 }
24557 24592
24558 function to (time, withoutSuffix) { 24593 function toISOString () {
24559 if (this.isValid() && 24594 var m = this.clone().utc();
24560 ((isMoment(time) && time.isValid()) || 24595 if (0 < m.year() && m.year() <= 9999) {
24561 local__createLocal(time).isValid())) { 24596 if (isFunction(Date.prototype.toISOString)) {
24562 return create__createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix); 24597 // native implementation is ~50x faster, use it when we can
24598 return this.toDate().toISOString();
24563 } else { 24599 } else {
24564 return this.localeData().invalidDate(); 24600 return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
24565 } 24601 }
24602 } else {
24603 return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
24566 } 24604 }
24605 }
24567 24606
24568 function toNow (withoutSuffix) { 24607 /**
24569 return this.to(local__createLocal(), withoutSuffix); 24608 * Return a human readable representation of a moment that can
24609 * also be evaluated to get a new moment which is the same
24610 *
24611 * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
24612 */
24613 function inspect () {
24614 if (!this.isValid()) {
24615 return 'moment.invalid(/* ' + this._i + ' */)';
24570 } 24616 }
24617 var func = 'moment';
24618 var zone = '';
24619 if (!this.isLocal()) {
24620 func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
24621 zone = 'Z';
24622 }
24623 var prefix = '[' + func + '("]';
24624 var year = (0 < this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';
24625 var datetime = '-MM-DD[T]HH:mm:ss.SSS';
24626 var suffix = zone + '[")]';
24571 24627
24572 // If passed a locale key, it will set the locale for this 24628 return this.format(prefix + year + datetime + suffix);
24573 // instance. Otherwise, it will return the locale configuration 24629 }
24574 // variables for this instance.
24575 function locale (key) {
24576 var newLocaleData;
24577 24630
24578 if (key === undefined) { 24631 function format (inputString) {
24579 return this._locale._abbr; 24632 if (!inputString) {
24580 } else { 24633 inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;
24581 newLocaleData = locale_locales__getLocale(key);
24582 if (newLocaleData != null) {
24583 this._locale = newLocaleData;
24584 }
24585 return this;
24586 }
24587 } 24634 }
24635 var output = formatMoment(this, inputString);
24636 return this.localeData().postformat(output);
24637 }
24588 24638
24589 var lang = deprecate( 24639 function from (time, withoutSuffix) {
24590 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', 24640 if (this.isValid() &&
24591 function (key) { 24641 ((isMoment(time) && time.isValid()) ||
24592 if (key === undefined) { 24642 createLocal(time).isValid())) {
24593 return this.localeData(); 24643 return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
24594 } else { 24644 } else {
24595 return this.locale(key); 24645 return this.localeData().invalidDate();
24596 } 24646 }
24597 } 24647 }
24598 );
24599 24648
24600 function localeData () { 24649 function fromNow (withoutSuffix) {
24601 return this._locale; 24650 return this.from(createLocal(), withoutSuffix);
24651 }
24652
24653 function to (time, withoutSuffix) {
24654 if (this.isValid() &&
24655 ((isMoment(time) && time.isValid()) ||
24656 createLocal(time).isValid())) {
24657 return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);
24658 } else {
24659 return this.localeData().invalidDate();
24602 } 24660 }
24661 }
24603 24662
24604 function startOf (units) { 24663 function toNow (withoutSuffix) {
24605 units = normalizeUnits(units); 24664 return this.to(createLocal(), withoutSuffix);
24606 // the following switch intentionally omits break keywords 24665 }
24607 // to utilize falling through the cases.
24608 switch (units) {
24609 case 'year':
24610 this.month(0);
24611 /* falls through */
24612 case 'quarter':
24613 case 'month':
24614 this.date(1);
24615 /* falls through */
24616 case 'week':
24617 case 'isoWeek':
24618 case 'day':
24619 case 'date':
24620 this.hours(0);
24621 /* falls through */
24622 case 'hour':
24623 this.minutes(0);
24624 /* falls through */
24625 case 'minute':
24626 this.seconds(0);
24627 /* falls through */
24628 case 'second':
24629 this.milliseconds(0);
24630 }
24631 24666
24632 // weeks are a special case 24667 // If passed a locale key, it will set the locale for this
24633 if (units === 'week') { 24668 // instance. Otherwise, it will return the locale configuration
24634 this.weekday(0); 24669 // variables for this instance.
24635 } 24670 function locale (key) {
24636 if (units === 'isoWeek') { 24671 var newLocaleData;
24637 this.isoWeekday(1);
24638 }
24639 24672
24640 // quarters are also special 24673 if (key === undefined) {
24641 if (units === 'quarter') { 24674 return this._locale._abbr;
24642 this.month(Math.floor(this.month() / 3) * 3); 24675 } else {
24676 newLocaleData = getLocale(key);
24677 if (newLocaleData != null) {
24678 this._locale = newLocaleData;
24643 } 24679 }
24644
24645 return this; 24680 return this;
24646 } 24681 }
24682 }
24647 24683
24648 function endOf (units) { 24684 var lang = deprecate(
24649 units = normalizeUnits(units); 24685 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
24650 if (units === undefined || units === 'millisecond') { 24686 function (key) {
24651 return this; 24687 if (key === undefined) {
24652 } 24688 return this.localeData();
24653 24689 } else {
24654 // 'date' is an alias for 'day', so it should be considered as such. 24690 return this.locale(key);
24655 if (units === 'date') {
24656 units = 'day';
24657 } 24691 }
24658
24659 return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');
24660 } 24692 }
24693 );
24661 24694
24662 function to_type__valueOf () { 24695 function localeData () {
24663 return this._d.valueOf() - ((this._offset || 0) * 60000); 24696 return this._locale;
24664 } 24697 }
24665
24666 function unix () {
24667 return Math.floor(this.valueOf() / 1000);
24668 }
24669 24698
24670 function toDate () { 24699 function startOf (units) {
24671 return new Date(this.valueOf()); 24700 units = normalizeUnits(units);
24701 // the following switch intentionally omits break keywords
24702 // to utilize falling through the cases.
24703 switch (units) {
24704 case 'year':
24705 this.month(0);
24706 /* falls through */
24707 case 'quarter':
24708 case 'month':
24709 this.date(1);
24710 /* falls through */
24711 case 'week':
24712 case 'isoWeek':
24713 case 'day':
24714 case 'date':
24715 this.hours(0);
24716 /* falls through */
24717 case 'hour':
24718 this.minutes(0);
24719 /* falls through */
24720 case 'minute':
24721 this.seconds(0);
24722 /* falls through */
24723 case 'second':
24724 this.milliseconds(0);
24672 } 24725 }
24673 24726
24674 function toArray () { 24727 // weeks are a special case
24675 var m = this; 24728 if (units === 'week') {
24676 return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; 24729 this.weekday(0);
24677 } 24730 }
24678 24731 if (units === 'isoWeek') {
24679 function toObject () { 24732 this.isoWeekday(1);
24680 var m = this;
24681 return {
24682 years: m.year(),
24683 months: m.month(),
24684 date: m.date(),
24685 hours: m.hours(),
24686 minutes: m.minutes(),
24687 seconds: m.seconds(),
24688 milliseconds: m.milliseconds()
24689 };
24690 } 24733 }
24691 24734
24692 function toJSON () { 24735 // quarters are also special
24693 // new Date(NaN).toJSON() === null 24736 if (units === 'quarter') {
24694 return this.isValid() ? this.toISOString() : null; 24737 this.month(Math.floor(this.month() / 3) * 3);
24695 } 24738 }
24696 24739
24697 function moment_valid__isValid () { 24740 return this;
24698 return valid__isValid(this); 24741 }
24699 }
24700 24742
24701 function parsingFlags () { 24743 function endOf (units) {
24702 return extend({}, getParsingFlags(this)); 24744 units = normalizeUnits(units);
24745 if (units === undefined || units === 'millisecond') {
24746 return this;
24703 } 24747 }
24704 24748
24705 function invalidAt () { 24749 // 'date' is an alias for 'day', so it should be considered as such.
24706 return getParsingFlags(this).overflow; 24750 if (units === 'date') {
24751 units = 'day';
24707 } 24752 }
24708 24753
24709 function creationData() { 24754 return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');
24710 return { 24755 }
24711 input: this._i,
24712 format: this._f,
24713 locale: this._locale,
24714 isUTC: this._isUTC,
24715 strict: this._strict
24716 };
24717 }
24718
24719 // FORMATTING
24720
24721 addFormatToken(0, ['gg', 2], 0, function () {
24722 return this.weekYear() % 100;
24723 });
24724 24756
24725 addFormatToken(0, ['GG', 2], 0, function () { 24757 function valueOf () {
24726 return this.isoWeekYear() % 100; 24758 return this._d.valueOf() - ((this._offset || 0) * 60000);
24727 }); 24759 }
24728 24760
24729 function addWeekYearFormatToken (token, getter) { 24761 function unix () {
24730 addFormatToken(0, [token, token.length], 0, getter); 24762 return Math.floor(this.valueOf() / 1000);
24731 } 24763 }
24732 24764
24733 addWeekYearFormatToken('gggg', 'weekYear'); 24765 function toDate () {
24734 addWeekYearFormatToken('ggggg', 'weekYear'); 24766 return new Date(this.valueOf());
24735 addWeekYearFormatToken('GGGG', 'isoWeekYear'); 24767 }
24736 addWeekYearFormatToken('GGGGG', 'isoWeekYear');
24737 24768
24738 // ALIASES 24769 function toArray () {
24770 var m = this;
24771 return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];
24772 }
24739 24773
24740 addUnitAlias('weekYear', 'gg'); 24774 function toObject () {
24741 addUnitAlias('isoWeekYear', 'GG'); 24775 var m = this;
24776 return {
24777 years: m.year(),
24778 months: m.month(),
24779 date: m.date(),
24780 hours: m.hours(),
24781 minutes: m.minutes(),
24782 seconds: m.seconds(),
24783 milliseconds: m.milliseconds()
24784 };
24785 }
24742 24786
24743 // PRIORITY 24787 function toJSON () {
24788 // new Date(NaN).toJSON() === null
24789 return this.isValid() ? this.toISOString() : null;
24790 }
24744 24791
24745 addUnitPriority('weekYear', 1); 24792 function isValid$1 () {
24746 addUnitPriority('isoWeekYear', 1); 24793 return isValid(this);
24794 }
24747 24795
24796 function parsingFlags () {
24797 return extend({}, getParsingFlags(this));
24798 }
24748 24799
24749 // PARSING 24800 function invalidAt () {
24801 return getParsingFlags(this).overflow;
24802 }
24750 24803
24751 addRegexToken('G', matchSigned); 24804 function creationData() {
24752 addRegexToken('g', matchSigned); 24805 return {
24753 addRegexToken('GG', match1to2, match2); 24806 input: this._i,
24754 addRegexToken('gg', match1to2, match2); 24807 format: this._f,
24755 addRegexToken('GGGG', match1to4, match4); 24808 locale: this._locale,
24756 addRegexToken('gggg', match1to4, match4); 24809 isUTC: this._isUTC,
24757 addRegexToken('GGGGG', match1to6, match6); 24810 strict: this._strict
24758 addRegexToken('ggggg', match1to6, match6); 24811 };
24812 }
24759 24813
24760 addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { 24814 // FORMATTING
24761 week[token.substr(0, 2)] = toInt(input);
24762 });
24763 24815
24764 addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { 24816 addFormatToken(0, ['gg', 2], 0, function () {
24765 week[token] = utils_hooks__hooks.parseTwoDigitYear(input); 24817 return this.weekYear() % 100;
24766 }); 24818 });
24767 24819
24768 // MOMENTS 24820 addFormatToken(0, ['GG', 2], 0, function () {
24821 return this.isoWeekYear() % 100;
24822 });
24769 24823
24770 function getSetWeekYear (input) { 24824 function addWeekYearFormatToken (token, getter) {
24771 return getSetWeekYearHelper.call(this, 24825 addFormatToken(0, [token, token.length], 0, getter);
24772 input, 24826 }
24773 this.week(),
24774 this.weekday(),
24775 this.localeData()._week.dow,
24776 this.localeData()._week.doy);
24777 }
24778 24827
24779 function getSetISOWeekYear (input) { 24828 addWeekYearFormatToken('gggg', 'weekYear');
24780 return getSetWeekYearHelper.call(this, 24829 addWeekYearFormatToken('ggggg', 'weekYear');
24781 input, this.isoWeek(), this.isoWeekday(), 1, 4); 24830 addWeekYearFormatToken('GGGG', 'isoWeekYear');
24782 } 24831 addWeekYearFormatToken('GGGGG', 'isoWeekYear');
24783 24832
24784 function getISOWeeksInYear () { 24833 // ALIASES
24785 return weeksInYear(this.year(), 1, 4);
24786 }
24787 24834
24788 function getWeeksInYear () { 24835 addUnitAlias('weekYear', 'gg');
24789 var weekInfo = this.localeData()._week; 24836 addUnitAlias('isoWeekYear', 'GG');
24790 return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
24791 }
24792 24837
24793 function getSetWeekYearHelper(input, week, weekday, dow, doy) { 24838 // PRIORITY
24794 var weeksTarget;
24795 if (input == null) {
24796 return weekOfYear(this, dow, doy).year;
24797 } else {
24798 weeksTarget = weeksInYear(input, dow, doy);
24799 if (week > weeksTarget) {
24800 week = weeksTarget;
24801 }
24802 return setWeekAll.call(this, input, week, weekday, dow, doy);
24803 }
24804 }
24805 24839
24806 function setWeekAll(weekYear, week, weekday, dow, doy) { 24840 addUnitPriority('weekYear', 1);
24807 var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), 24841 addUnitPriority('isoWeekYear', 1);
24808 date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
24809 24842
24810 this.year(date.getUTCFullYear());
24811 this.month(date.getUTCMonth());
24812 this.date(date.getUTCDate());
24813 return this;
24814 }
24815 24843
24816 // FORMATTING 24844 // PARSING
24817 24845
24818 addFormatToken('Q', 0, 'Qo', 'quarter'); 24846 addRegexToken('G', matchSigned);
24847 addRegexToken('g', matchSigned);
24848 addRegexToken('GG', match1to2, match2);
24849 addRegexToken('gg', match1to2, match2);
24850 addRegexToken('GGGG', match1to4, match4);
24851 addRegexToken('gggg', match1to4, match4);
24852 addRegexToken('GGGGG', match1to6, match6);
24853 addRegexToken('ggggg', match1to6, match6);
24819 24854
24820 // ALIASES 24855 addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {
24856 week[token.substr(0, 2)] = toInt(input);
24857 });
24821 24858
24822 addUnitAlias('quarter', 'Q'); 24859 addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
24860 week[token] = hooks.parseTwoDigitYear(input);
24861 });
24823 24862
24824 // PRIORITY 24863 // MOMENTS
24825 24864
24826 addUnitPriority('quarter', 7); 24865 function getSetWeekYear (input) {
24866 return getSetWeekYearHelper.call(this,
24867 input,
24868 this.week(),
24869 this.weekday(),
24870 this.localeData()._week.dow,
24871 this.localeData()._week.doy);
24872 }
24827 24873
24828 // PARSING 24874 function getSetISOWeekYear (input) {
24875 return getSetWeekYearHelper.call(this,
24876 input, this.isoWeek(), this.isoWeekday(), 1, 4);
24877 }
24829 24878
24830 addRegexToken('Q', match1); 24879 function getISOWeeksInYear () {
24831 addParseToken('Q', function (input, array) { 24880 return weeksInYear(this.year(), 1, 4);
24832 array[MONTH] = (toInt(input) - 1) * 3; 24881 }
24833 });
24834 24882
24835 // MOMENTS 24883 function getWeeksInYear () {
24884 var weekInfo = this.localeData()._week;
24885 return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
24886 }
24836 24887
24837 function getSetQuarter (input) { 24888 function getSetWeekYearHelper(input, week, weekday, dow, doy) {
24838 return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); 24889 var weeksTarget;
24890 if (input == null) {
24891 return weekOfYear(this, dow, doy).year;
24892 } else {
24893 weeksTarget = weeksInYear(input, dow, doy);
24894 if (week > weeksTarget) {
24895 week = weeksTarget;
24896 }
24897 return setWeekAll.call(this, input, week, weekday, dow, doy);
24839 } 24898 }
24899 }
24840 24900
24841 // FORMATTING 24901 function setWeekAll(weekYear, week, weekday, dow, doy) {
24842 24902 var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
24843 addFormatToken('D', ['DD', 2], 'Do', 'date'); 24903 date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
24844
24845 // ALIASES
24846 24904
24847 addUnitAlias('date', 'D'); 24905 this.year(date.getUTCFullYear());
24906 this.month(date.getUTCMonth());
24907 this.date(date.getUTCDate());
24908 return this;
24909 }
24848 24910
24849 // PRIOROITY 24911 // FORMATTING
24850 addUnitPriority('date', 9);
24851 24912
24852 // PARSING 24913 addFormatToken('Q', 0, 'Qo', 'quarter');
24853 24914
24854 addRegexToken('D', match1to2); 24915 // ALIASES
24855 addRegexToken('DD', match1to2, match2);
24856 addRegexToken('Do', function (isStrict, locale) {
24857 return isStrict ? locale._ordinalParse : locale._ordinalParseLenient;
24858 });
24859 24916
24860 addParseToken(['D', 'DD'], DATE); 24917 addUnitAlias('quarter', 'Q');
24861 addParseToken('Do', function (input, array) {
24862 array[DATE] = toInt(input.match(match1to2)[0], 10);
24863 });
24864 24918
24865 // MOMENTS 24919 // PRIORITY
24866 24920
24867 var getSetDayOfMonth = makeGetSet('Date', true); 24921 addUnitPriority('quarter', 7);
24868 24922
24869 // FORMATTING 24923 // PARSING
24870 24924
24871 addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); 24925 addRegexToken('Q', match1);
24926 addParseToken('Q', function (input, array) {
24927 array[MONTH] = (toInt(input) - 1) * 3;
24928 });
24872 24929
24873 // ALIASES 24930 // MOMENTS
24874 24931
24875 addUnitAlias('dayOfYear', 'DDD'); 24932 function getSetQuarter (input) {
24933 return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
24934 }
24876 24935
24877 // PRIORITY 24936 // FORMATTING
24878 addUnitPriority('dayOfYear', 4);
24879 24937
24880 // PARSING 24938 addFormatToken('D', ['DD', 2], 'Do', 'date');
24881 24939
24882 addRegexToken('DDD', match1to3); 24940 // ALIASES
24883 addRegexToken('DDDD', match3);
24884 addParseToken(['DDD', 'DDDD'], function (input, array, config) {
24885 config._dayOfYear = toInt(input);
24886 });
24887 24941
24888 // HELPERS 24942 addUnitAlias('date', 'D');
24889 24943
24890 // MOMENTS 24944 // PRIOROITY
24945 addUnitPriority('date', 9);
24891 24946
24892 function getSetDayOfYear (input) { 24947 // PARSING
24893 var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;
24894 return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
24895 }
24896 24948
24897 // FORMATTING 24949 addRegexToken('D', match1to2);
24950 addRegexToken('DD', match1to2, match2);
24951 addRegexToken('Do', function (isStrict, locale) {
24952 return isStrict ? locale._ordinalParse : locale._ordinalParseLenient;
24953 });
24898 24954
24899 addFormatToken('m', ['mm', 2], 0, 'minute'); 24955 addParseToken(['D', 'DD'], DATE);
24956 addParseToken('Do', function (input, array) {
24957 array[DATE] = toInt(input.match(match1to2)[0], 10);
24958 });
24900 24959
24901 // ALIASES 24960 // MOMENTS
24902 24961
24903 addUnitAlias('minute', 'm'); 24962 var getSetDayOfMonth = makeGetSet('Date', true);
24904 24963
24905 // PRIORITY 24964 // FORMATTING
24906 24965
24907 addUnitPriority('minute', 14); 24966 addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
24908 24967
24909 // PARSING 24968 // ALIASES
24910 24969
24911 addRegexToken('m', match1to2); 24970 addUnitAlias('dayOfYear', 'DDD');
24912 addRegexToken('mm', match1to2, match2);
24913 addParseToken(['m', 'mm'], MINUTE);
24914 24971
24915 // MOMENTS 24972 // PRIORITY
24973 addUnitPriority('dayOfYear', 4);
24916 24974
24917 var getSetMinute = makeGetSet('Minutes', false); 24975 // PARSING
24918 24976
24919 // FORMATTING 24977 addRegexToken('DDD', match1to3);
24978 addRegexToken('DDDD', match3);
24979 addParseToken(['DDD', 'DDDD'], function (input, array, config) {
24980 config._dayOfYear = toInt(input);
24981 });
24920 24982
24921 addFormatToken('s', ['ss', 2], 0, 'second'); 24983 // HELPERS
24922 24984
24923 // ALIASES 24985 // MOMENTS
24924 24986
24925 addUnitAlias('second', 's'); 24987 function getSetDayOfYear (input) {
24988 var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;
24989 return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
24990 }
24926 24991
24927 // PRIORITY 24992 // FORMATTING
24928 24993
24929 addUnitPriority('second', 15); 24994 addFormatToken('m', ['mm', 2], 0, 'minute');
24930 24995
24931 // PARSING 24996 // ALIASES
24932 24997
24933 addRegexToken('s', match1to2); 24998 addUnitAlias('minute', 'm');
24934 addRegexToken('ss', match1to2, match2);
24935 addParseToken(['s', 'ss'], SECOND);
24936 24999
24937 // MOMENTS 25000 // PRIORITY
24938 25001
24939 var getSetSecond = makeGetSet('Seconds', false); 25002 addUnitPriority('minute', 14);
24940 25003
24941 // FORMATTING 25004 // PARSING
24942 25005
24943 addFormatToken('S', 0, 0, function () { 25006 addRegexToken('m', match1to2);
24944 return ~~(this.millisecond() / 100); 25007 addRegexToken('mm', match1to2, match2);
24945 }); 25008 addParseToken(['m', 'mm'], MINUTE);
24946 25009
24947 addFormatToken(0, ['SS', 2], 0, function () { 25010 // MOMENTS
24948 return ~~(this.millisecond() / 10);
24949 });
24950 25011
24951 addFormatToken(0, ['SSS', 3], 0, 'millisecond'); 25012 var getSetMinute = makeGetSet('Minutes', false);
24952 addFormatToken(0, ['SSSS', 4], 0, function () {
24953 return this.millisecond() * 10;
24954 });
24955 addFormatToken(0, ['SSSSS', 5], 0, function () {
24956 return this.millisecond() * 100;
24957 });
24958 addFormatToken(0, ['SSSSSS', 6], 0, function () {
24959 return this.millisecond() * 1000;
24960 });
24961 addFormatToken(0, ['SSSSSSS', 7], 0, function () {
24962 return this.millisecond() * 10000;
24963 });
24964 addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
24965 return this.millisecond() * 100000;
24966 });
24967 addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
24968 return this.millisecond() * 1000000;
24969 });
24970 25013
25014 // FORMATTING
24971 25015
24972 // ALIASES 25016 addFormatToken('s', ['ss', 2], 0, 'second');
24973 25017
24974 addUnitAlias('millisecond', 'ms'); 25018 // ALIASES
24975 25019
24976 // PRIORITY 25020 addUnitAlias('second', 's');
24977 25021
24978 addUnitPriority('millisecond', 16); 25022 // PRIORITY
24979 25023
24980 // PARSING 25024 addUnitPriority('second', 15);
24981 25025
24982 addRegexToken('S', match1to3, match1); 25026 // PARSING
24983 addRegexToken('SS', match1to3, match2);
24984 addRegexToken('SSS', match1to3, match3);
24985 25027
24986 var token; 25028 addRegexToken('s', match1to2);
24987 for (token = 'SSSS'; token.length <= 9; token += 'S') { 25029 addRegexToken('ss', match1to2, match2);
24988 addRegexToken(token, matchUnsigned); 25030 addParseToken(['s', 'ss'], SECOND);
24989 }
24990 25031
24991 function parseMs(input, array) { 25032 // MOMENTS
24992 array[MILLISECOND] = toInt(('0.' + input) * 1000);
24993 }
24994 25033
24995 for (token = 'S'; token.length <= 9; token += 'S') { 25034 var getSetSecond = makeGetSet('Seconds', false);
24996 addParseToken(token, parseMs);
24997 }
24998 // MOMENTS
24999 25035
25000 var getSetMillisecond = makeGetSet('Milliseconds', false); 25036 // FORMATTING
25001 25037
25002 // FORMATTING 25038 addFormatToken('S', 0, 0, function () {
25039 return ~~(this.millisecond() / 100);
25040 });
25003 25041
25004 addFormatToken('z', 0, 0, 'zoneAbbr'); 25042 addFormatToken(0, ['SS', 2], 0, function () {
25005 addFormatToken('zz', 0, 0, 'zoneName'); 25043 return ~~(this.millisecond() / 10);
25044 });
25006 25045
25007 // MOMENTS 25046 addFormatToken(0, ['SSS', 3], 0, 'millisecond');
25047 addFormatToken(0, ['SSSS', 4], 0, function () {
25048 return this.millisecond() * 10;
25049 });
25050 addFormatToken(0, ['SSSSS', 5], 0, function () {
25051 return this.millisecond() * 100;
25052 });
25053 addFormatToken(0, ['SSSSSS', 6], 0, function () {
25054 return this.millisecond() * 1000;
25055 });
25056 addFormatToken(0, ['SSSSSSS', 7], 0, function () {
25057 return this.millisecond() * 10000;
25058 });
25059 addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
25060 return this.millisecond() * 100000;
25061 });
25062 addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
25063 return this.millisecond() * 1000000;
25064 });
25008 25065
25009 function getZoneAbbr () {
25010 return this._isUTC ? 'UTC' : '';
25011 }
25012 25066
25013 function getZoneName () { 25067 // ALIASES
25014 return this._isUTC ? 'Coordinated Universal Time' : '';
25015 }
25016 25068
25017 var momentPrototype__proto = Moment.prototype; 25069 addUnitAlias('millisecond', 'ms');
25018
25019 momentPrototype__proto.add = add_subtract__add;
25020 momentPrototype__proto.calendar = moment_calendar__calendar;
25021 momentPrototype__proto.clone = clone;
25022 momentPrototype__proto.diff = diff;
25023 momentPrototype__proto.endOf = endOf;
25024 momentPrototype__proto.format = format;
25025 momentPrototype__proto.from = from;
25026 momentPrototype__proto.fromNow = fromNow;
25027 momentPrototype__proto.to = to;
25028 momentPrototype__proto.toNow = toNow;
25029 momentPrototype__proto.get = stringGet;
25030 momentPrototype__proto.invalidAt = invalidAt;
25031 momentPrototype__proto.isAfter = isAfter;
25032 momentPrototype__proto.isBefore = isBefore;
25033 momentPrototype__proto.isBetween = isBetween;
25034 momentPrototype__proto.isSame = isSame;
25035 momentPrototype__proto.isSameOrAfter = isSameOrAfter;
25036 momentPrototype__proto.isSameOrBefore = isSameOrBefore;
25037 momentPrototype__proto.isValid = moment_valid__isValid;
25038 momentPrototype__proto.lang = lang;
25039 momentPrototype__proto.locale = locale;
25040 momentPrototype__proto.localeData = localeData;
25041 momentPrototype__proto.max = prototypeMax;
25042 momentPrototype__proto.min = prototypeMin;
25043 momentPrototype__proto.parsingFlags = parsingFlags;
25044 momentPrototype__proto.set = stringSet;
25045 momentPrototype__proto.startOf = startOf;
25046 momentPrototype__proto.subtract = add_subtract__subtract;
25047 momentPrototype__proto.toArray = toArray;
25048 momentPrototype__proto.toObject = toObject;
25049 momentPrototype__proto.toDate = toDate;
25050 momentPrototype__proto.toISOString = moment_format__toISOString;
25051 momentPrototype__proto.toJSON = toJSON;
25052 momentPrototype__proto.toString = toString;
25053 momentPrototype__proto.unix = unix;
25054 momentPrototype__proto.valueOf = to_type__valueOf;
25055 momentPrototype__proto.creationData = creationData;
25056 25070
25057 // Year 25071 // PRIORITY
25058 momentPrototype__proto.year = getSetYear;
25059 momentPrototype__proto.isLeapYear = getIsLeapYear;
25060 25072
25061 // Week Year 25073 addUnitPriority('millisecond', 16);
25062 momentPrototype__proto.weekYear = getSetWeekYear;
25063 momentPrototype__proto.isoWeekYear = getSetISOWeekYear;
25064 25074
25065 // Quarter 25075 // PARSING
25066 momentPrototype__proto.quarter = momentPrototype__proto.quarters = getSetQuarter;
25067 25076
25068 // Month 25077 addRegexToken('S', match1to3, match1);
25069 momentPrototype__proto.month = getSetMonth; 25078 addRegexToken('SS', match1to3, match2);
25070 momentPrototype__proto.daysInMonth = getDaysInMonth; 25079 addRegexToken('SSS', match1to3, match3);
25071 25080
25072 // Week 25081 var token;
25073 momentPrototype__proto.week = momentPrototype__proto.weeks = getSetWeek; 25082 for (token = 'SSSS'; token.length <= 9; token += 'S') {
25074 momentPrototype__proto.isoWeek = momentPrototype__proto.isoWeeks = getSetISOWeek; 25083 addRegexToken(token, matchUnsigned);
25075 momentPrototype__proto.weeksInYear = getWeeksInYear; 25084 }
25076 momentPrototype__proto.isoWeeksInYear = getISOWeeksInYear;
25077
25078 // Day
25079 momentPrototype__proto.date = getSetDayOfMonth;
25080 momentPrototype__proto.day = momentPrototype__proto.days = getSetDayOfWeek;
25081 momentPrototype__proto.weekday = getSetLocaleDayOfWeek;
25082 momentPrototype__proto.isoWeekday = getSetISODayOfWeek;
25083 momentPrototype__proto.dayOfYear = getSetDayOfYear;
25084
25085 // Hour
25086 momentPrototype__proto.hour = momentPrototype__proto.hours = getSetHour;
25087
25088 // Minute
25089 momentPrototype__proto.minute = momentPrototype__proto.minutes = getSetMinute;
25090
25091 // Second
25092 momentPrototype__proto.second = momentPrototype__proto.seconds = getSetSecond;
25093
25094 // Millisecond
25095 momentPrototype__proto.millisecond = momentPrototype__proto.milliseconds = getSetMillisecond;
25096
25097 // Offset
25098 momentPrototype__proto.utcOffset = getSetOffset;
25099 momentPrototype__proto.utc = setOffsetToUTC;
25100 momentPrototype__proto.local = setOffsetToLocal;
25101 momentPrototype__proto.parseZone = setOffsetToParsedOffset;
25102 momentPrototype__proto.hasAlignedHourOffset = hasAlignedHourOffset;
25103 momentPrototype__proto.isDST = isDaylightSavingTime;
25104 momentPrototype__proto.isLocal = isLocal;
25105 momentPrototype__proto.isUtcOffset = isUtcOffset;
25106 momentPrototype__proto.isUtc = isUtc;
25107 momentPrototype__proto.isUTC = isUtc;
25108
25109 // Timezone
25110 momentPrototype__proto.zoneAbbr = getZoneAbbr;
25111 momentPrototype__proto.zoneName = getZoneName;
25112
25113 // Deprecations
25114 momentPrototype__proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);
25115 momentPrototype__proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);
25116 momentPrototype__proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);
25117 momentPrototype__proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);
25118 momentPrototype__proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);
25119
25120 var momentPrototype = momentPrototype__proto;
25121
25122 function moment__createUnix (input) {
25123 return local__createLocal(input * 1000);
25124 }
25125
25126 function moment__createInZone () {
25127 return local__createLocal.apply(null, arguments).parseZone();
25128 }
25129
25130 function preParsePostFormat (string) {
25131 return string;
25132 }
25133
25134 var prototype__proto = Locale.prototype;
25135
25136 prototype__proto.calendar = locale_calendar__calendar;
25137 prototype__proto.longDateFormat = longDateFormat;
25138 prototype__proto.invalidDate = invalidDate;
25139 prototype__proto.ordinal = ordinal;
25140 prototype__proto.preparse = preParsePostFormat;
25141 prototype__proto.postformat = preParsePostFormat;
25142 prototype__proto.relativeTime = relative__relativeTime;
25143 prototype__proto.pastFuture = pastFuture;
25144 prototype__proto.set = locale_set__set;
25145
25146 // Month
25147 prototype__proto.months = localeMonths;
25148 prototype__proto.monthsShort = localeMonthsShort;
25149 prototype__proto.monthsParse = localeMonthsParse;
25150 prototype__proto.monthsRegex = monthsRegex;
25151 prototype__proto.monthsShortRegex = monthsShortRegex;
25152
25153 // Week
25154 prototype__proto.week = localeWeek;
25155 prototype__proto.firstDayOfYear = localeFirstDayOfYear;
25156 prototype__proto.firstDayOfWeek = localeFirstDayOfWeek;
25157
25158 // Day of Week
25159 prototype__proto.weekdays = localeWeekdays;
25160 prototype__proto.weekdaysMin = localeWeekdaysMin;
25161 prototype__proto.weekdaysShort = localeWeekdaysShort;
25162 prototype__proto.weekdaysParse = localeWeekdaysParse;
25163
25164 prototype__proto.weekdaysRegex = weekdaysRegex;
25165 prototype__proto.weekdaysShortRegex = weekdaysShortRegex;
25166 prototype__proto.weekdaysMinRegex = weekdaysMinRegex;
25167
25168 // Hours
25169 prototype__proto.isPM = localeIsPM;
25170 prototype__proto.meridiem = localeMeridiem;
25171
25172 function lists__get (format, index, field, setter) {
25173 var locale = locale_locales__getLocale();
25174 var utc = create_utc__createUTC().set(setter, index);
25175 return locale[field](utc, format);
25176 }
25177 25085
25178 function listMonthsImpl (format, index, field) { 25086 function parseMs(input, array) {
25179 if (typeof format === 'number') { 25087 array[MILLISECOND] = toInt(('0.' + input) * 1000);
25180 index = format; 25088 }
25181 format = undefined;
25182 }
25183 25089
25184 format = format || ''; 25090 for (token = 'S'; token.length <= 9; token += 'S') {
25091 addParseToken(token, parseMs);
25092 }
25093 // MOMENTS
25185 25094
25186 if (index != null) { 25095 var getSetMillisecond = makeGetSet('Milliseconds', false);
25187 return lists__get(format, index, field, 'month');
25188 }
25189 25096
25190 var i; 25097 // FORMATTING
25191 var out = [];
25192 for (i = 0; i < 12; i++) {
25193 out[i] = lists__get(format, i, field, 'month');
25194 }
25195 return out;
25196 }
25197
25198 // ()
25199 // (5)
25200 // (fmt, 5)
25201 // (fmt)
25202 // (true)
25203 // (true, 5)
25204 // (true, fmt, 5)
25205 // (true, fmt)
25206 function listWeekdaysImpl (localeSorted, format, index, field) {
25207 if (typeof localeSorted === 'boolean') {
25208 if (typeof format === 'number') {
25209 index = format;
25210 format = undefined;
25211 }
25212 25098
25213 format = format || ''; 25099 addFormatToken('z', 0, 0, 'zoneAbbr');
25214 } else { 25100 addFormatToken('zz', 0, 0, 'zoneName');
25215 format = localeSorted;
25216 index = format;
25217 localeSorted = false;
25218 25101
25219 if (typeof format === 'number') { 25102 // MOMENTS
25220 index = format;
25221 format = undefined;
25222 }
25223 25103
25224 format = format || ''; 25104 function getZoneAbbr () {
25225 } 25105 return this._isUTC ? 'UTC' : '';
25106 }
25226 25107
25227 var locale = locale_locales__getLocale(), 25108 function getZoneName () {
25228 shift = localeSorted ? locale._week.dow : 0; 25109 return this._isUTC ? 'Coordinated Universal Time' : '';
25110 }
25229 25111
25230 if (index != null) { 25112 var proto = Moment.prototype;
25231 return lists__get(format, (index + shift) % 7, field, 'day'); 25113
25232 } 25114 proto.add = add;
25115 proto.calendar = calendar$1;
25116 proto.clone = clone;
25117 proto.diff = diff;
25118 proto.endOf = endOf;
25119 proto.format = format;
25120 proto.from = from;
25121 proto.fromNow = fromNow;
25122 proto.to = to;
25123 proto.toNow = toNow;
25124 proto.get = stringGet;
25125 proto.invalidAt = invalidAt;
25126 proto.isAfter = isAfter;
25127 proto.isBefore = isBefore;
25128 proto.isBetween = isBetween;
25129 proto.isSame = isSame;
25130 proto.isSameOrAfter = isSameOrAfter;
25131 proto.isSameOrBefore = isSameOrBefore;
25132 proto.isValid = isValid$1;
25133 proto.lang = lang;
25134 proto.locale = locale;
25135 proto.localeData = localeData;
25136 proto.max = prototypeMax;
25137 proto.min = prototypeMin;
25138 proto.parsingFlags = parsingFlags;
25139 proto.set = stringSet;
25140 proto.startOf = startOf;
25141 proto.subtract = subtract;
25142 proto.toArray = toArray;
25143 proto.toObject = toObject;
25144 proto.toDate = toDate;
25145 proto.toISOString = toISOString;
25146 proto.inspect = inspect;
25147 proto.toJSON = toJSON;
25148 proto.toString = toString;
25149 proto.unix = unix;
25150 proto.valueOf = valueOf;
25151 proto.creationData = creationData;
25233 25152
25234 var i; 25153 // Year
25235 var out = []; 25154 proto.year = getSetYear;
25236 for (i = 0; i < 7; i++) { 25155 proto.isLeapYear = getIsLeapYear;
25237 out[i] = lists__get(format, (i + shift) % 7, field, 'day'); 25156
25238 } 25157 // Week Year
25239 return out; 25158 proto.weekYear = getSetWeekYear;
25240 } 25159 proto.isoWeekYear = getSetISOWeekYear;
25160
25161 // Quarter
25162 proto.quarter = proto.quarters = getSetQuarter;
25241 25163
25242 function lists__listMonths (format, index) { 25164 // Month
25243 return listMonthsImpl(format, index, 'months'); 25165 proto.month = getSetMonth;
25166 proto.daysInMonth = getDaysInMonth;
25167
25168 // Week
25169 proto.week = proto.weeks = getSetWeek;
25170 proto.isoWeek = proto.isoWeeks = getSetISOWeek;
25171 proto.weeksInYear = getWeeksInYear;
25172 proto.isoWeeksInYear = getISOWeeksInYear;
25173
25174 // Day
25175 proto.date = getSetDayOfMonth;
25176 proto.day = proto.days = getSetDayOfWeek;
25177 proto.weekday = getSetLocaleDayOfWeek;
25178 proto.isoWeekday = getSetISODayOfWeek;
25179 proto.dayOfYear = getSetDayOfYear;
25180
25181 // Hour
25182 proto.hour = proto.hours = getSetHour;
25183
25184 // Minute
25185 proto.minute = proto.minutes = getSetMinute;
25186
25187 // Second
25188 proto.second = proto.seconds = getSetSecond;
25189
25190 // Millisecond
25191 proto.millisecond = proto.milliseconds = getSetMillisecond;
25192
25193 // Offset
25194 proto.utcOffset = getSetOffset;
25195 proto.utc = setOffsetToUTC;
25196 proto.local = setOffsetToLocal;
25197 proto.parseZone = setOffsetToParsedOffset;
25198 proto.hasAlignedHourOffset = hasAlignedHourOffset;
25199 proto.isDST = isDaylightSavingTime;
25200 proto.isLocal = isLocal;
25201 proto.isUtcOffset = isUtcOffset;
25202 proto.isUtc = isUtc;
25203 proto.isUTC = isUtc;
25204
25205 // Timezone
25206 proto.zoneAbbr = getZoneAbbr;
25207 proto.zoneName = getZoneName;
25208
25209 // Deprecations
25210 proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);
25211 proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);
25212 proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);
25213 proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);
25214 proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);
25215
25216 function createUnix (input) {
25217 return createLocal(input * 1000);
25218 }
25219
25220 function createInZone () {
25221 return createLocal.apply(null, arguments).parseZone();
25222 }
25223
25224 function preParsePostFormat (string) {
25225 return string;
25226 }
25227
25228 var proto$1 = Locale.prototype;
25229
25230 proto$1.calendar = calendar;
25231 proto$1.longDateFormat = longDateFormat;
25232 proto$1.invalidDate = invalidDate;
25233 proto$1.ordinal = ordinal;
25234 proto$1.preparse = preParsePostFormat;
25235 proto$1.postformat = preParsePostFormat;
25236 proto$1.relativeTime = relativeTime;
25237 proto$1.pastFuture = pastFuture;
25238 proto$1.set = set;
25239
25240 // Month
25241 proto$1.months = localeMonths;
25242 proto$1.monthsShort = localeMonthsShort;
25243 proto$1.monthsParse = localeMonthsParse;
25244 proto$1.monthsRegex = monthsRegex;
25245 proto$1.monthsShortRegex = monthsShortRegex;
25246
25247 // Week
25248 proto$1.week = localeWeek;
25249 proto$1.firstDayOfYear = localeFirstDayOfYear;
25250 proto$1.firstDayOfWeek = localeFirstDayOfWeek;
25251
25252 // Day of Week
25253 proto$1.weekdays = localeWeekdays;
25254 proto$1.weekdaysMin = localeWeekdaysMin;
25255 proto$1.weekdaysShort = localeWeekdaysShort;
25256 proto$1.weekdaysParse = localeWeekdaysParse;
25257
25258 proto$1.weekdaysRegex = weekdaysRegex;
25259 proto$1.weekdaysShortRegex = weekdaysShortRegex;
25260 proto$1.weekdaysMinRegex = weekdaysMinRegex;
25261
25262 // Hours
25263 proto$1.isPM = localeIsPM;
25264 proto$1.meridiem = localeMeridiem;
25265
25266 function get$1 (format, index, field, setter) {
25267 var locale = getLocale();
25268 var utc = createUTC().set(setter, index);
25269 return locale[field](utc, format);
25270 }
25271
25272 function listMonthsImpl (format, index, field) {
25273 if (isNumber(format)) {
25274 index = format;
25275 format = undefined;
25244 } 25276 }
25245 25277
25246 function lists__listMonthsShort (format, index) { 25278 format = format || '';
25247 return listMonthsImpl(format, index, 'monthsShort');
25248 }
25249 25279
25250 function lists__listWeekdays (localeSorted, format, index) { 25280 if (index != null) {
25251 return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); 25281 return get$1(format, index, field, 'month');
25252 } 25282 }
25253 25283
25254 function lists__listWeekdaysShort (localeSorted, format, index) { 25284 var i;
25255 return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); 25285 var out = [];
25286 for (i = 0; i < 12; i++) {
25287 out[i] = get$1(format, i, field, 'month');
25256 } 25288 }
25289 return out;
25290 }
25291
25292 // ()
25293 // (5)
25294 // (fmt, 5)
25295 // (fmt)
25296 // (true)
25297 // (true, 5)
25298 // (true, fmt, 5)
25299 // (true, fmt)
25300 function listWeekdaysImpl (localeSorted, format, index, field) {
25301 if (typeof localeSorted === 'boolean') {
25302 if (isNumber(format)) {
25303 index = format;
25304 format = undefined;
25305 }
25257 25306
25258 function lists__listWeekdaysMin (localeSorted, format, index) { 25307 format = format || '';
25259 return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); 25308 } else {
25260 } 25309 format = localeSorted;
25310 index = format;
25311 localeSorted = false;
25261 25312
25262 locale_locales__getSetGlobalLocale('en', { 25313 if (isNumber(format)) {
25263 ordinalParse: /\d{1,2}(th|st|nd|rd)/, 25314 index = format;
25264 ordinal : function (number) { 25315 format = undefined;
25265 var b = number % 10,
25266 output = (toInt(number % 100 / 10) === 1) ? 'th' :
25267 (b === 1) ? 'st' :
25268 (b === 2) ? 'nd' :
25269 (b === 3) ? 'rd' : 'th';
25270 return number + output;
25271 } 25316 }
25272 });
25273 25317
25274 // Side effect imports 25318 format = format || '';
25275 utils_hooks__hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', locale_locales__getSetGlobalLocale); 25319 }
25276 utils_hooks__hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', locale_locales__getLocale);
25277 25320
25278 var mathAbs = Math.abs; 25321 var locale = getLocale(),
25322 shift = localeSorted ? locale._week.dow : 0;
25279 25323
25280 function duration_abs__abs () { 25324 if (index != null) {
25281 var data = this._data; 25325 return get$1(format, (index + shift) % 7, field, 'day');
25326 }
25282 25327
25283 this._milliseconds = mathAbs(this._milliseconds); 25328 var i;
25284 this._days = mathAbs(this._days); 25329 var out = [];
25285 this._months = mathAbs(this._months); 25330 for (i = 0; i < 7; i++) {
25331 out[i] = get$1(format, (i + shift) % 7, field, 'day');
25332 }
25333 return out;
25334 }
25286 25335
25287 data.milliseconds = mathAbs(data.milliseconds); 25336 function listMonths (format, index) {
25288 data.seconds = mathAbs(data.seconds); 25337 return listMonthsImpl(format, index, 'months');
25289 data.minutes = mathAbs(data.minutes); 25338 }
25290 data.hours = mathAbs(data.hours);
25291 data.months = mathAbs(data.months);
25292 data.years = mathAbs(data.years);
25293 25339
25294 return this; 25340 function listMonthsShort (format, index) {
25295 } 25341 return listMonthsImpl(format, index, 'monthsShort');
25342 }
25296 25343
25297 function duration_add_subtract__addSubtract (duration, input, value, direction) { 25344 function listWeekdays (localeSorted, format, index) {
25298 var other = create__createDuration(input, value); 25345 return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
25346 }
25299 25347
25300 duration._milliseconds += direction * other._milliseconds; 25348 function listWeekdaysShort (localeSorted, format, index) {
25301 duration._days += direction * other._days; 25349 return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
25302 duration._months += direction * other._months; 25350 }
25303 25351
25304 return duration._bubble(); 25352 function listWeekdaysMin (localeSorted, format, index) {
25305 } 25353 return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
25354 }
25306 25355
25307 // supports only 2.0-style add(1, 's') or add(duration) 25356 getSetGlobalLocale('en', {
25308 function duration_add_subtract__add (input, value) { 25357 ordinalParse: /\d{1,2}(th|st|nd|rd)/,
25309 return duration_add_subtract__addSubtract(this, input, value, 1); 25358 ordinal : function (number) {
25359 var b = number % 10,
25360 output = (toInt(number % 100 / 10) === 1) ? 'th' :
25361 (b === 1) ? 'st' :
25362 (b === 2) ? 'nd' :
25363 (b === 3) ? 'rd' : 'th';
25364 return number + output;
25310 } 25365 }
25366 });
25311 25367
25312 // supports only 2.0-style subtract(1, 's') or subtract(duration) 25368 // Side effect imports
25313 function duration_add_subtract__subtract (input, value) { 25369 hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);
25314 return duration_add_subtract__addSubtract(this, input, value, -1); 25370 hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);
25315 }
25316 25371
25317 function absCeil (number) { 25372 var mathAbs = Math.abs;
25318 if (number < 0) {
25319 return Math.floor(number);
25320 } else {
25321 return Math.ceil(number);
25322 }
25323 }
25324 25373
25325 function bubble () { 25374 function abs () {
25326 var milliseconds = this._milliseconds; 25375 var data = this._data;
25327 var days = this._days;
25328 var months = this._months;
25329 var data = this._data;
25330 var seconds, minutes, hours, years, monthsFromDays;
25331
25332 // if we have a mix of positive and negative values, bubble down first
25333 // check: https://github.com/moment/moment/issues/2166
25334 if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
25335 (milliseconds <= 0 && days <= 0 && months <= 0))) {
25336 milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
25337 days = 0;
25338 months = 0;
25339 }
25340 25376
25341 // The following code bubbles up values, see the tests for 25377 this._milliseconds = mathAbs(this._milliseconds);
25342 // examples of what that means. 25378 this._days = mathAbs(this._days);
25343 data.milliseconds = milliseconds % 1000; 25379 this._months = mathAbs(this._months);
25344 25380
25345 seconds = absFloor(milliseconds / 1000); 25381 data.milliseconds = mathAbs(data.milliseconds);
25346 data.seconds = seconds % 60; 25382 data.seconds = mathAbs(data.seconds);
25383 data.minutes = mathAbs(data.minutes);
25384 data.hours = mathAbs(data.hours);
25385 data.months = mathAbs(data.months);
25386 data.years = mathAbs(data.years);
25347 25387
25348 minutes = absFloor(seconds / 60); 25388 return this;
25349 data.minutes = minutes % 60; 25389 }
25350 25390
25351 hours = absFloor(minutes / 60); 25391 function addSubtract$1 (duration, input, value, direction) {
25352 data.hours = hours % 24; 25392 var other = createDuration(input, value);
25353 25393
25354 days += absFloor(hours / 24); 25394 duration._milliseconds += direction * other._milliseconds;
25395 duration._days += direction * other._days;
25396 duration._months += direction * other._months;
25355 25397
25356 // convert days to months 25398 return duration._bubble();
25357 monthsFromDays = absFloor(daysToMonths(days)); 25399 }
25358 months += monthsFromDays;
25359 days -= absCeil(monthsToDays(monthsFromDays));
25360 25400
25361 // 12 months -> 1 year 25401 // supports only 2.0-style add(1, 's') or add(duration)
25362 years = absFloor(months / 12); 25402 function add$1 (input, value) {
25363 months %= 12; 25403 return addSubtract$1(this, input, value, 1);
25404 }
25364 25405
25365 data.days = days; 25406 // supports only 2.0-style subtract(1, 's') or subtract(duration)
25366 data.months = months; 25407 function subtract$1 (input, value) {
25367 data.years = years; 25408 return addSubtract$1(this, input, value, -1);
25409 }
25368 25410
25369 return this; 25411 function absCeil (number) {
25412 if (number < 0) {
25413 return Math.floor(number);
25414 } else {
25415 return Math.ceil(number);
25370 } 25416 }
25417 }
25371 25418
25372 function daysToMonths (days) { 25419 function bubble () {
25373 // 400 years have 146097 days (taking into account leap year rules) 25420 var milliseconds = this._milliseconds;
25374 // 400 years have 12 months === 4800 25421 var days = this._days;
25375 return days * 4800 / 146097; 25422 var months = this._months;
25376 } 25423 var data = this._data;
25424 var seconds, minutes, hours, years, monthsFromDays;
25377 25425
25378 function monthsToDays (months) { 25426 // if we have a mix of positive and negative values, bubble down first
25379 // the reverse of daysToMonths 25427 // check: https://github.com/moment/moment/issues/2166
25380 return months * 146097 / 4800; 25428 if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
25429 (milliseconds <= 0 && days <= 0 && months <= 0))) {
25430 milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
25431 days = 0;
25432 months = 0;
25381 } 25433 }
25382 25434
25383 function as (units) { 25435 // The following code bubbles up values, see the tests for
25384 var days; 25436 // examples of what that means.
25385 var months; 25437 data.milliseconds = milliseconds % 1000;
25386 var milliseconds = this._milliseconds;
25387 25438
25388 units = normalizeUnits(units); 25439 seconds = absFloor(milliseconds / 1000);
25440 data.seconds = seconds % 60;
25389 25441
25390 if (units === 'month' || units === 'year') { 25442 minutes = absFloor(seconds / 60);
25391 days = this._days + milliseconds / 864e5; 25443 data.minutes = minutes % 60;
25392 months = this._months + daysToMonths(days);
25393 return units === 'month' ? months : months / 12;
25394 } else {
25395 // handle milliseconds separately because of floating point math errors (issue #1867)
25396 days = this._days + Math.round(monthsToDays(this._months));
25397 switch (units) {
25398 case 'week' : return days / 7 + milliseconds / 6048e5;
25399 case 'day' : return days + milliseconds / 864e5;
25400 case 'hour' : return days * 24 + milliseconds / 36e5;
25401 case 'minute' : return days * 1440 + milliseconds / 6e4;
25402 case 'second' : return days * 86400 + milliseconds / 1000;
25403 // Math.floor prevents floating point math errors here
25404 case 'millisecond': return Math.floor(days * 864e5) + milliseconds;
25405 default: throw new Error('Unknown unit ' + units);
25406 }
25407 }
25408 }
25409 25444
25410 // TODO: Use this.as('ms')? 25445 hours = absFloor(minutes / 60);
25411 function duration_as__valueOf () { 25446 data.hours = hours % 24;
25412 return (
25413 this._milliseconds +
25414 this._days * 864e5 +
25415 (this._months % 12) * 2592e6 +
25416 toInt(this._months / 12) * 31536e6
25417 );
25418 }
25419 25447
25420 function makeAs (alias) { 25448 days += absFloor(hours / 24);
25421 return function () {
25422 return this.as(alias);
25423 };
25424 }
25425 25449
25426 var asMilliseconds = makeAs('ms'); 25450 // convert days to months
25427 var asSeconds = makeAs('s'); 25451 monthsFromDays = absFloor(daysToMonths(days));
25428 var asMinutes = makeAs('m'); 25452 months += monthsFromDays;
25429 var asHours = makeAs('h'); 25453 days -= absCeil(monthsToDays(monthsFromDays));
25430 var asDays = makeAs('d');
25431 var asWeeks = makeAs('w');
25432 var asMonths = makeAs('M');
25433 var asYears = makeAs('y');
25434 25454
25435 function duration_get__get (units) { 25455 // 12 months -> 1 year
25436 units = normalizeUnits(units); 25456 years = absFloor(months / 12);
25437 return this[units + 's'](); 25457 months %= 12;
25438 }
25439 25458
25440 function makeGetter(name) { 25459 data.days = days;
25441 return function () { 25460 data.months = months;
25442 return this._data[name]; 25461 data.years = years;
25443 };
25444 }
25445 25462
25446 var milliseconds = makeGetter('milliseconds'); 25463 return this;
25447 var seconds = makeGetter('seconds'); 25464 }
25448 var minutes = makeGetter('minutes');
25449 var hours = makeGetter('hours');
25450 var days = makeGetter('days');
25451 var months = makeGetter('months');
25452 var years = makeGetter('years');
25453 25465
25454 function weeks () { 25466 function daysToMonths (days) {
25455 return absFloor(this.days() / 7); 25467 // 400 years have 146097 days (taking into account leap year rules)
25456 } 25468 // 400 years have 12 months === 4800
25469 return days * 4800 / 146097;
25470 }
25457 25471
25458 var round = Math.round; 25472 function monthsToDays (months) {
25459 var thresholds = { 25473 // the reverse of daysToMonths
25460 s: 45, // seconds to minute 25474 return months * 146097 / 4800;
25461 m: 45, // minutes to hour 25475 }
25462 h: 22, // hours to day
25463 d: 26, // days to month
25464 M: 11 // months to year
25465 };
25466 25476
25467 // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize 25477 function as (units) {
25468 function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { 25478 var days;
25469 return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); 25479 var months;
25470 } 25480 var milliseconds = this._milliseconds;
25471
25472 function duration_humanize__relativeTime (posNegDuration, withoutSuffix, locale) {
25473 var duration = create__createDuration(posNegDuration).abs();
25474 var seconds = round(duration.as('s'));
25475 var minutes = round(duration.as('m'));
25476 var hours = round(duration.as('h'));
25477 var days = round(duration.as('d'));
25478 var months = round(duration.as('M'));
25479 var years = round(duration.as('y'));
25480
25481 var a = seconds < thresholds.s && ['s', seconds] ||
25482 minutes <= 1 && ['m'] ||
25483 minutes < thresholds.m && ['mm', minutes] ||
25484 hours <= 1 && ['h'] ||
25485 hours < thresholds.h && ['hh', hours] ||
25486 days <= 1 && ['d'] ||
25487 days < thresholds.d && ['dd', days] ||
25488 months <= 1 && ['M'] ||
25489 months < thresholds.M && ['MM', months] ||
25490 years <= 1 && ['y'] || ['yy', years];
25491
25492 a[2] = withoutSuffix;
25493 a[3] = +posNegDuration > 0;
25494 a[4] = locale;
25495 return substituteTimeAgo.apply(null, a);
25496 }
25497
25498 // This function allows you to set the rounding function for relative time strings
25499 function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {
25500 if (roundingFunction === undefined) {
25501 return round;
25502 }
25503 if (typeof(roundingFunction) === 'function') {
25504 round = roundingFunction;
25505 return true;
25506 }
25507 return false;
25508 }
25509 25481
25510 // This function allows you to set a threshold for relative time strings 25482 units = normalizeUnits(units);
25511 function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) { 25483
25512 if (thresholds[threshold] === undefined) { 25484 if (units === 'month' || units === 'year') {
25513 return false; 25485 days = this._days + milliseconds / 864e5;
25514 } 25486 months = this._months + daysToMonths(days);
25515 if (limit === undefined) { 25487 return units === 'month' ? months : months / 12;
25516 return thresholds[threshold]; 25488 } else {
25489 // handle milliseconds separately because of floating point math errors (issue #1867)
25490 days = this._days + Math.round(monthsToDays(this._months));
25491 switch (units) {
25492 case 'week' : return days / 7 + milliseconds / 6048e5;
25493 case 'day' : return days + milliseconds / 864e5;
25494 case 'hour' : return days * 24 + milliseconds / 36e5;
25495 case 'minute' : return days * 1440 + milliseconds / 6e4;
25496 case 'second' : return days * 86400 + milliseconds / 1000;
25497 // Math.floor prevents floating point math errors here
25498 case 'millisecond': return Math.floor(days * 864e5) + milliseconds;
25499 default: throw new Error('Unknown unit ' + units);
25517 } 25500 }
25518 thresholds[threshold] = limit;
25519 return true;
25520 } 25501 }
25502 }
25521 25503
25522 function humanize (withSuffix) { 25504 // TODO: Use this.as('ms')?
25523 var locale = this.localeData(); 25505 function valueOf$1 () {
25524 var output = duration_humanize__relativeTime(this, !withSuffix, locale); 25506 return (
25507 this._milliseconds +
25508 this._days * 864e5 +
25509 (this._months % 12) * 2592e6 +
25510 toInt(this._months / 12) * 31536e6
25511 );
25512 }
25525 25513
25526 if (withSuffix) { 25514 function makeAs (alias) {
25527 output = locale.pastFuture(+this, output); 25515 return function () {
25528 } 25516 return this.as(alias);
25517 };
25518 }
25529 25519
25530 return locale.postformat(output); 25520 var asMilliseconds = makeAs('ms');
25531 } 25521 var asSeconds = makeAs('s');
25532 25522 var asMinutes = makeAs('m');
25533 var iso_string__abs = Math.abs; 25523 var asHours = makeAs('h');
25534 25524 var asDays = makeAs('d');
25535 function iso_string__toISOString() { 25525 var asWeeks = makeAs('w');
25536 // for ISO strings we do not use the normal bubbling rules: 25526 var asMonths = makeAs('M');
25537 // * milliseconds bubble up until they become hours 25527 var asYears = makeAs('y');
25538 // * days do not bubble at all
25539 // * months bubble up until they become years
25540 // This is because there is no context-free conversion between hours and days
25541 // (think of clock changes)
25542 // and also not between days and months (28-31 days per month)
25543 var seconds = iso_string__abs(this._milliseconds) / 1000;
25544 var days = iso_string__abs(this._days);
25545 var months = iso_string__abs(this._months);
25546 var minutes, hours, years;
25547
25548 // 3600 seconds -> 60 minutes -> 1 hour
25549 minutes = absFloor(seconds / 60);
25550 hours = absFloor(minutes / 60);
25551 seconds %= 60;
25552 minutes %= 60;
25553
25554 // 12 months -> 1 year
25555 years = absFloor(months / 12);
25556 months %= 12;
25557
25558
25559 // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
25560 var Y = years;
25561 var M = months;
25562 var D = days;
25563 var h = hours;
25564 var m = minutes;
25565 var s = seconds;
25566 var total = this.asSeconds();
25567
25568 if (!total) {
25569 // this is the same as C#'s (Noda) and python (isodate)...
25570 // but not other JS (goog.date)
25571 return 'P0D';
25572 }
25573 25528
25574 return (total < 0 ? '-' : '') + 25529 function get$2 (units) {
25575 'P' + 25530 units = normalizeUnits(units);
25576 (Y ? Y + 'Y' : '') + 25531 return this[units + 's']();
25577 (M ? M + 'M' : '') + 25532 }
25578 (D ? D + 'D' : '') +
25579 ((h || m || s) ? 'T' : '') +
25580 (h ? h + 'H' : '') +
25581 (m ? m + 'M' : '') +
25582 (s ? s + 'S' : '');
25583 }
25584
25585 var duration_prototype__proto = Duration.prototype;
25586
25587 duration_prototype__proto.abs = duration_abs__abs;
25588 duration_prototype__proto.add = duration_add_subtract__add;
25589 duration_prototype__proto.subtract = duration_add_subtract__subtract;
25590 duration_prototype__proto.as = as;
25591 duration_prototype__proto.asMilliseconds = asMilliseconds;
25592 duration_prototype__proto.asSeconds = asSeconds;
25593 duration_prototype__proto.asMinutes = asMinutes;
25594 duration_prototype__proto.asHours = asHours;
25595 duration_prototype__proto.asDays = asDays;
25596 duration_prototype__proto.asWeeks = asWeeks;
25597 duration_prototype__proto.asMonths = asMonths;
25598 duration_prototype__proto.asYears = asYears;
25599 duration_prototype__proto.valueOf = duration_as__valueOf;
25600 duration_prototype__proto._bubble = bubble;
25601 duration_prototype__proto.get = duration_get__get;
25602 duration_prototype__proto.milliseconds = milliseconds;
25603 duration_prototype__proto.seconds = seconds;
25604 duration_prototype__proto.minutes = minutes;
25605 duration_prototype__proto.hours = hours;
25606 duration_prototype__proto.days = days;
25607 duration_prototype__proto.weeks = weeks;
25608 duration_prototype__proto.months = months;
25609 duration_prototype__proto.years = years;
25610 duration_prototype__proto.humanize = humanize;
25611 duration_prototype__proto.toISOString = iso_string__toISOString;
25612 duration_prototype__proto.toString = iso_string__toISOString;
25613 duration_prototype__proto.toJSON = iso_string__toISOString;
25614 duration_prototype__proto.locale = locale;
25615 duration_prototype__proto.localeData = localeData;
25616
25617 // Deprecations
25618 duration_prototype__proto.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', iso_string__toISOString);
25619 duration_prototype__proto.lang = lang;
25620
25621 // Side effect imports
25622
25623 // FORMATTING
25624
25625 addFormatToken('X', 0, 0, 'unix');
25626 addFormatToken('x', 0, 0, 'valueOf');
25627
25628 // PARSING
25629
25630 addRegexToken('x', matchSigned);
25631 addRegexToken('X', matchTimestamp);
25632 addParseToken('X', function (input, array, config) {
25633 config._d = new Date(parseFloat(input, 10) * 1000);
25634 });
25635 addParseToken('x', function (input, array, config) {
25636 config._d = new Date(toInt(input));
25637 });
25638 25533
25639 // Side effect imports 25534 function makeGetter(name) {
25535 return function () {
25536 return this._data[name];
25537 };
25538 }
25640 25539
25540 var milliseconds = makeGetter('milliseconds');
25541 var seconds = makeGetter('seconds');
25542 var minutes = makeGetter('minutes');
25543 var hours = makeGetter('hours');
25544 var days = makeGetter('days');
25545 var months = makeGetter('months');
25546 var years = makeGetter('years');
25641 25547
25642 utils_hooks__hooks.version = '2.14.1'; 25548 function weeks () {
25549 return absFloor(this.days() / 7);
25550 }
25643 25551
25644 setHookCallback(local__createLocal); 25552 var round = Math.round;
25553 var thresholds = {
25554 s: 45, // seconds to minute
25555 m: 45, // minutes to hour
25556 h: 22, // hours to day
25557 d: 26, // days to month
25558 M: 11 // months to year
25559 };
25645 25560
25646 utils_hooks__hooks.fn = momentPrototype; 25561 // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
25647 utils_hooks__hooks.min = min; 25562 function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
25648 utils_hooks__hooks.max = max; 25563 return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
25649 utils_hooks__hooks.now = now; 25564 }
25650 utils_hooks__hooks.utc = create_utc__createUTC; 25565
25651 utils_hooks__hooks.unix = moment__createUnix; 25566 function relativeTime$1 (posNegDuration, withoutSuffix, locale) {
25652 utils_hooks__hooks.months = lists__listMonths; 25567 var duration = createDuration(posNegDuration).abs();
25653 utils_hooks__hooks.isDate = isDate; 25568 var seconds = round(duration.as('s'));
25654 utils_hooks__hooks.locale = locale_locales__getSetGlobalLocale; 25569 var minutes = round(duration.as('m'));
25655 utils_hooks__hooks.invalid = valid__createInvalid; 25570 var hours = round(duration.as('h'));
25656 utils_hooks__hooks.duration = create__createDuration; 25571 var days = round(duration.as('d'));
25657 utils_hooks__hooks.isMoment = isMoment; 25572 var months = round(duration.as('M'));
25658 utils_hooks__hooks.weekdays = lists__listWeekdays; 25573 var years = round(duration.as('y'));
25659 utils_hooks__hooks.parseZone = moment__createInZone; 25574
25660 utils_hooks__hooks.localeData = locale_locales__getLocale; 25575 var a = seconds < thresholds.s && ['s', seconds] ||
25661 utils_hooks__hooks.isDuration = isDuration; 25576 minutes <= 1 && ['m'] ||
25662 utils_hooks__hooks.monthsShort = lists__listMonthsShort; 25577 minutes < thresholds.m && ['mm', minutes] ||
25663 utils_hooks__hooks.weekdaysMin = lists__listWeekdaysMin; 25578 hours <= 1 && ['h'] ||
25664 utils_hooks__hooks.defineLocale = defineLocale; 25579 hours < thresholds.h && ['hh', hours] ||
25665 utils_hooks__hooks.updateLocale = updateLocale; 25580 days <= 1 && ['d'] ||
25666 utils_hooks__hooks.locales = locale_locales__listLocales; 25581 days < thresholds.d && ['dd', days] ||
25667 utils_hooks__hooks.weekdaysShort = lists__listWeekdaysShort; 25582 months <= 1 && ['M'] ||
25668 utils_hooks__hooks.normalizeUnits = normalizeUnits; 25583 months < thresholds.M && ['MM', months] ||
25669 utils_hooks__hooks.relativeTimeRounding = duration_humanize__getSetRelativeTimeRounding; 25584 years <= 1 && ['y'] || ['yy', years];
25670 utils_hooks__hooks.relativeTimeThreshold = duration_humanize__getSetRelativeTimeThreshold; 25585
25671 utils_hooks__hooks.calendarFormat = getCalendarFormat; 25586 a[2] = withoutSuffix;
25672 utils_hooks__hooks.prototype = momentPrototype; 25587 a[3] = +posNegDuration > 0;
25588 a[4] = locale;
25589 return substituteTimeAgo.apply(null, a);
25590 }
25591
25592 // This function allows you to set the rounding function for relative time strings
25593 function getSetRelativeTimeRounding (roundingFunction) {
25594 if (roundingFunction === undefined) {
25595 return round;
25596 }
25597 if (typeof(roundingFunction) === 'function') {
25598 round = roundingFunction;
25599 return true;
25600 }
25601 return false;
25602 }
25673 25603
25674 var _moment = utils_hooks__hooks; 25604 // This function allows you to set a threshold for relative time strings
25605 function getSetRelativeTimeThreshold (threshold, limit) {
25606 if (thresholds[threshold] === undefined) {
25607 return false;
25608 }
25609 if (limit === undefined) {
25610 return thresholds[threshold];
25611 }
25612 thresholds[threshold] = limit;
25613 return true;
25614 }
25675 25615
25676 return _moment; 25616 function humanize (withSuffix) {
25617 var locale = this.localeData();
25618 var output = relativeTime$1(this, !withSuffix, locale);
25619
25620 if (withSuffix) {
25621 output = locale.pastFuture(+this, output);
25622 }
25623
25624 return locale.postformat(output);
25625 }
25626
25627 var abs$1 = Math.abs;
25628
25629 function toISOString$1() {
25630 // for ISO strings we do not use the normal bubbling rules:
25631 // * milliseconds bubble up until they become hours
25632 // * days do not bubble at all
25633 // * months bubble up until they become years
25634 // This is because there is no context-free conversion between hours and days
25635 // (think of clock changes)
25636 // and also not between days and months (28-31 days per month)
25637 var seconds = abs$1(this._milliseconds) / 1000;
25638 var days = abs$1(this._days);
25639 var months = abs$1(this._months);
25640 var minutes, hours, years;
25641
25642 // 3600 seconds -> 60 minutes -> 1 hour
25643 minutes = absFloor(seconds / 60);
25644 hours = absFloor(minutes / 60);
25645 seconds %= 60;
25646 minutes %= 60;
25647
25648 // 12 months -> 1 year
25649 years = absFloor(months / 12);
25650 months %= 12;
25651
25652
25653 // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
25654 var Y = years;
25655 var M = months;
25656 var D = days;
25657 var h = hours;
25658 var m = minutes;
25659 var s = seconds;
25660 var total = this.asSeconds();
25661
25662 if (!total) {
25663 // this is the same as C#'s (Noda) and python (isodate)...
25664 // but not other JS (goog.date)
25665 return 'P0D';
25666 }
25667
25668 return (total < 0 ? '-' : '') +
25669 'P' +
25670 (Y ? Y + 'Y' : '') +
25671 (M ? M + 'M' : '') +
25672 (D ? D + 'D' : '') +
25673 ((h || m || s) ? 'T' : '') +
25674 (h ? h + 'H' : '') +
25675 (m ? m + 'M' : '') +
25676 (s ? s + 'S' : '');
25677 }
25678
25679 var proto$2 = Duration.prototype;
25680
25681 proto$2.abs = abs;
25682 proto$2.add = add$1;
25683 proto$2.subtract = subtract$1;
25684 proto$2.as = as;
25685 proto$2.asMilliseconds = asMilliseconds;
25686 proto$2.asSeconds = asSeconds;
25687 proto$2.asMinutes = asMinutes;
25688 proto$2.asHours = asHours;
25689 proto$2.asDays = asDays;
25690 proto$2.asWeeks = asWeeks;
25691 proto$2.asMonths = asMonths;
25692 proto$2.asYears = asYears;
25693 proto$2.valueOf = valueOf$1;
25694 proto$2._bubble = bubble;
25695 proto$2.get = get$2;
25696 proto$2.milliseconds = milliseconds;
25697 proto$2.seconds = seconds;
25698 proto$2.minutes = minutes;
25699 proto$2.hours = hours;
25700 proto$2.days = days;
25701 proto$2.weeks = weeks;
25702 proto$2.months = months;
25703 proto$2.years = years;
25704 proto$2.humanize = humanize;
25705 proto$2.toISOString = toISOString$1;
25706 proto$2.toString = toISOString$1;
25707 proto$2.toJSON = toISOString$1;
25708 proto$2.locale = locale;
25709 proto$2.localeData = localeData;
25710
25711 // Deprecations
25712 proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);
25713 proto$2.lang = lang;
25714
25715 // Side effect imports
25716
25717 // FORMATTING
25718
25719 addFormatToken('X', 0, 0, 'unix');
25720 addFormatToken('x', 0, 0, 'valueOf');
25721
25722 // PARSING
25723
25724 addRegexToken('x', matchSigned);
25725 addRegexToken('X', matchTimestamp);
25726 addParseToken('X', function (input, array, config) {
25727 config._d = new Date(parseFloat(input, 10) * 1000);
25728 });
25729 addParseToken('x', function (input, array, config) {
25730 config._d = new Date(toInt(input));
25731 });
25677 25732
25678 })); 25733 // Side effect imports
25734
25735
25736 hooks.version = '2.16.0';
25737
25738 setHookCallback(createLocal);
25739
25740 hooks.fn = proto;
25741 hooks.min = min;
25742 hooks.max = max;
25743 hooks.now = now;
25744 hooks.utc = createUTC;
25745 hooks.unix = createUnix;
25746 hooks.months = listMonths;
25747 hooks.isDate = isDate;
25748 hooks.locale = getSetGlobalLocale;
25749 hooks.invalid = createInvalid;
25750 hooks.duration = createDuration;
25751 hooks.isMoment = isMoment;
25752 hooks.weekdays = listWeekdays;
25753 hooks.parseZone = createInZone;
25754 hooks.localeData = getLocale;
25755 hooks.isDuration = isDuration;
25756 hooks.monthsShort = listMonthsShort;
25757 hooks.weekdaysMin = listWeekdaysMin;
25758 hooks.defineLocale = defineLocale;
25759 hooks.updateLocale = updateLocale;
25760 hooks.locales = listLocales;
25761 hooks.weekdaysShort = listWeekdaysShort;
25762 hooks.normalizeUnits = normalizeUnits;
25763 hooks.relativeTimeRounding = getSetRelativeTimeRounding;
25764 hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
25765 hooks.calendarFormat = getCalendarFormat;
25766 hooks.prototype = proto;
25767
25768 return hooks;
25769
25770 })));
25771
25679 25772
25680/***/ }, 25773/***/ },
25681/* 178 */ 25774/* 175 */
25682/***/ function(module, exports, __webpack_require__) { 25775/***/ function(module, exports, __webpack_require__) {
25683 25776
25684 'use strict'; 25777 'use strict';
@@ -25687,7 +25780,7 @@
25687 value: true 25780 value: true
25688 }); 25781 });
25689 25782
25690 var _src = __webpack_require__(179); 25783 var _src = __webpack_require__(176);
25691 25784
25692 var _src2 = _interopRequireDefault(_src); 25785 var _src2 = _interopRequireDefault(_src);
25693 25786
@@ -25697,7 +25790,7 @@
25697 module.exports = exports['default']; 25790 module.exports = exports['default'];
25698 25791
25699/***/ }, 25792/***/ },
25700/* 179 */ 25793/* 176 */
25701/***/ function(module, exports, __webpack_require__) { 25794/***/ function(module, exports, __webpack_require__) {
25702 25795
25703 'use strict'; 25796 'use strict';
@@ -25706,7 +25799,7 @@
25706 value: true 25799 value: true
25707 }); 25800 });
25708 25801
25709 var _TimePicker = __webpack_require__(180); 25802 var _TimePicker = __webpack_require__(177);
25710 25803
25711 var _TimePicker2 = _interopRequireDefault(_TimePicker); 25804 var _TimePicker2 = _interopRequireDefault(_TimePicker);
25712 25805
@@ -25716,7 +25809,7 @@
25716 module.exports = exports['default']; 25809 module.exports = exports['default'];
25717 25810
25718/***/ }, 25811/***/ },
25719/* 180 */ 25812/* 177 */
25720/***/ function(module, exports, __webpack_require__) { 25813/***/ function(module, exports, __webpack_require__) {
25721 25814
25722 'use strict'; 25815 'use strict';
@@ -25729,19 +25822,19 @@
25729 25822
25730 var _react2 = _interopRequireDefault(_react); 25823 var _react2 = _interopRequireDefault(_react);
25731 25824
25732 var _rcTrigger = __webpack_require__(181); 25825 var _rcTrigger = __webpack_require__(178);
25733 25826
25734 var _rcTrigger2 = _interopRequireDefault(_rcTrigger); 25827 var _rcTrigger2 = _interopRequireDefault(_rcTrigger);
25735 25828
25736 var _Panel = __webpack_require__(213); 25829 var _Panel = __webpack_require__(250);
25737 25830
25738 var _Panel2 = _interopRequireDefault(_Panel); 25831 var _Panel2 = _interopRequireDefault(_Panel);
25739 25832
25740 var _placements = __webpack_require__(237); 25833 var _placements = __webpack_require__(259);
25741 25834
25742 var _placements2 = _interopRequireDefault(_placements); 25835 var _placements2 = _interopRequireDefault(_placements);
25743 25836
25744 var _moment = __webpack_require__(177); 25837 var _moment = __webpack_require__(174);
25745 25838
25746 var _moment2 = _interopRequireDefault(_moment); 25839 var _moment2 = _interopRequireDefault(_moment);
25747 25840
@@ -25773,9 +25866,10 @@
25773 placeholder: _react.PropTypes.string, 25866 placeholder: _react.PropTypes.string,
25774 format: _react.PropTypes.string, 25867 format: _react.PropTypes.string,
25775 showHour: _react.PropTypes.bool, 25868 showHour: _react.PropTypes.bool,
25869 showMinute: _react.PropTypes.bool,
25870 showSecond: _react.PropTypes.bool,
25776 style: _react.PropTypes.object, 25871 style: _react.PropTypes.object,
25777 className: _react.PropTypes.string, 25872 className: _react.PropTypes.string,
25778 showSecond: _react.PropTypes.bool,
25779 disabledHours: _react.PropTypes.func, 25873 disabledHours: _react.PropTypes.func,
25780 disabledMinutes: _react.PropTypes.func, 25874 disabledMinutes: _react.PropTypes.func,
25781 disabledSeconds: _react.PropTypes.func, 25875 disabledSeconds: _react.PropTypes.func,
@@ -25797,6 +25891,7 @@
25797 defaultOpenValue: (0, _moment2.default)(), 25891 defaultOpenValue: (0, _moment2.default)(),
25798 allowEmpty: true, 25892 allowEmpty: true,
25799 showHour: true, 25893 showHour: true,
25894 showMinute: true,
25800 showSecond: true, 25895 showSecond: true,
25801 disabledHours: noop, 25896 disabledHours: noop,
25802 disabledMinutes: noop, 25897 disabledMinutes: noop,
@@ -25811,13 +25906,13 @@
25811 }, 25906 },
25812 getInitialState: function getInitialState() { 25907 getInitialState: function getInitialState() {
25813 this.savePanelRef = refFn.bind(this, 'panelInstance'); 25908 this.savePanelRef = refFn.bind(this, 'panelInstance');
25814 var _props = this.props; 25909 var _props = this.props,
25815 var defaultOpen = _props.defaultOpen; 25910 defaultOpen = _props.defaultOpen,
25816 var defaultValue = _props.defaultValue; 25911 defaultValue = _props.defaultValue,
25817 var _props$open = _props.open; 25912 _props$open = _props.open,
25818 var open = _props$open === undefined ? defaultOpen : _props$open; 25913 open = _props$open === undefined ? defaultOpen : _props$open,
25819 var _props$value = _props.value; 25914 _props$value = _props.value,
25820 var value = _props$value === undefined ? defaultValue : _props$value; 25915 value = _props$value === undefined ? defaultValue : _props$value;
25821 25916
25822 return { 25917 return {
25823 open: open, 25918 open: open,
@@ -25825,8 +25920,8 @@
25825 }; 25920 };
25826 }, 25921 },
25827 componentWillReceiveProps: function componentWillReceiveProps(nextProps) { 25922 componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
25828 var value = nextProps.value; 25923 var value = nextProps.value,
25829 var open = nextProps.open; 25924 open = nextProps.open;
25830 25925
25831 if ('value' in nextProps) { 25926 if ('value' in nextProps) {
25832 this.setState({ 25927 this.setState({
@@ -25865,32 +25960,34 @@
25865 this.props.onChange(value); 25960 this.props.onChange(value);
25866 }, 25961 },
25867 getFormat: function getFormat() { 25962 getFormat: function getFormat() {
25868 var format = this.props.format; 25963 var _props2 = this.props,
25964 format = _props2.format,
25965 showHour = _props2.showHour,
25966 showMinute = _props2.showMinute,
25967 showSecond = _props2.showSecond;
25968
25869 if (format) { 25969 if (format) {
25870 return format; 25970 return format;
25871 } 25971 }
25872 if (!this.props.showSecond) { 25972 return [showHour ? 'HH' : '', showMinute ? 'mm' : '', showSecond ? 'ss' : ''].filter(function (item) {
25873 return 'HH:mm'; 25973 return !!item;
25874 } 25974 }).join(':');
25875 if (!this.props.showHour) {
25876 return 'mm:ss';
25877 }
25878 return 'HH:mm:ss';
25879 }, 25975 },
25880 getPanelElement: function getPanelElement() { 25976 getPanelElement: function getPanelElement() {
25881 var _props2 = this.props; 25977 var _props3 = this.props,
25882 var prefixCls = _props2.prefixCls; 25978 prefixCls = _props3.prefixCls,
25883 var placeholder = _props2.placeholder; 25979 placeholder = _props3.placeholder,
25884 var disabledHours = _props2.disabledHours; 25980 disabledHours = _props3.disabledHours,
25885 var disabledMinutes = _props2.disabledMinutes; 25981 disabledMinutes = _props3.disabledMinutes,
25886 var disabledSeconds = _props2.disabledSeconds; 25982 disabledSeconds = _props3.disabledSeconds,
25887 var hideDisabledOptions = _props2.hideDisabledOptions; 25983 hideDisabledOptions = _props3.hideDisabledOptions,
25888 var allowEmpty = _props2.allowEmpty; 25984 allowEmpty = _props3.allowEmpty,
25889 var showHour = _props2.showHour; 25985 showHour = _props3.showHour,
25890 var showSecond = _props2.showSecond; 25986 showMinute = _props3.showMinute,
25891 var defaultOpenValue = _props2.defaultOpenValue; 25987 showSecond = _props3.showSecond,
25892 var clearText = _props2.clearText; 25988 defaultOpenValue = _props3.defaultOpenValue,
25893 var addon = _props2.addon; 25989 clearText = _props3.clearText,
25990 addon = _props3.addon;
25894 25991
25895 return _react2.default.createElement(_Panel2.default, { 25992 return _react2.default.createElement(_Panel2.default, {
25896 clearText: clearText, 25993 clearText: clearText,
@@ -25901,8 +25998,9 @@
25901 onClear: this.onPanelClear, 25998 onClear: this.onPanelClear,
25902 defaultOpenValue: defaultOpenValue, 25999 defaultOpenValue: defaultOpenValue,
25903 showHour: showHour, 26000 showHour: showHour,
25904 onEsc: this.onEsc, 26001 showMinute: showMinute,
25905 showSecond: showSecond, 26002 showSecond: showSecond,
26003 onEsc: this.onEsc,
25906 allowEmpty: allowEmpty, 26004 allowEmpty: allowEmpty,
25907 format: this.getFormat(), 26005 format: this.getFormat(),
25908 placeholder: placeholder, 26006 placeholder: placeholder,
@@ -25914,9 +26012,9 @@
25914 }); 26012 });
25915 }, 26013 },
25916 setOpen: function setOpen(open, callback) { 26014 setOpen: function setOpen(open, callback) {
25917 var _props3 = this.props; 26015 var _props4 = this.props,
25918 var onOpen = _props3.onOpen; 26016 onOpen = _props4.onOpen,
25919 var onClose = _props3.onClose; 26017 onClose = _props4.onClose;
25920 26018
25921 if (this.state.open !== open) { 26019 if (this.state.open !== open) {
25922 this.setState({ 26020 this.setState({
@@ -25933,21 +26031,21 @@
25933 } 26031 }
25934 }, 26032 },
25935 render: function render() { 26033 render: function render() {
25936 var _props4 = this.props; 26034 var _props5 = this.props,
25937 var prefixCls = _props4.prefixCls; 26035 prefixCls = _props5.prefixCls,
25938 var placeholder = _props4.placeholder; 26036 placeholder = _props5.placeholder,
25939 var placement = _props4.placement; 26037 placement = _props5.placement,
25940 var align = _props4.align; 26038 align = _props5.align,
25941 var disabled = _props4.disabled; 26039 disabled = _props5.disabled,
25942 var transitionName = _props4.transitionName; 26040 transitionName = _props5.transitionName,
25943 var style = _props4.style; 26041 style = _props5.style,
25944 var className = _props4.className; 26042 className = _props5.className,
25945 var showHour = _props4.showHour; 26043 showHour = _props5.showHour,
25946 var showSecond = _props4.showSecond; 26044 showSecond = _props5.showSecond,
25947 var getPopupContainer = _props4.getPopupContainer; 26045 getPopupContainer = _props5.getPopupContainer;
25948 var _state = this.state; 26046 var _state = this.state,
25949 var open = _state.open; 26047 open = _state.open,
25950 var value = _state.value; 26048 value = _state.value;
25951 26049
25952 var popupClassName = void 0; 26050 var popupClassName = void 0;
25953 if (!showHour || !showSecond) { 26051 if (!showHour || !showSecond) {
@@ -25989,15 +26087,15 @@
25989 module.exports = exports['default']; 26087 module.exports = exports['default'];
25990 26088
25991/***/ }, 26089/***/ },
25992/* 181 */ 26090/* 178 */
25993/***/ function(module, exports, __webpack_require__) { 26091/***/ function(module, exports, __webpack_require__) {
25994 26092
25995 'use strict'; 26093 'use strict';
25996 26094
25997 module.exports = __webpack_require__(182); 26095 module.exports = __webpack_require__(179);
25998 26096
25999/***/ }, 26097/***/ },
26000/* 182 */ 26098/* 179 */
26001/***/ function(module, exports, __webpack_require__) { 26099/***/ function(module, exports, __webpack_require__) {
26002 26100
26003 'use strict'; 26101 'use strict';
@@ -26006,31 +26104,33 @@
26006 value: true 26104 value: true
26007 }); 26105 });
26008 26106
26009 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; 26107 var _extends2 = __webpack_require__(180);
26108
26109 var _extends3 = _interopRequireDefault(_extends2);
26010 26110
26011 var _react = __webpack_require__(3); 26111 var _react = __webpack_require__(3);
26012 26112
26013 var _react2 = _interopRequireDefault(_react); 26113 var _react2 = _interopRequireDefault(_react);
26014 26114
26015 var _reactDom = __webpack_require__(37); 26115 var _reactDom = __webpack_require__(36);
26016 26116
26017 var _reactDom2 = _interopRequireDefault(_reactDom); 26117 var _reactDom2 = _interopRequireDefault(_reactDom);
26018 26118
26019 var _contains = __webpack_require__(183); 26119 var _contains = __webpack_require__(218);
26020 26120
26021 var _contains2 = _interopRequireDefault(_contains); 26121 var _contains2 = _interopRequireDefault(_contains);
26022 26122
26023 var _addEventListener = __webpack_require__(184); 26123 var _addEventListener = __webpack_require__(219);
26024 26124
26025 var _addEventListener2 = _interopRequireDefault(_addEventListener); 26125 var _addEventListener2 = _interopRequireDefault(_addEventListener);
26026 26126
26027 var _Popup = __webpack_require__(188); 26127 var _Popup = __webpack_require__(223);
26028 26128
26029 var _Popup2 = _interopRequireDefault(_Popup); 26129 var _Popup2 = _interopRequireDefault(_Popup);
26030 26130
26031 var _utils = __webpack_require__(211); 26131 var _utils = __webpack_require__(248);
26032 26132
26033 var _getContainerRenderMixin = __webpack_require__(212); 26133 var _getContainerRenderMixin = __webpack_require__(249);
26034 26134
26035 var _getContainerRenderMixin2 = _interopRequireDefault(_getContainerRenderMixin); 26135 var _getContainerRenderMixin2 = _interopRequireDefault(_getContainerRenderMixin);
26036 26136
@@ -26071,6 +26171,7 @@
26071 getPopupContainer: _react.PropTypes.func, 26171 getPopupContainer: _react.PropTypes.func,
26072 destroyPopupOnHide: _react.PropTypes.bool, 26172 destroyPopupOnHide: _react.PropTypes.bool,
26073 mask: _react.PropTypes.bool, 26173 mask: _react.PropTypes.bool,
26174 maskClosable: _react.PropTypes.bool,
26074 onPopupAlign: _react.PropTypes.func, 26175 onPopupAlign: _react.PropTypes.func,
26075 popupAlign: _react.PropTypes.object, 26176 popupAlign: _react.PropTypes.object,
26076 popupVisible: _react.PropTypes.bool, 26177 popupVisible: _react.PropTypes.bool,
@@ -26103,7 +26204,7 @@
26103 } 26204 }
26104 return _react2["default"].createElement( 26205 return _react2["default"].createElement(
26105 _Popup2["default"], 26206 _Popup2["default"],
26106 _extends({ 26207 (0, _extends3["default"])({
26107 prefixCls: props.prefixCls, 26208 prefixCls: props.prefixCls,
26108 destroyPopupOnHide: props.destroyPopupOnHide, 26209 destroyPopupOnHide: props.destroyPopupOnHide,
26109 visible: state.popupVisible, 26210 visible: state.popupVisible,
@@ -26144,6 +26245,7 @@
26144 popupAlign: {}, 26245 popupAlign: {},
26145 defaultPopupVisible: false, 26246 defaultPopupVisible: false,
26146 mask: false, 26247 mask: false,
26248 maskClosable: true,
26147 action: [], 26249 action: [],
26148 showAction: [], 26250 showAction: [],
26149 hideAction: [] 26251 hideAction: []
@@ -26286,11 +26388,14 @@
26286 } 26388 }
26287 }, 26389 },
26288 onDocumentClick: function onDocumentClick(event) { 26390 onDocumentClick: function onDocumentClick(event) {
26391 if (this.props.mask && !this.props.maskClosable) {
26392 return;
26393 }
26289 var target = event.target; 26394 var target = event.target;
26290 var root = (0, _reactDom.findDOMNode)(this); 26395 var root = (0, _reactDom.findDOMNode)(this);
26291 var popupNode = this.getPopupDomNode(); 26396 var popupNode = this.getPopupDomNode();
26292 if (!(0, _contains2["default"])(root, target) && !(0, _contains2["default"])(popupNode, target)) { 26397 if (!(0, _contains2["default"])(root, target) && !(0, _contains2["default"])(popupNode, target)) {
26293 this.setPopupVisible(false); 26398 this.close();
26294 } 26399 }
26295 }, 26400 },
26296 getPopupDomNode: function getPopupDomNode() { 26401 getPopupDomNode: function getPopupDomNode() {
@@ -26425,6 +26530,9 @@
26425 callback(e); 26530 callback(e);
26426 } 26531 }
26427 }, 26532 },
26533 close: function close() {
26534 this.setPopupVisible(false);
26535 },
26428 render: function render() { 26536 render: function render() {
26429 var props = this.props; 26537 var props = this.props;
26430 var children = props.children; 26538 var children = props.children;
@@ -26466,7 +26574,540 @@
26466 module.exports = exports['default']; 26574 module.exports = exports['default'];
26467 26575
26468/***/ }, 26576/***/ },
26577/* 180 */
26578/***/ function(module, exports, __webpack_require__) {
26579
26580 "use strict";
26581
26582 exports.__esModule = true;
26583
26584 var _assign = __webpack_require__(181);
26585
26586 var _assign2 = _interopRequireDefault(_assign);
26587
26588 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26589
26590 exports.default = _assign2.default || function (target) {
26591 for (var i = 1; i < arguments.length; i++) {
26592 var source = arguments[i];
26593
26594 for (var key in source) {
26595 if (Object.prototype.hasOwnProperty.call(source, key)) {
26596 target[key] = source[key];
26597 }
26598 }
26599 }
26600
26601 return target;
26602 };
26603
26604/***/ },
26605/* 181 */
26606/***/ function(module, exports, __webpack_require__) {
26607
26608 module.exports = { "default": __webpack_require__(182), __esModule: true };
26609
26610/***/ },
26611/* 182 */
26612/***/ function(module, exports, __webpack_require__) {
26613
26614 __webpack_require__(183);
26615 module.exports = __webpack_require__(186).Object.assign;
26616
26617/***/ },
26469/* 183 */ 26618/* 183 */
26619/***/ function(module, exports, __webpack_require__) {
26620
26621 // 19.1.3.1 Object.assign(target, source)
26622 var $export = __webpack_require__(184);
26623
26624 $export($export.S + $export.F, 'Object', {assign: __webpack_require__(199)});
26625
26626/***/ },
26627/* 184 */
26628/***/ function(module, exports, __webpack_require__) {
26629
26630 var global = __webpack_require__(185)
26631 , core = __webpack_require__(186)
26632 , ctx = __webpack_require__(187)
26633 , hide = __webpack_require__(189)
26634 , PROTOTYPE = 'prototype';
26635
26636 var $export = function(type, name, source){
26637 var IS_FORCED = type & $export.F
26638 , IS_GLOBAL = type & $export.G
26639 , IS_STATIC = type & $export.S
26640 , IS_PROTO = type & $export.P
26641 , IS_BIND = type & $export.B
26642 , IS_WRAP = type & $export.W
26643 , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
26644 , expProto = exports[PROTOTYPE]
26645 , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
26646 , key, own, out;
26647 if(IS_GLOBAL)source = name;
26648 for(key in source){
26649 // contains in native
26650 own = !IS_FORCED && target && target[key] !== undefined;
26651 if(own && key in exports)continue;
26652 // export native or passed
26653 out = own ? target[key] : source[key];
26654 // prevent global pollution for namespaces
26655 exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
26656 // bind timers to global for call from export context
26657 : IS_BIND && own ? ctx(out, global)
26658 // wrap global constructors for prevent change them in library
26659 : IS_WRAP && target[key] == out ? (function(C){
26660 var F = function(a, b, c){
26661 if(this instanceof C){
26662 switch(arguments.length){
26663 case 0: return new C;
26664 case 1: return new C(a);
26665 case 2: return new C(a, b);
26666 } return new C(a, b, c);
26667 } return C.apply(this, arguments);
26668 };
26669 F[PROTOTYPE] = C[PROTOTYPE];
26670 return F;
26671 // make static versions for prototype methods
26672 })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
26673 // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
26674 if(IS_PROTO){
26675 (exports.virtual || (exports.virtual = {}))[key] = out;
26676 // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
26677 if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);
26678 }
26679 }
26680 };
26681 // type bitmap
26682 $export.F = 1; // forced
26683 $export.G = 2; // global
26684 $export.S = 4; // static
26685 $export.P = 8; // proto
26686 $export.B = 16; // bind
26687 $export.W = 32; // wrap
26688 $export.U = 64; // safe
26689 $export.R = 128; // real proto method for `library`
26690 module.exports = $export;
26691
26692/***/ },
26693/* 185 */
26694/***/ function(module, exports) {
26695
26696 // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
26697 var global = module.exports = typeof window != 'undefined' && window.Math == Math
26698 ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
26699 if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
26700
26701/***/ },
26702/* 186 */
26703/***/ function(module, exports) {
26704
26705 var core = module.exports = {version: '2.4.0'};
26706 if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
26707
26708/***/ },
26709/* 187 */
26710/***/ function(module, exports, __webpack_require__) {
26711
26712 // optional / simple context binding
26713 var aFunction = __webpack_require__(188);
26714 module.exports = function(fn, that, length){
26715 aFunction(fn);
26716 if(that === undefined)return fn;
26717 switch(length){
26718 case 1: return function(a){
26719 return fn.call(that, a);
26720 };
26721 case 2: return function(a, b){
26722 return fn.call(that, a, b);
26723 };
26724 case 3: return function(a, b, c){
26725 return fn.call(that, a, b, c);
26726 };
26727 }
26728 return function(/* ...args */){
26729 return fn.apply(that, arguments);
26730 };
26731 };
26732
26733/***/ },
26734/* 188 */
26735/***/ function(module, exports) {
26736
26737 module.exports = function(it){
26738 if(typeof it != 'function')throw TypeError(it + ' is not a function!');
26739 return it;
26740 };
26741
26742/***/ },
26743/* 189 */
26744/***/ function(module, exports, __webpack_require__) {
26745
26746 var dP = __webpack_require__(190)
26747 , createDesc = __webpack_require__(198);
26748 module.exports = __webpack_require__(194) ? function(object, key, value){
26749 return dP.f(object, key, createDesc(1, value));
26750 } : function(object, key, value){
26751 object[key] = value;
26752 return object;
26753 };
26754
26755/***/ },
26756/* 190 */
26757/***/ function(module, exports, __webpack_require__) {
26758
26759 var anObject = __webpack_require__(191)
26760 , IE8_DOM_DEFINE = __webpack_require__(193)
26761 , toPrimitive = __webpack_require__(197)
26762 , dP = Object.defineProperty;
26763
26764 exports.f = __webpack_require__(194) ? Object.defineProperty : function defineProperty(O, P, Attributes){
26765 anObject(O);
26766 P = toPrimitive(P, true);
26767 anObject(Attributes);
26768 if(IE8_DOM_DEFINE)try {
26769 return dP(O, P, Attributes);
26770 } catch(e){ /* empty */ }
26771 if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
26772 if('value' in Attributes)O[P] = Attributes.value;
26773 return O;
26774 };
26775
26776/***/ },
26777/* 191 */
26778/***/ function(module, exports, __webpack_require__) {
26779
26780 var isObject = __webpack_require__(192);
26781 module.exports = function(it){
26782 if(!isObject(it))throw TypeError(it + ' is not an object!');
26783 return it;
26784 };
26785
26786/***/ },
26787/* 192 */
26788/***/ function(module, exports) {
26789
26790 module.exports = function(it){
26791 return typeof it === 'object' ? it !== null : typeof it === 'function';
26792 };
26793
26794/***/ },
26795/* 193 */
26796/***/ function(module, exports, __webpack_require__) {
26797
26798 module.exports = !__webpack_require__(194) && !__webpack_require__(195)(function(){
26799 return Object.defineProperty(__webpack_require__(196)('div'), 'a', {get: function(){ return 7; }}).a != 7;
26800 });
26801
26802/***/ },
26803/* 194 */
26804/***/ function(module, exports, __webpack_require__) {
26805
26806 // Thank's IE8 for his funny defineProperty
26807 module.exports = !__webpack_require__(195)(function(){
26808 return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
26809 });
26810
26811/***/ },
26812/* 195 */
26813/***/ function(module, exports) {
26814
26815 module.exports = function(exec){
26816 try {
26817 return !!exec();
26818 } catch(e){
26819 return true;
26820 }
26821 };
26822
26823/***/ },
26824/* 196 */
26825/***/ function(module, exports, __webpack_require__) {
26826
26827 var isObject = __webpack_require__(192)
26828 , document = __webpack_require__(185).document
26829 // in old IE typeof document.createElement is 'object'
26830 , is = isObject(document) && isObject(document.createElement);
26831 module.exports = function(it){
26832 return is ? document.createElement(it) : {};
26833 };
26834
26835/***/ },
26836/* 197 */
26837/***/ function(module, exports, __webpack_require__) {
26838
26839 // 7.1.1 ToPrimitive(input [, PreferredType])
26840 var isObject = __webpack_require__(192);
26841 // instead of the ES6 spec version, we didn't implement @@toPrimitive case
26842 // and the second argument - flag - preferred type is a string
26843 module.exports = function(it, S){
26844 if(!isObject(it))return it;
26845 var fn, val;
26846 if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
26847 if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
26848 if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
26849 throw TypeError("Can't convert object to primitive value");
26850 };
26851
26852/***/ },
26853/* 198 */
26854/***/ function(module, exports) {
26855
26856 module.exports = function(bitmap, value){
26857 return {
26858 enumerable : !(bitmap & 1),
26859 configurable: !(bitmap & 2),
26860 writable : !(bitmap & 4),
26861 value : value
26862 };
26863 };
26864
26865/***/ },
26866/* 199 */
26867/***/ function(module, exports, __webpack_require__) {
26868
26869 'use strict';
26870 // 19.1.2.1 Object.assign(target, source, ...)
26871 var getKeys = __webpack_require__(200)
26872 , gOPS = __webpack_require__(215)
26873 , pIE = __webpack_require__(216)
26874 , toObject = __webpack_require__(217)
26875 , IObject = __webpack_require__(204)
26876 , $assign = Object.assign;
26877
26878 // should work with symbols and should have deterministic property order (V8 bug)
26879 module.exports = !$assign || __webpack_require__(195)(function(){
26880 var A = {}
26881 , B = {}
26882 , S = Symbol()
26883 , K = 'abcdefghijklmnopqrst';
26884 A[S] = 7;
26885 K.split('').forEach(function(k){ B[k] = k; });
26886 return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
26887 }) ? function assign(target, source){ // eslint-disable-line no-unused-vars
26888 var T = toObject(target)
26889 , aLen = arguments.length
26890 , index = 1
26891 , getSymbols = gOPS.f
26892 , isEnum = pIE.f;
26893 while(aLen > index){
26894 var S = IObject(arguments[index++])
26895 , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)
26896 , length = keys.length
26897 , j = 0
26898 , key;
26899 while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];
26900 } return T;
26901 } : $assign;
26902
26903/***/ },
26904/* 200 */
26905/***/ function(module, exports, __webpack_require__) {
26906
26907 // 19.1.2.14 / 15.2.3.14 Object.keys(O)
26908 var $keys = __webpack_require__(201)
26909 , enumBugKeys = __webpack_require__(214);
26910
26911 module.exports = Object.keys || function keys(O){
26912 return $keys(O, enumBugKeys);
26913 };
26914
26915/***/ },
26916/* 201 */
26917/***/ function(module, exports, __webpack_require__) {
26918
26919 var has = __webpack_require__(202)
26920 , toIObject = __webpack_require__(203)
26921 , arrayIndexOf = __webpack_require__(207)(false)
26922 , IE_PROTO = __webpack_require__(211)('IE_PROTO');
26923
26924 module.exports = function(object, names){
26925 var O = toIObject(object)
26926 , i = 0
26927 , result = []
26928 , key;
26929 for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
26930 // Don't enum bug & hidden keys
26931 while(names.length > i)if(has(O, key = names[i++])){
26932 ~arrayIndexOf(result, key) || result.push(key);
26933 }
26934 return result;
26935 };
26936
26937/***/ },
26938/* 202 */
26939/***/ function(module, exports) {
26940
26941 var hasOwnProperty = {}.hasOwnProperty;
26942 module.exports = function(it, key){
26943 return hasOwnProperty.call(it, key);
26944 };
26945
26946/***/ },
26947/* 203 */
26948/***/ function(module, exports, __webpack_require__) {
26949
26950 // to indexed object, toObject with fallback for non-array-like ES3 strings
26951 var IObject = __webpack_require__(204)
26952 , defined = __webpack_require__(206);
26953 module.exports = function(it){
26954 return IObject(defined(it));
26955 };
26956
26957/***/ },
26958/* 204 */
26959/***/ function(module, exports, __webpack_require__) {
26960
26961 // fallback for non-array-like ES3 and non-enumerable old V8 strings
26962 var cof = __webpack_require__(205);
26963 module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
26964 return cof(it) == 'String' ? it.split('') : Object(it);
26965 };
26966
26967/***/ },
26968/* 205 */
26969/***/ function(module, exports) {
26970
26971 var toString = {}.toString;
26972
26973 module.exports = function(it){
26974 return toString.call(it).slice(8, -1);
26975 };
26976
26977/***/ },
26978/* 206 */
26979/***/ function(module, exports) {
26980
26981 // 7.2.1 RequireObjectCoercible(argument)
26982 module.exports = function(it){
26983 if(it == undefined)throw TypeError("Can't call method on " + it);
26984 return it;
26985 };
26986
26987/***/ },
26988/* 207 */
26989/***/ function(module, exports, __webpack_require__) {
26990
26991 // false -> Array#indexOf
26992 // true -> Array#includes
26993 var toIObject = __webpack_require__(203)
26994 , toLength = __webpack_require__(208)
26995 , toIndex = __webpack_require__(210);
26996 module.exports = function(IS_INCLUDES){
26997 return function($this, el, fromIndex){
26998 var O = toIObject($this)
26999 , length = toLength(O.length)
27000 , index = toIndex(fromIndex, length)
27001 , value;
27002 // Array#includes uses SameValueZero equality algorithm
27003 if(IS_INCLUDES && el != el)while(length > index){
27004 value = O[index++];
27005 if(value != value)return true;
27006 // Array#toIndex ignores holes, Array#includes - not
27007 } else for(;length > index; index++)if(IS_INCLUDES || index in O){
27008 if(O[index] === el)return IS_INCLUDES || index || 0;
27009 } return !IS_INCLUDES && -1;
27010 };
27011 };
27012
27013/***/ },
27014/* 208 */
27015/***/ function(module, exports, __webpack_require__) {
27016
27017 // 7.1.15 ToLength
27018 var toInteger = __webpack_require__(209)
27019 , min = Math.min;
27020 module.exports = function(it){
27021 return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
27022 };
27023
27024/***/ },
27025/* 209 */
27026/***/ function(module, exports) {
27027
27028 // 7.1.4 ToInteger
27029 var ceil = Math.ceil
27030 , floor = Math.floor;
27031 module.exports = function(it){
27032 return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
27033 };
27034
27035/***/ },
27036/* 210 */
27037/***/ function(module, exports, __webpack_require__) {
27038
27039 var toInteger = __webpack_require__(209)
27040 , max = Math.max
27041 , min = Math.min;
27042 module.exports = function(index, length){
27043 index = toInteger(index);
27044 return index < 0 ? max(index + length, 0) : min(index, length);
27045 };
27046
27047/***/ },
27048/* 211 */
27049/***/ function(module, exports, __webpack_require__) {
27050
27051 var shared = __webpack_require__(212)('keys')
27052 , uid = __webpack_require__(213);
27053 module.exports = function(key){
27054 return shared[key] || (shared[key] = uid(key));
27055 };
27056
27057/***/ },
27058/* 212 */
27059/***/ function(module, exports, __webpack_require__) {
27060
27061 var global = __webpack_require__(185)
27062 , SHARED = '__core-js_shared__'
27063 , store = global[SHARED] || (global[SHARED] = {});
27064 module.exports = function(key){
27065 return store[key] || (store[key] = {});
27066 };
27067
27068/***/ },
27069/* 213 */
27070/***/ function(module, exports) {
27071
27072 var id = 0
27073 , px = Math.random();
27074 module.exports = function(key){
27075 return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
27076 };
27077
27078/***/ },
27079/* 214 */
27080/***/ function(module, exports) {
27081
27082 // IE 8- don't enum bug keys
27083 module.exports = (
27084 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
27085 ).split(',');
27086
27087/***/ },
27088/* 215 */
27089/***/ function(module, exports) {
27090
27091 exports.f = Object.getOwnPropertySymbols;
27092
27093/***/ },
27094/* 216 */
27095/***/ function(module, exports) {
27096
27097 exports.f = {}.propertyIsEnumerable;
27098
27099/***/ },
27100/* 217 */
27101/***/ function(module, exports, __webpack_require__) {
27102
27103 // 7.1.13 ToObject(argument)
27104 var defined = __webpack_require__(206);
27105 module.exports = function(it){
27106 return Object(defined(it));
27107 };
27108
27109/***/ },
27110/* 218 */
26470/***/ function(module, exports) { 27111/***/ function(module, exports) {
26471 27112
26472 "use strict"; 27113 "use strict";
@@ -26484,7 +27125,7 @@
26484 }; 27125 };
26485 27126
26486/***/ }, 27127/***/ },
26487/* 184 */ 27128/* 219 */
26488/***/ function(module, exports, __webpack_require__) { 27129/***/ function(module, exports, __webpack_require__) {
26489 27130
26490 'use strict'; 27131 'use strict';
@@ -26494,11 +27135,11 @@
26494 }); 27135 });
26495 exports["default"] = addEventListenerWrap; 27136 exports["default"] = addEventListenerWrap;
26496 27137
26497 var _addDomEventListener = __webpack_require__(185); 27138 var _addDomEventListener = __webpack_require__(220);
26498 27139
26499 var _addDomEventListener2 = _interopRequireDefault(_addDomEventListener); 27140 var _addDomEventListener2 = _interopRequireDefault(_addDomEventListener);
26500 27141
26501 var _reactDom = __webpack_require__(37); 27142 var _reactDom = __webpack_require__(36);
26502 27143
26503 var _reactDom2 = _interopRequireDefault(_reactDom); 27144 var _reactDom2 = _interopRequireDefault(_reactDom);
26504 27145
@@ -26514,7 +27155,7 @@
26514 module.exports = exports['default']; 27155 module.exports = exports['default'];
26515 27156
26516/***/ }, 27157/***/ },
26517/* 185 */ 27158/* 220 */
26518/***/ function(module, exports, __webpack_require__) { 27159/***/ function(module, exports, __webpack_require__) {
26519 27160
26520 'use strict'; 27161 'use strict';
@@ -26526,7 +27167,7 @@
26526 27167
26527 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 27168 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
26528 27169
26529 var _EventObject = __webpack_require__(186); 27170 var _EventObject = __webpack_require__(221);
26530 27171
26531 var _EventObject2 = _interopRequireDefault(_EventObject); 27172 var _EventObject2 = _interopRequireDefault(_EventObject);
26532 27173
@@ -26556,7 +27197,7 @@
26556 module.exports = exports['default']; 27197 module.exports = exports['default'];
26557 27198
26558/***/ }, 27199/***/ },
26559/* 186 */ 27200/* 221 */
26560/***/ function(module, exports, __webpack_require__) { 27201/***/ function(module, exports, __webpack_require__) {
26561 27202
26562 /** 27203 /**
@@ -26573,7 +27214,7 @@
26573 27214
26574 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 27215 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
26575 27216
26576 var _EventBaseObject = __webpack_require__(187); 27217 var _EventBaseObject = __webpack_require__(222);
26577 27218
26578 var _EventBaseObject2 = _interopRequireDefault(_EventBaseObject); 27219 var _EventBaseObject2 = _interopRequireDefault(_EventBaseObject);
26579 27220
@@ -26839,7 +27480,7 @@
26839 module.exports = exports['default']; 27480 module.exports = exports['default'];
26840 27481
26841/***/ }, 27482/***/ },
26842/* 187 */ 27483/* 222 */
26843/***/ function(module, exports) { 27484/***/ function(module, exports) {
26844 27485
26845 /** 27486 /**
@@ -26907,7 +27548,7 @@
26907 module.exports = exports["default"]; 27548 module.exports = exports["default"];
26908 27549
26909/***/ }, 27550/***/ },
26910/* 188 */ 27551/* 223 */
26911/***/ function(module, exports, __webpack_require__) { 27552/***/ function(module, exports, __webpack_require__) {
26912 27553
26913 'use strict'; 27554 'use strict';
@@ -26916,29 +27557,31 @@
26916 value: true 27557 value: true
26917 }); 27558 });
26918 27559
26919 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; 27560 var _extends2 = __webpack_require__(180);
27561
27562 var _extends3 = _interopRequireDefault(_extends2);
26920 27563
26921 var _react = __webpack_require__(3); 27564 var _react = __webpack_require__(3);
26922 27565
26923 var _react2 = _interopRequireDefault(_react); 27566 var _react2 = _interopRequireDefault(_react);
26924 27567
26925 var _reactDom = __webpack_require__(37); 27568 var _reactDom = __webpack_require__(36);
26926 27569
26927 var _reactDom2 = _interopRequireDefault(_reactDom); 27570 var _reactDom2 = _interopRequireDefault(_reactDom);
26928 27571
26929 var _rcAlign = __webpack_require__(189); 27572 var _rcAlign = __webpack_require__(224);
26930 27573
26931 var _rcAlign2 = _interopRequireDefault(_rcAlign); 27574 var _rcAlign2 = _interopRequireDefault(_rcAlign);
26932 27575
26933 var _rcAnimate = __webpack_require__(200); 27576 var _rcAnimate = __webpack_require__(236);
26934 27577
26935 var _rcAnimate2 = _interopRequireDefault(_rcAnimate); 27578 var _rcAnimate2 = _interopRequireDefault(_rcAnimate);
26936 27579
26937 var _PopupInner = __webpack_require__(209); 27580 var _PopupInner = __webpack_require__(245);
26938 27581
26939 var _PopupInner2 = _interopRequireDefault(_PopupInner); 27582 var _PopupInner2 = _interopRequireDefault(_PopupInner);
26940 27583
26941 var _LazyRenderBox = __webpack_require__(210); 27584 var _LazyRenderBox = __webpack_require__(246);
26942 27585
26943 var _LazyRenderBox2 = _interopRequireDefault(_LazyRenderBox); 27586 var _LazyRenderBox2 = _interopRequireDefault(_LazyRenderBox);
26944 27587
@@ -27013,7 +27656,7 @@
27013 if (!visible) { 27656 if (!visible) {
27014 this.currentAlignClassName = null; 27657 this.currentAlignClassName = null;
27015 } 27658 }
27016 var newStyle = _extends({}, style, this.getZIndexStyle()); 27659 var newStyle = (0, _extends3["default"])({}, style, this.getZIndexStyle());
27017 var popupInnerProps = { 27660 var popupInnerProps = {
27018 className: className, 27661 className: className,
27019 prefixCls: prefixCls, 27662 prefixCls: prefixCls,
@@ -27043,7 +27686,7 @@
27043 }, 27686 },
27044 _react2["default"].createElement( 27687 _react2["default"].createElement(
27045 _PopupInner2["default"], 27688 _PopupInner2["default"],
27046 _extends({ 27689 (0, _extends3["default"])({
27047 visible: true 27690 visible: true
27048 }, popupInnerProps), 27691 }, popupInnerProps),
27049 props.children 27692 props.children
@@ -27075,7 +27718,7 @@
27075 }, 27718 },
27076 _react2["default"].createElement( 27719 _react2["default"].createElement(
27077 _PopupInner2["default"], 27720 _PopupInner2["default"],
27078 _extends({ 27721 (0, _extends3["default"])({
27079 hiddenClassName: hiddenClassName 27722 hiddenClassName: hiddenClassName
27080 }, popupInnerProps), 27723 }, popupInnerProps),
27081 props.children 27724 props.children
@@ -27136,7 +27779,7 @@
27136 module.exports = exports['default']; 27779 module.exports = exports['default'];
27137 27780
27138/***/ }, 27781/***/ },
27139/* 189 */ 27782/* 224 */
27140/***/ function(module, exports, __webpack_require__) { 27783/***/ function(module, exports, __webpack_require__) {
27141 27784
27142 'use strict'; 27785 'use strict';
@@ -27145,7 +27788,7 @@
27145 value: true 27788 value: true
27146 }); 27789 });
27147 27790
27148 var _Align = __webpack_require__(190); 27791 var _Align = __webpack_require__(225);
27149 27792
27150 var _Align2 = _interopRequireDefault(_Align); 27793 var _Align2 = _interopRequireDefault(_Align);
27151 27794
@@ -27156,7 +27799,7 @@
27156 module.exports = exports['default']; 27799 module.exports = exports['default'];
27157 27800
27158/***/ }, 27801/***/ },
27159/* 190 */ 27802/* 225 */
27160/***/ function(module, exports, __webpack_require__) { 27803/***/ function(module, exports, __webpack_require__) {
27161 27804
27162 'use strict'; 27805 'use strict';
@@ -27169,19 +27812,19 @@
27169 27812
27170 var _react2 = _interopRequireDefault(_react); 27813 var _react2 = _interopRequireDefault(_react);
27171 27814
27172 var _reactDom = __webpack_require__(37); 27815 var _reactDom = __webpack_require__(36);
27173 27816
27174 var _reactDom2 = _interopRequireDefault(_reactDom); 27817 var _reactDom2 = _interopRequireDefault(_reactDom);
27175 27818
27176 var _domAlign = __webpack_require__(191); 27819 var _domAlign = __webpack_require__(226);
27177 27820
27178 var _domAlign2 = _interopRequireDefault(_domAlign); 27821 var _domAlign2 = _interopRequireDefault(_domAlign);
27179 27822
27180 var _addEventListener = __webpack_require__(184); 27823 var _addEventListener = __webpack_require__(219);
27181 27824
27182 var _addEventListener2 = _interopRequireDefault(_addEventListener); 27825 var _addEventListener2 = _interopRequireDefault(_addEventListener);
27183 27826
27184 var _isWindow = __webpack_require__(199); 27827 var _isWindow = __webpack_require__(235);
27185 27828
27186 var _isWindow2 = _interopRequireDefault(_isWindow); 27829 var _isWindow2 = _interopRequireDefault(_isWindow);
27187 27830
@@ -27315,48 +27958,48 @@
27315 module.exports = exports['default']; 27958 module.exports = exports['default'];
27316 27959
27317/***/ }, 27960/***/ },
27318/* 191 */ 27961/* 226 */
27319/***/ function(module, exports, __webpack_require__) { 27962/***/ function(module, exports, __webpack_require__) {
27320 27963
27321 /**
27322 * align dom node flexibly
27323 * @author yiminghe@gmail.com
27324 */
27325
27326 'use strict'; 27964 'use strict';
27327 27965
27328 Object.defineProperty(exports, '__esModule', { 27966 Object.defineProperty(exports, "__esModule", {
27329 value: true 27967 value: true
27330 }); 27968 });
27331 27969
27332 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 27970 var _utils = __webpack_require__(227);
27333
27334 var _utils = __webpack_require__(192);
27335 27971
27336 var _utils2 = _interopRequireDefault(_utils); 27972 var _utils2 = _interopRequireDefault(_utils);
27337 27973
27338 var _getOffsetParent = __webpack_require__(193); 27974 var _getOffsetParent = __webpack_require__(229);
27339 27975
27340 var _getOffsetParent2 = _interopRequireDefault(_getOffsetParent); 27976 var _getOffsetParent2 = _interopRequireDefault(_getOffsetParent);
27341 27977
27342 var _getVisibleRectForElement = __webpack_require__(194); 27978 var _getVisibleRectForElement = __webpack_require__(230);
27343 27979
27344 var _getVisibleRectForElement2 = _interopRequireDefault(_getVisibleRectForElement); 27980 var _getVisibleRectForElement2 = _interopRequireDefault(_getVisibleRectForElement);
27345 27981
27346 var _adjustForViewport = __webpack_require__(195); 27982 var _adjustForViewport = __webpack_require__(231);
27347 27983
27348 var _adjustForViewport2 = _interopRequireDefault(_adjustForViewport); 27984 var _adjustForViewport2 = _interopRequireDefault(_adjustForViewport);
27349 27985
27350 var _getRegion = __webpack_require__(196); 27986 var _getRegion = __webpack_require__(232);
27351 27987
27352 var _getRegion2 = _interopRequireDefault(_getRegion); 27988 var _getRegion2 = _interopRequireDefault(_getRegion);
27353 27989
27354 var _getElFuturePos = __webpack_require__(197); 27990 var _getElFuturePos = __webpack_require__(233);
27355 27991
27356 var _getElFuturePos2 = _interopRequireDefault(_getElFuturePos); 27992 var _getElFuturePos2 = _interopRequireDefault(_getElFuturePos);
27357 27993
27994 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27995
27358 // http://yiminghe.iteye.com/blog/1124720 27996 // http://yiminghe.iteye.com/blog/1124720
27359 27997
27998 /**
27999 * align dom node flexibly
28000 * @author yiminghe@gmail.com
28001 */
28002
27360 function isFailX(elFuturePos, elRegion, visibleRect) { 28003 function isFailX(elFuturePos, elRegion, visibleRect) {
27361 return elFuturePos.left < visibleRect.left || elFuturePos.left + elRegion.width > visibleRect.right; 28004 return elFuturePos.left < visibleRect.left || elFuturePos.left + elRegion.width > visibleRect.right;
27362 } 28005 }
@@ -27375,7 +28018,7 @@
27375 28018
27376 function flip(points, reg, map) { 28019 function flip(points, reg, map) {
27377 var ret = []; 28020 var ret = [];
27378 _utils2['default'].each(points, function (p) { 28021 _utils2["default"].each(points, function (p) {
27379 ret.push(p.replace(reg, function (m) { 28022 ret.push(p.replace(reg, function (m) {
27380 return map[m]; 28023 return map[m];
27381 })); 28024 }));
@@ -27389,7 +28032,7 @@
27389 } 28032 }
27390 28033
27391 function convertOffset(str, offsetLen) { 28034 function convertOffset(str, offsetLen) {
27392 var n = undefined; 28035 var n = void 0;
27393 if (/%$/.test(str)) { 28036 if (/%$/.test(str)) {
27394 n = parseInt(str.substring(0, str.length - 1), 10) / 100 * offsetLen; 28037 n = parseInt(str.substring(0, str.length - 1), 10) / 100 * offsetLen;
27395 } else { 28038 } else {
@@ -27417,18 +28060,18 @@
27417 28060
27418 var fail = 0; 28061 var fail = 0;
27419 // 当前节点可以被放置的显示区域 28062 // 当前节点可以被放置的显示区域
27420 var visibleRect = (0, _getVisibleRectForElement2['default'])(source); 28063 var visibleRect = (0, _getVisibleRectForElement2["default"])(source);
27421 // 当前节点所占的区域, left/top/width/height 28064 // 当前节点所占的区域, left/top/width/height
27422 var elRegion = (0, _getRegion2['default'])(source); 28065 var elRegion = (0, _getRegion2["default"])(source);
27423 // 参照节点所占的区域, left/top/width/height 28066 // 参照节点所占的区域, left/top/width/height
27424 var refNodeRegion = (0, _getRegion2['default'])(target); 28067 var refNodeRegion = (0, _getRegion2["default"])(target);
27425 // 将 offset 转换成数值,支持百分比 28068 // 将 offset 转换成数值,支持百分比
27426 normalizeOffset(offset, elRegion); 28069 normalizeOffset(offset, elRegion);
27427 normalizeOffset(targetOffset, refNodeRegion); 28070 normalizeOffset(targetOffset, refNodeRegion);
27428 // 当前节点将要被放置的位置 28071 // 当前节点将要被放置的位置
27429 var elFuturePos = (0, _getElFuturePos2['default'])(elRegion, refNodeRegion, points, offset, targetOffset); 28072 var elFuturePos = (0, _getElFuturePos2["default"])(elRegion, refNodeRegion, points, offset, targetOffset);
27430 // 当前节点将要所处的区域 28073 // 当前节点将要所处的区域
27431 var newElRegion = _utils2['default'].merge(elRegion, elFuturePos); 28074 var newElRegion = _utils2["default"].merge(elRegion, elFuturePos);
27432 28075
27433 // 如果可视区域不能完全放置当前节点时允许调整 28076 // 如果可视区域不能完全放置当前节点时允许调整
27434 if (visibleRect && (overflow.adjustX || overflow.adjustY)) { 28077 if (visibleRect && (overflow.adjustX || overflow.adjustY)) {
@@ -27443,7 +28086,7 @@
27443 // 偏移量也反下 28086 // 偏移量也反下
27444 var newOffset = flipOffset(offset, 0); 28087 var newOffset = flipOffset(offset, 0);
27445 var newTargetOffset = flipOffset(targetOffset, 0); 28088 var newTargetOffset = flipOffset(targetOffset, 0);
27446 var newElFuturePos = (0, _getElFuturePos2['default'])(elRegion, refNodeRegion, newPoints, newOffset, newTargetOffset); 28089 var newElFuturePos = (0, _getElFuturePos2["default"])(elRegion, refNodeRegion, newPoints, newOffset, newTargetOffset);
27447 if (!isCompleteFailX(newElFuturePos, elRegion, visibleRect)) { 28090 if (!isCompleteFailX(newElFuturePos, elRegion, visibleRect)) {
27448 fail = 1; 28091 fail = 1;
27449 points = newPoints; 28092 points = newPoints;
@@ -27457,27 +28100,27 @@
27457 // 如果纵向不能放下 28100 // 如果纵向不能放下
27458 if (isFailY(elFuturePos, elRegion, visibleRect)) { 28101 if (isFailY(elFuturePos, elRegion, visibleRect)) {
27459 // 对齐位置反下 28102 // 对齐位置反下
27460 var newPoints = flip(points, /[tb]/ig, { 28103 var _newPoints = flip(points, /[tb]/ig, {
27461 t: 'b', 28104 t: 'b',
27462 b: 't' 28105 b: 't'
27463 }); 28106 });
27464 // 偏移量也反下 28107 // 偏移量也反下
27465 var newOffset = flipOffset(offset, 1); 28108 var _newOffset = flipOffset(offset, 1);
27466 var newTargetOffset = flipOffset(targetOffset, 1); 28109 var _newTargetOffset = flipOffset(targetOffset, 1);
27467 var newElFuturePos = (0, _getElFuturePos2['default'])(elRegion, refNodeRegion, newPoints, newOffset, newTargetOffset); 28110 var _newElFuturePos = (0, _getElFuturePos2["default"])(elRegion, refNodeRegion, _newPoints, _newOffset, _newTargetOffset);
27468 if (!isCompleteFailY(newElFuturePos, elRegion, visibleRect)) { 28111 if (!isCompleteFailY(_newElFuturePos, elRegion, visibleRect)) {
27469 fail = 1; 28112 fail = 1;
27470 points = newPoints; 28113 points = _newPoints;
27471 offset = newOffset; 28114 offset = _newOffset;
27472 targetOffset = newTargetOffset; 28115 targetOffset = _newTargetOffset;
27473 } 28116 }
27474 } 28117 }
27475 } 28118 }
27476 28119
27477 // 如果失败,重新计算当前节点将要被放置的位置 28120 // 如果失败,重新计算当前节点将要被放置的位置
27478 if (fail) { 28121 if (fail) {
27479 elFuturePos = (0, _getElFuturePos2['default'])(elRegion, refNodeRegion, points, offset, targetOffset); 28122 elFuturePos = (0, _getElFuturePos2["default"])(elRegion, refNodeRegion, points, offset, targetOffset);
27480 _utils2['default'].mix(newElRegion, elFuturePos); 28123 _utils2["default"].mix(newElRegion, elFuturePos);
27481 } 28124 }
27482 28125
27483 // 检查反下后的位置是否可以放下了 28126 // 检查反下后的位置是否可以放下了
@@ -27488,29 +28131,29 @@
27488 28131
27489 // 确实要调整,甚至可能会调整高度宽度 28132 // 确实要调整,甚至可能会调整高度宽度
27490 if (newOverflowCfg.adjustX || newOverflowCfg.adjustY) { 28133 if (newOverflowCfg.adjustX || newOverflowCfg.adjustY) {
27491 newElRegion = (0, _adjustForViewport2['default'])(elFuturePos, elRegion, visibleRect, newOverflowCfg); 28134 newElRegion = (0, _adjustForViewport2["default"])(elFuturePos, elRegion, visibleRect, newOverflowCfg);
27492 } 28135 }
27493 } 28136 }
27494 28137
27495 // need judge to in case set fixed with in css on height auto element 28138 // need judge to in case set fixed with in css on height auto element
27496 if (newElRegion.width !== elRegion.width) { 28139 if (newElRegion.width !== elRegion.width) {
27497 _utils2['default'].css(source, 'width', source.width() + newElRegion.width - elRegion.width); 28140 _utils2["default"].css(source, 'width', _utils2["default"].width(source) + newElRegion.width - elRegion.width);
27498 } 28141 }
27499 28142
27500 if (newElRegion.height !== elRegion.height) { 28143 if (newElRegion.height !== elRegion.height) {
27501 _utils2['default'].css(source, 'height', source.height() + newElRegion.height - elRegion.height); 28144 _utils2["default"].css(source, 'height', _utils2["default"].height(source) + newElRegion.height - elRegion.height);
27502 } 28145 }
27503 28146
27504 // https://github.com/kissyteam/kissy/issues/190 28147 // https://github.com/kissyteam/kissy/issues/190
27505 // http://localhost:8888/kissy/src/overlay/demo/other/relative_align/align.html
27506 // 相对于屏幕位置没变,而 left/top 变了 28148 // 相对于屏幕位置没变,而 left/top 变了
27507 // 例如 <div 'relative'><el absolute></div> 28149 // 例如 <div 'relative'><el absolute></div>
27508 _utils2['default'].offset(source, { 28150 _utils2["default"].offset(source, {
27509 left: newElRegion.left, 28151 left: newElRegion.left,
27510 top: newElRegion.top 28152 top: newElRegion.top
27511 }, { 28153 }, {
27512 useCssRight: align.useCssRight, 28154 useCssRight: align.useCssRight,
27513 useCssBottom: align.useCssBottom 28155 useCssBottom: align.useCssBottom,
28156 useCssTransform: align.useCssTransform
27514 }); 28157 });
27515 28158
27516 return { 28159 return {
@@ -27521,12 +28164,11 @@
27521 }; 28164 };
27522 } 28165 }
27523 28166
27524 domAlign.__getOffsetParent = _getOffsetParent2['default']; 28167 domAlign.__getOffsetParent = _getOffsetParent2["default"];
27525
27526 domAlign.__getVisibleRectForElement = _getVisibleRectForElement2['default'];
27527 28168
27528 exports['default'] = domAlign; 28169 domAlign.__getVisibleRectForElement = _getVisibleRectForElement2["default"];
27529 28170
28171 exports["default"] = domAlign;
27530 /** 28172 /**
27531 * 2012-04-26 yiminghe@gmail.com 28173 * 2012-04-26 yiminghe@gmail.com
27532 * - 优化智能对齐算法 28174 * - 优化智能对齐算法
@@ -27535,24 +28177,34 @@
27535 * 2011-07-13 yiminghe@gmail.com note: 28177 * 2011-07-13 yiminghe@gmail.com note:
27536 * - 增加智能对齐,以及大小调整选项 28178 * - 增加智能对齐,以及大小调整选项
27537 **/ 28179 **/
28180
27538 module.exports = exports['default']; 28181 module.exports = exports['default'];
27539 28182
27540/***/ }, 28183/***/ },
27541/* 192 */ 28184/* 227 */
27542/***/ function(module, exports) { 28185/***/ function(module, exports, __webpack_require__) {
27543 28186
27544 'use strict'; 28187 'use strict';
27545 28188
27546 Object.defineProperty(exports, '__esModule', { 28189 Object.defineProperty(exports, "__esModule", {
27547 value: true 28190 value: true
27548 }); 28191 });
28192
28193 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
28194
28195 var _propertyUtils = __webpack_require__(228);
28196
27549 var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source; 28197 var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source;
27550 28198
27551 var getComputedStyleX = undefined; 28199 var getComputedStyleX = void 0;
28200
28201 function force(x, y) {
28202 return x + y;
28203 }
27552 28204
27553 function css(el, name, v) { 28205 function css(el, name, v) {
27554 var value = v; 28206 var value = v;
27555 if (typeof name === 'object') { 28207 if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {
27556 for (var i in name) { 28208 for (var i in name) {
27557 if (name.hasOwnProperty(i)) { 28209 if (name.hasOwnProperty(i)) {
27558 css(el, i, name[i]); 28210 css(el, i, name[i]);
@@ -27571,9 +28223,9 @@
27571 } 28223 }
27572 28224
27573 function getClientPosition(elem) { 28225 function getClientPosition(elem) {
27574 var box = undefined; 28226 var box = void 0;
27575 var x = undefined; 28227 var x = void 0;
27576 var y = undefined; 28228 var y = void 0;
27577 var doc = elem.ownerDocument; 28229 var doc = elem.ownerDocument;
27578 var body = doc.body; 28230 var body = doc.body;
27579 var docElem = doc && doc.documentElement; 28231 var docElem = doc && doc.documentElement;
@@ -27610,7 +28262,10 @@
27610 x -= docElem.clientLeft || body.clientLeft || 0; 28262 x -= docElem.clientLeft || body.clientLeft || 0;
27611 y -= docElem.clientTop || body.clientTop || 0; 28263 y -= docElem.clientTop || body.clientTop || 0;
27612 28264
27613 return { left: x, top: y }; 28265 return {
28266 left: x,
28267 top: y
28268 };
27614 } 28269 }
27615 28270
27616 function getScroll(w, top) { 28271 function getScroll(w, top) {
@@ -27725,7 +28380,7 @@
27725 } 28380 }
27726 28381
27727 // 设置 elem 相对 elem.ownerDocument 的坐标 28382 // 设置 elem 相对 elem.ownerDocument 的坐标
27728 function setOffset(elem, offset, option) { 28383 function setLeftTop(elem, offset, option) {
27729 // set position first, in-case top/left are set even on static elem 28384 // set position first, in-case top/left are set even on static elem
27730 if (css(elem, 'position') === 'static') { 28385 if (css(elem, 'position') === 'static') {
27731 elem.style.position = 'relative'; 28386 elem.style.position = 'relative';
@@ -27744,7 +28399,12 @@
27744 if (verticalProperty !== 'top') { 28399 if (verticalProperty !== 'top') {
27745 presetV = 999; 28400 presetV = 999;
27746 } 28401 }
27747 28402 var originalTransition = '';
28403 var originalOffset = getOffset(elem);
28404 if ('left' in offset || 'top' in offset) {
28405 originalTransition = (0, _propertyUtils.getTransitionProperty)(elem) || '';
28406 (0, _propertyUtils.setTransitionProperty)(elem, 'none');
28407 }
27748 if ('left' in offset) { 28408 if ('left' in offset) {
27749 elem.style[oppositeHorizontalProperty] = ''; 28409 elem.style[oppositeHorizontalProperty] = '';
27750 elem.style[horizontalProperty] = presetH + 'px'; 28410 elem.style[horizontalProperty] = presetH + 'px';
@@ -27754,22 +28414,63 @@
27754 elem.style[verticalProperty] = presetV + 'px'; 28414 elem.style[verticalProperty] = presetV + 'px';
27755 } 28415 }
27756 var old = getOffset(elem); 28416 var old = getOffset(elem);
27757 var ret = {}; 28417 var originalStyle = {};
27758 var key = undefined; 28418 for (var key in offset) {
27759 for (key in offset) {
27760 if (offset.hasOwnProperty(key)) { 28419 if (offset.hasOwnProperty(key)) {
27761 var dir = getOffsetDirection(key, option); 28420 var dir = getOffsetDirection(key, option);
27762 var preset = key === 'left' ? presetH : presetV; 28421 var preset = key === 'left' ? presetH : presetV;
28422 var off = originalOffset[key] - old[key];
27763 if (dir === key) { 28423 if (dir === key) {
27764 ret[dir] = preset + offset[key] - old[key]; 28424 originalStyle[dir] = preset + off;
27765 } else { 28425 } else {
27766 ret[dir] = preset + old[key] - offset[key]; 28426 originalStyle[dir] = preset - off;
28427 }
28428 }
28429 }
28430 css(elem, originalStyle);
28431 // force relayout
28432 force(elem.offsetTop, elem.offsetLeft);
28433 if ('left' in offset || 'top' in offset) {
28434 (0, _propertyUtils.setTransitionProperty)(elem, originalTransition);
28435 }
28436 var ret = {};
28437 for (var _key in offset) {
28438 if (offset.hasOwnProperty(_key)) {
28439 var _dir = getOffsetDirection(_key, option);
28440 var _off = offset[_key] - originalOffset[_key];
28441 if (_key === _dir) {
28442 ret[_dir] = originalStyle[_dir] + _off;
28443 } else {
28444 ret[_dir] = originalStyle[_dir] - _off;
27767 } 28445 }
27768 } 28446 }
27769 } 28447 }
27770 css(elem, ret); 28448 css(elem, ret);
27771 } 28449 }
27772 28450
28451 function setTransform(elem, offset) {
28452 var originalOffset = getOffset(elem);
28453 var originalXY = (0, _propertyUtils.getTransformXY)(elem);
28454 var resultXY = { x: originalXY.x, y: originalXY.y };
28455 if ('left' in offset) {
28456 resultXY.x = originalXY.x + offset.left - originalOffset.left;
28457 }
28458 if ('top' in offset) {
28459 resultXY.y = originalXY.y + offset.top - originalOffset.top;
28460 }
28461 (0, _propertyUtils.setTransformXY)(elem, resultXY);
28462 }
28463
28464 function setOffset(elem, offset, option) {
28465 if (option.useCssRight || option.useCssBottom) {
28466 setLeftTop(elem, offset, option);
28467 } else if (option.useCssTransform && (0, _propertyUtils.getTransformName)() in document.body.style) {
28468 setTransform(elem, offset, option);
28469 } else {
28470 setLeftTop(elem, offset, option);
28471 }
28472 }
28473
27773 function each(arr, fn) { 28474 function each(arr, fn) {
27774 for (var i = 0; i < arr.length; i++) { 28475 for (var i = 0; i < arr.length; i++) {
27775 fn(arr[i]); 28476 fn(arr[i]);
@@ -27789,7 +28490,7 @@
27789 function swap(elem, options, callback) { 28490 function swap(elem, options, callback) {
27790 var old = {}; 28491 var old = {};
27791 var style = elem.style; 28492 var style = elem.style;
27792 var name = undefined; 28493 var name = void 0;
27793 28494
27794 // Remember the old values, and insert the new ones 28495 // Remember the old values, and insert the new ones
27795 for (name in options) { 28496 for (name in options) {
@@ -27811,16 +28512,16 @@
27811 28512
27812 function getPBMWidth(elem, props, which) { 28513 function getPBMWidth(elem, props, which) {
27813 var value = 0; 28514 var value = 0;
27814 var prop = undefined; 28515 var prop = void 0;
27815 var j = undefined; 28516 var j = void 0;
27816 var i = undefined; 28517 var i = void 0;
27817 for (j = 0; j < props.length; j++) { 28518 for (j = 0; j < props.length; j++) {
27818 prop = props[j]; 28519 prop = props[j];
27819 if (prop) { 28520 if (prop) {
27820 for (i = 0; i < which.length; i++) { 28521 for (i = 0; i < which.length; i++) {
27821 var cssProp = undefined; 28522 var cssProp = void 0;
27822 if (prop === 'border') { 28523 if (prop === 'border') {
27823 cssProp = prop + which[i] + 'Width'; 28524 cssProp = '' + prop + which[i] + 'Width';
27824 } else { 28525 } else {
27825 cssProp = prop + which[i]; 28526 cssProp = prop + which[i];
27826 } 28527 }
@@ -27916,15 +28617,19 @@
27916 return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle); 28617 return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle);
27917 } 28618 }
27918 28619
27919 var cssShow = { position: 'absolute', visibility: 'hidden', display: 'block' }; 28620 var cssShow = {
28621 position: 'absolute',
28622 visibility: 'hidden',
28623 display: 'block'
28624 };
27920 28625
27921 // fix #119 : https://github.com/kissyteam/kissy/issues/119 28626 // fix #119 : https://github.com/kissyteam/kissy/issues/119
27922 function getWHIgnoreDisplay() { 28627 function getWHIgnoreDisplay() {
27923 for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { 28628 for (var _len = arguments.length, args = Array(_len), _key2 = 0; _key2 < _len; _key2++) {
27924 args[_key] = arguments[_key]; 28629 args[_key2] = arguments[_key2];
27925 } 28630 }
27926 28631
27927 var val = undefined; 28632 var val = void 0;
27928 var elem = args[0]; 28633 var elem = args[0];
27929 // in case elem is window 28634 // in case elem is window
27930 // elem.offsetWidth === undefined 28635 // elem.offsetWidth === undefined
@@ -27986,11 +28691,12 @@
27986 return getOffset(el); 28691 return getOffset(el);
27987 } 28692 }
27988 }, 28693 },
28694
27989 isWindow: isWindow, 28695 isWindow: isWindow,
27990 each: each, 28696 each: each,
27991 css: css, 28697 css: css,
27992 clone: function clone(obj) { 28698 clone: function clone(obj) {
27993 var i = undefined; 28699 var i = void 0;
27994 var ret = {}; 28700 var ret = {};
27995 for (i in obj) { 28701 for (i in obj) {
27996 if (obj.hasOwnProperty(i)) { 28702 if (obj.hasOwnProperty(i)) {
@@ -28007,6 +28713,7 @@
28007 } 28713 }
28008 return ret; 28714 return ret;
28009 }, 28715 },
28716
28010 mix: mix, 28717 mix: mix,
28011 getWindowScrollLeft: function getWindowScrollLeft(w) { 28718 getWindowScrollLeft: function getWindowScrollLeft(w) {
28012 return getScrollLeft(w); 28719 return getScrollLeft(w);
@@ -28017,8 +28724,8 @@
28017 merge: function merge() { 28724 merge: function merge() {
28018 var ret = {}; 28725 var ret = {};
28019 28726
28020 for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { 28727 for (var _len2 = arguments.length, args = Array(_len2), _key3 = 0; _key3 < _len2; _key3++) {
28021 args[_key2] = arguments[_key2]; 28728 args[_key3] = arguments[_key3];
28022 } 28729 }
28023 28730
28024 for (var i = 0; i < args.length; i++) { 28731 for (var i = 0; i < args.length; i++) {
@@ -28026,31 +28733,147 @@
28026 } 28733 }
28027 return ret; 28734 return ret;
28028 }, 28735 },
28736
28029 viewportWidth: 0, 28737 viewportWidth: 0,
28030 viewportHeight: 0 28738 viewportHeight: 0
28031 }; 28739 };
28032 28740
28033 mix(utils, domUtils); 28741 mix(utils, domUtils);
28034 28742
28035 exports['default'] = utils; 28743 exports["default"] = utils;
28036 module.exports = exports['default']; 28744 module.exports = exports['default'];
28037 28745
28038/***/ }, 28746/***/ },
28039/* 193 */ 28747/* 228 */
28040/***/ function(module, exports, __webpack_require__) { 28748/***/ function(module, exports) {
28041 28749
28042 'use strict'; 28750 'use strict';
28043 28751
28044 Object.defineProperty(exports, '__esModule', { 28752 Object.defineProperty(exports, "__esModule", {
28045 value: true 28753 value: true
28046 }); 28754 });
28755 exports.getTransformName = getTransformName;
28756 exports.setTransitionProperty = setTransitionProperty;
28757 exports.getTransitionProperty = getTransitionProperty;
28758 exports.getTransformXY = getTransformXY;
28759 exports.setTransformXY = setTransformXY;
28760 var vendorPrefix = void 0;
28761
28762 var jsCssMap = {
28763 Webkit: '-webkit-',
28764 Moz: '-moz-',
28765 // IE did it wrong again ...
28766 ms: '-ms-',
28767 O: '-o-'
28768 };
28047 28769
28048 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 28770 function getVendorPrefix() {
28771 if (vendorPrefix !== undefined) {
28772 return vendorPrefix;
28773 }
28774 vendorPrefix = '';
28775 var style = document.createElement('p').style;
28776 var testProp = 'Transform';
28777 for (var key in jsCssMap) {
28778 if (key + testProp in style) {
28779 vendorPrefix = key;
28780 }
28781 }
28782 return vendorPrefix;
28783 }
28784
28785 function getTransitionName() {
28786 return getVendorPrefix() ? getVendorPrefix() + 'TransitionProperty' : 'transitionProperty';
28787 }
28788
28789 function getTransformName() {
28790 return getVendorPrefix() ? getVendorPrefix() + 'Transform' : 'transform';
28791 }
28792
28793 function setTransitionProperty(node, value) {
28794 var name = getTransitionName();
28795 if (name) {
28796 node.style[name] = value;
28797 if (name !== 'transitionProperty') {
28798 node.style.transitionProperty = value;
28799 }
28800 }
28801 }
28802
28803 function setTransform(node, value) {
28804 var name = getTransformName();
28805 if (name) {
28806 node.style[name] = value;
28807 if (name !== 'transform') {
28808 node.style.transform = value;
28809 }
28810 }
28811 }
28812
28813 function getTransitionProperty(node) {
28814 return node.style.transitionProperty || node.style[getTransitionName()];
28815 }
28816
28817 function getTransformXY(node) {
28818 var style = window.getComputedStyle(node, null);
28819 var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName());
28820 if (transform && transform !== 'none') {
28821 var matrix = transform.replace(/[^0-9\-.,]/g, '').split(',');
28822 return { x: parseFloat(matrix[12] || matrix[4], 0), y: parseFloat(matrix[13] || matrix[5], 0) };
28823 }
28824 return {
28825 x: 0,
28826 y: 0
28827 };
28828 }
28829
28830 var matrix2d = /matrix\((.*)\)/;
28831 var matrix3d = /matrix3d\((.*)\)/;
28832
28833 function setTransformXY(node, xy) {
28834 var style = window.getComputedStyle(node, null);
28835 var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName());
28836 if (transform && transform !== 'none') {
28837 var arr = void 0;
28838 var match2d = transform.match(matrix2d);
28839 if (match2d) {
28840 match2d = match2d[1];
28841 arr = match2d.split(',').map(function (item) {
28842 return parseFloat(item, 10);
28843 });
28844 arr[4] = xy.x;
28845 arr[5] = xy.y;
28846 setTransform(node, 'matrix(' + arr.join(',') + ')');
28847 } else {
28848 var match3d = transform.match(matrix3d)[1];
28849 arr = match3d.split(',').map(function (item) {
28850 return parseFloat(item, 10);
28851 });
28852 arr[12] = xy.x;
28853 arr[13] = xy.y;
28854 setTransform(node, 'matrix3d(' + arr.join(',') + ')');
28855 }
28856 } else {
28857 setTransform(node, 'translateX(' + xy.x + 'px) translateY(' + xy.y + 'px) translateZ(0)');
28858 }
28859 }
28860
28861/***/ },
28862/* 229 */
28863/***/ function(module, exports, __webpack_require__) {
28864
28865 'use strict';
28049 28866
28050 var _utils = __webpack_require__(192); 28867 Object.defineProperty(exports, "__esModule", {
28868 value: true
28869 });
28870
28871 var _utils = __webpack_require__(227);
28051 28872
28052 var _utils2 = _interopRequireDefault(_utils); 28873 var _utils2 = _interopRequireDefault(_utils);
28053 28874
28875 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
28876
28054 /** 28877 /**
28055 * 得到会导致元素显示不全的祖先元素 28878 * 得到会导致元素显示不全的祖先元素
28056 */ 28879 */
@@ -28073,8 +28896,8 @@
28073 // 统一的 offsetParent 方法 28896 // 统一的 offsetParent 方法
28074 var doc = element.ownerDocument; 28897 var doc = element.ownerDocument;
28075 var body = doc.body; 28898 var body = doc.body;
28076 var parent = undefined; 28899 var parent = void 0;
28077 var positionStyle = _utils2['default'].css(element, 'position'); 28900 var positionStyle = _utils2["default"].css(element, 'position');
28078 var skipStatic = positionStyle === 'fixed' || positionStyle === 'absolute'; 28901 var skipStatic = positionStyle === 'fixed' || positionStyle === 'absolute';
28079 28902
28080 if (!skipStatic) { 28903 if (!skipStatic) {
@@ -28082,7 +28905,7 @@
28082 } 28905 }
28083 28906
28084 for (parent = element.parentNode; parent && parent !== body; parent = parent.parentNode) { 28907 for (parent = element.parentNode; parent && parent !== body; parent = parent.parentNode) {
28085 positionStyle = _utils2['default'].css(parent, 'position'); 28908 positionStyle = _utils2["default"].css(parent, 'position');
28086 if (positionStyle !== 'static') { 28909 if (positionStyle !== 'static') {
28087 return parent; 28910 return parent;
28088 } 28911 }
@@ -28090,29 +28913,29 @@
28090 return null; 28913 return null;
28091 } 28914 }
28092 28915
28093 exports['default'] = getOffsetParent; 28916 exports["default"] = getOffsetParent;
28094 module.exports = exports['default']; 28917 module.exports = exports['default'];
28095 28918
28096/***/ }, 28919/***/ },
28097/* 194 */ 28920/* 230 */
28098/***/ function(module, exports, __webpack_require__) { 28921/***/ function(module, exports, __webpack_require__) {
28099 28922
28100 'use strict'; 28923 'use strict';
28101 28924
28102 Object.defineProperty(exports, '__esModule', { 28925 Object.defineProperty(exports, "__esModule", {
28103 value: true 28926 value: true
28104 }); 28927 });
28105 28928
28106 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 28929 var _utils = __webpack_require__(227);
28107
28108 var _utils = __webpack_require__(192);
28109 28930
28110 var _utils2 = _interopRequireDefault(_utils); 28931 var _utils2 = _interopRequireDefault(_utils);
28111 28932
28112 var _getOffsetParent = __webpack_require__(193); 28933 var _getOffsetParent = __webpack_require__(229);
28113 28934
28114 var _getOffsetParent2 = _interopRequireDefault(_getOffsetParent); 28935 var _getOffsetParent2 = _interopRequireDefault(_getOffsetParent);
28115 28936
28937 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
28938
28116 /** 28939 /**
28117 * 获得元素的显示部分的区域 28940 * 获得元素的显示部分的区域
28118 */ 28941 */
@@ -28123,10 +28946,10 @@
28123 top: 0, 28946 top: 0,
28124 bottom: Infinity 28947 bottom: Infinity
28125 }; 28948 };
28126 var el = (0, _getOffsetParent2['default'])(element); 28949 var el = (0, _getOffsetParent2["default"])(element);
28127 var scrollX = undefined; 28950 var scrollX = void 0;
28128 var scrollY = undefined; 28951 var scrollY = void 0;
28129 var winSize = undefined; 28952 var winSize = void 0;
28130 var doc = element.ownerDocument; 28953 var doc = element.ownerDocument;
28131 var win = doc.defaultView || doc.parentWindow; 28954 var win = doc.defaultView || doc.parentWindow;
28132 var body = doc.body; 28955 var body = doc.body;
@@ -28140,8 +28963,8 @@
28140 // body may have overflow set on it, yet we still get the entire 28963 // body may have overflow set on it, yet we still get the entire
28141 // viewport. In some browsers, el.offsetParent may be 28964 // viewport. In some browsers, el.offsetParent may be
28142 // document.documentElement, so check for that too. 28965 // document.documentElement, so check for that too.
28143 el !== body && el !== documentElement && _utils2['default'].css(el, 'overflow') !== 'visible') { 28966 el !== body && el !== documentElement && _utils2["default"].css(el, 'overflow') !== 'visible') {
28144 var pos = _utils2['default'].offset(el); 28967 var pos = _utils2["default"].offset(el);
28145 // add border 28968 // add border
28146 pos.left += el.clientLeft; 28969 pos.left += el.clientLeft;
28147 pos.top += el.clientTop; 28970 pos.top += el.clientTop;
@@ -28154,44 +28977,44 @@
28154 } else if (el === body || el === documentElement) { 28977 } else if (el === body || el === documentElement) {
28155 break; 28978 break;
28156 } 28979 }
28157 el = (0, _getOffsetParent2['default'])(el); 28980 el = (0, _getOffsetParent2["default"])(el);
28158 } 28981 }
28159 28982
28160 // Clip by window's viewport. 28983 // Clip by window's viewport.
28161 scrollX = _utils2['default'].getWindowScrollLeft(win); 28984 scrollX = _utils2["default"].getWindowScrollLeft(win);
28162 scrollY = _utils2['default'].getWindowScrollTop(win); 28985 scrollY = _utils2["default"].getWindowScrollTop(win);
28163 visibleRect.left = Math.max(visibleRect.left, scrollX); 28986 visibleRect.left = Math.max(visibleRect.left, scrollX);
28164 visibleRect.top = Math.max(visibleRect.top, scrollY); 28987 visibleRect.top = Math.max(visibleRect.top, scrollY);
28165 winSize = { 28988 winSize = {
28166 width: _utils2['default'].viewportWidth(win), 28989 width: _utils2["default"].viewportWidth(win),
28167 height: _utils2['default'].viewportHeight(win) 28990 height: _utils2["default"].viewportHeight(win)
28168 }; 28991 };
28169 visibleRect.right = Math.min(visibleRect.right, scrollX + winSize.width); 28992 visibleRect.right = Math.min(visibleRect.right, scrollX + winSize.width);
28170 visibleRect.bottom = Math.min(visibleRect.bottom, scrollY + winSize.height); 28993 visibleRect.bottom = Math.min(visibleRect.bottom, scrollY + winSize.height);
28171 return visibleRect.top >= 0 && visibleRect.left >= 0 && visibleRect.bottom > visibleRect.top && visibleRect.right > visibleRect.left ? visibleRect : null; 28994 return visibleRect.top >= 0 && visibleRect.left >= 0 && visibleRect.bottom > visibleRect.top && visibleRect.right > visibleRect.left ? visibleRect : null;
28172 } 28995 }
28173 28996
28174 exports['default'] = getVisibleRectForElement; 28997 exports["default"] = getVisibleRectForElement;
28175 module.exports = exports['default']; 28998 module.exports = exports['default'];
28176 28999
28177/***/ }, 29000/***/ },
28178/* 195 */ 29001/* 231 */
28179/***/ function(module, exports, __webpack_require__) { 29002/***/ function(module, exports, __webpack_require__) {
28180 29003
28181 'use strict'; 29004 'use strict';
28182 29005
28183 Object.defineProperty(exports, '__esModule', { 29006 Object.defineProperty(exports, "__esModule", {
28184 value: true 29007 value: true
28185 }); 29008 });
28186 29009
28187 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 29010 var _utils = __webpack_require__(227);
28188
28189 var _utils = __webpack_require__(192);
28190 29011
28191 var _utils2 = _interopRequireDefault(_utils); 29012 var _utils2 = _interopRequireDefault(_utils);
28192 29013
29014 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
29015
28193 function adjustForViewport(elFuturePos, elRegion, visibleRect, overflow) { 29016 function adjustForViewport(elFuturePos, elRegion, visibleRect, overflow) {
28194 var pos = _utils2['default'].clone(elFuturePos); 29017 var pos = _utils2["default"].clone(elFuturePos);
28195 var size = { 29018 var size = {
28196 width: elRegion.width, 29019 width: elRegion.width,
28197 height: elRegion.height 29020 height: elRegion.height
@@ -28228,82 +29051,82 @@
28228 pos.top = Math.max(visibleRect.bottom - size.height, visibleRect.top); 29051 pos.top = Math.max(visibleRect.bottom - size.height, visibleRect.top);
28229 } 29052 }
28230 29053
28231 return _utils2['default'].mix(pos, size); 29054 return _utils2["default"].mix(pos, size);
28232 } 29055 }
28233 29056
28234 exports['default'] = adjustForViewport; 29057 exports["default"] = adjustForViewport;
28235 module.exports = exports['default']; 29058 module.exports = exports['default'];
28236 29059
28237/***/ }, 29060/***/ },
28238/* 196 */ 29061/* 232 */
28239/***/ function(module, exports, __webpack_require__) { 29062/***/ function(module, exports, __webpack_require__) {
28240 29063
28241 'use strict'; 29064 'use strict';
28242 29065
28243 Object.defineProperty(exports, '__esModule', { 29066 Object.defineProperty(exports, "__esModule", {
28244 value: true 29067 value: true
28245 }); 29068 });
28246 29069
28247 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 29070 var _utils = __webpack_require__(227);
28248
28249 var _utils = __webpack_require__(192);
28250 29071
28251 var _utils2 = _interopRequireDefault(_utils); 29072 var _utils2 = _interopRequireDefault(_utils);
28252 29073
29074 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
29075
28253 function getRegion(node) { 29076 function getRegion(node) {
28254 var offset = undefined; 29077 var offset = void 0;
28255 var w = undefined; 29078 var w = void 0;
28256 var h = undefined; 29079 var h = void 0;
28257 if (!_utils2['default'].isWindow(node) && node.nodeType !== 9) { 29080 if (!_utils2["default"].isWindow(node) && node.nodeType !== 9) {
28258 offset = _utils2['default'].offset(node); 29081 offset = _utils2["default"].offset(node);
28259 w = _utils2['default'].outerWidth(node); 29082 w = _utils2["default"].outerWidth(node);
28260 h = _utils2['default'].outerHeight(node); 29083 h = _utils2["default"].outerHeight(node);
28261 } else { 29084 } else {
28262 var win = _utils2['default'].getWindow(node); 29085 var win = _utils2["default"].getWindow(node);
28263 offset = { 29086 offset = {
28264 left: _utils2['default'].getWindowScrollLeft(win), 29087 left: _utils2["default"].getWindowScrollLeft(win),
28265 top: _utils2['default'].getWindowScrollTop(win) 29088 top: _utils2["default"].getWindowScrollTop(win)
28266 }; 29089 };
28267 w = _utils2['default'].viewportWidth(win); 29090 w = _utils2["default"].viewportWidth(win);
28268 h = _utils2['default'].viewportHeight(win); 29091 h = _utils2["default"].viewportHeight(win);
28269 } 29092 }
28270 offset.width = w; 29093 offset.width = w;
28271 offset.height = h; 29094 offset.height = h;
28272 return offset; 29095 return offset;
28273 } 29096 }
28274 29097
28275 exports['default'] = getRegion; 29098 exports["default"] = getRegion;
28276 module.exports = exports['default']; 29099 module.exports = exports['default'];
28277 29100
28278/***/ }, 29101/***/ },
28279/* 197 */ 29102/* 233 */
28280/***/ function(module, exports, __webpack_require__) { 29103/***/ function(module, exports, __webpack_require__) {
28281 29104
28282 'use strict'; 29105 'use strict';
28283 29106
28284 Object.defineProperty(exports, '__esModule', { 29107 Object.defineProperty(exports, "__esModule", {
28285 value: true 29108 value: true
28286 }); 29109 });
28287 29110
28288 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 29111 var _getAlignOffset = __webpack_require__(234);
28289
28290 var _getAlignOffset = __webpack_require__(198);
28291 29112
28292 var _getAlignOffset2 = _interopRequireDefault(_getAlignOffset); 29113 var _getAlignOffset2 = _interopRequireDefault(_getAlignOffset);
28293 29114
29115 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
29116
28294 function getElFuturePos(elRegion, refNodeRegion, points, offset, targetOffset) { 29117 function getElFuturePos(elRegion, refNodeRegion, points, offset, targetOffset) {
28295 var xy = undefined; 29118 var xy = void 0;
28296 var diff = undefined; 29119 var diff = void 0;
28297 var p1 = undefined; 29120 var p1 = void 0;
28298 var p2 = undefined; 29121 var p2 = void 0;
28299 29122
28300 xy = { 29123 xy = {
28301 left: elRegion.left, 29124 left: elRegion.left,
28302 top: elRegion.top 29125 top: elRegion.top
28303 }; 29126 };
28304 29127
28305 p1 = (0, _getAlignOffset2['default'])(refNodeRegion, points[1]); 29128 p1 = (0, _getAlignOffset2["default"])(refNodeRegion, points[1]);
28306 p2 = (0, _getAlignOffset2['default'])(elRegion, points[0]); 29129 p2 = (0, _getAlignOffset2["default"])(elRegion, points[0]);
28307 29130
28308 diff = [p2.left - p1.left, p2.top - p1.top]; 29131 diff = [p2.left - p1.left, p2.top - p1.top];
28309 29132
@@ -28313,29 +29136,29 @@
28313 }; 29136 };
28314 } 29137 }
28315 29138
28316 exports['default'] = getElFuturePos; 29139 exports["default"] = getElFuturePos;
28317 module.exports = exports['default']; 29140 module.exports = exports['default'];
28318 29141
28319/***/ }, 29142/***/ },
28320/* 198 */ 29143/* 234 */
28321/***/ function(module, exports) { 29144/***/ function(module, exports) {
28322 29145
28323 /**
28324 * 获取 node 上的 align 对齐点 相对于页面的坐标
28325 */
28326
28327 'use strict'; 29146 'use strict';
28328 29147
28329 Object.defineProperty(exports, '__esModule', { 29148 Object.defineProperty(exports, "__esModule", {
28330 value: true 29149 value: true
28331 }); 29150 });
29151 /**
29152 * 获取 node 上的 align 对齐点 相对于页面的坐标
29153 */
29154
28332 function getAlignOffset(region, align) { 29155 function getAlignOffset(region, align) {
28333 var V = align.charAt(0); 29156 var V = align.charAt(0);
28334 var H = align.charAt(1); 29157 var H = align.charAt(1);
28335 var w = region.width; 29158 var w = region.width;
28336 var h = region.height; 29159 var h = region.height;
28337 var x = undefined; 29160 var x = void 0;
28338 var y = undefined; 29161 var y = void 0;
28339 29162
28340 x = region.left; 29163 x = region.left;
28341 y = region.top; 29164 y = region.top;
@@ -28358,11 +29181,11 @@
28358 }; 29181 };
28359 } 29182 }
28360 29183
28361 exports['default'] = getAlignOffset; 29184 exports["default"] = getAlignOffset;
28362 module.exports = exports['default']; 29185 module.exports = exports['default'];
28363 29186
28364/***/ }, 29187/***/ },
28365/* 199 */ 29188/* 235 */
28366/***/ function(module, exports) { 29189/***/ function(module, exports) {
28367 29190
28368 "use strict"; 29191 "use strict";
@@ -28379,16 +29202,16 @@
28379 module.exports = exports['default']; 29202 module.exports = exports['default'];
28380 29203
28381/***/ }, 29204/***/ },
28382/* 200 */ 29205/* 236 */
28383/***/ function(module, exports, __webpack_require__) { 29206/***/ function(module, exports, __webpack_require__) {
28384 29207
28385 'use strict'; 29208 'use strict';
28386 29209
28387 // export this package's api 29210 // export this package's api
28388 module.exports = __webpack_require__(201); 29211 module.exports = __webpack_require__(237);
28389 29212
28390/***/ }, 29213/***/ },
28391/* 201 */ 29214/* 237 */
28392/***/ function(module, exports, __webpack_require__) { 29215/***/ function(module, exports, __webpack_require__) {
28393 29216
28394 'use strict'; 29217 'use strict';
@@ -28401,13 +29224,13 @@
28401 29224
28402 var _react2 = _interopRequireDefault(_react); 29225 var _react2 = _interopRequireDefault(_react);
28403 29226
28404 var _ChildrenUtils = __webpack_require__(202); 29227 var _ChildrenUtils = __webpack_require__(238);
28405 29228
28406 var _AnimateChild = __webpack_require__(203); 29229 var _AnimateChild = __webpack_require__(239);
28407 29230
28408 var _AnimateChild2 = _interopRequireDefault(_AnimateChild); 29231 var _AnimateChild2 = _interopRequireDefault(_AnimateChild);
28409 29232
28410 var _util = __webpack_require__(208); 29233 var _util = __webpack_require__(244);
28411 29234
28412 var _util2 = _interopRequireDefault(_util); 29235 var _util2 = _interopRequireDefault(_util);
28413 29236
@@ -28720,7 +29543,7 @@
28720 module.exports = exports['default']; 29543 module.exports = exports['default'];
28721 29544
28722/***/ }, 29545/***/ },
28723/* 202 */ 29546/* 238 */
28724/***/ function(module, exports, __webpack_require__) { 29547/***/ function(module, exports, __webpack_require__) {
28725 29548
28726 'use strict'; 29549 'use strict';
@@ -28842,7 +29665,7 @@
28842 } 29665 }
28843 29666
28844/***/ }, 29667/***/ },
28845/* 203 */ 29668/* 239 */
28846/***/ function(module, exports, __webpack_require__) { 29669/***/ function(module, exports, __webpack_require__) {
28847 29670
28848 'use strict'; 29671 'use strict';
@@ -28857,15 +29680,15 @@
28857 29680
28858 var _react2 = _interopRequireDefault(_react); 29681 var _react2 = _interopRequireDefault(_react);
28859 29682
28860 var _reactDom = __webpack_require__(37); 29683 var _reactDom = __webpack_require__(36);
28861 29684
28862 var _reactDom2 = _interopRequireDefault(_reactDom); 29685 var _reactDom2 = _interopRequireDefault(_reactDom);
28863 29686
28864 var _cssAnimation = __webpack_require__(204); 29687 var _cssAnimation = __webpack_require__(240);
28865 29688
28866 var _cssAnimation2 = _interopRequireDefault(_cssAnimation); 29689 var _cssAnimation2 = _interopRequireDefault(_cssAnimation);
28867 29690
28868 var _util = __webpack_require__(208); 29691 var _util = __webpack_require__(244);
28869 29692
28870 var _util2 = _interopRequireDefault(_util); 29693 var _util2 = _interopRequireDefault(_util);
28871 29694
@@ -28953,7 +29776,7 @@
28953 module.exports = exports['default']; 29776 module.exports = exports['default'];
28954 29777
28955/***/ }, 29778/***/ },
28956/* 204 */ 29779/* 240 */
28957/***/ function(module, exports, __webpack_require__) { 29780/***/ function(module, exports, __webpack_require__) {
28958 29781
28959 'use strict'; 29782 'use strict';
@@ -28964,11 +29787,11 @@
28964 29787
28965 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; 29788 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
28966 29789
28967 var _Event = __webpack_require__(205); 29790 var _Event = __webpack_require__(241);
28968 29791
28969 var _Event2 = _interopRequireDefault(_Event); 29792 var _Event2 = _interopRequireDefault(_Event);
28970 29793
28971 var _componentClasses = __webpack_require__(206); 29794 var _componentClasses = __webpack_require__(242);
28972 29795
28973 var _componentClasses2 = _interopRequireDefault(_componentClasses); 29796 var _componentClasses2 = _interopRequireDefault(_componentClasses);
28974 29797
@@ -29148,7 +29971,7 @@
29148 module.exports = exports['default']; 29971 module.exports = exports['default'];
29149 29972
29150/***/ }, 29973/***/ },
29151/* 205 */ 29974/* 241 */
29152/***/ function(module, exports) { 29975/***/ function(module, exports) {
29153 29976
29154 'use strict'; 29977 'use strict';
@@ -29241,7 +30064,7 @@
29241 module.exports = exports['default']; 30064 module.exports = exports['default'];
29242 30065
29243/***/ }, 30066/***/ },
29244/* 206 */ 30067/* 242 */
29245/***/ function(module, exports, __webpack_require__) { 30068/***/ function(module, exports, __webpack_require__) {
29246 30069
29247 /** 30070 /**
@@ -29249,9 +30072,9 @@
29249 */ 30072 */
29250 30073
29251 try { 30074 try {
29252 var index = __webpack_require__(207); 30075 var index = __webpack_require__(243);
29253 } catch (err) { 30076 } catch (err) {
29254 var index = __webpack_require__(207); 30077 var index = __webpack_require__(243);
29255 } 30078 }
29256 30079
29257 /** 30080 /**
@@ -29438,7 +30261,7 @@
29438 30261
29439 30262
29440/***/ }, 30263/***/ },
29441/* 207 */ 30264/* 243 */
29442/***/ function(module, exports) { 30265/***/ function(module, exports) {
29443 30266
29444 module.exports = function(arr, obj){ 30267 module.exports = function(arr, obj){
@@ -29450,7 +30273,7 @@
29450 }; 30273 };
29451 30274
29452/***/ }, 30275/***/ },
29453/* 208 */ 30276/* 244 */
29454/***/ function(module, exports) { 30277/***/ function(module, exports) {
29455 30278
29456 "use strict"; 30279 "use strict";
@@ -29482,7 +30305,7 @@
29482 module.exports = exports['default']; 30305 module.exports = exports['default'];
29483 30306
29484/***/ }, 30307/***/ },
29485/* 209 */ 30308/* 245 */
29486/***/ function(module, exports, __webpack_require__) { 30309/***/ function(module, exports, __webpack_require__) {
29487 30310
29488 'use strict'; 30311 'use strict';
@@ -29495,7 +30318,7 @@
29495 30318
29496 var _react2 = _interopRequireDefault(_react); 30319 var _react2 = _interopRequireDefault(_react);
29497 30320
29498 var _LazyRenderBox = __webpack_require__(210); 30321 var _LazyRenderBox = __webpack_require__(246);
29499 30322
29500 var _LazyRenderBox2 = _interopRequireDefault(_LazyRenderBox); 30323 var _LazyRenderBox2 = _interopRequireDefault(_LazyRenderBox);
29501 30324
@@ -29539,7 +30362,7 @@
29539 module.exports = exports['default']; 30362 module.exports = exports['default'];
29540 30363
29541/***/ }, 30364/***/ },
29542/* 210 */ 30365/* 246 */
29543/***/ function(module, exports, __webpack_require__) { 30366/***/ function(module, exports, __webpack_require__) {
29544 30367
29545 'use strict'; 30368 'use strict';
@@ -29548,14 +30371,16 @@
29548 value: true 30371 value: true
29549 }); 30372 });
29550 30373
30374 var _objectWithoutProperties2 = __webpack_require__(247);
30375
30376 var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
30377
29551 var _react = __webpack_require__(3); 30378 var _react = __webpack_require__(3);
29552 30379
29553 var _react2 = _interopRequireDefault(_react); 30380 var _react2 = _interopRequireDefault(_react);
29554 30381
29555 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 30382 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
29556 30383
29557 function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
29558
29559 var LazyRenderBox = _react2["default"].createClass({ 30384 var LazyRenderBox = _react2["default"].createClass({
29560 displayName: 'LazyRenderBox', 30385 displayName: 'LazyRenderBox',
29561 30386
@@ -29572,8 +30397,8 @@
29572 var _props = this.props; 30397 var _props = this.props;
29573 var hiddenClassName = _props.hiddenClassName; 30398 var hiddenClassName = _props.hiddenClassName;
29574 var visible = _props.visible; 30399 var visible = _props.visible;
30400 var props = (0, _objectWithoutProperties3["default"])(_props, ['hiddenClassName', 'visible']);
29575 30401
29576 var props = _objectWithoutProperties(_props, ['hiddenClassName', 'visible']);
29577 30402
29578 if (hiddenClassName || _react2["default"].Children.count(props.children) > 1) { 30403 if (hiddenClassName || _react2["default"].Children.count(props.children) > 1) {
29579 if (!visible && hiddenClassName) { 30404 if (!visible && hiddenClassName) {
@@ -29590,26 +30415,51 @@
29590 module.exports = exports['default']; 30415 module.exports = exports['default'];
29591 30416
29592/***/ }, 30417/***/ },
29593/* 211 */ 30418/* 247 */
29594/***/ function(module, exports) { 30419/***/ function(module, exports) {
29595 30420
30421 "use strict";
30422
30423 exports.__esModule = true;
30424
30425 exports.default = function (obj, keys) {
30426 var target = {};
30427
30428 for (var i in obj) {
30429 if (keys.indexOf(i) >= 0) continue;
30430 if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
30431 target[i] = obj[i];
30432 }
30433
30434 return target;
30435 };
30436
30437/***/ },
30438/* 248 */
30439/***/ function(module, exports, __webpack_require__) {
30440
29596 'use strict'; 30441 'use strict';
29597 30442
29598 Object.defineProperty(exports, "__esModule", { 30443 Object.defineProperty(exports, "__esModule", {
29599 value: true 30444 value: true
29600 }); 30445 });
29601 30446
29602 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; 30447 var _extends2 = __webpack_require__(180);
30448
30449 var _extends3 = _interopRequireDefault(_extends2);
29603 30450
29604 exports.getAlignFromPlacement = getAlignFromPlacement; 30451 exports.getAlignFromPlacement = getAlignFromPlacement;
29605 exports.getPopupClassNameFromAlign = getPopupClassNameFromAlign; 30452 exports.getPopupClassNameFromAlign = getPopupClassNameFromAlign;
30453
30454 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
30455
29606 function isPointsEq(a1, a2) { 30456 function isPointsEq(a1, a2) {
29607 return a1[0] === a2[0] && a1[1] === a2[1]; 30457 return a1[0] === a2[0] && a1[1] === a2[1];
29608 } 30458 }
29609 30459
29610 function getAlignFromPlacement(builtinPlacements, placementStr, align) { 30460 function getAlignFromPlacement(builtinPlacements, placementStr, align) {
29611 var baseAlign = builtinPlacements[placementStr] || {}; 30461 var baseAlign = builtinPlacements[placementStr] || {};
29612 return _extends({}, baseAlign, align); 30462 return (0, _extends3["default"])({}, baseAlign, align);
29613 } 30463 }
29614 30464
29615 function getPopupClassNameFromAlign(builtinPlacements, prefixCls, align) { 30465 function getPopupClassNameFromAlign(builtinPlacements, prefixCls, align) {
@@ -29625,7 +30475,7 @@
29625 } 30475 }
29626 30476
29627/***/ }, 30477/***/ },
29628/* 212 */ 30478/* 249 */
29629/***/ function(module, exports, __webpack_require__) { 30479/***/ function(module, exports, __webpack_require__) {
29630 30480
29631 'use strict'; 30481 'use strict';
@@ -29638,7 +30488,7 @@
29638 30488
29639 exports["default"] = getContainerRenderMixin; 30489 exports["default"] = getContainerRenderMixin;
29640 30490
29641 var _reactDom = __webpack_require__(37); 30491 var _reactDom = __webpack_require__(36);
29642 30492
29643 var _reactDom2 = _interopRequireDefault(_reactDom); 30493 var _reactDom2 = _interopRequireDefault(_reactDom);
29644 30494
@@ -29724,7 +30574,7 @@
29724 module.exports = exports['default']; 30574 module.exports = exports['default'];
29725 30575
29726/***/ }, 30576/***/ },
29727/* 213 */ 30577/* 250 */
29728/***/ function(module, exports, __webpack_require__) { 30578/***/ function(module, exports, __webpack_require__) {
29729 30579
29730 'use strict'; 30580 'use strict';
@@ -29733,7 +30583,7 @@
29733 value: true 30583 value: true
29734 }); 30584 });
29735 30585
29736 var _defineProperty2 = __webpack_require__(214); 30586 var _defineProperty2 = __webpack_require__(251);
29737 30587
29738 var _defineProperty3 = _interopRequireDefault(_defineProperty2); 30588 var _defineProperty3 = _interopRequireDefault(_defineProperty2);
29739 30589
@@ -29741,19 +30591,19 @@
29741 30591
29742 var _react2 = _interopRequireDefault(_react); 30592 var _react2 = _interopRequireDefault(_react);
29743 30593
29744 var _Header = __webpack_require__(233); 30594 var _Header = __webpack_require__(255);
29745 30595
29746 var _Header2 = _interopRequireDefault(_Header); 30596 var _Header2 = _interopRequireDefault(_Header);
29747 30597
29748 var _Combobox = __webpack_require__(234); 30598 var _Combobox = __webpack_require__(256);
29749 30599
29750 var _Combobox2 = _interopRequireDefault(_Combobox); 30600 var _Combobox2 = _interopRequireDefault(_Combobox);
29751 30601
29752 var _moment = __webpack_require__(177); 30602 var _moment = __webpack_require__(174);
29753 30603
29754 var _moment2 = _interopRequireDefault(_moment); 30604 var _moment2 = _interopRequireDefault(_moment);
29755 30605
29756 var _classnames = __webpack_require__(236); 30606 var _classnames = __webpack_require__(258);
29757 30607
29758 var _classnames2 = _interopRequireDefault(_classnames); 30608 var _classnames2 = _interopRequireDefault(_classnames);
29759 30609
@@ -29790,6 +30640,7 @@
29790 onEsc: _react.PropTypes.func, 30640 onEsc: _react.PropTypes.func,
29791 allowEmpty: _react.PropTypes.bool, 30641 allowEmpty: _react.PropTypes.bool,
29792 showHour: _react.PropTypes.bool, 30642 showHour: _react.PropTypes.bool,
30643 showMinute: _react.PropTypes.bool,
29793 showSecond: _react.PropTypes.bool, 30644 showSecond: _react.PropTypes.bool,
29794 onClear: _react.PropTypes.func, 30645 onClear: _react.PropTypes.func,
29795 addon: _react.PropTypes.func 30646 addon: _react.PropTypes.func
@@ -29837,25 +30688,26 @@
29837 render: function render() { 30688 render: function render() {
29838 var _classNames; 30689 var _classNames;
29839 30690
29840 var _props = this.props; 30691 var _props = this.props,
29841 var prefixCls = _props.prefixCls; 30692 prefixCls = _props.prefixCls,
29842 var className = _props.className; 30693 className = _props.className,
29843 var placeholder = _props.placeholder; 30694 placeholder = _props.placeholder,
29844 var disabledHours = _props.disabledHours; 30695 disabledHours = _props.disabledHours,
29845 var disabledMinutes = _props.disabledMinutes; 30696 disabledMinutes = _props.disabledMinutes,
29846 var disabledSeconds = _props.disabledSeconds; 30697 disabledSeconds = _props.disabledSeconds,
29847 var hideDisabledOptions = _props.hideDisabledOptions; 30698 hideDisabledOptions = _props.hideDisabledOptions,
29848 var allowEmpty = _props.allowEmpty; 30699 allowEmpty = _props.allowEmpty,
29849 var showHour = _props.showHour; 30700 showHour = _props.showHour,
29850 var showSecond = _props.showSecond; 30701 showMinute = _props.showMinute,
29851 var format = _props.format; 30702 showSecond = _props.showSecond,
29852 var defaultOpenValue = _props.defaultOpenValue; 30703 format = _props.format,
29853 var clearText = _props.clearText; 30704 defaultOpenValue = _props.defaultOpenValue,
29854 var onEsc = _props.onEsc; 30705 clearText = _props.clearText,
29855 var addon = _props.addon; 30706 onEsc = _props.onEsc,
29856 var _state = this.state; 30707 addon = _props.addon;
29857 var value = _state.value; 30708 var _state = this.state,
29858 var currentSelectPanel = _state.currentSelectPanel; 30709 value = _state.value,
30710 currentSelectPanel = _state.currentSelectPanel;
29859 30711
29860 var disabledHourOptions = disabledHours(); 30712 var disabledHourOptions = disabledHours();
29861 var disabledMinuteOptions = disabledMinutes(value ? value.hour() : null); 30713 var disabledMinuteOptions = disabledMinutes(value ? value.hour() : null);
@@ -29893,6 +30745,7 @@
29893 format: format, 30745 format: format,
29894 onChange: this.onChange, 30746 onChange: this.onChange,
29895 showHour: showHour, 30747 showHour: showHour,
30748 showMinute: showMinute,
29896 showSecond: showSecond, 30749 showSecond: showSecond,
29897 hourOptions: hourOptions, 30750 hourOptions: hourOptions,
29898 minuteOptions: minuteOptions, 30751 minuteOptions: minuteOptions,
@@ -29911,14 +30764,14 @@
29911 module.exports = exports['default']; 30764 module.exports = exports['default'];
29912 30765
29913/***/ }, 30766/***/ },
29914/* 214 */ 30767/* 251 */
29915/***/ function(module, exports, __webpack_require__) { 30768/***/ function(module, exports, __webpack_require__) {
29916 30769
29917 "use strict"; 30770 "use strict";
29918 30771
29919 exports.__esModule = true; 30772 exports.__esModule = true;
29920 30773
29921 var _defineProperty = __webpack_require__(215); 30774 var _defineProperty = __webpack_require__(252);
29922 30775
29923 var _defineProperty2 = _interopRequireDefault(_defineProperty); 30776 var _defineProperty2 = _interopRequireDefault(_defineProperty);
29924 30777
@@ -29940,270 +30793,31 @@
29940 }; 30793 };
29941 30794
29942/***/ }, 30795/***/ },
29943/* 215 */ 30796/* 252 */
29944/***/ function(module, exports, __webpack_require__) { 30797/***/ function(module, exports, __webpack_require__) {
29945 30798
29946 module.exports = { "default": __webpack_require__(216), __esModule: true }; 30799 module.exports = { "default": __webpack_require__(253), __esModule: true };
29947 30800
29948/***/ }, 30801/***/ },
29949/* 216 */ 30802/* 253 */
29950/***/ function(module, exports, __webpack_require__) { 30803/***/ function(module, exports, __webpack_require__) {
29951 30804
29952 __webpack_require__(217); 30805 __webpack_require__(254);
29953 var $Object = __webpack_require__(220).Object; 30806 var $Object = __webpack_require__(186).Object;
29954 module.exports = function defineProperty(it, key, desc){ 30807 module.exports = function defineProperty(it, key, desc){
29955 return $Object.defineProperty(it, key, desc); 30808 return $Object.defineProperty(it, key, desc);
29956 }; 30809 };
29957 30810
29958/***/ }, 30811/***/ },
29959/* 217 */ 30812/* 254 */
29960/***/ function(module, exports, __webpack_require__) { 30813/***/ function(module, exports, __webpack_require__) {
29961 30814
29962 var $export = __webpack_require__(218); 30815 var $export = __webpack_require__(184);
29963 // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) 30816 // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
29964 $export($export.S + $export.F * !__webpack_require__(228), 'Object', {defineProperty: __webpack_require__(224).f}); 30817 $export($export.S + $export.F * !__webpack_require__(194), 'Object', {defineProperty: __webpack_require__(190).f});
29965 30818
29966/***/ }, 30819/***/ },
29967/* 218 */ 30820/* 255 */
29968/***/ function(module, exports, __webpack_require__) {
29969
29970 var global = __webpack_require__(219)
29971 , core = __webpack_require__(220)
29972 , ctx = __webpack_require__(221)
29973 , hide = __webpack_require__(223)
29974 , PROTOTYPE = 'prototype';
29975
29976 var $export = function(type, name, source){
29977 var IS_FORCED = type & $export.F
29978 , IS_GLOBAL = type & $export.G
29979 , IS_STATIC = type & $export.S
29980 , IS_PROTO = type & $export.P
29981 , IS_BIND = type & $export.B
29982 , IS_WRAP = type & $export.W
29983 , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
29984 , expProto = exports[PROTOTYPE]
29985 , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
29986 , key, own, out;
29987 if(IS_GLOBAL)source = name;
29988 for(key in source){
29989 // contains in native
29990 own = !IS_FORCED && target && target[key] !== undefined;
29991 if(own && key in exports)continue;
29992 // export native or passed
29993 out = own ? target[key] : source[key];
29994 // prevent global pollution for namespaces
29995 exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
29996 // bind timers to global for call from export context
29997 : IS_BIND && own ? ctx(out, global)
29998 // wrap global constructors for prevent change them in library
29999 : IS_WRAP && target[key] == out ? (function(C){
30000 var F = function(a, b, c){
30001 if(this instanceof C){
30002 switch(arguments.length){
30003 case 0: return new C;
30004 case 1: return new C(a);
30005 case 2: return new C(a, b);
30006 } return new C(a, b, c);
30007 } return C.apply(this, arguments);
30008 };
30009 F[PROTOTYPE] = C[PROTOTYPE];
30010 return F;
30011 // make static versions for prototype methods
30012 })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
30013 // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
30014 if(IS_PROTO){
30015 (exports.virtual || (exports.virtual = {}))[key] = out;
30016 // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
30017 if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);
30018 }
30019 }
30020 };
30021 // type bitmap
30022 $export.F = 1; // forced
30023 $export.G = 2; // global
30024 $export.S = 4; // static
30025 $export.P = 8; // proto
30026 $export.B = 16; // bind
30027 $export.W = 32; // wrap
30028 $export.U = 64; // safe
30029 $export.R = 128; // real proto method for `library`
30030 module.exports = $export;
30031
30032/***/ },
30033/* 219 */
30034/***/ function(module, exports) {
30035
30036 // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
30037 var global = module.exports = typeof window != 'undefined' && window.Math == Math
30038 ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
30039 if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
30040
30041/***/ },
30042/* 220 */
30043/***/ function(module, exports) {
30044
30045 var core = module.exports = {version: '2.4.0'};
30046 if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
30047
30048/***/ },
30049/* 221 */
30050/***/ function(module, exports, __webpack_require__) {
30051
30052 // optional / simple context binding
30053 var aFunction = __webpack_require__(222);
30054 module.exports = function(fn, that, length){
30055 aFunction(fn);
30056 if(that === undefined)return fn;
30057 switch(length){
30058 case 1: return function(a){
30059 return fn.call(that, a);
30060 };
30061 case 2: return function(a, b){
30062 return fn.call(that, a, b);
30063 };
30064 case 3: return function(a, b, c){
30065 return fn.call(that, a, b, c);
30066 };
30067 }
30068 return function(/* ...args */){
30069 return fn.apply(that, arguments);
30070 };
30071 };
30072
30073/***/ },
30074/* 222 */
30075/***/ function(module, exports) {
30076
30077 module.exports = function(it){
30078 if(typeof it != 'function')throw TypeError(it + ' is not a function!');
30079 return it;
30080 };
30081
30082/***/ },
30083/* 223 */
30084/***/ function(module, exports, __webpack_require__) {
30085
30086 var dP = __webpack_require__(224)
30087 , createDesc = __webpack_require__(232);
30088 module.exports = __webpack_require__(228) ? function(object, key, value){
30089 return dP.f(object, key, createDesc(1, value));
30090 } : function(object, key, value){
30091 object[key] = value;
30092 return object;
30093 };
30094
30095/***/ },
30096/* 224 */
30097/***/ function(module, exports, __webpack_require__) {
30098
30099 var anObject = __webpack_require__(225)
30100 , IE8_DOM_DEFINE = __webpack_require__(227)
30101 , toPrimitive = __webpack_require__(231)
30102 , dP = Object.defineProperty;
30103
30104 exports.f = __webpack_require__(228) ? Object.defineProperty : function defineProperty(O, P, Attributes){
30105 anObject(O);
30106 P = toPrimitive(P, true);
30107 anObject(Attributes);
30108 if(IE8_DOM_DEFINE)try {
30109 return dP(O, P, Attributes);
30110 } catch(e){ /* empty */ }
30111 if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
30112 if('value' in Attributes)O[P] = Attributes.value;
30113 return O;
30114 };
30115
30116/***/ },
30117/* 225 */
30118/***/ function(module, exports, __webpack_require__) {
30119
30120 var isObject = __webpack_require__(226);
30121 module.exports = function(it){
30122 if(!isObject(it))throw TypeError(it + ' is not an object!');
30123 return it;
30124 };
30125
30126/***/ },
30127/* 226 */
30128/***/ function(module, exports) {
30129
30130 module.exports = function(it){
30131 return typeof it === 'object' ? it !== null : typeof it === 'function';
30132 };
30133
30134/***/ },
30135/* 227 */
30136/***/ function(module, exports, __webpack_require__) {
30137
30138 module.exports = !__webpack_require__(228) && !__webpack_require__(229)(function(){
30139 return Object.defineProperty(__webpack_require__(230)('div'), 'a', {get: function(){ return 7; }}).a != 7;
30140 });
30141
30142/***/ },
30143/* 228 */
30144/***/ function(module, exports, __webpack_require__) {
30145
30146 // Thank's IE8 for his funny defineProperty
30147 module.exports = !__webpack_require__(229)(function(){
30148 return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
30149 });
30150
30151/***/ },
30152/* 229 */
30153/***/ function(module, exports) {
30154
30155 module.exports = function(exec){
30156 try {
30157 return !!exec();
30158 } catch(e){
30159 return true;
30160 }
30161 };
30162
30163/***/ },
30164/* 230 */
30165/***/ function(module, exports, __webpack_require__) {
30166
30167 var isObject = __webpack_require__(226)
30168 , document = __webpack_require__(219).document
30169 // in old IE typeof document.createElement is 'object'
30170 , is = isObject(document) && isObject(document.createElement);
30171 module.exports = function(it){
30172 return is ? document.createElement(it) : {};
30173 };
30174
30175/***/ },
30176/* 231 */
30177/***/ function(module, exports, __webpack_require__) {
30178
30179 // 7.1.1 ToPrimitive(input [, PreferredType])
30180 var isObject = __webpack_require__(226);
30181 // instead of the ES6 spec version, we didn't implement @@toPrimitive case
30182 // and the second argument - flag - preferred type is a string
30183 module.exports = function(it, S){
30184 if(!isObject(it))return it;
30185 var fn, val;
30186 if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
30187 if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
30188 if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
30189 throw TypeError("Can't convert object to primitive value");
30190 };
30191
30192/***/ },
30193/* 232 */
30194/***/ function(module, exports) {
30195
30196 module.exports = function(bitmap, value){
30197 return {
30198 enumerable : !(bitmap & 1),
30199 configurable: !(bitmap & 2),
30200 writable : !(bitmap & 4),
30201 value : value
30202 };
30203 };
30204
30205/***/ },
30206/* 233 */
30207/***/ function(module, exports, __webpack_require__) { 30821/***/ function(module, exports, __webpack_require__) {
30208 30822
30209 'use strict'; 30823 'use strict';
@@ -30216,7 +30830,7 @@
30216 30830
30217 var _react2 = _interopRequireDefault(_react); 30831 var _react2 = _interopRequireDefault(_react);
30218 30832
30219 var _moment = __webpack_require__(177); 30833 var _moment = __webpack_require__(174);
30220 30834
30221 var _moment2 = _interopRequireDefault(_moment); 30835 var _moment2 = _interopRequireDefault(_moment);
30222 30836
@@ -30247,9 +30861,9 @@
30247 }, 30861 },
30248 30862
30249 getInitialState: function getInitialState() { 30863 getInitialState: function getInitialState() {
30250 var _props = this.props; 30864 var _props = this.props,
30251 var value = _props.value; 30865 value = _props.value,
30252 var format = _props.format; 30866 format = _props.format;
30253 30867
30254 return { 30868 return {
30255 str: value && value.format(format) || '', 30869 str: value && value.format(format) || '',
@@ -30257,8 +30871,8 @@
30257 }; 30871 };
30258 }, 30872 },
30259 componentWillReceiveProps: function componentWillReceiveProps(nextProps) { 30873 componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
30260 var value = nextProps.value; 30874 var value = nextProps.value,
30261 var format = nextProps.format; 30875 format = nextProps.format;
30262 30876
30263 this.setState({ 30877 this.setState({
30264 str: value && value.format(format) || '', 30878 str: value && value.format(format) || '',
@@ -30270,16 +30884,16 @@
30270 this.setState({ 30884 this.setState({
30271 str: str 30885 str: str
30272 }); 30886 });
30273 var _props2 = this.props; 30887 var _props2 = this.props,
30274 var format = _props2.format; 30888 format = _props2.format,
30275 var hourOptions = _props2.hourOptions; 30889 hourOptions = _props2.hourOptions,
30276 var minuteOptions = _props2.minuteOptions; 30890 minuteOptions = _props2.minuteOptions,
30277 var secondOptions = _props2.secondOptions; 30891 secondOptions = _props2.secondOptions,
30278 var disabledHours = _props2.disabledHours; 30892 disabledHours = _props2.disabledHours,
30279 var disabledMinutes = _props2.disabledMinutes; 30893 disabledMinutes = _props2.disabledMinutes,
30280 var disabledSeconds = _props2.disabledSeconds; 30894 disabledSeconds = _props2.disabledSeconds,
30281 var onChange = _props2.onChange; 30895 onChange = _props2.onChange,
30282 var allowEmpty = _props2.allowEmpty; 30896 allowEmpty = _props2.allowEmpty;
30283 30897
30284 30898
30285 if (str) { 30899 if (str) {
@@ -30348,9 +30962,9 @@
30348 this.props.onClear(); 30962 this.props.onClear();
30349 }, 30963 },
30350 getClearButton: function getClearButton() { 30964 getClearButton: function getClearButton() {
30351 var _props3 = this.props; 30965 var _props3 = this.props,
30352 var prefixCls = _props3.prefixCls; 30966 prefixCls = _props3.prefixCls,
30353 var allowEmpty = _props3.allowEmpty; 30967 allowEmpty = _props3.allowEmpty;
30354 30968
30355 if (!allowEmpty) { 30969 if (!allowEmpty) {
30356 return null; 30970 return null;
@@ -30366,12 +30980,12 @@
30366 return this.props.value || this.props.defaultOpenValue; 30980 return this.props.value || this.props.defaultOpenValue;
30367 }, 30981 },
30368 getInput: function getInput() { 30982 getInput: function getInput() {
30369 var _props4 = this.props; 30983 var _props4 = this.props,
30370 var prefixCls = _props4.prefixCls; 30984 prefixCls = _props4.prefixCls,
30371 var placeholder = _props4.placeholder; 30985 placeholder = _props4.placeholder;
30372 var _state = this.state; 30986 var _state = this.state,
30373 var invalid = _state.invalid; 30987 invalid = _state.invalid,
30374 var str = _state.str; 30988 str = _state.str;
30375 30989
30376 var invalidClass = invalid ? prefixCls + '-input-invalid' : ''; 30990 var invalidClass = invalid ? prefixCls + '-input-invalid' : '';
30377 return _react2.default.createElement('input', { 30991 return _react2.default.createElement('input', {
@@ -30399,7 +31013,7 @@
30399 module.exports = exports['default']; 31013 module.exports = exports['default'];
30400 31014
30401/***/ }, 31015/***/ },
30402/* 234 */ 31016/* 256 */
30403/***/ function(module, exports, __webpack_require__) { 31017/***/ function(module, exports, __webpack_require__) {
30404 31018
30405 'use strict'; 31019 'use strict';
@@ -30412,7 +31026,7 @@
30412 31026
30413 var _react2 = _interopRequireDefault(_react); 31027 var _react2 = _interopRequireDefault(_react);
30414 31028
30415 var _Select = __webpack_require__(235); 31029 var _Select = __webpack_require__(257);
30416 31030
30417 var _Select2 = _interopRequireDefault(_Select); 31031 var _Select2 = _interopRequireDefault(_Select);
30418 31032
@@ -30445,6 +31059,7 @@
30445 value: _react.PropTypes.object, 31059 value: _react.PropTypes.object,
30446 onChange: _react.PropTypes.func, 31060 onChange: _react.PropTypes.func,
30447 showHour: _react.PropTypes.bool, 31061 showHour: _react.PropTypes.bool,
31062 showMinute: _react.PropTypes.bool,
30448 showSecond: _react.PropTypes.bool, 31063 showSecond: _react.PropTypes.bool,
30449 hourOptions: _react.PropTypes.array, 31064 hourOptions: _react.PropTypes.array,
30450 minuteOptions: _react.PropTypes.array, 31065 minuteOptions: _react.PropTypes.array,
@@ -30456,9 +31071,9 @@
30456 }, 31071 },
30457 31072
30458 onItemChange: function onItemChange(type, itemValue) { 31073 onItemChange: function onItemChange(type, itemValue) {
30459 var _props = this.props; 31074 var _props = this.props,
30460 var onChange = _props.onChange; 31075 onChange = _props.onChange,
30461 var defaultOpenValue = _props.defaultOpenValue; 31076 defaultOpenValue = _props.defaultOpenValue;
30462 31077
30463 var value = (this.props.value || defaultOpenValue).clone(); 31078 var value = (this.props.value || defaultOpenValue).clone();
30464 if (type === 'hour') { 31079 if (type === 'hour') {
@@ -30474,11 +31089,11 @@
30474 this.props.onCurrentSelectPanelChange(range); 31089 this.props.onCurrentSelectPanelChange(range);
30475 }, 31090 },
30476 getHourSelect: function getHourSelect(hour) { 31091 getHourSelect: function getHourSelect(hour) {
30477 var _props2 = this.props; 31092 var _props2 = this.props,
30478 var prefixCls = _props2.prefixCls; 31093 prefixCls = _props2.prefixCls,
30479 var hourOptions = _props2.hourOptions; 31094 hourOptions = _props2.hourOptions,
30480 var disabledHours = _props2.disabledHours; 31095 disabledHours = _props2.disabledHours,
30481 var showHour = _props2.showHour; 31096 showHour = _props2.showHour;
30482 31097
30483 if (!showHour) { 31098 if (!showHour) {
30484 return null; 31099 return null;
@@ -30497,12 +31112,16 @@
30497 }); 31112 });
30498 }, 31113 },
30499 getMinuteSelect: function getMinuteSelect(minute) { 31114 getMinuteSelect: function getMinuteSelect(minute) {
30500 var _props3 = this.props; 31115 var _props3 = this.props,
30501 var prefixCls = _props3.prefixCls; 31116 prefixCls = _props3.prefixCls,
30502 var minuteOptions = _props3.minuteOptions; 31117 minuteOptions = _props3.minuteOptions,
30503 var disabledMinutes = _props3.disabledMinutes; 31118 disabledMinutes = _props3.disabledMinutes,
30504 var defaultOpenValue = _props3.defaultOpenValue; 31119 defaultOpenValue = _props3.defaultOpenValue,
30505 31120 showMinute = _props3.showMinute;
31121
31122 if (!showMinute) {
31123 return null;
31124 }
30506 var value = this.props.value || defaultOpenValue; 31125 var value = this.props.value || defaultOpenValue;
30507 var disabledOptions = disabledMinutes(value.hour()); 31126 var disabledOptions = disabledMinutes(value.hour());
30508 31127
@@ -30518,12 +31137,12 @@
30518 }); 31137 });
30519 }, 31138 },
30520 getSecondSelect: function getSecondSelect(second) { 31139 getSecondSelect: function getSecondSelect(second) {
30521 var _props4 = this.props; 31140 var _props4 = this.props,
30522 var prefixCls = _props4.prefixCls; 31141 prefixCls = _props4.prefixCls,
30523 var secondOptions = _props4.secondOptions; 31142 secondOptions = _props4.secondOptions,
30524 var disabledSeconds = _props4.disabledSeconds; 31143 disabledSeconds = _props4.disabledSeconds,
30525 var showSecond = _props4.showSecond; 31144 showSecond = _props4.showSecond,
30526 var defaultOpenValue = _props4.defaultOpenValue; 31145 defaultOpenValue = _props4.defaultOpenValue;
30527 31146
30528 if (!showSecond) { 31147 if (!showSecond) {
30529 return null; 31148 return null;
@@ -30543,9 +31162,9 @@
30543 }); 31162 });
30544 }, 31163 },
30545 render: function render() { 31164 render: function render() {
30546 var _props5 = this.props; 31165 var _props5 = this.props,
30547 var prefixCls = _props5.prefixCls; 31166 prefixCls = _props5.prefixCls,
30548 var defaultOpenValue = _props5.defaultOpenValue; 31167 defaultOpenValue = _props5.defaultOpenValue;
30549 31168
30550 var value = this.props.value || defaultOpenValue; 31169 var value = this.props.value || defaultOpenValue;
30551 return _react2.default.createElement( 31170 return _react2.default.createElement(
@@ -30562,7 +31181,7 @@
30562 module.exports = exports['default']; 31181 module.exports = exports['default'];
30563 31182
30564/***/ }, 31183/***/ },
30565/* 235 */ 31184/* 257 */
30566/***/ function(module, exports, __webpack_require__) { 31185/***/ function(module, exports, __webpack_require__) {
30567 31186
30568 'use strict'; 31187 'use strict';
@@ -30571,7 +31190,7 @@
30571 value: true 31190 value: true
30572 }); 31191 });
30573 31192
30574 var _defineProperty2 = __webpack_require__(214); 31193 var _defineProperty2 = __webpack_require__(251);
30575 31194
30576 var _defineProperty3 = _interopRequireDefault(_defineProperty2); 31195 var _defineProperty3 = _interopRequireDefault(_defineProperty2);
30577 31196
@@ -30579,11 +31198,11 @@
30579 31198
30580 var _react2 = _interopRequireDefault(_react); 31199 var _react2 = _interopRequireDefault(_react);
30581 31200
30582 var _reactDom = __webpack_require__(37); 31201 var _reactDom = __webpack_require__(36);
30583 31202
30584 var _reactDom2 = _interopRequireDefault(_reactDom); 31203 var _reactDom2 = _interopRequireDefault(_reactDom);
30585 31204
30586 var _classnames2 = __webpack_require__(236); 31205 var _classnames2 = __webpack_require__(258);
30587 31206
30588 var _classnames3 = _interopRequireDefault(_classnames2); 31207 var _classnames3 = _interopRequireDefault(_classnames2);
30589 31208
@@ -30631,19 +31250,19 @@
30631 } 31250 }
30632 }, 31251 },
30633 onSelect: function onSelect(value) { 31252 onSelect: function onSelect(value) {
30634 var _props = this.props; 31253 var _props = this.props,
30635 var onSelect = _props.onSelect; 31254 onSelect = _props.onSelect,
30636 var type = _props.type; 31255 type = _props.type;
30637 31256
30638 onSelect(type, value); 31257 onSelect(type, value);
30639 }, 31258 },
30640 getOptions: function getOptions() { 31259 getOptions: function getOptions() {
30641 var _this = this; 31260 var _this = this;
30642 31261
30643 var _props2 = this.props; 31262 var _props2 = this.props,
30644 var options = _props2.options; 31263 options = _props2.options,
30645 var selectedIndex = _props2.selectedIndex; 31264 selectedIndex = _props2.selectedIndex,
30646 var prefixCls = _props2.prefixCls; 31265 prefixCls = _props2.prefixCls;
30647 31266
30648 return options.map(function (item, index) { 31267 return options.map(function (item, index) {
30649 var _classnames; 31268 var _classnames;
@@ -30669,6 +31288,9 @@
30669 // move to selected item 31288 // move to selected item
30670 var select = _reactDom2.default.findDOMNode(this); 31289 var select = _reactDom2.default.findDOMNode(this);
30671 var list = _reactDom2.default.findDOMNode(this.refs.list); 31290 var list = _reactDom2.default.findDOMNode(this.refs.list);
31291 if (!list) {
31292 return;
31293 }
30672 var index = this.props.selectedIndex; 31294 var index = this.props.selectedIndex;
30673 if (index < 0) { 31295 if (index < 0) {
30674 index = 0; 31296 index = 0;
@@ -30704,7 +31326,7 @@
30704 module.exports = exports['default']; 31326 module.exports = exports['default'];
30705 31327
30706/***/ }, 31328/***/ },
30707/* 236 */ 31329/* 258 */
30708/***/ function(module, exports, __webpack_require__) { 31330/***/ function(module, exports, __webpack_require__) {
30709 31331
30710 var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! 31332 var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
@@ -30758,7 +31380,7 @@
30758 31380
30759 31381
30760/***/ }, 31382/***/ },
30761/* 237 */ 31383/* 259 */
30762/***/ function(module, exports) { 31384/***/ function(module, exports) {
30763 31385
30764 'use strict'; 31386 'use strict';