react-source 0.5.2 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
data/build/react.js CHANGED
@@ -1,8 +1,7 @@
1
1
  /**
2
- * React v0.5.2
2
+ * React v0.8.0
3
3
  */
4
- !function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.React=e():"undefined"!=typeof global?global.React=e():"undefined"!=typeof self&&(self.React=e())}(function(){var define,module,exports;
5
- return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
4
+ !function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.React=e():"undefined"!=typeof global?global.React=e():"undefined"!=typeof self&&(self.React=e())}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
6
5
  /**
7
6
  * Copyright 2013 Facebook, Inc.
8
7
  *
@@ -50,7 +49,7 @@ function $(id) {
50
49
 
51
50
  module.exports = $;
52
51
 
53
- },{"./ex":83,"./ge":87}],2:[function(require,module,exports){
52
+ },{"./ex":85,"./ge":89}],2:[function(require,module,exports){
54
53
  /**
55
54
  * Copyright 2013 Facebook, Inc.
56
55
  *
@@ -241,7 +240,7 @@ var CSSPropertyOperations = {
241
240
 
242
241
  module.exports = CSSPropertyOperations;
243
242
 
244
- },{"./CSSProperty":2,"./dangerousStyleValue":80,"./escapeTextForBrowser":82,"./hyphenate":94,"./memoizeStringOnly":103}],4:[function(require,module,exports){
243
+ },{"./CSSProperty":2,"./dangerousStyleValue":82,"./escapeTextForBrowser":84,"./hyphenate":97,"./memoizeStringOnly":106}],4:[function(require,module,exports){
245
244
  /**
246
245
  * Copyright 2013 Facebook, Inc.
247
246
  *
@@ -701,7 +700,7 @@ var ChangeEventPlugin = {
701
700
 
702
701
  module.exports = ChangeEventPlugin;
703
702
 
704
- },{"./EventConstants":14,"./EventPluginHub":16,"./EventPropagators":19,"./ExecutionEnvironment":20,"./SyntheticEvent":65,"./isEventSupported":96,"./isTextInputElement":98,"./keyOf":102}],6:[function(require,module,exports){
703
+ },{"./EventConstants":14,"./EventPluginHub":16,"./EventPropagators":19,"./ExecutionEnvironment":20,"./SyntheticEvent":66,"./isEventSupported":99,"./isTextInputElement":101,"./keyOf":105}],6:[function(require,module,exports){
705
704
  /**
706
705
  * Copyright 2013 Facebook, Inc.
707
706
  *
@@ -915,7 +914,7 @@ var CompositionEventPlugin = {
915
914
 
916
915
  module.exports = CompositionEventPlugin;
917
916
 
918
- },{"./EventConstants":14,"./EventPropagators":19,"./ExecutionEnvironment":20,"./ReactInputSelection":46,"./SyntheticCompositionEvent":64,"./getTextContentAccessor":93,"./keyOf":102}],7:[function(require,module,exports){
917
+ },{"./EventConstants":14,"./EventPropagators":19,"./ExecutionEnvironment":20,"./ReactInputSelection":47,"./SyntheticCompositionEvent":65,"./getTextContentAccessor":95,"./keyOf":105}],7:[function(require,module,exports){
919
918
  /**
920
919
  * Copyright 2013 Facebook, Inc.
921
920
  *
@@ -1052,7 +1051,7 @@ var DOMChildrenOperations = {
1052
1051
 
1053
1052
  module.exports = DOMChildrenOperations;
1054
1053
 
1055
- },{"./Danger":10,"./ReactMultiChildUpdateTypes":52,"./getTextContentAccessor":93}],8:[function(require,module,exports){
1054
+ },{"./Danger":10,"./ReactMultiChildUpdateTypes":53,"./getTextContentAccessor":95}],8:[function(require,module,exports){
1056
1055
  /**
1057
1056
  * Copyright 2013 Facebook, Inc.
1058
1057
  *
@@ -1084,9 +1083,10 @@ var DOMPropertyInjection = {
1084
1083
  * specifies how the associated DOM property should be accessed or rendered.
1085
1084
  */
1086
1085
  MUST_USE_ATTRIBUTE: 0x1,
1087
- MUST_USE_PROPERTY: 0x2,
1088
- HAS_BOOLEAN_VALUE: 0x4,
1089
- HAS_SIDE_EFFECTS: 0x8,
1086
+ MUST_USE_PROPERTY: 0x2,
1087
+ HAS_SIDE_EFFECTS: 0x4,
1088
+ HAS_BOOLEAN_VALUE: 0x8,
1089
+ HAS_POSITIVE_NUMERIC_VALUE: 0x10,
1090
1090
 
1091
1091
  /**
1092
1092
  * Inject some specialized knowledge about the DOM. This takes a config object
@@ -1126,14 +1126,14 @@ var DOMPropertyInjection = {
1126
1126
  }
1127
1127
 
1128
1128
  for (var propName in Properties) {
1129
- invariant(
1129
+ ("production" !== "development" ? invariant(
1130
1130
  !DOMProperty.isStandardName[propName],
1131
1131
  'injectDOMPropertyConfig(...): You\'re trying to inject DOM property ' +
1132
1132
  '\'%s\' which has already been injected. You may be accidentally ' +
1133
1133
  'injecting the same DOM property config twice, or you may be ' +
1134
1134
  'injecting two configs that have conflicting property names.',
1135
1135
  propName
1136
- );
1136
+ ) : invariant(!DOMProperty.isStandardName[propName]));
1137
1137
 
1138
1138
  DOMProperty.isStandardName[propName] = true;
1139
1139
 
@@ -1160,23 +1160,34 @@ var DOMPropertyInjection = {
1160
1160
  propConfig & DOMPropertyInjection.MUST_USE_ATTRIBUTE;
1161
1161
  DOMProperty.mustUseProperty[propName] =
1162
1162
  propConfig & DOMPropertyInjection.MUST_USE_PROPERTY;
1163
- DOMProperty.hasBooleanValue[propName] =
1164
- propConfig & DOMPropertyInjection.HAS_BOOLEAN_VALUE;
1165
1163
  DOMProperty.hasSideEffects[propName] =
1166
1164
  propConfig & DOMPropertyInjection.HAS_SIDE_EFFECTS;
1165
+ DOMProperty.hasBooleanValue[propName] =
1166
+ propConfig & DOMPropertyInjection.HAS_BOOLEAN_VALUE;
1167
+ DOMProperty.hasPositiveNumericValue[propName] =
1168
+ propConfig & DOMPropertyInjection.HAS_POSITIVE_NUMERIC_VALUE;
1167
1169
 
1168
- invariant(
1170
+ ("production" !== "development" ? invariant(
1169
1171
  !DOMProperty.mustUseAttribute[propName] ||
1170
1172
  !DOMProperty.mustUseProperty[propName],
1171
- 'DOMProperty: Cannot use require using both attribute and property: %s',
1173
+ 'DOMProperty: Cannot require using both attribute and property: %s',
1172
1174
  propName
1173
- );
1174
- invariant(
1175
+ ) : invariant(!DOMProperty.mustUseAttribute[propName] ||
1176
+ !DOMProperty.mustUseProperty[propName]));
1177
+ ("production" !== "development" ? invariant(
1175
1178
  DOMProperty.mustUseProperty[propName] ||
1176
1179
  !DOMProperty.hasSideEffects[propName],
1177
1180
  'DOMProperty: Properties that have side effects must use property: %s',
1178
1181
  propName
1179
- );
1182
+ ) : invariant(DOMProperty.mustUseProperty[propName] ||
1183
+ !DOMProperty.hasSideEffects[propName]));
1184
+ ("production" !== "development" ? invariant(
1185
+ !DOMProperty.hasBooleanValue[propName] ||
1186
+ !DOMProperty.hasPositiveNumericValue[propName],
1187
+ 'DOMProperty: Cannot have both boolean and positive numeric value: %s',
1188
+ propName
1189
+ ) : invariant(!DOMProperty.hasBooleanValue[propName] ||
1190
+ !DOMProperty.hasPositiveNumericValue[propName]));
1180
1191
  }
1181
1192
  }
1182
1193
  };
@@ -1244,6 +1255,14 @@ var DOMProperty = {
1244
1255
  */
1245
1256
  mustUseProperty: {},
1246
1257
 
1258
+ /**
1259
+ * Whether or not setting a value causes side effects such as triggering
1260
+ * resources to be loaded or text selection changes. We must ensure that
1261
+ * the value is only set if it has changed.
1262
+ * @type {Object}
1263
+ */
1264
+ hasSideEffects: {},
1265
+
1247
1266
  /**
1248
1267
  * Whether the property should be removed when set to a falsey value.
1249
1268
  * @type {Object}
@@ -1251,12 +1270,11 @@ var DOMProperty = {
1251
1270
  hasBooleanValue: {},
1252
1271
 
1253
1272
  /**
1254
- * Whether or not setting a value causes side effects such as triggering
1255
- * resources to be loaded or text selection changes. We must ensure that
1256
- * the value is only set if it has changed.
1273
+ * Whether the property must be positive numeric or parse as a positive
1274
+ * numeric and should be removed when set to a falsey value.
1257
1275
  * @type {Object}
1258
1276
  */
1259
- hasSideEffects: {},
1277
+ hasPositiveNumericValue: {},
1260
1278
 
1261
1279
  /**
1262
1280
  * All of the isCustomAttribute() functions that have been injected.
@@ -1301,7 +1319,7 @@ var DOMProperty = {
1301
1319
 
1302
1320
  module.exports = DOMProperty;
1303
1321
 
1304
- },{"./invariant":95}],9:[function(require,module,exports){
1322
+ },{"./invariant":98}],9:[function(require,module,exports){
1305
1323
  /**
1306
1324
  * Copyright 2013 Facebook, Inc.
1307
1325
  *
@@ -1328,11 +1346,17 @@ var DOMProperty = require("./DOMProperty");
1328
1346
  var escapeTextForBrowser = require("./escapeTextForBrowser");
1329
1347
  var memoizeStringOnly = require("./memoizeStringOnly");
1330
1348
 
1349
+ function shouldIgnoreValue(name, value) {
1350
+ return value == null ||
1351
+ DOMProperty.hasBooleanValue[name] && !value ||
1352
+ DOMProperty.hasPositiveNumericValue[name] && (isNaN(value) || value < 1);
1353
+ }
1354
+
1331
1355
  var processAttributeNameAndPrefix = memoizeStringOnly(function(name) {
1332
1356
  return escapeTextForBrowser(name) + '="';
1333
1357
  });
1334
1358
 
1335
- if (true) {
1359
+ if ("production" !== "development") {
1336
1360
  var reactProps = {
1337
1361
  __owner__: true,
1338
1362
  children: true,
@@ -1379,7 +1403,7 @@ var DOMPropertyOperations = {
1379
1403
  */
1380
1404
  createMarkupForProperty: function(name, value) {
1381
1405
  if (DOMProperty.isStandardName[name]) {
1382
- if (value == null || DOMProperty.hasBooleanValue[name] && !value) {
1406
+ if (shouldIgnoreValue(name, value)) {
1383
1407
  return '';
1384
1408
  }
1385
1409
  var attributeName = DOMProperty.getAttributeName[name];
@@ -1391,7 +1415,7 @@ var DOMPropertyOperations = {
1391
1415
  }
1392
1416
  return processAttributeNameAndPrefix(name) +
1393
1417
  escapeTextForBrowser(value) + '"';
1394
- } else if (true) {
1418
+ } else if ("production" !== "development") {
1395
1419
  warnUnknownProperty(name);
1396
1420
  }
1397
1421
  return null;
@@ -1409,12 +1433,10 @@ var DOMPropertyOperations = {
1409
1433
  var mutationMethod = DOMProperty.getMutationMethod[name];
1410
1434
  if (mutationMethod) {
1411
1435
  mutationMethod(node, value);
1436
+ } else if (shouldIgnoreValue(name, value)) {
1437
+ this.deleteValueForProperty(node, name);
1412
1438
  } else if (DOMProperty.mustUseAttribute[name]) {
1413
- if (DOMProperty.hasBooleanValue[name] && !value) {
1414
- node.removeAttribute(DOMProperty.getAttributeName[name]);
1415
- } else {
1416
- node.setAttribute(DOMProperty.getAttributeName[name], '' + value);
1417
- }
1439
+ node.setAttribute(DOMProperty.getAttributeName[name], '' + value);
1418
1440
  } else {
1419
1441
  var propName = DOMProperty.getPropertyName[name];
1420
1442
  if (!DOMProperty.hasSideEffects[name] || node[propName] !== value) {
@@ -1422,8 +1444,12 @@ var DOMPropertyOperations = {
1422
1444
  }
1423
1445
  }
1424
1446
  } else if (DOMProperty.isCustomAttribute(name)) {
1425
- node.setAttribute(name, '' + value);
1426
- } else if (true) {
1447
+ if (value == null) {
1448
+ node.removeAttribute(DOMProperty.getAttributeName[name]);
1449
+ } else {
1450
+ node.setAttribute(name, '' + value);
1451
+ }
1452
+ } else if ("production" !== "development") {
1427
1453
  warnUnknownProperty(name);
1428
1454
  }
1429
1455
  },
@@ -1443,14 +1469,18 @@ var DOMPropertyOperations = {
1443
1469
  node.removeAttribute(DOMProperty.getAttributeName[name]);
1444
1470
  } else {
1445
1471
  var propName = DOMProperty.getPropertyName[name];
1446
- node[propName] = DOMProperty.getDefaultValueForProperty(
1472
+ var defaultValue = DOMProperty.getDefaultValueForProperty(
1447
1473
  node.nodeName,
1448
1474
  name
1449
1475
  );
1476
+ if (!DOMProperty.hasSideEffects[name] ||
1477
+ node[propName] !== defaultValue) {
1478
+ node[propName] = defaultValue;
1479
+ }
1450
1480
  }
1451
1481
  } else if (DOMProperty.isCustomAttribute(name)) {
1452
1482
  node.removeAttribute(name);
1453
- } else if (true) {
1483
+ } else if ("production" !== "development") {
1454
1484
  warnUnknownProperty(name);
1455
1485
  }
1456
1486
  }
@@ -1459,7 +1489,7 @@ var DOMPropertyOperations = {
1459
1489
 
1460
1490
  module.exports = DOMPropertyOperations;
1461
1491
 
1462
- },{"./DOMProperty":8,"./escapeTextForBrowser":82,"./memoizeStringOnly":103}],10:[function(require,module,exports){
1492
+ },{"./DOMProperty":8,"./escapeTextForBrowser":84,"./memoizeStringOnly":106}],10:[function(require,module,exports){
1463
1493
  /**
1464
1494
  * Copyright 2013 Facebook, Inc.
1465
1495
  *
@@ -1521,20 +1551,20 @@ var Danger = {
1521
1551
  * @internal
1522
1552
  */
1523
1553
  dangerouslyRenderMarkup: function(markupList) {
1524
- invariant(
1554
+ ("production" !== "development" ? invariant(
1525
1555
  ExecutionEnvironment.canUseDOM,
1526
1556
  'dangerouslyRenderMarkup(...): Cannot render markup in a Worker ' +
1527
1557
  'thread. This is likely a bug in the framework. Please report ' +
1528
1558
  'immediately.'
1529
- );
1559
+ ) : invariant(ExecutionEnvironment.canUseDOM));
1530
1560
  var nodeName;
1531
1561
  var markupByNodeName = {};
1532
1562
  // Group markup by `nodeName` if a wrap is necessary, else by '*'.
1533
1563
  for (var i = 0; i < markupList.length; i++) {
1534
- invariant(
1564
+ ("production" !== "development" ? invariant(
1535
1565
  markupList[i],
1536
1566
  'dangerouslyRenderMarkup(...): Missing markup.'
1537
- );
1567
+ ) : invariant(markupList[i]));
1538
1568
  nodeName = getNodeName(markupList[i]);
1539
1569
  nodeName = getMarkupWrap(nodeName) ? nodeName : '*';
1540
1570
  markupByNodeName[nodeName] = markupByNodeName[nodeName] || [];
@@ -1580,10 +1610,10 @@ var Danger = {
1580
1610
  resultIndex = +renderNode.getAttribute(RESULT_INDEX_ATTR);
1581
1611
  renderNode.removeAttribute(RESULT_INDEX_ATTR);
1582
1612
 
1583
- invariant(
1613
+ ("production" !== "development" ? invariant(
1584
1614
  !resultList.hasOwnProperty(resultIndex),
1585
1615
  'Danger: Assigning to an already-occupied result index.'
1586
- );
1616
+ ) : invariant(!resultList.hasOwnProperty(resultIndex)));
1587
1617
 
1588
1618
  resultList[resultIndex] = renderNode;
1589
1619
 
@@ -1591,7 +1621,7 @@ var Danger = {
1591
1621
  // we're done.
1592
1622
  resultListAssignmentCount += 1;
1593
1623
 
1594
- } else if (true) {
1624
+ } else if ("production" !== "development") {
1595
1625
  console.error(
1596
1626
  "Danger: Discarding unexpected node:",
1597
1627
  renderNode
@@ -1602,17 +1632,17 @@ var Danger = {
1602
1632
 
1603
1633
  // Although resultList was populated out of order, it should now be a dense
1604
1634
  // array.
1605
- invariant(
1635
+ ("production" !== "development" ? invariant(
1606
1636
  resultListAssignmentCount === resultList.length,
1607
1637
  'Danger: Did not assign to every index of resultList.'
1608
- );
1638
+ ) : invariant(resultListAssignmentCount === resultList.length));
1609
1639
 
1610
- invariant(
1640
+ ("production" !== "development" ? invariant(
1611
1641
  resultList.length === markupList.length,
1612
1642
  'Danger: Expected markup to render %s nodes, but rendered %s.',
1613
1643
  markupList.length,
1614
1644
  resultList.length
1615
- );
1645
+ ) : invariant(resultList.length === markupList.length));
1616
1646
 
1617
1647
  return resultList;
1618
1648
  },
@@ -1626,13 +1656,13 @@ var Danger = {
1626
1656
  * @internal
1627
1657
  */
1628
1658
  dangerouslyReplaceNodeWithMarkup: function(oldChild, markup) {
1629
- invariant(
1659
+ ("production" !== "development" ? invariant(
1630
1660
  ExecutionEnvironment.canUseDOM,
1631
1661
  'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a ' +
1632
1662
  'worker thread. This is likely a bug in the framework. Please report ' +
1633
1663
  'immediately.'
1634
- );
1635
- invariant(markup, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.');
1664
+ ) : invariant(ExecutionEnvironment.canUseDOM));
1665
+ ("production" !== "development" ? invariant(markup, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : invariant(markup));
1636
1666
  // createNodesFromMarkup() won't work if the markup is rooted by <html>
1637
1667
  // since it has special semantic meaning. So we use an alternatie strategy.
1638
1668
  if (oldChild.tagName.toLowerCase() === 'html') {
@@ -1647,7 +1677,7 @@ var Danger = {
1647
1677
 
1648
1678
  module.exports = Danger;
1649
1679
 
1650
- },{"./ExecutionEnvironment":20,"./createNodesFromMarkup":78,"./emptyFunction":81,"./getMarkupWrap":90,"./invariant":95,"./mutateHTMLNodeWithMarkup":108}],11:[function(require,module,exports){
1680
+ },{"./ExecutionEnvironment":20,"./createNodesFromMarkup":80,"./emptyFunction":83,"./getMarkupWrap":92,"./invariant":98,"./mutateHTMLNodeWithMarkup":111}],11:[function(require,module,exports){
1651
1681
  /**
1652
1682
  * Copyright 2013 Facebook, Inc.
1653
1683
  *
@@ -1676,6 +1706,8 @@ var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE;
1676
1706
  var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
1677
1707
  var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
1678
1708
  var HAS_SIDE_EFFECTS = DOMProperty.injection.HAS_SIDE_EFFECTS;
1709
+ var HAS_POSITIVE_NUMERIC_VALUE =
1710
+ DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
1679
1711
 
1680
1712
  var DefaultDOMPropertyConfig = {
1681
1713
  isCustomAttribute: RegExp.prototype.test.bind(
@@ -1691,6 +1723,7 @@ var DefaultDOMPropertyConfig = {
1691
1723
  allowFullScreen: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
1692
1724
  allowTransparency: MUST_USE_ATTRIBUTE,
1693
1725
  alt: null,
1726
+ async: HAS_BOOLEAN_VALUE,
1694
1727
  autoComplete: null,
1695
1728
  autoFocus: HAS_BOOLEAN_VALUE,
1696
1729
  autoPlay: HAS_BOOLEAN_VALUE,
@@ -1699,6 +1732,7 @@ var DefaultDOMPropertyConfig = {
1699
1732
  charSet: MUST_USE_ATTRIBUTE,
1700
1733
  checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
1701
1734
  className: MUST_USE_PROPERTY,
1735
+ cols: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,
1702
1736
  colSpan: null,
1703
1737
  content: null,
1704
1738
  contentEditable: null,
@@ -1706,6 +1740,7 @@ var DefaultDOMPropertyConfig = {
1706
1740
  controls: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
1707
1741
  data: null, // For `<object />` acts as `src`.
1708
1742
  dateTime: MUST_USE_ATTRIBUTE,
1743
+ defer: HAS_BOOLEAN_VALUE,
1709
1744
  dir: null,
1710
1745
  disabled: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
1711
1746
  draggable: null,
@@ -1722,6 +1757,7 @@ var DefaultDOMPropertyConfig = {
1722
1757
  label: null,
1723
1758
  lang: null,
1724
1759
  list: null,
1760
+ loop: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
1725
1761
  max: null,
1726
1762
  maxLength: MUST_USE_ATTRIBUTE,
1727
1763
  method: null,
@@ -1737,11 +1773,12 @@ var DefaultDOMPropertyConfig = {
1737
1773
  rel: null,
1738
1774
  required: HAS_BOOLEAN_VALUE,
1739
1775
  role: MUST_USE_ATTRIBUTE,
1776
+ rows: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,
1740
1777
  rowSpan: null,
1741
1778
  scrollLeft: MUST_USE_PROPERTY,
1742
1779
  scrollTop: MUST_USE_PROPERTY,
1743
1780
  selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
1744
- size: null,
1781
+ size: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,
1745
1782
  spellCheck: null,
1746
1783
  src: null,
1747
1784
  step: null,
@@ -1758,6 +1795,7 @@ var DefaultDOMPropertyConfig = {
1758
1795
  * Non-standard Properties
1759
1796
  */
1760
1797
  autoCapitalize: null, // Supported in Mobile Safari for keyboard hints
1798
+ autoCorrect: null, // Supported in Mobile Safari for keyboard hints
1761
1799
 
1762
1800
  /**
1763
1801
  * SVG Properties
@@ -1806,6 +1844,7 @@ var DefaultDOMPropertyConfig = {
1806
1844
  DOMPropertyNames: {
1807
1845
  autoCapitalize: 'autocapitalize',
1808
1846
  autoComplete: 'autocomplete',
1847
+ autoCorrect: 'autocorrect',
1809
1848
  autoFocus: 'autofocus',
1810
1849
  autoPlay: 'autoplay',
1811
1850
  encType: 'enctype',
@@ -1873,7 +1912,7 @@ var DefaultEventPluginOrder = [
1873
1912
 
1874
1913
  module.exports = DefaultEventPluginOrder;
1875
1914
 
1876
- },{"./keyOf":102}],13:[function(require,module,exports){
1915
+ },{"./keyOf":105}],13:[function(require,module,exports){
1877
1916
  /**
1878
1917
  * Copyright 2013 Facebook, Inc.
1879
1918
  *
@@ -1987,7 +2026,7 @@ var EnterLeaveEventPlugin = {
1987
2026
 
1988
2027
  module.exports = EnterLeaveEventPlugin;
1989
2028
 
1990
- },{"./EventConstants":14,"./EventPropagators":19,"./ReactMount":49,"./SyntheticMouseEvent":68,"./keyOf":102}],14:[function(require,module,exports){
2029
+ },{"./EventConstants":14,"./EventPropagators":19,"./ReactMount":50,"./SyntheticMouseEvent":69,"./keyOf":105}],14:[function(require,module,exports){
1991
2030
  /**
1992
2031
  * Copyright 2013 Facebook, Inc.
1993
2032
  *
@@ -2022,6 +2061,7 @@ var topLevelTypes = keyMirror({
2022
2061
  topCompositionEnd: null,
2023
2062
  topCompositionStart: null,
2024
2063
  topCompositionUpdate: null,
2064
+ topContextMenu: null,
2025
2065
  topCopy: null,
2026
2066
  topCut: null,
2027
2067
  topDoubleClick: null,
@@ -2061,7 +2101,7 @@ var EventConstants = {
2061
2101
 
2062
2102
  module.exports = EventConstants;
2063
2103
 
2064
- },{"./keyMirror":101}],15:[function(require,module,exports){
2104
+ },{"./keyMirror":104}],15:[function(require,module,exports){
2065
2105
  /**
2066
2106
  * Copyright 2013 Facebook, Inc.
2067
2107
  *
@@ -2108,10 +2148,10 @@ var EventListener = {
2108
2148
  */
2109
2149
  capture: function(el, handlerBaseName, cb) {
2110
2150
  if (!el.addEventListener) {
2111
- if (true) {
2151
+ if ("production" !== "development") {
2112
2152
  console.error(
2113
- 'You are attempting to use addEventlistener ' +
2114
- 'in a browser that does not support it support it.' +
2153
+ 'You are attempting to use addEventListener ' +
2154
+ 'in a browser that does not support it.' +
2115
2155
  'This likely means that you will not receive events that ' +
2116
2156
  'your application relies on (such as scroll).');
2117
2157
  }
@@ -2301,11 +2341,11 @@ var EventPluginHub = {
2301
2341
  var processingEventQueue = eventQueue;
2302
2342
  eventQueue = null;
2303
2343
  forEachAccumulated(processingEventQueue, executeDispatchesAndRelease);
2304
- invariant(
2344
+ ("production" !== "development" ? invariant(
2305
2345
  !eventQueue,
2306
2346
  'processEventQueue(): Additional events were enqueued while processing ' +
2307
2347
  'an event queue. Support for this has not yet been implemented.'
2308
- );
2348
+ ) : invariant(!eventQueue));
2309
2349
  }
2310
2350
 
2311
2351
  };
@@ -2316,7 +2356,7 @@ if (ExecutionEnvironment.canUseDOM) {
2316
2356
 
2317
2357
  module.exports = EventPluginHub;
2318
2358
 
2319
- },{"./CallbackRegistry":4,"./EventPluginRegistry":17,"./EventPluginUtils":18,"./EventPropagators":19,"./ExecutionEnvironment":20,"./accumulate":74,"./forEachAccumulated":86,"./invariant":95}],17:[function(require,module,exports){
2359
+ },{"./CallbackRegistry":4,"./EventPluginRegistry":17,"./EventPluginUtils":18,"./EventPropagators":19,"./ExecutionEnvironment":20,"./accumulate":75,"./forEachAccumulated":88,"./invariant":98}],17:[function(require,module,exports){
2320
2360
  /**
2321
2361
  * Copyright 2013 Facebook, Inc.
2322
2362
  *
@@ -2363,30 +2403,30 @@ function recomputePluginOrdering() {
2363
2403
  for (var pluginName in namesToPlugins) {
2364
2404
  var PluginModule = namesToPlugins[pluginName];
2365
2405
  var pluginIndex = EventPluginOrder.indexOf(pluginName);
2366
- invariant(
2406
+ ("production" !== "development" ? invariant(
2367
2407
  pluginIndex > -1,
2368
2408
  'EventPluginRegistry: Cannot inject event plugins that do not exist in ' +
2369
2409
  'the plugin ordering, `%s`.',
2370
2410
  pluginName
2371
- );
2411
+ ) : invariant(pluginIndex > -1));
2372
2412
  if (EventPluginRegistry.plugins[pluginIndex]) {
2373
2413
  continue;
2374
2414
  }
2375
- invariant(
2415
+ ("production" !== "development" ? invariant(
2376
2416
  PluginModule.extractEvents,
2377
2417
  'EventPluginRegistry: Event plugins must implement an `extractEvents` ' +
2378
2418
  'method, but `%s` does not.',
2379
2419
  pluginName
2380
- );
2420
+ ) : invariant(PluginModule.extractEvents));
2381
2421
  EventPluginRegistry.plugins[pluginIndex] = PluginModule;
2382
2422
  var publishedEvents = PluginModule.eventTypes;
2383
2423
  for (var eventName in publishedEvents) {
2384
- invariant(
2424
+ ("production" !== "development" ? invariant(
2385
2425
  publishEventForPlugin(publishedEvents[eventName], PluginModule),
2386
2426
  'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.',
2387
2427
  eventName,
2388
2428
  pluginName
2389
- );
2429
+ ) : invariant(publishEventForPlugin(publishedEvents[eventName], PluginModule)));
2390
2430
  }
2391
2431
  }
2392
2432
  }
@@ -2425,14 +2465,13 @@ function publishEventForPlugin(dispatchConfig, PluginModule) {
2425
2465
  * @private
2426
2466
  */
2427
2467
  function publishRegistrationName(registrationName, PluginModule) {
2428
- invariant(
2468
+ ("production" !== "development" ? invariant(
2429
2469
  !EventPluginRegistry.registrationNames[registrationName],
2430
2470
  'EventPluginHub: More than one plugin attempted to publish the same ' +
2431
2471
  'registration name, `%s`.',
2432
2472
  registrationName
2433
- );
2473
+ ) : invariant(!EventPluginRegistry.registrationNames[registrationName]));
2434
2474
  EventPluginRegistry.registrationNames[registrationName] = PluginModule;
2435
- EventPluginRegistry.registrationNamesKeys.push(registrationName);
2436
2475
  }
2437
2476
 
2438
2477
  /**
@@ -2452,11 +2491,6 @@ var EventPluginRegistry = {
2452
2491
  */
2453
2492
  registrationNames: {},
2454
2493
 
2455
- /**
2456
- * The keys of `registrationNames`.
2457
- */
2458
- registrationNamesKeys: [],
2459
-
2460
2494
  /**
2461
2495
  * Injects an ordering of plugins (by plugin name). This allows the ordering
2462
2496
  * to be decoupled from injection of the actual plugins so that ordering is
@@ -2467,10 +2501,10 @@ var EventPluginRegistry = {
2467
2501
  * @see {EventPluginHub.injection.injectEventPluginOrder}
2468
2502
  */
2469
2503
  injectEventPluginOrder: function(InjectedEventPluginOrder) {
2470
- invariant(
2504
+ ("production" !== "development" ? invariant(
2471
2505
  !EventPluginOrder,
2472
2506
  'EventPluginRegistry: Cannot inject event plugin ordering more than once.'
2473
- );
2507
+ ) : invariant(!EventPluginOrder));
2474
2508
  // Clone the ordering so it cannot be dynamically mutated.
2475
2509
  EventPluginOrder = Array.prototype.slice.call(InjectedEventPluginOrder);
2476
2510
  recomputePluginOrdering();
@@ -2494,12 +2528,12 @@ var EventPluginRegistry = {
2494
2528
  }
2495
2529
  var PluginModule = injectedNamesToPlugins[pluginName];
2496
2530
  if (namesToPlugins[pluginName] !== PluginModule) {
2497
- invariant(
2531
+ ("production" !== "development" ? invariant(
2498
2532
  !namesToPlugins[pluginName],
2499
2533
  'EventPluginRegistry: Cannot inject two different event plugins ' +
2500
2534
  'using the same name, `%s`.',
2501
2535
  pluginName
2502
- );
2536
+ ) : invariant(!namesToPlugins[pluginName]));
2503
2537
  namesToPlugins[pluginName] = PluginModule;
2504
2538
  isOrderingDirty = true;
2505
2539
  }
@@ -2555,14 +2589,13 @@ var EventPluginRegistry = {
2555
2589
  delete registrationNames[registrationName];
2556
2590
  }
2557
2591
  }
2558
- EventPluginRegistry.registrationNamesKeys.length = 0;
2559
2592
  }
2560
2593
 
2561
2594
  };
2562
2595
 
2563
2596
  module.exports = EventPluginRegistry;
2564
2597
 
2565
- },{"./invariant":95}],18:[function(require,module,exports){
2598
+ },{"./invariant":98}],18:[function(require,module,exports){
2566
2599
  /**
2567
2600
  * Copyright 2013 Facebook, Inc.
2568
2601
  *
@@ -2605,7 +2638,7 @@ function isStartish(topLevelType) {
2605
2638
  }
2606
2639
 
2607
2640
  var validateEventDispatches;
2608
- if (true) {
2641
+ if ("production" !== "development") {
2609
2642
  validateEventDispatches = function(event) {
2610
2643
  var dispatchListeners = event._dispatchListeners;
2611
2644
  var dispatchIDs = event._dispatchIDs;
@@ -2617,10 +2650,10 @@ if (true) {
2617
2650
  dispatchListeners.length :
2618
2651
  dispatchListeners ? 1 : 0;
2619
2652
 
2620
- invariant(
2653
+ ("production" !== "development" ? invariant(
2621
2654
  idsIsArr === listenersIsArr && IDsLen === listenersLen,
2622
2655
  'EventPluginUtils: Invalid `event`.'
2623
- );
2656
+ ) : invariant(idsIsArr === listenersIsArr && IDsLen === listenersLen));
2624
2657
  };
2625
2658
  }
2626
2659
 
@@ -2632,7 +2665,7 @@ if (true) {
2632
2665
  function forEachEventDispatch(event, cb) {
2633
2666
  var dispatchListeners = event._dispatchListeners;
2634
2667
  var dispatchIDs = event._dispatchIDs;
2635
- if (true) {
2668
+ if ("production" !== "development") {
2636
2669
  validateEventDispatches(event);
2637
2670
  }
2638
2671
  if (Array.isArray(dispatchListeners)) {
@@ -2677,7 +2710,7 @@ function executeDispatchesInOrder(event, executeDispatch) {
2677
2710
  function executeDispatchesInOrderStopAtTrue(event) {
2678
2711
  var dispatchListeners = event._dispatchListeners;
2679
2712
  var dispatchIDs = event._dispatchIDs;
2680
- if (true) {
2713
+ if ("production" !== "development") {
2681
2714
  validateEventDispatches(event);
2682
2715
  }
2683
2716
  if (Array.isArray(dispatchListeners)) {
@@ -2708,15 +2741,15 @@ function executeDispatchesInOrderStopAtTrue(event) {
2708
2741
  * @return The return value of executing the single dispatch.
2709
2742
  */
2710
2743
  function executeDirectDispatch(event) {
2711
- if (true) {
2744
+ if ("production" !== "development") {
2712
2745
  validateEventDispatches(event);
2713
2746
  }
2714
2747
  var dispatchListener = event._dispatchListeners;
2715
2748
  var dispatchID = event._dispatchIDs;
2716
- invariant(
2749
+ ("production" !== "development" ? invariant(
2717
2750
  !Array.isArray(dispatchListener),
2718
2751
  'executeDirectDispatch(...): Invalid `event`.'
2719
- );
2752
+ ) : invariant(!Array.isArray(dispatchListener)));
2720
2753
  var res = dispatchListener ?
2721
2754
  dispatchListener(event, dispatchID) :
2722
2755
  null;
@@ -2749,7 +2782,7 @@ var EventPluginUtils = {
2749
2782
 
2750
2783
  module.exports = EventPluginUtils;
2751
2784
 
2752
- },{"./EventConstants":14,"./invariant":95}],19:[function(require,module,exports){
2785
+ },{"./EventConstants":14,"./invariant":98}],19:[function(require,module,exports){
2753
2786
  /**
2754
2787
  * Copyright 2013 Facebook, Inc.
2755
2788
  *
@@ -2790,7 +2823,7 @@ var injection = {
2790
2823
  InstanceHandle: null,
2791
2824
  injectInstanceHandle: function(InjectedInstanceHandle) {
2792
2825
  injection.InstanceHandle = InjectedInstanceHandle;
2793
- if (true) {
2826
+ if ("production" !== "development") {
2794
2827
  injection.validate();
2795
2828
  }
2796
2829
  },
@@ -2821,7 +2854,7 @@ function listenerAtPhase(id, event, propagationPhase) {
2821
2854
  * "dispatch" object that pairs the event with the listener.
2822
2855
  */
2823
2856
  function accumulateDirectionalDispatches(domID, upwards, event) {
2824
- if (true) {
2857
+ if ("production" !== "development") {
2825
2858
  if (!domID) {
2826
2859
  throw new Error('Dispatching id must not be null');
2827
2860
  }
@@ -2881,14 +2914,14 @@ function accumulateDirectDispatchesSingle(event) {
2881
2914
  }
2882
2915
 
2883
2916
  function accumulateTwoPhaseDispatches(events) {
2884
- if (true) {
2917
+ if ("production" !== "development") {
2885
2918
  injection.validate();
2886
2919
  }
2887
2920
  forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
2888
2921
  }
2889
2922
 
2890
2923
  function accumulateEnterLeaveDispatches(leave, enter, fromID, toID) {
2891
- if (true) {
2924
+ if ("production" !== "development") {
2892
2925
  injection.validate();
2893
2926
  }
2894
2927
  injection.InstanceHandle.traverseEnterLeave(
@@ -2902,7 +2935,7 @@ function accumulateEnterLeaveDispatches(leave, enter, fromID, toID) {
2902
2935
 
2903
2936
 
2904
2937
  function accumulateDirectDispatches(events) {
2905
- if (true) {
2938
+ if ("production" !== "development") {
2906
2939
  injection.validate();
2907
2940
  }
2908
2941
  forEachAccumulated(events, accumulateDirectDispatchesSingle);
@@ -2930,7 +2963,7 @@ var EventPropagators = {
2930
2963
 
2931
2964
  module.exports = EventPropagators;
2932
2965
 
2933
- },{"./CallbackRegistry":4,"./EventConstants":14,"./accumulate":74,"./forEachAccumulated":86}],20:[function(require,module,exports){
2966
+ },{"./CallbackRegistry":4,"./EventConstants":14,"./accumulate":75,"./forEachAccumulated":88}],20:[function(require,module,exports){
2934
2967
  /**
2935
2968
  * Copyright 2013 Facebook, Inc.
2936
2969
  *
@@ -3003,12 +3036,12 @@ var invariant = require("./invariant");
3003
3036
  */
3004
3037
  var LinkedValueMixin = {
3005
3038
  _assertLink: function() {
3006
- invariant(
3039
+ ("production" !== "development" ? invariant(
3007
3040
  this.props.value == null && this.props.onChange == null,
3008
3041
  'Cannot provide a valueLink and a value or onChange event. If you ' +
3009
3042
  'want to use value or onChange, you probably don\'t want to use ' +
3010
3043
  'valueLink'
3011
- );
3044
+ ) : invariant(this.props.value == null && this.props.onChange == null));
3012
3045
  },
3013
3046
 
3014
3047
  /**
@@ -3043,7 +3076,7 @@ var LinkedValueMixin = {
3043
3076
 
3044
3077
  module.exports = LinkedValueMixin;
3045
3078
 
3046
- },{"./invariant":95}],22:[function(require,module,exports){
3079
+ },{"./invariant":98}],22:[function(require,module,exports){
3047
3080
  /**
3048
3081
  * Copyright 2013 Facebook, Inc.
3049
3082
  *
@@ -3108,7 +3141,7 @@ var MobileSafariClickEventPlugin = {
3108
3141
 
3109
3142
  module.exports = MobileSafariClickEventPlugin;
3110
3143
 
3111
- },{"./EventConstants":14,"./emptyFunction":81}],23:[function(require,module,exports){
3144
+ },{"./EventConstants":14,"./emptyFunction":83}],23:[function(require,module,exports){
3112
3145
  /**
3113
3146
  * Copyright 2013 Facebook, Inc.
3114
3147
  *
@@ -3292,11 +3325,11 @@ var React = {
3292
3325
 
3293
3326
  // Version exists only in the open-source version of React, not in Facebook's
3294
3327
  // internal version.
3295
- React.version = '0.5.2';
3328
+ React.version = '0.8.0';
3296
3329
 
3297
3330
  module.exports = React;
3298
3331
 
3299
- },{"./ReactComponent":25,"./ReactCompositeComponent":28,"./ReactCurrentOwner":29,"./ReactDOM":30,"./ReactDOMComponent":32,"./ReactDefaultInjection":41,"./ReactInstanceHandles":47,"./ReactMount":49,"./ReactMultiChild":51,"./ReactPerf":54,"./ReactPropTypes":56,"./ReactServerRendering":58,"./ReactTextComponent":59}],25:[function(require,module,exports){
3332
+ },{"./ReactComponent":25,"./ReactCompositeComponent":28,"./ReactCurrentOwner":29,"./ReactDOM":30,"./ReactDOMComponent":32,"./ReactDefaultInjection":41,"./ReactInstanceHandles":48,"./ReactMount":50,"./ReactMultiChild":52,"./ReactPerf":55,"./ReactPropTypes":57,"./ReactServerRendering":59,"./ReactTextComponent":60}],25:[function(require,module,exports){
3300
3333
  /**
3301
3334
  * Copyright 2013 Facebook, Inc.
3302
3335
  *
@@ -3426,8 +3459,8 @@ function validateChildKeys(component) {
3426
3459
  * `mountComponent`
3427
3460
  * Initializes the component, renders markup, and registers event listeners.
3428
3461
  *
3429
- * `receiveProps`
3430
- * Updates the rendered DOM nodes given a new set of props.
3462
+ * `receiveComponent`
3463
+ * Updates the rendered DOM nodes to match the given component.
3431
3464
  *
3432
3465
  * `unmountComponent`
3433
3466
  * Releases any resources allocated by this component.
@@ -3450,7 +3483,7 @@ var ReactComponent = {
3450
3483
  return !!(
3451
3484
  object &&
3452
3485
  typeof object.mountComponentIntoNode === 'function' &&
3453
- typeof object.receiveProps === 'function'
3486
+ typeof object.receiveComponent === 'function'
3454
3487
  );
3455
3488
  },
3456
3489
 
@@ -3558,18 +3591,18 @@ var ReactComponent = {
3558
3591
  * @public
3559
3592
  */
3560
3593
  replaceProps: function(props, callback) {
3561
- invariant(
3594
+ ("production" !== "development" ? invariant(
3562
3595
  !this.props.__owner__,
3563
3596
  'replaceProps(...): You called `setProps` or `replaceProps` on a ' +
3564
3597
  'component with an owner. This is an anti-pattern since props will ' +
3565
3598
  'get reactively updated when rendered. Instead, change the owner\'s ' +
3566
3599
  '`render` method to pass the correct value as props to the component ' +
3567
3600
  'where it is created.'
3568
- );
3569
- invariant(
3601
+ ) : invariant(!this.props.__owner__));
3602
+ ("production" !== "development" ? invariant(
3570
3603
  this.isMounted(),
3571
3604
  'replaceProps(...): Can only update a mounted component.'
3572
- );
3605
+ ) : invariant(this.isMounted()));
3573
3606
  this._pendingProps = props;
3574
3607
  ReactUpdates.enqueueUpdate(this, callback);
3575
3608
  },
@@ -3597,14 +3630,14 @@ var ReactComponent = {
3597
3630
  // Children can be more than one argument
3598
3631
  var childrenLength = arguments.length - 1;
3599
3632
  if (childrenLength === 1) {
3600
- if (true) {
3633
+ if ("production" !== "development") {
3601
3634
  validateChildKeys(children);
3602
3635
  }
3603
3636
  this.props.children = children;
3604
3637
  } else if (childrenLength > 1) {
3605
3638
  var childArray = Array(childrenLength);
3606
3639
  for (var i = 0; i < childrenLength; i++) {
3607
- if (true) {
3640
+ if ("production" !== "development") {
3608
3641
  validateChildKeys(arguments[i + 1]);
3609
3642
  }
3610
3643
  childArray[i] = arguments[i + 1];
@@ -3628,11 +3661,11 @@ var ReactComponent = {
3628
3661
  * @internal
3629
3662
  */
3630
3663
  mountComponent: function(rootID, transaction, mountDepth) {
3631
- invariant(
3664
+ ("production" !== "development" ? invariant(
3632
3665
  !this.isMounted(),
3633
3666
  'mountComponent(%s, ...): Can only mount an unmounted component.',
3634
3667
  rootID
3635
- );
3668
+ ) : invariant(!this.isMounted()));
3636
3669
  var props = this.props;
3637
3670
  if (props.ref != null) {
3638
3671
  ReactOwner.addComponentAsRefTo(this, props.ref, props.__owner__);
@@ -3654,10 +3687,10 @@ var ReactComponent = {
3654
3687
  * @internal
3655
3688
  */
3656
3689
  unmountComponent: function() {
3657
- invariant(
3690
+ ("production" !== "development" ? invariant(
3658
3691
  this.isMounted(),
3659
3692
  'unmountComponent(): Can only unmount a mounted component.'
3660
- );
3693
+ ) : invariant(this.isMounted()));
3661
3694
  var props = this.props;
3662
3695
  if (props.ref != null) {
3663
3696
  ReactOwner.removeComponentAsRefFrom(this, props.ref, props.__owner__);
@@ -3668,21 +3701,22 @@ var ReactComponent = {
3668
3701
  },
3669
3702
 
3670
3703
  /**
3671
- * Updates the rendered DOM nodes given a new set of props.
3704
+ * Given a new instance of this component, updates the rendered DOM nodes
3705
+ * as if that instance was rendered instead.
3672
3706
  *
3673
3707
  * Subclasses that override this method should make sure to invoke
3674
- * `ReactComponent.Mixin.receiveProps.call(this, ...)`.
3708
+ * `ReactComponent.Mixin.receiveComponent.call(this, ...)`.
3675
3709
  *
3676
- * @param {object} nextProps Next set of properties.
3710
+ * @param {object} nextComponent Next set of properties.
3677
3711
  * @param {ReactReconcileTransaction} transaction
3678
3712
  * @internal
3679
3713
  */
3680
- receiveProps: function(nextProps, transaction) {
3681
- invariant(
3714
+ receiveComponent: function(nextComponent, transaction) {
3715
+ ("production" !== "development" ? invariant(
3682
3716
  this.isMounted(),
3683
- 'receiveProps(...): Can only update a mounted component.'
3684
- );
3685
- this._pendingProps = nextProps;
3717
+ 'receiveComponent(...): Can only update a mounted component.'
3718
+ ) : invariant(this.isMounted()));
3719
+ this._pendingProps = nextComponent.props;
3686
3720
  this._performUpdateIfNecessary(transaction);
3687
3721
  },
3688
3722
 
@@ -3812,7 +3846,7 @@ var ReactComponent = {
3812
3846
 
3813
3847
  module.exports = ReactComponent;
3814
3848
 
3815
- },{"./ReactComponentEnvironment":27,"./ReactCurrentOwner":29,"./ReactOwner":53,"./ReactUpdates":60,"./invariant":95,"./keyMirror":101,"./merge":104}],26:[function(require,module,exports){
3849
+ },{"./ReactComponentEnvironment":27,"./ReactCurrentOwner":29,"./ReactOwner":54,"./ReactUpdates":61,"./invariant":98,"./keyMirror":104,"./merge":107}],26:[function(require,module,exports){
3816
3850
  /**
3817
3851
  * Copyright 2013 Facebook, Inc.
3818
3852
  *
@@ -3866,10 +3900,10 @@ var ReactComponentBrowserEnvironment = {
3866
3900
  * @protected
3867
3901
  */
3868
3902
  getDOMNode: function() {
3869
- invariant(
3903
+ ("production" !== "development" ? invariant(
3870
3904
  this.isMounted(),
3871
3905
  'getDOMNode(): A component must be mounted to have a DOM node.'
3872
- );
3906
+ ) : invariant(this.isMounted()));
3873
3907
  return ReactMount.getNode(this._rootNodeID);
3874
3908
  }
3875
3909
  },
@@ -3896,20 +3930,23 @@ var ReactComponentBrowserEnvironment = {
3896
3930
  * container if possible.
3897
3931
  */
3898
3932
  mountImageIntoNode: function(markup, container, shouldReuseMarkup) {
3899
- invariant(
3933
+ ("production" !== "development" ? invariant(
3900
3934
  container && (
3901
3935
  container.nodeType === ELEMENT_NODE_TYPE ||
3902
3936
  container.nodeType === DOC_NODE_TYPE && ReactMount.allowFullPageRender
3903
3937
  ),
3904
3938
  'mountComponentIntoNode(...): Target container is not valid.'
3905
- );
3939
+ ) : invariant(container && (
3940
+ container.nodeType === ELEMENT_NODE_TYPE ||
3941
+ container.nodeType === DOC_NODE_TYPE && ReactMount.allowFullPageRender
3942
+ )));
3906
3943
  if (shouldReuseMarkup) {
3907
3944
  if (ReactMarkupChecksum.canReuseMarkup(
3908
3945
  markup,
3909
3946
  getReactRootElementInContainer(container))) {
3910
3947
  return;
3911
3948
  } else {
3912
- if (true) {
3949
+ if ("production" !== "development") {
3913
3950
  console.warn(
3914
3951
  'React attempted to use reuse markup in a container but the ' +
3915
3952
  'checksum was invalid. This generally means that you are using ' +
@@ -3951,7 +3988,7 @@ var ReactComponentBrowserEnvironment = {
3951
3988
 
3952
3989
  module.exports = ReactComponentBrowserEnvironment;
3953
3990
 
3954
- },{"./ReactDOMIDOperations":34,"./ReactMarkupChecksum":48,"./ReactMount":49,"./ReactReconcileTransaction":57,"./getReactRootElementInContainer":92,"./invariant":95,"./mutateHTMLNodeWithMarkup":108}],27:[function(require,module,exports){
3991
+ },{"./ReactDOMIDOperations":34,"./ReactMarkupChecksum":49,"./ReactMount":50,"./ReactReconcileTransaction":58,"./getReactRootElementInContainer":94,"./invariant":98,"./mutateHTMLNodeWithMarkup":111}],27:[function(require,module,exports){
3955
3992
  /**
3956
3993
  * Copyright 2013 Facebook, Inc.
3957
3994
  *
@@ -4000,6 +4037,7 @@ module.exports = ReactComponentEnvironment;
4000
4037
 
4001
4038
  var ReactComponent = require("./ReactComponent");
4002
4039
  var ReactCurrentOwner = require("./ReactCurrentOwner");
4040
+ var ReactErrorUtils = require("./ReactErrorUtils");
4003
4041
  var ReactOwner = require("./ReactOwner");
4004
4042
  var ReactPerf = require("./ReactPerf");
4005
4043
  var ReactPropTransferer = require("./ReactPropTransferer");
@@ -4276,42 +4314,47 @@ function validateMethodOverride(proto, name) {
4276
4314
 
4277
4315
  // Disallow overriding of base class methods unless explicitly allowed.
4278
4316
  if (ReactCompositeComponentMixin.hasOwnProperty(name)) {
4279
- invariant(
4317
+ ("production" !== "development" ? invariant(
4280
4318
  specPolicy === SpecPolicy.OVERRIDE_BASE,
4281
4319
  'ReactCompositeComponentInterface: You are attempting to override ' +
4282
4320
  '`%s` from your class specification. Ensure that your method names ' +
4283
4321
  'do not overlap with React methods.',
4284
4322
  name
4285
- );
4323
+ ) : invariant(specPolicy === SpecPolicy.OVERRIDE_BASE));
4286
4324
  }
4287
4325
 
4288
4326
  // Disallow defining methods more than once unless explicitly allowed.
4289
4327
  if (proto.hasOwnProperty(name)) {
4290
- invariant(
4328
+ ("production" !== "development" ? invariant(
4291
4329
  specPolicy === SpecPolicy.DEFINE_MANY ||
4292
4330
  specPolicy === SpecPolicy.DEFINE_MANY_MERGED,
4293
4331
  'ReactCompositeComponentInterface: You are attempting to define ' +
4294
4332
  '`%s` on your component more than once. This conflict may be due ' +
4295
4333
  'to a mixin.',
4296
4334
  name
4297
- );
4335
+ ) : invariant(specPolicy === SpecPolicy.DEFINE_MANY ||
4336
+ specPolicy === SpecPolicy.DEFINE_MANY_MERGED));
4298
4337
  }
4299
4338
  }
4300
4339
 
4301
4340
 
4302
4341
  function validateLifeCycleOnReplaceState(instance) {
4303
4342
  var compositeLifeCycleState = instance._compositeLifeCycleState;
4304
- invariant(
4343
+ ("production" !== "development" ? invariant(
4305
4344
  instance.isMounted() ||
4306
4345
  compositeLifeCycleState === CompositeLifeCycle.MOUNTING,
4307
4346
  'replaceState(...): Can only update a mounted or mounting component.'
4308
- );
4309
- invariant(
4310
- compositeLifeCycleState !== CompositeLifeCycle.RECEIVING_STATE &&
4311
- compositeLifeCycleState !== CompositeLifeCycle.UNMOUNTING,
4312
- 'replaceState(...): Cannot update while unmounting component or during ' +
4313
- 'an existing state transition (such as within `render`).'
4314
- );
4347
+ ) : invariant(instance.isMounted() ||
4348
+ compositeLifeCycleState === CompositeLifeCycle.MOUNTING));
4349
+ ("production" !== "development" ? invariant(compositeLifeCycleState !== CompositeLifeCycle.RECEIVING_STATE,
4350
+ 'replaceState(...): Cannot update during an existing state transition ' +
4351
+ '(such as within `render`). This could potentially cause an infinite ' +
4352
+ 'loop so it is forbidden.'
4353
+ ) : invariant(compositeLifeCycleState !== CompositeLifeCycle.RECEIVING_STATE));
4354
+ ("production" !== "development" ? invariant(compositeLifeCycleState !== CompositeLifeCycle.UNMOUNTING,
4355
+ 'replaceState(...): Cannot update while unmounting component. This ' +
4356
+ 'usually means you called setState() on an unmounted component.'
4357
+ ) : invariant(compositeLifeCycleState !== CompositeLifeCycle.UNMOUNTING));
4315
4358
  }
4316
4359
 
4317
4360
  /**
@@ -4376,18 +4419,18 @@ function mixSpecIntoComponent(Constructor, spec) {
4376
4419
  * @return {object} one after it has been mutated to contain everything in two.
4377
4420
  */
4378
4421
  function mergeObjectsWithNoDuplicateKeys(one, two) {
4379
- invariant(
4422
+ ("production" !== "development" ? invariant(
4380
4423
  one && two && typeof one === 'object' && typeof two === 'object',
4381
4424
  'mergeObjectsWithNoDuplicateKeys(): Cannot merge non-objects'
4382
- );
4425
+ ) : invariant(one && two && typeof one === 'object' && typeof two === 'object'));
4383
4426
 
4384
4427
  objMap(two, function(value, key) {
4385
- invariant(
4428
+ ("production" !== "development" ? invariant(
4386
4429
  one[key] === undefined,
4387
4430
  'mergeObjectsWithNoDuplicateKeys(): ' +
4388
4431
  'Tried to merge two objects with the same key: %s',
4389
4432
  key
4390
- );
4433
+ ) : invariant(one[key] === undefined));
4391
4434
  one[key] = value;
4392
4435
  });
4393
4436
  return one;
@@ -4772,7 +4815,7 @@ var ReactCompositeComponentMixin = {
4772
4815
  var currentComponent = this._renderedComponent;
4773
4816
  var nextComponent = this._renderValidatedComponent();
4774
4817
  if (currentComponent.constructor === nextComponent.constructor) {
4775
- currentComponent.receiveProps(nextComponent.props, transaction);
4818
+ currentComponent.receiveComponent(nextComponent, transaction);
4776
4819
  } else {
4777
4820
  // These two IDs are actually the same! But nothing should rely on that.
4778
4821
  var thisID = this._rootNodeID;
@@ -4808,18 +4851,20 @@ var ReactCompositeComponentMixin = {
4808
4851
  */
4809
4852
  forceUpdate: function(callback) {
4810
4853
  var compositeLifeCycleState = this._compositeLifeCycleState;
4811
- invariant(
4854
+ ("production" !== "development" ? invariant(
4812
4855
  this.isMounted() ||
4813
4856
  compositeLifeCycleState === CompositeLifeCycle.MOUNTING,
4814
4857
  'forceUpdate(...): Can only force an update on mounted or mounting ' +
4815
4858
  'components.'
4816
- );
4817
- invariant(
4859
+ ) : invariant(this.isMounted() ||
4860
+ compositeLifeCycleState === CompositeLifeCycle.MOUNTING));
4861
+ ("production" !== "development" ? invariant(
4818
4862
  compositeLifeCycleState !== CompositeLifeCycle.RECEIVING_STATE &&
4819
4863
  compositeLifeCycleState !== CompositeLifeCycle.UNMOUNTING,
4820
4864
  'forceUpdate(...): Cannot force an update while unmounting component ' +
4821
4865
  'or during an existing state transition (such as within `render`).'
4822
- );
4866
+ ) : invariant(compositeLifeCycleState !== CompositeLifeCycle.RECEIVING_STATE &&
4867
+ compositeLifeCycleState !== CompositeLifeCycle.UNMOUNTING));
4823
4868
  this._pendingForceUpdate = true;
4824
4869
  ReactUpdates.enqueueUpdate(this, callback);
4825
4870
  },
@@ -4838,11 +4883,12 @@ var ReactCompositeComponentMixin = {
4838
4883
  } finally {
4839
4884
  ReactCurrentOwner.current = null;
4840
4885
  }
4841
- invariant(
4886
+ ("production" !== "development" ? invariant(
4842
4887
  ReactComponent.isValidComponent(renderedComponent),
4843
- '%s.render(): A valid ReactComponent must be returned.',
4888
+ '%s.render(): A valid ReactComponent must be returned. You may have ' +
4889
+ 'returned null, undefined, an array, or some other invalid object.',
4844
4890
  this.constructor.displayName || 'ReactCompositeComponent'
4845
- );
4891
+ ) : invariant(ReactComponent.isValidComponent(renderedComponent)));
4846
4892
  return renderedComponent;
4847
4893
  },
4848
4894
 
@@ -4855,7 +4901,10 @@ var ReactCompositeComponentMixin = {
4855
4901
  continue;
4856
4902
  }
4857
4903
  var method = this.__reactAutoBindMap[autoBindKey];
4858
- this[autoBindKey] = this._bindAutoBindMethod(method);
4904
+ this[autoBindKey] = this._bindAutoBindMethod(ReactErrorUtils.guard(
4905
+ method,
4906
+ this.constructor.displayName + '.' + autoBindKey
4907
+ ));
4859
4908
  }
4860
4909
  },
4861
4910
 
@@ -4870,7 +4919,7 @@ var ReactCompositeComponentMixin = {
4870
4919
  var boundMethod = function() {
4871
4920
  return method.apply(component, arguments);
4872
4921
  };
4873
- if (true) {
4922
+ if ("production" !== "development") {
4874
4923
  boundMethod.__reactBoundContext = component;
4875
4924
  boundMethod.__reactBoundMethod = method;
4876
4925
  boundMethod.__reactBoundArguments = null;
@@ -4938,12 +4987,12 @@ var ReactCompositeComponent = {
4938
4987
  Constructor.prototype.constructor = Constructor;
4939
4988
  mixSpecIntoComponent(Constructor, spec);
4940
4989
 
4941
- invariant(
4990
+ ("production" !== "development" ? invariant(
4942
4991
  Constructor.prototype.render,
4943
4992
  'createClass(...): Class specification must implement a `render` method.'
4944
- );
4993
+ ) : invariant(Constructor.prototype.render));
4945
4994
 
4946
- if (true) {
4995
+ if ("production" !== "development") {
4947
4996
  if (Constructor.prototype.componentShouldUpdate) {
4948
4997
  console.warn(
4949
4998
  (spec.displayName || 'A component') + ' has a method called ' +
@@ -4987,7 +5036,7 @@ var ReactCompositeComponent = {
4987
5036
 
4988
5037
  module.exports = ReactCompositeComponent;
4989
5038
 
4990
- },{"./ReactComponent":25,"./ReactCurrentOwner":29,"./ReactOwner":53,"./ReactPerf":54,"./ReactPropTransferer":55,"./ReactUpdates":60,"./invariant":95,"./keyMirror":101,"./merge":104,"./mixInto":107,"./objMap":110}],29:[function(require,module,exports){
5039
+ },{"./ReactComponent":25,"./ReactCurrentOwner":29,"./ReactErrorUtils":43,"./ReactOwner":54,"./ReactPerf":55,"./ReactPropTransferer":56,"./ReactUpdates":61,"./invariant":98,"./keyMirror":104,"./merge":107,"./mixInto":110,"./objMap":112}],29:[function(require,module,exports){
4991
5040
  /**
4992
5041
  * Copyright 2013 Facebook, Inc.
4993
5042
  *
@@ -5224,7 +5273,7 @@ ReactDOM.injection = injection;
5224
5273
 
5225
5274
  module.exports = ReactDOM;
5226
5275
 
5227
- },{"./ReactDOMComponent":32,"./mergeInto":106,"./objMapKeyVal":111}],31:[function(require,module,exports){
5276
+ },{"./ReactDOMComponent":32,"./mergeInto":109,"./objMapKeyVal":113}],31:[function(require,module,exports){
5228
5277
  /**
5229
5278
  * Copyright 2013 Facebook, Inc.
5230
5279
  *
@@ -5290,7 +5339,7 @@ var ReactDOMButton = ReactCompositeComponent.createClass({
5290
5339
 
5291
5340
  module.exports = ReactDOMButton;
5292
5341
 
5293
- },{"./ReactCompositeComponent":28,"./ReactDOM":30,"./keyMirror":101}],32:[function(require,module,exports){
5342
+ },{"./ReactCompositeComponent":28,"./ReactDOM":30,"./keyMirror":104}],32:[function(require,module,exports){
5294
5343
  /**
5295
5344
  * Copyright 2013 Facebook, Inc.
5296
5345
  *
@@ -5344,15 +5393,15 @@ function assertValidProps(props) {
5344
5393
  return;
5345
5394
  }
5346
5395
  // Note the use of `==` which checks for null or undefined.
5347
- invariant(
5396
+ ("production" !== "development" ? invariant(
5348
5397
  props.children == null || props.dangerouslySetInnerHTML == null,
5349
5398
  'Can only set one of `children` or `props.dangerouslySetInnerHTML`.'
5350
- );
5351
- invariant(
5399
+ ) : invariant(props.children == null || props.dangerouslySetInnerHTML == null));
5400
+ ("production" !== "development" ? invariant(
5352
5401
  props.style == null || typeof props.style === 'object',
5353
5402
  'The `style` prop expects a mapping from style properties to values, ' +
5354
5403
  'not a string.'
5355
- );
5404
+ ) : invariant(props.style == null || typeof props.style === 'object'));
5356
5405
  }
5357
5406
 
5358
5407
  /**
@@ -5472,9 +5521,13 @@ ReactDOMComponent.Mixin = {
5472
5521
  return '';
5473
5522
  },
5474
5523
 
5475
- receiveProps: function(nextProps, transaction) {
5476
- assertValidProps(nextProps);
5477
- ReactComponent.Mixin.receiveProps.call(this, nextProps, transaction);
5524
+ receiveComponent: function(nextComponent, transaction) {
5525
+ assertValidProps(nextComponent.props);
5526
+ ReactComponent.Mixin.receiveComponent.call(
5527
+ this,
5528
+ nextComponent,
5529
+ transaction
5530
+ );
5478
5531
  },
5479
5532
 
5480
5533
  /**
@@ -5662,7 +5715,7 @@ mixInto(ReactDOMComponent, ReactMultiChild.Mixin);
5662
5715
 
5663
5716
  module.exports = ReactDOMComponent;
5664
5717
 
5665
- },{"./CSSPropertyOperations":3,"./DOMProperty":8,"./DOMPropertyOperations":9,"./ReactComponent":25,"./ReactEventEmitter":43,"./ReactMount":49,"./ReactMultiChild":51,"./ReactPerf":54,"./escapeTextForBrowser":82,"./invariant":95,"./keyOf":102,"./merge":104,"./mixInto":107}],33:[function(require,module,exports){
5718
+ },{"./CSSPropertyOperations":3,"./DOMProperty":8,"./DOMPropertyOperations":9,"./ReactComponent":25,"./ReactEventEmitter":44,"./ReactMount":50,"./ReactMultiChild":52,"./ReactPerf":55,"./escapeTextForBrowser":84,"./invariant":98,"./keyOf":105,"./merge":107,"./mixInto":110}],33:[function(require,module,exports){
5666
5719
  /**
5667
5720
  * Copyright 2013 Facebook, Inc.
5668
5721
  *
@@ -5716,7 +5769,7 @@ var ReactDOMForm = ReactCompositeComponent.createClass({
5716
5769
 
5717
5770
  module.exports = ReactDOMForm;
5718
5771
 
5719
- },{"./EventConstants":14,"./ReactCompositeComponent":28,"./ReactDOM":30,"./ReactEventEmitter":43}],34:[function(require,module,exports){
5772
+ },{"./EventConstants":14,"./ReactCompositeComponent":28,"./ReactDOM":30,"./ReactEventEmitter":44}],34:[function(require,module,exports){
5720
5773
  /**
5721
5774
  * Copyright 2013 Facebook, Inc.
5722
5775
  *
@@ -5787,11 +5840,11 @@ var ReactDOMIDOperations = {
5787
5840
  */
5788
5841
  updatePropertyByID: function(id, name, value) {
5789
5842
  var node = ReactMount.getNode(id);
5790
- invariant(
5843
+ ("production" !== "development" ? invariant(
5791
5844
  !INVALID_PROPERTY_ERRORS.hasOwnProperty(name),
5792
5845
  'updatePropertyByID(...): %s',
5793
5846
  INVALID_PROPERTY_ERRORS[name]
5794
- );
5847
+ ) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name)));
5795
5848
 
5796
5849
  // If we're updating to null or undefined, we should remove the property
5797
5850
  // from the DOM node instead of inadvertantly setting to a string. This
@@ -5813,33 +5866,14 @@ var ReactDOMIDOperations = {
5813
5866
  */
5814
5867
  deletePropertyByID: function(id, name, value) {
5815
5868
  var node = ReactMount.getNode(id);
5816
- invariant(
5869
+ ("production" !== "development" ? invariant(
5817
5870
  !INVALID_PROPERTY_ERRORS.hasOwnProperty(name),
5818
5871
  'updatePropertyByID(...): %s',
5819
5872
  INVALID_PROPERTY_ERRORS[name]
5820
- );
5873
+ ) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name)));
5821
5874
  DOMPropertyOperations.deleteValueForProperty(node, name, value);
5822
5875
  },
5823
5876
 
5824
- /**
5825
- * This should almost never be used instead of `updatePropertyByID()` due to
5826
- * the extra object allocation required by the API. That said, this is useful
5827
- * for batching up several operations across worker thread boundaries.
5828
- *
5829
- * @param {string} id ID of the node to update.
5830
- * @param {object} properties A mapping of valid property names.
5831
- * @internal
5832
- * @see {ReactDOMIDOperations.updatePropertyByID}
5833
- */
5834
- updatePropertiesByID: function(id, properties) {
5835
- for (var name in properties) {
5836
- if (!properties.hasOwnProperty(name)) {
5837
- continue;
5838
- }
5839
- ReactDOMIDOperations.updatePropertiesByID(id, name, properties[name]);
5840
- }
5841
- },
5842
-
5843
5877
  /**
5844
5878
  * Updates a DOM node with new style values. If a value is specified as '',
5845
5879
  * the corresponding style property will be unset.
@@ -5910,7 +5944,7 @@ var ReactDOMIDOperations = {
5910
5944
 
5911
5945
  module.exports = ReactDOMIDOperations;
5912
5946
 
5913
- },{"./CSSPropertyOperations":3,"./DOMChildrenOperations":7,"./DOMPropertyOperations":9,"./ReactMount":49,"./getTextContentAccessor":93,"./invariant":95}],35:[function(require,module,exports){
5947
+ },{"./CSSPropertyOperations":3,"./DOMChildrenOperations":7,"./DOMPropertyOperations":9,"./ReactMount":50,"./getTextContentAccessor":95,"./invariant":98}],35:[function(require,module,exports){
5914
5948
  /**
5915
5949
  * Copyright 2013 Facebook, Inc.
5916
5950
  *
@@ -5968,7 +6002,7 @@ var ReactDOMInput = ReactCompositeComponent.createClass({
5968
6002
  var defaultValue = this.props.defaultValue;
5969
6003
  return {
5970
6004
  checked: this.props.defaultChecked || false,
5971
- value: defaultValue != null ? defaultValue : ''
6005
+ value: defaultValue != null ? defaultValue : null
5972
6006
  };
5973
6007
  },
5974
6008
 
@@ -6053,17 +6087,17 @@ var ReactDOMInput = ReactCompositeComponent.createClass({
6053
6087
  continue;
6054
6088
  }
6055
6089
  var otherID = ReactMount.getID(otherNode);
6056
- invariant(
6090
+ ("production" !== "development" ? invariant(
6057
6091
  otherID,
6058
6092
  'ReactDOMInput: Mixing React and non-React radio inputs with the ' +
6059
6093
  'same `name` is not supported.'
6060
- );
6094
+ ) : invariant(otherID));
6061
6095
  var otherInstance = instancesByReactID[otherID];
6062
- invariant(
6096
+ ("production" !== "development" ? invariant(
6063
6097
  otherInstance,
6064
6098
  'ReactDOMInput: Unknown radio button ID %s.',
6065
6099
  otherID
6066
- );
6100
+ ) : invariant(otherInstance));
6067
6101
  // In some cases, this will actually change the `checked` state value.
6068
6102
  // In other cases, there's no change but this forces a reconcile upon
6069
6103
  // which componentDidUpdate will reset the DOM property to whatever it
@@ -6081,7 +6115,7 @@ var ReactDOMInput = ReactCompositeComponent.createClass({
6081
6115
 
6082
6116
  module.exports = ReactDOMInput;
6083
6117
 
6084
- },{"./DOMPropertyOperations":9,"./LinkedValueMixin":21,"./ReactCompositeComponent":28,"./ReactDOM":30,"./ReactMount":49,"./invariant":95,"./merge":104}],36:[function(require,module,exports){
6118
+ },{"./DOMPropertyOperations":9,"./LinkedValueMixin":21,"./ReactCompositeComponent":28,"./ReactDOM":30,"./ReactMount":50,"./invariant":98,"./merge":107}],36:[function(require,module,exports){
6085
6119
  /**
6086
6120
  * Copyright 2013 Facebook, Inc.
6087
6121
  *
@@ -6116,7 +6150,7 @@ var ReactDOMOption = ReactCompositeComponent.createClass({
6116
6150
  componentWillMount: function() {
6117
6151
  // TODO (yungsters): Remove support for `selected` in <option>.
6118
6152
  if (this.props.selected != null) {
6119
- if (true) {
6153
+ if ("production" !== "development") {
6120
6154
  console.warn(
6121
6155
  'Use the `defaultValue` or `value` props on <select> instead of ' +
6122
6156
  'setting `selected` on <option>.'
@@ -6173,19 +6207,19 @@ function selectValueType(props, propName, componentName) {
6173
6207
  return;
6174
6208
  }
6175
6209
  if (props.multiple) {
6176
- invariant(
6210
+ ("production" !== "development" ? invariant(
6177
6211
  Array.isArray(props[propName]),
6178
6212
  'The `%s` prop supplied to <select> must be an array if `multiple` is ' +
6179
6213
  'true.',
6180
6214
  propName
6181
- );
6215
+ ) : invariant(Array.isArray(props[propName])));
6182
6216
  } else {
6183
- invariant(
6217
+ ("production" !== "development" ? invariant(
6184
6218
  !Array.isArray(props[propName]),
6185
6219
  'The `%s` prop supplied to <select> must be a scalar value if ' +
6186
6220
  '`multiple` is false.',
6187
6221
  propName
6188
- );
6222
+ ) : invariant(!Array.isArray(props[propName])));
6189
6223
  }
6190
6224
  }
6191
6225
 
@@ -6295,7 +6329,7 @@ var ReactDOMSelect = ReactCompositeComponent.createClass({
6295
6329
 
6296
6330
  module.exports = ReactDOMSelect;
6297
6331
 
6298
- },{"./LinkedValueMixin":21,"./ReactCompositeComponent":28,"./ReactDOM":30,"./invariant":95,"./merge":104}],38:[function(require,module,exports){
6332
+ },{"./LinkedValueMixin":21,"./ReactCompositeComponent":28,"./ReactDOM":30,"./invariant":98,"./merge":107}],38:[function(require,module,exports){
6299
6333
  /**
6300
6334
  * Copyright 2013 Facebook, Inc.
6301
6335
  *
@@ -6435,7 +6469,15 @@ function setModernOffsets(node, offsets) {
6435
6469
  var length = node[getTextContentAccessor()].length;
6436
6470
  var start = Math.min(offsets.start, length);
6437
6471
  var end = typeof offsets.end === 'undefined' ?
6438
- start : Math.min(offsets.end, length);
6472
+ start : Math.min(offsets.end, length);
6473
+
6474
+ // IE 11 uses modern selection, but doesn't support the extend method.
6475
+ // Flip backward selections, so we can set with a single range.
6476
+ if (!selection.extend && start > end) {
6477
+ var temp = end;
6478
+ end = start;
6479
+ start = temp;
6480
+ }
6439
6481
 
6440
6482
  var startMarker = getNodeForCharacterOffset(node, start);
6441
6483
  var endMarker = getNodeForCharacterOffset(node, end);
@@ -6444,8 +6486,15 @@ function setModernOffsets(node, offsets) {
6444
6486
  var range = document.createRange();
6445
6487
  range.setStart(startMarker.node, startMarker.offset);
6446
6488
  selection.removeAllRanges();
6447
- selection.addRange(range);
6448
- selection.extend(endMarker.node, endMarker.offset);
6489
+
6490
+ if (start > end) {
6491
+ selection.addRange(range);
6492
+ selection.extend(endMarker.node, endMarker.offset);
6493
+ } else {
6494
+ range.setEnd(endMarker.node, endMarker.offset);
6495
+ selection.addRange(range);
6496
+ }
6497
+
6449
6498
  range.detach();
6450
6499
  }
6451
6500
  }
@@ -6471,7 +6520,7 @@ var ReactDOMSelection = {
6471
6520
 
6472
6521
  module.exports = ReactDOMSelection;
6473
6522
 
6474
- },{"./getNodeForCharacterOffset":91,"./getTextContentAccessor":93}],39:[function(require,module,exports){
6523
+ },{"./getNodeForCharacterOffset":93,"./getTextContentAccessor":95}],39:[function(require,module,exports){
6475
6524
  /**
6476
6525
  * Copyright 2013 Facebook, Inc.
6477
6526
  *
@@ -6526,21 +6575,21 @@ var ReactDOMTextarea = ReactCompositeComponent.createClass({
6526
6575
  // TODO (yungsters): Remove support for children content in <textarea>.
6527
6576
  var children = this.props.children;
6528
6577
  if (children != null) {
6529
- if (true) {
6578
+ if ("production" !== "development") {
6530
6579
  console.warn(
6531
6580
  'Use the `defaultValue` or `value` props instead of setting ' +
6532
6581
  'children on <textarea>.'
6533
6582
  );
6534
6583
  }
6535
- invariant(
6584
+ ("production" !== "development" ? invariant(
6536
6585
  defaultValue == null,
6537
6586
  'If you supply `defaultValue` on a <textarea>, do not pass children.'
6538
- );
6587
+ ) : invariant(defaultValue == null));
6539
6588
  if (Array.isArray(children)) {
6540
- invariant(
6589
+ ("production" !== "development" ? invariant(
6541
6590
  children.length <= 1,
6542
6591
  '<textarea> can only have at most one child.'
6543
- );
6592
+ ) : invariant(children.length <= 1));
6544
6593
  children = children[0];
6545
6594
  }
6546
6595
 
@@ -6570,10 +6619,10 @@ var ReactDOMTextarea = ReactCompositeComponent.createClass({
6570
6619
  var props = merge(this.props);
6571
6620
  var value = this.getValue();
6572
6621
 
6573
- invariant(
6622
+ ("production" !== "development" ? invariant(
6574
6623
  props.dangerouslySetInnerHTML == null,
6575
6624
  '`dangerouslySetInnerHTML` does not make sense on <textarea>.'
6576
- );
6625
+ ) : invariant(props.dangerouslySetInnerHTML == null));
6577
6626
 
6578
6627
  props.defaultValue = null;
6579
6628
  props.value = value != null ? value : this.state.value;
@@ -6609,7 +6658,7 @@ var ReactDOMTextarea = ReactCompositeComponent.createClass({
6609
6658
 
6610
6659
  module.exports = ReactDOMTextarea;
6611
6660
 
6612
- },{"./DOMPropertyOperations":9,"./LinkedValueMixin":21,"./ReactCompositeComponent":28,"./ReactDOM":30,"./invariant":95,"./merge":104}],40:[function(require,module,exports){
6661
+ },{"./DOMPropertyOperations":9,"./LinkedValueMixin":21,"./ReactCompositeComponent":28,"./ReactDOM":30,"./invariant":98,"./merge":107}],40:[function(require,module,exports){
6613
6662
  /**
6614
6663
  * Copyright 2013 Facebook, Inc.
6615
6664
  *
@@ -6686,7 +6735,7 @@ var ReactDefaultBatchingStrategy = {
6686
6735
 
6687
6736
  module.exports = ReactDefaultBatchingStrategy;
6688
6737
 
6689
- },{"./ReactUpdates":60,"./Transaction":72,"./emptyFunction":81,"./mixInto":107}],41:[function(require,module,exports){
6738
+ },{"./ReactUpdates":61,"./Transaction":73,"./emptyFunction":83,"./mixInto":110}],41:[function(require,module,exports){
6690
6739
  /**
6691
6740
  * Copyright 2013 Facebook, Inc.
6692
6741
  *
@@ -6766,7 +6815,7 @@ function inject() {
6766
6815
 
6767
6816
  DOMProperty.injection.injectDOMPropertyConfig(DefaultDOMPropertyConfig);
6768
6817
 
6769
- if (true) {
6818
+ if ("production" !== "development") {
6770
6819
  ReactPerf.injection.injectMeasure(require("./ReactDefaultPerf").measure);
6771
6820
  }
6772
6821
 
@@ -6779,7 +6828,7 @@ module.exports = {
6779
6828
  inject: inject
6780
6829
  };
6781
6830
 
6782
- },{"./ChangeEventPlugin":5,"./CompositionEventPlugin":6,"./DOMProperty":8,"./DefaultDOMPropertyConfig":11,"./DefaultEventPluginOrder":12,"./EnterLeaveEventPlugin":13,"./EventPluginHub":16,"./MobileSafariClickEventPlugin":22,"./ReactDOM":30,"./ReactDOMButton":31,"./ReactDOMForm":33,"./ReactDOMInput":35,"./ReactDOMOption":36,"./ReactDOMSelect":37,"./ReactDOMTextarea":39,"./ReactDefaultBatchingStrategy":40,"./ReactDefaultPerf":42,"./ReactEventEmitter":43,"./ReactEventTopLevelCallback":45,"./ReactInstanceHandles":47,"./ReactPerf":54,"./ReactUpdates":60,"./SelectEventPlugin":61,"./SimpleEventPlugin":62}],42:[function(require,module,exports){
6831
+ },{"./ChangeEventPlugin":5,"./CompositionEventPlugin":6,"./DOMProperty":8,"./DefaultDOMPropertyConfig":11,"./DefaultEventPluginOrder":12,"./EnterLeaveEventPlugin":13,"./EventPluginHub":16,"./MobileSafariClickEventPlugin":22,"./ReactDOM":30,"./ReactDOMButton":31,"./ReactDOMForm":33,"./ReactDOMInput":35,"./ReactDOMOption":36,"./ReactDOMSelect":37,"./ReactDOMTextarea":39,"./ReactDefaultBatchingStrategy":40,"./ReactDefaultPerf":42,"./ReactEventEmitter":44,"./ReactEventTopLevelCallback":46,"./ReactInstanceHandles":48,"./ReactPerf":55,"./ReactUpdates":61,"./SelectEventPlugin":62,"./SimpleEventPlugin":63}],42:[function(require,module,exports){
6783
6832
  /**
6784
6833
  * Copyright 2013 Facebook, Inc.
6785
6834
  *
@@ -6805,7 +6854,7 @@ var performanceNow = require("./performanceNow");
6805
6854
 
6806
6855
  var ReactDefaultPerf = {};
6807
6856
 
6808
- if (true) {
6857
+ if ("production" !== "development") {
6809
6858
  ReactDefaultPerf = {
6810
6859
  /**
6811
6860
  * Gets the stored information for a given object's function.
@@ -7188,7 +7237,55 @@ if (true) {
7188
7237
 
7189
7238
  module.exports = ReactDefaultPerf;
7190
7239
 
7191
- },{"./performanceNow":112}],43:[function(require,module,exports){
7240
+ },{"./performanceNow":114}],43:[function(require,module,exports){
7241
+ /**
7242
+ * Copyright 2013 Facebook, Inc.
7243
+ *
7244
+ * Licensed under the Apache License, Version 2.0 (the "License");
7245
+ * you may not use this file except in compliance with the License.
7246
+ * You may obtain a copy of the License at
7247
+ *
7248
+ * http://www.apache.org/licenses/LICENSE-2.0
7249
+ *
7250
+ * Unless required by applicable law or agreed to in writing, software
7251
+ * distributed under the License is distributed on an "AS IS" BASIS,
7252
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7253
+ * See the License for the specific language governing permissions and
7254
+ * limitations under the License.
7255
+ *
7256
+ * @providesModule ReactErrorUtils
7257
+ * @typechecks
7258
+ */
7259
+
7260
+ var ReactErrorUtils = {
7261
+ /**
7262
+ * Creates a guarded version of a function. This is supposed to make debugging
7263
+ * of event handlers easier. This implementation provides only basic error
7264
+ * logging and re-throws the error.
7265
+ *
7266
+ * @param {function} func Function to be executed
7267
+ * @param {string} name The name of the guard
7268
+ * @return {function}
7269
+ */
7270
+ guard: function(func, name) {
7271
+ if ("production" !== "development") {
7272
+ return function guarded() {
7273
+ try {
7274
+ return func.apply(this, arguments);
7275
+ } catch(ex) {
7276
+ console.error(name + ': ' + ex.message);
7277
+ throw ex;
7278
+ }
7279
+ };
7280
+ } else {
7281
+ return func;
7282
+ }
7283
+ }
7284
+ };
7285
+
7286
+ module.exports = ReactErrorUtils;
7287
+
7288
+ },{}],44:[function(require,module,exports){
7192
7289
  /**
7193
7290
  * Copyright 2013 Facebook, Inc.
7194
7291
  *
@@ -7346,17 +7443,17 @@ var ReactEventEmitter = merge(ReactEventEmitterMixin, {
7346
7443
  * @param {DOMDocument} contentDocument DOM document to listen on
7347
7444
  */
7348
7445
  ensureListening: function(touchNotMouse, contentDocument) {
7349
- invariant(
7446
+ ("production" !== "development" ? invariant(
7350
7447
  ExecutionEnvironment.canUseDOM,
7351
7448
  'ensureListening(...): Cannot toggle event listening in a Worker ' +
7352
7449
  'thread. This is likely a bug in the framework. Please report ' +
7353
7450
  'immediately.'
7354
- );
7355
- invariant(
7451
+ ) : invariant(ExecutionEnvironment.canUseDOM));
7452
+ ("production" !== "development" ? invariant(
7356
7453
  ReactEventEmitter.TopLevelCallbackCreator,
7357
7454
  'ensureListening(...): Cannot be called without a top level callback ' +
7358
7455
  'creator being injected.'
7359
- );
7456
+ ) : invariant(ReactEventEmitter.TopLevelCallbackCreator));
7360
7457
  // Call out to base implementation.
7361
7458
  ReactEventEmitterMixin.ensureListening.call(
7362
7459
  ReactEventEmitter,
@@ -7373,11 +7470,11 @@ var ReactEventEmitter = merge(ReactEventEmitterMixin, {
7373
7470
  * @param {boolean} enabled True if callbacks should be enabled.
7374
7471
  */
7375
7472
  setEnabled: function(enabled) {
7376
- invariant(
7473
+ ("production" !== "development" ? invariant(
7377
7474
  ExecutionEnvironment.canUseDOM,
7378
7475
  'setEnabled(...): Cannot toggle event listening in a Worker thread. ' +
7379
7476
  'This is likely a bug in the framework. Please report immediately.'
7380
- );
7477
+ ) : invariant(ExecutionEnvironment.canUseDOM));
7381
7478
  if (ReactEventEmitter.TopLevelCallbackCreator) {
7382
7479
  ReactEventEmitter.TopLevelCallbackCreator.setEnabled(enabled);
7383
7480
  }
@@ -7417,10 +7514,10 @@ var ReactEventEmitter = merge(ReactEventEmitterMixin, {
7417
7514
  * @see http://www.quirksmode.org/dom/events/keys.html.
7418
7515
  */
7419
7516
  listenAtTopLevel: function(touchNotMouse, contentDocument) {
7420
- invariant(
7517
+ ("production" !== "development" ? invariant(
7421
7518
  !contentDocument._isListening,
7422
7519
  'listenAtTopLevel(...): Cannot setup top-level listener more than once.'
7423
- );
7520
+ ) : invariant(!contentDocument._isListening));
7424
7521
  var topLevelTypes = EventConstants.topLevelTypes;
7425
7522
  var mountAt = contentDocument;
7426
7523
 
@@ -7432,6 +7529,7 @@ var ReactEventEmitter = merge(ReactEventEmitterMixin, {
7432
7529
  trapBubbledEvent(topLevelTypes.topMouseOut, 'mouseout', mountAt);
7433
7530
  trapBubbledEvent(topLevelTypes.topClick, 'click', mountAt);
7434
7531
  trapBubbledEvent(topLevelTypes.topDoubleClick, 'dblclick', mountAt);
7532
+ trapBubbledEvent(topLevelTypes.topContextMenu, 'contextmenu', mountAt);
7435
7533
  if (touchNotMouse) {
7436
7534
  trapBubbledEvent(topLevelTypes.topTouchStart, 'touchstart', mountAt);
7437
7535
  trapBubbledEvent(topLevelTypes.topTouchEnd, 'touchend', mountAt);
@@ -7530,7 +7628,7 @@ var ReactEventEmitter = merge(ReactEventEmitterMixin, {
7530
7628
 
7531
7629
  module.exports = ReactEventEmitter;
7532
7630
 
7533
- },{"./EventConstants":14,"./EventListener":15,"./EventPluginHub":16,"./ExecutionEnvironment":20,"./ReactEventEmitterMixin":44,"./ViewportMetrics":73,"./invariant":95,"./isEventSupported":96,"./merge":104}],44:[function(require,module,exports){
7631
+ },{"./EventConstants":14,"./EventListener":15,"./EventPluginHub":16,"./ExecutionEnvironment":20,"./ReactEventEmitterMixin":45,"./ViewportMetrics":74,"./invariant":98,"./isEventSupported":99,"./merge":107}],45:[function(require,module,exports){
7534
7632
  /**
7535
7633
  * Copyright 2013 Facebook, Inc.
7536
7634
  *
@@ -7621,7 +7719,7 @@ var ReactEventEmitterMixin = {
7621
7719
 
7622
7720
  module.exports = ReactEventEmitterMixin;
7623
7721
 
7624
- },{"./EventPluginHub":16,"./ReactUpdates":60}],45:[function(require,module,exports){
7722
+ },{"./EventPluginHub":16,"./ReactUpdates":61}],46:[function(require,module,exports){
7625
7723
  /**
7626
7724
  * Copyright 2013 Facebook, Inc.
7627
7725
  *
@@ -7712,7 +7810,7 @@ var ReactEventTopLevelCallback = {
7712
7810
 
7713
7811
  module.exports = ReactEventTopLevelCallback;
7714
7812
 
7715
- },{"./ReactEventEmitter":43,"./ReactMount":49,"./getEventTarget":89}],46:[function(require,module,exports){
7813
+ },{"./ReactEventEmitter":44,"./ReactMount":50,"./getEventTarget":91}],47:[function(require,module,exports){
7716
7814
  /**
7717
7815
  * Copyright 2013 Facebook, Inc.
7718
7816
  *
@@ -7735,11 +7833,11 @@ module.exports = ReactEventTopLevelCallback;
7735
7833
 
7736
7834
  var ReactDOMSelection = require("./ReactDOMSelection");
7737
7835
 
7836
+ var containsNode = require("./containsNode");
7738
7837
  var getActiveElement = require("./getActiveElement");
7739
- var nodeContains = require("./nodeContains");
7740
7838
 
7741
7839
  function isInDocument(node) {
7742
- return nodeContains(document.documentElement, node);
7840
+ return containsNode(document.documentElement, node);
7743
7841
  }
7744
7842
 
7745
7843
  /**
@@ -7854,7 +7952,7 @@ var ReactInputSelection = {
7854
7952
 
7855
7953
  module.exports = ReactInputSelection;
7856
7954
 
7857
- },{"./ReactDOMSelection":38,"./getActiveElement":88,"./nodeContains":109}],47:[function(require,module,exports){
7955
+ },{"./ReactDOMSelection":38,"./containsNode":77,"./getActiveElement":90}],48:[function(require,module,exports){
7858
7956
  /**
7859
7957
  * Copyright 2013 Facebook, Inc.
7860
7958
  *
@@ -7967,19 +8065,19 @@ function getParentID(id) {
7967
8065
  * @private
7968
8066
  */
7969
8067
  function getNextDescendantID(ancestorID, destinationID) {
7970
- invariant(
8068
+ ("production" !== "development" ? invariant(
7971
8069
  isValidID(ancestorID) && isValidID(destinationID),
7972
8070
  'getNextDescendantID(%s, %s): Received an invalid React DOM ID.',
7973
8071
  ancestorID,
7974
8072
  destinationID
7975
- );
7976
- invariant(
8073
+ ) : invariant(isValidID(ancestorID) && isValidID(destinationID)));
8074
+ ("production" !== "development" ? invariant(
7977
8075
  isAncestorIDOf(ancestorID, destinationID),
7978
8076
  'getNextDescendantID(...): React has made an invalid assumption about ' +
7979
8077
  'the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.',
7980
8078
  ancestorID,
7981
8079
  destinationID
7982
- );
8080
+ ) : invariant(isAncestorIDOf(ancestorID, destinationID)));
7983
8081
  if (ancestorID === destinationID) {
7984
8082
  return ancestorID;
7985
8083
  }
@@ -8020,13 +8118,13 @@ function getFirstCommonAncestorID(oneID, twoID) {
8020
8118
  }
8021
8119
  }
8022
8120
  var longestCommonID = oneID.substr(0, lastCommonMarkerIndex);
8023
- invariant(
8121
+ ("production" !== "development" ? invariant(
8024
8122
  isValidID(longestCommonID),
8025
8123
  'getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s',
8026
8124
  oneID,
8027
8125
  twoID,
8028
8126
  longestCommonID
8029
- );
8127
+ ) : invariant(isValidID(longestCommonID)));
8030
8128
  return longestCommonID;
8031
8129
  }
8032
8130
 
@@ -8044,19 +8142,19 @@ function getFirstCommonAncestorID(oneID, twoID) {
8044
8142
  function traverseParentPath(start, stop, cb, arg, skipFirst, skipLast) {
8045
8143
  start = start || '';
8046
8144
  stop = stop || '';
8047
- invariant(
8145
+ ("production" !== "development" ? invariant(
8048
8146
  start !== stop,
8049
8147
  'traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.',
8050
8148
  start
8051
- );
8149
+ ) : invariant(start !== stop));
8052
8150
  var traverseUp = isAncestorIDOf(stop, start);
8053
- invariant(
8151
+ ("production" !== "development" ? invariant(
8054
8152
  traverseUp || isAncestorIDOf(start, stop),
8055
8153
  'traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do ' +
8056
8154
  'not have a parent path.',
8057
8155
  start,
8058
8156
  stop
8059
- );
8157
+ ) : invariant(traverseUp || isAncestorIDOf(start, stop)));
8060
8158
  // Traverse from `start` to `stop` one depth at a time.
8061
8159
  var depth = 0;
8062
8160
  var traverse = traverseUp ? getParentID : getNextDescendantID;
@@ -8068,12 +8166,12 @@ function traverseParentPath(start, stop, cb, arg, skipFirst, skipLast) {
8068
8166
  // Only break //after// visiting `stop`.
8069
8167
  break;
8070
8168
  }
8071
- invariant(
8169
+ ("production" !== "development" ? invariant(
8072
8170
  depth++ < MAX_TREE_DEPTH,
8073
8171
  'traverseParentPath(%s, %s, ...): Detected an infinite loop while ' +
8074
8172
  'traversing the React DOM ID tree. This may be due to malformed IDs: %s',
8075
8173
  start, stop
8076
- );
8174
+ ) : invariant(depth++ < MAX_TREE_DEPTH));
8077
8175
  }
8078
8176
  }
8079
8177
 
@@ -8178,7 +8276,7 @@ var ReactInstanceHandles = {
8178
8276
 
8179
8277
  module.exports = ReactInstanceHandles;
8180
8278
 
8181
- },{"./invariant":95}],48:[function(require,module,exports){
8279
+ },{"./invariant":98}],49:[function(require,module,exports){
8182
8280
  /**
8183
8281
  * Copyright 2013 Facebook, Inc.
8184
8282
  *
@@ -8233,7 +8331,7 @@ var ReactMarkupChecksum = {
8233
8331
 
8234
8332
  module.exports = ReactMarkupChecksum;
8235
8333
 
8236
- },{"./adler32":75}],49:[function(require,module,exports){
8334
+ },{"./adler32":76}],50:[function(require,module,exports){
8237
8335
  /**
8238
8336
  * Copyright 2013 Facebook, Inc.
8239
8337
  *
@@ -8258,9 +8356,9 @@ var ReactEventEmitter = require("./ReactEventEmitter");
8258
8356
  var ReactInstanceHandles = require("./ReactInstanceHandles");
8259
8357
 
8260
8358
  var $ = require("./$");
8359
+ var containsNode = require("./containsNode");
8261
8360
  var getReactRootElementInContainer = require("./getReactRootElementInContainer");
8262
8361
  var invariant = require("./invariant");
8263
- var nodeContains = require("./nodeContains");
8264
8362
 
8265
8363
  var SEPARATOR = ReactInstanceHandles.SEPARATOR;
8266
8364
 
@@ -8276,7 +8374,7 @@ var instancesByReactRootID = {};
8276
8374
  /** Mapping from reactRootID to `container` nodes. */
8277
8375
  var containersByReactRootID = {};
8278
8376
 
8279
- if (true) {
8377
+ if ("production" !== "development") {
8280
8378
  /** __DEV__-only mapping from reactRootID to root elements. */
8281
8379
  var rootElementsByReactRootID = {};
8282
8380
  }
@@ -8306,11 +8404,11 @@ function getID(node) {
8306
8404
  if (nodeCache.hasOwnProperty(id)) {
8307
8405
  var cached = nodeCache[id];
8308
8406
  if (cached !== node) {
8309
- invariant(
8407
+ ("production" !== "development" ? invariant(
8310
8408
  !isValid(cached, id),
8311
8409
  'ReactMount: Two valid but unequal nodes with the same `%s`: %s',
8312
8410
  ATTR_NAME, id
8313
- );
8411
+ ) : invariant(!isValid(cached, id)));
8314
8412
 
8315
8413
  nodeCache[id] = node;
8316
8414
  }
@@ -8370,14 +8468,14 @@ function getNode(id) {
8370
8468
  */
8371
8469
  function isValid(node, id) {
8372
8470
  if (node) {
8373
- invariant(
8471
+ ("production" !== "development" ? invariant(
8374
8472
  internalGetID(node) === id,
8375
8473
  'ReactMount: Unexpected modification of `%s`',
8376
8474
  ATTR_NAME
8377
- );
8475
+ ) : invariant(internalGetID(node) === id));
8378
8476
 
8379
8477
  var container = ReactMount.findReactContainerForID(id);
8380
- if (container && nodeContains(container, node)) {
8478
+ if (container && containsNode(container, node)) {
8381
8479
  return true;
8382
8480
  }
8383
8481
  }
@@ -8447,13 +8545,16 @@ var ReactMount = {
8447
8545
  * @private
8448
8546
  */
8449
8547
  prepareEnvironmentForDOM: function(container) {
8450
- invariant(
8548
+ ("production" !== "development" ? invariant(
8451
8549
  container && (
8452
8550
  container.nodeType === ELEMENT_NODE_TYPE ||
8453
8551
  container.nodeType === DOC_NODE_TYPE
8454
8552
  ),
8455
8553
  'prepareEnvironmentForDOM(...): Target container is not a DOM element.'
8456
- );
8554
+ ) : invariant(container && (
8555
+ container.nodeType === ELEMENT_NODE_TYPE ||
8556
+ container.nodeType === DOC_NODE_TYPE
8557
+ )));
8457
8558
  var doc = container.nodeType === ELEMENT_NODE_TYPE ?
8458
8559
  container.ownerDocument :
8459
8560
  container;
@@ -8477,7 +8578,7 @@ var ReactMount = {
8477
8578
  prevComponent.replaceProps(nextProps, callback);
8478
8579
  });
8479
8580
 
8480
- if (true) {
8581
+ if ("production" !== "development") {
8481
8582
  // Record the root element in case it later gets transplanted.
8482
8583
  rootElementsByReactRootID[getReactRootID(container)] =
8483
8584
  getReactRootElementInContainer(container);
@@ -8518,7 +8619,7 @@ var ReactMount = {
8518
8619
  shouldReuseMarkup
8519
8620
  );
8520
8621
 
8521
- if (true) {
8622
+ if ("production" !== "development") {
8522
8623
  // Record the root element in case it later gets transplanted.
8523
8624
  rootElementsByReactRootID[reactRootID] =
8524
8625
  getReactRootElementInContainer(container);
@@ -8634,7 +8735,7 @@ var ReactMount = {
8634
8735
  ReactMount.unmountComponentFromNode(component, container);
8635
8736
  delete instancesByReactRootID[reactRootID];
8636
8737
  delete containersByReactRootID[reactRootID];
8637
- if (true) {
8738
+ if ("production" !== "development") {
8638
8739
  delete rootElementsByReactRootID[reactRootID];
8639
8740
  }
8640
8741
  return true;
@@ -8644,7 +8745,7 @@ var ReactMount = {
8644
8745
  * @deprecated
8645
8746
  */
8646
8747
  unmountAndReleaseReactRootNode: function() {
8647
- if (true) {
8748
+ if ("production" !== "development") {
8648
8749
  console.warn(
8649
8750
  'unmountAndReleaseReactRootNode() has been renamed to ' +
8650
8751
  'unmountComponentAtNode() and will be removed in the next ' +
@@ -8687,15 +8788,17 @@ var ReactMount = {
8687
8788
  var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(id);
8688
8789
  var container = containersByReactRootID[reactRootID];
8689
8790
 
8690
- if (true) {
8791
+ if ("production" !== "development") {
8691
8792
  var rootElement = rootElementsByReactRootID[reactRootID];
8692
8793
  if (rootElement && rootElement.parentNode !== container) {
8693
- invariant(
8794
+ ("production" !== "development" ? invariant(
8694
8795
  // Call internalGetID here because getID calls isValid which calls
8695
8796
  // findReactContainerForID (this function).
8696
8797
  internalGetID(rootElement) === reactRootID,
8697
8798
  'ReactMount: Root element ID differed from reactRootID.'
8698
- );
8799
+ ) : invariant(// Call internalGetID here because getID calls isValid which calls
8800
+ // findReactContainerForID (this function).
8801
+ internalGetID(rootElement) === reactRootID));
8699
8802
 
8700
8803
  var containerChild = container.firstChild;
8701
8804
  if (containerChild &&
@@ -8809,20 +8912,20 @@ var ReactMount = {
8809
8912
  }
8810
8913
  }
8811
8914
 
8812
- if (true) {
8915
+ if ("production" !== "development") {
8813
8916
  console.error(
8814
8917
  'Error while invoking `findComponentRoot` with the following ' +
8815
8918
  'ancestor node:',
8816
8919
  ancestorNode
8817
8920
  );
8818
8921
  }
8819
- invariant(
8922
+ ("production" !== "development" ? invariant(
8820
8923
  false,
8821
8924
  'findComponentRoot(..., %s): Unable to find element. This probably ' +
8822
8925
  'means the DOM was unexpectedly mutated (e.g. by the browser).',
8823
8926
  id,
8824
8927
  ReactMount.getID(ancestorNode)
8825
- );
8928
+ ) : invariant(false));
8826
8929
  },
8827
8930
 
8828
8931
 
@@ -8847,7 +8950,7 @@ var ReactMount = {
8847
8950
 
8848
8951
  module.exports = ReactMount;
8849
8952
 
8850
- },{"./$":1,"./ReactEventEmitter":43,"./ReactInstanceHandles":47,"./getReactRootElementInContainer":92,"./invariant":95,"./nodeContains":109}],50:[function(require,module,exports){
8953
+ },{"./$":1,"./ReactEventEmitter":44,"./ReactInstanceHandles":48,"./containsNode":77,"./getReactRootElementInContainer":94,"./invariant":98}],51:[function(require,module,exports){
8851
8954
  /**
8852
8955
  * Copyright 2013 Facebook, Inc.
8853
8956
  *
@@ -8944,7 +9047,7 @@ PooledClass.addPoolingTo(ReactMountReady);
8944
9047
 
8945
9048
  module.exports = ReactMountReady;
8946
9049
 
8947
- },{"./PooledClass":23,"./mixInto":107}],51:[function(require,module,exports){
9050
+ },{"./PooledClass":23,"./mixInto":110}],52:[function(require,module,exports){
8948
9051
  /**
8949
9052
  * Copyright 2013 Facebook, Inc.
8950
9053
  *
@@ -9026,8 +9129,8 @@ function enqueueMarkup(parentID, markup, toIndex) {
9026
9129
  parentNode: null,
9027
9130
  type: ReactMultiChildUpdateTypes.INSERT_MARKUP,
9028
9131
  markupIndex: markupQueue.push(markup) - 1,
9029
- fromIndex: null,
9030
9132
  textContent: null,
9133
+ fromIndex: null,
9031
9134
  toIndex: toIndex
9032
9135
  });
9033
9136
  }
@@ -9244,7 +9347,7 @@ var ReactMultiChild = {
9244
9347
  if (shouldUpdateChild(prevChild, nextChild)) {
9245
9348
  this.moveChild(prevChild, nextIndex, lastIndex);
9246
9349
  lastIndex = Math.max(prevChild._mountIndex, lastIndex);
9247
- prevChild.receiveProps(nextChild.props, transaction);
9350
+ prevChild.receiveComponent(nextChild, transaction);
9248
9351
  prevChild._mountIndex = nextIndex;
9249
9352
  } else {
9250
9353
  if (prevChild) {
@@ -9387,7 +9490,7 @@ var ReactMultiChild = {
9387
9490
 
9388
9491
  module.exports = ReactMultiChild;
9389
9492
 
9390
- },{"./ReactComponent":25,"./ReactMultiChildUpdateTypes":52,"./flattenChildren":85}],52:[function(require,module,exports){
9493
+ },{"./ReactComponent":25,"./ReactMultiChildUpdateTypes":53,"./flattenChildren":87}],53:[function(require,module,exports){
9391
9494
  /**
9392
9495
  * Copyright 2013 Facebook, Inc.
9393
9496
  *
@@ -9425,7 +9528,7 @@ var ReactMultiChildUpdateTypes = keyMirror({
9425
9528
 
9426
9529
  module.exports = ReactMultiChildUpdateTypes;
9427
9530
 
9428
- },{"./keyMirror":101}],53:[function(require,module,exports){
9531
+ },{"./keyMirror":104}],54:[function(require,module,exports){
9429
9532
  /**
9430
9533
  * Copyright 2013 Facebook, Inc.
9431
9534
  *
@@ -9503,10 +9606,10 @@ var ReactOwner = {
9503
9606
  * @internal
9504
9607
  */
9505
9608
  addComponentAsRefTo: function(component, ref, owner) {
9506
- invariant(
9609
+ ("production" !== "development" ? invariant(
9507
9610
  ReactOwner.isValidOwner(owner),
9508
9611
  'addComponentAsRefTo(...): Only a ReactOwner can have refs.'
9509
- );
9612
+ ) : invariant(ReactOwner.isValidOwner(owner)));
9510
9613
  owner.attachRef(ref, component);
9511
9614
  },
9512
9615
 
@@ -9520,10 +9623,10 @@ var ReactOwner = {
9520
9623
  * @internal
9521
9624
  */
9522
9625
  removeComponentAsRefFrom: function(component, ref, owner) {
9523
- invariant(
9626
+ ("production" !== "development" ? invariant(
9524
9627
  ReactOwner.isValidOwner(owner),
9525
9628
  'removeComponentAsRefFrom(...): Only a ReactOwner can have refs.'
9526
- );
9629
+ ) : invariant(ReactOwner.isValidOwner(owner)));
9527
9630
  // Check that `component` is still the current ref because we do not want to
9528
9631
  // detach the ref if another component stole it.
9529
9632
  if (owner.refs[ref] === component) {
@@ -9547,11 +9650,11 @@ var ReactOwner = {
9547
9650
  * @private
9548
9651
  */
9549
9652
  attachRef: function(ref, component) {
9550
- invariant(
9653
+ ("production" !== "development" ? invariant(
9551
9654
  component.isOwnedBy(this),
9552
9655
  'attachRef(%s, ...): Only a component\'s owner can store a ref to it.',
9553
9656
  ref
9554
- );
9657
+ ) : invariant(component.isOwnedBy(this)));
9555
9658
  var refs = this.refs || (this.refs = {});
9556
9659
  refs[ref] = component;
9557
9660
  },
@@ -9573,7 +9676,7 @@ var ReactOwner = {
9573
9676
 
9574
9677
  module.exports = ReactOwner;
9575
9678
 
9576
- },{"./invariant":95}],54:[function(require,module,exports){
9679
+ },{"./invariant":98}],55:[function(require,module,exports){
9577
9680
  /**
9578
9681
  * Copyright 2013 Facebook, Inc.
9579
9682
  *
@@ -9617,7 +9720,7 @@ var ReactPerf = {
9617
9720
  * @return {function}
9618
9721
  */
9619
9722
  measure: function(objName, fnName, func) {
9620
- if (true) {
9723
+ if ("production" !== "development") {
9621
9724
  var measuredFunc = null;
9622
9725
  return function() {
9623
9726
  if (ReactPerf.enableMeasure) {
@@ -9642,11 +9745,11 @@ var ReactPerf = {
9642
9745
  }
9643
9746
  };
9644
9747
 
9645
- if (true) {
9748
+ if ("production" !== "development") {
9646
9749
  var ExecutionEnvironment = require("./ExecutionEnvironment");
9647
- var URL = ExecutionEnvironment.canUseDOM ? window.location.href : '';
9750
+ var url = (ExecutionEnvironment.canUseDOM && window.location.href) || '';
9648
9751
  ReactPerf.enableMeasure = ReactPerf.enableMeasure ||
9649
- !!URL.match(/[?&]react_perf\b/);
9752
+ (/[?&]react_perf\b/).test(url);
9650
9753
  }
9651
9754
 
9652
9755
  /**
@@ -9663,7 +9766,7 @@ function _noMeasure(objName, fnName, func) {
9663
9766
 
9664
9767
  module.exports = ReactPerf;
9665
9768
 
9666
- },{"./ExecutionEnvironment":20}],55:[function(require,module,exports){
9769
+ },{"./ExecutionEnvironment":20}],56:[function(require,module,exports){
9667
9770
  /**
9668
9771
  * Copyright 2013 Facebook, Inc.
9669
9772
  *
@@ -9757,14 +9860,14 @@ var ReactPropTransferer = {
9757
9860
  * @protected
9758
9861
  */
9759
9862
  transferPropsTo: function(component) {
9760
- invariant(
9863
+ ("production" !== "development" ? invariant(
9761
9864
  component.props.__owner__ === this,
9762
9865
  '%s: You can\'t call transferPropsTo() on a component that you ' +
9763
9866
  'don\'t own, %s. This usually means you are calling ' +
9764
9867
  'transferPropsTo() on a component passed in as props or children.',
9765
9868
  this.constructor.displayName,
9766
9869
  component.constructor.displayName
9767
- );
9870
+ ) : invariant(component.props.__owner__ === this));
9768
9871
 
9769
9872
  var props = {};
9770
9873
  for (var thatKey in component.props) {
@@ -9793,7 +9896,7 @@ var ReactPropTransferer = {
9793
9896
 
9794
9897
  module.exports = ReactPropTransferer;
9795
9898
 
9796
- },{"./emptyFunction":81,"./invariant":95,"./joinClasses":100,"./merge":104}],56:[function(require,module,exports){
9899
+ },{"./emptyFunction":83,"./invariant":98,"./joinClasses":103,"./merge":107}],57:[function(require,module,exports){
9797
9900
  /**
9798
9901
  * Copyright 2013 Facebook, Inc.
9799
9902
  *
@@ -9888,14 +9991,14 @@ function createPrimitiveTypeChecker(expectedType) {
9888
9991
  if (propType === 'object' && Array.isArray(propValue)) {
9889
9992
  propType = 'array';
9890
9993
  }
9891
- invariant(
9994
+ ("production" !== "development" ? invariant(
9892
9995
  propType === expectedType,
9893
9996
  'Invalid prop `%s` of type `%s` supplied to `%s`, expected `%s`.',
9894
9997
  propName,
9895
9998
  propType,
9896
9999
  componentName,
9897
10000
  expectedType
9898
- );
10001
+ ) : invariant(propType === expectedType));
9899
10002
  }
9900
10003
  return createChainableTypeChecker(validatePrimitiveType);
9901
10004
  }
@@ -9903,26 +10006,26 @@ function createPrimitiveTypeChecker(expectedType) {
9903
10006
  function createEnumTypeChecker(expectedValues) {
9904
10007
  var expectedEnum = createObjectFrom(expectedValues);
9905
10008
  function validateEnumType(propValue, propName, componentName) {
9906
- invariant(
10009
+ ("production" !== "development" ? invariant(
9907
10010
  expectedEnum[propValue],
9908
10011
  'Invalid prop `%s` supplied to `%s`, expected one of %s.',
9909
10012
  propName,
9910
10013
  componentName,
9911
10014
  JSON.stringify(Object.keys(expectedEnum))
9912
- );
10015
+ ) : invariant(expectedEnum[propValue]));
9913
10016
  }
9914
10017
  return createChainableTypeChecker(validateEnumType);
9915
10018
  }
9916
10019
 
9917
10020
  function createInstanceTypeChecker(expectedClass) {
9918
10021
  function validateInstanceType(propValue, propName, componentName) {
9919
- invariant(
10022
+ ("production" !== "development" ? invariant(
9920
10023
  propValue instanceof expectedClass,
9921
10024
  'Invalid prop `%s` supplied to `%s`, expected instance of `%s`.',
9922
10025
  propName,
9923
10026
  componentName,
9924
10027
  expectedClass.name || ANONYMOUS
9925
- );
10028
+ ) : invariant(propValue instanceof expectedClass));
9926
10029
  }
9927
10030
  return createChainableTypeChecker(validateInstanceType);
9928
10031
  }
@@ -9935,12 +10038,12 @@ function createChainableTypeChecker(validate) {
9935
10038
  // Only validate if there is a value to check.
9936
10039
  validate(propValue, propName, componentName || ANONYMOUS);
9937
10040
  } else {
9938
- invariant(
10041
+ ("production" !== "development" ? invariant(
9939
10042
  !isRequired,
9940
10043
  'Required prop `%s` was not specified in `%s`.',
9941
10044
  propName,
9942
10045
  componentName || ANONYMOUS
9943
- );
10046
+ ) : invariant(!isRequired));
9944
10047
  }
9945
10048
  }
9946
10049
  if (!isRequired) {
@@ -9953,7 +10056,7 @@ function createChainableTypeChecker(validate) {
9953
10056
 
9954
10057
  module.exports = Props;
9955
10058
 
9956
- },{"./createObjectFrom":79,"./invariant":95}],57:[function(require,module,exports){
10059
+ },{"./createObjectFrom":81,"./invariant":98}],58:[function(require,module,exports){
9957
10060
  /**
9958
10061
  * Copyright 2013 Facebook, Inc.
9959
10062
  *
@@ -10116,7 +10219,7 @@ PooledClass.addPoolingTo(ReactReconcileTransaction);
10116
10219
 
10117
10220
  module.exports = ReactReconcileTransaction;
10118
10221
 
10119
- },{"./ExecutionEnvironment":20,"./PooledClass":23,"./ReactEventEmitter":43,"./ReactInputSelection":46,"./ReactMountReady":50,"./Transaction":72,"./mixInto":107}],58:[function(require,module,exports){
10222
+ },{"./ExecutionEnvironment":20,"./PooledClass":23,"./ReactEventEmitter":44,"./ReactInputSelection":47,"./ReactMountReady":51,"./Transaction":73,"./mixInto":110}],59:[function(require,module,exports){
10120
10223
  /**
10121
10224
  * Copyright 2013 Facebook, Inc.
10122
10225
  *
@@ -10137,17 +10240,31 @@ module.exports = ReactReconcileTransaction;
10137
10240
  */
10138
10241
  "use strict";
10139
10242
 
10243
+ var ReactComponent = require("./ReactComponent");
10244
+ var ReactInstanceHandles = require("./ReactInstanceHandles");
10140
10245
  var ReactMarkupChecksum = require("./ReactMarkupChecksum");
10141
10246
  var ReactReconcileTransaction = require("./ReactReconcileTransaction");
10142
- var ReactInstanceHandles = require("./ReactInstanceHandles");
10247
+
10248
+ var invariant = require("./invariant");
10143
10249
 
10144
10250
  /**
10145
- * @param {object} component
10251
+ * @param {ReactComponent} component
10146
10252
  * @param {function} callback
10147
10253
  */
10148
10254
  function renderComponentToString(component, callback) {
10149
10255
  // We use a callback API to keep the API async in case in the future we ever
10150
10256
  // need it, but in reality this is a synchronous operation.
10257
+
10258
+ ("production" !== "development" ? invariant(
10259
+ ReactComponent.isValidComponent(component),
10260
+ 'renderComponentToString(): You must pass a valid ReactComponent.'
10261
+ ) : invariant(ReactComponent.isValidComponent(component)));
10262
+
10263
+ ("production" !== "development" ? invariant(
10264
+ typeof callback === 'function',
10265
+ 'renderComponentToString(): You must pass a function as a callback.'
10266
+ ) : invariant(typeof callback === 'function'));
10267
+
10151
10268
  var id = ReactInstanceHandles.createReactRootID();
10152
10269
  var transaction = ReactReconcileTransaction.getPooled();
10153
10270
  transaction.reinitializeTransaction();
@@ -10166,7 +10283,7 @@ module.exports = {
10166
10283
  renderComponentToString: renderComponentToString
10167
10284
  };
10168
10285
 
10169
- },{"./ReactInstanceHandles":47,"./ReactMarkupChecksum":48,"./ReactReconcileTransaction":57}],59:[function(require,module,exports){
10286
+ },{"./ReactComponent":25,"./ReactInstanceHandles":48,"./ReactMarkupChecksum":49,"./ReactReconcileTransaction":58,"./invariant":98}],60:[function(require,module,exports){
10170
10287
  /**
10171
10288
  * Copyright 2013 Facebook, Inc.
10172
10289
  *
@@ -10243,11 +10360,12 @@ mixInto(ReactTextComponent, {
10243
10360
  /**
10244
10361
  * Updates this component by updating the text content.
10245
10362
  *
10246
- * @param {object} nextProps Contains the next text content.
10363
+ * @param {object} nextComponent Contains the next text content.
10247
10364
  * @param {ReactReconcileTransaction} transaction
10248
10365
  * @internal
10249
10366
  */
10250
- receiveProps: function(nextProps, transaction) {
10367
+ receiveComponent: function(nextComponent, transaction) {
10368
+ var nextProps = nextComponent.props;
10251
10369
  if (nextProps.text !== this.props.text) {
10252
10370
  this.props.text = nextProps.text;
10253
10371
  ReactComponent.DOMIDOperations.updateTextContentByID(
@@ -10261,7 +10379,7 @@ mixInto(ReactTextComponent, {
10261
10379
 
10262
10380
  module.exports = ReactTextComponent;
10263
10381
 
10264
- },{"./ReactComponent":25,"./ReactMount":49,"./escapeTextForBrowser":82,"./mixInto":107}],60:[function(require,module,exports){
10382
+ },{"./ReactComponent":25,"./ReactMount":50,"./escapeTextForBrowser":84,"./mixInto":110}],61:[function(require,module,exports){
10265
10383
  /**
10266
10384
  * Copyright 2013 Facebook, Inc.
10267
10385
  *
@@ -10289,7 +10407,7 @@ var dirtyComponents = [];
10289
10407
  var batchingStrategy = null;
10290
10408
 
10291
10409
  function ensureBatchingStrategy() {
10292
- invariant(batchingStrategy, 'ReactUpdates: must inject a batching strategy');
10410
+ ("production" !== "development" ? invariant(batchingStrategy, 'ReactUpdates: must inject a batching strategy') : invariant(batchingStrategy));
10293
10411
  }
10294
10412
 
10295
10413
  function batchedUpdates(callback, param) {
@@ -10356,12 +10474,12 @@ function flushBatchedUpdates() {
10356
10474
  * list of functions which will be executed once the rerender occurs.
10357
10475
  */
10358
10476
  function enqueueUpdate(component, callback) {
10359
- invariant(
10477
+ ("production" !== "development" ? invariant(
10360
10478
  !callback || typeof callback === "function",
10361
10479
  'enqueueUpdate(...): You called `setProps`, `replaceProps`, ' +
10362
10480
  '`setState`, `replaceState`, or `forceUpdate` with a callback that ' +
10363
10481
  'isn\'t callable.'
10364
- );
10482
+ ) : invariant(!callback || typeof callback === "function"));
10365
10483
  ensureBatchingStrategy();
10366
10484
 
10367
10485
  if (!batchingStrategy.isBatchingUpdates) {
@@ -10383,18 +10501,18 @@ function enqueueUpdate(component, callback) {
10383
10501
 
10384
10502
  var ReactUpdatesInjection = {
10385
10503
  injectBatchingStrategy: function(_batchingStrategy) {
10386
- invariant(
10504
+ ("production" !== "development" ? invariant(
10387
10505
  _batchingStrategy,
10388
10506
  'ReactUpdates: must provide a batching strategy'
10389
- );
10390
- invariant(
10507
+ ) : invariant(_batchingStrategy));
10508
+ ("production" !== "development" ? invariant(
10391
10509
  typeof _batchingStrategy.batchedUpdates === 'function',
10392
10510
  'ReactUpdates: must provide a batchedUpdates() function'
10393
- );
10394
- invariant(
10511
+ ) : invariant(typeof _batchingStrategy.batchedUpdates === 'function'));
10512
+ ("production" !== "development" ? invariant(
10395
10513
  typeof _batchingStrategy.isBatchingUpdates === 'boolean',
10396
10514
  'ReactUpdates: must provide an isBatchingUpdates boolean attribute'
10397
- );
10515
+ ) : invariant(typeof _batchingStrategy.isBatchingUpdates === 'boolean'));
10398
10516
  batchingStrategy = _batchingStrategy;
10399
10517
  }
10400
10518
  };
@@ -10408,7 +10526,7 @@ var ReactUpdates = {
10408
10526
 
10409
10527
  module.exports = ReactUpdates;
10410
10528
 
10411
- },{"./invariant":95}],61:[function(require,module,exports){
10529
+ },{"./invariant":98}],62:[function(require,module,exports){
10412
10530
  /**
10413
10531
  * Copyright 2013 Facebook, Inc.
10414
10532
  *
@@ -10437,7 +10555,6 @@ var ReactInputSelection = require("./ReactInputSelection");
10437
10555
  var SyntheticEvent = require("./SyntheticEvent");
10438
10556
 
10439
10557
  var getActiveElement = require("./getActiveElement");
10440
- var isEventSupported = require("./isEventSupported");
10441
10558
  var isTextInputElement = require("./isTextInputElement");
10442
10559
  var keyOf = require("./keyOf");
10443
10560
  var shallowEqual = require("./shallowEqual");
@@ -10454,11 +10571,9 @@ var eventTypes = {
10454
10571
  };
10455
10572
 
10456
10573
  var useSelectionChange = false;
10457
- var useSelect = false;
10458
10574
 
10459
10575
  if (ExecutionEnvironment.canUseDOM) {
10460
10576
  useSelectionChange = 'onselectionchange' in document;
10461
- useSelect = isEventSupported('select');
10462
10577
  }
10463
10578
 
10464
10579
  var activeElement = null;
@@ -10606,6 +10721,7 @@ var SelectEventPlugin = {
10606
10721
  case topLevelTypes.topMouseDown:
10607
10722
  mouseDown = true;
10608
10723
  break;
10724
+ case topLevelTypes.topContextMenu:
10609
10725
  case topLevelTypes.topMouseUp:
10610
10726
  mouseDown = false;
10611
10727
  return constructSelectEvent(nativeEvent);
@@ -10629,7 +10745,7 @@ var SelectEventPlugin = {
10629
10745
 
10630
10746
  module.exports = SelectEventPlugin;
10631
10747
 
10632
- },{"./EventConstants":14,"./EventPluginHub":16,"./EventPropagators":19,"./ExecutionEnvironment":20,"./ReactInputSelection":46,"./SyntheticEvent":65,"./getActiveElement":88,"./isEventSupported":96,"./isTextInputElement":98,"./keyOf":102,"./shallowEqual":113}],62:[function(require,module,exports){
10748
+ },{"./EventConstants":14,"./EventPluginHub":16,"./EventPropagators":19,"./ExecutionEnvironment":20,"./ReactInputSelection":47,"./SyntheticEvent":66,"./getActiveElement":90,"./isTextInputElement":101,"./keyOf":105,"./shallowEqual":115}],63:[function(require,module,exports){
10633
10749
  /**
10634
10750
  * Copyright 2013 Facebook, Inc.
10635
10751
  *
@@ -10679,6 +10795,12 @@ var eventTypes = {
10679
10795
  captured: keyOf({onClickCapture: true})
10680
10796
  }
10681
10797
  },
10798
+ contextMenu: {
10799
+ phasedRegistrationNames: {
10800
+ bubbled: keyOf({onContextMenu: true}),
10801
+ captured: keyOf({onContextMenuCapture: true})
10802
+ }
10803
+ },
10682
10804
  copy: {
10683
10805
  phasedRegistrationNames: {
10684
10806
  bubbled: keyOf({onCopy: true}),
@@ -10848,6 +10970,7 @@ var eventTypes = {
10848
10970
  var topLevelEventsToDispatchConfig = {
10849
10971
  topBlur: eventTypes.blur,
10850
10972
  topClick: eventTypes.click,
10973
+ topContextMenu: eventTypes.contextMenu,
10851
10974
  topCopy: eventTypes.copy,
10852
10975
  topCut: eventTypes.cut,
10853
10976
  topDoubleClick: eventTypes.doubleClick,
@@ -10938,6 +11061,7 @@ var SimpleEventPlugin = {
10938
11061
  return null;
10939
11062
  }
10940
11063
  /* falls through */
11064
+ case topLevelTypes.topContextMenu:
10941
11065
  case topLevelTypes.topDoubleClick:
10942
11066
  case topLevelTypes.topDrag:
10943
11067
  case topLevelTypes.topDragEnd:
@@ -10970,11 +11094,11 @@ var SimpleEventPlugin = {
10970
11094
  EventConstructor = SyntheticClipboardEvent;
10971
11095
  break;
10972
11096
  }
10973
- invariant(
11097
+ ("production" !== "development" ? invariant(
10974
11098
  EventConstructor,
10975
11099
  'SimpleEventPlugin: Unhandled event type, `%s`.',
10976
11100
  topLevelType
10977
- );
11101
+ ) : invariant(EventConstructor));
10978
11102
  var event = EventConstructor.getPooled(
10979
11103
  dispatchConfig,
10980
11104
  topLevelTargetID,
@@ -10988,7 +11112,7 @@ var SimpleEventPlugin = {
10988
11112
 
10989
11113
  module.exports = SimpleEventPlugin;
10990
11114
 
10991
- },{"./EventConstants":14,"./EventPropagators":19,"./SyntheticClipboardEvent":63,"./SyntheticEvent":65,"./SyntheticFocusEvent":66,"./SyntheticKeyboardEvent":67,"./SyntheticMouseEvent":68,"./SyntheticTouchEvent":69,"./SyntheticUIEvent":70,"./SyntheticWheelEvent":71,"./invariant":95,"./keyOf":102}],63:[function(require,module,exports){
11115
+ },{"./EventConstants":14,"./EventPropagators":19,"./SyntheticClipboardEvent":64,"./SyntheticEvent":66,"./SyntheticFocusEvent":67,"./SyntheticKeyboardEvent":68,"./SyntheticMouseEvent":69,"./SyntheticTouchEvent":70,"./SyntheticUIEvent":71,"./SyntheticWheelEvent":72,"./invariant":98,"./keyOf":105}],64:[function(require,module,exports){
10992
11116
  /**
10993
11117
  * Copyright 2013 Facebook, Inc.
10994
11118
  *
@@ -11035,7 +11159,7 @@ SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);
11035
11159
  module.exports = SyntheticClipboardEvent;
11036
11160
 
11037
11161
 
11038
- },{"./SyntheticEvent":65}],64:[function(require,module,exports){
11162
+ },{"./SyntheticEvent":66}],65:[function(require,module,exports){
11039
11163
  /**
11040
11164
  * Copyright 2013 Facebook, Inc.
11041
11165
  *
@@ -11088,7 +11212,7 @@ SyntheticEvent.augmentClass(
11088
11212
  module.exports = SyntheticCompositionEvent;
11089
11213
 
11090
11214
 
11091
- },{"./SyntheticEvent":65}],65:[function(require,module,exports){
11215
+ },{"./SyntheticEvent":66}],66:[function(require,module,exports){
11092
11216
  /**
11093
11217
  * Copyright 2013 Facebook, Inc.
11094
11218
  *
@@ -11170,7 +11294,10 @@ function SyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent) {
11170
11294
  }
11171
11295
  }
11172
11296
 
11173
- if (nativeEvent.defaultPrevented || nativeEvent.returnValue === false) {
11297
+ var defaultPrevented = nativeEvent.defaultPrevented != null ?
11298
+ nativeEvent.defaultPrevented :
11299
+ nativeEvent.returnValue === false;
11300
+ if (defaultPrevented) {
11174
11301
  this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
11175
11302
  } else {
11176
11303
  this.isDefaultPrevented = emptyFunction.thatReturnsFalse;
@@ -11250,7 +11377,7 @@ PooledClass.addPoolingTo(SyntheticEvent, PooledClass.threeArgumentPooler);
11250
11377
 
11251
11378
  module.exports = SyntheticEvent;
11252
11379
 
11253
- },{"./PooledClass":23,"./emptyFunction":81,"./getEventTarget":89,"./merge":104,"./mergeInto":106}],66:[function(require,module,exports){
11380
+ },{"./PooledClass":23,"./emptyFunction":83,"./getEventTarget":91,"./merge":107,"./mergeInto":109}],67:[function(require,module,exports){
11254
11381
  /**
11255
11382
  * Copyright 2013 Facebook, Inc.
11256
11383
  *
@@ -11296,7 +11423,7 @@ SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);
11296
11423
 
11297
11424
  module.exports = SyntheticFocusEvent;
11298
11425
 
11299
- },{"./SyntheticUIEvent":70}],67:[function(require,module,exports){
11426
+ },{"./SyntheticUIEvent":71}],68:[function(require,module,exports){
11300
11427
  /**
11301
11428
  * Copyright 2013 Facebook, Inc.
11302
11429
  *
@@ -11354,7 +11481,7 @@ SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);
11354
11481
 
11355
11482
  module.exports = SyntheticKeyboardEvent;
11356
11483
 
11357
- },{"./SyntheticUIEvent":70}],68:[function(require,module,exports){
11484
+ },{"./SyntheticUIEvent":71}],69:[function(require,module,exports){
11358
11485
  /**
11359
11486
  * Copyright 2013 Facebook, Inc.
11360
11487
  *
@@ -11441,7 +11568,7 @@ SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);
11441
11568
 
11442
11569
  module.exports = SyntheticMouseEvent;
11443
11570
 
11444
- },{"./SyntheticUIEvent":70,"./ViewportMetrics":73}],69:[function(require,module,exports){
11571
+ },{"./SyntheticUIEvent":71,"./ViewportMetrics":74}],70:[function(require,module,exports){
11445
11572
  /**
11446
11573
  * Copyright 2013 Facebook, Inc.
11447
11574
  *
@@ -11493,7 +11620,7 @@ SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);
11493
11620
 
11494
11621
  module.exports = SyntheticTouchEvent;
11495
11622
 
11496
- },{"./SyntheticUIEvent":70}],70:[function(require,module,exports){
11623
+ },{"./SyntheticUIEvent":71}],71:[function(require,module,exports){
11497
11624
  /**
11498
11625
  * Copyright 2013 Facebook, Inc.
11499
11626
  *
@@ -11540,7 +11667,7 @@ SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface);
11540
11667
 
11541
11668
  module.exports = SyntheticUIEvent;
11542
11669
 
11543
- },{"./SyntheticEvent":65}],71:[function(require,module,exports){
11670
+ },{"./SyntheticEvent":66}],72:[function(require,module,exports){
11544
11671
  /**
11545
11672
  * Copyright 2013 Facebook, Inc.
11546
11673
  *
@@ -11584,7 +11711,7 @@ var WheelEventInterface = {
11584
11711
  // Fallback to `wheelDeltaY` for Webkit.
11585
11712
  'wheelDeltaY' in event ? event.wheelDeltaY :
11586
11713
  // Fallback to `wheelDelta` for IE<9.
11587
- 'wheelDelta' in event ? event.wheelData : 0
11714
+ 'wheelDelta' in event ? event.wheelDelta : 0
11588
11715
  );
11589
11716
  },
11590
11717
  deltaZ: null,
@@ -11605,7 +11732,7 @@ SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);
11605
11732
 
11606
11733
  module.exports = SyntheticWheelEvent;
11607
11734
 
11608
- },{"./SyntheticMouseEvent":68}],72:[function(require,module,exports){
11735
+ },{"./SyntheticMouseEvent":69}],73:[function(require,module,exports){
11609
11736
  /**
11610
11737
  * Copyright 2013 Facebook, Inc.
11611
11738
  *
@@ -11748,11 +11875,11 @@ var Mixin = {
11748
11875
  * @return Return value from `method`.
11749
11876
  */
11750
11877
  perform: function(method, scope, a, b, c, d, e, f) {
11751
- invariant(
11878
+ ("production" !== "development" ? invariant(
11752
11879
  !this.isInTransaction(),
11753
11880
  'Transaction.perform(...): Cannot initialize a transaction when there ' +
11754
11881
  'is already an outstanding transaction.'
11755
- );
11882
+ ) : invariant(!this.isInTransaction()));
11756
11883
  var memberStart = Date.now();
11757
11884
  var errorToThrow = null;
11758
11885
  var ret;
@@ -11813,10 +11940,10 @@ var Mixin = {
11813
11940
  * invoked).
11814
11941
  */
11815
11942
  closeAll: function() {
11816
- invariant(
11943
+ ("production" !== "development" ? invariant(
11817
11944
  this.isInTransaction(),
11818
11945
  'Transaction.closeAll(): Cannot close transaction when none are open.'
11819
- );
11946
+ ) : invariant(this.isInTransaction()));
11820
11947
  var transactionWrappers = this.transactionWrappers;
11821
11948
  var wrapperCloseTimes = this.timingMetrics.wrapperCloseTimes;
11822
11949
  var errorToThrow = null;
@@ -11858,7 +11985,7 @@ var Transaction = {
11858
11985
 
11859
11986
  module.exports = Transaction;
11860
11987
 
11861
- },{"./invariant":95}],73:[function(require,module,exports){
11988
+ },{"./invariant":98}],74:[function(require,module,exports){
11862
11989
  /**
11863
11990
  * Copyright 2013 Facebook, Inc.
11864
11991
  *
@@ -11879,6 +12006,8 @@ module.exports = Transaction;
11879
12006
 
11880
12007
  "use strict";
11881
12008
 
12009
+ var getUnboundedScrollPosition = require("./getUnboundedScrollPosition");
12010
+
11882
12011
  var ViewportMetrics = {
11883
12012
 
11884
12013
  currentScrollLeft: 0,
@@ -11886,17 +12015,16 @@ var ViewportMetrics = {
11886
12015
  currentScrollTop: 0,
11887
12016
 
11888
12017
  refreshScrollValues: function() {
11889
- ViewportMetrics.currentScrollLeft =
11890
- document.body.scrollLeft + document.documentElement.scrollLeft;
11891
- ViewportMetrics.currentScrollTop =
11892
- document.body.scrollTop + document.documentElement.scrollTop;
12018
+ var scrollPosition = getUnboundedScrollPosition(window);
12019
+ ViewportMetrics.currentScrollLeft = scrollPosition.x;
12020
+ ViewportMetrics.currentScrollTop = scrollPosition.y;
11893
12021
  }
11894
12022
 
11895
12023
  };
11896
12024
 
11897
12025
  module.exports = ViewportMetrics;
11898
12026
 
11899
- },{}],74:[function(require,module,exports){
12027
+ },{"./getUnboundedScrollPosition":96}],75:[function(require,module,exports){
11900
12028
  /**
11901
12029
  * Copyright 2013 Facebook, Inc.
11902
12030
  *
@@ -11927,10 +12055,10 @@ var invariant = require("./invariant");
11927
12055
  * @return {*|array<*>} An accumulation of items.
11928
12056
  */
11929
12057
  function accumulate(current, next) {
11930
- invariant(
12058
+ ("production" !== "development" ? invariant(
11931
12059
  next != null,
11932
12060
  'accumulate(...): Accumulated items must be not be null or undefined.'
11933
- );
12061
+ ) : invariant(next != null));
11934
12062
  if (current == null) {
11935
12063
  return next;
11936
12064
  } else {
@@ -11952,7 +12080,7 @@ function accumulate(current, next) {
11952
12080
 
11953
12081
  module.exports = accumulate;
11954
12082
 
11955
- },{"./invariant":95}],75:[function(require,module,exports){
12083
+ },{"./invariant":98}],76:[function(require,module,exports){
11956
12084
  /**
11957
12085
  * Copyright 2013 Facebook, Inc.
11958
12086
  *
@@ -11993,7 +12121,58 @@ function adler32(data) {
11993
12121
 
11994
12122
  module.exports = adler32;
11995
12123
 
11996
- },{}],76:[function(require,module,exports){
12124
+ },{}],77:[function(require,module,exports){
12125
+ /**
12126
+ * Copyright 2013 Facebook, Inc.
12127
+ *
12128
+ * Licensed under the Apache License, Version 2.0 (the "License");
12129
+ * you may not use this file except in compliance with the License.
12130
+ * You may obtain a copy of the License at
12131
+ *
12132
+ * http://www.apache.org/licenses/LICENSE-2.0
12133
+ *
12134
+ * Unless required by applicable law or agreed to in writing, software
12135
+ * distributed under the License is distributed on an "AS IS" BASIS,
12136
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12137
+ * See the License for the specific language governing permissions and
12138
+ * limitations under the License.
12139
+ *
12140
+ * @providesModule containsNode
12141
+ * @typechecks
12142
+ */
12143
+
12144
+ var isTextNode = require("./isTextNode");
12145
+
12146
+ /*jslint bitwise:true */
12147
+
12148
+ /**
12149
+ * Checks if a given DOM node contains or is another DOM node.
12150
+ *
12151
+ * @param {?DOMNode} outerNode Outer DOM node.
12152
+ * @param {?DOMNode} innerNode Inner DOM node.
12153
+ * @return {boolean} True if `outerNode` contains or is `innerNode`.
12154
+ */
12155
+ function containsNode(outerNode, innerNode) {
12156
+ if (!outerNode || !innerNode) {
12157
+ return false;
12158
+ } else if (outerNode === innerNode) {
12159
+ return true;
12160
+ } else if (isTextNode(outerNode)) {
12161
+ return false;
12162
+ } else if (isTextNode(innerNode)) {
12163
+ return containsNode(outerNode, innerNode.parentNode);
12164
+ } else if (outerNode.contains) {
12165
+ return outerNode.contains(innerNode);
12166
+ } else if (outerNode.compareDocumentPosition) {
12167
+ return !!(outerNode.compareDocumentPosition(innerNode) & 16);
12168
+ } else {
12169
+ return false;
12170
+ }
12171
+ }
12172
+
12173
+ module.exports = containsNode;
12174
+
12175
+ },{"./isTextNode":102}],78:[function(require,module,exports){
11997
12176
  /**
11998
12177
  * Copyright 2013 Facebook, Inc.
11999
12178
  *
@@ -12022,7 +12201,7 @@ module.exports = adler32;
12022
12201
  function copyProperties(obj, a, b, c, d, e, f) {
12023
12202
  obj = obj || {};
12024
12203
 
12025
- if (true) {
12204
+ if ("production" !== "development") {
12026
12205
  if (f) {
12027
12206
  throw new Error('Too many arguments passed to copyProperties');
12028
12207
  }
@@ -12049,7 +12228,7 @@ function copyProperties(obj, a, b, c, d, e, f) {
12049
12228
 
12050
12229
  module.exports = copyProperties;
12051
12230
 
12052
- },{}],77:[function(require,module,exports){
12231
+ },{}],79:[function(require,module,exports){
12053
12232
  /**
12054
12233
  * Copyright 2013 Facebook, Inc.
12055
12234
  *
@@ -12145,7 +12324,7 @@ function createArrayFrom(obj) {
12145
12324
 
12146
12325
  module.exports = createArrayFrom;
12147
12326
 
12148
- },{}],78:[function(require,module,exports){
12327
+ },{}],80:[function(require,module,exports){
12149
12328
  /**
12150
12329
  * Copyright 2013 Facebook, Inc.
12151
12330
  *
@@ -12207,7 +12386,7 @@ function getNodeName(markup) {
12207
12386
  */
12208
12387
  function createNodesFromMarkup(markup, handleScript) {
12209
12388
  var node = dummyNode;
12210
- invariant(!!dummyNode, 'createNodesFromMarkup dummy not initialized');
12389
+ ("production" !== "development" ? invariant(!!dummyNode, 'createNodesFromMarkup dummy not initialized') : invariant(!!dummyNode));
12211
12390
  var nodeName = getNodeName(markup);
12212
12391
 
12213
12392
  var wrap = nodeName && getMarkupWrap(nodeName);
@@ -12224,10 +12403,10 @@ function createNodesFromMarkup(markup, handleScript) {
12224
12403
 
12225
12404
  var scripts = node.getElementsByTagName('script');
12226
12405
  if (scripts.length) {
12227
- invariant(
12406
+ ("production" !== "development" ? invariant(
12228
12407
  handleScript,
12229
12408
  'createNodesFromMarkup(...): Unexpected <script> element rendered.'
12230
- );
12409
+ ) : invariant(handleScript));
12231
12410
  createArrayFrom(scripts).forEach(handleScript);
12232
12411
  }
12233
12412
 
@@ -12240,7 +12419,7 @@ function createNodesFromMarkup(markup, handleScript) {
12240
12419
 
12241
12420
  module.exports = createNodesFromMarkup;
12242
12421
 
12243
- },{"./ExecutionEnvironment":20,"./createArrayFrom":77,"./getMarkupWrap":90,"./invariant":95}],79:[function(require,module,exports){
12422
+ },{"./ExecutionEnvironment":20,"./createArrayFrom":79,"./getMarkupWrap":92,"./invariant":98}],81:[function(require,module,exports){
12244
12423
  /**
12245
12424
  * Copyright 2013 Facebook, Inc.
12246
12425
  *
@@ -12283,7 +12462,7 @@ module.exports = createNodesFromMarkup;
12283
12462
  * @returns object
12284
12463
  */
12285
12464
  function createObjectFrom(keys, values /* = true */) {
12286
- if (true) {
12465
+ if ("production" !== "development") {
12287
12466
  if (!Array.isArray(keys)) {
12288
12467
  throw new TypeError('Must pass an array of keys.');
12289
12468
  }
@@ -12303,7 +12482,7 @@ function createObjectFrom(keys, values /* = true */) {
12303
12482
 
12304
12483
  module.exports = createObjectFrom;
12305
12484
 
12306
- },{}],80:[function(require,module,exports){
12485
+ },{}],82:[function(require,module,exports){
12307
12486
  /**
12308
12487
  * Copyright 2013 Facebook, Inc.
12309
12488
  *
@@ -12362,7 +12541,7 @@ function dangerousStyleValue(styleName, value) {
12362
12541
 
12363
12542
  module.exports = dangerousStyleValue;
12364
12543
 
12365
- },{"./CSSProperty":2}],81:[function(require,module,exports){
12544
+ },{"./CSSProperty":2}],83:[function(require,module,exports){
12366
12545
  /**
12367
12546
  * Copyright 2013 Facebook, Inc.
12368
12547
  *
@@ -12407,7 +12586,7 @@ copyProperties(emptyFunction, {
12407
12586
 
12408
12587
  module.exports = emptyFunction;
12409
12588
 
12410
- },{"./copyProperties":76}],82:[function(require,module,exports){
12589
+ },{"./copyProperties":78}],84:[function(require,module,exports){
12411
12590
  /**
12412
12591
  * Copyright 2013 Facebook, Inc.
12413
12592
  *
@@ -12456,7 +12635,7 @@ function escapeTextForBrowser(text) {
12456
12635
 
12457
12636
  module.exports = escapeTextForBrowser;
12458
12637
 
12459
- },{}],83:[function(require,module,exports){
12638
+ },{}],85:[function(require,module,exports){
12460
12639
  /**
12461
12640
  * Copyright 2013 Facebook, Inc.
12462
12641
  *
@@ -12507,7 +12686,7 @@ ex._suffix = ']]>';
12507
12686
 
12508
12687
  module.exports = ex;
12509
12688
 
12510
- },{}],84:[function(require,module,exports){
12689
+ },{}],86:[function(require,module,exports){
12511
12690
  /**
12512
12691
  * Copyright 2013 Facebook, Inc.
12513
12692
  *
@@ -12554,7 +12733,7 @@ function filterAttributes(node, func, context) {
12554
12733
 
12555
12734
  module.exports = filterAttributes;
12556
12735
 
12557
- },{}],85:[function(require,module,exports){
12736
+ },{}],87:[function(require,module,exports){
12558
12737
  /**
12559
12738
  * Copyright 2013 Facebook, Inc.
12560
12739
  *
@@ -12586,12 +12765,12 @@ var traverseAllChildren = require("./traverseAllChildren");
12586
12765
  function flattenSingleChildIntoContext(traverseContext, child, name) {
12587
12766
  // We found a component instance.
12588
12767
  var result = traverseContext;
12589
- invariant(
12768
+ ("production" !== "development" ? invariant(
12590
12769
  !result.hasOwnProperty(name),
12591
12770
  'flattenChildren(...): Encountered two children with the same key, `%s`. ' +
12592
12771
  'Children keys must be unique.',
12593
12772
  name
12594
- );
12773
+ ) : invariant(!result.hasOwnProperty(name)));
12595
12774
  result[name] = child;
12596
12775
  }
12597
12776
 
@@ -12610,7 +12789,7 @@ function flattenChildren(children) {
12610
12789
 
12611
12790
  module.exports = flattenChildren;
12612
12791
 
12613
- },{"./invariant":95,"./traverseAllChildren":114}],86:[function(require,module,exports){
12792
+ },{"./invariant":98,"./traverseAllChildren":116}],88:[function(require,module,exports){
12614
12793
  /**
12615
12794
  * Copyright 2013 Facebook, Inc.
12616
12795
  *
@@ -12648,7 +12827,7 @@ var forEachAccumulated = function(arr, cb, scope) {
12648
12827
 
12649
12828
  module.exports = forEachAccumulated;
12650
12829
 
12651
- },{}],87:[function(require,module,exports){
12830
+ },{}],89:[function(require,module,exports){
12652
12831
  /**
12653
12832
  * Copyright 2013 Facebook, Inc.
12654
12833
  *
@@ -12726,7 +12905,7 @@ function _getNodeID(node) {
12726
12905
 
12727
12906
  module.exports = ge;
12728
12907
 
12729
- },{}],88:[function(require,module,exports){
12908
+ },{}],90:[function(require,module,exports){
12730
12909
  /**
12731
12910
  * Copyright 2013 Facebook, Inc.
12732
12911
  *
@@ -12761,7 +12940,7 @@ function getActiveElement() /*?DOMElement*/ {
12761
12940
  module.exports = getActiveElement;
12762
12941
 
12763
12942
 
12764
- },{}],89:[function(require,module,exports){
12943
+ },{}],91:[function(require,module,exports){
12765
12944
  /**
12766
12945
  * Copyright 2013 Facebook, Inc.
12767
12946
  *
@@ -12799,7 +12978,7 @@ function getEventTarget(nativeEvent) {
12799
12978
 
12800
12979
  module.exports = getEventTarget;
12801
12980
 
12802
- },{}],90:[function(require,module,exports){
12981
+ },{}],92:[function(require,module,exports){
12803
12982
  /**
12804
12983
  * Copyright 2013 Facebook, Inc.
12805
12984
  *
@@ -12891,7 +13070,7 @@ var markupWrap = {
12891
13070
  * @return {?array} Markup wrap configuration, if applicable.
12892
13071
  */
12893
13072
  function getMarkupWrap(nodeName) {
12894
- invariant(!!dummyNode, 'Markup wrapping node not initialized');
13073
+ ("production" !== "development" ? invariant(!!dummyNode, 'Markup wrapping node not initialized') : invariant(!!dummyNode));
12895
13074
  if (!markupWrap.hasOwnProperty(nodeName)) {
12896
13075
  nodeName = '*';
12897
13076
  }
@@ -12909,7 +13088,7 @@ function getMarkupWrap(nodeName) {
12909
13088
 
12910
13089
  module.exports = getMarkupWrap;
12911
13090
 
12912
- },{"./ExecutionEnvironment":20,"./invariant":95}],91:[function(require,module,exports){
13091
+ },{"./ExecutionEnvironment":20,"./invariant":98}],93:[function(require,module,exports){
12913
13092
  /**
12914
13093
  * Copyright 2013 Facebook, Inc.
12915
13094
  *
@@ -12991,7 +13170,7 @@ function getNodeForCharacterOffset(root, offset) {
12991
13170
 
12992
13171
  module.exports = getNodeForCharacterOffset;
12993
13172
 
12994
- },{}],92:[function(require,module,exports){
13173
+ },{}],94:[function(require,module,exports){
12995
13174
  /**
12996
13175
  * Copyright 2013 Facebook, Inc.
12997
13176
  *
@@ -13033,7 +13212,7 @@ function getReactRootElementInContainer(container) {
13033
13212
 
13034
13213
  module.exports = getReactRootElementInContainer;
13035
13214
 
13036
- },{}],93:[function(require,module,exports){
13215
+ },{}],95:[function(require,module,exports){
13037
13216
  /**
13038
13217
  * Copyright 2013 Facebook, Inc.
13039
13218
  *
@@ -13075,7 +13254,54 @@ function getTextContentAccessor() {
13075
13254
 
13076
13255
  module.exports = getTextContentAccessor;
13077
13256
 
13078
- },{"./ExecutionEnvironment":20}],94:[function(require,module,exports){
13257
+ },{"./ExecutionEnvironment":20}],96:[function(require,module,exports){
13258
+ /**
13259
+ * Copyright 2013 Facebook, Inc.
13260
+ *
13261
+ * Licensed under the Apache License, Version 2.0 (the "License");
13262
+ * you may not use this file except in compliance with the License.
13263
+ * You may obtain a copy of the License at
13264
+ *
13265
+ * http://www.apache.org/licenses/LICENSE-2.0
13266
+ *
13267
+ * Unless required by applicable law or agreed to in writing, software
13268
+ * distributed under the License is distributed on an "AS IS" BASIS,
13269
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13270
+ * See the License for the specific language governing permissions and
13271
+ * limitations under the License.
13272
+ *
13273
+ * @providesModule getUnboundedScrollPosition
13274
+ * @typechecks
13275
+ */
13276
+
13277
+ "use strict";
13278
+
13279
+ /**
13280
+ * Gets the scroll position of the supplied element or window.
13281
+ *
13282
+ * The return values are unbounded, unlike `getScrollPosition`. This means they
13283
+ * may be negative or exceed the element boundaries (which is possible using
13284
+ * inertial scrolling).
13285
+ *
13286
+ * @param {DOMWindow|DOMElement} scrollable
13287
+ * @return {object} Map with `x` and `y` keys.
13288
+ */
13289
+ function getUnboundedScrollPosition(scrollable) {
13290
+ if (scrollable === window) {
13291
+ return {
13292
+ x: document.documentElement.scrollLeft || document.body.scrollLeft,
13293
+ y: document.documentElement.scrollTop || document.body.scrollTop
13294
+ };
13295
+ }
13296
+ return {
13297
+ x: scrollable.scrollLeft,
13298
+ y: scrollable.scrollTop
13299
+ };
13300
+ }
13301
+
13302
+ module.exports = getUnboundedScrollPosition;
13303
+
13304
+ },{}],97:[function(require,module,exports){
13079
13305
  /**
13080
13306
  * Copyright 2013 Facebook, Inc.
13081
13307
  *
@@ -13112,7 +13338,7 @@ function hyphenate(string) {
13112
13338
 
13113
13339
  module.exports = hyphenate;
13114
13340
 
13115
- },{}],95:[function(require,module,exports){
13341
+ },{}],98:[function(require,module,exports){
13116
13342
  /**
13117
13343
  * Copyright 2013 Facebook, Inc.
13118
13344
  *
@@ -13149,7 +13375,7 @@ function invariant(condition) {
13149
13375
 
13150
13376
  module.exports = invariant;
13151
13377
 
13152
- if (true) {
13378
+ if ("production" !== "development") {
13153
13379
  var invariantDev = function(condition, format, a, b, c, d, e, f) {
13154
13380
  if (format === undefined) {
13155
13381
  throw new Error('invariant requires an error message argument');
@@ -13168,7 +13394,7 @@ if (true) {
13168
13394
  module.exports = invariantDev;
13169
13395
  }
13170
13396
 
13171
- },{}],96:[function(require,module,exports){
13397
+ },{}],99:[function(require,module,exports){
13172
13398
  /**
13173
13399
  * Copyright 2013 Facebook, Inc.
13174
13400
  *
@@ -13244,7 +13470,7 @@ function isEventSupported(eventNameSuffix, capture) {
13244
13470
 
13245
13471
  module.exports = isEventSupported;
13246
13472
 
13247
- },{"./ExecutionEnvironment":20}],97:[function(require,module,exports){
13473
+ },{"./ExecutionEnvironment":20}],100:[function(require,module,exports){
13248
13474
  /**
13249
13475
  * Copyright 2013 Facebook, Inc.
13250
13476
  *
@@ -13279,7 +13505,7 @@ function isNode(object) {
13279
13505
 
13280
13506
  module.exports = isNode;
13281
13507
 
13282
- },{}],98:[function(require,module,exports){
13508
+ },{}],101:[function(require,module,exports){
13283
13509
  /**
13284
13510
  * Copyright 2013 Facebook, Inc.
13285
13511
  *
@@ -13330,7 +13556,7 @@ function isTextInputElement(elem) {
13330
13556
 
13331
13557
  module.exports = isTextInputElement;
13332
13558
 
13333
- },{}],99:[function(require,module,exports){
13559
+ },{}],102:[function(require,module,exports){
13334
13560
  /**
13335
13561
  * Copyright 2013 Facebook, Inc.
13336
13562
  *
@@ -13362,7 +13588,7 @@ function isTextNode(object) {
13362
13588
 
13363
13589
  module.exports = isTextNode;
13364
13590
 
13365
- },{"./isNode":97}],100:[function(require,module,exports){
13591
+ },{"./isNode":100}],103:[function(require,module,exports){
13366
13592
  /**
13367
13593
  * Copyright 2013 Facebook, Inc.
13368
13594
  *
@@ -13408,7 +13634,7 @@ function joinClasses(className/*, ... */) {
13408
13634
 
13409
13635
  module.exports = joinClasses;
13410
13636
 
13411
- },{}],101:[function(require,module,exports){
13637
+ },{}],104:[function(require,module,exports){
13412
13638
  /**
13413
13639
  * Copyright 2013 Facebook, Inc.
13414
13640
  *
@@ -13453,10 +13679,10 @@ var invariant = require("./invariant");
13453
13679
  var keyMirror = function(obj) {
13454
13680
  var ret = {};
13455
13681
  var key;
13456
- invariant(
13682
+ ("production" !== "development" ? invariant(
13457
13683
  obj instanceof Object && !Array.isArray(obj),
13458
13684
  'keyMirror(...): Argument must be an object.'
13459
- );
13685
+ ) : invariant(obj instanceof Object && !Array.isArray(obj)));
13460
13686
  for (key in obj) {
13461
13687
  if (!obj.hasOwnProperty(key)) {
13462
13688
  continue;
@@ -13468,7 +13694,7 @@ var keyMirror = function(obj) {
13468
13694
 
13469
13695
  module.exports = keyMirror;
13470
13696
 
13471
- },{"./invariant":95}],102:[function(require,module,exports){
13697
+ },{"./invariant":98}],105:[function(require,module,exports){
13472
13698
  /**
13473
13699
  * Copyright 2013 Facebook, Inc.
13474
13700
  *
@@ -13511,7 +13737,7 @@ var keyOf = function(oneKeyObj) {
13511
13737
 
13512
13738
  module.exports = keyOf;
13513
13739
 
13514
- },{}],103:[function(require,module,exports){
13740
+ },{}],106:[function(require,module,exports){
13515
13741
  /**
13516
13742
  * Copyright 2013 Facebook, Inc.
13517
13743
  *
@@ -13552,7 +13778,7 @@ function memoizeStringOnly(callback) {
13552
13778
 
13553
13779
  module.exports = memoizeStringOnly;
13554
13780
 
13555
- },{}],104:[function(require,module,exports){
13781
+ },{}],107:[function(require,module,exports){
13556
13782
  /**
13557
13783
  * Copyright 2013 Facebook, Inc.
13558
13784
  *
@@ -13591,7 +13817,7 @@ var merge = function(one, two) {
13591
13817
 
13592
13818
  module.exports = merge;
13593
13819
 
13594
- },{"./mergeInto":106}],105:[function(require,module,exports){
13820
+ },{"./mergeInto":109}],108:[function(require,module,exports){
13595
13821
  /**
13596
13822
  * Copyright 2013 Facebook, Inc.
13597
13823
  *
@@ -13658,12 +13884,12 @@ var mergeHelpers = {
13658
13884
  * @param {*} two Array to merge from.
13659
13885
  */
13660
13886
  checkMergeArrayArgs: function(one, two) {
13661
- invariant(
13887
+ ("production" !== "development" ? invariant(
13662
13888
  Array.isArray(one) && Array.isArray(two),
13663
13889
  'Critical assumptions about the merge functions have been violated. ' +
13664
13890
  'This is the fault of the merge functions themselves, not necessarily ' +
13665
13891
  'the callers.'
13666
- );
13892
+ ) : invariant(Array.isArray(one) && Array.isArray(two)));
13667
13893
  },
13668
13894
 
13669
13895
  /**
@@ -13679,12 +13905,12 @@ var mergeHelpers = {
13679
13905
  * @param {*} arg
13680
13906
  */
13681
13907
  checkMergeObjectArg: function(arg) {
13682
- invariant(
13908
+ ("production" !== "development" ? invariant(
13683
13909
  !isTerminal(arg) && !Array.isArray(arg),
13684
13910
  'Critical assumptions about the merge functions have been violated. ' +
13685
13911
  'This is the fault of the merge functions themselves, not necessarily ' +
13686
13912
  'the callers.'
13687
- );
13913
+ ) : invariant(!isTerminal(arg) && !Array.isArray(arg)));
13688
13914
  },
13689
13915
 
13690
13916
  /**
@@ -13694,11 +13920,11 @@ var mergeHelpers = {
13694
13920
  * @param {number} Level of recursion to validate against maximum.
13695
13921
  */
13696
13922
  checkMergeLevel: function(level) {
13697
- invariant(
13923
+ ("production" !== "development" ? invariant(
13698
13924
  level < MAX_MERGE_DEPTH,
13699
13925
  'Maximum deep merge depth exceeded. You may be attempting to merge ' +
13700
13926
  'circular structures in an unsupported way.'
13701
- );
13927
+ ) : invariant(level < MAX_MERGE_DEPTH));
13702
13928
  },
13703
13929
 
13704
13930
  /**
@@ -13707,11 +13933,11 @@ var mergeHelpers = {
13707
13933
  * @param {string} Array merge strategy.
13708
13934
  */
13709
13935
  checkArrayStrategy: function(strategy) {
13710
- invariant(
13936
+ ("production" !== "development" ? invariant(
13711
13937
  strategy === undefined || strategy in mergeHelpers.ArrayStrategies,
13712
13938
  'You must provide an array strategy to deep merge functions to ' +
13713
13939
  'instruct the deep merge how to resolve merging two arrays.'
13714
- );
13940
+ ) : invariant(strategy === undefined || strategy in mergeHelpers.ArrayStrategies));
13715
13941
  },
13716
13942
 
13717
13943
  /**
@@ -13730,7 +13956,7 @@ var mergeHelpers = {
13730
13956
 
13731
13957
  module.exports = mergeHelpers;
13732
13958
 
13733
- },{"./invariant":95,"./keyMirror":101}],106:[function(require,module,exports){
13959
+ },{"./invariant":98,"./keyMirror":104}],109:[function(require,module,exports){
13734
13960
  /**
13735
13961
  * Copyright 2013 Facebook, Inc.
13736
13962
  *
@@ -13777,7 +14003,7 @@ function mergeInto(one, two) {
13777
14003
 
13778
14004
  module.exports = mergeInto;
13779
14005
 
13780
- },{"./mergeHelpers":105}],107:[function(require,module,exports){
14006
+ },{"./mergeHelpers":108}],110:[function(require,module,exports){
13781
14007
  /**
13782
14008
  * Copyright 2013 Facebook, Inc.
13783
14009
  *
@@ -13813,7 +14039,7 @@ var mixInto = function(constructor, methodBag) {
13813
14039
 
13814
14040
  module.exports = mixInto;
13815
14041
 
13816
- },{}],108:[function(require,module,exports){
14042
+ },{}],111:[function(require,module,exports){
13817
14043
  /**
13818
14044
  * Copyright 2013 Facebook, Inc.
13819
14045
  *
@@ -13849,17 +14075,17 @@ var invariant = require("./invariant");
13849
14075
  * @param {string} markup markup string including <html>.
13850
14076
  */
13851
14077
  function mutateHTMLNodeWithMarkup(node, markup) {
13852
- invariant(
14078
+ ("production" !== "development" ? invariant(
13853
14079
  node.tagName.toLowerCase() === 'html',
13854
14080
  'mutateHTMLNodeWithMarkup(): node must have tagName of "html", got %s',
13855
14081
  node.tagName
13856
- );
14082
+ ) : invariant(node.tagName.toLowerCase() === 'html'));
13857
14083
 
13858
14084
  markup = markup.trim();
13859
- invariant(
14085
+ ("production" !== "development" ? invariant(
13860
14086
  markup.toLowerCase().indexOf('<html') === 0,
13861
14087
  'mutateHTMLNodeWithMarkup(): markup must start with <html'
13862
- );
14088
+ ) : invariant(markup.toLowerCase().indexOf('<html') === 0));
13863
14089
 
13864
14090
  // First let's extract the various pieces of markup.
13865
14091
  var htmlOpenTagEnd = markup.indexOf('>') + 1;
@@ -13915,58 +14141,7 @@ function mutateHTMLNodeWithMarkup(node, markup) {
13915
14141
 
13916
14142
  module.exports = mutateHTMLNodeWithMarkup;
13917
14143
 
13918
- },{"./createNodesFromMarkup":78,"./filterAttributes":84,"./invariant":95}],109:[function(require,module,exports){
13919
- /**
13920
- * Copyright 2013 Facebook, Inc.
13921
- *
13922
- * Licensed under the Apache License, Version 2.0 (the "License");
13923
- * you may not use this file except in compliance with the License.
13924
- * You may obtain a copy of the License at
13925
- *
13926
- * http://www.apache.org/licenses/LICENSE-2.0
13927
- *
13928
- * Unless required by applicable law or agreed to in writing, software
13929
- * distributed under the License is distributed on an "AS IS" BASIS,
13930
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13931
- * See the License for the specific language governing permissions and
13932
- * limitations under the License.
13933
- *
13934
- * @providesModule nodeContains
13935
- * @typechecks
13936
- */
13937
-
13938
- var isTextNode = require("./isTextNode");
13939
-
13940
- /*jslint bitwise:true */
13941
-
13942
- /**
13943
- * Checks if a given DOM node contains or is another DOM node.
13944
- *
13945
- * @param {?DOMNode} outerNode Outer DOM node.
13946
- * @param {?DOMNode} innerNode Inner DOM node.
13947
- * @return {boolean} True if `outerNode` contains or is `innerNode`.
13948
- */
13949
- function nodeContains(outerNode, innerNode) {
13950
- if (!outerNode || !innerNode) {
13951
- return false;
13952
- } else if (outerNode === innerNode) {
13953
- return true;
13954
- } else if (isTextNode(outerNode)) {
13955
- return false;
13956
- } else if (isTextNode(innerNode)) {
13957
- return nodeContains(outerNode, innerNode.parentNode);
13958
- } else if (outerNode.contains) {
13959
- return outerNode.contains(innerNode);
13960
- } else if (outerNode.compareDocumentPosition) {
13961
- return !!(outerNode.compareDocumentPosition(innerNode) & 16);
13962
- } else {
13963
- return false;
13964
- }
13965
- }
13966
-
13967
- module.exports = nodeContains;
13968
-
13969
- },{"./isTextNode":99}],110:[function(require,module,exports){
14144
+ },{"./createNodesFromMarkup":80,"./filterAttributes":86,"./invariant":98}],112:[function(require,module,exports){
13970
14145
  /**
13971
14146
  * Copyright 2013 Facebook, Inc.
13972
14147
  *
@@ -14015,7 +14190,7 @@ function objMap(obj, func, context) {
14015
14190
 
14016
14191
  module.exports = objMap;
14017
14192
 
14018
- },{}],111:[function(require,module,exports){
14193
+ },{}],113:[function(require,module,exports){
14019
14194
  /**
14020
14195
  * Copyright 2013 Facebook, Inc.
14021
14196
  *
@@ -14064,7 +14239,7 @@ function objMapKeyVal(obj, func, context) {
14064
14239
 
14065
14240
  module.exports = objMapKeyVal;
14066
14241
 
14067
- },{}],112:[function(require,module,exports){
14242
+ },{}],114:[function(require,module,exports){
14068
14243
  /**
14069
14244
  * Copyright 2013 Facebook, Inc.
14070
14245
  *
@@ -14108,7 +14283,7 @@ var performanceNow = performance.now.bind(performance);
14108
14283
 
14109
14284
  module.exports = performanceNow;
14110
14285
 
14111
- },{"./ExecutionEnvironment":20}],113:[function(require,module,exports){
14286
+ },{"./ExecutionEnvironment":20}],115:[function(require,module,exports){
14112
14287
  /**
14113
14288
  * Copyright 2013 Facebook, Inc.
14114
14289
  *
@@ -14159,7 +14334,7 @@ function shallowEqual(objA, objB) {
14159
14334
 
14160
14335
  module.exports = shallowEqual;
14161
14336
 
14162
- },{}],114:[function(require,module,exports){
14337
+ },{}],116:[function(require,module,exports){
14163
14338
  /**
14164
14339
  * Copyright 2013 Facebook, Inc.
14165
14340
  *
@@ -14235,11 +14410,11 @@ var traverseAllChildrenImpl =
14235
14410
  subtreeCount = 1;
14236
14411
  } else {
14237
14412
  if (type === 'object') {
14238
- invariant(
14413
+ ("production" !== "development" ? invariant(
14239
14414
  !children || children.nodeType !== 1,
14240
14415
  'traverseAllChildren(...): Encountered an invalid child; DOM ' +
14241
14416
  'elements are not valid children of React components.'
14242
- );
14417
+ ) : invariant(!children || children.nodeType !== 1));
14243
14418
  for (var key in children) {
14244
14419
  if (children.hasOwnProperty(key)) {
14245
14420
  subtreeCount += traverseAllChildrenImpl(
@@ -14288,7 +14463,7 @@ function traverseAllChildren(children, callback, traverseContext) {
14288
14463
 
14289
14464
  module.exports = traverseAllChildren;
14290
14465
 
14291
- },{"./ReactComponent":25,"./ReactTextComponent":59,"./invariant":95}]},{},[24])
14466
+ },{"./ReactComponent":25,"./ReactTextComponent":60,"./invariant":98}]},{},[24])
14292
14467
  (24)
14293
14468
  });
14294
14469
  ;