diff --git a/CHANGELOG.md b/CHANGELOG.md index bb66b99ef..b0f045d48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ ## Change Log -### 3.2.10 (2017/03/28 20:39 +00:00) +### 3.3.0 (2017/04/14 03:32 +00:00) +- [#287](https://github.com/wwayne/react-tooltip/pull/287) Use prop-types package instead of React.PropTypes (@ssilve1989) + +### 3.2.10 (2017/03/28 20:41 +00:00) - [#278](https://github.com/wwayne/react-tooltip/pull/278) Make MutationObserver-based removal tracking (@huumanoid) - [#272](https://github.com/wwayne/react-tooltip/pull/272) Fix wrapper tag (@huumanoid) - [#259](https://github.com/wwayne/react-tooltip/pull/259) Track removal of DOM elements (@antoniogiordano) @@ -152,4 +155,4 @@ - [#15](https://github.com/wwayne/react-tooltip/pull/15) Adding support for server-side rendering (@bluejamesbond) - [#8](https://github.com/wwayne/react-tooltip/pull/8) Change curly brackets to quotes (single) (@af7) - [#6](https://github.com/wwayne/react-tooltip/pull/6) Fix bug with mouse hover triggerring on tooltip children (@tom-s) -- [#5](https://github.com/wwayne/react-tooltip/pull/5) fixed classnames require call (@mciparelli) +- [#5](https://github.com/wwayne/react-tooltip/pull/5) fixed classnames require call (@mciparelli) \ No newline at end of file diff --git a/package.json b/package.json index 87507aa70..4b7d931c0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-tooltip", - "version": "3.2.10", + "version": "3.3.0", "description": "react tooltip component", "main": "dist/index.js", "scripts": { diff --git a/standalone/react-tooltip.js b/standalone/react-tooltip.js index fbb676bb4..576075c14 100644 --- a/standalone/react-tooltip.js +++ b/standalone/react-tooltip.js @@ -1,4 +1,1005 @@ (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.ReactTooltip = 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 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + +},{}],2:[function(require,module,exports){ +"use strict"; + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + +function makeEmptyFunction(arg) { + return function () { + return arg; + }; +} + +/** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ +var emptyFunction = function emptyFunction() {}; + +emptyFunction.thatReturns = makeEmptyFunction; +emptyFunction.thatReturnsFalse = makeEmptyFunction(false); +emptyFunction.thatReturnsTrue = makeEmptyFunction(true); +emptyFunction.thatReturnsNull = makeEmptyFunction(null); +emptyFunction.thatReturnsThis = function () { + return this; +}; +emptyFunction.thatReturnsArgument = function (arg) { + return arg; +}; + +module.exports = emptyFunction; +},{}],3:[function(require,module,exports){ +(function (process){ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +'use strict'; + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var validateFormat = function validateFormat(format) {}; + +if (process.env.NODE_ENV !== 'production') { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + }; +} + +function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); + + if (!condition) { + var error; + if (format === undefined) { + error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error(format.replace(/%s/g, function () { + return args[argIndex++]; + })); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +} + +module.exports = invariant; +}).call(this,require('_process')) +},{"_process":1}],4:[function(require,module,exports){ +(function (process){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +'use strict'; + +var emptyFunction = require('./emptyFunction'); + +/** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + +var warning = emptyFunction; + +if (process.env.NODE_ENV !== 'production') { + (function () { + var printWarning = function printWarning(format) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = 'Warning: ' + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; + })(); +} + +module.exports = warning; +}).call(this,require('_process')) +},{"./emptyFunction":2,"_process":1}],5:[function(require,module,exports){ +(function (process){ +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +'use strict'; + +if (process.env.NODE_ENV !== 'production') { + var invariant = require('fbjs/lib/invariant'); + var warning = require('fbjs/lib/warning'); + var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret'); + var loggedTypeFailures = {}; +} + +/** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?Function} getStack Returns the component stack. + * @private + */ +function checkPropTypes(typeSpecs, values, location, componentName, getStack) { + if (process.env.NODE_ENV !== 'production') { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName); + error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); + } catch (ex) { + error = ex; + } + 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); + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var stack = getStack ? getStack() : ''; + + warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); + } + } + } + } +} + +module.exports = checkPropTypes; + +}).call(this,require('_process')) +},{"./lib/ReactPropTypesSecret":9,"_process":1,"fbjs/lib/invariant":3,"fbjs/lib/warning":4}],6:[function(require,module,exports){ +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +'use strict'; + +var emptyFunction = require('fbjs/lib/emptyFunction'); +var invariant = require('fbjs/lib/invariant'); + +module.exports = function() { + // Important! + // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. + function shim() { + invariant( + false, + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use PropTypes.checkPropTypes() to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + }; + shim.isRequired = shim; + function getShim() { + return shim; + }; + var ReactPropTypes = { + array: shim, + bool: shim, + func: shim, + number: shim, + object: shim, + string: shim, + symbol: shim, + + any: shim, + arrayOf: getShim, + element: shim, + instanceOf: getShim, + node: shim, + objectOf: getShim, + oneOf: getShim, + oneOfType: getShim, + shape: getShim + }; + + ReactPropTypes.checkPropTypes = emptyFunction; + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; +}; + +},{"fbjs/lib/emptyFunction":2,"fbjs/lib/invariant":3}],7:[function(require,module,exports){ +(function (process){ +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +'use strict'; + +var emptyFunction = require('fbjs/lib/emptyFunction'); +var invariant = require('fbjs/lib/invariant'); +var warning = require('fbjs/lib/warning'); + +var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret'); +var checkPropTypes = require('./checkPropTypes'); + +module.exports = function(isValidElement, throwOnDirectAccess) { + /* global Symbol */ + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + /** + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: + * + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, + * + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, + * + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal + */ + + var ANONYMOUS = '<>'; + + // Important! + // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. + var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + symbol: createPrimitiveTypeChecker('symbol'), + + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker + }; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + /*eslint-disable no-self-compare*/ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + /*eslint-enable no-self-compare*/ + + /** + * We use an Error-like object for backward compatibility as people may call + * PropTypes directly and inspect their output. However, we don't use real + * Errors anymore. We don't inspect their stack anyway, and creating them + * is prohibitively expensive if they are created too often, such as what + * happens in oneOfType() for any type before the one that matched. + */ + function PropTypeError(message) { + this.message = message; + this.stack = ''; + } + // Make `instanceof Error` still work for returned errors. + PropTypeError.prototype = Error.prototype; + + function createChainableTypeChecker(validate) { + if (process.env.NODE_ENV !== 'production') { + var manualPropTypeCallCache = {}; + var manualPropTypeWarningCount = 0; + } + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { + componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; + + if (secret !== ReactPropTypesSecret) { + if (throwOnDirectAccess) { + // New behavior only for users of `prop-types` package + invariant( + false, + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use `PropTypes.checkPropTypes()` to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') { + // Old behavior for people using React.PropTypes + var cacheKey = componentName + ':' + propName; + if ( + !manualPropTypeCallCache[cacheKey] && + // Avoid spamming the console because they are often not actionable except for lib authors + manualPropTypeWarningCount < 3 + ) { + warning( + false, + 'You are manually calling a React.PropTypes validation ' + + 'function for the `%s` prop on `%s`. This is deprecated ' + + 'and will throw in the standalone `prop-types` package. ' + + 'You may be seeing this warning due to a third-party PropTypes ' + + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', + propFullName, + componentName + ); + manualPropTypeCallCache[cacheKey] = true; + manualPropTypeWarningCount++; + } + } + } + if (props[propName] == null) { + if (isRequired) { + if (props[propName] === null) { + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); + } + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); + } + return null; + } else { + return validate(props, propName, componentName, location, propFullName); + } + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; + } + + function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location, propFullName, secret) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); + + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunction.thatReturnsNull); + } + + function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); + } + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); + if (error instanceof Error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!isValidElement(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location, propFullName) { + if (!(props[propName] instanceof expectedClass)) { + var expectedClassName = expectedClass.name || ANONYMOUS; + var actualClassName = getClassName(props[propName]); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createEnumTypeChecker(expectedValues) { + if (!Array.isArray(expectedValues)) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0; + return emptyFunction.thatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (is(propValue, expectedValues[i])) { + return null; + } + } + + var valuesString = JSON.stringify(expectedValues); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); + } + return createChainableTypeChecker(validate); + } + + function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); + } + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); + } + for (var key in propValue) { + if (propValue.hasOwnProperty(key)) { + var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createUnionTypeChecker(arrayOfTypeCheckers) { + if (!Array.isArray(arrayOfTypeCheckers)) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; + return emptyFunction.thatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { + return null; + } + } + + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); + } + return createChainableTypeChecker(validate); + } + + function createNodeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!isNode(props[propName])) { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; + } + var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + if (error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function isNode(propValue) { + switch (typeof propValue) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || isValidElement(propValue)) { + return true; + } + + var iteratorFn = getIteratorFn(propValue); + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } + } + } else { + return false; + } + + return true; + default: + return false; + } + } + + function isSymbol(propType, propValue) { + // Native Symbol. + if (propType === 'symbol') { + return true; + } + + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' + if (propValue['@@toStringTag'] === 'Symbol') { + return true; + } + + // Fallback for non-spec compliant Symbols which are polyfilled. + if (typeof Symbol === 'function' && propValue instanceof Symbol) { + return true; + } + + return false; + } + + // Equivalent of `typeof` but with special handling for array and regexp. + function getPropType(propValue) { + var propType = typeof propValue; + if (Array.isArray(propValue)) { + return 'array'; + } + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + if (isSymbol(propType, propValue)) { + return 'symbol'; + } + return propType; + } + + // This handles more types than `getPropType`. Only used for error messages. + // See `createPrimitiveTypeChecker`. + function getPreciseType(propValue) { + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } + } + return propType; + } + + // Returns class name of the object, if any. + function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return ANONYMOUS; + } + return propValue.constructor.name; + } + + ReactPropTypes.checkPropTypes = checkPropTypes; + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; +}; + +}).call(this,require('_process')) +},{"./checkPropTypes":5,"./lib/ReactPropTypesSecret":9,"_process":1,"fbjs/lib/emptyFunction":2,"fbjs/lib/invariant":3,"fbjs/lib/warning":4}],8:[function(require,module,exports){ +(function (process){ +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +if (process.env.NODE_ENV !== 'production') { + var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && + Symbol.for && + Symbol.for('react.element')) || + 0xeac7; + + var isValidElement = function(object) { + return typeof object === 'object' && + object !== null && + object.$$typeof === REACT_ELEMENT_TYPE; + }; + + // By explicitly using `prop-types` you are opting into new development behavior. + // http://fb.me/prop-types-in-prod + var throwOnDirectAccess = true; + module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess); +} else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = require('./factoryWithThrowingShims')(); +} + +}).call(this,require('_process')) +},{"./factoryWithThrowingShims":6,"./factoryWithTypeCheckers":7,"_process":1}],9:[function(require,module,exports){ +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +'use strict'; + +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + +module.exports = ReactPropTypesSecret; + +},{}],10:[function(require,module,exports){ /*! Copyright (c) 2016 Jed Watson. Licensed under the MIT License (MIT), see @@ -48,7 +1049,7 @@ } }()); -},{}],2:[function(require,module,exports){ +},{}],11:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -63,7 +1064,7 @@ exports.default = { } }; -},{}],3:[function(require,module,exports){ +},{}],12:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -153,7 +1154,7 @@ var setUntargetItems = function setUntargetItems(currentTarget, targetArray) { var customListener = void 0; -},{}],4:[function(require,module,exports){ +},{}],13:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -167,7 +1168,7 @@ exports.default = function (target) { }; }; -},{}],5:[function(require,module,exports){ +},{}],14:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -181,7 +1182,7 @@ exports.default = function (target) { }; }; -},{}],6:[function(require,module,exports){ +},{}],15:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -261,7 +1262,7 @@ var dispatchGlobalEvent = function dispatchGlobalEvent(eventName, opts) { * Static methods for react-tooltip */ -},{"../constant":2}],7:[function(require,module,exports){ +},{"../constant":11}],16:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -354,7 +1355,7 @@ var getMutationObserverClass = function getMutationObserverClass() { return window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; }; -},{}],8:[function(require,module,exports){ +},{}],17:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -404,7 +1405,7 @@ var _constant2 = _interopRequireDefault(_constant); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -},{"../constant":2}],9:[function(require,module,exports){ +},{"../constant":11}],18:[function(require,module,exports){ (function (global){ 'use strict'; @@ -427,6 +1428,10 @@ var _react = (typeof window !== "undefined" ? window['React'] : typeof global != var _react2 = _interopRequireDefault(_react); +var _propTypes = require('prop-types'); + +var _propTypes2 = _interopRequireDefault(_propTypes); + var _reactDom = (typeof window !== "undefined" ? window['ReactDOM'] : typeof global !== "undefined" ? global['ReactDOM'] : null); var _reactDom2 = _interopRequireDefault(_reactDom); @@ -788,15 +1793,17 @@ var ReactTooltip = (0, _staticMethods2.default)(_class = (0, _windowListener2.de if (isEmptyTip || disable) return; // if the tooltip is empty, disable the tooltip var updateState = function updateState() { if (Array.isArray(placeholder) && placeholder.length > 0 || placeholder) { - var isInvisible = !_this6.state.show; - _this6.setState({ - currentEvent: e, - currentTarget: eventTarget, - show: true - }, function () { - _this6.updatePosition(); - if (isInvisible && afterShow) afterShow(); - }); + (function () { + var isInvisible = !_this6.state.show; + _this6.setState({ + currentEvent: e, + currentTarget: eventTarget, + show: true + }, function () { + _this6.updatePosition(); + if (isInvisible && afterShow) afterShow(); + }); + })(); } }; @@ -960,32 +1967,32 @@ var ReactTooltip = (0, _staticMethods2.default)(_class = (0, _windowListener2.de return ReactTooltip; }(_react.Component), _class2.propTypes = { - children: _react.PropTypes.any, - place: _react.PropTypes.string, - type: _react.PropTypes.string, - effect: _react.PropTypes.string, - offset: _react.PropTypes.object, - multiline: _react.PropTypes.bool, - border: _react.PropTypes.bool, - insecure: _react.PropTypes.bool, - class: _react.PropTypes.string, - className: _react.PropTypes.string, - id: _react.PropTypes.string, - html: _react.PropTypes.bool, - delayHide: _react.PropTypes.number, - delayShow: _react.PropTypes.number, - event: _react.PropTypes.string, - eventOff: _react.PropTypes.string, - watchWindow: _react.PropTypes.bool, - isCapture: _react.PropTypes.bool, - globalEventOff: _react.PropTypes.string, - getContent: _react.PropTypes.any, - afterShow: _react.PropTypes.func, - afterHide: _react.PropTypes.func, - disable: _react.PropTypes.bool, - scrollHide: _react.PropTypes.bool, - resizeHide: _react.PropTypes.bool, - wrapper: _react.PropTypes.string + children: _propTypes2.default.any, + place: _propTypes2.default.string, + type: _propTypes2.default.string, + effect: _propTypes2.default.string, + offset: _propTypes2.default.object, + multiline: _propTypes2.default.bool, + border: _propTypes2.default.bool, + insecure: _propTypes2.default.bool, + class: _propTypes2.default.string, + className: _propTypes2.default.string, + id: _propTypes2.default.string, + html: _propTypes2.default.bool, + delayHide: _propTypes2.default.number, + delayShow: _propTypes2.default.number, + event: _propTypes2.default.string, + eventOff: _propTypes2.default.string, + watchWindow: _propTypes2.default.bool, + isCapture: _propTypes2.default.bool, + globalEventOff: _propTypes2.default.string, + getContent: _propTypes2.default.any, + afterShow: _propTypes2.default.func, + afterHide: _propTypes2.default.func, + disable: _propTypes2.default.bool, + scrollHide: _propTypes2.default.bool, + resizeHide: _propTypes2.default.bool, + wrapper: _propTypes2.default.string }, _class2.defaultProps = { insecure: true, resizeHide: true, @@ -998,7 +2005,7 @@ var ReactTooltip = (0, _staticMethods2.default)(_class = (0, _windowListener2.de module.exports = ReactTooltip; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./decorators/customEvent":3,"./decorators/getEffect":4,"./decorators/isCapture":5,"./decorators/staticMethods":6,"./decorators/trackRemoval":7,"./decorators/windowListener":8,"./style":10,"./utils/aria":11,"./utils/getPosition":12,"./utils/getTipContent":13,"./utils/nodeListToArray":14,"classnames":1}],10:[function(require,module,exports){ +},{"./decorators/customEvent":12,"./decorators/getEffect":13,"./decorators/isCapture":14,"./decorators/staticMethods":15,"./decorators/trackRemoval":16,"./decorators/windowListener":17,"./style":19,"./utils/aria":20,"./utils/getPosition":21,"./utils/getTipContent":22,"./utils/nodeListToArray":23,"classnames":10,"prop-types":8}],19:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -1006,7 +2013,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = '.__react_component_tooltip{border-radius:3px;display:inline-block;font-size:13px;left:-999em;opacity:0;padding:8px 21px;position:fixed;pointer-events:none;transition:opacity 0.3s ease-out;top:-999em;visibility:hidden;z-index:999}.__react_component_tooltip:before,.__react_component_tooltip:after{content:"";width:0;height:0;position:absolute}.__react_component_tooltip.show{opacity:0.9;margin-top:0px;margin-left:0px;visibility:visible}.__react_component_tooltip.type-dark{color:#fff;background-color:#222}.__react_component_tooltip.type-dark.place-top:after{border-top-color:#222;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-dark.place-bottom:after{border-bottom-color:#222;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-dark.place-left:after{border-left-color:#222;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-dark.place-right:after{border-right-color:#222;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-dark.border{border:1px solid #fff}.__react_component_tooltip.type-dark.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-dark.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-dark.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-dark.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-success{color:#fff;background-color:#8DC572}.__react_component_tooltip.type-success.place-top:after{border-top-color:#8DC572;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-success.place-bottom:after{border-bottom-color:#8DC572;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-success.place-left:after{border-left-color:#8DC572;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-success.place-right:after{border-right-color:#8DC572;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-success.border{border:1px solid #fff}.__react_component_tooltip.type-success.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-success.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-success.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-success.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-warning{color:#fff;background-color:#F0AD4E}.__react_component_tooltip.type-warning.place-top:after{border-top-color:#F0AD4E;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-warning.place-bottom:after{border-bottom-color:#F0AD4E;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-warning.place-left:after{border-left-color:#F0AD4E;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-warning.place-right:after{border-right-color:#F0AD4E;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-warning.border{border:1px solid #fff}.__react_component_tooltip.type-warning.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-warning.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-warning.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-warning.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-error{color:#fff;background-color:#BE6464}.__react_component_tooltip.type-error.place-top:after{border-top-color:#BE6464;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-error.place-bottom:after{border-bottom-color:#BE6464;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-error.place-left:after{border-left-color:#BE6464;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-error.place-right:after{border-right-color:#BE6464;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-error.border{border:1px solid #fff}.__react_component_tooltip.type-error.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-error.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-error.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-error.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-info{color:#fff;background-color:#337AB7}.__react_component_tooltip.type-info.place-top:after{border-top-color:#337AB7;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-info.place-bottom:after{border-bottom-color:#337AB7;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-info.place-left:after{border-left-color:#337AB7;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-info.place-right:after{border-right-color:#337AB7;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-info.border{border:1px solid #fff}.__react_component_tooltip.type-info.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-info.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-info.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-info.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-light{color:#222;background-color:#fff}.__react_component_tooltip.type-light.place-top:after{border-top-color:#fff;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-light.place-bottom:after{border-bottom-color:#fff;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-light.place-left:after{border-left-color:#fff;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-light.place-right:after{border-right-color:#fff;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-light.border{border:1px solid #222}.__react_component_tooltip.type-light.border.place-top:before{border-top:8px solid #222}.__react_component_tooltip.type-light.border.place-bottom:before{border-bottom:8px solid #222}.__react_component_tooltip.type-light.border.place-left:before{border-left:8px solid #222}.__react_component_tooltip.type-light.border.place-right:before{border-right:8px solid #222}.__react_component_tooltip.place-top{margin-top:-10px}.__react_component_tooltip.place-top:before{border-left:10px solid transparent;border-right:10px solid transparent;bottom:-8px;left:50%;margin-left:-10px}.__react_component_tooltip.place-top:after{border-left:8px solid transparent;border-right:8px solid transparent;bottom:-6px;left:50%;margin-left:-8px}.__react_component_tooltip.place-bottom{margin-top:10px}.__react_component_tooltip.place-bottom:before{border-left:10px solid transparent;border-right:10px solid transparent;top:-8px;left:50%;margin-left:-10px}.__react_component_tooltip.place-bottom:after{border-left:8px solid transparent;border-right:8px solid transparent;top:-6px;left:50%;margin-left:-8px}.__react_component_tooltip.place-left{margin-left:-10px}.__react_component_tooltip.place-left:before{border-top:6px solid transparent;border-bottom:6px solid transparent;right:-8px;top:50%;margin-top:-5px}.__react_component_tooltip.place-left:after{border-top:5px solid transparent;border-bottom:5px solid transparent;right:-6px;top:50%;margin-top:-4px}.__react_component_tooltip.place-right{margin-left:10px}.__react_component_tooltip.place-right:before{border-top:6px solid transparent;border-bottom:6px solid transparent;left:-8px;top:50%;margin-top:-5px}.__react_component_tooltip.place-right:after{border-top:5px solid transparent;border-bottom:5px solid transparent;left:-6px;top:50%;margin-top:-4px}.__react_component_tooltip .multi-line{display:block;padding:2px 0px;text-align:center}'; -},{}],11:[function(require,module,exports){ +},{}],20:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -1032,7 +2039,7 @@ function parseAria(props) { return ariaObj; } -},{}],12:[function(require,module,exports){ +},{}],21:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -1341,7 +2348,7 @@ var getParent = function getParent(currentTarget) { return { parentTop: parentTop, parentLeft: parentLeft }; }; -},{}],13:[function(require,module,exports){ +},{}],22:[function(require,module,exports){ (function (global){ 'use strict'; @@ -1377,7 +2384,7 @@ var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],14:[function(require,module,exports){ +},{}],23:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -1394,5 +2401,5 @@ exports.default = function (nodeList) { }); }; -},{}]},{},[9])(9) +},{}]},{},[18])(18) }); \ No newline at end of file diff --git a/standalone/react-tooltip.min.js b/standalone/react-tooltip.min.js index 724f0e4c8..eff564a75 100644 --- a/standalone/react-tooltip.min.js +++ b/standalone/react-tooltip.min.js @@ -1,3 +1,2 @@ -(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.ReactTooltip=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;o0||placeholder){var isInvisible=!_this6.state.show;_this6.setState({currentEvent:e,currentTarget:eventTarget,show:true},function(){_this6.updatePosition();if(isInvisible&&afterShow)afterShow()})}};clearTimeout(this.delayShowLoop);if(delayShow){this.delayShowLoop=setTimeout(updateState,delayTime)}else{updateState()}}},{key:"hideTooltip",value:function hideTooltip(e,hasTarget){var _this7=this;var _state2=this.state,delayHide=_state2.delayHide,isEmptyTip=_state2.isEmptyTip,disable=_state2.disable;var afterHide=this.props.afterHide;if(!this.mount)return;if(isEmptyTip||disable)return;if(hasTarget){var targetArray=this.getTargetArray(this.props.id);var isMyElement=targetArray.some(function(ele){return ele===e.currentTarget});if(!isMyElement||!this.state.show)return}var resetState=function resetState(){var isVisible=_this7.state.show;_this7.setState({show:false},function(){_this7.removeScrollListener();if(isVisible&&afterHide)afterHide()})};this.clearTimer();if(delayHide){this.delayHideLoop=setTimeout(resetState,parseInt(delayHide,10))}else{resetState()}}},{key:"addScrollListener",value:function addScrollListener(e){var isCaptureMode=this.isCapture(e.currentTarget);window.addEventListener("scroll",this.hideTooltip,isCaptureMode)}},{key:"removeScrollListener",value:function removeScrollListener(){window.removeEventListener("scroll",this.hideTooltip)}},{key:"updatePosition",value:function updatePosition(){var _this8=this;var _state3=this.state,currentEvent=_state3.currentEvent,currentTarget=_state3.currentTarget,place=_state3.place,effect=_state3.effect,offset=_state3.offset;var node=_reactDom2.default.findDOMNode(this);var result=(0,_getPosition2.default)(currentEvent,currentTarget,node,place,effect,offset);if(result.isNewState){return this.setState(result.newState,function(){_this8.updatePosition()})}node.style.left=result.position.left+"px";node.style.top=result.position.top+"px"}},{key:"setStyleHeader",value:function setStyleHeader(){if(!document.getElementsByTagName("head")[0].querySelector('style[id="react-tooltip"]')){var tag=document.createElement("style");tag.id="react-tooltip";tag.innerHTML=_style2.default;document.getElementsByTagName("head")[0].appendChild(tag)}}},{key:"clearTimer",value:function clearTimer(){clearTimeout(this.delayShowLoop);clearTimeout(this.delayHideLoop);clearInterval(this.intervalUpdateContent)}},{key:"render",value:function render(){var _state4=this.state,placeholder=_state4.placeholder,extraClass=_state4.extraClass,html=_state4.html,ariaProps=_state4.ariaProps,disable=_state4.disable,isEmptyTip=_state4.isEmptyTip;var tooltipClass=(0,_classnames2.default)("__react_component_tooltip",{show:this.state.show&&!disable&&!isEmptyTip},{border:this.state.border},{"place-top":this.state.place==="top"},{"place-bottom":this.state.place==="bottom"},{"place-left":this.state.place==="left"},{"place-right":this.state.place==="right"},{"type-dark":this.state.type==="dark"},{"type-success":this.state.type==="success"},{"type-warning":this.state.type==="warning"},{"type-error":this.state.type==="error"},{"type-info":this.state.type==="info"},{"type-light":this.state.type==="light"});var Wrapper=this.props.wrapper;if(ReactTooltip.supportedWrappers.indexOf(Wrapper)<0){Wrapper=ReactTooltip.defaultProps.wrapper}if(html){return _react2.default.createElement(Wrapper,_extends({className:tooltipClass+" "+extraClass},ariaProps,{"data-id":"tooltip",dangerouslySetInnerHTML:{__html:placeholder}}))}else{return _react2.default.createElement(Wrapper,_extends({className:tooltipClass+" "+extraClass},ariaProps,{"data-id":"tooltip"}),placeholder)}}}]);return ReactTooltip}(_react.Component),_class2.propTypes={children:_react.PropTypes.any,place:_react.PropTypes.string,type:_react.PropTypes.string,effect:_react.PropTypes.string,offset:_react.PropTypes.object,multiline:_react.PropTypes.bool,border:_react.PropTypes.bool,insecure:_react.PropTypes.bool,"class":_react.PropTypes.string,className:_react.PropTypes.string,id:_react.PropTypes.string,html:_react.PropTypes.bool,delayHide:_react.PropTypes.number,delayShow:_react.PropTypes.number,event:_react.PropTypes.string,eventOff:_react.PropTypes.string,watchWindow:_react.PropTypes.bool,isCapture:_react.PropTypes.bool,globalEventOff:_react.PropTypes.string,getContent:_react.PropTypes.any,afterShow:_react.PropTypes.func,afterHide:_react.PropTypes.func,disable:_react.PropTypes.bool,scrollHide:_react.PropTypes.bool,resizeHide:_react.PropTypes.bool,wrapper:_react.PropTypes.string},_class2.defaultProps={insecure:true,resizeHide:true,wrapper:"div"},_class2.supportedWrappers=["div","span"],_temp))||_class)||_class)||_class)||_class)||_class)||_class;module.exports=ReactTooltip}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./decorators/customEvent":3,"./decorators/getEffect":4,"./decorators/isCapture":5,"./decorators/staticMethods":6,"./decorators/trackRemoval":7,"./decorators/windowListener":8,"./style":10,"./utils/aria":11,"./utils/getPosition":12,"./utils/getTipContent":13,"./utils/nodeListToArray":14,classnames:1}],10:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default='.__react_component_tooltip{border-radius:3px;display:inline-block;font-size:13px;left:-999em;opacity:0;padding:8px 21px;position:fixed;pointer-events:none;transition:opacity 0.3s ease-out;top:-999em;visibility:hidden;z-index:999}.__react_component_tooltip:before,.__react_component_tooltip:after{content:"";width:0;height:0;position:absolute}.__react_component_tooltip.show{opacity:0.9;margin-top:0px;margin-left:0px;visibility:visible}.__react_component_tooltip.type-dark{color:#fff;background-color:#222}.__react_component_tooltip.type-dark.place-top:after{border-top-color:#222;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-dark.place-bottom:after{border-bottom-color:#222;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-dark.place-left:after{border-left-color:#222;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-dark.place-right:after{border-right-color:#222;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-dark.border{border:1px solid #fff}.__react_component_tooltip.type-dark.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-dark.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-dark.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-dark.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-success{color:#fff;background-color:#8DC572}.__react_component_tooltip.type-success.place-top:after{border-top-color:#8DC572;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-success.place-bottom:after{border-bottom-color:#8DC572;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-success.place-left:after{border-left-color:#8DC572;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-success.place-right:after{border-right-color:#8DC572;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-success.border{border:1px solid #fff}.__react_component_tooltip.type-success.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-success.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-success.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-success.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-warning{color:#fff;background-color:#F0AD4E}.__react_component_tooltip.type-warning.place-top:after{border-top-color:#F0AD4E;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-warning.place-bottom:after{border-bottom-color:#F0AD4E;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-warning.place-left:after{border-left-color:#F0AD4E;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-warning.place-right:after{border-right-color:#F0AD4E;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-warning.border{border:1px solid #fff}.__react_component_tooltip.type-warning.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-warning.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-warning.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-warning.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-error{color:#fff;background-color:#BE6464}.__react_component_tooltip.type-error.place-top:after{border-top-color:#BE6464;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-error.place-bottom:after{border-bottom-color:#BE6464;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-error.place-left:after{border-left-color:#BE6464;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-error.place-right:after{border-right-color:#BE6464;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-error.border{border:1px solid #fff}.__react_component_tooltip.type-error.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-error.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-error.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-error.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-info{color:#fff;background-color:#337AB7}.__react_component_tooltip.type-info.place-top:after{border-top-color:#337AB7;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-info.place-bottom:after{border-bottom-color:#337AB7;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-info.place-left:after{border-left-color:#337AB7;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-info.place-right:after{border-right-color:#337AB7;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-info.border{border:1px solid #fff}.__react_component_tooltip.type-info.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-info.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-info.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-info.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-light{color:#222;background-color:#fff}.__react_component_tooltip.type-light.place-top:after{border-top-color:#fff;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-light.place-bottom:after{border-bottom-color:#fff;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-light.place-left:after{border-left-color:#fff;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-light.place-right:after{border-right-color:#fff;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-light.border{border:1px solid #222}.__react_component_tooltip.type-light.border.place-top:before{border-top:8px solid #222}.__react_component_tooltip.type-light.border.place-bottom:before{border-bottom:8px solid #222}.__react_component_tooltip.type-light.border.place-left:before{border-left:8px solid #222}.__react_component_tooltip.type-light.border.place-right:before{border-right:8px solid #222}.__react_component_tooltip.place-top{margin-top:-10px}.__react_component_tooltip.place-top:before{border-left:10px solid transparent;border-right:10px solid transparent;bottom:-8px;left:50%;margin-left:-10px}.__react_component_tooltip.place-top:after{border-left:8px solid transparent;border-right:8px solid transparent;bottom:-6px;left:50%;margin-left:-8px}.__react_component_tooltip.place-bottom{margin-top:10px}.__react_component_tooltip.place-bottom:before{border-left:10px solid transparent;border-right:10px solid transparent;top:-8px;left:50%;margin-left:-10px}.__react_component_tooltip.place-bottom:after{border-left:8px solid transparent;border-right:8px solid transparent;top:-6px;left:50%;margin-left:-8px}.__react_component_tooltip.place-left{margin-left:-10px}.__react_component_tooltip.place-left:before{border-top:6px solid transparent;border-bottom:6px solid transparent;right:-8px;top:50%;margin-top:-5px}.__react_component_tooltip.place-left:after{border-top:5px solid transparent;border-bottom:5px solid transparent;right:-6px;top:50%;margin-top:-4px}.__react_component_tooltip.place-right{margin-left:10px}.__react_component_tooltip.place-right:before{border-top:6px solid transparent;border-bottom:6px solid transparent;left:-8px;top:50%;margin-top:-5px}.__react_component_tooltip.place-right:after{border-top:5px solid transparent;border-bottom:5px solid transparent;left:-6px;top:50%;margin-top:-4px}.__react_component_tooltip .multi-line{display:block;padding:2px 0px;text-align:center}'; - -},{}],11:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.parseAria=parseAria;function parseAria(props){var ariaObj={};Object.keys(props).filter(function(prop){return/(^aria-\w+$|^role$)/.test(prop)}).forEach(function(prop){ariaObj[prop]=props[prop]});return ariaObj}},{}],12:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=function(e,target,node,place,effect,offset){var tipWidth=node.clientWidth;var tipHeight=node.clientHeight;var _getCurrentOffset=getCurrentOffset(e,target,effect),mouseX=_getCurrentOffset.mouseX,mouseY=_getCurrentOffset.mouseY;var defaultOffset=getDefaultPosition(effect,target.clientWidth,target.clientHeight,tipWidth,tipHeight);var _calculateOffset=calculateOffset(offset),extraOffset_X=_calculateOffset.extraOffset_X,extraOffset_Y=_calculateOffset.extraOffset_Y;var windowWidth=window.innerWidth;var windowHeight=window.innerHeight;var _getParent=getParent(node),parentTop=_getParent.parentTop,parentLeft=_getParent.parentLeft;var getTipOffsetLeft=function getTipOffsetLeft(place){var offset_X=defaultOffset[place].l;return mouseX+offset_X+extraOffset_X};var getTipOffsetRight=function getTipOffsetRight(place){var offset_X=defaultOffset[place].r;return mouseX+offset_X+extraOffset_X};var getTipOffsetTop=function getTipOffsetTop(place){var offset_Y=defaultOffset[place].t;return mouseY+offset_Y+extraOffset_Y};var getTipOffsetBottom=function getTipOffsetBottom(place){var offset_Y=defaultOffset[place].b;return mouseY+offset_Y+extraOffset_Y};var outsideVertical=function outsideVertical(){var result=false;var newPlace=void 0;if(getTipOffsetTop("left")<0&&getTipOffsetBottom("left")<=windowHeight&&getTipOffsetBottom("bottom")<=windowHeight){result=true;newPlace="bottom"}else if(getTipOffsetBottom("left")>windowHeight&&getTipOffsetTop("left")>=0&&getTipOffsetTop("top")>=0){result=true;newPlace="top"}return{result:result,newPlace:newPlace}};var outsideLeft=function outsideLeft(){var _outsideVertical=outsideVertical(),result=_outsideVertical.result,newPlace=_outsideVertical.newPlace;if(result&&outsideHorizontal().result){return{result:false}}if(!result&&getTipOffsetLeft("left")<0&&getTipOffsetRight("right")<=windowWidth){result=true;newPlace="right"}return{result:result,newPlace:newPlace}};var outsideRight=function outsideRight(){var _outsideVertical2=outsideVertical(),result=_outsideVertical2.result,newPlace=_outsideVertical2.newPlace;if(result&&outsideHorizontal().result){return{result:false}}if(!result&&getTipOffsetRight("right")>windowWidth&&getTipOffsetLeft("left")>=0){result=true;newPlace="left"}return{result:result,newPlace:newPlace}};var outsideHorizontal=function outsideHorizontal(){var result=false;var newPlace=void 0;if(getTipOffsetLeft("top")<0&&getTipOffsetRight("top")<=windowWidth&&getTipOffsetRight("right")<=windowWidth){result=true;newPlace="right"}else if(getTipOffsetRight("top")>windowWidth&&getTipOffsetLeft("top")>=0&&getTipOffsetLeft("left")>=0){result=true;newPlace="left"}return{result:result,newPlace:newPlace}};var outsideTop=function outsideTop(){var _outsideHorizontal=outsideHorizontal(),result=_outsideHorizontal.result,newPlace=_outsideHorizontal.newPlace;if(result&&outsideVertical().result){return{result:false}}if(!result&&getTipOffsetTop("top")<0&&getTipOffsetBottom("bottom")<=windowHeight){result=true;newPlace="bottom"}return{result:result,newPlace:newPlace}};var outsideBottom=function outsideBottom(){var _outsideHorizontal2=outsideHorizontal(),result=_outsideHorizontal2.result,newPlace=_outsideHorizontal2.newPlace;if(result&&outsideVertical().result){return{result:false}}if(!result&&getTipOffsetBottom("bottom")>windowHeight&&getTipOffsetTop("top")>=0){result=true;newPlace="top"}return{result:result,newPlace:newPlace}};var outsideLeftResult=outsideLeft();var outsideRightResult=outsideRight();var outsideTopResult=outsideTop();var outsideBottomResult=outsideBottom();if(place==="left"&&outsideLeftResult.result){return{isNewState:true,newState:{place:outsideLeftResult.newPlace}}}else if(place==="right"&&outsideRightResult.result){return{isNewState:true,newState:{place:outsideRightResult.newPlace}}}else if(place==="top"&&outsideTopResult.result){return{isNewState:true,newState:{place:outsideTopResult.newPlace}}}else if(place==="bottom"&&outsideBottomResult.result){return{isNewState:true,newState:{place:outsideBottomResult.newPlace}}}return{isNewState:false,position:{left:parseInt(getTipOffsetLeft(place)-parentLeft,10),top:parseInt(getTipOffsetTop(place)-parentTop,10)}}};var getCurrentOffset=function getCurrentOffset(e,currentTarget,effect){var boundingClientRect=currentTarget.getBoundingClientRect();var targetTop=boundingClientRect.top;var targetLeft=boundingClientRect.left;var targetWidth=currentTarget.clientWidth;var targetHeight=currentTarget.clientHeight;if(effect==="float"){return{mouseX:e.clientX,mouseY:e.clientY}}return{mouseX:targetLeft+targetWidth/2,mouseY:targetTop+targetHeight/2}};var getDefaultPosition=function getDefaultPosition(effect,targetWidth,targetHeight,tipWidth,tipHeight){var top=void 0;var right=void 0;var bottom=void 0;var left=void 0;var disToMouse=3;var triangleHeight=2;var cursorHeight=12;if(effect==="float"){top={l:-(tipWidth/2),r:tipWidth/2,t:-(tipHeight+disToMouse+triangleHeight),b:-disToMouse};bottom={l:-(tipWidth/2),r:tipWidth/2,t:disToMouse+cursorHeight,b:tipHeight+disToMouse+triangleHeight+cursorHeight};left={l:-(tipWidth+disToMouse+triangleHeight),r:-disToMouse,t:-(tipHeight/2),b:tipHeight/2};right={l:disToMouse,r:tipWidth+disToMouse+triangleHeight,t:-(tipHeight/2),b:tipHeight/2}}else if(effect==="solid"){top={l:-(tipWidth/2),r:tipWidth/2,t:-(targetHeight/2+tipHeight+triangleHeight),b:-(targetHeight/2)};bottom={l:-(tipWidth/2),r:tipWidth/2,t:targetHeight/2,b:targetHeight/2+tipHeight+triangleHeight};left={l:-(tipWidth+targetWidth/2+triangleHeight),r:-(targetWidth/2),t:-(tipHeight/2),b:tipHeight/2};right={l:targetWidth/2,r:tipWidth+targetWidth/2+triangleHeight,t:-(tipHeight/2),b:tipHeight/2}}return{top:top,bottom:bottom,left:left,right:right}};var calculateOffset=function calculateOffset(offset){var extraOffset_X=0;var extraOffset_Y=0;if(Object.prototype.toString.apply(offset)==="[object String]"){offset=JSON.parse(offset.toString().replace(/\'/g,'"'))}for(var key in offset){if(key==="top"){extraOffset_Y-=parseInt(offset[key],10)}else if(key==="bottom"){extraOffset_Y+=parseInt(offset[key],10)}else if(key==="left"){extraOffset_X-=parseInt(offset[key],10)}else if(key==="right"){extraOffset_X+=parseInt(offset[key],10)}}return{extraOffset_X:extraOffset_X,extraOffset_Y:extraOffset_Y}};var getParent=function getParent(currentTarget){var currentParent=currentTarget;while(currentParent){if(window.getComputedStyle(currentParent).getPropertyValue("transform")!=="none")break;currentParent=currentParent.parentElement}var parentTop=currentParent&¤tParent.getBoundingClientRect().top||0;var parentLeft=currentParent&¤tParent.getBoundingClientRect().left||0;return{parentTop:parentTop,parentLeft:parentLeft}}},{}],13:[function(require,module,exports){(function(global){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=function(tip,children,getContent,multiline){if(children)return children;if(getContent!==undefined&&getContent!==null)return getContent;if(getContent===null)return null;var regexp=//;if(!multiline||multiline==="false"||!regexp.test(tip)){return tip}return tip.split(regexp).map(function(d,i){return _react2.default.createElement("span",{key:i,className:"multi-line"},d)})};var _react=typeof window!=="undefined"?window["React"]:typeof global!=="undefined"?global["React"]:null;var _react2=_interopRequireDefault(_react);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],14:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=function(nodeList){var length=nodeList.length;if(nodeList.hasOwnProperty){return Array.prototype.slice.call(nodeList)}return new Array(length).fill().map(function(index){return nodeList[index]})}},{}]},{},[9])(9)}); \ No newline at end of file +(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.ReactTooltip=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;o1){for(var i=1;i1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}var argIndex=0;var message="Warning: "+format.replace(/%s/g,function(){return args[argIndex++]});if(typeof console!=="undefined"){console.error(message)}try{throw new Error(message)}catch(x){}};warning=function warning(condition,format){if(format===undefined){throw new Error("`warning(condition, format, ...args)` requires a warning "+"message argument")}if(format.indexOf("Failed Composite propType: ")===0){return}if(!condition){for(var _len2=arguments.length,args=Array(_len2>2?_len2-2:0),_key2=2;_key2<_len2;_key2++){args[_key2-2]=arguments[_key2]}printWarning.apply(undefined,[format].concat(args))}}})()}module.exports=warning}).call(this,require("_process"))},{"./emptyFunction":2,_process:1}],5:[function(require,module,exports){(function(process){"use strict";if(process.env.NODE_ENV!=="production"){var invariant=require("fbjs/lib/invariant");var warning=require("fbjs/lib/warning");var ReactPropTypesSecret=require("./lib/ReactPropTypesSecret");var loggedTypeFailures={}}function checkPropTypes(typeSpecs,values,location,componentName,getStack){if(process.env.NODE_ENV!=="production"){for(var typeSpecName in typeSpecs){if(typeSpecs.hasOwnProperty(typeSpecName)){var error;try{invariant(typeof typeSpecs[typeSpecName]==="function","%s: %s type `%s` is invalid; it must be a function, usually from "+"React.PropTypes.",componentName||"React class",location,typeSpecName);error=typeSpecs[typeSpecName](values,typeSpecName,componentName,location,null,ReactPropTypesSecret)}catch(ex){error=ex}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);if(error instanceof Error&&!(error.message in loggedTypeFailures)){loggedTypeFailures[error.message]=true;var stack=getStack?getStack():"";warning(false,"Failed %s type: %s%s",location,error.message,stack!=null?stack:"")}}}}}module.exports=checkPropTypes}).call(this,require("_process"))},{"./lib/ReactPropTypesSecret":9,_process:1,"fbjs/lib/invariant":3,"fbjs/lib/warning":4}],6:[function(require,module,exports){"use strict";var emptyFunction=require("fbjs/lib/emptyFunction");var invariant=require("fbjs/lib/invariant");module.exports=function(){function shim(){invariant(false,"Calling PropTypes validators directly is not supported by the `prop-types` package. "+"Use PropTypes.checkPropTypes() to call them. "+"Read more at http://fb.me/use-check-prop-types")}shim.isRequired=shim;function getShim(){return shim}var ReactPropTypes={array:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim};ReactPropTypes.checkPropTypes=emptyFunction;ReactPropTypes.PropTypes=ReactPropTypes;return ReactPropTypes}},{"fbjs/lib/emptyFunction":2,"fbjs/lib/invariant":3}],7:[function(require,module,exports){(function(process){"use strict";var emptyFunction=require("fbjs/lib/emptyFunction");var invariant=require("fbjs/lib/invariant");var warning=require("fbjs/lib/warning");var ReactPropTypesSecret=require("./lib/ReactPropTypesSecret");var checkPropTypes=require("./checkPropTypes");module.exports=function(isValidElement,throwOnDirectAccess){var ITERATOR_SYMBOL=typeof Symbol==="function"&&Symbol.iterator;var FAUX_ITERATOR_SYMBOL="@@iterator";function getIteratorFn(maybeIterable){var iteratorFn=maybeIterable&&(ITERATOR_SYMBOL&&maybeIterable[ITERATOR_SYMBOL]||maybeIterable[FAUX_ITERATOR_SYMBOL]);if(typeof iteratorFn==="function"){return iteratorFn}}var ANONYMOUS="<>";var ReactPropTypes={array:createPrimitiveTypeChecker("array"),bool:createPrimitiveTypeChecker("boolean"),func:createPrimitiveTypeChecker("function"),number:createPrimitiveTypeChecker("number"),object:createPrimitiveTypeChecker("object"),string:createPrimitiveTypeChecker("string"),symbol:createPrimitiveTypeChecker("symbol"),any:createAnyTypeChecker(),arrayOf:createArrayOfTypeChecker,element:createElementTypeChecker(),instanceOf:createInstanceTypeChecker,node:createNodeChecker(),objectOf:createObjectOfTypeChecker,oneOf:createEnumTypeChecker,oneOfType:createUnionTypeChecker,shape:createShapeTypeChecker};function is(x,y){if(x===y){return x!==0||1/x===1/y}else{return x!==x&&y!==y}}function PropTypeError(message){this.message=message;this.stack=""}PropTypeError.prototype=Error.prototype;function createChainableTypeChecker(validate){if(process.env.NODE_ENV!=="production"){var manualPropTypeCallCache={};var manualPropTypeWarningCount=0}function checkType(isRequired,props,propName,componentName,location,propFullName,secret){componentName=componentName||ANONYMOUS;propFullName=propFullName||propName;if(secret!==ReactPropTypesSecret){if(throwOnDirectAccess){invariant(false,"Calling PropTypes validators directly is not supported by the `prop-types` package. "+"Use `PropTypes.checkPropTypes()` to call them. "+"Read more at http://fb.me/use-check-prop-types")}else if(process.env.NODE_ENV!=="production"&&typeof console!=="undefined"){var cacheKey=componentName+":"+propName;if(!manualPropTypeCallCache[cacheKey]&&manualPropTypeWarningCount<3){warning(false,"You are manually calling a React.PropTypes validation "+"function for the `%s` prop on `%s`. This is deprecated "+"and will throw in the standalone `prop-types` package. "+"You may be seeing this warning due to a third-party PropTypes "+"library. See https://fb.me/react-warning-dont-call-proptypes "+"for details.",propFullName,componentName);manualPropTypeCallCache[cacheKey]=true;manualPropTypeWarningCount++}}}if(props[propName]==null){if(isRequired){if(props[propName]===null){return new PropTypeError("The "+location+" `"+propFullName+"` is marked as required "+("in `"+componentName+"`, but its value is `null`."))}return new PropTypeError("The "+location+" `"+propFullName+"` is marked as required in "+("`"+componentName+"`, but its value is `undefined`."))}return null}else{return validate(props,propName,componentName,location,propFullName)}}var chainedCheckType=checkType.bind(null,false);chainedCheckType.isRequired=checkType.bind(null,true);return chainedCheckType}function createPrimitiveTypeChecker(expectedType){function validate(props,propName,componentName,location,propFullName,secret){var propValue=props[propName];var propType=getPropType(propValue);if(propType!==expectedType){var preciseType=getPreciseType(propValue);return new PropTypeError("Invalid "+location+" `"+propFullName+"` of type "+("`"+preciseType+"` supplied to `"+componentName+"`, expected ")+("`"+expectedType+"`."))}return null}return createChainableTypeChecker(validate)}function createAnyTypeChecker(){return createChainableTypeChecker(emptyFunction.thatReturnsNull)}function createArrayOfTypeChecker(typeChecker){function validate(props,propName,componentName,location,propFullName){if(typeof typeChecker!=="function"){return new PropTypeError("Property `"+propFullName+"` of component `"+componentName+"` has invalid PropType notation inside arrayOf.")}var propValue=props[propName];if(!Array.isArray(propValue)){var propType=getPropType(propValue);return new PropTypeError("Invalid "+location+" `"+propFullName+"` of type "+("`"+propType+"` supplied to `"+componentName+"`, expected an array."))}for(var i=0;i0||placeholder){(function(){var isInvisible=!_this6.state.show;_this6.setState({currentEvent:e,currentTarget:eventTarget,show:true},function(){_this6.updatePosition();if(isInvisible&&afterShow)afterShow()})})()}};clearTimeout(this.delayShowLoop);if(delayShow){this.delayShowLoop=setTimeout(updateState,delayTime)}else{updateState()}}},{key:"hideTooltip",value:function hideTooltip(e,hasTarget){var _this7=this;var _state2=this.state,delayHide=_state2.delayHide,isEmptyTip=_state2.isEmptyTip,disable=_state2.disable;var afterHide=this.props.afterHide;if(!this.mount)return;if(isEmptyTip||disable)return;if(hasTarget){var targetArray=this.getTargetArray(this.props.id);var isMyElement=targetArray.some(function(ele){return ele===e.currentTarget});if(!isMyElement||!this.state.show)return}var resetState=function resetState(){var isVisible=_this7.state.show;_this7.setState({show:false},function(){_this7.removeScrollListener();if(isVisible&&afterHide)afterHide()})};this.clearTimer();if(delayHide){this.delayHideLoop=setTimeout(resetState,parseInt(delayHide,10))}else{resetState()}}},{key:"addScrollListener",value:function addScrollListener(e){var isCaptureMode=this.isCapture(e.currentTarget);window.addEventListener("scroll",this.hideTooltip,isCaptureMode)}},{key:"removeScrollListener",value:function removeScrollListener(){window.removeEventListener("scroll",this.hideTooltip)}},{key:"updatePosition",value:function updatePosition(){var _this8=this;var _state3=this.state,currentEvent=_state3.currentEvent,currentTarget=_state3.currentTarget,place=_state3.place,effect=_state3.effect,offset=_state3.offset;var node=_reactDom2.default.findDOMNode(this);var result=(0,_getPosition2.default)(currentEvent,currentTarget,node,place,effect,offset);if(result.isNewState){return this.setState(result.newState,function(){_this8.updatePosition()})}node.style.left=result.position.left+"px";node.style.top=result.position.top+"px"}},{key:"setStyleHeader",value:function setStyleHeader(){if(!document.getElementsByTagName("head")[0].querySelector('style[id="react-tooltip"]')){var tag=document.createElement("style");tag.id="react-tooltip";tag.innerHTML=_style2.default;document.getElementsByTagName("head")[0].appendChild(tag)}}},{key:"clearTimer",value:function clearTimer(){clearTimeout(this.delayShowLoop);clearTimeout(this.delayHideLoop);clearInterval(this.intervalUpdateContent)}},{key:"render",value:function render(){var _state4=this.state,placeholder=_state4.placeholder,extraClass=_state4.extraClass,html=_state4.html,ariaProps=_state4.ariaProps,disable=_state4.disable,isEmptyTip=_state4.isEmptyTip;var tooltipClass=(0,_classnames2.default)("__react_component_tooltip",{show:this.state.show&&!disable&&!isEmptyTip},{border:this.state.border},{"place-top":this.state.place==="top"},{"place-bottom":this.state.place==="bottom"},{"place-left":this.state.place==="left"},{"place-right":this.state.place==="right"},{"type-dark":this.state.type==="dark"},{"type-success":this.state.type==="success"},{"type-warning":this.state.type==="warning"},{"type-error":this.state.type==="error"},{"type-info":this.state.type==="info"},{"type-light":this.state.type==="light"});var Wrapper=this.props.wrapper;if(ReactTooltip.supportedWrappers.indexOf(Wrapper)<0){Wrapper=ReactTooltip.defaultProps.wrapper}if(html){return _react2.default.createElement(Wrapper,_extends({className:tooltipClass+" "+extraClass},ariaProps,{"data-id":"tooltip",dangerouslySetInnerHTML:{__html:placeholder}}))}else{return _react2.default.createElement(Wrapper,_extends({className:tooltipClass+" "+extraClass},ariaProps,{"data-id":"tooltip"}),placeholder)}}}]);return ReactTooltip}(_react.Component),_class2.propTypes={children:_propTypes2.default.any,place:_propTypes2.default.string,type:_propTypes2.default.string,effect:_propTypes2.default.string,offset:_propTypes2.default.object,multiline:_propTypes2.default.bool,border:_propTypes2.default.bool,insecure:_propTypes2.default.bool,"class":_propTypes2.default.string,className:_propTypes2.default.string,id:_propTypes2.default.string,html:_propTypes2.default.bool,delayHide:_propTypes2.default.number,delayShow:_propTypes2.default.number,event:_propTypes2.default.string,eventOff:_propTypes2.default.string,watchWindow:_propTypes2.default.bool,isCapture:_propTypes2.default.bool,globalEventOff:_propTypes2.default.string,getContent:_propTypes2.default.any,afterShow:_propTypes2.default.func,afterHide:_propTypes2.default.func,disable:_propTypes2.default.bool,scrollHide:_propTypes2.default.bool,resizeHide:_propTypes2.default.bool,wrapper:_propTypes2.default.string},_class2.defaultProps={insecure:true,resizeHide:true,wrapper:"div"},_class2.supportedWrappers=["div","span"],_temp))||_class)||_class)||_class)||_class)||_class)||_class;module.exports=ReactTooltip}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./decorators/customEvent":12,"./decorators/getEffect":13,"./decorators/isCapture":14,"./decorators/staticMethods":15,"./decorators/trackRemoval":16,"./decorators/windowListener":17,"./style":19,"./utils/aria":20,"./utils/getPosition":21,"./utils/getTipContent":22,"./utils/nodeListToArray":23,classnames:10,"prop-types":8}],19:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default='.__react_component_tooltip{border-radius:3px;display:inline-block;font-size:13px;left:-999em;opacity:0;padding:8px 21px;position:fixed;pointer-events:none;transition:opacity 0.3s ease-out;top:-999em;visibility:hidden;z-index:999}.__react_component_tooltip:before,.__react_component_tooltip:after{content:"";width:0;height:0;position:absolute}.__react_component_tooltip.show{opacity:0.9;margin-top:0px;margin-left:0px;visibility:visible}.__react_component_tooltip.type-dark{color:#fff;background-color:#222}.__react_component_tooltip.type-dark.place-top:after{border-top-color:#222;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-dark.place-bottom:after{border-bottom-color:#222;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-dark.place-left:after{border-left-color:#222;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-dark.place-right:after{border-right-color:#222;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-dark.border{border:1px solid #fff}.__react_component_tooltip.type-dark.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-dark.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-dark.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-dark.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-success{color:#fff;background-color:#8DC572}.__react_component_tooltip.type-success.place-top:after{border-top-color:#8DC572;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-success.place-bottom:after{border-bottom-color:#8DC572;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-success.place-left:after{border-left-color:#8DC572;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-success.place-right:after{border-right-color:#8DC572;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-success.border{border:1px solid #fff}.__react_component_tooltip.type-success.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-success.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-success.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-success.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-warning{color:#fff;background-color:#F0AD4E}.__react_component_tooltip.type-warning.place-top:after{border-top-color:#F0AD4E;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-warning.place-bottom:after{border-bottom-color:#F0AD4E;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-warning.place-left:after{border-left-color:#F0AD4E;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-warning.place-right:after{border-right-color:#F0AD4E;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-warning.border{border:1px solid #fff}.__react_component_tooltip.type-warning.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-warning.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-warning.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-warning.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-error{color:#fff;background-color:#BE6464}.__react_component_tooltip.type-error.place-top:after{border-top-color:#BE6464;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-error.place-bottom:after{border-bottom-color:#BE6464;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-error.place-left:after{border-left-color:#BE6464;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-error.place-right:after{border-right-color:#BE6464;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-error.border{border:1px solid #fff}.__react_component_tooltip.type-error.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-error.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-error.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-error.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-info{color:#fff;background-color:#337AB7}.__react_component_tooltip.type-info.place-top:after{border-top-color:#337AB7;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-info.place-bottom:after{border-bottom-color:#337AB7;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-info.place-left:after{border-left-color:#337AB7;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-info.place-right:after{border-right-color:#337AB7;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-info.border{border:1px solid #fff}.__react_component_tooltip.type-info.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-info.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-info.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-info.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-light{color:#222;background-color:#fff}.__react_component_tooltip.type-light.place-top:after{border-top-color:#fff;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-light.place-bottom:after{border-bottom-color:#fff;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-light.place-left:after{border-left-color:#fff;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-light.place-right:after{border-right-color:#fff;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-light.border{border:1px solid #222}.__react_component_tooltip.type-light.border.place-top:before{border-top:8px solid #222}.__react_component_tooltip.type-light.border.place-bottom:before{border-bottom:8px solid #222}.__react_component_tooltip.type-light.border.place-left:before{border-left:8px solid #222}.__react_component_tooltip.type-light.border.place-right:before{border-right:8px solid #222}.__react_component_tooltip.place-top{margin-top:-10px}.__react_component_tooltip.place-top:before{border-left:10px solid transparent;border-right:10px solid transparent;bottom:-8px;left:50%;margin-left:-10px}.__react_component_tooltip.place-top:after{border-left:8px solid transparent;border-right:8px solid transparent;bottom:-6px;left:50%;margin-left:-8px}.__react_component_tooltip.place-bottom{margin-top:10px}.__react_component_tooltip.place-bottom:before{border-left:10px solid transparent;border-right:10px solid transparent;top:-8px;left:50%;margin-left:-10px}.__react_component_tooltip.place-bottom:after{border-left:8px solid transparent;border-right:8px solid transparent;top:-6px;left:50%;margin-left:-8px}.__react_component_tooltip.place-left{margin-left:-10px}.__react_component_tooltip.place-left:before{border-top:6px solid transparent;border-bottom:6px solid transparent;right:-8px;top:50%;margin-top:-5px}.__react_component_tooltip.place-left:after{border-top:5px solid transparent;border-bottom:5px solid transparent;right:-6px;top:50%;margin-top:-4px}.__react_component_tooltip.place-right{margin-left:10px}.__react_component_tooltip.place-right:before{border-top:6px solid transparent;border-bottom:6px solid transparent;left:-8px;top:50%;margin-top:-5px}.__react_component_tooltip.place-right:after{border-top:5px solid transparent;border-bottom:5px solid transparent;left:-6px;top:50%;margin-top:-4px}.__react_component_tooltip .multi-line{display:block;padding:2px 0px;text-align:center}'},{}],20:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.parseAria=parseAria;function parseAria(props){var ariaObj={};Object.keys(props).filter(function(prop){return/(^aria-\w+$|^role$)/.test(prop)}).forEach(function(prop){ariaObj[prop]=props[prop]});return ariaObj}},{}],21:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=function(e,target,node,place,effect,offset){var tipWidth=node.clientWidth;var tipHeight=node.clientHeight;var _getCurrentOffset=getCurrentOffset(e,target,effect),mouseX=_getCurrentOffset.mouseX,mouseY=_getCurrentOffset.mouseY;var defaultOffset=getDefaultPosition(effect,target.clientWidth,target.clientHeight,tipWidth,tipHeight);var _calculateOffset=calculateOffset(offset),extraOffset_X=_calculateOffset.extraOffset_X,extraOffset_Y=_calculateOffset.extraOffset_Y;var windowWidth=window.innerWidth;var windowHeight=window.innerHeight;var _getParent=getParent(node),parentTop=_getParent.parentTop,parentLeft=_getParent.parentLeft;var getTipOffsetLeft=function getTipOffsetLeft(place){var offset_X=defaultOffset[place].l;return mouseX+offset_X+extraOffset_X};var getTipOffsetRight=function getTipOffsetRight(place){var offset_X=defaultOffset[place].r;return mouseX+offset_X+extraOffset_X};var getTipOffsetTop=function getTipOffsetTop(place){var offset_Y=defaultOffset[place].t;return mouseY+offset_Y+extraOffset_Y};var getTipOffsetBottom=function getTipOffsetBottom(place){var offset_Y=defaultOffset[place].b;return mouseY+offset_Y+extraOffset_Y};var outsideVertical=function outsideVertical(){var result=false;var newPlace=void 0;if(getTipOffsetTop("left")<0&&getTipOffsetBottom("left")<=windowHeight&&getTipOffsetBottom("bottom")<=windowHeight){result=true;newPlace="bottom"}else if(getTipOffsetBottom("left")>windowHeight&&getTipOffsetTop("left")>=0&&getTipOffsetTop("top")>=0){result=true;newPlace="top"}return{result:result,newPlace:newPlace}};var outsideLeft=function outsideLeft(){var _outsideVertical=outsideVertical(),result=_outsideVertical.result,newPlace=_outsideVertical.newPlace;if(result&&outsideHorizontal().result){return{result:false}}if(!result&&getTipOffsetLeft("left")<0&&getTipOffsetRight("right")<=windowWidth){result=true;newPlace="right"}return{result:result,newPlace:newPlace}};var outsideRight=function outsideRight(){var _outsideVertical2=outsideVertical(),result=_outsideVertical2.result,newPlace=_outsideVertical2.newPlace;if(result&&outsideHorizontal().result){return{result:false}}if(!result&&getTipOffsetRight("right")>windowWidth&&getTipOffsetLeft("left")>=0){result=true;newPlace="left"}return{result:result,newPlace:newPlace}};var outsideHorizontal=function outsideHorizontal(){var result=false;var newPlace=void 0;if(getTipOffsetLeft("top")<0&&getTipOffsetRight("top")<=windowWidth&&getTipOffsetRight("right")<=windowWidth){result=true;newPlace="right"}else if(getTipOffsetRight("top")>windowWidth&&getTipOffsetLeft("top")>=0&&getTipOffsetLeft("left")>=0){result=true;newPlace="left"}return{result:result,newPlace:newPlace}};var outsideTop=function outsideTop(){var _outsideHorizontal=outsideHorizontal(),result=_outsideHorizontal.result,newPlace=_outsideHorizontal.newPlace;if(result&&outsideVertical().result){return{result:false}}if(!result&&getTipOffsetTop("top")<0&&getTipOffsetBottom("bottom")<=windowHeight){result=true;newPlace="bottom"}return{result:result,newPlace:newPlace}};var outsideBottom=function outsideBottom(){var _outsideHorizontal2=outsideHorizontal(),result=_outsideHorizontal2.result,newPlace=_outsideHorizontal2.newPlace;if(result&&outsideVertical().result){return{result:false}}if(!result&&getTipOffsetBottom("bottom")>windowHeight&&getTipOffsetTop("top")>=0){result=true;newPlace="top"}return{result:result,newPlace:newPlace}};var outsideLeftResult=outsideLeft();var outsideRightResult=outsideRight();var outsideTopResult=outsideTop();var outsideBottomResult=outsideBottom();if(place==="left"&&outsideLeftResult.result){return{isNewState:true,newState:{place:outsideLeftResult.newPlace}}}else if(place==="right"&&outsideRightResult.result){return{isNewState:true,newState:{place:outsideRightResult.newPlace}}}else if(place==="top"&&outsideTopResult.result){return{isNewState:true,newState:{place:outsideTopResult.newPlace}}}else if(place==="bottom"&&outsideBottomResult.result){return{isNewState:true,newState:{place:outsideBottomResult.newPlace}}}return{isNewState:false,position:{left:parseInt(getTipOffsetLeft(place)-parentLeft,10),top:parseInt(getTipOffsetTop(place)-parentTop,10)}}};var getCurrentOffset=function getCurrentOffset(e,currentTarget,effect){var boundingClientRect=currentTarget.getBoundingClientRect();var targetTop=boundingClientRect.top;var targetLeft=boundingClientRect.left;var targetWidth=currentTarget.clientWidth;var targetHeight=currentTarget.clientHeight;if(effect==="float"){return{mouseX:e.clientX,mouseY:e.clientY}}return{mouseX:targetLeft+targetWidth/2,mouseY:targetTop+targetHeight/2}};var getDefaultPosition=function getDefaultPosition(effect,targetWidth,targetHeight,tipWidth,tipHeight){var top=void 0;var right=void 0;var bottom=void 0;var left=void 0;var disToMouse=3;var triangleHeight=2;var cursorHeight=12;if(effect==="float"){top={l:-(tipWidth/2),r:tipWidth/2,t:-(tipHeight+disToMouse+triangleHeight),b:-disToMouse};bottom={l:-(tipWidth/2),r:tipWidth/2,t:disToMouse+cursorHeight,b:tipHeight+disToMouse+triangleHeight+cursorHeight};left={l:-(tipWidth+disToMouse+triangleHeight),r:-disToMouse,t:-(tipHeight/2),b:tipHeight/2};right={l:disToMouse,r:tipWidth+disToMouse+triangleHeight,t:-(tipHeight/2),b:tipHeight/2}}else if(effect==="solid"){top={l:-(tipWidth/2),r:tipWidth/2,t:-(targetHeight/2+tipHeight+triangleHeight),b:-(targetHeight/2)};bottom={l:-(tipWidth/2),r:tipWidth/2,t:targetHeight/2,b:targetHeight/2+tipHeight+triangleHeight};left={l:-(tipWidth+targetWidth/2+triangleHeight),r:-(targetWidth/2),t:-(tipHeight/2),b:tipHeight/2};right={l:targetWidth/2,r:tipWidth+targetWidth/2+triangleHeight,t:-(tipHeight/2),b:tipHeight/2}}return{top:top,bottom:bottom,left:left,right:right}};var calculateOffset=function calculateOffset(offset){var extraOffset_X=0;var extraOffset_Y=0;if(Object.prototype.toString.apply(offset)==="[object String]"){offset=JSON.parse(offset.toString().replace(/\'/g,'"'))}for(var key in offset){if(key==="top"){extraOffset_Y-=parseInt(offset[key],10)}else if(key==="bottom"){extraOffset_Y+=parseInt(offset[key],10)}else if(key==="left"){extraOffset_X-=parseInt(offset[key],10)}else if(key==="right"){extraOffset_X+=parseInt(offset[key],10)}}return{extraOffset_X:extraOffset_X,extraOffset_Y:extraOffset_Y}};var getParent=function getParent(currentTarget){var currentParent=currentTarget;while(currentParent){if(window.getComputedStyle(currentParent).getPropertyValue("transform")!=="none")break;currentParent=currentParent.parentElement}var parentTop=currentParent&¤tParent.getBoundingClientRect().top||0;var parentLeft=currentParent&¤tParent.getBoundingClientRect().left||0;return{parentTop:parentTop,parentLeft:parentLeft}}},{}],22:[function(require,module,exports){(function(global){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=function(tip,children,getContent,multiline){if(children)return children;if(getContent!==undefined&&getContent!==null)return getContent;if(getContent===null)return null;var regexp=//;if(!multiline||multiline==="false"||!regexp.test(tip)){return tip}return tip.split(regexp).map(function(d,i){return _react2.default.createElement("span",{key:i,className:"multi-line"},d)})};var _react=typeof window!=="undefined"?window["React"]:typeof global!=="undefined"?global["React"]:null;var _react2=_interopRequireDefault(_react);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],23:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=function(nodeList){var length=nodeList.length;if(nodeList.hasOwnProperty){return Array.prototype.slice.call(nodeList)}return new Array(length).fill().map(function(index){return nodeList[index]})}},{}]},{},[18])(18)}); \ No newline at end of file