prop-types.js 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337
  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. 'use strict';
  9. var printWarning = function() {};
  10. if ("development" !== 'production') {
  11. var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
  12. var loggedTypeFailures = {};
  13. var has = Function.call.bind(Object.prototype.hasOwnProperty);
  14. printWarning = function(text) {
  15. var message = 'Warning: ' + text;
  16. if (typeof console !== 'undefined') {
  17. console.error(message);
  18. }
  19. try {
  20. // --- Welcome to debugging React ---
  21. // This error was thrown as a convenience so that you can use this stack
  22. // to find the callsite that caused this warning to fire.
  23. throw new Error(message);
  24. } catch (x) {}
  25. };
  26. }
  27. /**
  28. * Assert that the values match with the type specs.
  29. * Error messages are memorized and will only be shown once.
  30. *
  31. * @param {object} typeSpecs Map of name to a ReactPropType
  32. * @param {object} values Runtime values that need to be type-checked
  33. * @param {string} location e.g. "prop", "context", "child context"
  34. * @param {string} componentName Name of the component for error messages.
  35. * @param {?Function} getStack Returns the component stack.
  36. * @private
  37. */
  38. function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
  39. if ("development" !== 'production') {
  40. for (var typeSpecName in typeSpecs) {
  41. if (has(typeSpecs, typeSpecName)) {
  42. var error;
  43. // Prop type validation may throw. In case they do, we don't want to
  44. // fail the render phase where it didn't fail before. So we log it.
  45. // After these have been cleaned up, we'll let them throw.
  46. try {
  47. // This is intentionally an invariant that gets caught. It's the same
  48. // behavior as without this statement except with a better message.
  49. if (typeof typeSpecs[typeSpecName] !== 'function') {
  50. var err = Error(
  51. (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
  52. 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
  53. );
  54. err.name = 'Invariant Violation';
  55. throw err;
  56. }
  57. error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
  58. } catch (ex) {
  59. error = ex;
  60. }
  61. if (error && !(error instanceof Error)) {
  62. printWarning(
  63. (componentName || 'React class') + ': type specification of ' +
  64. location + ' `' + typeSpecName + '` is invalid; the type checker ' +
  65. 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
  66. 'You may have forgotten to pass an argument to the type checker ' +
  67. 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
  68. 'shape all require an argument).'
  69. );
  70. }
  71. if (error instanceof Error && !(error.message in loggedTypeFailures)) {
  72. // Only monitor this failure once because there tends to be a lot of the
  73. // same error.
  74. loggedTypeFailures[error.message] = true;
  75. var stack = getStack ? getStack() : '';
  76. printWarning(
  77. 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
  78. );
  79. }
  80. }
  81. }
  82. }
  83. }
  84. /**
  85. * Resets warning cache when testing.
  86. *
  87. * @private
  88. */
  89. checkPropTypes.resetWarningCache = function() {
  90. if ("development" !== 'production') {
  91. loggedTypeFailures = {};
  92. }
  93. }
  94. module.exports = checkPropTypes;
  95. },{"./lib/ReactPropTypesSecret":5}],2:[function(require,module,exports){
  96. /**
  97. * Copyright (c) 2013-present, Facebook, Inc.
  98. *
  99. * This source code is licensed under the MIT license found in the
  100. * LICENSE file in the root directory of this source tree.
  101. */
  102. 'use strict';
  103. var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
  104. function emptyFunction() {}
  105. function emptyFunctionWithReset() {}
  106. emptyFunctionWithReset.resetWarningCache = emptyFunction;
  107. module.exports = function() {
  108. function shim(props, propName, componentName, location, propFullName, secret) {
  109. if (secret === ReactPropTypesSecret) {
  110. // It is still safe when called from React.
  111. return;
  112. }
  113. var err = new Error(
  114. 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
  115. 'Use PropTypes.checkPropTypes() to call them. ' +
  116. 'Read more at http://fb.me/use-check-prop-types'
  117. );
  118. err.name = 'Invariant Violation';
  119. throw err;
  120. };
  121. shim.isRequired = shim;
  122. function getShim() {
  123. return shim;
  124. };
  125. // Important!
  126. // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
  127. var ReactPropTypes = {
  128. array: shim,
  129. bool: shim,
  130. func: shim,
  131. number: shim,
  132. object: shim,
  133. string: shim,
  134. symbol: shim,
  135. any: shim,
  136. arrayOf: getShim,
  137. element: shim,
  138. elementType: shim,
  139. instanceOf: getShim,
  140. node: shim,
  141. objectOf: getShim,
  142. oneOf: getShim,
  143. oneOfType: getShim,
  144. shape: getShim,
  145. exact: getShim,
  146. checkPropTypes: emptyFunctionWithReset,
  147. resetWarningCache: emptyFunction
  148. };
  149. ReactPropTypes.PropTypes = ReactPropTypes;
  150. return ReactPropTypes;
  151. };
  152. },{"./lib/ReactPropTypesSecret":5}],3:[function(require,module,exports){
  153. /**
  154. * Copyright (c) 2013-present, Facebook, Inc.
  155. *
  156. * This source code is licensed under the MIT license found in the
  157. * LICENSE file in the root directory of this source tree.
  158. */
  159. 'use strict';
  160. var ReactIs = require('react-is');
  161. var assign = require('object-assign');
  162. var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
  163. var checkPropTypes = require('./checkPropTypes');
  164. var has = Function.call.bind(Object.prototype.hasOwnProperty);
  165. var printWarning = function() {};
  166. if ("development" !== 'production') {
  167. printWarning = function(text) {
  168. var message = 'Warning: ' + text;
  169. if (typeof console !== 'undefined') {
  170. console.error(message);
  171. }
  172. try {
  173. // --- Welcome to debugging React ---
  174. // This error was thrown as a convenience so that you can use this stack
  175. // to find the callsite that caused this warning to fire.
  176. throw new Error(message);
  177. } catch (x) {}
  178. };
  179. }
  180. function emptyFunctionThatReturnsNull() {
  181. return null;
  182. }
  183. module.exports = function(isValidElement, throwOnDirectAccess) {
  184. /* global Symbol */
  185. var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
  186. var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
  187. /**
  188. * Returns the iterator method function contained on the iterable object.
  189. *
  190. * Be sure to invoke the function with the iterable as context:
  191. *
  192. * var iteratorFn = getIteratorFn(myIterable);
  193. * if (iteratorFn) {
  194. * var iterator = iteratorFn.call(myIterable);
  195. * ...
  196. * }
  197. *
  198. * @param {?object} maybeIterable
  199. * @return {?function}
  200. */
  201. function getIteratorFn(maybeIterable) {
  202. var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
  203. if (typeof iteratorFn === 'function') {
  204. return iteratorFn;
  205. }
  206. }
  207. /**
  208. * Collection of methods that allow declaration and validation of props that are
  209. * supplied to React components. Example usage:
  210. *
  211. * var Props = require('ReactPropTypes');
  212. * var MyArticle = React.createClass({
  213. * propTypes: {
  214. * // An optional string prop named "description".
  215. * description: Props.string,
  216. *
  217. * // A required enum prop named "category".
  218. * category: Props.oneOf(['News','Photos']).isRequired,
  219. *
  220. * // A prop named "dialog" that requires an instance of Dialog.
  221. * dialog: Props.instanceOf(Dialog).isRequired
  222. * },
  223. * render: function() { ... }
  224. * });
  225. *
  226. * A more formal specification of how these methods are used:
  227. *
  228. * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
  229. * decl := ReactPropTypes.{type}(.isRequired)?
  230. *
  231. * Each and every declaration produces a function with the same signature. This
  232. * allows the creation of custom validation functions. For example:
  233. *
  234. * var MyLink = React.createClass({
  235. * propTypes: {
  236. * // An optional string or URI prop named "href".
  237. * href: function(props, propName, componentName) {
  238. * var propValue = props[propName];
  239. * if (propValue != null && typeof propValue !== 'string' &&
  240. * !(propValue instanceof URI)) {
  241. * return new Error(
  242. * 'Expected a string or an URI for ' + propName + ' in ' +
  243. * componentName
  244. * );
  245. * }
  246. * }
  247. * },
  248. * render: function() {...}
  249. * });
  250. *
  251. * @internal
  252. */
  253. var ANONYMOUS = '<<anonymous>>';
  254. // Important!
  255. // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
  256. var ReactPropTypes = {
  257. array: createPrimitiveTypeChecker('array'),
  258. bool: createPrimitiveTypeChecker('boolean'),
  259. func: createPrimitiveTypeChecker('function'),
  260. number: createPrimitiveTypeChecker('number'),
  261. object: createPrimitiveTypeChecker('object'),
  262. string: createPrimitiveTypeChecker('string'),
  263. symbol: createPrimitiveTypeChecker('symbol'),
  264. any: createAnyTypeChecker(),
  265. arrayOf: createArrayOfTypeChecker,
  266. element: createElementTypeChecker(),
  267. elementType: createElementTypeTypeChecker(),
  268. instanceOf: createInstanceTypeChecker,
  269. node: createNodeChecker(),
  270. objectOf: createObjectOfTypeChecker,
  271. oneOf: createEnumTypeChecker,
  272. oneOfType: createUnionTypeChecker,
  273. shape: createShapeTypeChecker,
  274. exact: createStrictShapeTypeChecker,
  275. };
  276. /**
  277. * inlined Object.is polyfill to avoid requiring consumers ship their own
  278. * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
  279. */
  280. /*eslint-disable no-self-compare*/
  281. function is(x, y) {
  282. // SameValue algorithm
  283. if (x === y) {
  284. // Steps 1-5, 7-10
  285. // Steps 6.b-6.e: +0 != -0
  286. return x !== 0 || 1 / x === 1 / y;
  287. } else {
  288. // Step 6.a: NaN == NaN
  289. return x !== x && y !== y;
  290. }
  291. }
  292. /*eslint-enable no-self-compare*/
  293. /**
  294. * We use an Error-like object for backward compatibility as people may call
  295. * PropTypes directly and inspect their output. However, we don't use real
  296. * Errors anymore. We don't inspect their stack anyway, and creating them
  297. * is prohibitively expensive if they are created too often, such as what
  298. * happens in oneOfType() for any type before the one that matched.
  299. */
  300. function PropTypeError(message) {
  301. this.message = message;
  302. this.stack = '';
  303. }
  304. // Make `instanceof Error` still work for returned errors.
  305. PropTypeError.prototype = Error.prototype;
  306. function createChainableTypeChecker(validate) {
  307. if ("development" !== 'production') {
  308. var manualPropTypeCallCache = {};
  309. var manualPropTypeWarningCount = 0;
  310. }
  311. function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
  312. componentName = componentName || ANONYMOUS;
  313. propFullName = propFullName || propName;
  314. if (secret !== ReactPropTypesSecret) {
  315. if (throwOnDirectAccess) {
  316. // New behavior only for users of `prop-types` package
  317. var err = new Error(
  318. 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
  319. 'Use `PropTypes.checkPropTypes()` to call them. ' +
  320. 'Read more at http://fb.me/use-check-prop-types'
  321. );
  322. err.name = 'Invariant Violation';
  323. throw err;
  324. } else if ("development" !== 'production' && typeof console !== 'undefined') {
  325. // Old behavior for people using React.PropTypes
  326. var cacheKey = componentName + ':' + propName;
  327. if (
  328. !manualPropTypeCallCache[cacheKey] &&
  329. // Avoid spamming the console because they are often not actionable except for lib authors
  330. manualPropTypeWarningCount < 3
  331. ) {
  332. printWarning(
  333. 'You are manually calling a React.PropTypes validation ' +
  334. 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
  335. 'and will throw in the standalone `prop-types` package. ' +
  336. 'You may be seeing this warning due to a third-party PropTypes ' +
  337. 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
  338. );
  339. manualPropTypeCallCache[cacheKey] = true;
  340. manualPropTypeWarningCount++;
  341. }
  342. }
  343. }
  344. if (props[propName] == null) {
  345. if (isRequired) {
  346. if (props[propName] === null) {
  347. return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
  348. }
  349. return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
  350. }
  351. return null;
  352. } else {
  353. return validate(props, propName, componentName, location, propFullName);
  354. }
  355. }
  356. var chainedCheckType = checkType.bind(null, false);
  357. chainedCheckType.isRequired = checkType.bind(null, true);
  358. return chainedCheckType;
  359. }
  360. function createPrimitiveTypeChecker(expectedType) {
  361. function validate(props, propName, componentName, location, propFullName, secret) {
  362. var propValue = props[propName];
  363. var propType = getPropType(propValue);
  364. if (propType !== expectedType) {
  365. // `propValue` being instance of, say, date/regexp, pass the 'object'
  366. // check, but we can offer a more precise error message here rather than
  367. // 'of type `object`'.
  368. var preciseType = getPreciseType(propValue);
  369. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
  370. }
  371. return null;
  372. }
  373. return createChainableTypeChecker(validate);
  374. }
  375. function createAnyTypeChecker() {
  376. return createChainableTypeChecker(emptyFunctionThatReturnsNull);
  377. }
  378. function createArrayOfTypeChecker(typeChecker) {
  379. function validate(props, propName, componentName, location, propFullName) {
  380. if (typeof typeChecker !== 'function') {
  381. return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
  382. }
  383. var propValue = props[propName];
  384. if (!Array.isArray(propValue)) {
  385. var propType = getPropType(propValue);
  386. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
  387. }
  388. for (var i = 0; i < propValue.length; i++) {
  389. var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
  390. if (error instanceof Error) {
  391. return error;
  392. }
  393. }
  394. return null;
  395. }
  396. return createChainableTypeChecker(validate);
  397. }
  398. function createElementTypeChecker() {
  399. function validate(props, propName, componentName, location, propFullName) {
  400. var propValue = props[propName];
  401. if (!isValidElement(propValue)) {
  402. var propType = getPropType(propValue);
  403. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
  404. }
  405. return null;
  406. }
  407. return createChainableTypeChecker(validate);
  408. }
  409. function createElementTypeTypeChecker() {
  410. function validate(props, propName, componentName, location, propFullName) {
  411. var propValue = props[propName];
  412. if (!ReactIs.isValidElementType(propValue)) {
  413. var propType = getPropType(propValue);
  414. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
  415. }
  416. return null;
  417. }
  418. return createChainableTypeChecker(validate);
  419. }
  420. function createInstanceTypeChecker(expectedClass) {
  421. function validate(props, propName, componentName, location, propFullName) {
  422. if (!(props[propName] instanceof expectedClass)) {
  423. var expectedClassName = expectedClass.name || ANONYMOUS;
  424. var actualClassName = getClassName(props[propName]);
  425. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
  426. }
  427. return null;
  428. }
  429. return createChainableTypeChecker(validate);
  430. }
  431. function createEnumTypeChecker(expectedValues) {
  432. if (!Array.isArray(expectedValues)) {
  433. if ("development" !== 'production') {
  434. if (arguments.length > 1) {
  435. printWarning(
  436. 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
  437. 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
  438. );
  439. } else {
  440. printWarning('Invalid argument supplied to oneOf, expected an array.');
  441. }
  442. }
  443. return emptyFunctionThatReturnsNull;
  444. }
  445. function validate(props, propName, componentName, location, propFullName) {
  446. var propValue = props[propName];
  447. for (var i = 0; i < expectedValues.length; i++) {
  448. if (is(propValue, expectedValues[i])) {
  449. return null;
  450. }
  451. }
  452. var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
  453. var type = getPreciseType(value);
  454. if (type === 'symbol') {
  455. return String(value);
  456. }
  457. return value;
  458. });
  459. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
  460. }
  461. return createChainableTypeChecker(validate);
  462. }
  463. function createObjectOfTypeChecker(typeChecker) {
  464. function validate(props, propName, componentName, location, propFullName) {
  465. if (typeof typeChecker !== 'function') {
  466. return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
  467. }
  468. var propValue = props[propName];
  469. var propType = getPropType(propValue);
  470. if (propType !== 'object') {
  471. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
  472. }
  473. for (var key in propValue) {
  474. if (has(propValue, key)) {
  475. var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
  476. if (error instanceof Error) {
  477. return error;
  478. }
  479. }
  480. }
  481. return null;
  482. }
  483. return createChainableTypeChecker(validate);
  484. }
  485. function createUnionTypeChecker(arrayOfTypeCheckers) {
  486. if (!Array.isArray(arrayOfTypeCheckers)) {
  487. "development" !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
  488. return emptyFunctionThatReturnsNull;
  489. }
  490. for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
  491. var checker = arrayOfTypeCheckers[i];
  492. if (typeof checker !== 'function') {
  493. printWarning(
  494. 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
  495. 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
  496. );
  497. return emptyFunctionThatReturnsNull;
  498. }
  499. }
  500. function validate(props, propName, componentName, location, propFullName) {
  501. for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
  502. var checker = arrayOfTypeCheckers[i];
  503. if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
  504. return null;
  505. }
  506. }
  507. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
  508. }
  509. return createChainableTypeChecker(validate);
  510. }
  511. function createNodeChecker() {
  512. function validate(props, propName, componentName, location, propFullName) {
  513. if (!isNode(props[propName])) {
  514. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
  515. }
  516. return null;
  517. }
  518. return createChainableTypeChecker(validate);
  519. }
  520. function createShapeTypeChecker(shapeTypes) {
  521. function validate(props, propName, componentName, location, propFullName) {
  522. var propValue = props[propName];
  523. var propType = getPropType(propValue);
  524. if (propType !== 'object') {
  525. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
  526. }
  527. for (var key in shapeTypes) {
  528. var checker = shapeTypes[key];
  529. if (!checker) {
  530. continue;
  531. }
  532. var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
  533. if (error) {
  534. return error;
  535. }
  536. }
  537. return null;
  538. }
  539. return createChainableTypeChecker(validate);
  540. }
  541. function createStrictShapeTypeChecker(shapeTypes) {
  542. function validate(props, propName, componentName, location, propFullName) {
  543. var propValue = props[propName];
  544. var propType = getPropType(propValue);
  545. if (propType !== 'object') {
  546. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
  547. }
  548. // We need to check all keys in case some are required but missing from
  549. // props.
  550. var allKeys = assign({}, props[propName], shapeTypes);
  551. for (var key in allKeys) {
  552. var checker = shapeTypes[key];
  553. if (!checker) {
  554. return new PropTypeError(
  555. 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
  556. '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
  557. '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
  558. );
  559. }
  560. var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
  561. if (error) {
  562. return error;
  563. }
  564. }
  565. return null;
  566. }
  567. return createChainableTypeChecker(validate);
  568. }
  569. function isNode(propValue) {
  570. switch (typeof propValue) {
  571. case 'number':
  572. case 'string':
  573. case 'undefined':
  574. return true;
  575. case 'boolean':
  576. return !propValue;
  577. case 'object':
  578. if (Array.isArray(propValue)) {
  579. return propValue.every(isNode);
  580. }
  581. if (propValue === null || isValidElement(propValue)) {
  582. return true;
  583. }
  584. var iteratorFn = getIteratorFn(propValue);
  585. if (iteratorFn) {
  586. var iterator = iteratorFn.call(propValue);
  587. var step;
  588. if (iteratorFn !== propValue.entries) {
  589. while (!(step = iterator.next()).done) {
  590. if (!isNode(step.value)) {
  591. return false;
  592. }
  593. }
  594. } else {
  595. // Iterator will provide entry [k,v] tuples rather than values.
  596. while (!(step = iterator.next()).done) {
  597. var entry = step.value;
  598. if (entry) {
  599. if (!isNode(entry[1])) {
  600. return false;
  601. }
  602. }
  603. }
  604. }
  605. } else {
  606. return false;
  607. }
  608. return true;
  609. default:
  610. return false;
  611. }
  612. }
  613. function isSymbol(propType, propValue) {
  614. // Native Symbol.
  615. if (propType === 'symbol') {
  616. return true;
  617. }
  618. // falsy value can't be a Symbol
  619. if (!propValue) {
  620. return false;
  621. }
  622. // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
  623. if (propValue['@@toStringTag'] === 'Symbol') {
  624. return true;
  625. }
  626. // Fallback for non-spec compliant Symbols which are polyfilled.
  627. if (typeof Symbol === 'function' && propValue instanceof Symbol) {
  628. return true;
  629. }
  630. return false;
  631. }
  632. // Equivalent of `typeof` but with special handling for array and regexp.
  633. function getPropType(propValue) {
  634. var propType = typeof propValue;
  635. if (Array.isArray(propValue)) {
  636. return 'array';
  637. }
  638. if (propValue instanceof RegExp) {
  639. // Old webkits (at least until Android 4.0) return 'function' rather than
  640. // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
  641. // passes PropTypes.object.
  642. return 'object';
  643. }
  644. if (isSymbol(propType, propValue)) {
  645. return 'symbol';
  646. }
  647. return propType;
  648. }
  649. // This handles more types than `getPropType`. Only used for error messages.
  650. // See `createPrimitiveTypeChecker`.
  651. function getPreciseType(propValue) {
  652. if (typeof propValue === 'undefined' || propValue === null) {
  653. return '' + propValue;
  654. }
  655. var propType = getPropType(propValue);
  656. if (propType === 'object') {
  657. if (propValue instanceof Date) {
  658. return 'date';
  659. } else if (propValue instanceof RegExp) {
  660. return 'regexp';
  661. }
  662. }
  663. return propType;
  664. }
  665. // Returns a string that is postfixed to a warning about an invalid type.
  666. // For example, "undefined" or "of type array"
  667. function getPostfixForTypeWarning(value) {
  668. var type = getPreciseType(value);
  669. switch (type) {
  670. case 'array':
  671. case 'object':
  672. return 'an ' + type;
  673. case 'boolean':
  674. case 'date':
  675. case 'regexp':
  676. return 'a ' + type;
  677. default:
  678. return type;
  679. }
  680. }
  681. // Returns class name of the object, if any.
  682. function getClassName(propValue) {
  683. if (!propValue.constructor || !propValue.constructor.name) {
  684. return ANONYMOUS;
  685. }
  686. return propValue.constructor.name;
  687. }
  688. ReactPropTypes.checkPropTypes = checkPropTypes;
  689. ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
  690. ReactPropTypes.PropTypes = ReactPropTypes;
  691. return ReactPropTypes;
  692. };
  693. },{"./checkPropTypes":1,"./lib/ReactPropTypesSecret":5,"object-assign":6,"react-is":10}],4:[function(require,module,exports){
  694. /**
  695. * Copyright (c) 2013-present, Facebook, Inc.
  696. *
  697. * This source code is licensed under the MIT license found in the
  698. * LICENSE file in the root directory of this source tree.
  699. */
  700. if ("development" !== 'production') {
  701. var ReactIs = require('react-is');
  702. // By explicitly using `prop-types` you are opting into new development behavior.
  703. // http://fb.me/prop-types-in-prod
  704. var throwOnDirectAccess = true;
  705. module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);
  706. } else {
  707. // By explicitly using `prop-types` you are opting into new production behavior.
  708. // http://fb.me/prop-types-in-prod
  709. module.exports = require('./factoryWithThrowingShims')();
  710. }
  711. },{"./factoryWithThrowingShims":2,"./factoryWithTypeCheckers":3,"react-is":10}],5:[function(require,module,exports){
  712. /**
  713. * Copyright (c) 2013-present, Facebook, Inc.
  714. *
  715. * This source code is licensed under the MIT license found in the
  716. * LICENSE file in the root directory of this source tree.
  717. */
  718. 'use strict';
  719. var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
  720. module.exports = ReactPropTypesSecret;
  721. },{}],6:[function(require,module,exports){
  722. /*
  723. object-assign
  724. (c) Sindre Sorhus
  725. @license MIT
  726. */
  727. 'use strict';
  728. /* eslint-disable no-unused-vars */
  729. var getOwnPropertySymbols = Object.getOwnPropertySymbols;
  730. var hasOwnProperty = Object.prototype.hasOwnProperty;
  731. var propIsEnumerable = Object.prototype.propertyIsEnumerable;
  732. function toObject(val) {
  733. if (val === null || val === undefined) {
  734. throw new TypeError('Object.assign cannot be called with null or undefined');
  735. }
  736. return Object(val);
  737. }
  738. function shouldUseNative() {
  739. try {
  740. if (!Object.assign) {
  741. return false;
  742. }
  743. // Detect buggy property enumeration order in older V8 versions.
  744. // https://bugs.chromium.org/p/v8/issues/detail?id=4118
  745. var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
  746. test1[5] = 'de';
  747. if (Object.getOwnPropertyNames(test1)[0] === '5') {
  748. return false;
  749. }
  750. // https://bugs.chromium.org/p/v8/issues/detail?id=3056
  751. var test2 = {};
  752. for (var i = 0; i < 10; i++) {
  753. test2['_' + String.fromCharCode(i)] = i;
  754. }
  755. var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
  756. return test2[n];
  757. });
  758. if (order2.join('') !== '0123456789') {
  759. return false;
  760. }
  761. // https://bugs.chromium.org/p/v8/issues/detail?id=3056
  762. var test3 = {};
  763. 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
  764. test3[letter] = letter;
  765. });
  766. if (Object.keys(Object.assign({}, test3)).join('') !==
  767. 'abcdefghijklmnopqrst') {
  768. return false;
  769. }
  770. return true;
  771. } catch (err) {
  772. // We don't expect any of the above to throw, but better to be safe.
  773. return false;
  774. }
  775. }
  776. module.exports = shouldUseNative() ? Object.assign : function (target, source) {
  777. var from;
  778. var to = toObject(target);
  779. var symbols;
  780. for (var s = 1; s < arguments.length; s++) {
  781. from = Object(arguments[s]);
  782. for (var key in from) {
  783. if (hasOwnProperty.call(from, key)) {
  784. to[key] = from[key];
  785. }
  786. }
  787. if (getOwnPropertySymbols) {
  788. symbols = getOwnPropertySymbols(from);
  789. for (var i = 0; i < symbols.length; i++) {
  790. if (propIsEnumerable.call(from, symbols[i])) {
  791. to[symbols[i]] = from[symbols[i]];
  792. }
  793. }
  794. }
  795. }
  796. return to;
  797. };
  798. },{}],7:[function(require,module,exports){
  799. // shim for using process in browser
  800. var process = module.exports = {};
  801. // cached from whatever global is present so that test runners that stub it
  802. // don't break things. But we need to wrap it in a try catch in case it is
  803. // wrapped in strict mode code which doesn't define any globals. It's inside a
  804. // function because try/catches deoptimize in certain engines.
  805. var cachedSetTimeout;
  806. var cachedClearTimeout;
  807. function defaultSetTimout() {
  808. throw new Error('setTimeout has not been defined');
  809. }
  810. function defaultClearTimeout () {
  811. throw new Error('clearTimeout has not been defined');
  812. }
  813. (function () {
  814. try {
  815. if (typeof setTimeout === 'function') {
  816. cachedSetTimeout = setTimeout;
  817. } else {
  818. cachedSetTimeout = defaultSetTimout;
  819. }
  820. } catch (e) {
  821. cachedSetTimeout = defaultSetTimout;
  822. }
  823. try {
  824. if (typeof clearTimeout === 'function') {
  825. cachedClearTimeout = clearTimeout;
  826. } else {
  827. cachedClearTimeout = defaultClearTimeout;
  828. }
  829. } catch (e) {
  830. cachedClearTimeout = defaultClearTimeout;
  831. }
  832. } ())
  833. function runTimeout(fun) {
  834. if (cachedSetTimeout === setTimeout) {
  835. //normal enviroments in sane situations
  836. return setTimeout(fun, 0);
  837. }
  838. // if setTimeout wasn't available but was latter defined
  839. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  840. cachedSetTimeout = setTimeout;
  841. return setTimeout(fun, 0);
  842. }
  843. try {
  844. // when when somebody has screwed with setTimeout but no I.E. maddness
  845. return cachedSetTimeout(fun, 0);
  846. } catch(e){
  847. try {
  848. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  849. return cachedSetTimeout.call(null, fun, 0);
  850. } catch(e){
  851. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
  852. return cachedSetTimeout.call(this, fun, 0);
  853. }
  854. }
  855. }
  856. function runClearTimeout(marker) {
  857. if (cachedClearTimeout === clearTimeout) {
  858. //normal enviroments in sane situations
  859. return clearTimeout(marker);
  860. }
  861. // if clearTimeout wasn't available but was latter defined
  862. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  863. cachedClearTimeout = clearTimeout;
  864. return clearTimeout(marker);
  865. }
  866. try {
  867. // when when somebody has screwed with setTimeout but no I.E. maddness
  868. return cachedClearTimeout(marker);
  869. } catch (e){
  870. try {
  871. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  872. return cachedClearTimeout.call(null, marker);
  873. } catch (e){
  874. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
  875. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  876. return cachedClearTimeout.call(this, marker);
  877. }
  878. }
  879. }
  880. var queue = [];
  881. var draining = false;
  882. var currentQueue;
  883. var queueIndex = -1;
  884. function cleanUpNextTick() {
  885. if (!draining || !currentQueue) {
  886. return;
  887. }
  888. draining = false;
  889. if (currentQueue.length) {
  890. queue = currentQueue.concat(queue);
  891. } else {
  892. queueIndex = -1;
  893. }
  894. if (queue.length) {
  895. drainQueue();
  896. }
  897. }
  898. function drainQueue() {
  899. if (draining) {
  900. return;
  901. }
  902. var timeout = runTimeout(cleanUpNextTick);
  903. draining = true;
  904. var len = queue.length;
  905. while(len) {
  906. currentQueue = queue;
  907. queue = [];
  908. while (++queueIndex < len) {
  909. if (currentQueue) {
  910. currentQueue[queueIndex].run();
  911. }
  912. }
  913. queueIndex = -1;
  914. len = queue.length;
  915. }
  916. currentQueue = null;
  917. draining = false;
  918. runClearTimeout(timeout);
  919. }
  920. process.nextTick = function (fun) {
  921. var args = new Array(arguments.length - 1);
  922. if (arguments.length > 1) {
  923. for (var i = 1; i < arguments.length; i++) {
  924. args[i - 1] = arguments[i];
  925. }
  926. }
  927. queue.push(new Item(fun, args));
  928. if (queue.length === 1 && !draining) {
  929. runTimeout(drainQueue);
  930. }
  931. };
  932. // v8 likes predictible objects
  933. function Item(fun, array) {
  934. this.fun = fun;
  935. this.array = array;
  936. }
  937. Item.prototype.run = function () {
  938. this.fun.apply(null, this.array);
  939. };
  940. process.title = 'browser';
  941. process.browser = true;
  942. process.env = {};
  943. process.argv = [];
  944. process.version = ''; // empty string to avoid regexp issues
  945. process.versions = {};
  946. function noop() {}
  947. process.on = noop;
  948. process.addListener = noop;
  949. process.once = noop;
  950. process.off = noop;
  951. process.removeListener = noop;
  952. process.removeAllListeners = noop;
  953. process.emit = noop;
  954. process.prependListener = noop;
  955. process.prependOnceListener = noop;
  956. process.listeners = function (name) { return [] }
  957. process.binding = function (name) {
  958. throw new Error('process.binding is not supported');
  959. };
  960. process.cwd = function () { return '/' };
  961. process.chdir = function (dir) {
  962. throw new Error('process.chdir is not supported');
  963. };
  964. process.umask = function() { return 0; };
  965. },{}],8:[function(require,module,exports){
  966. (function (process){
  967. /** @license React v16.8.1
  968. * react-is.development.js
  969. *
  970. * Copyright (c) Facebook, Inc. and its affiliates.
  971. *
  972. * This source code is licensed under the MIT license found in the
  973. * LICENSE file in the root directory of this source tree.
  974. */
  975. 'use strict';
  976. if (process.env.NODE_ENV !== "production") {
  977. (function() {
  978. 'use strict';
  979. Object.defineProperty(exports, '__esModule', { value: true });
  980. // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
  981. // nor polyfill, then a plain number is used for performance.
  982. var hasSymbol = typeof Symbol === 'function' && Symbol.for;
  983. var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
  984. var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
  985. var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
  986. var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
  987. var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
  988. var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
  989. var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
  990. var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
  991. var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
  992. var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
  993. var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
  994. var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
  995. var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
  996. function isValidElementType(type) {
  997. return typeof type === 'string' || typeof type === 'function' ||
  998. // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
  999. type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
  1000. }
  1001. /**
  1002. * Forked from fbjs/warning:
  1003. * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
  1004. *
  1005. * Only change is we use console.warn instead of console.error,
  1006. * and do nothing when 'console' is not supported.
  1007. * This really simplifies the code.
  1008. * ---
  1009. * Similar to invariant but only logs a warning if the condition is not met.
  1010. * This can be used to log issues in development environments in critical
  1011. * paths. Removing the logging code for production environments will keep the
  1012. * same logic and follow the same code paths.
  1013. */
  1014. var lowPriorityWarning = function () {};
  1015. {
  1016. var printWarning = function (format) {
  1017. for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  1018. args[_key - 1] = arguments[_key];
  1019. }
  1020. var argIndex = 0;
  1021. var message = 'Warning: ' + format.replace(/%s/g, function () {
  1022. return args[argIndex++];
  1023. });
  1024. if (typeof console !== 'undefined') {
  1025. console.warn(message);
  1026. }
  1027. try {
  1028. // --- Welcome to debugging React ---
  1029. // This error was thrown as a convenience so that you can use this stack
  1030. // to find the callsite that caused this warning to fire.
  1031. throw new Error(message);
  1032. } catch (x) {}
  1033. };
  1034. lowPriorityWarning = function (condition, format) {
  1035. if (format === undefined) {
  1036. throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');
  1037. }
  1038. if (!condition) {
  1039. for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
  1040. args[_key2 - 2] = arguments[_key2];
  1041. }
  1042. printWarning.apply(undefined, [format].concat(args));
  1043. }
  1044. };
  1045. }
  1046. var lowPriorityWarning$1 = lowPriorityWarning;
  1047. function typeOf(object) {
  1048. if (typeof object === 'object' && object !== null) {
  1049. var $$typeof = object.$$typeof;
  1050. switch ($$typeof) {
  1051. case REACT_ELEMENT_TYPE:
  1052. var type = object.type;
  1053. switch (type) {
  1054. case REACT_ASYNC_MODE_TYPE:
  1055. case REACT_CONCURRENT_MODE_TYPE:
  1056. case REACT_FRAGMENT_TYPE:
  1057. case REACT_PROFILER_TYPE:
  1058. case REACT_STRICT_MODE_TYPE:
  1059. case REACT_SUSPENSE_TYPE:
  1060. return type;
  1061. default:
  1062. var $$typeofType = type && type.$$typeof;
  1063. switch ($$typeofType) {
  1064. case REACT_CONTEXT_TYPE:
  1065. case REACT_FORWARD_REF_TYPE:
  1066. case REACT_PROVIDER_TYPE:
  1067. return $$typeofType;
  1068. default:
  1069. return $$typeof;
  1070. }
  1071. }
  1072. case REACT_LAZY_TYPE:
  1073. case REACT_MEMO_TYPE:
  1074. case REACT_PORTAL_TYPE:
  1075. return $$typeof;
  1076. }
  1077. }
  1078. return undefined;
  1079. }
  1080. // AsyncMode is deprecated along with isAsyncMode
  1081. var AsyncMode = REACT_ASYNC_MODE_TYPE;
  1082. var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
  1083. var ContextConsumer = REACT_CONTEXT_TYPE;
  1084. var ContextProvider = REACT_PROVIDER_TYPE;
  1085. var Element = REACT_ELEMENT_TYPE;
  1086. var ForwardRef = REACT_FORWARD_REF_TYPE;
  1087. var Fragment = REACT_FRAGMENT_TYPE;
  1088. var Lazy = REACT_LAZY_TYPE;
  1089. var Memo = REACT_MEMO_TYPE;
  1090. var Portal = REACT_PORTAL_TYPE;
  1091. var Profiler = REACT_PROFILER_TYPE;
  1092. var StrictMode = REACT_STRICT_MODE_TYPE;
  1093. var Suspense = REACT_SUSPENSE_TYPE;
  1094. var hasWarnedAboutDeprecatedIsAsyncMode = false;
  1095. // AsyncMode should be deprecated
  1096. function isAsyncMode(object) {
  1097. {
  1098. if (!hasWarnedAboutDeprecatedIsAsyncMode) {
  1099. hasWarnedAboutDeprecatedIsAsyncMode = true;
  1100. lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
  1101. }
  1102. }
  1103. return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
  1104. }
  1105. function isConcurrentMode(object) {
  1106. return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
  1107. }
  1108. function isContextConsumer(object) {
  1109. return typeOf(object) === REACT_CONTEXT_TYPE;
  1110. }
  1111. function isContextProvider(object) {
  1112. return typeOf(object) === REACT_PROVIDER_TYPE;
  1113. }
  1114. function isElement(object) {
  1115. return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
  1116. }
  1117. function isForwardRef(object) {
  1118. return typeOf(object) === REACT_FORWARD_REF_TYPE;
  1119. }
  1120. function isFragment(object) {
  1121. return typeOf(object) === REACT_FRAGMENT_TYPE;
  1122. }
  1123. function isLazy(object) {
  1124. return typeOf(object) === REACT_LAZY_TYPE;
  1125. }
  1126. function isMemo(object) {
  1127. return typeOf(object) === REACT_MEMO_TYPE;
  1128. }
  1129. function isPortal(object) {
  1130. return typeOf(object) === REACT_PORTAL_TYPE;
  1131. }
  1132. function isProfiler(object) {
  1133. return typeOf(object) === REACT_PROFILER_TYPE;
  1134. }
  1135. function isStrictMode(object) {
  1136. return typeOf(object) === REACT_STRICT_MODE_TYPE;
  1137. }
  1138. function isSuspense(object) {
  1139. return typeOf(object) === REACT_SUSPENSE_TYPE;
  1140. }
  1141. exports.typeOf = typeOf;
  1142. exports.AsyncMode = AsyncMode;
  1143. exports.ConcurrentMode = ConcurrentMode;
  1144. exports.ContextConsumer = ContextConsumer;
  1145. exports.ContextProvider = ContextProvider;
  1146. exports.Element = Element;
  1147. exports.ForwardRef = ForwardRef;
  1148. exports.Fragment = Fragment;
  1149. exports.Lazy = Lazy;
  1150. exports.Memo = Memo;
  1151. exports.Portal = Portal;
  1152. exports.Profiler = Profiler;
  1153. exports.StrictMode = StrictMode;
  1154. exports.Suspense = Suspense;
  1155. exports.isValidElementType = isValidElementType;
  1156. exports.isAsyncMode = isAsyncMode;
  1157. exports.isConcurrentMode = isConcurrentMode;
  1158. exports.isContextConsumer = isContextConsumer;
  1159. exports.isContextProvider = isContextProvider;
  1160. exports.isElement = isElement;
  1161. exports.isForwardRef = isForwardRef;
  1162. exports.isFragment = isFragment;
  1163. exports.isLazy = isLazy;
  1164. exports.isMemo = isMemo;
  1165. exports.isPortal = isPortal;
  1166. exports.isProfiler = isProfiler;
  1167. exports.isStrictMode = isStrictMode;
  1168. exports.isSuspense = isSuspense;
  1169. })();
  1170. }
  1171. }).call(this,require('_process'))
  1172. },{"_process":7}],9:[function(require,module,exports){
  1173. /** @license React v16.8.1
  1174. * react-is.production.min.js
  1175. *
  1176. * Copyright (c) Facebook, Inc. and its affiliates.
  1177. *
  1178. * This source code is licensed under the MIT license found in the
  1179. * LICENSE file in the root directory of this source tree.
  1180. */
  1181. 'use strict';Object.defineProperty(exports,"__esModule",{value:!0});
  1182. var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.memo"):
  1183. 60115,r=b?Symbol.for("react.lazy"):60116;function t(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case h:return a;default:return u}}case r:case q:case d:return u}}}function v(a){return t(a)===m}exports.typeOf=t;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;
  1184. exports.Fragment=e;exports.Lazy=r;exports.Memo=q;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||"object"===typeof a&&null!==a&&(a.$$typeof===r||a.$$typeof===q||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n)};exports.isAsyncMode=function(a){return v(a)||t(a)===l};exports.isConcurrentMode=v;exports.isContextConsumer=function(a){return t(a)===k};
  1185. exports.isContextProvider=function(a){return t(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return t(a)===n};exports.isFragment=function(a){return t(a)===e};exports.isLazy=function(a){return t(a)===r};exports.isMemo=function(a){return t(a)===q};exports.isPortal=function(a){return t(a)===d};exports.isProfiler=function(a){return t(a)===g};exports.isStrictMode=function(a){return t(a)===f};
  1186. exports.isSuspense=function(a){return t(a)===p};
  1187. },{}],10:[function(require,module,exports){
  1188. (function (process){
  1189. 'use strict';
  1190. if (process.env.NODE_ENV === 'production') {
  1191. module.exports = require('./cjs/react-is.production.min.js');
  1192. } else {
  1193. module.exports = require('./cjs/react-is.development.js');
  1194. }
  1195. }).call(this,require('_process'))
  1196. },{"./cjs/react-is.development.js":8,"./cjs/react-is.production.min.js":9,"_process":7}]},{},[4])(4)
  1197. });