PageSourceSearch

https://conteudos.uzo.pt/Style%20Library/Brand/react/libs/prop-types/prop-types.js

js uzo.pt collected 2026-09-24 12:38:17 UTC 33,946 bytes, 965 lines download raw bytes

1(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.PropTypes = f()}})(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);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.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){
2/**
3 * Copyright (c) 2013-present, Facebook, Inc.
4 *
5 * This source code is licensed under the MIT license found in the
6 * LICENSE file in the root directory of this source tree.
7 */
8
9'use strict';
10
11if ("development" !== 'production') {
12  var invariant = require('fbjs/lib/invariant');
13  var warning = require('fbjs/lib/warning');
14  var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
15  var loggedTypeFailures = {};
16}
17
18/**
19 * Assert that the values match with the type specs.
20 * Error messages are memorized and will only be shown once.
21 *
22 * @param {object} typeSpecs Map of name to a ReactPropType
23 * @param {object} values Runtime values that need to be type-checked
24 * @param {string} location e.g. "prop", "context", "child context"
25 * @param {string} componentName Name of the component for error messages.
26 * @param {?Function} getStack Returns the component stack.
27 * @private
28 */
29function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
30  if ("development" !== 'production') {
31    for (var typeSpecName in typeSpecs) {
32      if (typeSpecs.hasOwnProperty(typeSpecName)) {
33        var error;
34        // Prop type validation may throw. In case they do, we don't want to
35        // fail the render phase where it didn't fail before. So we log it.
36        // After these have been cleaned up, we'll let them throw.
37        try {
38          // This is intentionally an invariant that gets caught. It's the same
39          // behavior as without this statement except with a better message.
40          invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);
41          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
42        } catch (ex) {
43          error = ex;
44        }
45        warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
46        if (error instanceof Error && !(error.message in loggedTypeFailures)) {
47          // Only monitor this failure once because there tends to be a lot of the
48          // same error.
49          loggedTypeFailures[error.message] = true;
50
51          var stack = getStack ? getStack() : '';
52
53          warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
54        }
55      }
56    }
57  }
58}
59
60module.exports = checkPropTypes;
61
62},{"./lib/ReactPropTypesSecret":5,"fbjs/lib/invariant":7,"fbjs/lib/warning":8}],2:[function(require,module,exports){
63/**
64 * Copyright (c) 2013-present, Facebook, Inc.
65 *
66 * This source code is licensed under the MIT license found in the
67 * LICENSE file in the root directory of this source tree.
68 */
69
70'use strict';
71
72var emptyFunction = require('fbjs/lib/emptyFunction');
73var invariant = require('fbjs/lib/invariant');
74var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
75
76module.exports = function() {
77  function shim(props, propName, componentName, location, propFullName, secret) {
78    if (secret === ReactPropTypesSecret) {
79      // It is still safe when called from React.
80      return;
81    }
82    invariant(
83      false,
84      'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
85      'Use PropTypes.checkPropTypes() to call them. ' +
86      'Read more at http://fb.me/use-check-prop-types'
87    );
88  };
89  shim.isRequired = shim;
90  function getShim() {
91    return shim;
92  };
93  // Important!
94  // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
95  var ReactPropTypes = {
96    array: shim,
97    bool: shim,
98    func: shim,
99    number: shim,
100    object: shim,
101    string: shim,
102    symbol: shim,
103
104    any: shim,
105    arrayOf: getShim,
106    element: shim,
107    instanceOf: getShim,
108    node: shim,
109    objectOf: getShim,
110    oneOf: getShim,
111    oneOfType: getShim,
112    shape: getShim,
113    exact: getShim
114  };
115
116  ReactPropTypes.checkPropTypes = emptyFunction;
117  ReactPropTypes.PropTypes = ReactPropTypes;
118
119  return ReactPropTypes;
120};
121
122},{"./lib/ReactPropTypesSecret":5,"fbjs/lib/emptyFunction":6,"fbjs/lib/invariant":7}],3:[function(require,module,exports){
123/**
124 * Copyright (c) 2013-present, Facebook, Inc.
125 *
126 * This source code is licensed under the MIT license found in the
127 * LICENSE file in the root directory of this source tree.
128 */
129
130'use strict';
131
132var emptyFunction = require('fbjs/lib/emptyFunction');
133var invariant = require('fbjs/lib/invariant');
134var warning = require('fbjs/lib/warning');
135var assign = require('object-assign');
136
137var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
138var checkPropTypes = require('./checkPropTypes');
139
140module.exports = function(isValidElement, throwOnDirectAccess) {
141  /* global Symbol */
142  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
143  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
144
145  /**
146   * Returns the iterator method function contained on the iterable object.
147   *
148   * Be sure to invoke the function with the iterable as context:
149   *
150   *     var iteratorFn = getIteratorFn(myIterable);
151   *     if (iteratorFn) {
152   *       var iterator = iteratorFn.call(myIterable);
153   *       ...
154   *     }
155   *
156   * @param {?object} maybeIterable
157   * @return {?function}
158   */
159  function getIteratorFn(maybeIterable) {
160    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
161    if (typeof iteratorFn === 'function') {
162      return iteratorFn;
163    }
164  }
165
166  /**
167   * Collection of methods that allow declaration and validation of props that are
168   * supplied to React components. Example usage:
169   *
170   *   var Props = require('ReactPropTypes');
171   *   var MyArticle = React.createClass({
172   *     propTypes: {
173   *       // An optional string prop named "description".
174   *       description: Props.string,
175   *
176   *       // A required enum prop named "category".
177   *       category: Props.oneOf(['News','Photos']).isRequired,
178   *
179   *       // A prop named "dialog" that requires an instance of Dialog.
180   *       dialog: Props.instanceOf(Dialog).isRequired
181   *     },
182   *     render: function() { ... }
183   *   });
184   *
185   * A more formal specification of how these methods are used:
186   *
187   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
188   *   decl := ReactPropTypes.{type}(.isRequired)?
189   *
190   * Each and every declaration produces a function with the same signature. This
191   * allows the creation of custom validation functions. For example:
192   *
193   *  var MyLink = React.createClass({
194   *    propTypes: {
195   *      // An optional string or URI prop named "href".
196   *      href: function(props, propName, componentName) {
197   *        var propValue = props[propName];
198   *        if (propValue != null && typeof propValue !== 'string' &&
199   *            !(propValue instanceof URI)) {
200   *          return new Error(
201   *            'Expected a string or an URI for ' + propName + ' in ' +
202   *            componentName
203   *          );
204   *        }
205   *      }
206   *    },
207   *    render: function() {...}
208   *  });
209   *
210   * @internal
211   */
212
213  var ANONYMOUS = '<<anonymous>>';
214
215  // Important!
216  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
217  var ReactPropTypes = {
218    array: createPrimitiveTypeChecker('array'),
219    bool: createPrimitiveTypeChecker('boolean'),
220    func: createPrimitiveTypeChecker('function'),
221    number: createPrimitiveTypeChecker('number'),
222    object: createPrimitiveTypeChecker('object'),
223    string: createPrimitiveTypeChecker('string'),
224    symbol: createPrimitiveTypeChecker('symbol'),
225
226    any: createAnyTypeChecker(),
227    arrayOf: createArrayOfTypeChecker,
228    element: createElementTypeChecker(),
229    instanceOf: createInstanceTypeChecker,
230    node: createNodeChecker(),
231    objectOf: createObjectOfTypeChecker,
232    oneOf: createEnumTypeChecker,
233    oneOfType: createUnionTypeChecker,
234    shape: createShapeTypeChecker,
235    exact: createStrictShapeTypeChecker,
236  };
237
238  /**
239   * inlined Object.is polyfill to avoid requiring consumers ship their own
240   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
241   */
242  /*eslint-disable no-self-compare*/
243  function is(x, y) {
244    // SameValue algorithm
245    if (x === y) {
246      // Steps 1-5, 7-10
247      // Steps 6.b-6.e: +0 != -0
248      return x !== 0 || 1 / x === 1 / y;
249    } else {
250      // Step 6.a: NaN == NaN
251      return x !== x && y !== y;
252    }
253  }
254  /*eslint-enable no-self-compare*/
255
256  /**
257   * We use an Error-like object for backward compatibility as people may call
258   * PropTypes directly and inspect their output. However, we don't use real
259   * Errors anymore. We don't inspect their stack anyway, and creating them
260   * is prohibitively expensive if they are created too often, such as what
261   * happens in oneOfType() for any type before the one that matched.
262   */
263  function PropTypeError(message) {
264    this.message = message;
265    this.stack = '';
266  }
267  // Make `instanceof Error` still work for returned errors.
268  PropTypeError.prototype = Error.prototype;
269
270  function createChainableTypeChecker(validate) {
271    if ("development" !== 'production') {
272      var manualPropTypeCallCache = {};
273      var manualPropTypeWarningCount = 0;
274    }
275    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
276      componentName = componentName || ANONYMOUS;
277      propFullName = propFullName || propName;
278
279      if (secret !== ReactPropTypesSecret) {
280        if (throwOnDirectAccess) {
281          // New behavior only for users of `prop-types` package
282          invariant(
283            false,
284            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
285            'Use `PropTypes.checkPropTypes()` to call them. ' +
286            'Read more at http://fb.me/use-check-prop-types'
287          );
288        } else if ("development" !== 'production' && typeof console !== 'undefined') {
289          // Old behavior for people using React.PropTypes
290          var cacheKey = componentName + ':' + propName;
291          if (
292            !manualPropTypeCallCache[cacheKey] &&
293            // Avoid spamming the console because they are often not actionable except for lib authors
294            manualPropTypeWarningCount < 3
295          ) {
296            warning(
297              false,
298              'You are manually calling a React.PropTypes validation ' +
299              'function for the `%s` prop on `%s`. This is deprecated ' +
300              'and will throw in the standalone `prop-types` package. ' +
301              'You may be seeing this warning due to a third-party PropTypes ' +
302              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
303              propFullName,
304              componentName
305            );
306            manualPropTypeCallCache[cacheKey] = true;
307            manualPropTypeWarningCount++;
308          }
309        }
310      }
311      if (props[propName] == null) {
312        if (isRequired) {
313          if (props[propName] === null) {
314            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
315          }
316          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
317        }
318        return null;
319      } else {
320        return validate(props, propName, componentName, location, propFullName);
321      }
322    }
323
324    var chainedCheckType = checkType.bind(null, false);
325    chainedCheckType.isRequired = checkType.bind(null, true);
326
327    return chainedCheckType;
328  }
329
330  function createPrimitiveTypeChecker(expectedType) {
331    function validate(props, propName, componentName, location, propFullName, secret) {
332      var propValue = props[propName];
333      var propType = getPropType(propValue);
334      if (propType !== expectedType) {
335        // `propValue` being instance of, say, date/regexp, pass the 'object'
336        // check, but we can offer a more precise error message here rather than
337        // 'of type `object`'.
338        var preciseType = getPreciseType(propValue);
339
340        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
341      }
342      return null;
343    }
344    return createChainableTypeChecker(validate);
345  }
346
347  function createAnyTypeChecker() {
348    return createChainableTypeChecker(emptyFunction.thatReturnsNull);
349  }
350
351  function createArrayOfTypeChecker(typeChecker) {
352    function validate(props, propName, componentName, location, propFullName) {
353      if (typeof typeChecker !== 'function') {
354        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invali
vendor: 4,416 bytes, lines 354-455
354d PropType notation inside arrayOf.');
355      }
356      var propValue = props[propName];
357      if (!Array.isArray(propValue)) {
358        var propType = getPropType(propValue);
359        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
360      }
361      for (var i = 0; i < propValue.length; i++) {
362        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
363        if (error instanceof Error) {
364          return error;
365        }
366      }
367      return null;
368    }
369    return createChainableTypeChecker(validate);
370  }
371
372  function createElementTypeChecker() {
373    function validate(props, propName, componentName, location, propFullName) {
374      var propValue = props[propName];
375      if (!isValidElement(propValue)) {
376        var propType = getPropType(propValue);
377        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
378      }
379      return null;
380    }
381    return createChainableTypeChecker(validate);
382  }
383
384  function createInstanceTypeChecker(expectedClass) {
385    function validate(props, propName, componentName, location, propFullName) {
386      if (!(props[propName] instanceof expectedClass)) {
387        var expectedClassName = expectedClass.name || ANONYMOUS;
388        var actualClassName = getClassName(props[propName]);
389        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
390      }
391      return null;
392    }
393    return createChainableTypeChecker(validate);
394  }
395
396  function createEnumTypeChecker(expectedValues) {
397    if (!Array.isArray(expectedValues)) {
398      "development" !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
399      return emptyFunction.thatReturnsNull;
400    }
401
402    function validate(props, propName, componentName, location, propFullName) {
403      var propValue = props[propName];
404      for (var i = 0; i < expectedValues.length; i++) {
405        if (is(propValue, expectedValues[i])) {
406          return null;
407        }
408      }
409
410      var valuesString = JSON.stringify(expectedValues);
411      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
412    }
413    return createChainableTypeChecker(validate);
414  }
415
416  function createObjectOfTypeChecker(typeChecker) {
417    function validate(props, propName, componentName, location, propFullName) {
418      if (typeof typeChecker !== 'function') {
419        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
420      }
421      var propValue = props[propName];
422      var propType = getPropType(propValue);
423      if (propType !== 'object') {
424        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
425      }
426      for (var key in propValue) {
427        if (propValue.hasOwnProperty(key)) {
428          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
429          if (error instanceof Error) {
430            return error;
431          }
432        }
433      }
434      return null;
435    }
436    return createChainableTypeChecker(validate);
437  }
438
439  function createUnionTypeChecker(arrayOfTypeCheckers) {
440    if (!Array.isArray(arrayOfTypeCheckers)) {
441      "development" !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
442      return emptyFunction.thatReturnsNull;
443    }
444
445    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
446      var checker = arrayOfTypeCheckers[i];
447      if (typeof checker !== 'function') {
448        warning(
449          false,
450          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
451          'received %s at index %s.',
452          getPostfixForTypeWarning(checker),
453          i
454        );
455        return emptyFunction.t
vendor: 6,594 bytes, lines 455-665
455hatReturnsNull;
456      }
457    }
458
459    function validate(props, propName, componentName, location, propFullName) {
460      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
461        var checker = arrayOfTypeCheckers[i];
462        if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
463          return null;
464        }
465      }
466
467      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
468    }
469    return createChainableTypeChecker(validate);
470  }
471
472  function createNodeChecker() {
473    function validate(props, propName, componentName, location, propFullName) {
474      if (!isNode(props[propName])) {
475        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
476      }
477      return null;
478    }
479    return createChainableTypeChecker(validate);
480  }
481
482  function createShapeTypeChecker(shapeTypes) {
483    function validate(props, propName, componentName, location, propFullName) {
484      var propValue = props[propName];
485      var propType = getPropType(propValue);
486      if (propType !== 'object') {
487        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
488      }
489      for (var key in shapeTypes) {
490        var checker = shapeTypes[key];
491        if (!checker) {
492          continue;
493        }
494        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
495        if (error) {
496          return error;
497        }
498      }
499      return null;
500    }
501    return createChainableTypeChecker(validate);
502  }
503
504  function createStrictShapeTypeChecker(shapeTypes) {
505    function validate(props, propName, componentName, location, propFullName) {
506      var propValue = props[propName];
507      var propType = getPropType(propValue);
508      if (propType !== 'object') {
509        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
510      }
511      // We need to check all keys in case some are required but missing from
512      // props.
513      var allKeys = assign({}, props[propName], shapeTypes);
514      for (var key in allKeys) {
515        var checker = shapeTypes[key];
516        if (!checker) {
517          return new PropTypeError(
518            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
519            '\nBad object: ' + JSON.stringify(props[propName], null, '  ') +
520            '\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')
521          );
522        }
523        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
524        if (error) {
525          return error;
526        }
527      }
528      return null;
529    }
530
531    return createChainableTypeChecker(validate);
532  }
533
534  function isNode(propValue) {
535    switch (typeof propValue) {
536      case 'number':
537      case 'string':
538      case 'undefined':
539        return true;
540      case 'boolean':
541        return !propValue;
542      case 'object':
543        if (Array.isArray(propValue)) {
544          return propValue.every(isNode);
545        }
546        if (propValue === null || isValidElement(propValue)) {
547          return true;
548        }
549
550        var iteratorFn = getIteratorFn(propValue);
551        if (iteratorFn) {
552          var iterator = iteratorFn.call(propValue);
553          var step;
554          if (iteratorFn !== propValue.entries) {
555            while (!(step = iterator.next()).done) {
556              if (!isNode(step.value)) {
557                return false;
558              }
559            }
560          } else {
561            // Iterator will provide entry [k,v] tuples rather than values.
562            while (!(step = iterator.next()).done) {
563              var entry = step.value;
564              if (entry) {
565                if (!isNode(entry[1])) {
566                  return false;
567                }
568              }
569            }
570          }
571        } else {
572          return false;
573        }
574
575        return true;
576      default:
577        return false;
578    }
579  }
580
581  function isSymbol(propType, propValue) {
582    // Native Symbol.
583    if (propType === 'symbol') {
584      return true;
585    }
586
587    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
588    if (propValue['@@toStringTag'] === 'Symbol') {
589      return true;
590    }
591
592    // Fallback for non-spec compliant Symbols which are polyfilled.
593    if (typeof Symbol === 'function' && propValue instanceof Symbol) {
594      return true;
595    }
596
597    return false;
598  }
599
600  // Equivalent of `typeof` but with special handling for array and regexp.
601  function getPropType(propValue) {
602    var propType = typeof propValue;
603    if (Array.isArray(propValue)) {
604      return 'array';
605    }
606    if (propValue instanceof RegExp) {
607      // Old webkits (at least until Android 4.0) return 'function' rather than
608      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
609      // passes PropTypes.object.
610      return 'object';
611    }
612    if (isSymbol(propType, propValue)) {
613      return 'symbol';
614    }
615    return propType;
616  }
617
618  // This handles more types than `getPropType`. Only used for error messages.
619  // See `createPrimitiveTypeChecker`.
620  function getPreciseType(propValue) {
621    if (typeof propValue === 'undefined' || propValue === null) {
622      return '' + propValue;
623    }
624    var propType = getPropType(propValue);
625    if (propType === 'object') {
626      if (propValue instanceof Date) {
627        return 'date';
628      } else if (propValue instanceof RegExp) {
629        return 'regexp';
630      }
631    }
632    return propType;
633  }
634
635  // Returns a string that is postfixed to a warning about an invalid type.
636  // For example, "undefined" or "of type array"
637  function getPostfixForTypeWarning(value) {
638    var type = getPreciseType(value);
639    switch (type) {
640      case 'array':
641      case 'object':
642        return 'an ' + type;
643      case 'boolean':
644      case 'date':
645      case 'regexp':
646        return 'a ' + type;
647      default:
648        return type;
649    }
650  }
651
652  // Returns class name of the object, if any.
653  function getClassName(propValue) {
654    if (!propValue.constructor || !propValue.constructor.name) {
655      return ANONYMOUS;
656    }
657    return propValue.constructor.name;
658  }
659
660  ReactPropTypes.checkPropTypes = checkPropTypes;
661  ReactPropTypes.PropTypes = ReactPropTypes;
662
663  return ReactPropTypes;
664};
665
666},{"./checkPropTypes":1,"./lib/ReactPropTypesSecret":5,"fbjs/lib/emptyFunction":6,"fbjs/lib/invariant":7,"fbjs/lib/warning":8,"object-assign":9}],4:[function(require,module,exports){
667/**
668 * Copyright (c) 2013-present, Facebook, Inc.
669 *
670 * This source code is licensed under the MIT license found in the
671 * LICENSE file in the root directory of this source tree.
672 */
673
674if ("development" !== 'production') {
675  var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
676    Symbol.for &&
677    Symbol.for('react.element')) ||
678    0xeac7;
679
680  var isValidElement = function(object) {
681    return typeof object === 'object' &&
682      object !== null &&
683      object.$$typeof === REACT_ELEMENT_TYPE;
684  };
685
686  // By explicitly using `prop-types` you are opting into new development behavior.
687  // http://fb.me/prop-types-in-prod
688  var throwOnDirectAccess = true;
689  module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);
690} else {
691  // By explicitly using `prop-types` you are opting into new production behavior.
692  // http://fb.me/prop-types-in-prod
693  module.exports = require('./factoryWithThrowingShims')();
694}
695
696},{"./factoryWithThrowingShims":2,"./factoryWithTypeCheckers":3}],5:[function(require,module,exports){
697/**
698 * Copyright (c) 2013-present, Facebook, Inc.
699 *
700 * This source code is licensed under the MIT license found in the
701 * LICENSE file in the root directory of this source tree.
702 */
703
704'use strict';
705
706var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
707
708module.exports = ReactPropTypesSecret;
709
710},{}],6:[function(require,module,exports){
711"use strict";
712
713/**
714 * Copyright (c) 2013-present, Facebook, Inc.
715 * All rights reserved.
716 *
717 * This source code is licensed under the BSD-style license found in the
718 * LICENSE file in the root directory of this source tree. An additional grant
719 * of patent rights can be found in the PATENTS file in the same directory.
720 *
721 * 
722 */
723
724function makeEmptyFunction(arg) {
725  return function () {
726    return arg;
727  };
728}
729
730/**
731 * This function accepts and discards inputs; it has no side effects. This is
732 * primarily useful idiomatically for overridable function endpoints which
733 * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
734 */
735var emptyFunction = function emptyFunction() {};
736
737emptyFunction.thatReturns = makeEmptyFunction;
738emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
739emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
740emptyFunction.thatReturnsNull = makeEmptyFunction(null);
741emptyFunction.thatReturnsThis = function () {
742  return this;
743};
744emptyFunction.thatReturnsArgument = function (arg) {
745  return arg;
746};
747
748module.exports = emptyFunction;
749},{}],7:[function(require,module,exports){
750/**
751 * Copyright (c) 2013-present, Facebook, Inc.
752 * All rights reserved.
753 *
754 * This source code is licensed under the BSD-style license found in the
755 * LICENSE file in the root directory of this source tree. An additional grant
756 * of patent rights can be found in the PATENTS file in the same directory.
757 *
758 */
759
760'use strict';
761
762/**
763 * Use invariant() to assert state which your program assumes to be true.
764 *
765 * Provide sprintf-style format (only %s is supported) and arguments
766 * to provide information about what broke and what you were
767 * expecting.
768 *
769 * The invariant message will be stripped in production, but the invariant
770 * will remain to ensure logic does not differ in production.
771 */
772
773var validateFormat = function validateFormat(format) {};
774
775if ("development" !== 'production') {
776  validateFormat = function validateFormat(format) {
777    if (format === undefined) {
778      throw new Error('invariant requires an error message argument');
779    }
780  };
781}
782
783function invariant(condition, format, a, b, c, d, e, f) {
784  validateFormat(format);
785
786  if (!condition) {
787    var error;
788    if (format === undefined) {
789      error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
790    } else {
791      var args = [a, b, c, d, e, f];
792      var argIndex = 0;
793      error = new Error(format.replace(/%s/g, function () {
794        return args[argIndex++];
795      }));
796      error.name = 'Invariant Violation';
797    }
798
799    error.framesToPop = 1; // we don't care about invariant's own frame
800    throw error;
801  }
802}
803
804module.exports = invariant;
805},{}],8:[function(require,module,exports){
806/**
807 * Copyright 2014-2015, Facebook, Inc.
808 * All rights reserved.
809 *
810 * This source code is licensed under the BSD-style license found in the
811 * LICENSE file in the root directory of this source tree. An additional grant
812 * of patent rights can be found in the PATENTS file in the same directory.
813 *
814 */
815
816'use strict';
817
818var emptyFunction = require('./emptyFunction');
819
820/**
821 * Similar to invariant but only logs a warning if the condition is not met.
822 * This can be used to log issues in development environments in critical
823 * paths. Removing the logging code for production environments will keep the
824 * same logic and follow the same code paths.
825 */
826
827var warning = emptyFunction;
828
829if ("development" !== 'production') {
830  (function () {
831    var printWarning = function printWarning(format) {
832      for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
833        args[_key - 1] = arguments[_key];
834      }
835
836      var argIndex = 0;
837      var message = 'Warning: ' + format.replace(/%s/g, function () {
838        return args[argIndex++];
839      });
840      if (typeof console !== 'undefined') {
841        console.error(message);
842      }
843      try {
844        // --- Welcome to debugging React ---
845        // This error was thrown as a convenience so that you can use this stack
846        // to find the callsite that caused this warning to fire.
847        throw new Error(message);
848      } catch (x) {}
849    };
850
851    warning = function warning(condition, format) {
852      if (format === undefined) {
853        throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
854      }
855
856      if (format.indexOf('Failed Composite propType: ') === 0) {
857        return; // Ignore CompositeComponent proptype check.
858      }
859
860      if (!condition) {
861        for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
862          args[_key2 - 2] = arguments[_key2];
863        }
864
865        printWarning.apply(undefined, [format].concat(args));
866      }
867    };
868  })();
869}
870
871module.exports = warning;
872},{"./emptyFunction":6}],9:[function(require,module,exports){
873/*
874object-assign
875(c) Sindre Sorhus
876@license MIT
vendor: 2,082 bytes, lines 877-965
877*/
878
879'use strict';
880/* eslint-disable no-unused-vars */
881var getOwnPropertySymbols = Object.getOwnPropertySymbols;
882var hasOwnProperty = Object.prototype.hasOwnProperty;
883var propIsEnumerable = Object.prototype.propertyIsEnumerable;
884
885function toObject(val) {
886	if (val === null || val === undefined) {
887		throw new TypeError('Object.assign cannot be called with null or undefined');
888	}
889
890	return Object(val);
891}
892
893function shouldUseNative() {
894	try {
895		if (!Object.assign) {
896			return false;
897		}
898
899		// Detect buggy property enumeration order in older V8 versions.
900
901		// https://bugs.chromium.org/p/v8/issues/detail?id=4118
902		var test1 = new String('abc');  // eslint-disable-line no-new-wrappers
903		test1[5] = 'de';
904		if (Object.getOwnPropertyNames(test1)[0] === '5') {
905			return false;
906		}
907
908		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
909		var test2 = {};
910		for (var i = 0; i < 10; i++) {
911			test2['_' + String.fromCharCode(i)] = i;
912		}
913		var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
914			return test2[n];
915		});
916		if (order2.join('') !== '0123456789') {
917			return false;
918		}
919
920		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
921		var test3 = {};
922		'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
923			test3[letter] = letter;
924		});
925		if (Object.keys(Object.assign({}, test3)).join('') !==
926				'abcdefghijklmnopqrst') {
927			return false;
928		}
929
930		return true;
931	} catch (err) {
932		// We don't expect any of the above to throw, but better to be safe.
933		return false;
934	}
935}
936
937module.exports = shouldUseNative() ? Object.assign : function (target, source) {
938	var from;
939	var to = toObject(target);
940	var symbols;
941
942	for (var s = 1; s < arguments.length; s++) {
943		from = Object(arguments[s]);
944
945		for (var key in from) {
946			if (hasOwnProperty.call(from, key)) {
947				to[key] = from[key];
948			}
949		}
950
951		if (getOwnPropertySymbols) {
952			symbols = getOwnPropertySymbols(from);
953			for (var i = 0; i < symbols.length; i++) {
954				if (propIsEnumerable.call(from, symbols[i])) {
955					to[symbols[i]] = from[symbols[i]];
956				}
957			}
958		}
959	}
960
961	return to;
962};
963
964},{}]},{},[4])(4)
965});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.