diff --git a/.size-snapshot.json b/.size-snapshot.json index 0464965c..b310d477 100644 --- a/.size-snapshot.json +++ b/.size-snapshot.json @@ -1,12 +1,12 @@ { "dist/react-draggable.js": { - "bundled": 75658, - "minified": 22849, - "gzipped": 7695 + "bundled": 88330, + "minified": 28079, + "gzipped": 8875 }, "dist/react-draggable.min.js": { - "bundled": 51843, - "minified": 15835, - "gzipped": 5627 + "bundled": 56781, + "minified": 18383, + "gzipped": 6270 } } diff --git a/dist/react-draggable.js b/dist/react-draggable.js index cb18e5c9..1ab79434 100644 --- a/dist/react-draggable.js +++ b/dist/react-draggable.js @@ -7,108 +7,104 @@ ReactDOM = ReactDOM && ReactDOM.hasOwnProperty('default') ? ReactDOM['default'] : ReactDOM; React = React && React.hasOwnProperty('default') ? React['default'] : React; - function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; + function unwrapExports (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x.default : x; } - /** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - */ - - function makeEmptyFunction(arg) { - return function () { - return arg; - }; + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; } - /** - * 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; - }; - - var emptyFunction_1 = emptyFunction; + var reactIs_production_min = createCommonjsModule(function (module, exports) { + Object.defineProperty(exports,"__esModule",{value:!0}); + var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.memo"): + 60115,r=b?Symbol.for("react.lazy"):60116;function t(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type, a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof, a){case k:case n:case h:return a;default:return u}}case r:case q:case d:return u}}}function v(a){return t(a)===m}exports.typeOf=t;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n; + exports.Fragment=e;exports.Lazy=r;exports.Memo=q;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||"object"===typeof a&&null!==a&&(a.$$typeof===r||a.$$typeof===q||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n)};exports.isAsyncMode=function(a){return v(a)||t(a)===l};exports.isConcurrentMode=v;exports.isContextConsumer=function(a){return t(a)===k}; + exports.isContextProvider=function(a){return t(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return t(a)===n};exports.isFragment=function(a){return t(a)===e};exports.isLazy=function(a){return t(a)===r};exports.isMemo=function(a){return t(a)===q};exports.isPortal=function(a){return t(a)===d};exports.isProfiler=function(a){return t(a)===g};exports.isStrictMode=function(a){return t(a)===f}; + exports.isSuspense=function(a){return t(a)===p}; + }); - /** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ + unwrapExports(reactIs_production_min); + var reactIs_production_min_1 = reactIs_production_min.typeOf; + var reactIs_production_min_2 = reactIs_production_min.AsyncMode; + var reactIs_production_min_3 = reactIs_production_min.ConcurrentMode; + var reactIs_production_min_4 = reactIs_production_min.ContextConsumer; + var reactIs_production_min_5 = reactIs_production_min.ContextProvider; + var reactIs_production_min_6 = reactIs_production_min.Element; + var reactIs_production_min_7 = reactIs_production_min.ForwardRef; + var reactIs_production_min_8 = reactIs_production_min.Fragment; + var reactIs_production_min_9 = reactIs_production_min.Lazy; + var reactIs_production_min_10 = reactIs_production_min.Memo; + var reactIs_production_min_11 = reactIs_production_min.Portal; + var reactIs_production_min_12 = reactIs_production_min.Profiler; + var reactIs_production_min_13 = reactIs_production_min.StrictMode; + var reactIs_production_min_14 = reactIs_production_min.Suspense; + var reactIs_production_min_15 = reactIs_production_min.isValidElementType; + var reactIs_production_min_16 = reactIs_production_min.isAsyncMode; + var reactIs_production_min_17 = reactIs_production_min.isConcurrentMode; + var reactIs_production_min_18 = reactIs_production_min.isContextConsumer; + var reactIs_production_min_19 = reactIs_production_min.isContextProvider; + var reactIs_production_min_20 = reactIs_production_min.isElement; + var reactIs_production_min_21 = reactIs_production_min.isForwardRef; + var reactIs_production_min_22 = reactIs_production_min.isFragment; + var reactIs_production_min_23 = reactIs_production_min.isLazy; + var reactIs_production_min_24 = reactIs_production_min.isMemo; + var reactIs_production_min_25 = reactIs_production_min.isPortal; + var reactIs_production_min_26 = reactIs_production_min.isProfiler; + var reactIs_production_min_27 = reactIs_production_min.isStrictMode; + var reactIs_production_min_28 = reactIs_production_min.isSuspense; + + var reactIs_development = createCommonjsModule(function (module, exports) { - /** - * 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) {}; { - 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; - } + (function() { + + Object.defineProperty(exports, '__esModule', { value: true }); + + // The Symbol used to tag the ReactElement-like types. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + var hasSymbol = typeof Symbol === 'function' && Symbol.for; + + var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; + var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; + var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; + var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; + var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; + var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; + var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; + var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; + var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; + var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; + var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; + var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; + var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; + + function isValidElementType(type) { + return typeof type === 'string' || typeof type === 'function' || + // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. + type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE); } - var invariant_1 = invariant; - /** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js + * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- * 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_1; + var lowPriorityWarning = function () {}; { - var printWarning = function printWarning(format) { + var printWarning = function (format) { for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } @@ -118,7 +114,7 @@ return args[argIndex++]; }); if (typeof console !== 'undefined') { - console.error(message); + console.warn(message); } try { // --- Welcome to debugging React --- @@ -128,15 +124,10 @@ } catch (x) {} }; - warning = function warning(condition, format) { + lowPriorityWarning = function (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. + throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument'); } - if (!condition) { for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { args[_key2 - 2] = arguments[_key2]; @@ -147,7 +138,177 @@ }; } - var warning_1 = warning; + var lowPriorityWarning$1 = lowPriorityWarning; + + function typeOf(object) { + if (typeof object === 'object' && object !== null) { + var $$typeof = object.$$typeof; + switch ($$typeof) { + case REACT_ELEMENT_TYPE: + var type = object.type; + + switch (type) { + case REACT_ASYNC_MODE_TYPE: + case REACT_CONCURRENT_MODE_TYPE: + case REACT_FRAGMENT_TYPE: + case REACT_PROFILER_TYPE: + case REACT_STRICT_MODE_TYPE: + case REACT_SUSPENSE_TYPE: + return type; + default: + var $$typeofType = type && type.$$typeof; + + switch ($$typeofType) { + case REACT_CONTEXT_TYPE: + case REACT_FORWARD_REF_TYPE: + case REACT_PROVIDER_TYPE: + return $$typeofType; + default: + return $$typeof; + } + } + case REACT_LAZY_TYPE: + case REACT_MEMO_TYPE: + case REACT_PORTAL_TYPE: + return $$typeof; + } + } + + return undefined; + } + + // AsyncMode is deprecated along with isAsyncMode + var AsyncMode = REACT_ASYNC_MODE_TYPE; + var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; + var ContextConsumer = REACT_CONTEXT_TYPE; + var ContextProvider = REACT_PROVIDER_TYPE; + var Element = REACT_ELEMENT_TYPE; + var ForwardRef = REACT_FORWARD_REF_TYPE; + var Fragment = REACT_FRAGMENT_TYPE; + var Lazy = REACT_LAZY_TYPE; + var Memo = REACT_MEMO_TYPE; + var Portal = REACT_PORTAL_TYPE; + var Profiler = REACT_PROFILER_TYPE; + var StrictMode = REACT_STRICT_MODE_TYPE; + var Suspense = REACT_SUSPENSE_TYPE; + + var hasWarnedAboutDeprecatedIsAsyncMode = false; + + // AsyncMode should be deprecated + function isAsyncMode(object) { + { + if (!hasWarnedAboutDeprecatedIsAsyncMode) { + hasWarnedAboutDeprecatedIsAsyncMode = true; + lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); + } + } + return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; + } + function isConcurrentMode(object) { + return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; + } + function isContextConsumer(object) { + return typeOf(object) === REACT_CONTEXT_TYPE; + } + function isContextProvider(object) { + return typeOf(object) === REACT_PROVIDER_TYPE; + } + function isElement(object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + } + function isForwardRef(object) { + return typeOf(object) === REACT_FORWARD_REF_TYPE; + } + function isFragment(object) { + return typeOf(object) === REACT_FRAGMENT_TYPE; + } + function isLazy(object) { + return typeOf(object) === REACT_LAZY_TYPE; + } + function isMemo(object) { + return typeOf(object) === REACT_MEMO_TYPE; + } + function isPortal(object) { + return typeOf(object) === REACT_PORTAL_TYPE; + } + function isProfiler(object) { + return typeOf(object) === REACT_PROFILER_TYPE; + } + function isStrictMode(object) { + return typeOf(object) === REACT_STRICT_MODE_TYPE; + } + function isSuspense(object) { + return typeOf(object) === REACT_SUSPENSE_TYPE; + } + + exports.typeOf = typeOf; + exports.AsyncMode = AsyncMode; + exports.ConcurrentMode = ConcurrentMode; + exports.ContextConsumer = ContextConsumer; + exports.ContextProvider = ContextProvider; + exports.Element = Element; + exports.ForwardRef = ForwardRef; + exports.Fragment = Fragment; + exports.Lazy = Lazy; + exports.Memo = Memo; + exports.Portal = Portal; + exports.Profiler = Profiler; + exports.StrictMode = StrictMode; + exports.Suspense = Suspense; + exports.isValidElementType = isValidElementType; + exports.isAsyncMode = isAsyncMode; + exports.isConcurrentMode = isConcurrentMode; + exports.isContextConsumer = isContextConsumer; + exports.isContextProvider = isContextProvider; + exports.isElement = isElement; + exports.isForwardRef = isForwardRef; + exports.isFragment = isFragment; + exports.isLazy = isLazy; + exports.isMemo = isMemo; + exports.isPortal = isPortal; + exports.isProfiler = isProfiler; + exports.isStrictMode = isStrictMode; + exports.isSuspense = isSuspense; + })(); + } + }); + + unwrapExports(reactIs_development); + var reactIs_development_1 = reactIs_development.typeOf; + var reactIs_development_2 = reactIs_development.AsyncMode; + var reactIs_development_3 = reactIs_development.ConcurrentMode; + var reactIs_development_4 = reactIs_development.ContextConsumer; + var reactIs_development_5 = reactIs_development.ContextProvider; + var reactIs_development_6 = reactIs_development.Element; + var reactIs_development_7 = reactIs_development.ForwardRef; + var reactIs_development_8 = reactIs_development.Fragment; + var reactIs_development_9 = reactIs_development.Lazy; + var reactIs_development_10 = reactIs_development.Memo; + var reactIs_development_11 = reactIs_development.Portal; + var reactIs_development_12 = reactIs_development.Profiler; + var reactIs_development_13 = reactIs_development.StrictMode; + var reactIs_development_14 = reactIs_development.Suspense; + var reactIs_development_15 = reactIs_development.isValidElementType; + var reactIs_development_16 = reactIs_development.isAsyncMode; + var reactIs_development_17 = reactIs_development.isConcurrentMode; + var reactIs_development_18 = reactIs_development.isContextConsumer; + var reactIs_development_19 = reactIs_development.isContextProvider; + var reactIs_development_20 = reactIs_development.isElement; + var reactIs_development_21 = reactIs_development.isForwardRef; + var reactIs_development_22 = reactIs_development.isFragment; + var reactIs_development_23 = reactIs_development.isLazy; + var reactIs_development_24 = reactIs_development.isMemo; + var reactIs_development_25 = reactIs_development.isPortal; + var reactIs_development_26 = reactIs_development.isProfiler; + var reactIs_development_27 = reactIs_development.isStrictMode; + var reactIs_development_28 = reactIs_development.isSuspense; + + var reactIs = createCommonjsModule(function (module) { + + { + module.exports = reactIs_development; + } + }); /* object-assign @@ -249,11 +410,25 @@ var ReactPropTypesSecret_1 = ReactPropTypesSecret; + var printWarning = function() {}; + { - var invariant$1 = invariant_1; - var warning$1 = warning_1; var ReactPropTypesSecret$1 = ReactPropTypesSecret_1; var loggedTypeFailures = {}; + var has = Function.call.bind(Object.prototype.hasOwnProperty); + + printWarning = function(text) { + var message = 'Warning: ' + text; + 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) {} + }; } /** @@ -270,7 +445,7 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) { { for (var typeSpecName in typeSpecs) { - if (typeSpecs.hasOwnProperty(typeSpecName)) { + if (has(typeSpecs, 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. @@ -278,12 +453,28 @@ try { // This is intentionally an invariant that gets caught. It's the same // behavior as without this statement except with a better message. - invariant$1(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]); + if (typeof typeSpecs[typeSpecName] !== 'function') { + var err = Error( + (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + ); + err.name = 'Invariant Violation'; + throw err; + } error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$1); } catch (ex) { error = ex; } - warning$1(!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 && !(error instanceof Error)) { + printWarning( + (componentName || 'React class') + ': type specification of ' + + location + ' `' + typeSpecName + '` is invalid; the type checker ' + + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + + 'You may have forgotten to pass an argument to the type checker ' + + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + + 'shape all require an argument).' + ); + } if (error instanceof Error && !(error.message in loggedTypeFailures)) { // Only monitor this failure once because there tends to be a lot of the // same error. @@ -291,15 +482,50 @@ var stack = getStack ? getStack() : ''; - warning$1(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); + printWarning( + 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '') + ); } } } } } + /** + * Resets warning cache when testing. + * + * @private + */ + checkPropTypes.resetWarningCache = function() { + { + loggedTypeFailures = {}; + } + }; + var checkPropTypes_1 = checkPropTypes; + var has$1 = Function.call.bind(Object.prototype.hasOwnProperty); + var printWarning$1 = function() {}; + + { + printWarning$1 = function(text) { + var message = 'Warning: ' + text; + 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) {} + }; + } + + function emptyFunctionThatReturnsNull() { + return null; + } + var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) { /* global Symbol */ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; @@ -389,6 +615,7 @@ any: createAnyTypeChecker(), arrayOf: createArrayOfTypeChecker, element: createElementTypeChecker(), + elementType: createElementTypeTypeChecker(), instanceOf: createInstanceTypeChecker, node: createNodeChecker(), objectOf: createObjectOfTypeChecker, @@ -442,12 +669,13 @@ if (secret !== ReactPropTypesSecret_1) { if (throwOnDirectAccess) { // New behavior only for users of `prop-types` package - invariant_1( - false, + var err = new Error( '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' ); + err.name = 'Invariant Violation'; + throw err; } else if ("development" !== 'production' && typeof console !== 'undefined') { // Old behavior for people using React.PropTypes var cacheKey = componentName + ':' + propName; @@ -456,15 +684,12 @@ // Avoid spamming the console because they are often not actionable except for lib authors manualPropTypeWarningCount < 3 ) { - warning_1( - false, + printWarning$1( 'You are manually calling a React.PropTypes validation ' + - 'function for the `%s` prop on `%s`. This is deprecated ' + + 'function for the `' + propFullName + '` prop on `' + componentName + '`. 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 + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.' ); manualPropTypeCallCache[cacheKey] = true; manualPropTypeWarningCount++; @@ -508,7 +733,7 @@ } function createAnyTypeChecker() { - return createChainableTypeChecker(emptyFunction_1.thatReturnsNull); + return createChainableTypeChecker(emptyFunctionThatReturnsNull); } function createArrayOfTypeChecker(typeChecker) { @@ -544,6 +769,18 @@ return createChainableTypeChecker(validate); } + function createElementTypeTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!reactIs.isValidElementType(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + function createInstanceTypeChecker(expectedClass) { function validate(props, propName, componentName, location, propFullName) { if (!(props[propName] instanceof expectedClass)) { @@ -558,8 +795,17 @@ function createEnumTypeChecker(expectedValues) { if (!Array.isArray(expectedValues)) { - warning_1(false, 'Invalid argument supplied to oneOf, expected an instance of array.'); - return emptyFunction_1.thatReturnsNull; + { + if (arguments.length > 1) { + printWarning$1( + 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).' + ); + } else { + printWarning$1('Invalid argument supplied to oneOf, expected an array.'); + } + } + return emptyFunctionThatReturnsNull; } function validate(props, propName, componentName, location, propFullName) { @@ -570,8 +816,13 @@ } } - var valuesString = JSON.stringify(expectedValues); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); + var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { + if (getPropType(value) === 'symbol') { + return String(value); + } + return value; + }); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); } return createChainableTypeChecker(validate); } @@ -587,7 +838,7 @@ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); } for (var key in propValue) { - if (propValue.hasOwnProperty(key)) { + if (has$1(propValue, key)) { var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1); if (error instanceof Error) { return error; @@ -601,21 +852,18 @@ function createUnionTypeChecker(arrayOfTypeCheckers) { if (!Array.isArray(arrayOfTypeCheckers)) { - warning_1(false, 'Invalid argument supplied to oneOfType, expected an instance of array.'); - return emptyFunction_1.thatReturnsNull; + printWarning$1('Invalid argument supplied to oneOfType, expected an instance of array.'); + return emptyFunctionThatReturnsNull; } for (var i = 0; i < arrayOfTypeCheckers.length; i++) { var checker = arrayOfTypeCheckers[i]; if (typeof checker !== 'function') { - warning_1( - false, + printWarning$1( 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + - 'received %s at index %s.', - getPostfixForTypeWarning(checker), - i + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.' ); - return emptyFunction_1.thatReturnsNull; + return emptyFunctionThatReturnsNull; } } @@ -821,6 +1069,7 @@ } ReactPropTypes.checkPropTypes = checkPropTypes_1; + ReactPropTypes.resetWarningCache = checkPropTypes_1.resetWarningCache; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; @@ -835,27 +1084,18 @@ */ { - 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; - }; + var ReactIs = reactIs; // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; - module.exports = factoryWithTypeCheckers(isValidElement, throwOnDirectAccess); + module.exports = factoryWithTypeCheckers(ReactIs.isElement, throwOnDirectAccess); } }); var classnames = createCommonjsModule(function (module) { /*! - Copyright (c) 2016 Jed Watson. + Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ @@ -876,8 +1116,11 @@ if (argType === 'string' || argType === 'number') { classes.push(arg); - } else if (Array.isArray(arg)) { - classes.push(classNames.apply(null, arg)); + } else if (Array.isArray(arg) && arg.length) { + var inner = classNames.apply(null, arg); + if (inner) { + classes.push(inner); + } } else if (argType === 'object') { for (var key in arg) { if (hasOwn.call(arg, key) && arg[key]) { @@ -891,6 +1134,7 @@ } if ('object' !== 'undefined' && module.exports) { + classNames.default = classNames; module.exports = classNames; } else if (typeof undefined === 'function' && typeof undefined.amd === 'object' && undefined.amd) { // register as 'classnames', consistent with npm package name @@ -1196,17 +1440,19 @@ function createCSSTransform(_ref) /*: Object*/ { var x = _ref.x, - y = _ref.y; + y = _ref.y, + r = _ref.r; // Replace unitless items with px - return defineProperty({}, browserPrefixToKey('transform', browserPrefix), 'translate(' + x + 'px,' + y + 'px)'); + return defineProperty({}, browserPrefixToKey('transform', browserPrefix), 'translate(' + x + 'px, ' + y + 'px) rotate(' + r + 'deg)'); } function createSVGTransform(_ref3) /*: string*/ { var x = _ref3.x, - y = _ref3.y; + y = _ref3.y, + r = _ref3.r; - return 'translate(' + x + ',' + y + ')'; + return 'translate(' + x + ', ' + y + ') rotate(' + r + ')'; } function getTouch(e /*: MouseTouchEvent*/, identifier /*: number*/) /*: ?{clientX: number, clientY: number}*/ { @@ -1863,6 +2109,7 @@ defaultClassNameDragged: string, defaultPosition: ControlPosition, position: ControlPosition, + rotate: number, scale: number };*/ @@ -2030,7 +2277,8 @@ x: canDragX(this) && draggable ? this.state.x : position.x, // Set top if vertical drag is enabled - y: canDragY(this) && draggable ? this.state.y : position.y + y: canDragY(this) && draggable ? this.state.y : position.y, + r: this.props.rotate ? this.props.rotate : 0 }; // If this element was SVG, we use the `transform` attribute. diff --git a/dist/react-draggable.js.map b/dist/react-draggable.js.map index e618c128..d8f34f45 100644 --- a/dist/react-draggable.js.map +++ b/dist/react-draggable.js.map @@ -1 +1 @@ -{"version":3,"file":"react-draggable.js","sources":["../node_modules/fbjs/lib/emptyFunction.js","../node_modules/fbjs/lib/invariant.js","../node_modules/fbjs/lib/warning.js","../node_modules/object-assign/index.js","../node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/prop-types/checkPropTypes.js","../node_modules/prop-types/factoryWithTypeCheckers.js","../node_modules/prop-types/index.js","../node_modules/classnames/index.js","../lib/utils/shims.js","../lib/utils/getPrefix.js","../lib/utils/domFns.js","../lib/utils/positionFns.js","../lib/utils/log.js","../lib/DraggableCore.js","../lib/Draggable.js","../lib/umd.js"],"sourcesContent":["\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== 'production') {\n var invariant = require('fbjs/lib/invariant');\n var warning = require('fbjs/lib/warning');\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (typeSpecs.hasOwnProperty(typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n 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);\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');\n }\n }\n }\n }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n warning(\n false,\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `%s` prop on `%s`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',\n propFullName,\n componentName\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunction.thatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (propValue.hasOwnProperty(key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n warning(\n false,\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received %s at index %s.',\n getPostfixForTypeWarning(checker),\n i\n );\n return emptyFunction.thatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from\n // props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/*!\n Copyright (c) 2016 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tclasses.push(classNames.apply(null, arg));\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","// @flow\n// @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc\nexport function findInArray(array: Array | TouchList, callback: Function): any {\n for (let i = 0, length = array.length; i < length; i++) {\n if (callback.apply(callback, [array[i], i, array])) return array[i];\n }\n}\n\nexport function isFunction(func: any): boolean {\n return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';\n}\n\nexport function isNum(num: any): boolean {\n return typeof num === 'number' && !isNaN(num);\n}\n\nexport function int(a: string): number {\n return parseInt(a, 10);\n}\n\nexport function dontSetMe(props: Object, propName: string, componentName: string) {\n if (props[propName]) {\n return new Error(`Invalid prop ${propName} passed to ${componentName} - do not set this, set it on the child.`);\n }\n}\n","// @flow\nconst prefixes = ['Moz', 'Webkit', 'O', 'ms'];\nexport function getPrefix(prop: string='transform'): string {\n // Checking specifically for 'window.document' is for pseudo-browser server-side\n // environments that define 'window' as the global context.\n // E.g. React-rails (see https://github.com/reactjs/react-rails/pull/84)\n if (typeof window === 'undefined' || typeof window.document === 'undefined') return '';\n\n const style = window.document.documentElement.style;\n\n if (prop in style) return '';\n\n for (let i = 0; i < prefixes.length; i++) {\n if (browserPrefixToKey(prop, prefixes[i]) in style) return prefixes[i];\n }\n\n return '';\n}\n\nexport function browserPrefixToKey(prop: string, prefix: string): string {\n return prefix ? `${prefix}${kebabToTitleCase(prop)}` : prop;\n}\n\nexport function browserPrefixToStyle(prop: string, prefix: string): string {\n return prefix ? `-${prefix.toLowerCase()}-${prop}` : prop;\n}\n\nfunction kebabToTitleCase(str: string): string {\n let out = '';\n let shouldCapitalize = true;\n for (let i = 0; i < str.length; i++) {\n if (shouldCapitalize) {\n out += str[i].toUpperCase();\n shouldCapitalize = false;\n } else if (str[i] === '-') {\n shouldCapitalize = true;\n } else {\n out += str[i];\n }\n }\n return out;\n}\n\n// Default export is the prefix itself, like 'Moz', 'Webkit', etc\n// Note that you may have to re-test for certain things; for instance, Chrome 50\n// can handle unprefixed `transform`, but not unprefixed `user-select`\nexport default getPrefix();\n","// @flow\nimport {findInArray, isFunction, int} from './shims';\nimport browserPrefix, {browserPrefixToKey} from './getPrefix';\n\nimport type {ControlPosition, MouseTouchEvent} from './types';\n\nlet matchesSelectorFunc = '';\nexport function matchesSelector(el: Node, selector: string): boolean {\n if (!matchesSelectorFunc) {\n matchesSelectorFunc = findInArray([\n 'matches',\n 'webkitMatchesSelector',\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'oMatchesSelector'\n ], function(method){\n // $FlowIgnore: Doesn't think elements are indexable\n return isFunction(el[method]);\n });\n }\n\n // Might not be found entirely (not an Element?) - in that case, bail\n // $FlowIgnore: Doesn't think elements are indexable\n if (!isFunction(el[matchesSelectorFunc])) return false;\n\n // $FlowIgnore: Doesn't think elements are indexable\n return el[matchesSelectorFunc](selector);\n}\n\n// Works up the tree to the draggable itself attempting to match selector.\nexport function matchesSelectorAndParentsTo(el: Node, selector: string, baseNode: Node): boolean {\n let node = el;\n do {\n if (matchesSelector(node, selector)) return true;\n if (node === baseNode) return false;\n node = node.parentNode;\n } while (node);\n\n return false;\n}\n\nexport function addEvent(el: ?Node, event: string, handler: Function): void {\n if (!el) { return; }\n if (el.attachEvent) {\n el.attachEvent('on' + event, handler);\n } else if (el.addEventListener) {\n el.addEventListener(event, handler, true);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = handler;\n }\n}\n\nexport function removeEvent(el: ?Node, event: string, handler: Function): void {\n if (!el) { return; }\n if (el.detachEvent) {\n el.detachEvent('on' + event, handler);\n } else if (el.removeEventListener) {\n el.removeEventListener(event, handler, true);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = null;\n }\n}\n\nexport function outerHeight(node: HTMLElement): number {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetTop which is including margin. See getBoundPosition\n let height = node.clientHeight;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n height += int(computedStyle.borderTopWidth);\n height += int(computedStyle.borderBottomWidth);\n return height;\n}\n\nexport function outerWidth(node: HTMLElement): number {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetLeft which is including margin. See getBoundPosition\n let width = node.clientWidth;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n width += int(computedStyle.borderLeftWidth);\n width += int(computedStyle.borderRightWidth);\n return width;\n}\nexport function innerHeight(node: HTMLElement): number {\n let height = node.clientHeight;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n height -= int(computedStyle.paddingTop);\n height -= int(computedStyle.paddingBottom);\n return height;\n}\n\nexport function innerWidth(node: HTMLElement): number {\n let width = node.clientWidth;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n width -= int(computedStyle.paddingLeft);\n width -= int(computedStyle.paddingRight);\n return width;\n}\n\n// Get from offsetParent\nexport function offsetXYFromParent(evt: {clientX: number, clientY: number}, offsetParent: HTMLElement): ControlPosition {\n const isBody = offsetParent === offsetParent.ownerDocument.body;\n const offsetParentRect = isBody ? {left: 0, top: 0} : offsetParent.getBoundingClientRect();\n\n const x = evt.clientX + offsetParent.scrollLeft - offsetParentRect.left;\n const y = evt.clientY + offsetParent.scrollTop - offsetParentRect.top;\n\n return {x, y};\n}\n\nexport function createCSSTransform({x, y}: {x: number, y: number}): Object {\n // Replace unitless items with px\n return {[browserPrefixToKey('transform', browserPrefix)]: 'translate(' + x + 'px,' + y + 'px)'};\n}\n\nexport function createSVGTransform({x, y}: {x: number, y: number}): string {\n return 'translate(' + x + ',' + y + ')';\n}\n\nexport function getTouch(e: MouseTouchEvent, identifier: number): ?{clientX: number, clientY: number} {\n return (e.targetTouches && findInArray(e.targetTouches, t => identifier === t.identifier)) ||\n (e.changedTouches && findInArray(e.changedTouches, t => identifier === t.identifier));\n}\n\nexport function getTouchIdentifier(e: MouseTouchEvent): ?number {\n if (e.targetTouches && e.targetTouches[0]) return e.targetTouches[0].identifier;\n if (e.changedTouches && e.changedTouches[0]) return e.changedTouches[0].identifier;\n}\n\n// User-select Hacks:\n//\n// Useful for preventing blue highlights all over everything when dragging.\n\n// Note we're passing `document` b/c we could be iframed\nexport function addUserSelectStyles(doc: ?Document) {\n if (!doc) return;\n let styleEl = doc.getElementById('react-draggable-style-el');\n if (!styleEl) {\n styleEl = doc.createElement('style');\n styleEl.type = 'text/css';\n styleEl.id = 'react-draggable-style-el';\n styleEl.innerHTML = '.react-draggable-transparent-selection *::-moz-selection {background: transparent;}\\n';\n styleEl.innerHTML += '.react-draggable-transparent-selection *::selection {background: transparent;}\\n';\n doc.getElementsByTagName('head')[0].appendChild(styleEl);\n }\n if (doc.body) addClassName(doc.body, 'react-draggable-transparent-selection');\n}\n\nexport function removeUserSelectStyles(doc: ?Document) {\n try {\n if (doc && doc.body) removeClassName(doc.body, 'react-draggable-transparent-selection');\n // $FlowIgnore: IE\n if (doc.selection) {\n // $FlowIgnore: IE\n doc.selection.empty();\n } else {\n window.getSelection().removeAllRanges(); // remove selection caused by scroll\n }\n } catch (e) {\n // probably IE\n }\n}\n\nexport function styleHacks(childStyle: Object = {}): Object {\n // Workaround IE pointer events; see #51\n // https://github.com/mzabriskie/react-draggable/issues/51#issuecomment-103488278\n return {\n touchAction: 'none',\n ...childStyle\n };\n}\n\nexport function addClassName(el: HTMLElement, className: string) {\n if (el.classList) {\n el.classList.add(className);\n } else {\n if (!el.className.match(new RegExp(`(?:^|\\\\s)${className}(?!\\\\S)`))) {\n el.className += ` ${className}`;\n }\n }\n}\n\nexport function removeClassName(el: HTMLElement, className: string) {\n if (el.classList) {\n el.classList.remove(className);\n } else {\n el.className = el.className.replace(new RegExp(`(?:^|\\\\s)${className}(?!\\\\S)`, 'g'), '');\n }\n}\n","// @flow\nimport {isNum, int} from './shims';\nimport ReactDOM from 'react-dom';\nimport {getTouch, innerWidth, innerHeight, offsetXYFromParent, outerWidth, outerHeight} from './domFns';\n\nimport type Draggable from '../Draggable';\nimport type {Bounds, ControlPosition, DraggableData, MouseTouchEvent} from './types';\nimport type DraggableCore from '../DraggableCore';\n\nexport function getBoundPosition(draggable: Draggable, x: number, y: number): [number, number] {\n // If no bounds, short-circuit and move on\n if (!draggable.props.bounds) return [x, y];\n\n // Clone new bounds\n let {bounds} = draggable.props;\n bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds);\n const node = findDOMNode(draggable);\n\n if (typeof bounds === 'string') {\n const {ownerDocument} = node;\n const ownerWindow = ownerDocument.defaultView;\n let boundNode;\n if (bounds === 'parent') {\n boundNode = node.parentNode;\n } else {\n boundNode = ownerDocument.querySelector(bounds);\n }\n if (!(boundNode instanceof ownerWindow.HTMLElement)) {\n throw new Error('Bounds selector \"' + bounds + '\" could not find an element.');\n }\n const nodeStyle = ownerWindow.getComputedStyle(node);\n const boundNodeStyle = ownerWindow.getComputedStyle(boundNode);\n // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n bounds = {\n left: -node.offsetLeft + int(boundNodeStyle.paddingLeft) + int(nodeStyle.marginLeft),\n top: -node.offsetTop + int(boundNodeStyle.paddingTop) + int(nodeStyle.marginTop),\n right: innerWidth(boundNode) - outerWidth(node) - node.offsetLeft +\n int(boundNodeStyle.paddingRight) - int(nodeStyle.marginRight),\n bottom: innerHeight(boundNode) - outerHeight(node) - node.offsetTop +\n int(boundNodeStyle.paddingBottom) - int(nodeStyle.marginBottom)\n };\n }\n\n // Keep x and y below right and bottom limits...\n if (isNum(bounds.right)) x = Math.min(x, bounds.right);\n if (isNum(bounds.bottom)) y = Math.min(y, bounds.bottom);\n\n // But above left and top limits.\n if (isNum(bounds.left)) x = Math.max(x, bounds.left);\n if (isNum(bounds.top)) y = Math.max(y, bounds.top);\n\n return [x, y];\n}\n\nexport function snapToGrid(grid: [number, number], pendingX: number, pendingY: number): [number, number] {\n const x = Math.round(pendingX / grid[0]) * grid[0];\n const y = Math.round(pendingY / grid[1]) * grid[1];\n return [x, y];\n}\n\nexport function canDragX(draggable: Draggable): boolean {\n return draggable.props.axis === 'both' || draggable.props.axis === 'x';\n}\n\nexport function canDragY(draggable: Draggable): boolean {\n return draggable.props.axis === 'both' || draggable.props.axis === 'y';\n}\n\n// Get {x, y} positions from event.\nexport function getControlPosition(e: MouseTouchEvent, touchIdentifier: ?number, draggableCore: DraggableCore): ?ControlPosition {\n const touchObj = typeof touchIdentifier === 'number' ? getTouch(e, touchIdentifier) : null;\n if (typeof touchIdentifier === 'number' && !touchObj) return null; // not the right touch\n const node = findDOMNode(draggableCore);\n // User can provide an offsetParent if desired.\n const offsetParent = draggableCore.props.offsetParent || node.offsetParent || node.ownerDocument.body;\n return offsetXYFromParent(touchObj || e, offsetParent);\n}\n\n// Create an data object exposed by 's events\nexport function createCoreData(draggable: DraggableCore, x: number, y: number): DraggableData {\n const state = draggable.state;\n const isStart = !isNum(state.lastX);\n const node = findDOMNode(draggable);\n\n if (isStart) {\n // If this is our first move, use the x and y as last coords.\n return {\n node,\n deltaX: 0, deltaY: 0,\n lastX: x, lastY: y,\n x, y,\n };\n } else {\n // Otherwise calculate proper values.\n return {\n node,\n deltaX: x - state.lastX, deltaY: y - state.lastY,\n lastX: state.lastX, lastY: state.lastY,\n x, y,\n };\n }\n}\n\n// Create an data exposed by 's events\nexport function createDraggableData(draggable: Draggable, coreData: DraggableData): DraggableData {\n const scale = draggable.props.scale;\n return {\n node: coreData.node,\n x: draggable.state.x + (coreData.deltaX / scale),\n y: draggable.state.y + (coreData.deltaY / scale),\n deltaX: (coreData.deltaX / scale),\n deltaY: (coreData.deltaY / scale),\n lastX: draggable.state.x,\n lastY: draggable.state.y\n };\n}\n\n// A lot faster than stringify/parse\nfunction cloneBounds(bounds: Bounds): Bounds {\n return {\n left: bounds.left,\n top: bounds.top,\n right: bounds.right,\n bottom: bounds.bottom\n };\n}\n\nfunction findDOMNode(draggable: Draggable | DraggableCore): HTMLElement {\n const node = ReactDOM.findDOMNode(draggable);\n if (!node) {\n throw new Error(': Unmounted during event!');\n }\n // $FlowIgnore we can't assert on HTMLElement due to tests... FIXME\n return node;\n}\n","// @flow\n/*eslint no-console:0*/\nexport default function log(...args: any) {\n if (process.env.DRAGGABLE_DEBUG) console.log(...args);\n}\n","// @flow\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport {matchesSelectorAndParentsTo, addEvent, removeEvent, addUserSelectStyles, getTouchIdentifier,\n removeUserSelectStyles, styleHacks} from './utils/domFns';\nimport {createCoreData, getControlPosition, snapToGrid} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport log from './utils/log';\n\nimport type {EventHandler, MouseTouchEvent} from './utils/types';\nimport type {Element as ReactElement} from 'react';\n\n// Simple abstraction for dragging events names.\nconst eventsFor = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n stop: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n stop: 'mouseup'\n }\n};\n\n// Default to mouse events.\nlet dragEventFor = eventsFor.mouse;\n\ntype DraggableCoreState = {\n dragging: boolean,\n lastX: number,\n lastY: number,\n touchIdentifier: ?number\n};\n\nexport type DraggableBounds = {\n left: number,\n right: number,\n top: number,\n bottom: number,\n};\n\nexport type DraggableData = {\n node: HTMLElement,\n x: number, y: number,\n deltaX: number, deltaY: number,\n lastX: number, lastY: number,\n};\n\nexport type DraggableEventHandler = (e: MouseEvent, data: DraggableData) => void;\n\nexport type ControlPosition = {x: number, y: number};\n\nexport type DraggableCoreProps = {\n allowAnyClick: boolean,\n cancel: string,\n children: ReactElement,\n disabled: boolean,\n enableUserSelectHack: boolean,\n offsetParent: HTMLElement,\n grid: [number, number],\n handle: string,\n onStart: DraggableEventHandler,\n onDrag: DraggableEventHandler,\n onStop: DraggableEventHandler,\n onMouseDown: (e: MouseEvent) => void,\n};\n\n//\n// Define .\n//\n// is for advanced usage of . It maintains minimal internal state so it can\n// work well with libraries that require more control over the element.\n//\n\nexport default class DraggableCore extends React.Component {\n\n static displayName = 'DraggableCore';\n\n static propTypes = {\n /**\n * `allowAnyClick` allows dragging using any mouse button.\n * By default, we only accept the left button.\n *\n * Defaults to `false`.\n */\n allowAnyClick: PropTypes.bool,\n\n /**\n * `disabled`, if true, stops the from dragging. All handlers,\n * with the exception of `onMouseDown`, will not fire.\n */\n disabled: PropTypes.bool,\n\n /**\n * By default, we add 'user-select:none' attributes to the document body\n * to prevent ugly text selection during drag. If this is causing problems\n * for your app, set this to `false`.\n */\n enableUserSelectHack: PropTypes.bool,\n\n /**\n * `offsetParent`, if set, uses the passed DOM node to compute drag offsets\n * instead of using the parent node.\n */\n offsetParent: function(props: DraggableCoreProps, propName: $Keys) {\n if (props[propName] && props[propName].nodeType !== 1) {\n throw new Error('Draggable\\'s offsetParent must be a DOM Node.');\n }\n },\n\n /**\n * `grid` specifies the x and y that dragging should snap to.\n */\n grid: PropTypes.arrayOf(PropTypes.number),\n \n /**\n * `scale` specifies the scale of the area you are dragging inside of. It allows\n * the drag deltas to scale correctly with how far zoomed in/out you are.\n */\n scale: PropTypes.number,\n\n /**\n * `handle` specifies a selector to be used as the handle that initiates drag.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
\n *
Click me to drag
\n *
This is some other content
\n *
\n *
\n * );\n * }\n * });\n * ```\n */\n handle: PropTypes.string,\n\n /**\n * `cancel` specifies a selector to be used to prevent drag initialization.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return(\n * \n *
\n *
You can't drag from here
\n *
Dragging here works fine
\n *
\n *
\n * );\n * }\n * });\n * ```\n */\n cancel: PropTypes.string,\n\n /**\n * Called when dragging starts.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onStart: PropTypes.func,\n\n /**\n * Called while dragging.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onDrag: PropTypes.func,\n\n /**\n * Called when dragging stops.\n * If this function returns the boolean false, the drag will remain active.\n */\n onStop: PropTypes.func,\n\n /**\n * A workaround option which can be passed if onMouseDown needs to be accessed,\n * since it'll always be blocked (as there is internal use of onMouseDown)\n */\n onMouseDown: PropTypes.func,\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n };\n\n static defaultProps = {\n allowAnyClick: false, // by default only accept left click\n cancel: null,\n disabled: false,\n enableUserSelectHack: true,\n offsetParent: null,\n handle: null,\n grid: null,\n transform: null,\n onStart: function(){},\n onDrag: function(){},\n onStop: function(){},\n onMouseDown: function(){}\n };\n\n state = {\n dragging: false,\n // Used while dragging to determine deltas.\n lastX: NaN, lastY: NaN,\n touchIdentifier: null\n };\n\n componentWillUnmount() {\n // Remove any leftover event handlers. Remove both touch and mouse handlers in case\n // some browser quirk caused a touch event to fire during a mouse move, or vice versa.\n const thisNode = ReactDOM.findDOMNode(this);\n if (thisNode) {\n const {ownerDocument} = thisNode;\n removeEvent(ownerDocument, eventsFor.mouse.move, this.handleDrag);\n removeEvent(ownerDocument, eventsFor.touch.move, this.handleDrag);\n removeEvent(ownerDocument, eventsFor.mouse.stop, this.handleDragStop);\n removeEvent(ownerDocument, eventsFor.touch.stop, this.handleDragStop);\n if (this.props.enableUserSelectHack) removeUserSelectStyles(ownerDocument);\n }\n }\n\n handleDragStart: EventHandler = (e) => {\n // Make it possible to attach event handlers on top of this one.\n this.props.onMouseDown(e);\n\n // Only accept left-clicks.\n if (!this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false;\n\n // Get nodes. Be sure to grab relative document (could be iframed)\n const thisNode = ReactDOM.findDOMNode(this);\n if (!thisNode || !thisNode.ownerDocument || !thisNode.ownerDocument.body) {\n throw new Error(' not mounted on DragStart!');\n }\n const {ownerDocument} = thisNode;\n\n // Short circuit if handle or cancel prop was provided and selector doesn't match.\n if (this.props.disabled ||\n (!(e.target instanceof ownerDocument.defaultView.Node)) ||\n (this.props.handle && !matchesSelectorAndParentsTo(e.target, this.props.handle, thisNode)) ||\n (this.props.cancel && matchesSelectorAndParentsTo(e.target, this.props.cancel, thisNode))) {\n return;\n }\n\n // Set touch identifier in component state if this is a touch event. This allows us to\n // distinguish between individual touches on multitouch screens by identifying which\n // touchpoint was set to this element.\n const touchIdentifier = getTouchIdentifier(e);\n this.setState({touchIdentifier});\n\n // Get the current drag point from the event. This is used as the offset.\n const position = getControlPosition(e, touchIdentifier, this);\n if (position == null) return; // not possible but satisfies flow\n const {x, y} = position;\n\n // Create an event object with all the data parents need to make a decision here.\n const coreEvent = createCoreData(this, x, y);\n\n log('DraggableCore: handleDragStart: %j', coreEvent);\n\n // Call event handler. If it returns explicit false, cancel.\n log('calling', this.props.onStart);\n const shouldUpdate = this.props.onStart(e, coreEvent);\n if (shouldUpdate === false) return;\n\n // Add a style to the body to disable user-select. This prevents text from\n // being selected all over the page.\n if (this.props.enableUserSelectHack) addUserSelectStyles(ownerDocument);\n\n // Initiate dragging. Set the current x and y as offsets\n // so we know how much we've moved during the drag. This allows us\n // to drag elements around even if they have been moved, without issue.\n this.setState({\n dragging: true,\n\n lastX: x,\n lastY: y\n });\n\n // Add events to the document directly so we catch when the user's mouse/touch moves outside of\n // this element. We use different events depending on whether or not we have detected that this\n // is a touch-capable device.\n addEvent(ownerDocument, dragEventFor.move, this.handleDrag);\n addEvent(ownerDocument, dragEventFor.stop, this.handleDragStop);\n };\n\n handleDrag: EventHandler = (e) => {\n\n // Prevent scrolling on mobile devices, like ipad/iphone.\n if (e.type === 'touchmove') e.preventDefault();\n\n // Get the current drag point from the event. This is used as the offset.\n const position = getControlPosition(e, this.state.touchIdentifier, this);\n if (position == null) return;\n let {x, y} = position;\n\n // Snap to grid if prop has been provided\n if (Array.isArray(this.props.grid)) {\n let deltaX = x - this.state.lastX, deltaY = y - this.state.lastY;\n [deltaX, deltaY] = snapToGrid(this.props.grid, deltaX, deltaY);\n if (!deltaX && !deltaY) return; // skip useless drag\n x = this.state.lastX + deltaX, y = this.state.lastY + deltaY;\n }\n\n const coreEvent = createCoreData(this, x, y);\n\n log('DraggableCore: handleDrag: %j', coreEvent);\n\n // Call event handler. If it returns explicit false, trigger end.\n const shouldUpdate = this.props.onDrag(e, coreEvent);\n if (shouldUpdate === false) {\n try {\n // $FlowIgnore\n this.handleDragStop(new MouseEvent('mouseup'));\n } catch (err) {\n // Old browsers\n const event = ((document.createEvent('MouseEvents'): any): MouseTouchEvent);\n // I see why this insanity was deprecated\n // $FlowIgnore\n event.initMouseEvent('mouseup', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);\n this.handleDragStop(event);\n }\n return;\n }\n\n this.setState({\n lastX: x,\n lastY: y\n });\n };\n\n handleDragStop: EventHandler = (e) => {\n if (!this.state.dragging) return;\n\n const position = getControlPosition(e, this.state.touchIdentifier, this);\n if (position == null) return;\n const {x, y} = position;\n const coreEvent = createCoreData(this, x, y);\n\n const thisNode = ReactDOM.findDOMNode(this);\n if (thisNode) {\n // Remove user-select hack\n if (this.props.enableUserSelectHack) removeUserSelectStyles(thisNode.ownerDocument);\n }\n\n log('DraggableCore: handleDragStop: %j', coreEvent);\n\n // Reset the el.\n this.setState({\n dragging: false,\n lastX: NaN,\n lastY: NaN\n });\n\n // Call event handler\n this.props.onStop(e, coreEvent);\n\n if (thisNode) {\n // Remove event handlers\n log('DraggableCore: Removing handlers');\n removeEvent(thisNode.ownerDocument, dragEventFor.move, this.handleDrag);\n removeEvent(thisNode.ownerDocument, dragEventFor.stop, this.handleDragStop);\n }\n };\n\n onMouseDown: EventHandler = (e) => {\n dragEventFor = eventsFor.mouse; // on touchscreen laptops we could switch back to mouse\n\n return this.handleDragStart(e);\n };\n\n onMouseUp: EventHandler = (e) => {\n dragEventFor = eventsFor.mouse;\n\n return this.handleDragStop(e);\n };\n\n // Same as onMouseDown (start drag), but now consider this a touch device.\n onTouchStart: EventHandler = (e) => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStart(e);\n };\n\n onTouchEnd: EventHandler = (e) => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStop(e);\n };\n\n render() {\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return React.cloneElement(React.Children.only(this.props.children), {\n style: styleHacks(this.props.children.props.style),\n\n // Note: mouseMove handler is attached to document so it will still function\n // when the user drags quickly and leaves the bounds of the element.\n onMouseDown: this.onMouseDown,\n onTouchStart: this.onTouchStart,\n onMouseUp: this.onMouseUp,\n onTouchEnd: this.onTouchEnd\n });\n }\n}\n","// @flow\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport classNames from 'classnames';\nimport {createCSSTransform, createSVGTransform} from './utils/domFns';\nimport {canDragX, canDragY, createDraggableData, getBoundPosition} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport DraggableCore from './DraggableCore';\nimport type {ControlPosition, DraggableBounds, DraggableCoreProps} from './DraggableCore';\nimport log from './utils/log';\nimport type {DraggableEventHandler} from './utils/types';\nimport type {Element as ReactElement} from 'react';\n\ntype DraggableState = {\n dragging: boolean,\n dragged: boolean,\n x: number, y: number,\n slackX: number, slackY: number,\n isElementSVG: boolean\n};\n\nexport type DraggableProps = {\n ...$Exact,\n axis: 'both' | 'x' | 'y' | 'none',\n bounds: DraggableBounds | string | false,\n defaultClassName: string,\n defaultClassNameDragging: string,\n defaultClassNameDragged: string,\n defaultPosition: ControlPosition,\n position: ControlPosition,\n scale: number\n};\n\n//\n// Define \n//\n\nexport default class Draggable extends React.Component {\n\n static displayName = 'Draggable';\n\n static propTypes = {\n // Accepts all props accepts.\n ...DraggableCore.propTypes,\n\n /**\n * `axis` determines which axis the draggable can move.\n *\n * Note that all callbacks will still return data as normal. This only\n * controls flushing to the DOM.\n *\n * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n * 'none' limits all movement.\n *\n * Defaults to 'both'.\n */\n axis: PropTypes.oneOf(['both', 'x', 'y', 'none']),\n\n /**\n * `bounds` determines the range of movement available to the element.\n * Available values are:\n *\n * 'parent' restricts movement within the Draggable's parent node.\n *\n * Alternatively, pass an object with the following properties, all of which are optional:\n *\n * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}\n *\n * All values are in px.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
Content
\n *
\n * );\n * }\n * });\n * ```\n */\n bounds: PropTypes.oneOfType([\n PropTypes.shape({\n left: PropTypes.number,\n right: PropTypes.number,\n top: PropTypes.number,\n bottom: PropTypes.number\n }),\n PropTypes.string,\n PropTypes.oneOf([false])\n ]),\n\n defaultClassName: PropTypes.string,\n defaultClassNameDragging: PropTypes.string,\n defaultClassNameDragged: PropTypes.string,\n\n /**\n * `defaultPosition` specifies the x and y that the dragged item should start at\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I start with transformX: 25px and transformY: 25px;
\n *
\n * );\n * }\n * });\n * ```\n */\n defaultPosition: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n\n /**\n * `position`, if present, defines the current position of the element.\n *\n * This is similar to how form elements in React work - if no `position` is supplied, the component\n * is uncontrolled.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I start with transformX: 25px and transformY: 25px;
\n *
\n * );\n * }\n * });\n * ```\n */\n position: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n };\n\n static defaultProps = {\n ...DraggableCore.defaultProps,\n axis: 'both',\n bounds: false,\n defaultClassName: 'react-draggable',\n defaultClassNameDragging: 'react-draggable-dragging',\n defaultClassNameDragged: 'react-draggable-dragged',\n defaultPosition: {x: 0, y: 0},\n position: null,\n scale: 1\n };\n\n constructor(props: DraggableProps) {\n super(props);\n\n this.state = {\n // Whether or not we are currently dragging.\n dragging: false,\n\n // Whether or not we have been dragged before.\n dragged: false,\n\n // Current transform x and y.\n x: props.position ? props.position.x : props.defaultPosition.x,\n y: props.position ? props.position.y : props.defaultPosition.y,\n\n // Used for compensating for out-of-bounds drags\n slackX: 0, slackY: 0,\n\n // Can only determine if SVG after mounting\n isElementSVG: false\n };\n }\n\n componentWillMount() {\n if (this.props.position && !(this.props.onDrag || this.props.onStop)) {\n // eslint-disable-next-line\n console.warn('A `position` was applied to this , without drag handlers. This will make this ' +\n 'component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the ' +\n '`position` of this element.');\n }\n }\n\n componentDidMount() {\n // Check to see if the element passed is an instanceof SVGElement\n if(typeof window.SVGElement !== 'undefined' && ReactDOM.findDOMNode(this) instanceof window.SVGElement) {\n this.setState({ isElementSVG: true });\n }\n }\n\n componentWillReceiveProps(nextProps: Object) {\n // Set x/y if position has changed\n if (nextProps.position &&\n (!this.props.position ||\n nextProps.position.x !== this.props.position.x ||\n nextProps.position.y !== this.props.position.y\n )\n ) {\n this.setState({ x: nextProps.position.x, y: nextProps.position.y });\n }\n }\n\n componentWillUnmount() {\n this.setState({dragging: false}); // prevents invariant if unmounted while dragging\n }\n\n onDragStart: DraggableEventHandler = (e, coreData) => {\n log('Draggable: onDragStart: %j', coreData);\n\n // Short-circuit if user's callback killed it.\n const shouldStart = this.props.onStart(e, createDraggableData(this, coreData));\n // Kills start event on core as well, so move handlers are never bound.\n if (shouldStart === false) return false;\n\n this.setState({dragging: true, dragged: true});\n };\n\n onDrag: DraggableEventHandler = (e, coreData) => {\n if (!this.state.dragging) return false;\n log('Draggable: onDrag: %j', coreData);\n\n const uiData = createDraggableData(this, coreData);\n\n const newState: $Shape = {\n x: uiData.x,\n y: uiData.y\n };\n\n // Keep within bounds.\n if (this.props.bounds) {\n // Save original x and y.\n const {x, y} = newState;\n\n // Add slack to the values used to calculate bound position. This will ensure that if\n // we start removing slack, the element won't react to it right away until it's been\n // completely removed.\n newState.x += this.state.slackX;\n newState.y += this.state.slackY;\n\n // Get bound position. This will ceil/floor the x and y within the boundaries.\n const [newStateX, newStateY] = getBoundPosition(this, newState.x, newState.y);\n newState.x = newStateX;\n newState.y = newStateY;\n\n // Recalculate slack by noting how much was shaved by the boundPosition handler.\n newState.slackX = this.state.slackX + (x - newState.x);\n newState.slackY = this.state.slackY + (y - newState.y);\n\n // Update the event we fire to reflect what really happened after bounds took effect.\n uiData.x = newState.x;\n uiData.y = newState.y;\n uiData.deltaX = newState.x - this.state.x;\n uiData.deltaY = newState.y - this.state.y;\n }\n\n // Short-circuit if user's callback killed it.\n const shouldUpdate = this.props.onDrag(e, uiData);\n if (shouldUpdate === false) return false;\n\n this.setState(newState);\n };\n\n onDragStop: DraggableEventHandler = (e, coreData) => {\n if (!this.state.dragging) return false;\n\n // Short-circuit if user's callback killed it.\n const shouldStop = this.props.onStop(e, createDraggableData(this, coreData));\n if (shouldStop === false) return false;\n\n log('Draggable: onDragStop: %j', coreData);\n\n const newState: $Shape = {\n dragging: false,\n slackX: 0,\n slackY: 0\n };\n\n // If this is a controlled component, the result of this operation will be to\n // revert back to the old position. We expect a handler on `onDragStop`, at the least.\n const controlled = Boolean(this.props.position);\n if (controlled) {\n const {x, y} = this.props.position;\n newState.x = x;\n newState.y = y;\n }\n\n this.setState(newState);\n };\n\n render(): ReactElement {\n let style = {}, svgTransform = null;\n\n // If this is controlled, we don't want to move it - unless it's dragging.\n const controlled = Boolean(this.props.position);\n const draggable = !controlled || this.state.dragging;\n\n const position = this.props.position || this.props.defaultPosition;\n const transformOpts = {\n // Set left if horizontal drag is enabled\n x: canDragX(this) && draggable ?\n this.state.x :\n position.x,\n\n // Set top if vertical drag is enabled\n y: canDragY(this) && draggable ?\n this.state.y :\n position.y\n };\n\n // If this element was SVG, we use the `transform` attribute.\n if (this.state.isElementSVG) {\n svgTransform = createSVGTransform(transformOpts);\n } else {\n // Add a CSS transform to move the element around. This allows us to move the element around\n // without worrying about whether or not it is relatively or absolutely positioned.\n // If the item you are dragging already has a transform set, wrap it in a so \n // has a clean slate.\n style = createCSSTransform(transformOpts);\n }\n\n const {\n defaultClassName,\n defaultClassNameDragging,\n defaultClassNameDragged\n } = this.props;\n\n const children = React.Children.only(this.props.children);\n\n // Mark with class while dragging\n const className = classNames((children.props.className || ''), defaultClassName, {\n [defaultClassNameDragging]: this.state.dragging,\n [defaultClassNameDragged]: this.state.dragged\n });\n\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return (\n \n {React.cloneElement(children, {\n className: className,\n style: {...children.props.style, ...style},\n transform: svgTransform\n })}\n \n );\n }\n}\n","import Draggable from './Draggable';\nimport DraggableCore from './DraggableCore';\n\n// Previous versions of this lib exported as the root export. As to not break\n// them, or TypeScript, we export *both* as the root and as 'default'.\n// See https://github.com/mzabriskie/react-draggable/pull/254\n// and https://github.com/mzabriskie/react-draggable/issues/266\nDraggable.default = Draggable;\nDraggable.DraggableCore = DraggableCore;\n\nexport default Draggable;\n"],"names":["emptyFunction","invariant","require$$0","warning","require$$1","ReactPropTypesSecret","require$$2","assign","checkPropTypes","define","findInArray","array","callback","i","length","apply","isFunction","func","Object","prototype","toString","call","isNum","num","isNaN","int","a","parseInt","dontSetMe","props","propName","componentName","Error","prefixes","getPrefix","prop","window","document","style","documentElement","browserPrefixToKey","prefix","kebabToTitleCase","str","out","shouldCapitalize","toUpperCase","matchesSelectorFunc","matchesSelector","el","selector","method","matchesSelectorAndParentsTo","baseNode","node","parentNode","addEvent","event","handler","attachEvent","addEventListener","removeEvent","detachEvent","removeEventListener","outerHeight","height","clientHeight","computedStyle","ownerDocument","defaultView","getComputedStyle","borderTopWidth","borderBottomWidth","outerWidth","width","clientWidth","borderLeftWidth","borderRightWidth","innerHeight","paddingTop","paddingBottom","innerWidth","paddingLeft","paddingRight","offsetXYFromParent","evt","offsetParent","isBody","body","offsetParentRect","left","top","getBoundingClientRect","x","clientX","scrollLeft","y","clientY","scrollTop","createCSSTransform","browserPrefix","createSVGTransform","getTouch","e","identifier","targetTouches","t","changedTouches","getTouchIdentifier","addUserSelectStyles","doc","styleEl","getElementById","createElement","type","id","innerHTML","getElementsByTagName","appendChild","addClassName","removeUserSelectStyles","removeClassName","selection","empty","getSelection","removeAllRanges","styleHacks","childStyle","touchAction","className","classList","add","match","RegExp","remove","replace","getBoundPosition","draggable","bounds","cloneBounds","findDOMNode","ownerWindow","boundNode","querySelector","HTMLElement","nodeStyle","boundNodeStyle","offsetLeft","marginLeft","offsetTop","marginTop","right","marginRight","bottom","marginBottom","Math","min","max","snapToGrid","grid","pendingX","pendingY","round","canDragX","axis","canDragY","getControlPosition","touchIdentifier","draggableCore","touchObj","createCoreData","state","isStart","lastX","deltaX","deltaY","lastY","createDraggableData","coreData","scale","ReactDOM","log","eventsFor","touch","start","move","stop","mouse","dragEventFor","DraggableCore","dragging","NaN","handleDragStart","onMouseDown","allowAnyClick","button","thisNode","disabled","target","Node","handle","cancel","setState","position","coreEvent","onStart","shouldUpdate","enableUserSelectHack","handleDrag","handleDragStop","preventDefault","Array","isArray","onDrag","MouseEvent","err","createEvent","initMouseEvent","onStop","onMouseUp","onTouchStart","onTouchEnd","React","cloneElement","Children","only","children","Component","displayName","propTypes","PropTypes","bool","nodeType","arrayOf","number","string","transform","defaultProps","Draggable","onDragStart","shouldStart","dragged","uiData","newState","slackX","slackY","newStateX","newStateY","onDragStop","shouldStop","controlled","Boolean","defaultPosition","isElementSVG","console","warn","SVGElement","nextProps","svgTransform","transformOpts","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","classNames","oneOf","oneOfType","shape","default"],"mappings":";;;;;;;;;;;;;;;;;;;;;;CAWA,SAAS,iBAAiB,CAAC,GAAG,EAAE;GAC9B,OAAO,YAAY;KACjB,OAAO,GAAG,CAAC;IACZ,CAAC;EACH;;;;;;;CAOD,IAAI,aAAa,GAAG,SAAS,aAAa,GAAG,EAAE,CAAC;;CAEhD,aAAa,CAAC,WAAW,GAAG,iBAAiB,CAAC;CAC9C,aAAa,CAAC,gBAAgB,GAAG,iBAAiB,CAAC,KAAK,C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;;;;;CAoBA/B,YAAU2B,UAAUoC,KAAV,CAAgB;CACxB7K,OAAGyI,UAAUI,MADW;CAExB1I,OAAGsI,UAAUI;CAFW,GAAhB;;CAKV;;;CAGAzG,aAAWrG;CACXU,SAAOV;CACPgN,aAAWhN;;CApHMkN,UAuHZD,4BACFhD,cAAcgD;CACjBzE,QAAM;CACN1B,UAAQ;CACR0H,oBAAkB;CAClBC,4BAA0B;CAC1BC,2BAAyB;CACzBV,mBAAiB,EAAC/J,GAAG,CAAJ,EAAOG,GAAG,CAAV;CACjB2G,YAAU;CACVxB,SAAO;;;CCnKX;CACA;CACA;CACA;CACA2D,UAAU6B,OAAV,GAAoB7B,SAApB;CACAA,UAAUjD,aAAV,GAA0BA,aAA1B;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"react-draggable.js","sources":["../node_modules/react-is/cjs/react-is.production.min.js","../node_modules/react-is/cjs/react-is.development.js","../node_modules/react-is/index.js","../node_modules/object-assign/index.js","../node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/prop-types/checkPropTypes.js","../node_modules/prop-types/factoryWithTypeCheckers.js","../node_modules/prop-types/index.js","../node_modules/classnames/index.js","../lib/utils/shims.js","../lib/utils/getPrefix.js","../lib/utils/domFns.js","../lib/utils/positionFns.js","../lib/utils/log.js","../lib/DraggableCore.js","../lib/Draggable.js","../lib/umd.js"],"sourcesContent":["/** @license React v16.8.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';Object.defineProperty(exports,\"__esModule\",{value:!0});\nvar b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?Symbol.for(\"react.memo\"):\n60115,r=b?Symbol.for(\"react.lazy\"):60116;function t(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case h:return a;default:return u}}case r:case q:case d:return u}}}function v(a){return t(a)===m}exports.typeOf=t;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;\nexports.Fragment=e;exports.Lazy=r;exports.Memo=q;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||\"object\"===typeof a&&null!==a&&(a.$$typeof===r||a.$$typeof===q||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n)};exports.isAsyncMode=function(a){return v(a)||t(a)===l};exports.isConcurrentMode=v;exports.isContextConsumer=function(a){return t(a)===k};\nexports.isContextProvider=function(a){return t(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return t(a)===n};exports.isFragment=function(a){return t(a)===e};exports.isLazy=function(a){return t(a)===r};exports.isMemo=function(a){return t(a)===q};exports.isPortal=function(a){return t(a)===d};exports.isProfiler=function(a){return t(a)===g};exports.isStrictMode=function(a){return t(a)===f};\nexports.isSuspense=function(a){return t(a)===p};\n","/** @license React v16.8.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\n\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' ||\n // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);\n}\n\n/**\n * Forked from fbjs/warning:\n * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js\n *\n * Only change is we use console.warn instead of console.error,\n * and do nothing when 'console' is not supported.\n * This really simplifies the code.\n * ---\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar lowPriorityWarning = function () {};\n\n{\n var printWarning = function (format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.warn(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n lowPriorityWarning = function (condition, format) {\n if (format === undefined) {\n throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\nvar lowPriorityWarning$1 = lowPriorityWarning;\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n default:\n return $$typeof;\n }\n }\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n}\n\n// AsyncMode is deprecated along with isAsyncMode\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\n\nvar hasWarnedAboutDeprecatedIsAsyncMode = false;\n\n// AsyncMode should be deprecated\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.typeOf = typeOf;\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isValidElementType = isValidElementType;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = Function.call.bind(Object.prototype.hasOwnProperty);\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar has = Function.call.bind(Object.prototype.hasOwnProperty);\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n if (getPropType(value) === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from\n // props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","// @flow\n// @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc\nexport function findInArray(array: Array | TouchList, callback: Function): any {\n for (let i = 0, length = array.length; i < length; i++) {\n if (callback.apply(callback, [array[i], i, array])) return array[i];\n }\n}\n\nexport function isFunction(func: any): boolean {\n return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';\n}\n\nexport function isNum(num: any): boolean {\n return typeof num === 'number' && !isNaN(num);\n}\n\nexport function int(a: string): number {\n return parseInt(a, 10);\n}\n\nexport function dontSetMe(props: Object, propName: string, componentName: string) {\n if (props[propName]) {\n return new Error(`Invalid prop ${propName} passed to ${componentName} - do not set this, set it on the child.`);\n }\n}\n","// @flow\nconst prefixes = ['Moz', 'Webkit', 'O', 'ms'];\nexport function getPrefix(prop: string='transform'): string {\n // Checking specifically for 'window.document' is for pseudo-browser server-side\n // environments that define 'window' as the global context.\n // E.g. React-rails (see https://github.com/reactjs/react-rails/pull/84)\n if (typeof window === 'undefined' || typeof window.document === 'undefined') return '';\n\n const style = window.document.documentElement.style;\n\n if (prop in style) return '';\n\n for (let i = 0; i < prefixes.length; i++) {\n if (browserPrefixToKey(prop, prefixes[i]) in style) return prefixes[i];\n }\n\n return '';\n}\n\nexport function browserPrefixToKey(prop: string, prefix: string): string {\n return prefix ? `${prefix}${kebabToTitleCase(prop)}` : prop;\n}\n\nexport function browserPrefixToStyle(prop: string, prefix: string): string {\n return prefix ? `-${prefix.toLowerCase()}-${prop}` : prop;\n}\n\nfunction kebabToTitleCase(str: string): string {\n let out = '';\n let shouldCapitalize = true;\n for (let i = 0; i < str.length; i++) {\n if (shouldCapitalize) {\n out += str[i].toUpperCase();\n shouldCapitalize = false;\n } else if (str[i] === '-') {\n shouldCapitalize = true;\n } else {\n out += str[i];\n }\n }\n return out;\n}\n\n// Default export is the prefix itself, like 'Moz', 'Webkit', etc\n// Note that you may have to re-test for certain things; for instance, Chrome 50\n// can handle unprefixed `transform`, but not unprefixed `user-select`\nexport default getPrefix();\n","// @flow\nimport {findInArray, isFunction, int} from './shims';\nimport browserPrefix, {browserPrefixToKey} from './getPrefix';\n\nimport type {ControlPosition, MouseTouchEvent} from './types';\n\nlet matchesSelectorFunc = '';\nexport function matchesSelector(el: Node, selector: string): boolean {\n if (!matchesSelectorFunc) {\n matchesSelectorFunc = findInArray([\n 'matches',\n 'webkitMatchesSelector',\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'oMatchesSelector'\n ], function(method){\n // $FlowIgnore: Doesn't think elements are indexable\n return isFunction(el[method]);\n });\n }\n\n // Might not be found entirely (not an Element?) - in that case, bail\n // $FlowIgnore: Doesn't think elements are indexable\n if (!isFunction(el[matchesSelectorFunc])) return false;\n\n // $FlowIgnore: Doesn't think elements are indexable\n return el[matchesSelectorFunc](selector);\n}\n\n// Works up the tree to the draggable itself attempting to match selector.\nexport function matchesSelectorAndParentsTo(el: Node, selector: string, baseNode: Node): boolean {\n let node = el;\n do {\n if (matchesSelector(node, selector)) return true;\n if (node === baseNode) return false;\n node = node.parentNode;\n } while (node);\n\n return false;\n}\n\nexport function addEvent(el: ?Node, event: string, handler: Function): void {\n if (!el) { return; }\n if (el.attachEvent) {\n el.attachEvent('on' + event, handler);\n } else if (el.addEventListener) {\n el.addEventListener(event, handler, true);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = handler;\n }\n}\n\nexport function removeEvent(el: ?Node, event: string, handler: Function): void {\n if (!el) { return; }\n if (el.detachEvent) {\n el.detachEvent('on' + event, handler);\n } else if (el.removeEventListener) {\n el.removeEventListener(event, handler, true);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = null;\n }\n}\n\nexport function outerHeight(node: HTMLElement): number {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetTop which is including margin. See getBoundPosition\n let height = node.clientHeight;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n height += int(computedStyle.borderTopWidth);\n height += int(computedStyle.borderBottomWidth);\n return height;\n}\n\nexport function outerWidth(node: HTMLElement): number {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetLeft which is including margin. See getBoundPosition\n let width = node.clientWidth;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n width += int(computedStyle.borderLeftWidth);\n width += int(computedStyle.borderRightWidth);\n return width;\n}\nexport function innerHeight(node: HTMLElement): number {\n let height = node.clientHeight;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n height -= int(computedStyle.paddingTop);\n height -= int(computedStyle.paddingBottom);\n return height;\n}\n\nexport function innerWidth(node: HTMLElement): number {\n let width = node.clientWidth;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n width -= int(computedStyle.paddingLeft);\n width -= int(computedStyle.paddingRight);\n return width;\n}\n\n// Get from offsetParent\nexport function offsetXYFromParent(evt: {clientX: number, clientY: number}, offsetParent: HTMLElement): ControlPosition {\n const isBody = offsetParent === offsetParent.ownerDocument.body;\n const offsetParentRect = isBody ? {left: 0, top: 0} : offsetParent.getBoundingClientRect();\n\n const x = evt.clientX + offsetParent.scrollLeft - offsetParentRect.left;\n const y = evt.clientY + offsetParent.scrollTop - offsetParentRect.top;\n\n return {x, y};\n}\n\nexport function createCSSTransform({x, y, r}: {x: number, y: number, r: number}): Object {\n // Replace unitless items with px\n return {[browserPrefixToKey('transform', browserPrefix)]: `translate(${x}px, ${y}px) rotate(${r}deg)`};\n}\n\nexport function createSVGTransform({x, y, r}: {x: number, y: number, r:number}): string {\n return `translate(${x}, ${y}) rotate(${r})`;\n}\n\nexport function getTouch(e: MouseTouchEvent, identifier: number): ?{clientX: number, clientY: number} {\n return (e.targetTouches && findInArray(e.targetTouches, t => identifier === t.identifier)) ||\n (e.changedTouches && findInArray(e.changedTouches, t => identifier === t.identifier));\n}\n\nexport function getTouchIdentifier(e: MouseTouchEvent): ?number {\n if (e.targetTouches && e.targetTouches[0]) return e.targetTouches[0].identifier;\n if (e.changedTouches && e.changedTouches[0]) return e.changedTouches[0].identifier;\n}\n\n// User-select Hacks:\n//\n// Useful for preventing blue highlights all over everything when dragging.\n\n// Note we're passing `document` b/c we could be iframed\nexport function addUserSelectStyles(doc: ?Document) {\n if (!doc) return;\n let styleEl = doc.getElementById('react-draggable-style-el');\n if (!styleEl) {\n styleEl = doc.createElement('style');\n styleEl.type = 'text/css';\n styleEl.id = 'react-draggable-style-el';\n styleEl.innerHTML = '.react-draggable-transparent-selection *::-moz-selection {background: transparent;}\\n';\n styleEl.innerHTML += '.react-draggable-transparent-selection *::selection {background: transparent;}\\n';\n doc.getElementsByTagName('head')[0].appendChild(styleEl);\n }\n if (doc.body) addClassName(doc.body, 'react-draggable-transparent-selection');\n}\n\nexport function removeUserSelectStyles(doc: ?Document) {\n try {\n if (doc && doc.body) removeClassName(doc.body, 'react-draggable-transparent-selection');\n // $FlowIgnore: IE\n if (doc.selection) {\n // $FlowIgnore: IE\n doc.selection.empty();\n } else {\n window.getSelection().removeAllRanges(); // remove selection caused by scroll\n }\n } catch (e) {\n // probably IE\n }\n}\n\nexport function styleHacks(childStyle: Object = {}): Object {\n // Workaround IE pointer events; see #51\n // https://github.com/mzabriskie/react-draggable/issues/51#issuecomment-103488278\n return {\n touchAction: 'none',\n ...childStyle\n };\n}\n\nexport function addClassName(el: HTMLElement, className: string) {\n if (el.classList) {\n el.classList.add(className);\n } else {\n if (!el.className.match(new RegExp(`(?:^|\\\\s)${className}(?!\\\\S)`))) {\n el.className += ` ${className}`;\n }\n }\n}\n\nexport function removeClassName(el: HTMLElement, className: string) {\n if (el.classList) {\n el.classList.remove(className);\n } else {\n el.className = el.className.replace(new RegExp(`(?:^|\\\\s)${className}(?!\\\\S)`, 'g'), '');\n }\n}\n","// @flow\nimport {isNum, int} from './shims';\nimport ReactDOM from 'react-dom';\nimport {getTouch, innerWidth, innerHeight, offsetXYFromParent, outerWidth, outerHeight} from './domFns';\n\nimport type Draggable from '../Draggable';\nimport type {Bounds, ControlPosition, DraggableData, MouseTouchEvent} from './types';\nimport type DraggableCore from '../DraggableCore';\n\nexport function getBoundPosition(draggable: Draggable, x: number, y: number): [number, number] {\n // If no bounds, short-circuit and move on\n if (!draggable.props.bounds) return [x, y];\n\n // Clone new bounds\n let {bounds} = draggable.props;\n bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds);\n const node = findDOMNode(draggable);\n\n if (typeof bounds === 'string') {\n const {ownerDocument} = node;\n const ownerWindow = ownerDocument.defaultView;\n let boundNode;\n if (bounds === 'parent') {\n boundNode = node.parentNode;\n } else {\n boundNode = ownerDocument.querySelector(bounds);\n }\n if (!(boundNode instanceof ownerWindow.HTMLElement)) {\n throw new Error('Bounds selector \"' + bounds + '\" could not find an element.');\n }\n const nodeStyle = ownerWindow.getComputedStyle(node);\n const boundNodeStyle = ownerWindow.getComputedStyle(boundNode);\n // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n bounds = {\n left: -node.offsetLeft + int(boundNodeStyle.paddingLeft) + int(nodeStyle.marginLeft),\n top: -node.offsetTop + int(boundNodeStyle.paddingTop) + int(nodeStyle.marginTop),\n right: innerWidth(boundNode) - outerWidth(node) - node.offsetLeft +\n int(boundNodeStyle.paddingRight) - int(nodeStyle.marginRight),\n bottom: innerHeight(boundNode) - outerHeight(node) - node.offsetTop +\n int(boundNodeStyle.paddingBottom) - int(nodeStyle.marginBottom)\n };\n }\n\n // Keep x and y below right and bottom limits...\n if (isNum(bounds.right)) x = Math.min(x, bounds.right);\n if (isNum(bounds.bottom)) y = Math.min(y, bounds.bottom);\n\n // But above left and top limits.\n if (isNum(bounds.left)) x = Math.max(x, bounds.left);\n if (isNum(bounds.top)) y = Math.max(y, bounds.top);\n\n return [x, y];\n}\n\nexport function snapToGrid(grid: [number, number], pendingX: number, pendingY: number): [number, number] {\n const x = Math.round(pendingX / grid[0]) * grid[0];\n const y = Math.round(pendingY / grid[1]) * grid[1];\n return [x, y];\n}\n\nexport function canDragX(draggable: Draggable): boolean {\n return draggable.props.axis === 'both' || draggable.props.axis === 'x';\n}\n\nexport function canDragY(draggable: Draggable): boolean {\n return draggable.props.axis === 'both' || draggable.props.axis === 'y';\n}\n\n// Get {x, y} positions from event.\nexport function getControlPosition(e: MouseTouchEvent, touchIdentifier: ?number, draggableCore: DraggableCore): ?ControlPosition {\n const touchObj = typeof touchIdentifier === 'number' ? getTouch(e, touchIdentifier) : null;\n if (typeof touchIdentifier === 'number' && !touchObj) return null; // not the right touch\n const node = findDOMNode(draggableCore);\n // User can provide an offsetParent if desired.\n const offsetParent = draggableCore.props.offsetParent || node.offsetParent || node.ownerDocument.body;\n return offsetXYFromParent(touchObj || e, offsetParent);\n}\n\n// Create an data object exposed by 's events\nexport function createCoreData(draggable: DraggableCore, x: number, y: number): DraggableData {\n const state = draggable.state;\n const isStart = !isNum(state.lastX);\n const node = findDOMNode(draggable);\n\n if (isStart) {\n // If this is our first move, use the x and y as last coords.\n return {\n node,\n deltaX: 0, deltaY: 0,\n lastX: x, lastY: y,\n x, y,\n };\n } else {\n // Otherwise calculate proper values.\n return {\n node,\n deltaX: x - state.lastX, deltaY: y - state.lastY,\n lastX: state.lastX, lastY: state.lastY,\n x, y,\n };\n }\n}\n\n// Create an data exposed by 's events\nexport function createDraggableData(draggable: Draggable, coreData: DraggableData): DraggableData {\n const scale = draggable.props.scale;\n return {\n node: coreData.node,\n x: draggable.state.x + (coreData.deltaX / scale),\n y: draggable.state.y + (coreData.deltaY / scale),\n deltaX: (coreData.deltaX / scale),\n deltaY: (coreData.deltaY / scale),\n lastX: draggable.state.x,\n lastY: draggable.state.y\n };\n}\n\n// A lot faster than stringify/parse\nfunction cloneBounds(bounds: Bounds): Bounds {\n return {\n left: bounds.left,\n top: bounds.top,\n right: bounds.right,\n bottom: bounds.bottom\n };\n}\n\nfunction findDOMNode(draggable: Draggable | DraggableCore): HTMLElement {\n const node = ReactDOM.findDOMNode(draggable);\n if (!node) {\n throw new Error(': Unmounted during event!');\n }\n // $FlowIgnore we can't assert on HTMLElement due to tests... FIXME\n return node;\n}\n","// @flow\n/*eslint no-console:0*/\nexport default function log(...args: any) {\n if (process.env.DRAGGABLE_DEBUG) console.log(...args);\n}\n","// @flow\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport {matchesSelectorAndParentsTo, addEvent, removeEvent, addUserSelectStyles, getTouchIdentifier,\n removeUserSelectStyles, styleHacks} from './utils/domFns';\nimport {createCoreData, getControlPosition, snapToGrid} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport log from './utils/log';\n\nimport type {EventHandler, MouseTouchEvent} from './utils/types';\nimport type {Element as ReactElement} from 'react';\n\n// Simple abstraction for dragging events names.\nconst eventsFor = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n stop: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n stop: 'mouseup'\n }\n};\n\n// Default to mouse events.\nlet dragEventFor = eventsFor.mouse;\n\ntype DraggableCoreState = {\n dragging: boolean,\n lastX: number,\n lastY: number,\n touchIdentifier: ?number\n};\n\nexport type DraggableBounds = {\n left: number,\n right: number,\n top: number,\n bottom: number,\n};\n\nexport type DraggableData = {\n node: HTMLElement,\n x: number, y: number,\n deltaX: number, deltaY: number,\n lastX: number, lastY: number,\n};\n\nexport type DraggableEventHandler = (e: MouseEvent, data: DraggableData) => void;\n\nexport type ControlPosition = {x: number, y: number};\n\nexport type DraggableCoreProps = {\n allowAnyClick: boolean,\n cancel: string,\n children: ReactElement,\n disabled: boolean,\n enableUserSelectHack: boolean,\n offsetParent: HTMLElement,\n grid: [number, number],\n handle: string,\n onStart: DraggableEventHandler,\n onDrag: DraggableEventHandler,\n onStop: DraggableEventHandler,\n onMouseDown: (e: MouseEvent) => void,\n};\n\n//\n// Define .\n//\n// is for advanced usage of . It maintains minimal internal state so it can\n// work well with libraries that require more control over the element.\n//\n\nexport default class DraggableCore extends React.Component {\n\n static displayName = 'DraggableCore';\n\n static propTypes = {\n /**\n * `allowAnyClick` allows dragging using any mouse button.\n * By default, we only accept the left button.\n *\n * Defaults to `false`.\n */\n allowAnyClick: PropTypes.bool,\n\n /**\n * `disabled`, if true, stops the from dragging. All handlers,\n * with the exception of `onMouseDown`, will not fire.\n */\n disabled: PropTypes.bool,\n\n /**\n * By default, we add 'user-select:none' attributes to the document body\n * to prevent ugly text selection during drag. If this is causing problems\n * for your app, set this to `false`.\n */\n enableUserSelectHack: PropTypes.bool,\n\n /**\n * `offsetParent`, if set, uses the passed DOM node to compute drag offsets\n * instead of using the parent node.\n */\n offsetParent: function(props: DraggableCoreProps, propName: $Keys) {\n if (props[propName] && props[propName].nodeType !== 1) {\n throw new Error('Draggable\\'s offsetParent must be a DOM Node.');\n }\n },\n\n /**\n * `grid` specifies the x and y that dragging should snap to.\n */\n grid: PropTypes.arrayOf(PropTypes.number),\n \n /**\n * `scale` specifies the scale of the area you are dragging inside of. It allows\n * the drag deltas to scale correctly with how far zoomed in/out you are.\n */\n scale: PropTypes.number,\n\n /**\n * `handle` specifies a selector to be used as the handle that initiates drag.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
\n *
Click me to drag
\n *
This is some other content
\n *
\n *
\n * );\n * }\n * });\n * ```\n */\n handle: PropTypes.string,\n\n /**\n * `cancel` specifies a selector to be used to prevent drag initialization.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return(\n * \n *
\n *
You can't drag from here
\n *
Dragging here works fine
\n *
\n *
\n * );\n * }\n * });\n * ```\n */\n cancel: PropTypes.string,\n\n /**\n * Called when dragging starts.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onStart: PropTypes.func,\n\n /**\n * Called while dragging.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onDrag: PropTypes.func,\n\n /**\n * Called when dragging stops.\n * If this function returns the boolean false, the drag will remain active.\n */\n onStop: PropTypes.func,\n\n /**\n * A workaround option which can be passed if onMouseDown needs to be accessed,\n * since it'll always be blocked (as there is internal use of onMouseDown)\n */\n onMouseDown: PropTypes.func,\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n };\n\n static defaultProps = {\n allowAnyClick: false, // by default only accept left click\n cancel: null,\n disabled: false,\n enableUserSelectHack: true,\n offsetParent: null,\n handle: null,\n grid: null,\n transform: null,\n onStart: function(){},\n onDrag: function(){},\n onStop: function(){},\n onMouseDown: function(){}\n };\n\n state = {\n dragging: false,\n // Used while dragging to determine deltas.\n lastX: NaN, lastY: NaN,\n touchIdentifier: null\n };\n\n componentWillUnmount() {\n // Remove any leftover event handlers. Remove both touch and mouse handlers in case\n // some browser quirk caused a touch event to fire during a mouse move, or vice versa.\n const thisNode = ReactDOM.findDOMNode(this);\n if (thisNode) {\n const {ownerDocument} = thisNode;\n removeEvent(ownerDocument, eventsFor.mouse.move, this.handleDrag);\n removeEvent(ownerDocument, eventsFor.touch.move, this.handleDrag);\n removeEvent(ownerDocument, eventsFor.mouse.stop, this.handleDragStop);\n removeEvent(ownerDocument, eventsFor.touch.stop, this.handleDragStop);\n if (this.props.enableUserSelectHack) removeUserSelectStyles(ownerDocument);\n }\n }\n\n handleDragStart: EventHandler = (e) => {\n // Make it possible to attach event handlers on top of this one.\n this.props.onMouseDown(e);\n\n // Only accept left-clicks.\n if (!this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false;\n\n // Get nodes. Be sure to grab relative document (could be iframed)\n const thisNode = ReactDOM.findDOMNode(this);\n if (!thisNode || !thisNode.ownerDocument || !thisNode.ownerDocument.body) {\n throw new Error(' not mounted on DragStart!');\n }\n const {ownerDocument} = thisNode;\n\n // Short circuit if handle or cancel prop was provided and selector doesn't match.\n if (this.props.disabled ||\n (!(e.target instanceof ownerDocument.defaultView.Node)) ||\n (this.props.handle && !matchesSelectorAndParentsTo(e.target, this.props.handle, thisNode)) ||\n (this.props.cancel && matchesSelectorAndParentsTo(e.target, this.props.cancel, thisNode))) {\n return;\n }\n\n // Set touch identifier in component state if this is a touch event. This allows us to\n // distinguish between individual touches on multitouch screens by identifying which\n // touchpoint was set to this element.\n const touchIdentifier = getTouchIdentifier(e);\n this.setState({touchIdentifier});\n\n // Get the current drag point from the event. This is used as the offset.\n const position = getControlPosition(e, touchIdentifier, this);\n if (position == null) return; // not possible but satisfies flow\n const {x, y} = position;\n\n // Create an event object with all the data parents need to make a decision here.\n const coreEvent = createCoreData(this, x, y);\n\n log('DraggableCore: handleDragStart: %j', coreEvent);\n\n // Call event handler. If it returns explicit false, cancel.\n log('calling', this.props.onStart);\n const shouldUpdate = this.props.onStart(e, coreEvent);\n if (shouldUpdate === false) return;\n\n // Add a style to the body to disable user-select. This prevents text from\n // being selected all over the page.\n if (this.props.enableUserSelectHack) addUserSelectStyles(ownerDocument);\n\n // Initiate dragging. Set the current x and y as offsets\n // so we know how much we've moved during the drag. This allows us\n // to drag elements around even if they have been moved, without issue.\n this.setState({\n dragging: true,\n\n lastX: x,\n lastY: y\n });\n\n // Add events to the document directly so we catch when the user's mouse/touch moves outside of\n // this element. We use different events depending on whether or not we have detected that this\n // is a touch-capable device.\n addEvent(ownerDocument, dragEventFor.move, this.handleDrag);\n addEvent(ownerDocument, dragEventFor.stop, this.handleDragStop);\n };\n\n handleDrag: EventHandler = (e) => {\n\n // Prevent scrolling on mobile devices, like ipad/iphone.\n if (e.type === 'touchmove') e.preventDefault();\n\n // Get the current drag point from the event. This is used as the offset.\n const position = getControlPosition(e, this.state.touchIdentifier, this);\n if (position == null) return;\n let {x, y} = position;\n\n // Snap to grid if prop has been provided\n if (Array.isArray(this.props.grid)) {\n let deltaX = x - this.state.lastX, deltaY = y - this.state.lastY;\n [deltaX, deltaY] = snapToGrid(this.props.grid, deltaX, deltaY);\n if (!deltaX && !deltaY) return; // skip useless drag\n x = this.state.lastX + deltaX, y = this.state.lastY + deltaY;\n }\n\n const coreEvent = createCoreData(this, x, y);\n\n log('DraggableCore: handleDrag: %j', coreEvent);\n\n // Call event handler. If it returns explicit false, trigger end.\n const shouldUpdate = this.props.onDrag(e, coreEvent);\n if (shouldUpdate === false) {\n try {\n // $FlowIgnore\n this.handleDragStop(new MouseEvent('mouseup'));\n } catch (err) {\n // Old browsers\n const event = ((document.createEvent('MouseEvents'): any): MouseTouchEvent);\n // I see why this insanity was deprecated\n // $FlowIgnore\n event.initMouseEvent('mouseup', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);\n this.handleDragStop(event);\n }\n return;\n }\n\n this.setState({\n lastX: x,\n lastY: y\n });\n };\n\n handleDragStop: EventHandler = (e) => {\n if (!this.state.dragging) return;\n\n const position = getControlPosition(e, this.state.touchIdentifier, this);\n if (position == null) return;\n const {x, y} = position;\n const coreEvent = createCoreData(this, x, y);\n\n const thisNode = ReactDOM.findDOMNode(this);\n if (thisNode) {\n // Remove user-select hack\n if (this.props.enableUserSelectHack) removeUserSelectStyles(thisNode.ownerDocument);\n }\n\n log('DraggableCore: handleDragStop: %j', coreEvent);\n\n // Reset the el.\n this.setState({\n dragging: false,\n lastX: NaN,\n lastY: NaN\n });\n\n // Call event handler\n this.props.onStop(e, coreEvent);\n\n if (thisNode) {\n // Remove event handlers\n log('DraggableCore: Removing handlers');\n removeEvent(thisNode.ownerDocument, dragEventFor.move, this.handleDrag);\n removeEvent(thisNode.ownerDocument, dragEventFor.stop, this.handleDragStop);\n }\n };\n\n onMouseDown: EventHandler = (e) => {\n dragEventFor = eventsFor.mouse; // on touchscreen laptops we could switch back to mouse\n\n return this.handleDragStart(e);\n };\n\n onMouseUp: EventHandler = (e) => {\n dragEventFor = eventsFor.mouse;\n\n return this.handleDragStop(e);\n };\n\n // Same as onMouseDown (start drag), but now consider this a touch device.\n onTouchStart: EventHandler = (e) => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStart(e);\n };\n\n onTouchEnd: EventHandler = (e) => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStop(e);\n };\n\n render() {\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return React.cloneElement(React.Children.only(this.props.children), {\n style: styleHacks(this.props.children.props.style),\n\n // Note: mouseMove handler is attached to document so it will still function\n // when the user drags quickly and leaves the bounds of the element.\n onMouseDown: this.onMouseDown,\n onTouchStart: this.onTouchStart,\n onMouseUp: this.onMouseUp,\n onTouchEnd: this.onTouchEnd\n });\n }\n}\n","// @flow\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport classNames from 'classnames';\nimport {createCSSTransform, createSVGTransform} from './utils/domFns';\nimport {canDragX, canDragY, createDraggableData, getBoundPosition} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport DraggableCore from './DraggableCore';\nimport type {ControlPosition, DraggableBounds, DraggableCoreProps} from './DraggableCore';\nimport log from './utils/log';\nimport type {DraggableEventHandler} from './utils/types';\nimport type {Element as ReactElement} from 'react';\n\ntype DraggableState = {\n dragging: boolean,\n dragged: boolean,\n x: number, y: number,\n slackX: number, slackY: number,\n isElementSVG: boolean\n};\n\nexport type DraggableProps = {\n ...$Exact,\n axis: 'both' | 'x' | 'y' | 'none',\n bounds: DraggableBounds | string | false,\n defaultClassName: string,\n defaultClassNameDragging: string,\n defaultClassNameDragged: string,\n defaultPosition: ControlPosition,\n position: ControlPosition,\n rotate: number,\n scale: number\n};\n\n//\n// Define \n//\n\nexport default class Draggable extends React.Component {\n\n static displayName = 'Draggable';\n\n static propTypes = {\n // Accepts all props accepts.\n ...DraggableCore.propTypes,\n\n /**\n * `axis` determines which axis the draggable can move.\n *\n * Note that all callbacks will still return data as normal. This only\n * controls flushing to the DOM.\n *\n * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n * 'none' limits all movement.\n *\n * Defaults to 'both'.\n */\n axis: PropTypes.oneOf(['both', 'x', 'y', 'none']),\n\n /**\n * `bounds` determines the range of movement available to the element.\n * Available values are:\n *\n * 'parent' restricts movement within the Draggable's parent node.\n *\n * Alternatively, pass an object with the following properties, all of which are optional:\n *\n * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}\n *\n * All values are in px.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
Content
\n *
\n * );\n * }\n * });\n * ```\n */\n bounds: PropTypes.oneOfType([\n PropTypes.shape({\n left: PropTypes.number,\n right: PropTypes.number,\n top: PropTypes.number,\n bottom: PropTypes.number\n }),\n PropTypes.string,\n PropTypes.oneOf([false])\n ]),\n\n defaultClassName: PropTypes.string,\n defaultClassNameDragging: PropTypes.string,\n defaultClassNameDragged: PropTypes.string,\n\n /**\n * `defaultPosition` specifies the x and y that the dragged item should start at\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I start with transformX: 25px and transformY: 25px;
\n *
\n * );\n * }\n * });\n * ```\n */\n defaultPosition: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n\n /**\n * `position`, if present, defines the current position of the element.\n *\n * This is similar to how form elements in React work - if no `position` is supplied, the component\n * is uncontrolled.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I start with transformX: 25px and transformY: 25px;
\n *
\n * );\n * }\n * });\n * ```\n */\n position: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n };\n\n static defaultProps = {\n ...DraggableCore.defaultProps,\n axis: 'both',\n bounds: false,\n defaultClassName: 'react-draggable',\n defaultClassNameDragging: 'react-draggable-dragging',\n defaultClassNameDragged: 'react-draggable-dragged',\n defaultPosition: {x: 0, y: 0},\n position: null,\n scale: 1\n };\n\n constructor(props: DraggableProps) {\n super(props);\n\n this.state = {\n // Whether or not we are currently dragging.\n dragging: false,\n\n // Whether or not we have been dragged before.\n dragged: false,\n\n // Current transform x and y.\n x: props.position ? props.position.x : props.defaultPosition.x,\n y: props.position ? props.position.y : props.defaultPosition.y,\n\n // Used for compensating for out-of-bounds drags\n slackX: 0, slackY: 0,\n\n // Can only determine if SVG after mounting\n isElementSVG: false\n };\n }\n\n componentWillMount() {\n if (this.props.position && !(this.props.onDrag || this.props.onStop)) {\n // eslint-disable-next-line\n console.warn('A `position` was applied to this , without drag handlers. This will make this ' +\n 'component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the ' +\n '`position` of this element.');\n }\n }\n\n componentDidMount() {\n // Check to see if the element passed is an instanceof SVGElement\n if(typeof window.SVGElement !== 'undefined' && ReactDOM.findDOMNode(this) instanceof window.SVGElement) {\n this.setState({ isElementSVG: true });\n }\n }\n\n componentWillReceiveProps(nextProps: Object) {\n // Set x/y if position has changed\n if (nextProps.position &&\n (!this.props.position ||\n nextProps.position.x !== this.props.position.x ||\n nextProps.position.y !== this.props.position.y\n )\n ) {\n this.setState({ x: nextProps.position.x, y: nextProps.position.y });\n }\n }\n\n componentWillUnmount() {\n this.setState({dragging: false}); // prevents invariant if unmounted while dragging\n }\n\n onDragStart: DraggableEventHandler = (e, coreData) => {\n log('Draggable: onDragStart: %j', coreData);\n\n // Short-circuit if user's callback killed it.\n const shouldStart = this.props.onStart(e, createDraggableData(this, coreData));\n // Kills start event on core as well, so move handlers are never bound.\n if (shouldStart === false) return false;\n\n this.setState({dragging: true, dragged: true});\n };\n\n onDrag: DraggableEventHandler = (e, coreData) => {\n if (!this.state.dragging) return false;\n log('Draggable: onDrag: %j', coreData);\n\n const uiData = createDraggableData(this, coreData);\n\n const newState: $Shape = {\n x: uiData.x,\n y: uiData.y\n };\n\n // Keep within bounds.\n if (this.props.bounds) {\n // Save original x and y.\n const {x, y} = newState;\n\n // Add slack to the values used to calculate bound position. This will ensure that if\n // we start removing slack, the element won't react to it right away until it's been\n // completely removed.\n newState.x += this.state.slackX;\n newState.y += this.state.slackY;\n\n // Get bound position. This will ceil/floor the x and y within the boundaries.\n const [newStateX, newStateY] = getBoundPosition(this, newState.x, newState.y);\n newState.x = newStateX;\n newState.y = newStateY;\n\n // Recalculate slack by noting how much was shaved by the boundPosition handler.\n newState.slackX = this.state.slackX + (x - newState.x);\n newState.slackY = this.state.slackY + (y - newState.y);\n\n // Update the event we fire to reflect what really happened after bounds took effect.\n uiData.x = newState.x;\n uiData.y = newState.y;\n uiData.deltaX = newState.x - this.state.x;\n uiData.deltaY = newState.y - this.state.y;\n }\n\n // Short-circuit if user's callback killed it.\n const shouldUpdate = this.props.onDrag(e, uiData);\n if (shouldUpdate === false) return false;\n\n this.setState(newState);\n };\n\n onDragStop: DraggableEventHandler = (e, coreData) => {\n if (!this.state.dragging) return false;\n\n // Short-circuit if user's callback killed it.\n const shouldStop = this.props.onStop(e, createDraggableData(this, coreData));\n if (shouldStop === false) return false;\n\n log('Draggable: onDragStop: %j', coreData);\n\n const newState: $Shape = {\n dragging: false,\n slackX: 0,\n slackY: 0\n };\n\n // If this is a controlled component, the result of this operation will be to\n // revert back to the old position. We expect a handler on `onDragStop`, at the least.\n const controlled = Boolean(this.props.position);\n if (controlled) {\n const {x, y} = this.props.position;\n newState.x = x;\n newState.y = y;\n }\n\n this.setState(newState);\n };\n\n render(): ReactElement {\n let style = {}, svgTransform = null;\n\n // If this is controlled, we don't want to move it - unless it's dragging.\n const controlled = Boolean(this.props.position);\n const draggable = !controlled || this.state.dragging;\n\n const position = this.props.position || this.props.defaultPosition;\n const transformOpts = {\n // Set left if horizontal drag is enabled\n x: canDragX(this) && draggable ?\n this.state.x :\n position.x,\n\n // Set top if vertical drag is enabled\n y: canDragY(this) && draggable ?\n this.state.y :\n position.y,\n r: this.props.rotate?this.props.rotate:0\n };\n\n // If this element was SVG, we use the `transform` attribute.\n if (this.state.isElementSVG) {\n svgTransform = createSVGTransform(transformOpts);\n } else {\n // Add a CSS transform to move the element around. This allows us to move the element around\n // without worrying about whether or not it is relatively or absolutely positioned.\n // If the item you are dragging already has a transform set, wrap it in a so \n // has a clean slate.\n style = createCSSTransform(transformOpts);\n }\n\n const {\n defaultClassName,\n defaultClassNameDragging,\n defaultClassNameDragged\n } = this.props;\n\n const children = React.Children.only(this.props.children);\n\n // Mark with class while dragging\n const className = classNames((children.props.className || ''), defaultClassName, {\n [defaultClassNameDragging]: this.state.dragging,\n [defaultClassNameDragged]: this.state.dragged\n });\n\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return (\n \n {React.cloneElement(children, {\n className: className,\n style: {...children.props.style, ...style},\n transform: svgTransform\n })}\n \n );\n }\n}\n","import Draggable from './Draggable';\nimport DraggableCore from './DraggableCore';\n\n// Previous versions of this lib exported as the root export. As to not break\n// them, or TypeScript, we export *both* as the root and as 'default'.\n// See https://github.com/mzabriskie/react-draggable/pull/254\n// and https://github.com/mzabriskie/react-draggable/issues/266\nDraggable.default = Draggable;\nDraggable.DraggableCore = DraggableCore;\n\nexport default Draggable;\n"],"names":["require$$1","ReactPropTypesSecret","require$$0","has","printWarning","ReactIs","assign","checkPropTypes","define","findInArray","array","callback","i","length","apply","isFunction","func","Object","prototype","toString","call","isNum","num","isNaN","int","a","parseInt","dontSetMe","props","propName","componentName","Error","prefixes","getPrefix","prop","window","document","style","documentElement","browserPrefixToKey","prefix","kebabToTitleCase","str","out","shouldCapitalize","toUpperCase","matchesSelectorFunc","matchesSelector","el","selector","method","matchesSelectorAndParentsTo","baseNode","node","parentNode","addEvent","event","handler","attachEvent","addEventListener","removeEvent","detachEvent","removeEventListener","outerHeight","height","clientHeight","computedStyle","ownerDocument","defaultView","getComputedStyle","borderTopWidth","borderBottomWidth","outerWidth","width","clientWidth","borderLeftWidth","borderRightWidth","innerHeight","paddingTop","paddingBottom","innerWidth","paddingLeft","paddingRight","offsetXYFromParent","evt","offsetParent","isBody","body","offsetParentRect","left","top","getBoundingClientRect","x","clientX","scrollLeft","y","clientY","scrollTop","createCSSTransform","r","browserPrefix","createSVGTransform","getTouch","e","identifier","targetTouches","t","changedTouches","getTouchIdentifier","addUserSelectStyles","doc","styleEl","getElementById","createElement","type","id","innerHTML","getElementsByTagName","appendChild","addClassName","removeUserSelectStyles","removeClassName","selection","empty","getSelection","removeAllRanges","styleHacks","childStyle","touchAction","className","classList","add","match","RegExp","remove","replace","getBoundPosition","draggable","bounds","cloneBounds","findDOMNode","ownerWindow","boundNode","querySelector","HTMLElement","nodeStyle","boundNodeStyle","offsetLeft","marginLeft","offsetTop","marginTop","right","marginRight","bottom","marginBottom","Math","min","max","snapToGrid","grid","pendingX","pendingY","round","canDragX","axis","canDragY","getControlPosition","touchIdentifier","draggableCore","touchObj","createCoreData","state","isStart","lastX","deltaX","deltaY","lastY","createDraggableData","coreData","scale","ReactDOM","log","eventsFor","touch","start","move","stop","mouse","dragEventFor","DraggableCore","dragging","NaN","handleDragStart","onMouseDown","allowAnyClick","button","thisNode","disabled","target","Node","handle","cancel","setState","position","coreEvent","onStart","shouldUpdate","enableUserSelectHack","handleDrag","handleDragStop","preventDefault","Array","isArray","onDrag","MouseEvent","err","createEvent","initMouseEvent","onStop","onMouseUp","onTouchStart","onTouchEnd","React","cloneElement","Children","only","children","Component","displayName","propTypes","PropTypes","bool","nodeType","arrayOf","number","string","transform","defaultProps","Draggable","onDragStart","shouldStart","dragged","uiData","newState","slackX","slackY","newStateX","newStateY","onDragStop","shouldStop","controlled","Boolean","defaultPosition","isElementSVG","console","warn","SVGElement","nextProps","svgTransform","transformOpts","rotate","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","classNames","oneOf","oneOfType","shape","default"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,CASa,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACpE,IAAI,CAAC,CAAC,UAAU,GAAG,OAAO,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,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;CAJJ,GAAhB,CAD0B,EAO1BJ,UAAUK,MAPgB,EAQ1BL,UAAUmC,KAAV,CAAgB,CAAC,KAAD,CAAhB,CAR0B,CAApB;;CAWRJ,oBAAkB/B,UAAUK;CAC5B2B,4BAA0BhC,UAAUK;CACpC4B,2BAAyBjC,UAAUK;;CAEnC;;;;;;;;;;;;;;;;;CAiBAiB,mBAAiBtB,UAAUqC,KAAV,CAAgB;CAC/B/K,OAAG0I,UAAUI,MADkB;CAE/B3I,OAAGuI,UAAUI;CAFkB,GAAhB;;CAKjB;;;;;;;;;;;;;;;;;;;;CAoBA/B,YAAU2B,UAAUqC,KAAV,CAAgB;CACxB/K,OAAG0I,UAAUI,MADW;CAExB3I,OAAGuI,UAAUI;CAFW,GAAhB;;CAKV;;;CAGAzG,aAAWtG;CACXU,SAAOV;CACPiN,aAAWjN;;CApHMmN,UAuHZD,4BACFhD,cAAcgD;CACjBzE,QAAM;CACN1B,UAAQ;CACR2H,oBAAkB;CAClBC,4BAA0B;CAC1BC,2BAAyB;CACzBX,mBAAiB,EAAChK,GAAG,CAAJ,EAAOG,GAAG,CAAV;CACjB4G,YAAU;CACVxB,SAAO;;;CCpKX;CACA;CACA;CACA;CACA2D,UAAU8B,OAAV,GAAoB9B,SAApB;CACAA,UAAUjD,aAAV,GAA0BA,aAA1B;;;;;;;;"} \ No newline at end of file diff --git a/dist/react-draggable.min.js b/dist/react-draggable.min.js index 68bbf756..172f3a6f 100644 --- a/dist/react-draggable.min.js +++ b/dist/react-draggable.min.js @@ -1,2 +1,2 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("react-dom"),require("react")):"function"==typeof define&&define.amd?define(["react-dom","react"],e):t.ReactDraggable=e(t.ReactDOM,t.React)}(this,function(t,e){"use strict";function n(t,e){return t(e={exports:{}},e.exports),e.exports}function r(t){return function(){return t}}t=t&&t.hasOwnProperty("default")?t.default:t,e=e&&e.hasOwnProperty("default")?e.default:e;var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(t){return t};var a=o;var i=function(t,e,n,r,o,a,i,s){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,i,s],c=0;(u=new Error(e.replace(/%s/g,function(){return l[c++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}},s=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;(function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}})()&&Object.assign;var c="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",p=n(function(t){t.exports=function(){function t(t,e,n,r,o,a){a!==c&&i(!1,"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")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=a,n.PropTypes=n,n}()}),f=n(function(t){!function(){var e={}.hasOwnProperty;function n(){for(var t=[],r=0;r0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window||void 0===window.document)return"";var e=window.document.documentElement.style;if(t in e)return"";for(var n=0;n: Unmounted during event!");return n}var I={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},V=I.mouse,W=function(n){function r(){var e,n,o;S(this,r);for(var a=arguments.length,i=Array(a),s=0;s not mounted on DragStart!");var r=n.ownerDocument;if(!(o.props.disabled||!(e.target instanceof r.defaultView.Node)||o.props.handle&&!P(e.target,o.props.handle,n)||o.props.cancel&&P(e.target,o.props.cancel,n))){var a=function(t){return t.targetTouches&&t.targetTouches[0]?t.targetTouches[0].identifier:t.changedTouches&&t.changedTouches[0]?t.changedTouches[0].identifier:void 0}(e);o.setState({touchIdentifier:a});var i=_(e,a,o);if(null!=i){var s=i.x,u=i.y,l=L(o,s,u);o.props.onStart,!1!==o.props.onStart(e,l)&&(o.props.enableUserSelectHack&&R(r),o.setState({dragging:!0,lastX:s,lastY:u}),C(r,V.move,o.handleDrag),C(r,V.stop,o.handleDragStop))}}},o.handleDrag=function(t){"touchmove"===t.type&&t.preventDefault();var e=_(t,o.state.touchIdentifier,o);if(null!=e){var n,r,a,i=e.x,s=e.y;if(Array.isArray(o.props.grid)){var u=i-o.state.lastX,l=s-o.state.lastY,c=(n=o.props.grid,r=u,a=l,[Math.round(r/n[0])*n[0],Math.round(a/n[1])*n[1]]),p=N(c,2);if(u=p[0],l=p[1],!u&&!l)return;i=o.state.lastX+u,s=o.state.lastY+l}var f=L(o,i,s);if(!1!==o.props.onDrag(t,f))o.setState({lastX:i,lastY:s});else try{o.handleDragStop(new MouseEvent("mouseup"))}catch(t){var d=document.createEvent("MouseEvents");d.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),o.handleDragStop(d)}}},o.handleDragStop=function(e){if(o.state.dragging){var n=_(e,o.state.touchIdentifier,o);if(null!=n){var r=n.x,a=n.y,i=L(o,r,a),s=t.findDOMNode(o);s&&o.props.enableUserSelectHack&&X(s.ownerDocument),o.setState({dragging:!1,lastX:NaN,lastY:NaN}),o.props.onStop(e,i),s&&(j(s.ownerDocument,V.move,o.handleDrag),j(s.ownerDocument,V.stop,o.handleDragStop))}}},o.onMouseDown=function(t){return V=I.mouse,o.handleDragStart(t)},o.onMouseUp=function(t){return V=I.mouse,o.handleDragStop(t)},o.onTouchStart=function(t){return V=I.touch,o.handleDragStart(t)},o.onTouchEnd=function(t){return V=I.touch,o.handleDragStop(t)},E(o,n)}return T(r,n),D(r,[{key:"componentWillUnmount",value:function(){var e=t.findDOMNode(this);if(e){var n=e.ownerDocument;j(n,I.mouse.move,this.handleDrag),j(n,I.touch.move,this.handleDrag),j(n,I.mouse.stop,this.handleDragStop),j(n,I.touch.stop,this.handleDragStop),this.props.enableUserSelectHack&&X(n)}}},{key:"render",value:function(){return e.cloneElement(e.Children.only(this.props.children),{style:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return O({touchAction:"none"},t)}(this.props.children.props.style),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),r}(e.Component);W.displayName="DraggableCore",W.propTypes={allowAnyClick:p.bool,disabled:p.bool,enableUserSelectHack:p.bool,offsetParent:function(t,e){if(t[e]&&1!==t[e].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:p.arrayOf(p.number),scale:p.number,handle:p.string,cancel:p.string,onStart:p.func,onDrag:p.func,onStop:p.func,onMouseDown:p.func,className:y,style:y,transform:y},W.defaultProps={allowAnyClick:!1,cancel:null,disabled:!1,enableUserSelectHack:!0,offsetParent:null,handle:null,grid:null,transform:null,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){}};var B=function(n){function r(t){S(this,r);var e=E(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t));return e.onDragStart=function(t,n){if(!1===e.props.onStart(t,A(e,n)))return!1;e.setState({dragging:!0,dragged:!0})},e.onDrag=function(t,n){if(!e.state.dragging)return!1;var r=A(e,n),o={x:r.x,y:r.y};if(e.props.bounds){var a=o.x,i=o.y;o.x+=e.state.slackX,o.y+=e.state.slackY;var s=Y(e,o.x,o.y),u=N(s,2),l=u[0],c=u[1];o.x=l,o.y=c,o.slackX=e.state.slackX+(a-o.x),o.slackY=e.state.slackY+(i-o.y),r.x=o.x,r.y=o.y,r.deltaX=o.x-e.state.x,r.deltaY=o.y-e.state.y}if(!1===e.props.onDrag(t,r))return!1;e.setState(o)},e.onDragStop=function(t,n){if(!e.state.dragging)return!1;if(!1===e.props.onStop(t,A(e,n)))return!1;var r={dragging:!1,slackX:0,slackY:0};if(Boolean(e.props.position)){var o=e.props.position,a=o.x,i=o.y;r.x=a,r.y=i}e.setState(r)},e.state={dragging:!1,dragged:!1,x:t.position?t.position.x:t.defaultPosition.x,y:t.position?t.position.y:t.defaultPosition.y,slackX:0,slackY:0,isElementSVG:!1},e}return T(r,n),D(r,[{key:"componentWillMount",value:function(){!this.props.position||this.props.onDrag||this.props.onStop||console.warn("A `position` was applied to this , without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}},{key:"componentDidMount",value:function(){void 0!==window.SVGElement&&t.findDOMNode(this)instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillReceiveProps",value:function(t){!t.position||this.props.position&&t.position.x===this.props.position.x&&t.position.y===this.props.position.y||this.setState({x:t.position.x,y:t.position.y})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"render",value:function(){var t,n,r,o,a,i={},s=null,u=!Boolean(this.props.position)||this.state.dragging,l=this.props.position||this.props.defaultPosition,c={x:function(t){return"both"===t.props.axis||"x"===t.props.axis}(this)&&u?this.state.x:l.x,y:function(t){return"both"===t.props.axis||"y"===t.props.axis}(this)&&u?this.state.y:l.y};this.state.isElementSVG?s="translate("+(a=c).x+","+a.y+")":(r=(n=c).x,o=n.y,i=x({},v("transform",w),"translate("+r+"px,"+o+"px)"));var p=this.props,d=p.defaultClassName,g=p.defaultClassNameDragging,h=p.defaultClassNameDragged,m=e.Children.only(this.props.children),y=f(m.props.className||"",d,(x(t={},g,this.state.dragging),x(t,h,this.state.dragged),t));return e.createElement(W,O({},this.props,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),e.cloneElement(m,{className:y,style:O({},m.props.style,i),transform:s}))}}]),r}(e.Component);return B.displayName="Draggable",B.propTypes=O({},W.propTypes,{axis:p.oneOf(["both","x","y","none"]),bounds:p.oneOfType([p.shape({left:p.number,right:p.number,top:p.number,bottom:p.number}),p.string,p.oneOf([!1])]),defaultClassName:p.string,defaultClassNameDragging:p.string,defaultClassNameDragged:p.string,defaultPosition:p.shape({x:p.number,y:p.number}),position:p.shape({x:p.number,y:p.number}),className:y,style:y,transform:y}),B.defaultProps=O({},W.defaultProps,{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},position:null,scale:1}),B.default=B,B.DraggableCore=W,B}); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react-dom"),require("react")):"function"==typeof define&&define.amd?define(["react-dom","react"],t):e.ReactDraggable=t(e.ReactDOM,e.React)}(this,function(e,t){"use strict";function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function o(e,t){return e(t={exports:{}},t.exports),t.exports}e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;var r=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&Symbol.for,o=n?Symbol.for("react.element"):60103,r=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,p=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,g=n?Symbol.for("react.memo"):60115,y=n?Symbol.for("react.lazy"):60116;function m(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case c:case p:case a:case s:case i:case d:return e;default:switch(e=e&&e.$$typeof){case l:case f:case u:return e;default:return t}}case y:case g:case r:return t}}}function h(e){return m(e)===p}t.typeOf=m,t.AsyncMode=c,t.ConcurrentMode=p,t.ContextConsumer=l,t.ContextProvider=u,t.Element=o,t.ForwardRef=f,t.Fragment=a,t.Lazy=y,t.Memo=g,t.Portal=r,t.Profiler=s,t.StrictMode=i,t.Suspense=d,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===s||e===i||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===g||e.$$typeof===u||e.$$typeof===l||e.$$typeof===f)},t.isAsyncMode=function(e){return h(e)||m(e)===c},t.isConcurrentMode=h,t.isContextConsumer=function(e){return m(e)===l},t.isContextProvider=function(e){return m(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return m(e)===f},t.isFragment=function(e){return m(e)===a},t.isLazy=function(e){return m(e)===y},t.isMemo=function(e){return m(e)===g},t.isPortal=function(e){return m(e)===r},t.isProfiler=function(e){return m(e)===s},t.isStrictMode=function(e){return m(e)===i},t.isSuspense=function(e){return m(e)===d}});n(r);r.typeOf,r.AsyncMode,r.ConcurrentMode,r.ContextConsumer,r.ContextProvider,r.Element,r.ForwardRef,r.Fragment,r.Lazy,r.Memo,r.Portal,r.Profiler,r.StrictMode,r.Suspense,r.isValidElementType,r.isAsyncMode,r.isConcurrentMode,r.isContextConsumer,r.isContextProvider,r.isElement,r.isForwardRef,r.isFragment,r.isLazy,r.isMemo,r.isPortal,r.isProfiler,r.isStrictMode,r.isSuspense;var a=o(function(e,t){});n(a);a.typeOf,a.AsyncMode,a.ConcurrentMode,a.ContextConsumer,a.ContextProvider,a.Element,a.ForwardRef,a.Fragment,a.Lazy,a.Memo,a.Portal,a.Profiler,a.StrictMode,a.Suspense,a.isValidElementType,a.isAsyncMode,a.isConcurrentMode,a.isContextConsumer,a.isContextProvider,a.isElement,a.isForwardRef,a.isFragment,a.isLazy,a.isMemo,a.isPortal,a.isProfiler,a.isStrictMode,a.isSuspense,o(function(e){e.exports=r});var i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;(function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}})()&&Object.assign;var l="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Function.call.bind(Object.prototype.hasOwnProperty);function c(){}function p(){}p.resetWarningCache=c;var f=o(function(e){e.exports=function(){function e(e,t,n,o,r,a){if(a!==l){var i=new Error("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");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:p,resetWarningCache:c};return n.PropTypes=n,n}()}),d=o(function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],o=0;o0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window||void 0===window.document)return"";var t=window.document.documentElement.style;if(e in t)return"";for(var n=0;n: Unmounted during event!");return n}var V={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},U=V.mouse,W=function(n){function o(){var t,n,r;x(this,o);for(var a=arguments.length,i=Array(a),s=0;s not mounted on DragStart!");var o=n.ownerDocument;if(!(r.props.disabled||!(t.target instanceof o.defaultView.Node)||r.props.handle&&!j(t.target,r.props.handle,n)||r.props.cancel&&j(t.target,r.props.cancel,n))){var a=function(e){return e.targetTouches&&e.targetTouches[0]?e.targetTouches[0].identifier:e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].identifier:void 0}(t);r.setState({touchIdentifier:a});var i=Y(t,a,r);if(null!=i){var s=i.x,u=i.y,l=A(r,s,u);r.props.onStart,!1!==r.props.onStart(t,l)&&(r.props.enableUserSelectHack&&L(o),r.setState({dragging:!0,lastX:s,lastY:u}),k(o,U.move,r.handleDrag),k(o,U.stop,r.handleDragStop))}}},r.handleDrag=function(e){"touchmove"===e.type&&e.preventDefault();var t=Y(e,r.state.touchIdentifier,r);if(null!=t){var n,o,a,i=t.x,s=t.y;if(Array.isArray(r.props.grid)){var u=i-r.state.lastX,l=s-r.state.lastY,c=(n=r.props.grid,o=u,a=l,[Math.round(o/n[0])*n[0],Math.round(a/n[1])*n[1]]),p=E(c,2);if(u=p[0],l=p[1],!u&&!l)return;i=r.state.lastX+u,s=r.state.lastY+l}var f=A(r,i,s);if(!1!==r.props.onDrag(e,f))r.setState({lastX:i,lastY:s});else try{r.handleDragStop(new MouseEvent("mouseup"))}catch(e){var d=document.createEvent("MouseEvents");d.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),r.handleDragStop(d)}}},r.handleDragStop=function(t){if(r.state.dragging){var n=Y(t,r.state.touchIdentifier,r);if(null!=n){var o=n.x,a=n.y,i=A(r,o,a),s=e.findDOMNode(r);s&&r.props.enableUserSelectHack&&R(s.ownerDocument),r.setState({dragging:!1,lastX:NaN,lastY:NaN}),r.props.onStop(t,i),s&&(_(s.ownerDocument,U.move,r.handleDrag),_(s.ownerDocument,U.stop,r.handleDragStop))}}},r.onMouseDown=function(e){return U=V.mouse,r.handleDragStart(e)},r.onMouseUp=function(e){return U=V.mouse,r.handleDragStop(e)},r.onTouchStart=function(e){return U=V.touch,r.handleDragStart(e)},r.onTouchEnd=function(e){return U=V.touch,r.handleDragStop(e)},P(r,n)}return C(o,n),D(o,[{key:"componentWillUnmount",value:function(){var t=e.findDOMNode(this);if(t){var n=t.ownerDocument;_(n,V.mouse.move,this.handleDrag),_(n,V.touch.move,this.handleDrag),_(n,V.mouse.stop,this.handleDragStop),_(n,V.touch.stop,this.handleDragStop),this.props.enableUserSelectHack&&R(n)}}},{key:"render",value:function(){return t.cloneElement(t.Children.only(this.props.children),{style:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return O({touchAction:"none"},e)}(this.props.children.props.style),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),o}(t.Component);W.displayName="DraggableCore",W.propTypes={allowAnyClick:f.bool,disabled:f.bool,enableUserSelectHack:f.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:f.arrayOf(f.number),scale:f.number,handle:f.string,cancel:f.string,onStart:f.func,onDrag:f.func,onStop:f.func,onMouseDown:f.func,className:b,style:b,transform:b},W.defaultProps={allowAnyClick:!1,cancel:null,disabled:!1,enableUserSelectHack:!0,offsetParent:null,handle:null,grid:null,transform:null,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){}};var I=function(n){function o(e){x(this,o);var t=P(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e));return t.onDragStart=function(e,n){if(!1===t.props.onStart(e,$(t,n)))return!1;t.setState({dragging:!0,dragged:!0})},t.onDrag=function(e,n){if(!t.state.dragging)return!1;var o=$(t,n),r={x:o.x,y:o.y};if(t.props.bounds){var a=r.x,i=r.y;r.x+=t.state.slackX,r.y+=t.state.slackY;var s=X(t,r.x,r.y),u=E(s,2),l=u[0],c=u[1];r.x=l,r.y=c,r.slackX=t.state.slackX+(a-r.x),r.slackY=t.state.slackY+(i-r.y),o.x=r.x,o.y=r.y,o.deltaX=r.x-t.state.x,o.deltaY=r.y-t.state.y}if(!1===t.props.onDrag(e,o))return!1;t.setState(r)},t.onDragStop=function(e,n){if(!t.state.dragging)return!1;if(!1===t.props.onStop(e,$(t,n)))return!1;var o={dragging:!1,slackX:0,slackY:0};if(Boolean(t.props.position)){var r=t.props.position,a=r.x,i=r.y;o.x=a,o.y=i}t.setState(o)},t.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,slackX:0,slackY:0,isElementSVG:!1},t}return C(o,n),D(o,[{key:"componentWillMount",value:function(){!this.props.position||this.props.onDrag||this.props.onStop||console.warn("A `position` was applied to this , without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}},{key:"componentDidMount",value:function(){void 0!==window.SVGElement&&e.findDOMNode(this)instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillReceiveProps",value:function(e){!e.position||this.props.position&&e.position.x===this.props.position.x&&e.position.y===this.props.position.y||this.setState({x:e.position.x,y:e.position.y})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"render",value:function(){var e,n,o,r,a,i,s={},u=null,l=!Boolean(this.props.position)||this.state.dragging,c=this.props.position||this.props.defaultPosition,p={x:function(e){return"both"===e.props.axis||"x"===e.props.axis}(this)&&l?this.state.x:c.x,y:function(e){return"both"===e.props.axis||"y"===e.props.axis}(this)&&l?this.state.y:c.y,r:this.props.rotate?this.props.rotate:0};this.state.isElementSVG?u="translate("+(i=p).x+", "+i.y+") rotate("+i.r+")":(o=(n=p).x,r=n.y,a=n.r,s=M({},S("transform",w),"translate("+o+"px, "+r+"px) rotate("+a+"deg)"));var f=this.props,g=f.defaultClassName,y=f.defaultClassNameDragging,m=f.defaultClassNameDragged,h=t.Children.only(this.props.children),b=d(h.props.className||"",g,(M(e={},y,this.state.dragging),M(e,m,this.state.dragged),e));return t.createElement(W,O({},this.props,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(h,{className:b,style:O({},h.props.style,s),transform:u}))}}]),o}(t.Component);return I.displayName="Draggable",I.propTypes=O({},W.propTypes,{axis:f.oneOf(["both","x","y","none"]),bounds:f.oneOfType([f.shape({left:f.number,right:f.number,top:f.number,bottom:f.number}),f.string,f.oneOf([!1])]),defaultClassName:f.string,defaultClassNameDragging:f.string,defaultClassNameDragged:f.string,defaultPosition:f.shape({x:f.number,y:f.number}),position:f.shape({x:f.number,y:f.number}),className:b,style:b,transform:b}),I.defaultProps=O({},W.defaultProps,{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},position:null,scale:1}),I.default=I,I.DraggableCore=W,I}); //# sourceMappingURL=react-draggable.min.js.map diff --git a/dist/react-draggable.min.js.map b/dist/react-draggable.min.js.map index c4efc601..db98aa47 100644 --- a/dist/react-draggable.min.js.map +++ b/dist/react-draggable.min.js.map @@ -1 +1 @@ -{"version":3,"file":"react-draggable.min.js","sources":["../node_modules/fbjs/lib/emptyFunction.js","../node_modules/fbjs/lib/invariant.js","../node_modules/object-assign/index.js","../node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/prop-types/index.js","../node_modules/prop-types/factoryWithThrowingShims.js","../node_modules/classnames/index.js","../lib/utils/shims.js","../lib/utils/getPrefix.js","../lib/utils/domFns.js","../lib/utils/positionFns.js","../lib/DraggableCore.js","../lib/Draggable.js","../lib/umd.js"],"sourcesContent":["\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/*!\n Copyright (c) 2016 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tclasses.push(classNames.apply(null, arg));\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","// @flow\n// @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc\nexport function findInArray(array: Array | TouchList, callback: Function): any {\n for (let i = 0, length = array.length; i < length; i++) {\n if (callback.apply(callback, [array[i], i, array])) return array[i];\n }\n}\n\nexport function isFunction(func: any): boolean {\n return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';\n}\n\nexport function isNum(num: any): boolean {\n return typeof num === 'number' && !isNaN(num);\n}\n\nexport function int(a: string): number {\n return parseInt(a, 10);\n}\n\nexport function dontSetMe(props: Object, propName: string, componentName: string) {\n if (props[propName]) {\n return new Error(`Invalid prop ${propName} passed to ${componentName} - do not set this, set it on the child.`);\n }\n}\n","// @flow\nconst prefixes = ['Moz', 'Webkit', 'O', 'ms'];\nexport function getPrefix(prop: string='transform'): string {\n // Checking specifically for 'window.document' is for pseudo-browser server-side\n // environments that define 'window' as the global context.\n // E.g. React-rails (see https://github.com/reactjs/react-rails/pull/84)\n if (typeof window === 'undefined' || typeof window.document === 'undefined') return '';\n\n const style = window.document.documentElement.style;\n\n if (prop in style) return '';\n\n for (let i = 0; i < prefixes.length; i++) {\n if (browserPrefixToKey(prop, prefixes[i]) in style) return prefixes[i];\n }\n\n return '';\n}\n\nexport function browserPrefixToKey(prop: string, prefix: string): string {\n return prefix ? `${prefix}${kebabToTitleCase(prop)}` : prop;\n}\n\nexport function browserPrefixToStyle(prop: string, prefix: string): string {\n return prefix ? `-${prefix.toLowerCase()}-${prop}` : prop;\n}\n\nfunction kebabToTitleCase(str: string): string {\n let out = '';\n let shouldCapitalize = true;\n for (let i = 0; i < str.length; i++) {\n if (shouldCapitalize) {\n out += str[i].toUpperCase();\n shouldCapitalize = false;\n } else if (str[i] === '-') {\n shouldCapitalize = true;\n } else {\n out += str[i];\n }\n }\n return out;\n}\n\n// Default export is the prefix itself, like 'Moz', 'Webkit', etc\n// Note that you may have to re-test for certain things; for instance, Chrome 50\n// can handle unprefixed `transform`, but not unprefixed `user-select`\nexport default getPrefix();\n","// @flow\nimport {findInArray, isFunction, int} from './shims';\nimport browserPrefix, {browserPrefixToKey} from './getPrefix';\n\nimport type {ControlPosition, MouseTouchEvent} from './types';\n\nlet matchesSelectorFunc = '';\nexport function matchesSelector(el: Node, selector: string): boolean {\n if (!matchesSelectorFunc) {\n matchesSelectorFunc = findInArray([\n 'matches',\n 'webkitMatchesSelector',\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'oMatchesSelector'\n ], function(method){\n // $FlowIgnore: Doesn't think elements are indexable\n return isFunction(el[method]);\n });\n }\n\n // Might not be found entirely (not an Element?) - in that case, bail\n // $FlowIgnore: Doesn't think elements are indexable\n if (!isFunction(el[matchesSelectorFunc])) return false;\n\n // $FlowIgnore: Doesn't think elements are indexable\n return el[matchesSelectorFunc](selector);\n}\n\n// Works up the tree to the draggable itself attempting to match selector.\nexport function matchesSelectorAndParentsTo(el: Node, selector: string, baseNode: Node): boolean {\n let node = el;\n do {\n if (matchesSelector(node, selector)) return true;\n if (node === baseNode) return false;\n node = node.parentNode;\n } while (node);\n\n return false;\n}\n\nexport function addEvent(el: ?Node, event: string, handler: Function): void {\n if (!el) { return; }\n if (el.attachEvent) {\n el.attachEvent('on' + event, handler);\n } else if (el.addEventListener) {\n el.addEventListener(event, handler, true);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = handler;\n }\n}\n\nexport function removeEvent(el: ?Node, event: string, handler: Function): void {\n if (!el) { return; }\n if (el.detachEvent) {\n el.detachEvent('on' + event, handler);\n } else if (el.removeEventListener) {\n el.removeEventListener(event, handler, true);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = null;\n }\n}\n\nexport function outerHeight(node: HTMLElement): number {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetTop which is including margin. See getBoundPosition\n let height = node.clientHeight;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n height += int(computedStyle.borderTopWidth);\n height += int(computedStyle.borderBottomWidth);\n return height;\n}\n\nexport function outerWidth(node: HTMLElement): number {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetLeft which is including margin. See getBoundPosition\n let width = node.clientWidth;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n width += int(computedStyle.borderLeftWidth);\n width += int(computedStyle.borderRightWidth);\n return width;\n}\nexport function innerHeight(node: HTMLElement): number {\n let height = node.clientHeight;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n height -= int(computedStyle.paddingTop);\n height -= int(computedStyle.paddingBottom);\n return height;\n}\n\nexport function innerWidth(node: HTMLElement): number {\n let width = node.clientWidth;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n width -= int(computedStyle.paddingLeft);\n width -= int(computedStyle.paddingRight);\n return width;\n}\n\n// Get from offsetParent\nexport function offsetXYFromParent(evt: {clientX: number, clientY: number}, offsetParent: HTMLElement): ControlPosition {\n const isBody = offsetParent === offsetParent.ownerDocument.body;\n const offsetParentRect = isBody ? {left: 0, top: 0} : offsetParent.getBoundingClientRect();\n\n const x = evt.clientX + offsetParent.scrollLeft - offsetParentRect.left;\n const y = evt.clientY + offsetParent.scrollTop - offsetParentRect.top;\n\n return {x, y};\n}\n\nexport function createCSSTransform({x, y}: {x: number, y: number}): Object {\n // Replace unitless items with px\n return {[browserPrefixToKey('transform', browserPrefix)]: 'translate(' + x + 'px,' + y + 'px)'};\n}\n\nexport function createSVGTransform({x, y}: {x: number, y: number}): string {\n return 'translate(' + x + ',' + y + ')';\n}\n\nexport function getTouch(e: MouseTouchEvent, identifier: number): ?{clientX: number, clientY: number} {\n return (e.targetTouches && findInArray(e.targetTouches, t => identifier === t.identifier)) ||\n (e.changedTouches && findInArray(e.changedTouches, t => identifier === t.identifier));\n}\n\nexport function getTouchIdentifier(e: MouseTouchEvent): ?number {\n if (e.targetTouches && e.targetTouches[0]) return e.targetTouches[0].identifier;\n if (e.changedTouches && e.changedTouches[0]) return e.changedTouches[0].identifier;\n}\n\n// User-select Hacks:\n//\n// Useful for preventing blue highlights all over everything when dragging.\n\n// Note we're passing `document` b/c we could be iframed\nexport function addUserSelectStyles(doc: ?Document) {\n if (!doc) return;\n let styleEl = doc.getElementById('react-draggable-style-el');\n if (!styleEl) {\n styleEl = doc.createElement('style');\n styleEl.type = 'text/css';\n styleEl.id = 'react-draggable-style-el';\n styleEl.innerHTML = '.react-draggable-transparent-selection *::-moz-selection {background: transparent;}\\n';\n styleEl.innerHTML += '.react-draggable-transparent-selection *::selection {background: transparent;}\\n';\n doc.getElementsByTagName('head')[0].appendChild(styleEl);\n }\n if (doc.body) addClassName(doc.body, 'react-draggable-transparent-selection');\n}\n\nexport function removeUserSelectStyles(doc: ?Document) {\n try {\n if (doc && doc.body) removeClassName(doc.body, 'react-draggable-transparent-selection');\n // $FlowIgnore: IE\n if (doc.selection) {\n // $FlowIgnore: IE\n doc.selection.empty();\n } else {\n window.getSelection().removeAllRanges(); // remove selection caused by scroll\n }\n } catch (e) {\n // probably IE\n }\n}\n\nexport function styleHacks(childStyle: Object = {}): Object {\n // Workaround IE pointer events; see #51\n // https://github.com/mzabriskie/react-draggable/issues/51#issuecomment-103488278\n return {\n touchAction: 'none',\n ...childStyle\n };\n}\n\nexport function addClassName(el: HTMLElement, className: string) {\n if (el.classList) {\n el.classList.add(className);\n } else {\n if (!el.className.match(new RegExp(`(?:^|\\\\s)${className}(?!\\\\S)`))) {\n el.className += ` ${className}`;\n }\n }\n}\n\nexport function removeClassName(el: HTMLElement, className: string) {\n if (el.classList) {\n el.classList.remove(className);\n } else {\n el.className = el.className.replace(new RegExp(`(?:^|\\\\s)${className}(?!\\\\S)`, 'g'), '');\n }\n}\n","// @flow\nimport {isNum, int} from './shims';\nimport ReactDOM from 'react-dom';\nimport {getTouch, innerWidth, innerHeight, offsetXYFromParent, outerWidth, outerHeight} from './domFns';\n\nimport type Draggable from '../Draggable';\nimport type {Bounds, ControlPosition, DraggableData, MouseTouchEvent} from './types';\nimport type DraggableCore from '../DraggableCore';\n\nexport function getBoundPosition(draggable: Draggable, x: number, y: number): [number, number] {\n // If no bounds, short-circuit and move on\n if (!draggable.props.bounds) return [x, y];\n\n // Clone new bounds\n let {bounds} = draggable.props;\n bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds);\n const node = findDOMNode(draggable);\n\n if (typeof bounds === 'string') {\n const {ownerDocument} = node;\n const ownerWindow = ownerDocument.defaultView;\n let boundNode;\n if (bounds === 'parent') {\n boundNode = node.parentNode;\n } else {\n boundNode = ownerDocument.querySelector(bounds);\n }\n if (!(boundNode instanceof ownerWindow.HTMLElement)) {\n throw new Error('Bounds selector \"' + bounds + '\" could not find an element.');\n }\n const nodeStyle = ownerWindow.getComputedStyle(node);\n const boundNodeStyle = ownerWindow.getComputedStyle(boundNode);\n // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n bounds = {\n left: -node.offsetLeft + int(boundNodeStyle.paddingLeft) + int(nodeStyle.marginLeft),\n top: -node.offsetTop + int(boundNodeStyle.paddingTop) + int(nodeStyle.marginTop),\n right: innerWidth(boundNode) - outerWidth(node) - node.offsetLeft +\n int(boundNodeStyle.paddingRight) - int(nodeStyle.marginRight),\n bottom: innerHeight(boundNode) - outerHeight(node) - node.offsetTop +\n int(boundNodeStyle.paddingBottom) - int(nodeStyle.marginBottom)\n };\n }\n\n // Keep x and y below right and bottom limits...\n if (isNum(bounds.right)) x = Math.min(x, bounds.right);\n if (isNum(bounds.bottom)) y = Math.min(y, bounds.bottom);\n\n // But above left and top limits.\n if (isNum(bounds.left)) x = Math.max(x, bounds.left);\n if (isNum(bounds.top)) y = Math.max(y, bounds.top);\n\n return [x, y];\n}\n\nexport function snapToGrid(grid: [number, number], pendingX: number, pendingY: number): [number, number] {\n const x = Math.round(pendingX / grid[0]) * grid[0];\n const y = Math.round(pendingY / grid[1]) * grid[1];\n return [x, y];\n}\n\nexport function canDragX(draggable: Draggable): boolean {\n return draggable.props.axis === 'both' || draggable.props.axis === 'x';\n}\n\nexport function canDragY(draggable: Draggable): boolean {\n return draggable.props.axis === 'both' || draggable.props.axis === 'y';\n}\n\n// Get {x, y} positions from event.\nexport function getControlPosition(e: MouseTouchEvent, touchIdentifier: ?number, draggableCore: DraggableCore): ?ControlPosition {\n const touchObj = typeof touchIdentifier === 'number' ? getTouch(e, touchIdentifier) : null;\n if (typeof touchIdentifier === 'number' && !touchObj) return null; // not the right touch\n const node = findDOMNode(draggableCore);\n // User can provide an offsetParent if desired.\n const offsetParent = draggableCore.props.offsetParent || node.offsetParent || node.ownerDocument.body;\n return offsetXYFromParent(touchObj || e, offsetParent);\n}\n\n// Create an data object exposed by 's events\nexport function createCoreData(draggable: DraggableCore, x: number, y: number): DraggableData {\n const state = draggable.state;\n const isStart = !isNum(state.lastX);\n const node = findDOMNode(draggable);\n\n if (isStart) {\n // If this is our first move, use the x and y as last coords.\n return {\n node,\n deltaX: 0, deltaY: 0,\n lastX: x, lastY: y,\n x, y,\n };\n } else {\n // Otherwise calculate proper values.\n return {\n node,\n deltaX: x - state.lastX, deltaY: y - state.lastY,\n lastX: state.lastX, lastY: state.lastY,\n x, y,\n };\n }\n}\n\n// Create an data exposed by 's events\nexport function createDraggableData(draggable: Draggable, coreData: DraggableData): DraggableData {\n const scale = draggable.props.scale;\n return {\n node: coreData.node,\n x: draggable.state.x + (coreData.deltaX / scale),\n y: draggable.state.y + (coreData.deltaY / scale),\n deltaX: (coreData.deltaX / scale),\n deltaY: (coreData.deltaY / scale),\n lastX: draggable.state.x,\n lastY: draggable.state.y\n };\n}\n\n// A lot faster than stringify/parse\nfunction cloneBounds(bounds: Bounds): Bounds {\n return {\n left: bounds.left,\n top: bounds.top,\n right: bounds.right,\n bottom: bounds.bottom\n };\n}\n\nfunction findDOMNode(draggable: Draggable | DraggableCore): HTMLElement {\n const node = ReactDOM.findDOMNode(draggable);\n if (!node) {\n throw new Error(': Unmounted during event!');\n }\n // $FlowIgnore we can't assert on HTMLElement due to tests... FIXME\n return node;\n}\n","// @flow\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport {matchesSelectorAndParentsTo, addEvent, removeEvent, addUserSelectStyles, getTouchIdentifier,\n removeUserSelectStyles, styleHacks} from './utils/domFns';\nimport {createCoreData, getControlPosition, snapToGrid} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport log from './utils/log';\n\nimport type {EventHandler, MouseTouchEvent} from './utils/types';\nimport type {Element as ReactElement} from 'react';\n\n// Simple abstraction for dragging events names.\nconst eventsFor = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n stop: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n stop: 'mouseup'\n }\n};\n\n// Default to mouse events.\nlet dragEventFor = eventsFor.mouse;\n\ntype DraggableCoreState = {\n dragging: boolean,\n lastX: number,\n lastY: number,\n touchIdentifier: ?number\n};\n\nexport type DraggableBounds = {\n left: number,\n right: number,\n top: number,\n bottom: number,\n};\n\nexport type DraggableData = {\n node: HTMLElement,\n x: number, y: number,\n deltaX: number, deltaY: number,\n lastX: number, lastY: number,\n};\n\nexport type DraggableEventHandler = (e: MouseEvent, data: DraggableData) => void;\n\nexport type ControlPosition = {x: number, y: number};\n\nexport type DraggableCoreProps = {\n allowAnyClick: boolean,\n cancel: string,\n children: ReactElement,\n disabled: boolean,\n enableUserSelectHack: boolean,\n offsetParent: HTMLElement,\n grid: [number, number],\n handle: string,\n onStart: DraggableEventHandler,\n onDrag: DraggableEventHandler,\n onStop: DraggableEventHandler,\n onMouseDown: (e: MouseEvent) => void,\n};\n\n//\n// Define .\n//\n// is for advanced usage of . It maintains minimal internal state so it can\n// work well with libraries that require more control over the element.\n//\n\nexport default class DraggableCore extends React.Component {\n\n static displayName = 'DraggableCore';\n\n static propTypes = {\n /**\n * `allowAnyClick` allows dragging using any mouse button.\n * By default, we only accept the left button.\n *\n * Defaults to `false`.\n */\n allowAnyClick: PropTypes.bool,\n\n /**\n * `disabled`, if true, stops the from dragging. All handlers,\n * with the exception of `onMouseDown`, will not fire.\n */\n disabled: PropTypes.bool,\n\n /**\n * By default, we add 'user-select:none' attributes to the document body\n * to prevent ugly text selection during drag. If this is causing problems\n * for your app, set this to `false`.\n */\n enableUserSelectHack: PropTypes.bool,\n\n /**\n * `offsetParent`, if set, uses the passed DOM node to compute drag offsets\n * instead of using the parent node.\n */\n offsetParent: function(props: DraggableCoreProps, propName: $Keys) {\n if (props[propName] && props[propName].nodeType !== 1) {\n throw new Error('Draggable\\'s offsetParent must be a DOM Node.');\n }\n },\n\n /**\n * `grid` specifies the x and y that dragging should snap to.\n */\n grid: PropTypes.arrayOf(PropTypes.number),\n \n /**\n * `scale` specifies the scale of the area you are dragging inside of. It allows\n * the drag deltas to scale correctly with how far zoomed in/out you are.\n */\n scale: PropTypes.number,\n\n /**\n * `handle` specifies a selector to be used as the handle that initiates drag.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
\n *
Click me to drag
\n *
This is some other content
\n *
\n *
\n * );\n * }\n * });\n * ```\n */\n handle: PropTypes.string,\n\n /**\n * `cancel` specifies a selector to be used to prevent drag initialization.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return(\n * \n *
\n *
You can't drag from here
\n *
Dragging here works fine
\n *
\n *
\n * );\n * }\n * });\n * ```\n */\n cancel: PropTypes.string,\n\n /**\n * Called when dragging starts.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onStart: PropTypes.func,\n\n /**\n * Called while dragging.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onDrag: PropTypes.func,\n\n /**\n * Called when dragging stops.\n * If this function returns the boolean false, the drag will remain active.\n */\n onStop: PropTypes.func,\n\n /**\n * A workaround option which can be passed if onMouseDown needs to be accessed,\n * since it'll always be blocked (as there is internal use of onMouseDown)\n */\n onMouseDown: PropTypes.func,\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n };\n\n static defaultProps = {\n allowAnyClick: false, // by default only accept left click\n cancel: null,\n disabled: false,\n enableUserSelectHack: true,\n offsetParent: null,\n handle: null,\n grid: null,\n transform: null,\n onStart: function(){},\n onDrag: function(){},\n onStop: function(){},\n onMouseDown: function(){}\n };\n\n state = {\n dragging: false,\n // Used while dragging to determine deltas.\n lastX: NaN, lastY: NaN,\n touchIdentifier: null\n };\n\n componentWillUnmount() {\n // Remove any leftover event handlers. Remove both touch and mouse handlers in case\n // some browser quirk caused a touch event to fire during a mouse move, or vice versa.\n const thisNode = ReactDOM.findDOMNode(this);\n if (thisNode) {\n const {ownerDocument} = thisNode;\n removeEvent(ownerDocument, eventsFor.mouse.move, this.handleDrag);\n removeEvent(ownerDocument, eventsFor.touch.move, this.handleDrag);\n removeEvent(ownerDocument, eventsFor.mouse.stop, this.handleDragStop);\n removeEvent(ownerDocument, eventsFor.touch.stop, this.handleDragStop);\n if (this.props.enableUserSelectHack) removeUserSelectStyles(ownerDocument);\n }\n }\n\n handleDragStart: EventHandler = (e) => {\n // Make it possible to attach event handlers on top of this one.\n this.props.onMouseDown(e);\n\n // Only accept left-clicks.\n if (!this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false;\n\n // Get nodes. Be sure to grab relative document (could be iframed)\n const thisNode = ReactDOM.findDOMNode(this);\n if (!thisNode || !thisNode.ownerDocument || !thisNode.ownerDocument.body) {\n throw new Error(' not mounted on DragStart!');\n }\n const {ownerDocument} = thisNode;\n\n // Short circuit if handle or cancel prop was provided and selector doesn't match.\n if (this.props.disabled ||\n (!(e.target instanceof ownerDocument.defaultView.Node)) ||\n (this.props.handle && !matchesSelectorAndParentsTo(e.target, this.props.handle, thisNode)) ||\n (this.props.cancel && matchesSelectorAndParentsTo(e.target, this.props.cancel, thisNode))) {\n return;\n }\n\n // Set touch identifier in component state if this is a touch event. This allows us to\n // distinguish between individual touches on multitouch screens by identifying which\n // touchpoint was set to this element.\n const touchIdentifier = getTouchIdentifier(e);\n this.setState({touchIdentifier});\n\n // Get the current drag point from the event. This is used as the offset.\n const position = getControlPosition(e, touchIdentifier, this);\n if (position == null) return; // not possible but satisfies flow\n const {x, y} = position;\n\n // Create an event object with all the data parents need to make a decision here.\n const coreEvent = createCoreData(this, x, y);\n\n log('DraggableCore: handleDragStart: %j', coreEvent);\n\n // Call event handler. If it returns explicit false, cancel.\n log('calling', this.props.onStart);\n const shouldUpdate = this.props.onStart(e, coreEvent);\n if (shouldUpdate === false) return;\n\n // Add a style to the body to disable user-select. This prevents text from\n // being selected all over the page.\n if (this.props.enableUserSelectHack) addUserSelectStyles(ownerDocument);\n\n // Initiate dragging. Set the current x and y as offsets\n // so we know how much we've moved during the drag. This allows us\n // to drag elements around even if they have been moved, without issue.\n this.setState({\n dragging: true,\n\n lastX: x,\n lastY: y\n });\n\n // Add events to the document directly so we catch when the user's mouse/touch moves outside of\n // this element. We use different events depending on whether or not we have detected that this\n // is a touch-capable device.\n addEvent(ownerDocument, dragEventFor.move, this.handleDrag);\n addEvent(ownerDocument, dragEventFor.stop, this.handleDragStop);\n };\n\n handleDrag: EventHandler = (e) => {\n\n // Prevent scrolling on mobile devices, like ipad/iphone.\n if (e.type === 'touchmove') e.preventDefault();\n\n // Get the current drag point from the event. This is used as the offset.\n const position = getControlPosition(e, this.state.touchIdentifier, this);\n if (position == null) return;\n let {x, y} = position;\n\n // Snap to grid if prop has been provided\n if (Array.isArray(this.props.grid)) {\n let deltaX = x - this.state.lastX, deltaY = y - this.state.lastY;\n [deltaX, deltaY] = snapToGrid(this.props.grid, deltaX, deltaY);\n if (!deltaX && !deltaY) return; // skip useless drag\n x = this.state.lastX + deltaX, y = this.state.lastY + deltaY;\n }\n\n const coreEvent = createCoreData(this, x, y);\n\n log('DraggableCore: handleDrag: %j', coreEvent);\n\n // Call event handler. If it returns explicit false, trigger end.\n const shouldUpdate = this.props.onDrag(e, coreEvent);\n if (shouldUpdate === false) {\n try {\n // $FlowIgnore\n this.handleDragStop(new MouseEvent('mouseup'));\n } catch (err) {\n // Old browsers\n const event = ((document.createEvent('MouseEvents'): any): MouseTouchEvent);\n // I see why this insanity was deprecated\n // $FlowIgnore\n event.initMouseEvent('mouseup', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);\n this.handleDragStop(event);\n }\n return;\n }\n\n this.setState({\n lastX: x,\n lastY: y\n });\n };\n\n handleDragStop: EventHandler = (e) => {\n if (!this.state.dragging) return;\n\n const position = getControlPosition(e, this.state.touchIdentifier, this);\n if (position == null) return;\n const {x, y} = position;\n const coreEvent = createCoreData(this, x, y);\n\n const thisNode = ReactDOM.findDOMNode(this);\n if (thisNode) {\n // Remove user-select hack\n if (this.props.enableUserSelectHack) removeUserSelectStyles(thisNode.ownerDocument);\n }\n\n log('DraggableCore: handleDragStop: %j', coreEvent);\n\n // Reset the el.\n this.setState({\n dragging: false,\n lastX: NaN,\n lastY: NaN\n });\n\n // Call event handler\n this.props.onStop(e, coreEvent);\n\n if (thisNode) {\n // Remove event handlers\n log('DraggableCore: Removing handlers');\n removeEvent(thisNode.ownerDocument, dragEventFor.move, this.handleDrag);\n removeEvent(thisNode.ownerDocument, dragEventFor.stop, this.handleDragStop);\n }\n };\n\n onMouseDown: EventHandler = (e) => {\n dragEventFor = eventsFor.mouse; // on touchscreen laptops we could switch back to mouse\n\n return this.handleDragStart(e);\n };\n\n onMouseUp: EventHandler = (e) => {\n dragEventFor = eventsFor.mouse;\n\n return this.handleDragStop(e);\n };\n\n // Same as onMouseDown (start drag), but now consider this a touch device.\n onTouchStart: EventHandler = (e) => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStart(e);\n };\n\n onTouchEnd: EventHandler = (e) => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStop(e);\n };\n\n render() {\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return React.cloneElement(React.Children.only(this.props.children), {\n style: styleHacks(this.props.children.props.style),\n\n // Note: mouseMove handler is attached to document so it will still function\n // when the user drags quickly and leaves the bounds of the element.\n onMouseDown: this.onMouseDown,\n onTouchStart: this.onTouchStart,\n onMouseUp: this.onMouseUp,\n onTouchEnd: this.onTouchEnd\n });\n }\n}\n","// @flow\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport classNames from 'classnames';\nimport {createCSSTransform, createSVGTransform} from './utils/domFns';\nimport {canDragX, canDragY, createDraggableData, getBoundPosition} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport DraggableCore from './DraggableCore';\nimport type {ControlPosition, DraggableBounds, DraggableCoreProps} from './DraggableCore';\nimport log from './utils/log';\nimport type {DraggableEventHandler} from './utils/types';\nimport type {Element as ReactElement} from 'react';\n\ntype DraggableState = {\n dragging: boolean,\n dragged: boolean,\n x: number, y: number,\n slackX: number, slackY: number,\n isElementSVG: boolean\n};\n\nexport type DraggableProps = {\n ...$Exact,\n axis: 'both' | 'x' | 'y' | 'none',\n bounds: DraggableBounds | string | false,\n defaultClassName: string,\n defaultClassNameDragging: string,\n defaultClassNameDragged: string,\n defaultPosition: ControlPosition,\n position: ControlPosition,\n scale: number\n};\n\n//\n// Define \n//\n\nexport default class Draggable extends React.Component {\n\n static displayName = 'Draggable';\n\n static propTypes = {\n // Accepts all props accepts.\n ...DraggableCore.propTypes,\n\n /**\n * `axis` determines which axis the draggable can move.\n *\n * Note that all callbacks will still return data as normal. This only\n * controls flushing to the DOM.\n *\n * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n * 'none' limits all movement.\n *\n * Defaults to 'both'.\n */\n axis: PropTypes.oneOf(['both', 'x', 'y', 'none']),\n\n /**\n * `bounds` determines the range of movement available to the element.\n * Available values are:\n *\n * 'parent' restricts movement within the Draggable's parent node.\n *\n * Alternatively, pass an object with the following properties, all of which are optional:\n *\n * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}\n *\n * All values are in px.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
Content
\n *
\n * );\n * }\n * });\n * ```\n */\n bounds: PropTypes.oneOfType([\n PropTypes.shape({\n left: PropTypes.number,\n right: PropTypes.number,\n top: PropTypes.number,\n bottom: PropTypes.number\n }),\n PropTypes.string,\n PropTypes.oneOf([false])\n ]),\n\n defaultClassName: PropTypes.string,\n defaultClassNameDragging: PropTypes.string,\n defaultClassNameDragged: PropTypes.string,\n\n /**\n * `defaultPosition` specifies the x and y that the dragged item should start at\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I start with transformX: 25px and transformY: 25px;
\n *
\n * );\n * }\n * });\n * ```\n */\n defaultPosition: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n\n /**\n * `position`, if present, defines the current position of the element.\n *\n * This is similar to how form elements in React work - if no `position` is supplied, the component\n * is uncontrolled.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I start with transformX: 25px and transformY: 25px;
\n *
\n * );\n * }\n * });\n * ```\n */\n position: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n };\n\n static defaultProps = {\n ...DraggableCore.defaultProps,\n axis: 'both',\n bounds: false,\n defaultClassName: 'react-draggable',\n defaultClassNameDragging: 'react-draggable-dragging',\n defaultClassNameDragged: 'react-draggable-dragged',\n defaultPosition: {x: 0, y: 0},\n position: null,\n scale: 1\n };\n\n constructor(props: DraggableProps) {\n super(props);\n\n this.state = {\n // Whether or not we are currently dragging.\n dragging: false,\n\n // Whether or not we have been dragged before.\n dragged: false,\n\n // Current transform x and y.\n x: props.position ? props.position.x : props.defaultPosition.x,\n y: props.position ? props.position.y : props.defaultPosition.y,\n\n // Used for compensating for out-of-bounds drags\n slackX: 0, slackY: 0,\n\n // Can only determine if SVG after mounting\n isElementSVG: false\n };\n }\n\n componentWillMount() {\n if (this.props.position && !(this.props.onDrag || this.props.onStop)) {\n // eslint-disable-next-line\n console.warn('A `position` was applied to this , without drag handlers. This will make this ' +\n 'component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the ' +\n '`position` of this element.');\n }\n }\n\n componentDidMount() {\n // Check to see if the element passed is an instanceof SVGElement\n if(typeof window.SVGElement !== 'undefined' && ReactDOM.findDOMNode(this) instanceof window.SVGElement) {\n this.setState({ isElementSVG: true });\n }\n }\n\n componentWillReceiveProps(nextProps: Object) {\n // Set x/y if position has changed\n if (nextProps.position &&\n (!this.props.position ||\n nextProps.position.x !== this.props.position.x ||\n nextProps.position.y !== this.props.position.y\n )\n ) {\n this.setState({ x: nextProps.position.x, y: nextProps.position.y });\n }\n }\n\n componentWillUnmount() {\n this.setState({dragging: false}); // prevents invariant if unmounted while dragging\n }\n\n onDragStart: DraggableEventHandler = (e, coreData) => {\n log('Draggable: onDragStart: %j', coreData);\n\n // Short-circuit if user's callback killed it.\n const shouldStart = this.props.onStart(e, createDraggableData(this, coreData));\n // Kills start event on core as well, so move handlers are never bound.\n if (shouldStart === false) return false;\n\n this.setState({dragging: true, dragged: true});\n };\n\n onDrag: DraggableEventHandler = (e, coreData) => {\n if (!this.state.dragging) return false;\n log('Draggable: onDrag: %j', coreData);\n\n const uiData = createDraggableData(this, coreData);\n\n const newState: $Shape = {\n x: uiData.x,\n y: uiData.y\n };\n\n // Keep within bounds.\n if (this.props.bounds) {\n // Save original x and y.\n const {x, y} = newState;\n\n // Add slack to the values used to calculate bound position. This will ensure that if\n // we start removing slack, the element won't react to it right away until it's been\n // completely removed.\n newState.x += this.state.slackX;\n newState.y += this.state.slackY;\n\n // Get bound position. This will ceil/floor the x and y within the boundaries.\n const [newStateX, newStateY] = getBoundPosition(this, newState.x, newState.y);\n newState.x = newStateX;\n newState.y = newStateY;\n\n // Recalculate slack by noting how much was shaved by the boundPosition handler.\n newState.slackX = this.state.slackX + (x - newState.x);\n newState.slackY = this.state.slackY + (y - newState.y);\n\n // Update the event we fire to reflect what really happened after bounds took effect.\n uiData.x = newState.x;\n uiData.y = newState.y;\n uiData.deltaX = newState.x - this.state.x;\n uiData.deltaY = newState.y - this.state.y;\n }\n\n // Short-circuit if user's callback killed it.\n const shouldUpdate = this.props.onDrag(e, uiData);\n if (shouldUpdate === false) return false;\n\n this.setState(newState);\n };\n\n onDragStop: DraggableEventHandler = (e, coreData) => {\n if (!this.state.dragging) return false;\n\n // Short-circuit if user's callback killed it.\n const shouldStop = this.props.onStop(e, createDraggableData(this, coreData));\n if (shouldStop === false) return false;\n\n log('Draggable: onDragStop: %j', coreData);\n\n const newState: $Shape = {\n dragging: false,\n slackX: 0,\n slackY: 0\n };\n\n // If this is a controlled component, the result of this operation will be to\n // revert back to the old position. We expect a handler on `onDragStop`, at the least.\n const controlled = Boolean(this.props.position);\n if (controlled) {\n const {x, y} = this.props.position;\n newState.x = x;\n newState.y = y;\n }\n\n this.setState(newState);\n };\n\n render(): ReactElement {\n let style = {}, svgTransform = null;\n\n // If this is controlled, we don't want to move it - unless it's dragging.\n const controlled = Boolean(this.props.position);\n const draggable = !controlled || this.state.dragging;\n\n const position = this.props.position || this.props.defaultPosition;\n const transformOpts = {\n // Set left if horizontal drag is enabled\n x: canDragX(this) && draggable ?\n this.state.x :\n position.x,\n\n // Set top if vertical drag is enabled\n y: canDragY(this) && draggable ?\n this.state.y :\n position.y\n };\n\n // If this element was SVG, we use the `transform` attribute.\n if (this.state.isElementSVG) {\n svgTransform = createSVGTransform(transformOpts);\n } else {\n // Add a CSS transform to move the element around. This allows us to move the element around\n // without worrying about whether or not it is relatively or absolutely positioned.\n // If the item you are dragging already has a transform set, wrap it in a so \n // has a clean slate.\n style = createCSSTransform(transformOpts);\n }\n\n const {\n defaultClassName,\n defaultClassNameDragging,\n defaultClassNameDragged\n } = this.props;\n\n const children = React.Children.only(this.props.children);\n\n // Mark with class while dragging\n const className = classNames((children.props.className || ''), defaultClassName, {\n [defaultClassNameDragging]: this.state.dragging,\n [defaultClassNameDragged]: this.state.dragged\n });\n\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return (\n \n {React.cloneElement(children, {\n className: className,\n style: {...children.props.style, ...style},\n transform: svgTransform\n })}\n \n );\n }\n}\n","import Draggable from './Draggable';\nimport DraggableCore from './DraggableCore';\n\n// Previous versions of this lib exported as the root export. As to not break\n// them, or TypeScript, we export *both* as the root and as 'default'.\n// See https://github.com/mzabriskie/react-draggable/pull/254\n// and https://github.com/mzabriskie/react-draggable/issues/266\nDraggable.default = Draggable;\nDraggable.DraggableCore = DraggableCore;\n\nexport default Draggable;\n"],"names":["makeEmptyFunction","arg","emptyFunction","thatReturns","thatReturnsFalse","thatReturnsTrue","thatReturnsNull","thatReturnsThis","this","thatReturnsArgument","condition","format","a","b","c","d","e","f","error","undefined","Error","args","argIndex","replace","name","framesToPop","getOwnPropertySymbols","Object","hasOwnProperty","prototype","propIsEnumerable","propertyIsEnumerable","assign","test1","String","getOwnPropertyNames","test2","i","fromCharCode","map","n","join","test3","split","forEach","letter","keys","err","shouldUseNative","module","shim","props","propName","componentName","location","propFullName","secret","ReactPropTypesSecret","invariant","getShim","isRequired","ReactPropTypes","array","bool","func","number","object","string","symbol","any","arrayOf","element","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","require$$1","hasOwn","classNames","classes","arguments","length","argType","push","Array","isArray","apply","key","call","exports","window","findInArray","callback","isFunction","toString","isNum","num","isNaN","int","parseInt","dontSetMe","prefixes","browserPrefixToKey","prop","prefix","str","out","shouldCapitalize","toUpperCase","kebabToTitleCase","document","style","documentElement","getPrefix","matchesSelectorFunc","matchesSelector","el","selector","method","matchesSelectorAndParentsTo","baseNode","parentNode","addEvent","event","handler","attachEvent","addEventListener","removeEvent","detachEvent","removeEventListener","addUserSelectStyles","doc","className","styleEl","getElementById","createElement","type","id","innerHTML","getElementsByTagName","appendChild","body","classList","add","match","RegExp","removeUserSelectStyles","remove","selection","empty","getSelection","removeAllRanges","getBoundPosition","draggable","x","y","bounds","left","top","right","bottom","cloneBounds","findDOMNode","ownerDocument","ownerWindow","defaultView","boundNode","querySelector","HTMLElement","nodeStyle","getComputedStyle","boundNodeStyle","offsetLeft","paddingLeft","marginLeft","offsetTop","paddingTop","marginTop","width","clientWidth","computedStyle","paddingRight","innerWidth","borderLeftWidth","borderRightWidth","outerWidth","marginRight","height","clientHeight","paddingBottom","innerHeight","borderTopWidth","borderBottomWidth","outerHeight","marginBottom","Math","min","max","getControlPosition","touchIdentifier","draggableCore","touchObj","identifier","targetTouches","t","changedTouches","getTouch","evt","offsetParent","offsetParentRect","getBoundingClientRect","clientX","scrollLeft","clientY","scrollTop","offsetXYFromParent","createCoreData","state","isStart","lastX","deltaY","lastY","createDraggableData","coreData","scale","deltaX","ReactDOM","eventsFor","dragEventFor","mouse","DraggableCore","NaN","handleDragStart","onMouseDown","_this","allowAnyClick","button","thisNode","disabled","target","Node","handle","cancel","getTouchIdentifier","setState","position","coreEvent","onStart","enableUserSelectHack","move","handleDrag","stop","handleDragStop","preventDefault","grid","pendingX","pendingY","round","onDrag","MouseEvent","createEvent","initMouseEvent","dragging","onStop","onMouseUp","onTouchStart","touch","onTouchEnd","React","cloneElement","Children","only","children","childStyle","styleHacks","Component","displayName","propTypes","nodeType","defaultProps","Draggable","onDragStart","dragged","uiData","newState","slackX","slackY","newStateX","newStateY","onDragStop","Boolean","defaultPosition","warn","SVGElement","isElementSVG","nextProps","svgTransform","transformOpts","axis","canDragX","canDragY","browserPrefix","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","default"],"mappings":"uUAWA,SAASA,EAAkBC,GACzB,OAAO,WACL,OAAOA,6FASX,IAAIC,EAAgB,aAEpBA,EAAcC,YAAcH,EAC5BE,EAAcE,iBAAmBJ,GAAkB,GACnDE,EAAcG,gBAAkBL,GAAkB,GAClDE,EAAcI,gBAAkBN,EAAkB,MAClDE,EAAcK,gBAAkB,WAC9B,OAAOC,MA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NJ/I,EACR,MADWC,EACD,KANFD,KG+NH+I,GH/NG/I,EAAGC,IAAAA,SAE5BrD,EAAmB,YAAauM,GAAiB,aAAenJ,EAAI,MAAQC,EAAI,cGoOnFxJ,KAAK2C,MAHPgQ,IAAAA,iBACAC,IAAAA,yBACAC,IAAAA,wBAGIhC,EAAWJ,EAAME,SAASC,KAAK5Q,KAAK2C,MAAMkO,UAG1C5I,EAAYtD,EAAYkM,EAASlO,MAAMsF,WAAa,GAAK0K,UAC5DC,EAA2B5S,KAAKsN,MAAM6C,cACtC0C,EAA0B7S,KAAKsN,MAAMiE,oBAMtCd,uBAAmBzQ,KAAK2C,OAAOyM,QAASpP,KAAKsR,YAAavB,OAAQ/P,KAAK+P,OAAQK,OAAQpQ,KAAK8R,eACnFpB,aAAaG,aACP5I,aACA4I,EAASlO,MAAMiE,MAAUA,aACzByL,YAhUkB5B,EAAMO,kBAAxBK,EAEZJ,YAAc,YAFFI,EAIZH,eAEF/C,EAAc+C,gBAeX1M,EAAUL,OAAO,OAAQ,IAAK,IAAK,gBA4BjCK,EAAUJ,WAChBI,EAAUH,YACFG,EAAUf,aACTe,EAAUf,WACZe,EAAUf,cACPe,EAAUf,SAEpBe,EAAUb,OACVa,EAAUL,QAAO,uBAGDK,EAAUb,gCACFa,EAAUb,+BACXa,EAAUb,uBAmBlBa,EAAUH,SACtBG,EAAUf,SACVe,EAAUf,kBAuBLe,EAAUH,SACfG,EAAUf,SACVe,EAAUf,mBAMJwC,QACJA,YACIA,IApHMoL,EAuHZD,kBACFjD,EAAciD,mBACX,eACE,mBACU,2CACQ,mDACD,2CACP7H,EAAG,EAAGC,EAAG,YACjB,WACH,IC/JX6H,EAAUyB,QAAUzB,EACpBA,EAAUlD,cAAgBA"} \ No newline at end of file +{"version":3,"file":"react-draggable.min.js","sources":["../node_modules/react-is/cjs/react-is.production.min.js","../node_modules/react-is/index.js","../node_modules/object-assign/index.js","../node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/prop-types/factoryWithTypeCheckers.js","../node_modules/prop-types/factoryWithThrowingShims.js","../node_modules/prop-types/index.js","../node_modules/classnames/index.js","../lib/utils/shims.js","../lib/utils/getPrefix.js","../lib/utils/domFns.js","../lib/utils/positionFns.js","../lib/DraggableCore.js","../lib/Draggable.js","../lib/umd.js"],"sourcesContent":["/** @license React v16.8.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';Object.defineProperty(exports,\"__esModule\",{value:!0});\nvar b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?Symbol.for(\"react.memo\"):\n60115,r=b?Symbol.for(\"react.lazy\"):60116;function t(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case h:return a;default:return u}}case r:case q:case d:return u}}}function v(a){return t(a)===m}exports.typeOf=t;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;\nexports.Fragment=e;exports.Lazy=r;exports.Memo=q;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||\"object\"===typeof a&&null!==a&&(a.$$typeof===r||a.$$typeof===q||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n)};exports.isAsyncMode=function(a){return v(a)||t(a)===l};exports.isConcurrentMode=v;exports.isContextConsumer=function(a){return t(a)===k};\nexports.isContextProvider=function(a){return t(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return t(a)===n};exports.isFragment=function(a){return t(a)===e};exports.isLazy=function(a){return t(a)===r};exports.isMemo=function(a){return t(a)===q};exports.isPortal=function(a){return t(a)===d};exports.isProfiler=function(a){return t(a)===g};exports.isStrictMode=function(a){return t(a)===f};\nexports.isSuspense=function(a){return t(a)===p};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar has = Function.call.bind(Object.prototype.hasOwnProperty);\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n if (getPropType(value) === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from\n // props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","// @flow\n// @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc\nexport function findInArray(array: Array | TouchList, callback: Function): any {\n for (let i = 0, length = array.length; i < length; i++) {\n if (callback.apply(callback, [array[i], i, array])) return array[i];\n }\n}\n\nexport function isFunction(func: any): boolean {\n return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';\n}\n\nexport function isNum(num: any): boolean {\n return typeof num === 'number' && !isNaN(num);\n}\n\nexport function int(a: string): number {\n return parseInt(a, 10);\n}\n\nexport function dontSetMe(props: Object, propName: string, componentName: string) {\n if (props[propName]) {\n return new Error(`Invalid prop ${propName} passed to ${componentName} - do not set this, set it on the child.`);\n }\n}\n","// @flow\nconst prefixes = ['Moz', 'Webkit', 'O', 'ms'];\nexport function getPrefix(prop: string='transform'): string {\n // Checking specifically for 'window.document' is for pseudo-browser server-side\n // environments that define 'window' as the global context.\n // E.g. React-rails (see https://github.com/reactjs/react-rails/pull/84)\n if (typeof window === 'undefined' || typeof window.document === 'undefined') return '';\n\n const style = window.document.documentElement.style;\n\n if (prop in style) return '';\n\n for (let i = 0; i < prefixes.length; i++) {\n if (browserPrefixToKey(prop, prefixes[i]) in style) return prefixes[i];\n }\n\n return '';\n}\n\nexport function browserPrefixToKey(prop: string, prefix: string): string {\n return prefix ? `${prefix}${kebabToTitleCase(prop)}` : prop;\n}\n\nexport function browserPrefixToStyle(prop: string, prefix: string): string {\n return prefix ? `-${prefix.toLowerCase()}-${prop}` : prop;\n}\n\nfunction kebabToTitleCase(str: string): string {\n let out = '';\n let shouldCapitalize = true;\n for (let i = 0; i < str.length; i++) {\n if (shouldCapitalize) {\n out += str[i].toUpperCase();\n shouldCapitalize = false;\n } else if (str[i] === '-') {\n shouldCapitalize = true;\n } else {\n out += str[i];\n }\n }\n return out;\n}\n\n// Default export is the prefix itself, like 'Moz', 'Webkit', etc\n// Note that you may have to re-test for certain things; for instance, Chrome 50\n// can handle unprefixed `transform`, but not unprefixed `user-select`\nexport default getPrefix();\n","// @flow\nimport {findInArray, isFunction, int} from './shims';\nimport browserPrefix, {browserPrefixToKey} from './getPrefix';\n\nimport type {ControlPosition, MouseTouchEvent} from './types';\n\nlet matchesSelectorFunc = '';\nexport function matchesSelector(el: Node, selector: string): boolean {\n if (!matchesSelectorFunc) {\n matchesSelectorFunc = findInArray([\n 'matches',\n 'webkitMatchesSelector',\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'oMatchesSelector'\n ], function(method){\n // $FlowIgnore: Doesn't think elements are indexable\n return isFunction(el[method]);\n });\n }\n\n // Might not be found entirely (not an Element?) - in that case, bail\n // $FlowIgnore: Doesn't think elements are indexable\n if (!isFunction(el[matchesSelectorFunc])) return false;\n\n // $FlowIgnore: Doesn't think elements are indexable\n return el[matchesSelectorFunc](selector);\n}\n\n// Works up the tree to the draggable itself attempting to match selector.\nexport function matchesSelectorAndParentsTo(el: Node, selector: string, baseNode: Node): boolean {\n let node = el;\n do {\n if (matchesSelector(node, selector)) return true;\n if (node === baseNode) return false;\n node = node.parentNode;\n } while (node);\n\n return false;\n}\n\nexport function addEvent(el: ?Node, event: string, handler: Function): void {\n if (!el) { return; }\n if (el.attachEvent) {\n el.attachEvent('on' + event, handler);\n } else if (el.addEventListener) {\n el.addEventListener(event, handler, true);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = handler;\n }\n}\n\nexport function removeEvent(el: ?Node, event: string, handler: Function): void {\n if (!el) { return; }\n if (el.detachEvent) {\n el.detachEvent('on' + event, handler);\n } else if (el.removeEventListener) {\n el.removeEventListener(event, handler, true);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = null;\n }\n}\n\nexport function outerHeight(node: HTMLElement): number {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetTop which is including margin. See getBoundPosition\n let height = node.clientHeight;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n height += int(computedStyle.borderTopWidth);\n height += int(computedStyle.borderBottomWidth);\n return height;\n}\n\nexport function outerWidth(node: HTMLElement): number {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetLeft which is including margin. See getBoundPosition\n let width = node.clientWidth;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n width += int(computedStyle.borderLeftWidth);\n width += int(computedStyle.borderRightWidth);\n return width;\n}\nexport function innerHeight(node: HTMLElement): number {\n let height = node.clientHeight;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n height -= int(computedStyle.paddingTop);\n height -= int(computedStyle.paddingBottom);\n return height;\n}\n\nexport function innerWidth(node: HTMLElement): number {\n let width = node.clientWidth;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n width -= int(computedStyle.paddingLeft);\n width -= int(computedStyle.paddingRight);\n return width;\n}\n\n// Get from offsetParent\nexport function offsetXYFromParent(evt: {clientX: number, clientY: number}, offsetParent: HTMLElement): ControlPosition {\n const isBody = offsetParent === offsetParent.ownerDocument.body;\n const offsetParentRect = isBody ? {left: 0, top: 0} : offsetParent.getBoundingClientRect();\n\n const x = evt.clientX + offsetParent.scrollLeft - offsetParentRect.left;\n const y = evt.clientY + offsetParent.scrollTop - offsetParentRect.top;\n\n return {x, y};\n}\n\nexport function createCSSTransform({x, y, r}: {x: number, y: number, r: number}): Object {\n // Replace unitless items with px\n return {[browserPrefixToKey('transform', browserPrefix)]: `translate(${x}px, ${y}px) rotate(${r}deg)`};\n}\n\nexport function createSVGTransform({x, y, r}: {x: number, y: number, r:number}): string {\n return `translate(${x}, ${y}) rotate(${r})`;\n}\n\nexport function getTouch(e: MouseTouchEvent, identifier: number): ?{clientX: number, clientY: number} {\n return (e.targetTouches && findInArray(e.targetTouches, t => identifier === t.identifier)) ||\n (e.changedTouches && findInArray(e.changedTouches, t => identifier === t.identifier));\n}\n\nexport function getTouchIdentifier(e: MouseTouchEvent): ?number {\n if (e.targetTouches && e.targetTouches[0]) return e.targetTouches[0].identifier;\n if (e.changedTouches && e.changedTouches[0]) return e.changedTouches[0].identifier;\n}\n\n// User-select Hacks:\n//\n// Useful for preventing blue highlights all over everything when dragging.\n\n// Note we're passing `document` b/c we could be iframed\nexport function addUserSelectStyles(doc: ?Document) {\n if (!doc) return;\n let styleEl = doc.getElementById('react-draggable-style-el');\n if (!styleEl) {\n styleEl = doc.createElement('style');\n styleEl.type = 'text/css';\n styleEl.id = 'react-draggable-style-el';\n styleEl.innerHTML = '.react-draggable-transparent-selection *::-moz-selection {background: transparent;}\\n';\n styleEl.innerHTML += '.react-draggable-transparent-selection *::selection {background: transparent;}\\n';\n doc.getElementsByTagName('head')[0].appendChild(styleEl);\n }\n if (doc.body) addClassName(doc.body, 'react-draggable-transparent-selection');\n}\n\nexport function removeUserSelectStyles(doc: ?Document) {\n try {\n if (doc && doc.body) removeClassName(doc.body, 'react-draggable-transparent-selection');\n // $FlowIgnore: IE\n if (doc.selection) {\n // $FlowIgnore: IE\n doc.selection.empty();\n } else {\n window.getSelection().removeAllRanges(); // remove selection caused by scroll\n }\n } catch (e) {\n // probably IE\n }\n}\n\nexport function styleHacks(childStyle: Object = {}): Object {\n // Workaround IE pointer events; see #51\n // https://github.com/mzabriskie/react-draggable/issues/51#issuecomment-103488278\n return {\n touchAction: 'none',\n ...childStyle\n };\n}\n\nexport function addClassName(el: HTMLElement, className: string) {\n if (el.classList) {\n el.classList.add(className);\n } else {\n if (!el.className.match(new RegExp(`(?:^|\\\\s)${className}(?!\\\\S)`))) {\n el.className += ` ${className}`;\n }\n }\n}\n\nexport function removeClassName(el: HTMLElement, className: string) {\n if (el.classList) {\n el.classList.remove(className);\n } else {\n el.className = el.className.replace(new RegExp(`(?:^|\\\\s)${className}(?!\\\\S)`, 'g'), '');\n }\n}\n","// @flow\nimport {isNum, int} from './shims';\nimport ReactDOM from 'react-dom';\nimport {getTouch, innerWidth, innerHeight, offsetXYFromParent, outerWidth, outerHeight} from './domFns';\n\nimport type Draggable from '../Draggable';\nimport type {Bounds, ControlPosition, DraggableData, MouseTouchEvent} from './types';\nimport type DraggableCore from '../DraggableCore';\n\nexport function getBoundPosition(draggable: Draggable, x: number, y: number): [number, number] {\n // If no bounds, short-circuit and move on\n if (!draggable.props.bounds) return [x, y];\n\n // Clone new bounds\n let {bounds} = draggable.props;\n bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds);\n const node = findDOMNode(draggable);\n\n if (typeof bounds === 'string') {\n const {ownerDocument} = node;\n const ownerWindow = ownerDocument.defaultView;\n let boundNode;\n if (bounds === 'parent') {\n boundNode = node.parentNode;\n } else {\n boundNode = ownerDocument.querySelector(bounds);\n }\n if (!(boundNode instanceof ownerWindow.HTMLElement)) {\n throw new Error('Bounds selector \"' + bounds + '\" could not find an element.');\n }\n const nodeStyle = ownerWindow.getComputedStyle(node);\n const boundNodeStyle = ownerWindow.getComputedStyle(boundNode);\n // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n bounds = {\n left: -node.offsetLeft + int(boundNodeStyle.paddingLeft) + int(nodeStyle.marginLeft),\n top: -node.offsetTop + int(boundNodeStyle.paddingTop) + int(nodeStyle.marginTop),\n right: innerWidth(boundNode) - outerWidth(node) - node.offsetLeft +\n int(boundNodeStyle.paddingRight) - int(nodeStyle.marginRight),\n bottom: innerHeight(boundNode) - outerHeight(node) - node.offsetTop +\n int(boundNodeStyle.paddingBottom) - int(nodeStyle.marginBottom)\n };\n }\n\n // Keep x and y below right and bottom limits...\n if (isNum(bounds.right)) x = Math.min(x, bounds.right);\n if (isNum(bounds.bottom)) y = Math.min(y, bounds.bottom);\n\n // But above left and top limits.\n if (isNum(bounds.left)) x = Math.max(x, bounds.left);\n if (isNum(bounds.top)) y = Math.max(y, bounds.top);\n\n return [x, y];\n}\n\nexport function snapToGrid(grid: [number, number], pendingX: number, pendingY: number): [number, number] {\n const x = Math.round(pendingX / grid[0]) * grid[0];\n const y = Math.round(pendingY / grid[1]) * grid[1];\n return [x, y];\n}\n\nexport function canDragX(draggable: Draggable): boolean {\n return draggable.props.axis === 'both' || draggable.props.axis === 'x';\n}\n\nexport function canDragY(draggable: Draggable): boolean {\n return draggable.props.axis === 'both' || draggable.props.axis === 'y';\n}\n\n// Get {x, y} positions from event.\nexport function getControlPosition(e: MouseTouchEvent, touchIdentifier: ?number, draggableCore: DraggableCore): ?ControlPosition {\n const touchObj = typeof touchIdentifier === 'number' ? getTouch(e, touchIdentifier) : null;\n if (typeof touchIdentifier === 'number' && !touchObj) return null; // not the right touch\n const node = findDOMNode(draggableCore);\n // User can provide an offsetParent if desired.\n const offsetParent = draggableCore.props.offsetParent || node.offsetParent || node.ownerDocument.body;\n return offsetXYFromParent(touchObj || e, offsetParent);\n}\n\n// Create an data object exposed by 's events\nexport function createCoreData(draggable: DraggableCore, x: number, y: number): DraggableData {\n const state = draggable.state;\n const isStart = !isNum(state.lastX);\n const node = findDOMNode(draggable);\n\n if (isStart) {\n // If this is our first move, use the x and y as last coords.\n return {\n node,\n deltaX: 0, deltaY: 0,\n lastX: x, lastY: y,\n x, y,\n };\n } else {\n // Otherwise calculate proper values.\n return {\n node,\n deltaX: x - state.lastX, deltaY: y - state.lastY,\n lastX: state.lastX, lastY: state.lastY,\n x, y,\n };\n }\n}\n\n// Create an data exposed by 's events\nexport function createDraggableData(draggable: Draggable, coreData: DraggableData): DraggableData {\n const scale = draggable.props.scale;\n return {\n node: coreData.node,\n x: draggable.state.x + (coreData.deltaX / scale),\n y: draggable.state.y + (coreData.deltaY / scale),\n deltaX: (coreData.deltaX / scale),\n deltaY: (coreData.deltaY / scale),\n lastX: draggable.state.x,\n lastY: draggable.state.y\n };\n}\n\n// A lot faster than stringify/parse\nfunction cloneBounds(bounds: Bounds): Bounds {\n return {\n left: bounds.left,\n top: bounds.top,\n right: bounds.right,\n bottom: bounds.bottom\n };\n}\n\nfunction findDOMNode(draggable: Draggable | DraggableCore): HTMLElement {\n const node = ReactDOM.findDOMNode(draggable);\n if (!node) {\n throw new Error(': Unmounted during event!');\n }\n // $FlowIgnore we can't assert on HTMLElement due to tests... FIXME\n return node;\n}\n","// @flow\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport {matchesSelectorAndParentsTo, addEvent, removeEvent, addUserSelectStyles, getTouchIdentifier,\n removeUserSelectStyles, styleHacks} from './utils/domFns';\nimport {createCoreData, getControlPosition, snapToGrid} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport log from './utils/log';\n\nimport type {EventHandler, MouseTouchEvent} from './utils/types';\nimport type {Element as ReactElement} from 'react';\n\n// Simple abstraction for dragging events names.\nconst eventsFor = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n stop: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n stop: 'mouseup'\n }\n};\n\n// Default to mouse events.\nlet dragEventFor = eventsFor.mouse;\n\ntype DraggableCoreState = {\n dragging: boolean,\n lastX: number,\n lastY: number,\n touchIdentifier: ?number\n};\n\nexport type DraggableBounds = {\n left: number,\n right: number,\n top: number,\n bottom: number,\n};\n\nexport type DraggableData = {\n node: HTMLElement,\n x: number, y: number,\n deltaX: number, deltaY: number,\n lastX: number, lastY: number,\n};\n\nexport type DraggableEventHandler = (e: MouseEvent, data: DraggableData) => void;\n\nexport type ControlPosition = {x: number, y: number};\n\nexport type DraggableCoreProps = {\n allowAnyClick: boolean,\n cancel: string,\n children: ReactElement,\n disabled: boolean,\n enableUserSelectHack: boolean,\n offsetParent: HTMLElement,\n grid: [number, number],\n handle: string,\n onStart: DraggableEventHandler,\n onDrag: DraggableEventHandler,\n onStop: DraggableEventHandler,\n onMouseDown: (e: MouseEvent) => void,\n};\n\n//\n// Define .\n//\n// is for advanced usage of . It maintains minimal internal state so it can\n// work well with libraries that require more control over the element.\n//\n\nexport default class DraggableCore extends React.Component {\n\n static displayName = 'DraggableCore';\n\n static propTypes = {\n /**\n * `allowAnyClick` allows dragging using any mouse button.\n * By default, we only accept the left button.\n *\n * Defaults to `false`.\n */\n allowAnyClick: PropTypes.bool,\n\n /**\n * `disabled`, if true, stops the from dragging. All handlers,\n * with the exception of `onMouseDown`, will not fire.\n */\n disabled: PropTypes.bool,\n\n /**\n * By default, we add 'user-select:none' attributes to the document body\n * to prevent ugly text selection during drag. If this is causing problems\n * for your app, set this to `false`.\n */\n enableUserSelectHack: PropTypes.bool,\n\n /**\n * `offsetParent`, if set, uses the passed DOM node to compute drag offsets\n * instead of using the parent node.\n */\n offsetParent: function(props: DraggableCoreProps, propName: $Keys) {\n if (props[propName] && props[propName].nodeType !== 1) {\n throw new Error('Draggable\\'s offsetParent must be a DOM Node.');\n }\n },\n\n /**\n * `grid` specifies the x and y that dragging should snap to.\n */\n grid: PropTypes.arrayOf(PropTypes.number),\n \n /**\n * `scale` specifies the scale of the area you are dragging inside of. It allows\n * the drag deltas to scale correctly with how far zoomed in/out you are.\n */\n scale: PropTypes.number,\n\n /**\n * `handle` specifies a selector to be used as the handle that initiates drag.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
\n *
Click me to drag
\n *
This is some other content
\n *
\n *
\n * );\n * }\n * });\n * ```\n */\n handle: PropTypes.string,\n\n /**\n * `cancel` specifies a selector to be used to prevent drag initialization.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return(\n * \n *
\n *
You can't drag from here
\n *
Dragging here works fine
\n *
\n *
\n * );\n * }\n * });\n * ```\n */\n cancel: PropTypes.string,\n\n /**\n * Called when dragging starts.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onStart: PropTypes.func,\n\n /**\n * Called while dragging.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onDrag: PropTypes.func,\n\n /**\n * Called when dragging stops.\n * If this function returns the boolean false, the drag will remain active.\n */\n onStop: PropTypes.func,\n\n /**\n * A workaround option which can be passed if onMouseDown needs to be accessed,\n * since it'll always be blocked (as there is internal use of onMouseDown)\n */\n onMouseDown: PropTypes.func,\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n };\n\n static defaultProps = {\n allowAnyClick: false, // by default only accept left click\n cancel: null,\n disabled: false,\n enableUserSelectHack: true,\n offsetParent: null,\n handle: null,\n grid: null,\n transform: null,\n onStart: function(){},\n onDrag: function(){},\n onStop: function(){},\n onMouseDown: function(){}\n };\n\n state = {\n dragging: false,\n // Used while dragging to determine deltas.\n lastX: NaN, lastY: NaN,\n touchIdentifier: null\n };\n\n componentWillUnmount() {\n // Remove any leftover event handlers. Remove both touch and mouse handlers in case\n // some browser quirk caused a touch event to fire during a mouse move, or vice versa.\n const thisNode = ReactDOM.findDOMNode(this);\n if (thisNode) {\n const {ownerDocument} = thisNode;\n removeEvent(ownerDocument, eventsFor.mouse.move, this.handleDrag);\n removeEvent(ownerDocument, eventsFor.touch.move, this.handleDrag);\n removeEvent(ownerDocument, eventsFor.mouse.stop, this.handleDragStop);\n removeEvent(ownerDocument, eventsFor.touch.stop, this.handleDragStop);\n if (this.props.enableUserSelectHack) removeUserSelectStyles(ownerDocument);\n }\n }\n\n handleDragStart: EventHandler = (e) => {\n // Make it possible to attach event handlers on top of this one.\n this.props.onMouseDown(e);\n\n // Only accept left-clicks.\n if (!this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false;\n\n // Get nodes. Be sure to grab relative document (could be iframed)\n const thisNode = ReactDOM.findDOMNode(this);\n if (!thisNode || !thisNode.ownerDocument || !thisNode.ownerDocument.body) {\n throw new Error(' not mounted on DragStart!');\n }\n const {ownerDocument} = thisNode;\n\n // Short circuit if handle or cancel prop was provided and selector doesn't match.\n if (this.props.disabled ||\n (!(e.target instanceof ownerDocument.defaultView.Node)) ||\n (this.props.handle && !matchesSelectorAndParentsTo(e.target, this.props.handle, thisNode)) ||\n (this.props.cancel && matchesSelectorAndParentsTo(e.target, this.props.cancel, thisNode))) {\n return;\n }\n\n // Set touch identifier in component state if this is a touch event. This allows us to\n // distinguish between individual touches on multitouch screens by identifying which\n // touchpoint was set to this element.\n const touchIdentifier = getTouchIdentifier(e);\n this.setState({touchIdentifier});\n\n // Get the current drag point from the event. This is used as the offset.\n const position = getControlPosition(e, touchIdentifier, this);\n if (position == null) return; // not possible but satisfies flow\n const {x, y} = position;\n\n // Create an event object with all the data parents need to make a decision here.\n const coreEvent = createCoreData(this, x, y);\n\n log('DraggableCore: handleDragStart: %j', coreEvent);\n\n // Call event handler. If it returns explicit false, cancel.\n log('calling', this.props.onStart);\n const shouldUpdate = this.props.onStart(e, coreEvent);\n if (shouldUpdate === false) return;\n\n // Add a style to the body to disable user-select. This prevents text from\n // being selected all over the page.\n if (this.props.enableUserSelectHack) addUserSelectStyles(ownerDocument);\n\n // Initiate dragging. Set the current x and y as offsets\n // so we know how much we've moved during the drag. This allows us\n // to drag elements around even if they have been moved, without issue.\n this.setState({\n dragging: true,\n\n lastX: x,\n lastY: y\n });\n\n // Add events to the document directly so we catch when the user's mouse/touch moves outside of\n // this element. We use different events depending on whether or not we have detected that this\n // is a touch-capable device.\n addEvent(ownerDocument, dragEventFor.move, this.handleDrag);\n addEvent(ownerDocument, dragEventFor.stop, this.handleDragStop);\n };\n\n handleDrag: EventHandler = (e) => {\n\n // Prevent scrolling on mobile devices, like ipad/iphone.\n if (e.type === 'touchmove') e.preventDefault();\n\n // Get the current drag point from the event. This is used as the offset.\n const position = getControlPosition(e, this.state.touchIdentifier, this);\n if (position == null) return;\n let {x, y} = position;\n\n // Snap to grid if prop has been provided\n if (Array.isArray(this.props.grid)) {\n let deltaX = x - this.state.lastX, deltaY = y - this.state.lastY;\n [deltaX, deltaY] = snapToGrid(this.props.grid, deltaX, deltaY);\n if (!deltaX && !deltaY) return; // skip useless drag\n x = this.state.lastX + deltaX, y = this.state.lastY + deltaY;\n }\n\n const coreEvent = createCoreData(this, x, y);\n\n log('DraggableCore: handleDrag: %j', coreEvent);\n\n // Call event handler. If it returns explicit false, trigger end.\n const shouldUpdate = this.props.onDrag(e, coreEvent);\n if (shouldUpdate === false) {\n try {\n // $FlowIgnore\n this.handleDragStop(new MouseEvent('mouseup'));\n } catch (err) {\n // Old browsers\n const event = ((document.createEvent('MouseEvents'): any): MouseTouchEvent);\n // I see why this insanity was deprecated\n // $FlowIgnore\n event.initMouseEvent('mouseup', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);\n this.handleDragStop(event);\n }\n return;\n }\n\n this.setState({\n lastX: x,\n lastY: y\n });\n };\n\n handleDragStop: EventHandler = (e) => {\n if (!this.state.dragging) return;\n\n const position = getControlPosition(e, this.state.touchIdentifier, this);\n if (position == null) return;\n const {x, y} = position;\n const coreEvent = createCoreData(this, x, y);\n\n const thisNode = ReactDOM.findDOMNode(this);\n if (thisNode) {\n // Remove user-select hack\n if (this.props.enableUserSelectHack) removeUserSelectStyles(thisNode.ownerDocument);\n }\n\n log('DraggableCore: handleDragStop: %j', coreEvent);\n\n // Reset the el.\n this.setState({\n dragging: false,\n lastX: NaN,\n lastY: NaN\n });\n\n // Call event handler\n this.props.onStop(e, coreEvent);\n\n if (thisNode) {\n // Remove event handlers\n log('DraggableCore: Removing handlers');\n removeEvent(thisNode.ownerDocument, dragEventFor.move, this.handleDrag);\n removeEvent(thisNode.ownerDocument, dragEventFor.stop, this.handleDragStop);\n }\n };\n\n onMouseDown: EventHandler = (e) => {\n dragEventFor = eventsFor.mouse; // on touchscreen laptops we could switch back to mouse\n\n return this.handleDragStart(e);\n };\n\n onMouseUp: EventHandler = (e) => {\n dragEventFor = eventsFor.mouse;\n\n return this.handleDragStop(e);\n };\n\n // Same as onMouseDown (start drag), but now consider this a touch device.\n onTouchStart: EventHandler = (e) => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStart(e);\n };\n\n onTouchEnd: EventHandler = (e) => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStop(e);\n };\n\n render() {\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return React.cloneElement(React.Children.only(this.props.children), {\n style: styleHacks(this.props.children.props.style),\n\n // Note: mouseMove handler is attached to document so it will still function\n // when the user drags quickly and leaves the bounds of the element.\n onMouseDown: this.onMouseDown,\n onTouchStart: this.onTouchStart,\n onMouseUp: this.onMouseUp,\n onTouchEnd: this.onTouchEnd\n });\n }\n}\n","// @flow\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport classNames from 'classnames';\nimport {createCSSTransform, createSVGTransform} from './utils/domFns';\nimport {canDragX, canDragY, createDraggableData, getBoundPosition} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport DraggableCore from './DraggableCore';\nimport type {ControlPosition, DraggableBounds, DraggableCoreProps} from './DraggableCore';\nimport log from './utils/log';\nimport type {DraggableEventHandler} from './utils/types';\nimport type {Element as ReactElement} from 'react';\n\ntype DraggableState = {\n dragging: boolean,\n dragged: boolean,\n x: number, y: number,\n slackX: number, slackY: number,\n isElementSVG: boolean\n};\n\nexport type DraggableProps = {\n ...$Exact,\n axis: 'both' | 'x' | 'y' | 'none',\n bounds: DraggableBounds | string | false,\n defaultClassName: string,\n defaultClassNameDragging: string,\n defaultClassNameDragged: string,\n defaultPosition: ControlPosition,\n position: ControlPosition,\n rotate: number,\n scale: number\n};\n\n//\n// Define \n//\n\nexport default class Draggable extends React.Component {\n\n static displayName = 'Draggable';\n\n static propTypes = {\n // Accepts all props accepts.\n ...DraggableCore.propTypes,\n\n /**\n * `axis` determines which axis the draggable can move.\n *\n * Note that all callbacks will still return data as normal. This only\n * controls flushing to the DOM.\n *\n * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n * 'none' limits all movement.\n *\n * Defaults to 'both'.\n */\n axis: PropTypes.oneOf(['both', 'x', 'y', 'none']),\n\n /**\n * `bounds` determines the range of movement available to the element.\n * Available values are:\n *\n * 'parent' restricts movement within the Draggable's parent node.\n *\n * Alternatively, pass an object with the following properties, all of which are optional:\n *\n * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}\n *\n * All values are in px.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
Content
\n *
\n * );\n * }\n * });\n * ```\n */\n bounds: PropTypes.oneOfType([\n PropTypes.shape({\n left: PropTypes.number,\n right: PropTypes.number,\n top: PropTypes.number,\n bottom: PropTypes.number\n }),\n PropTypes.string,\n PropTypes.oneOf([false])\n ]),\n\n defaultClassName: PropTypes.string,\n defaultClassNameDragging: PropTypes.string,\n defaultClassNameDragged: PropTypes.string,\n\n /**\n * `defaultPosition` specifies the x and y that the dragged item should start at\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I start with transformX: 25px and transformY: 25px;
\n *
\n * );\n * }\n * });\n * ```\n */\n defaultPosition: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n\n /**\n * `position`, if present, defines the current position of the element.\n *\n * This is similar to how form elements in React work - if no `position` is supplied, the component\n * is uncontrolled.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I start with transformX: 25px and transformY: 25px;
\n *
\n * );\n * }\n * });\n * ```\n */\n position: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n };\n\n static defaultProps = {\n ...DraggableCore.defaultProps,\n axis: 'both',\n bounds: false,\n defaultClassName: 'react-draggable',\n defaultClassNameDragging: 'react-draggable-dragging',\n defaultClassNameDragged: 'react-draggable-dragged',\n defaultPosition: {x: 0, y: 0},\n position: null,\n scale: 1\n };\n\n constructor(props: DraggableProps) {\n super(props);\n\n this.state = {\n // Whether or not we are currently dragging.\n dragging: false,\n\n // Whether or not we have been dragged before.\n dragged: false,\n\n // Current transform x and y.\n x: props.position ? props.position.x : props.defaultPosition.x,\n y: props.position ? props.position.y : props.defaultPosition.y,\n\n // Used for compensating for out-of-bounds drags\n slackX: 0, slackY: 0,\n\n // Can only determine if SVG after mounting\n isElementSVG: false\n };\n }\n\n componentWillMount() {\n if (this.props.position && !(this.props.onDrag || this.props.onStop)) {\n // eslint-disable-next-line\n console.warn('A `position` was applied to this , without drag handlers. This will make this ' +\n 'component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the ' +\n '`position` of this element.');\n }\n }\n\n componentDidMount() {\n // Check to see if the element passed is an instanceof SVGElement\n if(typeof window.SVGElement !== 'undefined' && ReactDOM.findDOMNode(this) instanceof window.SVGElement) {\n this.setState({ isElementSVG: true });\n }\n }\n\n componentWillReceiveProps(nextProps: Object) {\n // Set x/y if position has changed\n if (nextProps.position &&\n (!this.props.position ||\n nextProps.position.x !== this.props.position.x ||\n nextProps.position.y !== this.props.position.y\n )\n ) {\n this.setState({ x: nextProps.position.x, y: nextProps.position.y });\n }\n }\n\n componentWillUnmount() {\n this.setState({dragging: false}); // prevents invariant if unmounted while dragging\n }\n\n onDragStart: DraggableEventHandler = (e, coreData) => {\n log('Draggable: onDragStart: %j', coreData);\n\n // Short-circuit if user's callback killed it.\n const shouldStart = this.props.onStart(e, createDraggableData(this, coreData));\n // Kills start event on core as well, so move handlers are never bound.\n if (shouldStart === false) return false;\n\n this.setState({dragging: true, dragged: true});\n };\n\n onDrag: DraggableEventHandler = (e, coreData) => {\n if (!this.state.dragging) return false;\n log('Draggable: onDrag: %j', coreData);\n\n const uiData = createDraggableData(this, coreData);\n\n const newState: $Shape = {\n x: uiData.x,\n y: uiData.y\n };\n\n // Keep within bounds.\n if (this.props.bounds) {\n // Save original x and y.\n const {x, y} = newState;\n\n // Add slack to the values used to calculate bound position. This will ensure that if\n // we start removing slack, the element won't react to it right away until it's been\n // completely removed.\n newState.x += this.state.slackX;\n newState.y += this.state.slackY;\n\n // Get bound position. This will ceil/floor the x and y within the boundaries.\n const [newStateX, newStateY] = getBoundPosition(this, newState.x, newState.y);\n newState.x = newStateX;\n newState.y = newStateY;\n\n // Recalculate slack by noting how much was shaved by the boundPosition handler.\n newState.slackX = this.state.slackX + (x - newState.x);\n newState.slackY = this.state.slackY + (y - newState.y);\n\n // Update the event we fire to reflect what really happened after bounds took effect.\n uiData.x = newState.x;\n uiData.y = newState.y;\n uiData.deltaX = newState.x - this.state.x;\n uiData.deltaY = newState.y - this.state.y;\n }\n\n // Short-circuit if user's callback killed it.\n const shouldUpdate = this.props.onDrag(e, uiData);\n if (shouldUpdate === false) return false;\n\n this.setState(newState);\n };\n\n onDragStop: DraggableEventHandler = (e, coreData) => {\n if (!this.state.dragging) return false;\n\n // Short-circuit if user's callback killed it.\n const shouldStop = this.props.onStop(e, createDraggableData(this, coreData));\n if (shouldStop === false) return false;\n\n log('Draggable: onDragStop: %j', coreData);\n\n const newState: $Shape = {\n dragging: false,\n slackX: 0,\n slackY: 0\n };\n\n // If this is a controlled component, the result of this operation will be to\n // revert back to the old position. We expect a handler on `onDragStop`, at the least.\n const controlled = Boolean(this.props.position);\n if (controlled) {\n const {x, y} = this.props.position;\n newState.x = x;\n newState.y = y;\n }\n\n this.setState(newState);\n };\n\n render(): ReactElement {\n let style = {}, svgTransform = null;\n\n // If this is controlled, we don't want to move it - unless it's dragging.\n const controlled = Boolean(this.props.position);\n const draggable = !controlled || this.state.dragging;\n\n const position = this.props.position || this.props.defaultPosition;\n const transformOpts = {\n // Set left if horizontal drag is enabled\n x: canDragX(this) && draggable ?\n this.state.x :\n position.x,\n\n // Set top if vertical drag is enabled\n y: canDragY(this) && draggable ?\n this.state.y :\n position.y,\n r: this.props.rotate?this.props.rotate:0\n };\n\n // If this element was SVG, we use the `transform` attribute.\n if (this.state.isElementSVG) {\n svgTransform = createSVGTransform(transformOpts);\n } else {\n // Add a CSS transform to move the element around. This allows us to move the element around\n // without worrying about whether or not it is relatively or absolutely positioned.\n // If the item you are dragging already has a transform set, wrap it in a so \n // has a clean slate.\n style = createCSSTransform(transformOpts);\n }\n\n const {\n defaultClassName,\n defaultClassNameDragging,\n defaultClassNameDragged\n } = this.props;\n\n const children = React.Children.only(this.props.children);\n\n // Mark with class while dragging\n const className = classNames((children.props.className || ''), defaultClassName, {\n [defaultClassNameDragging]: this.state.dragging,\n [defaultClassNameDragged]: this.state.dragged\n });\n\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return (\n \n {React.cloneElement(children, {\n className: className,\n style: {...children.props.style, ...style},\n transform: svgTransform\n })}\n \n );\n }\n}\n","import Draggable from './Draggable';\nimport DraggableCore from './DraggableCore';\n\n// Previous versions of this lib exported as the root export. As to not break\n// them, or TypeScript, we export *both* as the root and as 'default'.\n// See https://github.com/mzabriskie/react-draggable/pull/254\n// and https://github.com/mzabriskie/react-draggable/issues/266\nDraggable.default = Draggable;\nDraggable.DraggableCore = DraggableCore;\n\nexport default Draggable;\n"],"names":["Object","defineProperty","exports","value","b","Symbol","for","c","d","e","f","g","h","k","l","m","n","p","q","r","t","a","u","$$typeof","type","v","module","require$$0","getOwnPropertySymbols","hasOwnProperty","prototype","propIsEnumerable","propertyIsEnumerable","assign","test1","String","getOwnPropertyNames","test2","i","fromCharCode","map","join","test3","split","forEach","letter","keys","err","shouldUseNative","Function","call","bind","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","props","propName","componentName","location","propFullName","secret","ReactPropTypesSecret","Error","name","getShim","isRequired","ReactPropTypes","array","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","require$$2","hasOwn","classNames","classes","arguments","length","arg","argType","push","Array","isArray","inner","apply","key","default","window","findInArray","callback","isFunction","toString","isNum","num","isNaN","int","parseInt","dontSetMe","prefixes","browserPrefixToKey","prop","prefix","str","out","shouldCapitalize","toUpperCase","kebabToTitleCase","document","style","documentElement","getPrefix","matchesSelectorFunc","matchesSelector","el","selector","method","matchesSelectorAndParentsTo","baseNode","parentNode","addEvent","event","handler","attachEvent","addEventListener","removeEvent","detachEvent","removeEventListener","addUserSelectStyles","doc","className","styleEl","getElementById","createElement","id","innerHTML","getElementsByTagName","appendChild","body","classList","add","match","RegExp","removeUserSelectStyles","remove","replace","selection","empty","getSelection","removeAllRanges","getBoundPosition","draggable","x","y","bounds","left","top","right","bottom","cloneBounds","findDOMNode","ownerDocument","ownerWindow","defaultView","boundNode","querySelector","HTMLElement","nodeStyle","getComputedStyle","boundNodeStyle","offsetLeft","paddingLeft","marginLeft","offsetTop","paddingTop","marginTop","width","clientWidth","computedStyle","paddingRight","innerWidth","borderLeftWidth","borderRightWidth","outerWidth","marginRight","height","clientHeight","paddingBottom","innerHeight","borderTopWidth","borderBottomWidth","outerHeight","marginBottom","Math","min","max","getControlPosition","touchIdentifier","draggableCore","touchObj","identifier","targetTouches","changedTouches","getTouch","offsetParent","evt","offsetParentRect","getBoundingClientRect","clientX","scrollLeft","clientY","scrollTop","offsetXYFromParent","createCoreData","state","isStart","lastX","deltaY","lastY","createDraggableData","coreData","scale","deltaX","ReactDOM","eventsFor","dragEventFor","mouse","DraggableCore","NaN","handleDragStart","onMouseDown","_this","allowAnyClick","button","thisNode","disabled","target","Node","handle","cancel","getTouchIdentifier","setState","position","coreEvent","onStart","enableUserSelectHack","move","handleDrag","stop","handleDragStop","preventDefault","grid","pendingX","pendingY","round","onDrag","MouseEvent","createEvent","initMouseEvent","dragging","onStop","onMouseUp","onTouchStart","touch","onTouchEnd","this","React","cloneElement","Children","only","children","childStyle","styleHacks","Component","displayName","propTypes","nodeType","defaultProps","Draggable","onDragStart","dragged","uiData","newState","slackX","slackY","newStateX","newStateY","onDragStop","Boolean","defaultPosition","warn","SVGElement","isElementSVG","nextProps","svgTransform","transformOpts","axis","canDragX","canDragY","rotate","browserPrefix","defaultClassName","defaultClassNameDragging","defaultClassNameDragged"],"mappings":"2hBASaA,OAAOC,eAAeC,EAAQ,cAAcC,OAAM,IAC/D,IAAIC,EAAE,mBAAoBC,QAAQA,OAAOC,IAAIC,EAAEH,EAAEC,OAAOC,IAAI,iBAAiB,MAAME,EAAEJ,EAAEC,OAAOC,IAAI,gBAAgB,MAAMG,EAAEL,EAAEC,OAAOC,IAAI,kBAAkB,MAAMI,EAAEN,EAAEC,OAAOC,IAAI,qBAAqB,MAAMK,EAAEP,EAAEC,OAAOC,IAAI,kBAAkB,MAAMM,EAAER,EAAEC,OAAOC,IAAI,kBAAkB,MAAMO,EAAET,EAAEC,OAAOC,IAAI,iBAAiB,MAAMQ,EAAEV,EAAEC,OAAOC,IAAI,oBAAoB,MAAMS,EAAEX,EAAEC,OAAOC,IAAI,yBAAyB,MAAMU,EAAEZ,EAAEC,OAAOC,IAAI,qBAAqB,MAAMW,EAAEb,EAAEC,OAAOC,IAAI,kBAAkB,MAAMY,EAAEd,EAAEC,OAAOC,IAAI,cACpf,MAAMa,EAAEf,EAAEC,OAAOC,IAAI,cAAc,MAAM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,SACVgB,EAAUhB,mBAMJ0C,QACJA,YACIA,IApHMoL,EAuHZD,kBACFlD,EAAckD,mBACX,eACE,mBACU,2CACQ,mDACD,2CACP7H,EAAG,EAAGC,EAAG,YACjB,WACH,IChKX6H,EAAU/L,QAAU+L,EACpBA,EAAUnD,cAAgBA"} \ No newline at end of file diff --git a/lib/Draggable.js b/lib/Draggable.js index 7fcfdc02..08e43c0b 100644 --- a/lib/Draggable.js +++ b/lib/Draggable.js @@ -29,6 +29,7 @@ export type DraggableProps = { defaultClassNameDragged: string, defaultPosition: ControlPosition, position: ControlPosition, + rotate: number, scale: number }; @@ -321,7 +322,8 @@ export default class Draggable extends React.Component
@@ -177,7 +177,7 @@ describe('react-draggable', function () { }); it('should throw when setting transform', function () { - drag = (); + drag = (); TestUtils.renderIntoDocument(drag); @@ -254,7 +254,7 @@ describe('react-draggable', function () { const style = node.getAttribute('style'); assert(dragged === true); - assert(style.indexOf('transform: translate(100px, 100px);') >= 0); + assert(style.indexOf('transform: translate(100px, 100px) rotate(0deg);') >= 0); }); it('should honor "x" axis', function () { @@ -270,7 +270,7 @@ describe('react-draggable', function () { const style = node.getAttribute('style'); assert(dragged === true); - assert(style.indexOf('transform: translate(100px, 0px);') >= 0); + assert(style.indexOf('transform: translate(100px, 0px) rotate(0deg);') >= 0); }); it('should honor "y" axis', function () { @@ -286,7 +286,7 @@ describe('react-draggable', function () { const style = node.getAttribute('style'); assert(dragged === true); - assert(style.indexOf('transform: translate(0px, 100px);') >= 0); + assert(style.indexOf('transform: translate(0px, 100px) rotate(0deg);') >= 0); }); it('should honor "none" axis', function () { @@ -302,7 +302,7 @@ describe('react-draggable', function () { const style = node.getAttribute('style'); assert(dragged === true); - assert(style.indexOf('transform: translate(0px, 0px);') >= 0); + assert(style.indexOf('transform: translate(0px, 0px) rotate(0deg);') >= 0); }); it('should detect if an element is instanceof SVGElement and set state.isElementSVG to true', function() { @@ -336,7 +336,8 @@ describe('react-draggable', function () { simulateMovementFromTo(drag, 0, 0, 100, 100); const transform = node.getAttribute('transform'); - assert(transform.indexOf('translate(100,100)') >= 0); + assert(transform); + assert(transform.indexOf('translate(100, 100) rotate(0)') >= 0); }); it('should add and remove transparent selection class', function () { @@ -410,7 +411,7 @@ describe('react-draggable', function () { const style = node.getAttribute('style'); assert(dragged === true); - assert(style.indexOf('transform: translate(100px, 100px);') >= 0); + assert(style.indexOf('transform: translate(100px, 100px) rotate(0deg);') >= 0); renderRoot.parentNode.removeChild(renderRoot); done();