-
Notifications
You must be signed in to change notification settings - Fork 11
/
index.js.map
1 lines (1 loc) · 24.4 KB
/
index.js.map
1
{"version":3,"sources":["src/index.js"],"names":["REACT_ELEMENT_TYPE","Symbol","for","ReactElement","isValidElement","object","$$typeof","ReactPropTypeLocationNames","prop","context","childContext","emptyFunction","thatReturns","what","ITERATOR_SYMBOL","iterator","FAUX_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","iteratorFn","ANONYMOUS","ReactPropTypes","array","createPrimitiveTypeChecker","bool","func","number","string","symbol","any","createAnyTypeChecker","arrayOf","createArrayOfTypeChecker","element","createElementTypeChecker","instanceOf","createInstanceTypeChecker","node","createNodeChecker","objectOf","createObjectOfTypeChecker","oneOf","createEnumTypeChecker","oneOfType","createUnionTypeChecker","shape","createShapeTypeChecker","createChainableTypeChecker","validate","checkType","isRequired","props","propName","componentName","location","propFullName","locationName","Error","chainedCheckType","bind","expectedType","propValue","propType","getPropType","preciseType","getPreciseType","typeChecker","Array","isArray","i","length","error","expectedClass","expectedClassName","name","actualClassName","getClassName","expectedValues","valuesString","JSON","stringify","key","hasOwnProperty","arrayOfTypeCheckers","checker","isNode","shapeTypes","every","call","step","entries","next","done","value","entry","isSymbol","RegExp","Date","constructor"],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;;AAWA;;AAGA;AACA;;;;;;;;;;AACA,MAAIA,qBACD,OAAOC,MAAP,KAAkB,UAAlB,IAAgCA,OAAOC,GAAvC,IAA8CD,OAAOC,GAAP,CAAW,eAAX,CAA/C,IACA,MAFF;;AAIA,MAAIC,eAAe,EAAnB;;AAEA;;;;;AAKAA,eAAaC,cAAb,GAA8B,UAASC,MAAT,EAAiB;AAC7C,WACE,QAAOA,MAAP,yCAAOA,MAAP,OAAkB,QAAlB,IACAA,WAAW,IADX,IAEAA,OAAOC,QAAP,KAAoBN,kBAHtB;AAKD,GAND;;AAQA,MAAIO,6BAA6B;AAC/BC,UAAM,MADyB;AAE/BC,aAAS,SAFsB;AAG/BC,k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copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ReactPropTypes\n */\n\n'use strict';\n\n\n// The Symbol used to tag the ReactElement type. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar REACT_ELEMENT_TYPE =\n (typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) ||\n 0xeac7;\n\nvar ReactElement = {};\n\n/**\n * @param {?object} object\n * @return {boolean} True if `object` is a valid component.\n * @final\n */\nReactElement.isValidElement = function(object) {\n return (\n typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n};\n\nvar ReactPropTypeLocationNames = {\n prop: 'prop',\n context: 'context',\n childContext: 'child context',\n};\n\n\n\n\nvar emptyFunction = {\n thatReturns: function(what) {\n return function(){ return what; };\n }\n};\n\n\n\nvar ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\nfunction getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (\n (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) ||\n maybeIterable[FAUX_ITERATOR_SYMBOL]\n );\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n}\n\n\n\n/**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\nvar ANONYMOUS = '<<anonymous>>';\n\nvar ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n};\n\nfunction createChainableTypeChecker(validate) {\n function checkType(\n isRequired,\n props,\n propName,\n componentName,\n location,\n propFullName\n ) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n if (props[propName] == null) {\n var locationName = ReactPropTypeLocationNames[location];\n if (isRequired) {\n return new Error(\n `Required ${locationName} \\`${propFullName}\\` was not specified in ` +\n `\\`${componentName}\\`.`\n );\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n}\n\nfunction createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n var locationName = ReactPropTypeLocationNames[location];\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new Error(\n `Invalid ${locationName} \\`${propFullName}\\` of type ` +\n `\\`${preciseType}\\` supplied to \\`${componentName}\\`, expected ` +\n `\\`${expectedType}\\`.`\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunction.thatReturns(null));\n}\n\nfunction createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var locationName = ReactPropTypeLocationNames[location];\n var propType = getPropType(propValue);\n return new Error(\n `Invalid ${locationName} \\`${propFullName}\\` of type ` +\n `\\`${propType}\\` supplied to \\`${componentName}\\`, expected an array.`\n );\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(\n propValue,\n i,\n componentName,\n location,\n `${propFullName}[${i}]`\n );\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!ReactElement.isValidElement(props[propName])) {\n var locationName = ReactPropTypeLocationNames[location];\n return new Error(\n `Invalid ${locationName} \\`${propFullName}\\` supplied to ` +\n `\\`${componentName}\\`, expected a single ReactElement.`\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var locationName = ReactPropTypeLocationNames[location];\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new Error(\n `Invalid ${locationName} \\`${propFullName}\\` of type ` +\n `\\`${actualClassName}\\` supplied to \\`${componentName}\\`, expected ` +\n `instance of \\`${expectedClassName}\\`.`\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n return createChainableTypeChecker(function() {\n return new Error(\n `Invalid argument supplied to oneOf, expected an instance of array.`\n );\n });\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (propValue === expectedValues[i]) {\n return null;\n }\n }\n\n var locationName = ReactPropTypeLocationNames[location];\n var valuesString = JSON.stringify(expectedValues);\n return new Error(\n `Invalid ${locationName} \\`${propFullName}\\` of value \\`${propValue}\\` ` +\n `supplied to \\`${componentName}\\`, expected one of ${valuesString}.`\n );\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n var locationName = ReactPropTypeLocationNames[location];\n return new Error(\n `Invalid ${locationName} \\`${propFullName}\\` of type ` +\n `\\`${propType}\\` supplied to \\`${componentName}\\`, expected an object.`\n );\n }\n for (var key in propValue) {\n if (propValue.hasOwnProperty(key)) {\n var error = typeChecker(\n propValue,\n key,\n componentName,\n location,\n `${propFullName}.${key}`\n );\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n return createChainableTypeChecker(function() {\n return new Error(\n `Invalid argument supplied to oneOfType, expected an instance of array.`\n );\n });\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (\n checker(props, propName, componentName, location, propFullName) == null\n ) {\n return null;\n }\n }\n\n var locationName = ReactPropTypeLocationNames[location];\n return new Error(\n `Invalid ${locationName} \\`${propFullName}\\` supplied to ` +\n `\\`${componentName}\\`.`\n );\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n var locationName = ReactPropTypeLocationNames[location];\n return new Error(\n `Invalid ${locationName} \\`${propFullName}\\` supplied to ` +\n `\\`${componentName}\\`, expected a ReactNode.`\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n var locationName = ReactPropTypeLocationNames[location];\n return new Error(\n `Invalid ${locationName} \\`${propFullName}\\` of type \\`${propType}\\` ` +\n `supplied to \\`${componentName}\\`, expected \\`object\\`.`\n );\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(\n propValue,\n key,\n componentName,\n location,\n `${propFullName}.${key}`\n );\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || ReactElement.isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n}\n\nfunction isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n}\n\n// Equivalent of `typeof` but with special handling for array and regexp.\nfunction getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n}\n\n// This handles more types than `getPropType`. Only used for error messages.\n// See `createPrimitiveTypeChecker`.\nfunction getPreciseType(propValue) {\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n}\n\n// Returns class name of the object, if any.\nfunction getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n}\n\nexport default ReactPropTypes;\n"]}