Skip to content

Instantly share code, notes, and snippets.

@hoorayimhelping
Created September 16, 2015 19:59
Show Gist options
  • Save hoorayimhelping/026b818fb9b49ea4a02a to your computer and use it in GitHub Desktop.
Save hoorayimhelping/026b818fb9b49ea4a02a to your computer and use it in GitHub Desktop.
diff --git a/index.html b/index.html
index d9c7175..6f81718 100644
--- a/index.html
+++ b/index.html
@@ -1,10 +1,12 @@
<!DOCTYPE html>
<html>
<head>
-<title>Delta-V Maps</title>
+ <link rel="stylesheet" media="screen" type="text/css" href="styles/main.css">
+ <title>Delta-V Maps</title>
</head>
-
<body>
-<script type="text/javascript" src="js/app.js"></script>
+ <canvas width="600" height="600"></canvas>
+
+ <script type="text/javascript" src="js/app.js"></script>
</body>
</html>
\ No newline at end of file
diff --git a/js/app.js b/js/app.js
index 4c18c61..94221eb 100644
--- a/js/app.js
+++ b/js/app.js
@@ -686,7 +686,7 @@ if (ExecutionEnvironment.canUseDOM) {
}
}
-if ("production" !== "production") {
+if ("production" !== "development") {
// 'msTransform' is correct, but the other prefixes should be capitalized
var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
@@ -702,7 +702,7 @@ if ("production" !== "production") {
}
warnedStyleNames[name] = true;
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
false,
'Unsupported style property %s. Did you mean %s?',
name,
@@ -716,7 +716,7 @@ if ("production" !== "production") {
}
warnedStyleNames[name] = true;
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
false,
'Unsupported vendor-prefixed style property %s. Did you mean %s?',
name,
@@ -730,7 +730,7 @@ if ("production" !== "production") {
}
warnedStyleValues[value] = true;
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
false,
'Style property values shouldn\'t contain a semicolon. ' +
'Try "%s: %s" instead.',
@@ -778,7 +778,7 @@ var CSSPropertyOperations = {
continue;
}
var styleValue = styles[styleName];
- if ("production" !== "production") {
+ if ("production" !== "development") {
warnValidStyle(styleName, styleValue);
}
if (styleValue != null) {
@@ -802,7 +802,7 @@ var CSSPropertyOperations = {
if (!styles.hasOwnProperty(styleName)) {
continue;
}
- if ("production" !== "production") {
+ if ("production" !== "development") {
warnValidStyle(styleName, styles[styleName]);
}
var styleValue = dangerousStyleValue(styleName, styles[styleName]);
@@ -891,7 +891,7 @@ assign(CallbackQueue.prototype, {
var callbacks = this._callbacks;
var contexts = this._contexts;
if (callbacks) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
callbacks.length === contexts.length,
'Mismatched list of contexts in callback queue'
) : invariant(callbacks.length === contexts.length));
@@ -1407,7 +1407,7 @@ var DOMChildrenOperations = {
var updatedChild = update.parentNode.childNodes[updatedIndex];
var parentID = update.parentID;
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
updatedChild,
'processUpdates(): Unable to find child %s of element. This ' +
'probably means the DOM was unexpectedly mutated (e.g., by the ' +
@@ -1545,7 +1545,7 @@ var DOMPropertyInjection = {
}
for (var propName in Properties) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
!DOMProperty.isStandardName.hasOwnProperty(propName),
'injectDOMPropertyConfig(...): You\'re trying to inject DOM property ' +
'\'%s\' which has already been injected. You may be accidentally ' +
@@ -1594,21 +1594,21 @@ var DOMPropertyInjection = {
DOMProperty.hasOverloadedBooleanValue[propName] =
checkMask(propConfig, DOMPropertyInjection.HAS_OVERLOADED_BOOLEAN_VALUE);
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
!DOMProperty.mustUseAttribute[propName] ||
!DOMProperty.mustUseProperty[propName],
'DOMProperty: Cannot require using both attribute and property: %s',
propName
) : invariant(!DOMProperty.mustUseAttribute[propName] ||
!DOMProperty.mustUseProperty[propName]));
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
DOMProperty.mustUseProperty[propName] ||
!DOMProperty.hasSideEffects[propName],
'DOMProperty: Properties that have side effects must use property: %s',
propName
) : invariant(DOMProperty.mustUseProperty[propName] ||
!DOMProperty.hasSideEffects[propName]));
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
!!DOMProperty.hasBooleanValue[propName] +
!!DOMProperty.hasNumericValue[propName] +
!!DOMProperty.hasOverloadedBooleanValue[propName] <= 1,
@@ -1796,7 +1796,7 @@ function shouldIgnoreValue(name, value) {
(DOMProperty.hasOverloadedBooleanValue[name] && value === false);
}
-if ("production" !== "production") {
+if ("production" !== "development") {
var reactProps = {
children: true,
dangerouslySetInnerHTML: true,
@@ -1825,7 +1825,7 @@ if ("production" !== "production") {
// For now, only warn when we have a suggested correction. This prevents
// logging too much when using transferPropsTo.
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
standardName == null,
'Unknown DOM property %s. Did you mean %s?',
name,
@@ -1875,7 +1875,7 @@ var DOMPropertyOperations = {
return '';
}
return name + '=' + quoteAttributeValueForBrowser(value);
- } else if ("production" !== "production") {
+ } else if ("production" !== "development") {
warnUnknownProperty(name);
}
return null;
@@ -1917,7 +1917,7 @@ var DOMPropertyOperations = {
} else {
node.setAttribute(name, '' + value);
}
- } else if ("production" !== "production") {
+ } else if ("production" !== "development") {
warnUnknownProperty(name);
}
},
@@ -1949,7 +1949,7 @@ var DOMPropertyOperations = {
}
} else if (DOMProperty.isCustomAttribute(name)) {
node.removeAttribute(name);
- } else if ("production" !== "production") {
+ } else if ("production" !== "development") {
warnUnknownProperty(name);
}
}
@@ -2012,7 +2012,7 @@ var Danger = {
* @internal
*/
dangerouslyRenderMarkup: function(markupList) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
ExecutionEnvironment.canUseDOM,
'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' +
'thread. Make sure `window` and `document` are available globally ' +
@@ -2023,7 +2023,7 @@ var Danger = {
var markupByNodeName = {};
// Group markup by `nodeName` if a wrap is necessary, else by '*'.
for (var i = 0; i < markupList.length; i++) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
markupList[i],
'dangerouslyRenderMarkup(...): Missing markup.'
) : invariant(markupList[i]));
@@ -2073,7 +2073,7 @@ var Danger = {
resultIndex = +renderNode.getAttribute(RESULT_INDEX_ATTR);
renderNode.removeAttribute(RESULT_INDEX_ATTR);
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
!resultList.hasOwnProperty(resultIndex),
'Danger: Assigning to an already-occupied result index.'
) : invariant(!resultList.hasOwnProperty(resultIndex)));
@@ -2084,7 +2084,7 @@ var Danger = {
// we're done.
resultListAssignmentCount += 1;
- } else if ("production" !== "production") {
+ } else if ("production" !== "development") {
console.error(
'Danger: Discarding unexpected node:',
renderNode
@@ -2095,12 +2095,12 @@ var Danger = {
// Although resultList was populated out of order, it should now be a dense
// array.
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
resultListAssignmentCount === resultList.length,
'Danger: Did not assign to every index of resultList.'
) : invariant(resultListAssignmentCount === resultList.length));
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
resultList.length === markupList.length,
'Danger: Expected markup to render %s nodes, but rendered %s.',
markupList.length,
@@ -2119,15 +2119,15 @@ var Danger = {
* @internal
*/
dangerouslyReplaceNodeWithMarkup: function(oldChild, markup) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
ExecutionEnvironment.canUseDOM,
'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a ' +
'worker thread. Make sure `window` and `document` are available ' +
'globally before requiring React when unit testing or use ' +
'React.renderToString for server rendering.'
) : invariant(ExecutionEnvironment.canUseDOM));
- ("production" !== "production" ? invariant(markup, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : invariant(markup));
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(markup, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : invariant(markup));
+ ("production" !== "development" ? invariant(
oldChild.tagName.toLowerCase() !== 'html',
'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the ' +
'<html> node. This is because browser quirks make this unreliable ' +
@@ -2457,7 +2457,7 @@ var EventListener = {
*/
capture: function(target, eventType, callback) {
if (!target.addEventListener) {
- if ("production" !== "production") {
+ if ("production" !== "development") {
console.error(
'Attempted to listen to events during the capture phase on a ' +
'browser that does not support the capture phase. Your application ' +
@@ -2547,7 +2547,7 @@ function validateInstanceHandle() {
InstanceHandle &&
InstanceHandle.traverseTwoPhase &&
InstanceHandle.traverseEnterLeave;
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
valid,
'InstanceHandle not injected before use!'
) : invariant(valid));
@@ -2594,13 +2594,13 @@ var EventPluginHub = {
*/
injectInstanceHandle: function(InjectedInstanceHandle) {
InstanceHandle = InjectedInstanceHandle;
- if ("production" !== "production") {
+ if ("production" !== "development") {
validateInstanceHandle();
}
},
getInstanceHandle: function() {
- if ("production" !== "production") {
+ if ("production" !== "development") {
validateInstanceHandle();
}
return InstanceHandle;
@@ -2631,7 +2631,7 @@ var EventPluginHub = {
* @param {?function} listener The callback to store.
*/
putListener: function(id, registrationName, listener) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
!listener || typeof listener === 'function',
'Expected %s listener to be a function, instead got type %s',
registrationName, typeof listener
@@ -2736,7 +2736,7 @@ var EventPluginHub = {
var processingEventQueue = eventQueue;
eventQueue = null;
forEachAccumulated(processingEventQueue, executeDispatchesAndRelease);
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
!eventQueue,
'processEventQueue(): Additional events were enqueued while processing ' +
'an event queue. Support for this has not yet been implemented.'
@@ -2798,7 +2798,7 @@ function recomputePluginOrdering() {
for (var pluginName in namesToPlugins) {
var PluginModule = namesToPlugins[pluginName];
var pluginIndex = EventPluginOrder.indexOf(pluginName);
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
pluginIndex > -1,
'EventPluginRegistry: Cannot inject event plugins that do not exist in ' +
'the plugin ordering, `%s`.',
@@ -2807,7 +2807,7 @@ function recomputePluginOrdering() {
if (EventPluginRegistry.plugins[pluginIndex]) {
continue;
}
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
PluginModule.extractEvents,
'EventPluginRegistry: Event plugins must implement an `extractEvents` ' +
'method, but `%s` does not.',
@@ -2816,7 +2816,7 @@ function recomputePluginOrdering() {
EventPluginRegistry.plugins[pluginIndex] = PluginModule;
var publishedEvents = PluginModule.eventTypes;
for (var eventName in publishedEvents) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
publishEventForPlugin(
publishedEvents[eventName],
PluginModule,
@@ -2843,7 +2843,7 @@ function recomputePluginOrdering() {
* @private
*/
function publishEventForPlugin(dispatchConfig, PluginModule, eventName) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName),
'EventPluginHub: More than one plugin attempted to publish the same ' +
'event name, `%s`.',
@@ -2884,7 +2884,7 @@ function publishEventForPlugin(dispatchConfig, PluginModule, eventName) {
* @private
*/
function publishRegistrationName(registrationName, PluginModule, eventName) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
!EventPluginRegistry.registrationNameModules[registrationName],
'EventPluginHub: More than one plugin attempted to publish the same ' +
'registration name, `%s`.',
@@ -2932,7 +2932,7 @@ var EventPluginRegistry = {
* @see {EventPluginHub.injection.injectEventPluginOrder}
*/
injectEventPluginOrder: function(InjectedEventPluginOrder) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
!EventPluginOrder,
'EventPluginRegistry: Cannot inject event plugin ordering more than ' +
'once. You are likely trying to load more than one copy of React.'
@@ -2961,7 +2961,7 @@ var EventPluginRegistry = {
var PluginModule = injectedNamesToPlugins[pluginName];
if (!namesToPlugins.hasOwnProperty(pluginName) ||
namesToPlugins[pluginName] !== PluginModule) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
!namesToPlugins[pluginName],
'EventPluginRegistry: Cannot inject two different event plugins ' +
'using the same name, `%s`.',
@@ -3066,8 +3066,8 @@ var injection = {
Mount: null,
injectMount: function(InjectedMount) {
injection.Mount = InjectedMount;
- if ("production" !== "production") {
- ("production" !== "production" ? invariant(
+ if ("production" !== "development") {
+ ("production" !== "development" ? invariant(
InjectedMount && InjectedMount.getNode,
'EventPluginUtils.injection.injectMount(...): Injected Mount module ' +
'is missing getNode.'
@@ -3095,7 +3095,7 @@ function isStartish(topLevelType) {
var validateEventDispatches;
-if ("production" !== "production") {
+if ("production" !== "development") {
validateEventDispatches = function(event) {
var dispatchListeners = event._dispatchListeners;
var dispatchIDs = event._dispatchIDs;
@@ -3107,7 +3107,7 @@ if ("production" !== "production") {
dispatchListeners.length :
dispatchListeners ? 1 : 0;
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
idsIsArr === listenersIsArr && IDsLen === listenersLen,
'EventPluginUtils: Invalid `event`.'
) : invariant(idsIsArr === listenersIsArr && IDsLen === listenersLen));
@@ -3122,7 +3122,7 @@ if ("production" !== "production") {
function forEachEventDispatch(event, cb) {
var dispatchListeners = event._dispatchListeners;
var dispatchIDs = event._dispatchIDs;
- if ("production" !== "production") {
+ if ("production" !== "development") {
validateEventDispatches(event);
}
if (Array.isArray(dispatchListeners)) {
@@ -3170,7 +3170,7 @@ function executeDispatchesInOrder(event, cb) {
function executeDispatchesInOrderStopAtTrueImpl(event) {
var dispatchListeners = event._dispatchListeners;
var dispatchIDs = event._dispatchIDs;
- if ("production" !== "production") {
+ if ("production" !== "development") {
validateEventDispatches(event);
}
if (Array.isArray(dispatchListeners)) {
@@ -3211,12 +3211,12 @@ function executeDispatchesInOrderStopAtTrue(event) {
* @return The return value of executing the single dispatch.
*/
function executeDirectDispatch(event) {
- if ("production" !== "production") {
+ if ("production" !== "development") {
validateEventDispatches(event);
}
var dispatchListener = event._dispatchListeners;
var dispatchID = event._dispatchIDs;
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
!Array.isArray(dispatchListener),
'executeDirectDispatch(...): Invalid `event`.'
) : invariant(!Array.isArray(dispatchListener)));
@@ -3295,7 +3295,7 @@ function listenerAtPhase(id, event, propagationPhase) {
* "dispatch" object that pairs the event with the listener.
*/
function accumulateDirectionalDispatches(domID, upwards, event) {
- if ("production" !== "production") {
+ if ("production" !== "development") {
if (!domID) {
throw new Error('Dispatching id must not be null');
}
@@ -3771,7 +3771,7 @@ var hasReadOnlyValue = {
};
function _assertSingleLink(input) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
input.props.checkedLink == null || input.props.valueLink == null,
'Cannot provide a checkedLink and a valueLink. If you want to use ' +
'checkedLink, you probably don\'t want to use valueLink and vice versa.'
@@ -3779,7 +3779,7 @@ function _assertSingleLink(input) {
}
function _assertValueLink(input) {
_assertSingleLink(input);
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
input.props.value == null && input.props.onChange == null,
'Cannot provide a valueLink and a value or onChange event. If you want ' +
'to use value or onChange, you probably don\'t want to use valueLink.'
@@ -3788,7 +3788,7 @@ function _assertValueLink(input) {
function _assertCheckedLink(input) {
_assertSingleLink(input);
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
input.props.checked == null && input.props.onChange == null,
'Cannot provide a checkedLink and a checked property or onChange event. ' +
'If you want to use checked or onChange, you probably don\'t want to ' +
@@ -3921,11 +3921,11 @@ function remove(event) {
var LocalEventTrapMixin = {
trapBubbledEvent:function(topLevelType, handlerBaseName) {
- ("production" !== "production" ? invariant(this.isMounted(), 'Must be mounted to trap events') : invariant(this.isMounted()));
+ ("production" !== "development" ? invariant(this.isMounted(), 'Must be mounted to trap events') : invariant(this.isMounted()));
// If a component renders to null or if another component fatals and causes
// the state of the tree to be corrupted, `node` here can be null.
var node = this.getDOMNode();
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
node,
'LocalEventTrapMixin.trapBubbledEvent(...): Requires node to be rendered.'
) : invariant(node));
@@ -4126,7 +4126,7 @@ var fiveArgumentPooler = function(a1, a2, a3, a4, a5) {
var standardReleaser = function(instance) {
var Klass = this;
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
instance instanceof Klass,
'Trying to release an instance into a pool of a different type.'
) : invariant(instance instanceof Klass));
@@ -4215,7 +4215,7 @@ var createElement = ReactElement.createElement;
var createFactory = ReactElement.createFactory;
var cloneElement = ReactElement.cloneElement;
-if ("production" !== "production") {
+if ("production" !== "development") {
createElement = ReactElementValidator.createElement;
createFactory = ReactElementValidator.createFactory;
cloneElement = ReactElementValidator.cloneElement;
@@ -4272,7 +4272,7 @@ if (
});
}
-if ("production" !== "production") {
+if ("production" !== "development") {
var ExecutionEnvironment = require("./ExecutionEnvironment");
if (ExecutionEnvironment.canUseDOM && window.top === window.self) {
@@ -4917,8 +4917,8 @@ function mapSingleChildIntoContext(traverseContext, child, name, i) {
var mapResult = mapBookKeeping.mapResult;
var keyUnique = !mapResult.hasOwnProperty(name);
- if ("production" !== "production") {
- ("production" !== "production" ? warning(
+ if ("production" !== "development") {
+ ("production" !== "development" ? warning(
keyUnique,
'ReactChildren.map(...): Encountered two children with the same key, ' +
'`%s`. Child keys must be unique; when two children share a key, only ' +
@@ -5313,7 +5313,7 @@ var RESERVED_SPEC_KEYS = {
}
},
childContextTypes: function(Constructor, childContextTypes) {
- if ("production" !== "production") {
+ if ("production" !== "development") {
validateTypeDef(
Constructor,
childContextTypes,
@@ -5327,7 +5327,7 @@ var RESERVED_SPEC_KEYS = {
);
},
contextTypes: function(Constructor, contextTypes) {
- if ("production" !== "production") {
+ if ("production" !== "development") {
validateTypeDef(
Constructor,
contextTypes,
@@ -5355,7 +5355,7 @@ var RESERVED_SPEC_KEYS = {
}
},
propTypes: function(Constructor, propTypes) {
- if ("production" !== "production") {
+ if ("production" !== "development") {
validateTypeDef(
Constructor,
propTypes,
@@ -5378,7 +5378,7 @@ function validateTypeDef(Constructor, typeDef, location) {
if (typeDef.hasOwnProperty(propName)) {
// use a warning instead of an invariant so components
// don't show up in prod but not in __DEV__
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
typeof typeDef[propName] === 'function',
'%s: %s type `%s` is invalid; it must be a function, usually from ' +
'React.PropTypes.',
@@ -5397,7 +5397,7 @@ function validateMethodOverride(proto, name) {
// Disallow overriding of base class methods unless explicitly allowed.
if (ReactClassMixin.hasOwnProperty(name)) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
specPolicy === SpecPolicy.OVERRIDE_BASE,
'ReactClassInterface: You are attempting to override ' +
'`%s` from your class specification. Ensure that your method names ' +
@@ -5408,7 +5408,7 @@ function validateMethodOverride(proto, name) {
// Disallow defining methods more than once unless explicitly allowed.
if (proto.hasOwnProperty(name)) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
specPolicy === SpecPolicy.DEFINE_MANY ||
specPolicy === SpecPolicy.DEFINE_MANY_MERGED,
'ReactClassInterface: You are attempting to define ' +
@@ -5429,12 +5429,12 @@ function mixSpecIntoComponent(Constructor, spec) {
return;
}
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
typeof spec !== 'function',
'ReactClass: You\'re attempting to ' +
'use a component class as a mixin. Instead, just use a regular object.'
) : invariant(typeof spec !== 'function'));
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
!ReactElement.isValidElement(spec),
'ReactClass: You\'re attempting to ' +
'use a component as a mixin. Instead, just use a regular object.'
@@ -5491,7 +5491,7 @@ function mixSpecIntoComponent(Constructor, spec) {
var specPolicy = ReactClassInterface[name];
// These cases should already be caught by validateMethodOverride
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
isReactClassMethod && (
(specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY)
),
@@ -5512,7 +5512,7 @@ function mixSpecIntoComponent(Constructor, spec) {
}
} else {
proto[name] = property;
- if ("production" !== "production") {
+ if ("production" !== "development") {
// Add verbose displayName to the function, which helps when looking
// at profiling tools.
if (typeof property === 'function' && spec.displayName) {
@@ -5536,7 +5536,7 @@ function mixStaticSpecIntoComponent(Constructor, statics) {
}
var isReserved = name in RESERVED_SPEC_KEYS;
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
!isReserved,
'ReactClass: You are attempting to define a reserved ' +
'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' +
@@ -5546,7 +5546,7 @@ function mixStaticSpecIntoComponent(Constructor, statics) {
) : invariant(!isReserved));
var isInherited = name in Constructor;
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
!isInherited,
'ReactClass: You are attempting to define ' +
'`%s` on your component more than once. This conflict may be ' +
@@ -5565,14 +5565,14 @@ function mixStaticSpecIntoComponent(Constructor, statics) {
* @return {object} one after it has been mutated to contain everything in two.
*/
function mergeIntoWithNoDuplicateKeys(one, two) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
one && two && typeof one === 'object' && typeof two === 'object',
'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'
) : invariant(one && two && typeof one === 'object' && typeof two === 'object'));
for (var key in two) {
if (two.hasOwnProperty(key)) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
one[key] === undefined,
'mergeIntoWithNoDuplicateKeys(): ' +
'Tried to merge two objects with the same key: `%s`. This conflict ' +
@@ -5635,7 +5635,7 @@ function createChainedFunction(one, two) {
*/
function bindAutoBindMethod(component, method) {
var boundMethod = method.bind(component);
- if ("production" !== "production") {
+ if ("production" !== "development") {
boundMethod.__reactBoundContext = component;
boundMethod.__reactBoundMethod = method;
boundMethod.__reactBoundArguments = null;
@@ -5647,14 +5647,14 @@ function bindAutoBindMethod(component, method) {
// ignore the value of "this" that the user is trying to use, so
// let's warn.
if (newThis !== component && newThis !== null) {
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
false,
'bind(): React component methods may only be bound to the ' +
'component instance. See %s',
componentName
) : null);
} else if (!args.length) {
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
false,
'bind(): You are binding a component method to the component. ' +
'React does this for you automatically in a high-performance ' +
@@ -5698,7 +5698,7 @@ var typeDeprecationDescriptor = {
enumerable: false,
get: function() {
var displayName = this.displayName || this.name || 'Component';
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
false,
'%s.type is deprecated. Use %s directly to access the class.',
displayName,
@@ -5735,10 +5735,10 @@ var ReactClassMixin = {
* @final
*/
isMounted: function() {
- if ("production" !== "production") {
+ if ("production" !== "development") {
var owner = ReactCurrentOwner.current;
if (owner !== null) {
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
owner._warnedAboutRefsInRender,
'%s is accessing isMounted inside its render() function. ' +
'render() should be a pure function of props and state. It should ' +
@@ -5816,8 +5816,8 @@ var ReactClass = {
// This constructor is overridden by mocks. The argument is used
// by mocks to assert on what gets mounted.
- if ("production" !== "production") {
- ("production" !== "production" ? warning(
+ if ("production" !== "development") {
+ ("production" !== "development" ? warning(
this instanceof Constructor,
'Something is calling a React component directly. Use a factory or ' +
'JSX instead. See: https://fb.me/react-legacyfactory'
@@ -5837,7 +5837,7 @@ var ReactClass = {
// getInitialState and componentWillMount methods for initialization.
var initialState = this.getInitialState ? this.getInitialState() : null;
- if ("production" !== "production") {
+ if ("production" !== "development") {
// We allow auto-mocks to proceed as if they're returning null.
if (typeof initialState === 'undefined' &&
this.getInitialState._isMockFunction) {
@@ -5846,7 +5846,7 @@ var ReactClass = {
initialState = null;
}
}
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
typeof initialState === 'object' && !Array.isArray(initialState),
'%s.getInitialState(): must return an object or null',
Constructor.displayName || 'ReactCompositeComponent'
@@ -5868,7 +5868,7 @@ var ReactClass = {
Constructor.defaultProps = Constructor.getDefaultProps();
}
- if ("production" !== "production") {
+ if ("production" !== "development") {
// This is a tag to indicate that the use of these method names is ok,
// since it's used with createClass. If it's not, then it's likely a
// mistake so we'll warn you to use the static property, property
@@ -5881,13 +5881,13 @@ var ReactClass = {
}
}
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
Constructor.prototype.render,
'createClass(...): Class specification must implement a `render` method.'
) : invariant(Constructor.prototype.render));
- if ("production" !== "production") {
- ("production" !== "production" ? warning(
+ if ("production" !== "development") {
+ ("production" !== "development" ? warning(
!Constructor.prototype.componentShouldUpdate,
'%s has a method called ' +
'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +
@@ -5906,7 +5906,7 @@ var ReactClass = {
// Legacy hook
Constructor.type = Constructor;
- if ("production" !== "production") {
+ if ("production" !== "development") {
try {
Object.defineProperty(Constructor, 'type', typeDeprecationDescriptor);
} catch (x) {
@@ -5980,7 +5980,7 @@ function ReactComponent(props, context) {
* @protected
*/
ReactComponent.prototype.setState = function(partialState, callback) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
typeof partialState === 'object' ||
typeof partialState === 'function' ||
partialState == null,
@@ -5989,8 +5989,8 @@ ReactComponent.prototype.setState = function(partialState, callback) {
) : invariant(typeof partialState === 'object' ||
typeof partialState === 'function' ||
partialState == null));
- if ("production" !== "production") {
- ("production" !== "production" ? warning(
+ if ("production" !== "development") {
+ ("production" !== "development" ? warning(
partialState != null,
'setState(...): You passed an undefined or null state object; ' +
'instead, use forceUpdate().'
@@ -6028,7 +6028,7 @@ ReactComponent.prototype.forceUpdate = function(callback) {
* we would like to deprecate them, we're not going to move them over to this
* modern base class. Instead, we define a getter that warns if it's accessed.
*/
-if ("production" !== "production") {
+if ("production" !== "development") {
var deprecatedAPIs = {
getDOMNode: [
'getDOMNode',
@@ -6057,7 +6057,7 @@ if ("production" !== "production") {
try {
Object.defineProperty(ReactComponent.prototype, methodName, {
get: function() {
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
false,
'%s(...) is deprecated in plain JavaScript React classes. %s',
info[0],
@@ -6167,7 +6167,7 @@ var ReactComponentEnvironment = {
injection: {
injectEnvironment: function(environment) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
!injected,
'ReactCompositeComponent: injectEnvironment() can only be called once.'
) : invariant(!injected));
@@ -6322,10 +6322,10 @@ var ReactCompositeComponentMixin = {
// Initialize the public class
var inst = new Component(publicProps, publicContext);
- if ("production" !== "production") {
+ if ("production" !== "development") {
// This will throw later in _renderValidatedComponent, but add an early
// warning now to help debugging
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
inst.render != null,
'%s(...): No `render` method found on the returned component ' +
'instance: you may have forgotten to define `render` in your ' +
@@ -6346,15 +6346,15 @@ var ReactCompositeComponentMixin = {
// Store a reference from the instance back to the internal representation
ReactInstanceMap.set(inst, this);
- if ("production" !== "production") {
+ if ("production" !== "development") {
this._warnIfContextsDiffer(this._currentElement._context, context);
}
- if ("production" !== "production") {
+ if ("production" !== "development") {
// Since plain JS classes are defined without any special initialization
// logic, we can not catch common errors early. Therefore, we have to
// catch them here, at initialization time, instead.
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
!inst.getInitialState ||
inst.getInitialState.isReactClassApproved,
'getInitialState was defined on %s, a plain JavaScript class. ' +
@@ -6362,7 +6362,7 @@ var ReactCompositeComponentMixin = {
'Did you mean to define a state property instead?',
this.getName() || 'a component'
) : null);
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
!inst.getDefaultProps ||
inst.getDefaultProps.isReactClassApproved,
'getDefaultProps was defined on %s, a plain JavaScript class. ' +
@@ -6370,19 +6370,19 @@ var ReactCompositeComponentMixin = {
'Use a static property to define defaultProps instead.',
this.getName() || 'a component'
) : null);
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
!inst.propTypes,
'propTypes was defined as an instance property on %s. Use a static ' +
'property to define propTypes instead.',
this.getName() || 'a component'
) : null);
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
!inst.contextTypes,
'contextTypes was defined as an instance property on %s. Use a ' +
'static property to define contextTypes instead.',
this.getName() || 'a component'
) : null);
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
typeof inst.componentShouldUpdate !== 'function',
'%s has a method called ' +
'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +
@@ -6396,7 +6396,7 @@ var ReactCompositeComponentMixin = {
if (initialState === undefined) {
inst.state = initialState = null;
}
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
typeof initialState === 'object' && !Array.isArray(initialState),
'%s.state: must be set to an object or null',
this.getName() || 'ReactCompositeComponent'
@@ -6546,7 +6546,7 @@ var ReactCompositeComponentMixin = {
*/
_processContext: function(context) {
var maskedContext = this._maskContext(context);
- if ("production" !== "production") {
+ if ("production" !== "development") {
var Component = ReactNativeComponent.getComponentClassForElement(
this._currentElement
);
@@ -6570,13 +6570,13 @@ var ReactCompositeComponentMixin = {
var inst = this._instance;
var childContext = inst.getChildContext && inst.getChildContext();
if (childContext) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
typeof inst.constructor.childContextTypes === 'object',
'%s.getChildContext(): childContextTypes must be defined in order to ' +
'use getChildContext().',
this.getName() || 'ReactCompositeComponent'
) : invariant(typeof inst.constructor.childContextTypes === 'object'));
- if ("production" !== "production") {
+ if ("production" !== "development") {
this._checkPropTypes(
inst.constructor.childContextTypes,
childContext,
@@ -6584,7 +6584,7 @@ var ReactCompositeComponentMixin = {
);
}
for (var name in childContext) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
name in inst.constructor.childContextTypes,
'%s.getChildContext(): key "%s" is not defined in childContextTypes.',
this.getName() || 'ReactCompositeComponent',
@@ -6613,7 +6613,7 @@ var ReactCompositeComponentMixin = {
* @private
*/
_processProps: function(newProps) {
- if ("production" !== "production") {
+ if ("production" !== "development") {
var Component = ReactNativeComponent.getComponentClassForElement(
this._currentElement
);
@@ -6646,7 +6646,7 @@ var ReactCompositeComponentMixin = {
try {
// This is intentionally an invariant that gets caught. It's the same
// behavior as without this statement except with a better message.
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
typeof propTypes[propName] === 'function',
'%s: %s type `%s` is invalid; it must be a function, usually ' +
'from React.PropTypes.',
@@ -6666,14 +6666,14 @@ var ReactCompositeComponentMixin = {
if (location === ReactPropTypeLocations.prop) {
// Preface gives us something to blacklist in warning module
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
false,
'Failed Composite propType: %s%s',
error.message,
addendum
) : null);
} else {
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
false,
'Failed Context Types: %s%s',
error.message,
@@ -6718,7 +6718,7 @@ var ReactCompositeComponentMixin = {
}
if (this._pendingStateQueue !== null || this._pendingForceUpdate) {
- if ("production" !== "production") {
+ if ("production" !== "development") {
ReactElementValidator.checkAndWarnForMutatedProps(
this._currentElement
);
@@ -6745,7 +6745,7 @@ var ReactCompositeComponentMixin = {
var displayName = this.getName() || 'ReactCompositeComponent';
for (var i = 0; i < parentKeys.length; i++) {
var key = parentKeys[i];
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
ownerBasedContext[key] === parentBasedContext[key],
'owner-based and parent-based contexts differ ' +
'(values: `%s` vs `%s`) for key (%s) while mounting %s ' +
@@ -6790,7 +6790,7 @@ var ReactCompositeComponentMixin = {
nextContext = this._processContext(nextParentElement._context);
nextProps = this._processProps(nextParentElement.props);
- if ("production" !== "production") {
+ if ("production" !== "development") {
if (nextUnmaskedContext != null) {
this._warnIfContextsDiffer(
nextParentElement._context,
@@ -6815,8 +6815,8 @@ var ReactCompositeComponentMixin = {
!inst.shouldComponentUpdate ||
inst.shouldComponentUpdate(nextProps, nextState, nextContext);
- if ("production" !== "production") {
- ("production" !== "production" ? warning(
+ if ("production" !== "development") {
+ ("production" !== "development" ? warning(
typeof shouldUpdate !== 'undefined',
'%s.shouldComponentUpdate(): Returned undefined instead of a ' +
'boolean value. Make sure to return true or false.',
@@ -6975,7 +6975,7 @@ var ReactCompositeComponentMixin = {
_renderValidatedComponentWithoutOwnerOrContext: function() {
var inst = this._instance;
var renderedComponent = inst.render();
- if ("production" !== "production") {
+ if ("production" !== "development") {
// We allow auto-mocks to proceed as if they're returning null.
if (typeof renderedComponent === 'undefined' &&
inst.render._isMockFunction) {
@@ -7006,7 +7006,7 @@ var ReactCompositeComponentMixin = {
ReactContext.current = previousContext;
ReactCurrentOwner.current = null;
}
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
// TODO: An `isValidNode` function would probably be more appropriate
renderedComponent === null || renderedComponent === false ||
ReactElement.isValidElement(renderedComponent),
@@ -7147,8 +7147,8 @@ var ReactContext = {
* @return {ReactComponent|array<ReactComponent>}
*/
withContext: function(newContext, scopedCallback) {
- if ("production" !== "production") {
- ("production" !== "production" ? warning(
+ if ("production" !== "development") {
+ ("production" !== "development" ? warning(
didWarn,
'withContext is deprecated and will be removed in a future version. ' +
'Use a wrapper component with getChildContext instead.'
@@ -7233,7 +7233,7 @@ var mapObject = require("./mapObject");
* @private
*/
function createDOMFactory(tag) {
- if ("production" !== "production") {
+ if ("production" !== "development") {
return ReactElementValidator.createFactory(tag);
}
return ReactElement.createFactory(tag);
@@ -7506,11 +7506,11 @@ function assertValidProps(props) {
}
// Note the use of `==` which checks for null or undefined.
if (props.dangerouslySetInnerHTML != null) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
props.children == null,
'Can only set one of `children` or `props.dangerouslySetInnerHTML`.'
) : invariant(props.children == null));
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
typeof props.dangerouslySetInnerHTML === 'object' &&
'__html' in props.dangerouslySetInnerHTML,
'`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
@@ -7519,13 +7519,13 @@ function assertValidProps(props) {
) : invariant(typeof props.dangerouslySetInnerHTML === 'object' &&
'__html' in props.dangerouslySetInnerHTML));
}
- if ("production" !== "production") {
- ("production" !== "production" ? warning(
+ if ("production" !== "development") {
+ ("production" !== "development" ? warning(
props.innerHTML == null,
'Directly setting property `innerHTML` is not permitted. ' +
'For more information, lookup documentation on `dangerouslySetInnerHTML`.'
) : null);
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
!props.contentEditable || props.children == null,
'A component is `contentEditable` and contains `children` managed by ' +
'React. It is now your responsibility to guarantee that none of ' +
@@ -7533,7 +7533,7 @@ function assertValidProps(props) {
'probably not intentional.'
) : null);
}
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
props.style == null || typeof props.style === 'object',
'The `style` prop expects a mapping from style properties to values, ' +
'not a string. For example, style={{marginRight: spacing + \'em\'}} when ' +
@@ -7542,10 +7542,10 @@ function assertValidProps(props) {
}
function putListener(id, registrationName, listener, transaction) {
- if ("production" !== "production") {
+ if ("production" !== "development") {
// IE8 has no API for event capturing and the `onScroll` event doesn't
// bubble.
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
registrationName !== 'onScroll' || isEventSupported('scroll', true),
'This browser doesn\'t support the `onScroll` event'
) : null);
@@ -7596,7 +7596,7 @@ var hasOwnProperty = {}.hasOwnProperty;
function validateDangerousTag(tag) {
if (!hasOwnProperty.call(validatedTagCache, tag)) {
- ("production" !== "production" ? invariant(VALID_TAG_REGEX.test(tag), 'Invalid tag: %s', tag) : invariant(VALID_TAG_REGEX.test(tag)));
+ ("production" !== "development" ? invariant(VALID_TAG_REGEX.test(tag), 'Invalid tag: %s', tag) : invariant(VALID_TAG_REGEX.test(tag)));
validatedTagCache[tag] = true;
}
}
@@ -8059,7 +8059,7 @@ var ReactDOMIDOperations = {
*/
updatePropertyByID: function(id, name, value) {
var node = ReactMount.getNode(id);
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
!INVALID_PROPERTY_ERRORS.hasOwnProperty(name),
'updatePropertyByID(...): %s',
INVALID_PROPERTY_ERRORS[name]
@@ -8085,7 +8085,7 @@ var ReactDOMIDOperations = {
*/
deletePropertyByID: function(id, name, value) {
var node = ReactMount.getNode(id);
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
!INVALID_PROPERTY_ERRORS.hasOwnProperty(name),
'updatePropertyByID(...): %s',
INVALID_PROPERTY_ERRORS[name]
@@ -8411,13 +8411,13 @@ var ReactDOMInput = ReactClass.createClass({
continue;
}
var otherID = ReactMount.getID(otherNode);
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
otherID,
'ReactDOMInput: Mixing React and non-React radio inputs with the ' +
'same `name` is not supported.'
) : invariant(otherID));
var otherInstance = instancesByReactID[otherID];
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
otherInstance,
'ReactDOMInput: Unknown radio button ID %s.',
otherID
@@ -8469,8 +8469,8 @@ var ReactDOMOption = ReactClass.createClass({
componentWillMount: function() {
// TODO (yungsters): Remove support for `selected` in <option>.
- if ("production" !== "production") {
- ("production" !== "production" ? warning(
+ if ("production" !== "development") {
+ ("production" !== "development" ? warning(
this.props.selected == null,
'Use the `defaultValue` or `value` props on <select> instead of ' +
'setting `selected` on <option>.'
@@ -9056,19 +9056,19 @@ var ReactDOMTextarea = ReactClass.createClass({
// TODO (yungsters): Remove support for children content in <textarea>.
var children = this.props.children;
if (children != null) {
- if ("production" !== "production") {
- ("production" !== "production" ? warning(
+ if ("production" !== "development") {
+ ("production" !== "development" ? warning(
false,
'Use the `defaultValue` or `value` props instead of setting ' +
'children on <textarea>.'
) : null);
}
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
defaultValue == null,
'If you supply `defaultValue` on a <textarea>, do not pass children.'
) : invariant(defaultValue == null));
if (Array.isArray(children)) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
children.length <= 1,
'<textarea> can only have at most one child.'
) : invariant(children.length <= 1));
@@ -9094,7 +9094,7 @@ var ReactDOMTextarea = ReactClass.createClass({
// Clone `this.props` so we don't mutate the input.
var props = assign({}, this.props);
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
props.dangerouslySetInnerHTML == null,
'`dangerouslySetInnerHTML` does not make sense on <textarea>.'
) : invariant(props.dangerouslySetInnerHTML == null));
@@ -9349,7 +9349,7 @@ function inject() {
ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);
ReactInjection.DOMComponent.injectIDOperations(ReactDOMIDOperations);
- if ("production" !== "production") {
+ if ("production" !== "development") {
var url = (ExecutionEnvironment.canUseDOM && window.location.href) || '';
if ((/[?&]react_perf\b/).test(url)) {
var ReactDefaultPerf = require("./ReactDefaultPerf");
@@ -9880,7 +9880,7 @@ function defineWarningProperty(object, key) {
},
set: function(value) {
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
false,
'Don\'t set the %s property of the React element. Instead, ' +
'specify the correct value when initially creating the element.',
@@ -9940,7 +9940,7 @@ var ReactElement = function(type, key, ref, owner, context, props) {
// through the owner.
this._context = context;
- if ("production" !== "production") {
+ if ("production" !== "development") {
// The validation flag and props are currently mutative. We put them on
// an external backing store so that we can freeze the whole object.
// This can be replaced with a WeakMap once they are implemented in
@@ -9979,7 +9979,7 @@ ReactElement.prototype = {
_isReactElement: true
};
-if ("production" !== "production") {
+if ("production" !== "development") {
defineMutationMembrane(ReactElement.prototype);
}
@@ -10058,7 +10058,7 @@ ReactElement.cloneAndReplaceProps = function(oldElement, newProps) {
newProps
);
- if ("production" !== "production") {
+ if ("production" !== "development") {
// If the key on the original is valid, then the clone is valid
newElement._store.validated = oldElement._store.validated;
}
@@ -10307,7 +10307,7 @@ function warnAndMonitorForKeyUse(message, element, parentType) {
childOwnerAddendum = (" It was passed a child from " + childOwnerName + ".");
}
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
false,
message + '%s%s See https://fb.me/react-warning-keys for more information.',
parentOrOwnerAddendum,
@@ -10378,7 +10378,7 @@ function checkPropTypes(componentName, propTypes, props, location) {
try {
// This is intentionally an invariant that gets caught. It's the same
// behavior as without this statement except with a better message.
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
typeof propTypes[propName] === 'function',
'%s: %s type `%s` is invalid; it must be a function, usually from ' +
'React.PropTypes.',
@@ -10396,7 +10396,7 @@ function checkPropTypes(componentName, propTypes, props, location) {
loggedTypeFailures[error.message] = true;
var addendum = getDeclarationErrorAddendum(this);
- ("production" !== "production" ? warning(false, 'Failed propType: %s%s', error.message, addendum) : null);
+ ("production" !== "development" ? warning(false, 'Failed propType: %s%s', error.message, addendum) : null);
}
}
}
@@ -10431,7 +10431,7 @@ function warnForPropsMutation(propName, element) {
ownerInfo = ' The element was created by ' + ownerName + '.';
}
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
false,
'Don\'t set .props.%s of the React component%s. Instead, specify the ' +
'correct value when initially creating the element or use ' +
@@ -10514,7 +10514,7 @@ function validatePropTypes(element) {
);
}
if (typeof componentClass.getDefaultProps === 'function') {
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
componentClass.getDefaultProps.isReactClassApproved,
'getDefaultProps is only used on classic React.createClass ' +
'definitions. Use a static property named `defaultProps` instead.'
@@ -10529,7 +10529,7 @@ var ReactElementValidator = {
createElement: function(type, props, children) {
// We warn in this case but don't throw. We expect the element creation to
// succeed and there will likely be errors in render.
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
type != null,
'React.createElement: type should not be null or undefined. It should ' +
'be a string (for DOM elements) or a ReactClass (for composite ' +
@@ -10561,7 +10561,7 @@ var ReactElementValidator = {
// Legacy hook TODO: Warn if this is accessed
validatedFactory.type = type;
- if ("production" !== "production") {
+ if ("production" !== "development") {
try {
Object.defineProperty(
validatedFactory,
@@ -10569,7 +10569,7 @@ var ReactElementValidator = {
{
enumerable: false,
get: function() {
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
false,
'Factory.type is deprecated. Access the class directly ' +
'before passing it to createFactory.'
@@ -10654,7 +10654,7 @@ ReactEmptyComponentType.prototype.componentWillUnmount = function() {
deregisterNullComponentID(internalInstance._rootNodeID);
};
ReactEmptyComponentType.prototype.render = function() {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
component,
'Trying to return null from a render, but no null placeholder component ' +
'was injected.'
@@ -10987,7 +10987,7 @@ var warning = require("./warning");
* create a keyed fragment. The resulting data structure is opaque, for now.
*/
-if ("production" !== "production") {
+if ("production" !== "development") {
var fragmentKey = '_reactFragment';
var didWarnKey = '_reactDidWarn';
var canWarnForReactFragment = false;
@@ -11019,7 +11019,7 @@ if ("production" !== "production") {
Object.defineProperty(obj, key, {
enumerable: true,
get: function() {
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
this[didWarnKey],
'A ReactFragment is an opaque type. Accessing any of its ' +
'properties is deprecated. Pass it to one of the React.Children ' +
@@ -11029,7 +11029,7 @@ if ("production" !== "production") {
return this[fragmentKey][key];
},
set: function(value) {
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
this[didWarnKey],
'A ReactFragment is an immutable opaque type. Mutating its ' +
'properties is deprecated.'
@@ -11059,9 +11059,9 @@ var ReactFragment = {
// Wrap a keyed object in an opaque proxy that warns you if you access any
// of its properties.
create: function(object) {
- if ("production" !== "production") {
+ if ("production" !== "development") {
if (typeof object !== 'object' || !object || Array.isArray(object)) {
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
false,
'React.addons.createFragment only accepts a single object.',
object
@@ -11069,7 +11069,7 @@ var ReactFragment = {
return object;
}
if (ReactElement.isValidElement(object)) {
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
false,
'React.addons.createFragment does not accept a ReactElement ' +
'without a wrapper object.'
@@ -11099,10 +11099,10 @@ var ReactFragment = {
// Extract the original keyed object from the fragment opaque type. Warn if
// a plain object is passed here.
extract: function(fragment) {
- if ("production" !== "production") {
+ if ("production" !== "development") {
if (canWarnForReactFragment) {
if (!fragment[fragmentKey]) {
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
didWarnForFragment(fragment),
'Any use of a keyed object should be wrapped in ' +
'React.addons.createFragment(object) before being passed as a ' +
@@ -11119,7 +11119,7 @@ var ReactFragment = {
// is a fragment-like object, warn that it should be wrapped. Ignore if we
// can't determine what kind of object this is.
extractIfFragment: function(fragment) {
- if ("production" !== "production") {
+ if ("production" !== "development") {
if (canWarnForReactFragment) {
// If it is the opaque type, return the keyed object.
if (fragment[fragmentKey]) {
@@ -11420,13 +11420,13 @@ function getParentID(id) {
* @private
*/
function getNextDescendantID(ancestorID, destinationID) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
isValidID(ancestorID) && isValidID(destinationID),
'getNextDescendantID(%s, %s): Received an invalid React DOM ID.',
ancestorID,
destinationID
) : invariant(isValidID(ancestorID) && isValidID(destinationID)));
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
isAncestorIDOf(ancestorID, destinationID),
'getNextDescendantID(...): React has made an invalid assumption about ' +
'the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.',
@@ -11474,7 +11474,7 @@ function getFirstCommonAncestorID(oneID, twoID) {
}
}
var longestCommonID = oneID.substr(0, lastCommonMarkerIndex);
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
isValidID(longestCommonID),
'getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s',
oneID,
@@ -11499,13 +11499,13 @@ function getFirstCommonAncestorID(oneID, twoID) {
function traverseParentPath(start, stop, cb, arg, skipFirst, skipLast) {
start = start || '';
stop = stop || '';
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
start !== stop,
'traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.',
start
) : invariant(start !== stop));
var traverseUp = isAncestorIDOf(stop, start);
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
traverseUp || isAncestorIDOf(start, stop),
'traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do ' +
'not have a parent path.',
@@ -11524,7 +11524,7 @@ function traverseParentPath(start, stop, cb, arg, skipFirst, skipLast) {
// Only break //after// visiting `stop`.
break;
}
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
depth++ < MAX_TREE_DEPTH,
'traverseParentPath(%s, %s, ...): Detected an infinite loop while ' +
'traversing the React DOM ID tree. This may be due to malformed IDs: %s',
@@ -11840,7 +11840,7 @@ var instancesByReactRootID = {};
/** Mapping from reactRootID to `container` nodes. */
var containersByReactRootID = {};
-if ("production" !== "production") {
+if ("production" !== "development") {
/** __DEV__-only mapping from reactRootID to root elements. */
var rootElementsByReactRootID = {};
}
@@ -11889,7 +11889,7 @@ function getID(node) {
if (nodeCache.hasOwnProperty(id)) {
var cached = nodeCache[id];
if (cached !== node) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
!isValid(cached, id),
'ReactMount: Two valid but unequal nodes with the same `%s`: %s',
ATTR_NAME, id
@@ -11971,7 +11971,7 @@ function getNodeFromInstance(instance) {
*/
function isValid(node, id) {
if (node) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
internalGetID(node) === id,
'ReactMount: Unexpected modification of `%s`',
ATTR_NAME
@@ -12116,7 +12116,7 @@ var ReactMount = {
nextElement,
container,
callback) {
- if ("production" !== "production") {
+ if ("production" !== "development") {
ReactElementValidator.checkAndWarnForMutatedProps(nextElement);
}
@@ -12127,7 +12127,7 @@ var ReactMount = {
}
});
- if ("production" !== "production") {
+ if ("production" !== "development") {
// Record the root element in case it later gets transplanted.
rootElementsByReactRootID[getReactRootID(container)] =
getReactRootElementInContainer(container);
@@ -12144,7 +12144,7 @@ var ReactMount = {
* @return {string} reactRoot ID prefix
*/
_registerComponent: function(nextComponent, container) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
container && (
(container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE)
),
@@ -12175,7 +12175,7 @@ var ReactMount = {
// Various parts of our code (such as ReactCompositeComponent's
// _renderValidatedComponent) assume that calls to render aren't nested;
// verify that that's the case.
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
ReactCurrentOwner.current == null,
'_renderNewRootComponent(): Render methods should be a pure function ' +
'of props and state; triggering nested component updates from ' +
@@ -12201,7 +12201,7 @@ var ReactMount = {
shouldReuseMarkup
);
- if ("production" !== "production") {
+ if ("production" !== "development") {
// Record the root element in case it later gets transplanted.
rootElementsByReactRootID[reactRootID] =
getReactRootElementInContainer(container);
@@ -12223,7 +12223,7 @@ var ReactMount = {
* @return {ReactComponent} Component instance rendered in `container`.
*/
render: function(nextElement, container, callback) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
ReactElement.isValidElement(nextElement),
'React.render(): Invalid component element.%s',
(
@@ -12261,12 +12261,12 @@ var ReactMount = {
var containerHasReactMarkup =
reactRootElement && ReactMount.isRenderedByReact(reactRootElement);
- if ("production" !== "production") {
+ if ("production" !== "development") {
if (!containerHasReactMarkup || reactRootElement.nextSibling) {
var rootElementSibling = reactRootElement;
while (rootElementSibling) {
if (ReactMount.isRenderedByReact(rootElementSibling)) {
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
false,
'render(): Target node has markup rendered by React, but there ' +
'are unrelated nodes as well. This is most commonly caused by ' +
@@ -12318,7 +12318,7 @@ var ReactMount = {
*/
constructAndRenderComponentByID: function(constructor, props, id) {
var domNode = document.getElementById(id);
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
domNode,
'Tried to get element with id of "%s" but it is not present on the page.',
id
@@ -12360,7 +12360,7 @@ var ReactMount = {
// _renderValidatedComponent) assume that calls to render aren't nested;
// verify that that's the case. (Strictly speaking, unmounting won't cause a
// render but we still don't expect to be in a render call here.)
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
ReactCurrentOwner.current == null,
'unmountComponentAtNode(): Render methods should be a pure function of ' +
'props and state; triggering nested component updates from render is ' +
@@ -12368,7 +12368,7 @@ var ReactMount = {
'componentDidUpdate.'
) : null);
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
container && (
(container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE)
),
@@ -12385,7 +12385,7 @@ var ReactMount = {
ReactMount.unmountComponentFromNode(component, container);
delete instancesByReactRootID[reactRootID];
delete containersByReactRootID[reactRootID];
- if ("production" !== "production") {
+ if ("production" !== "development") {
delete rootElementsByReactRootID[reactRootID];
}
return true;
@@ -12424,10 +12424,10 @@ var ReactMount = {
var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(id);
var container = containersByReactRootID[reactRootID];
- if ("production" !== "production") {
+ if ("production" !== "development") {
var rootElement = rootElementsByReactRootID[reactRootID];
if (rootElement && rootElement.parentNode !== container) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
// Call internalGetID here because getID calls isValid which calls
// findReactContainerForID (this function).
internalGetID(rootElement) === reactRootID,
@@ -12445,7 +12445,7 @@ var ReactMount = {
// warning is when the container is empty.
rootElementsByReactRootID[reactRootID] = containerChild;
} else {
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
false,
'ReactMount: Root element has been removed from its original ' +
'container. New container:', rootElement.parentNode
@@ -12569,7 +12569,7 @@ var ReactMount = {
firstChildren.length = 0;
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
false,
'findComponentRoot(..., %s): Unable to find element. This probably ' +
'means the DOM was unexpectedly mutated (e.g., by the browser), ' +
@@ -12583,7 +12583,7 @@ var ReactMount = {
},
_mountImageIntoNode: function(markup, container, shouldReuseMarkup) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
container && (
(container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE)
),
@@ -12613,7 +12613,7 @@ var ReactMount = {
markup.substring(diffIndex - 20, diffIndex + 20) +
'\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20);
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
container.nodeType !== DOC_NODE_TYPE,
'You\'re trying to render a component to the document using ' +
'server rendering but the checksum was invalid. This usually ' +
@@ -12626,8 +12626,8 @@ var ReactMount = {
difference
) : invariant(container.nodeType !== DOC_NODE_TYPE));
- if ("production" !== "production") {
- ("production" !== "production" ? warning(
+ if ("production" !== "development") {
+ ("production" !== "development" ? warning(
false,
'React attempted to reuse markup in a container but the ' +
'checksum was invalid. This generally means that you are ' +
@@ -12643,7 +12643,7 @@ var ReactMount = {
}
}
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
container.nodeType !== DOC_NODE_TYPE,
'You\'re trying to render a component to the document but ' +
'you didn\'t use server rendering. We can\'t do this ' +
@@ -13212,7 +13212,7 @@ function getComponentClassForElement(element) {
* @return {function} The internal class constructor function.
*/
function createInternalComponent(element) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
genericComponentClass,
'There is no registered component for the tag %s',
element.type
@@ -13316,7 +13316,7 @@ var ReactOwner = {
* @internal
*/
addComponentAsRefTo: function(component, ref, owner) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
ReactOwner.isValidOwner(owner),
'addComponentAsRefTo(...): Only a ReactOwner can have refs. This ' +
'usually means that you\'re trying to add a ref to a component that ' +
@@ -13337,7 +13337,7 @@ var ReactOwner = {
* @internal
*/
removeComponentAsRefFrom: function(component, ref, owner) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
ReactOwner.isValidOwner(owner),
'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. This ' +
'usually means that you\'re trying to remove a ref to a component that ' +
@@ -13394,7 +13394,7 @@ var ReactPerf = {
* @param {object<string>} methodNames
*/
measureMethods: function(object, objectName, methodNames) {
- if ("production" !== "production") {
+ if ("production" !== "development") {
for (var key in methodNames) {
if (!methodNames.hasOwnProperty(key)) {
continue;
@@ -13417,7 +13417,7 @@ var ReactPerf = {
* @return {function}
*/
measure: function(objName, fnName, func) {
- if ("production" !== "production") {
+ if ("production" !== "development") {
var measuredFunc = null;
var wrapper = function() {
if (ReactPerf.enableMeasure) {
@@ -13474,7 +13474,7 @@ module.exports = ReactPerf;
var ReactPropTypeLocationNames = {};
-if ("production" !== "production") {
+if ("production" !== "development") {
ReactPropTypeLocationNames = {
prop: 'prop',
context: 'context',
@@ -14128,7 +14128,7 @@ var ReactReconciler = {
*/
mountComponent: function(internalInstance, rootID, transaction, context) {
var markup = internalInstance.mountComponent(rootID, transaction, context);
- if ("production" !== "production") {
+ if ("production" !== "development") {
ReactElementValidator.checkAndWarnForMutatedProps(
internalInstance._currentElement
);
@@ -14173,7 +14173,7 @@ var ReactReconciler = {
return;
}
- if ("production" !== "production") {
+ if ("production" !== "development") {
ReactElementValidator.checkAndWarnForMutatedProps(nextElement);
}
@@ -14342,7 +14342,7 @@ var invariant = require("./invariant");
* @return {string} the HTML markup
*/
function renderToString(element) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
ReactElement.isValidElement(element),
'renderToString(): You must pass a valid ReactElement.'
) : invariant(ReactElement.isValidElement(element)));
@@ -14369,7 +14369,7 @@ function renderToString(element) {
* (for generating static pages)
*/
function renderToStaticMarkup(element) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
ReactElement.isValidElement(element),
'renderToStaticMarkup(): You must pass a valid ReactElement.'
) : invariant(ReactElement.isValidElement(element)));
@@ -14541,7 +14541,7 @@ function enqueueUpdate(internalInstance) {
}
function getInternalInstanceReadyForUpdate(publicInstance, callerName) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
ReactCurrentOwner.current == null,
'%s(...): Cannot update during an existing state transition ' +
'(such as within `render`). Render methods should be a pure function ' +
@@ -14551,11 +14551,11 @@ function getInternalInstanceReadyForUpdate(publicInstance, callerName) {
var internalInstance = ReactInstanceMap.get(publicInstance);
if (!internalInstance) {
- if ("production" !== "production") {
+ if ("production" !== "development") {
// Only warn when we have a callerName. Otherwise we should be silent.
// We're probably calling from enqueueCallback. We don't want to warn
// there because we already warned for the corresponding lifecycle method.
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
!callerName,
'%s(...): Can only update a mounted or mounting component. ' +
'This usually means you called %s() on an unmounted ' +
@@ -14589,7 +14589,7 @@ var ReactUpdateQueue = {
* @internal
*/
enqueueCallback: function(publicInstance, callback) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
typeof callback === 'function',
'enqueueCallback(...): You called `setProps`, `replaceProps`, ' +
'`setState`, `replaceState`, or `forceUpdate` with a callback that ' +
@@ -14620,7 +14620,7 @@ var ReactUpdateQueue = {
},
enqueueCallbackInternal: function(internalInstance, callback) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
typeof callback === 'function',
'enqueueCallback(...): You called `setProps`, `replaceProps`, ' +
'`setState`, `replaceState`, or `forceUpdate` with a callback that ' +
@@ -14734,7 +14734,7 @@ var ReactUpdateQueue = {
return;
}
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
internalInstance._isTopLevel,
'setProps(...): You called `setProps` on a ' +
'component with a parent. This is an anti-pattern since props will ' +
@@ -14773,7 +14773,7 @@ var ReactUpdateQueue = {
return;
}
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
internalInstance._isTopLevel,
'replaceProps(...): You called `replaceProps` on a ' +
'component with a parent. This is an anti-pattern since props will ' +
@@ -14835,7 +14835,7 @@ var asapEnqueued = false;
var batchingStrategy = null;
function ensureInjected() {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
ReactUpdates.ReactReconcileTransaction && batchingStrategy,
'ReactUpdates: must inject a reconcile transaction class and batching ' +
'strategy'
@@ -14929,7 +14929,7 @@ function mountOrderComparator(c1, c2) {
function runBatchedUpdates(transaction) {
var len = transaction.dirtyComponentsLength;
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
len === dirtyComponents.length,
'Expected flush transaction\'s stored dirty-components length (%s) to ' +
'match dirty-components array length (%s).',
@@ -15009,7 +15009,7 @@ function enqueueUpdate(component) {
// verify that that's the case. (This is called by each top-level update
// function, like setProps, setState, forceUpdate, etc.; creation and
// destruction of top-level components is guarded in ReactMount.)
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
ReactCurrentOwner.current == null,
'enqueueUpdate(): Render methods should be a pure function of props ' +
'and state; triggering nested component updates from render is not ' +
@@ -15030,7 +15030,7 @@ function enqueueUpdate(component) {
* if no updates are currently being performed.
*/
function asap(callback, context) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
batchingStrategy.isBatchingUpdates,
'ReactUpdates.asap: Can\'t enqueue an asap callback in a context where' +
'updates are not being batched.'
@@ -15041,7 +15041,7 @@ function asap(callback, context) {
var ReactUpdatesInjection = {
injectReconcileTransaction: function(ReconcileTransaction) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
ReconcileTransaction,
'ReactUpdates: must provide a reconcile transaction class'
) : invariant(ReconcileTransaction));
@@ -15049,15 +15049,15 @@ var ReactUpdatesInjection = {
},
injectBatchingStrategy: function(_batchingStrategy) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
_batchingStrategy,
'ReactUpdates: must provide a batching strategy'
) : invariant(_batchingStrategy));
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
typeof _batchingStrategy.batchedUpdates === 'function',
'ReactUpdates: must provide a batchedUpdates() function'
) : invariant(typeof _batchingStrategy.batchedUpdates === 'function'));
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
typeof _batchingStrategy.isBatchingUpdates === 'boolean',
'ReactUpdates: must provide an isBatchingUpdates boolean attribute'
) : invariant(typeof _batchingStrategy.isBatchingUpdates === 'boolean'));
@@ -15710,7 +15710,7 @@ var SimpleEventPlugin = {
executeDispatch: function(event, listener, domID) {
var returnValue = EventPluginUtils.executeDispatch(event, listener, domID);
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
typeof returnValue !== 'boolean',
'Returning `false` from an event handler is deprecated and will be ' +
'ignored in a future release. Instead, manually call ' +
@@ -15811,7 +15811,7 @@ var SimpleEventPlugin = {
EventConstructor = SyntheticClipboardEvent;
break;
}
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
EventConstructor,
'SimpleEventPlugin: Unhandled event type, `%s`.',
topLevelType
@@ -16667,7 +16667,7 @@ var Mixin = {
* @return Return value from `method`.
*/
perform: function(method, scope, a, b, c, d, e, f) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
!this.isInTransaction(),
'Transaction.perform(...): Cannot initialize a transaction when there ' +
'is already an outstanding transaction.'
@@ -16739,7 +16739,7 @@ var Mixin = {
* invoked).
*/
closeAll: function(startIndex) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
this.isInTransaction(),
'Transaction.closeAll(): Cannot close transaction when none are open.'
) : invariant(this.isInTransaction()));
@@ -16847,7 +16847,7 @@ var invariant = require("./invariant");
*/
function accumulateInto(current, next) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
next != null,
'accumulateInto(...): Accumulated items must not be null or undefined.'
) : invariant(next != null));
@@ -17158,7 +17158,7 @@ function createFullPageComponent(tag) {
displayName: 'ReactFullPageComponent' + tag,
componentWillUnmount: function() {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
false,
'%s tried to unmount. Because of cross-browser quirks it is ' +
'impossible to unmount some top-level components (eg <html>, <head>, ' +
@@ -17233,7 +17233,7 @@ function getNodeName(markup) {
*/
function createNodesFromMarkup(markup, handleScript) {
var node = dummyNode;
- ("production" !== "production" ? invariant(!!dummyNode, 'createNodesFromMarkup dummy not initialized') : invariant(!!dummyNode));
+ ("production" !== "development" ? invariant(!!dummyNode, 'createNodesFromMarkup dummy not initialized') : invariant(!!dummyNode));
var nodeName = getNodeName(markup);
var wrap = nodeName && getMarkupWrap(nodeName);
@@ -17250,7 +17250,7 @@ function createNodesFromMarkup(markup, handleScript) {
var scripts = node.getElementsByTagName('script');
if (scripts.length) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
handleScript,
'createNodesFromMarkup(...): Unexpected <script> element rendered.'
) : invariant(handleScript));
@@ -17374,7 +17374,7 @@ module.exports = emptyFunction;
var emptyObject = {};
-if ("production" !== "production") {
+if ("production" !== "development") {
Object.freeze(emptyObject);
}
@@ -17450,10 +17450,10 @@ var warning = require("./warning");
* @return {DOMElement} The root node of this element.
*/
function findDOMNode(componentOrElement) {
- if ("production" !== "production") {
+ if ("production" !== "development") {
var owner = ReactCurrentOwner.current;
if (owner !== null) {
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
owner._warnedAboutRefsInRender,
'%s is accessing getDOMNode or findDOMNode inside its render(). ' +
'render() should be a pure function of props and state. It should ' +
@@ -17474,7 +17474,7 @@ function findDOMNode(componentOrElement) {
if (ReactInstanceMap.has(componentOrElement)) {
return ReactMount.getNodeFromInstance(componentOrElement);
}
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
componentOrElement.render == null ||
typeof componentOrElement.render !== 'function',
'Component (with keys: %s) contains `render` method ' +
@@ -17482,7 +17482,7 @@ function findDOMNode(componentOrElement) {
Object.keys(componentOrElement)
) : invariant(componentOrElement.render == null ||
typeof componentOrElement.render !== 'function'));
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
false,
'Element appears to be neither ReactComponent nor DOMNode (keys: %s)',
Object.keys(componentOrElement)
@@ -17517,8 +17517,8 @@ function flattenSingleChildIntoContext(traverseContext, child, name) {
// We found a component instance.
var result = traverseContext;
var keyUnique = !result.hasOwnProperty(name);
- if ("production" !== "production") {
- ("production" !== "production" ? warning(
+ if ("production" !== "development") {
+ ("production" !== "development" ? warning(
keyUnique,
'flattenChildren(...): Encountered two children with the same key, ' +
'`%s`. Child keys must be unique; when two children share a key, only ' +
@@ -18014,7 +18014,7 @@ var markupWrap = {
* @return {?array} Markup wrap configuration, if applicable.
*/
function getMarkupWrap(nodeName) {
- ("production" !== "production" ? invariant(!!dummyNode, 'Markup wrapping node not initialized') : invariant(!!dummyNode));
+ ("production" !== "development" ? invariant(!!dummyNode, 'Markup wrapping node not initialized') : invariant(!!dummyNode));
if (!markupWrap.hasOwnProperty(nodeName)) {
nodeName = '*';
}
@@ -18359,8 +18359,8 @@ function instantiateReactComponent(node, parentCompositeType) {
if (typeof node === 'object') {
var element = node;
- if ("production" !== "production") {
- ("production" !== "production" ? warning(
+ if ("production" !== "development") {
+ ("production" !== "development" ? warning(
element && (typeof element.type === 'function' ||
typeof element.type === 'string'),
'Only functions or strings can be mounted as React components.'
@@ -18385,15 +18385,15 @@ function instantiateReactComponent(node, parentCompositeType) {
} else if (typeof node === 'string' || typeof node === 'number') {
instance = ReactNativeComponent.createInstanceForText(node);
} else {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
false,
'Encountered invalid React node of type %s',
typeof node
) : invariant(false));
}
- if ("production" !== "production") {
- ("production" !== "production" ? warning(
+ if ("production" !== "development") {
+ ("production" !== "development" ? warning(
typeof instance.construct === 'function' &&
typeof instance.mountComponent === 'function' &&
typeof instance.receiveComponent === 'function' &&
@@ -18411,14 +18411,14 @@ function instantiateReactComponent(node, parentCompositeType) {
instance._mountIndex = 0;
instance._mountImage = null;
- if ("production" !== "production") {
+ if ("production" !== "development") {
instance._isOwnerNecessary = false;
instance._warnedAboutRefsInRender = false;
}
// Internal instances should fully constructed at this point, so they should
// not get any new fields added to them at this point.
- if ("production" !== "production") {
+ if ("production" !== "development") {
if (Object.preventExtensions) {
Object.preventExtensions(instance);
}
@@ -18455,7 +18455,7 @@ module.exports = instantiateReactComponent;
*/
var invariant = function(condition, format, a, b, c, d, e, f) {
- if ("production" !== "production") {
+ if ("production" !== "development") {
if (format === undefined) {
throw new Error('invariant requires an error message argument');
}
@@ -18682,7 +18682,7 @@ var invariant = require("./invariant");
var keyMirror = function(obj) {
var ret = {};
var key;
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
obj instanceof Object && !Array.isArray(obj),
'keyMirror(...): Argument must be an object.'
) : invariant(obj instanceof Object && !Array.isArray(obj)));
@@ -18848,7 +18848,7 @@ var invariant = require("./invariant");
* structure.
*/
function onlyChild(children) {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
ReactElement.isValidElement(children),
'onlyChild must be passed a children with exactly one child.'
) : invariant(ReactElement.isValidElement(children)));
@@ -19158,7 +19158,7 @@ function shouldUpdateReactComponent(prevElement, nextElement) {
var prevName = null;
var nextName = null;
var nextDisplayName = null;
- if ("production" !== "production") {
+ if ("production" !== "development") {
if (!ownersMatch) {
if (prevElement._owner != null &&
prevElement._owner.getPublicInstance() != null &&
@@ -19192,7 +19192,7 @@ function shouldUpdateReactComponent(prevElement, nextElement) {
if (nextElement._owner != null) {
nextElement._owner._isOwnerNecessary = true;
}
- ("production" !== "production" ? warning(
+ ("production" !== "development" ? warning(
false,
'<%s /> is being rendered by both %s and %s using the same ' +
'key (%s) in the same place. Currently, this means that ' +
@@ -19247,19 +19247,19 @@ function toArray(obj) {
// Some browse builtin objects can report typeof 'function' (e.g. NodeList in
// old versions of Safari).
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
!Array.isArray(obj) &&
(typeof obj === 'object' || typeof obj === 'function'),
'toArray: Array-like object expected'
) : invariant(!Array.isArray(obj) &&
(typeof obj === 'object' || typeof obj === 'function')));
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
typeof length === 'number',
'toArray: Object needs a length property'
) : invariant(typeof length === 'number'));
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
length === 0 ||
(length - 1) in obj,
'toArray: Object should have keys for indices'
@@ -19452,8 +19452,8 @@ function traverseAllChildrenImpl(
);
}
} else {
- if ("production" !== "production") {
- ("production" !== "production" ? warning(
+ if ("production" !== "development") {
+ ("production" !== "development" ? warning(
didWarnAboutMaps,
'Using Maps as children is not yet fully supported. It is an ' +
'experimental feature that might be removed. Convert it to a ' +
@@ -19483,7 +19483,7 @@ function traverseAllChildrenImpl(
}
}
} else if (type === 'object') {
- ("production" !== "production" ? invariant(
+ ("production" !== "development" ? invariant(
children.nodeType !== 1,
'traverseAllChildren(...): Encountered an invalid child; DOM ' +
'elements are not valid children of React components.'
@@ -19564,7 +19564,7 @@ var emptyFunction = require("./emptyFunction");
var warning = emptyFunction;
-if ("production" !== "production") {
+if ("production" !== "development") {
warning = function(condition, format ) {for (var args=[],$__0=2,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]);
if (format === undefined) {
throw new Error(
diff --git a/styles/main.css b/styles/main.css
new file mode 100644
index 0000000..671839e
--- /dev/null
+++ b/styles/main.css
@@ -0,0 +1,3 @@
+canvas {
+ border: 1px red solid;
+}
\ No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment