react-resizable 3.1.0 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/fix-issue.md +110 -0
- package/.claude/settings.local.json +7 -1
- package/CHANGELOG.md +11 -0
- package/README.md +90 -47
- package/build/Resizable.js +1 -1
- package/build/Resizable.js.flow +1 -1
- package/build/propTypes.js +3 -1
- package/build/propTypes.js.flow +3 -1
- package/dist/bundle.js +488 -0
- package/index.html +11 -0
- package/package.json +2 -2
package/dist/bundle.js
ADDED
|
@@ -0,0 +1,488 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
3
|
+
* This devtool is neither made for production nor for readable output files.
|
|
4
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
5
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
6
|
+
* or disable the default devtool with "devtool: false".
|
|
7
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
8
|
+
*/
|
|
9
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
|
11
|
+
module.exports = factory(require("react"), require("react-dom"));
|
|
12
|
+
else if(typeof define === 'function' && define.amd)
|
|
13
|
+
define(["react", "react-dom"], factory);
|
|
14
|
+
else if(typeof exports === 'object')
|
|
15
|
+
exports["ReactResizable"] = factory(require("react"), require("react-dom"));
|
|
16
|
+
else
|
|
17
|
+
root["ReactResizable"] = factory(root["React"], root["ReactDOM"]);
|
|
18
|
+
})(self, (__WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_dom__) => {
|
|
19
|
+
return /******/ (() => { // webpackBootstrap
|
|
20
|
+
/******/ var __webpack_modules__ = ({
|
|
21
|
+
|
|
22
|
+
/***/ "./examples/example.js"
|
|
23
|
+
/*!*****************************************!*\
|
|
24
|
+
!*** ./examples/example.js + 7 modules ***!
|
|
25
|
+
\*****************************************/
|
|
26
|
+
(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
27
|
+
|
|
28
|
+
"use strict";
|
|
29
|
+
eval("{\n// EXTERNAL MODULE: external {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}\nvar external_commonjs_react_commonjs2_react_amd_react_root_React_ = __webpack_require__(\"react\");\nvar external_commonjs_react_commonjs2_react_amd_react_root_React_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_react_commonjs2_react_amd_react_root_React_);\n// EXTERNAL MODULE: external {\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"amd\":\"react-dom\",\"root\":\"ReactDOM\"}\nvar external_commonjs_react_dom_commonjs2_react_dom_amd_react_dom_root_ReactDOM_ = __webpack_require__(\"react-dom\");\nvar external_commonjs_react_dom_commonjs2_react_dom_amd_react_dom_root_ReactDOM_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_react_dom_commonjs2_react_dom_amd_react_dom_root_ReactDOM_);\n// EXTERNAL MODULE: ./node_modules/react-draggable/build/cjs/cjs.js\nvar cjs = __webpack_require__(\"./node_modules/react-draggable/build/cjs/cjs.js\");\n;// ./lib/utils.js\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n\n// React.addons.cloneWithProps look-alike that merges style & className.\nfunction cloneElement(element, props) {\n if (props.style && element.props.style) {\n props.style = _objectSpread(_objectSpread({}, element.props.style), props.style);\n }\n if (props.className && element.props.className) {\n props.className = `${element.props.className} ${props.className}`;\n }\n return /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().cloneElement(element, props);\n}\n// EXTERNAL MODULE: ./node_modules/prop-types/index.js\nvar prop_types = __webpack_require__(\"./node_modules/prop-types/index.js\");\nvar prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);\n;// ./lib/propTypes.js\n/* global Element */\n\n\n\n// <Resizable>\n\nconst resizableProps = {\n /*\n * Restricts resizing to a particular axis (default: 'both')\n * 'both' - allows resizing by width or height\n * 'x' - only allows the width to be changed\n * 'y' - only allows the height to be changed\n * 'none' - disables resizing altogether\n * */\n axis: prop_types_default().oneOf(['both', 'x', 'y', 'none']),\n className: (prop_types_default()).string,\n /*\n * Require that one and only one child be present.\n * */\n children: (prop_types_default()).element.isRequired,\n /*\n * These will be passed wholesale to react-draggable's DraggableCore\n * */\n draggableOpts: prop_types_default().shape({\n allowAnyClick: (prop_types_default()).bool,\n cancel: (prop_types_default()).string,\n children: (prop_types_default()).node,\n disabled: (prop_types_default()).bool,\n enableUserSelectHack: (prop_types_default()).bool,\n offsetParent: prop_types_default().instanceOf(Element),\n grid: prop_types_default().arrayOf((prop_types_default()).number),\n handle: (prop_types_default()).string,\n nodeRef: (prop_types_default()).object,\n onStart: (prop_types_default()).func,\n onDrag: (prop_types_default()).func,\n onStop: (prop_types_default()).func,\n onMouseDown: (prop_types_default()).func,\n scale: (prop_types_default()).number\n }),\n /*\n * Initial height\n * */\n height: function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n const [props] = args;\n // Required if resizing height or both\n if (props.axis === 'both' || props.axis === 'y') {\n return prop_types_default().number.isRequired(...args);\n }\n return prop_types_default().number(...args);\n },\n /*\n * Customize cursor resize handle\n * */\n handle: prop_types_default().oneOfType([(prop_types_default()).node, (prop_types_default()).func]),\n /*\n * If you change this, be sure to update your css\n * */\n handleSize: prop_types_default().arrayOf((prop_types_default()).number),\n lockAspectRatio: (prop_types_default()).bool,\n /*\n * Max X & Y measure\n * */\n maxConstraints: prop_types_default().arrayOf((prop_types_default()).number),\n /*\n * Min X & Y measure\n * */\n minConstraints: prop_types_default().arrayOf((prop_types_default()).number),\n /*\n * Called on stop resize event\n * */\n onResizeStop: (prop_types_default()).func,\n /*\n * Called on start resize event\n * */\n onResizeStart: (prop_types_default()).func,\n /*\n * Called on resize event\n * */\n onResize: (prop_types_default()).func,\n /*\n * Defines which resize handles should be rendered (default: 'se')\n * 's' - South handle (bottom-center)\n * 'w' - West handle (left-center)\n * 'e' - East handle (right-center)\n * 'n' - North handle (top-center)\n * 'sw' - Southwest handle (bottom-left)\n * 'nw' - Northwest handle (top-left)\n * 'se' - Southeast handle (bottom-right)\n * 'ne' - Northeast handle (top-center)\n * */\n resizeHandles: prop_types_default().arrayOf(prop_types_default().oneOf(['s', 'w', 'e', 'n', 'sw', 'nw', 'se', 'ne'])),\n /*\n * If `transform: scale(n)` is set on the parent, this should be set to `n`.\n * */\n transformScale: (prop_types_default()).number,\n /*\n * Initial width\n */\n width: function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n const [props] = args;\n // Required if resizing width or both\n if (props.axis === 'both' || props.axis === 'x') {\n return prop_types_default().number.isRequired(...args);\n }\n return prop_types_default().number(...args);\n }\n};\n;// ./lib/Resizable.js\nconst _excluded = [\"children\", \"className\", \"draggableOpts\", \"width\", \"height\", \"handle\", \"handleSize\", \"lockAspectRatio\", \"axis\", \"minConstraints\", \"maxConstraints\", \"onResize\", \"onResizeStop\", \"onResizeStart\", \"resizeHandles\", \"transformScale\"];\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nfunction _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }\nfunction _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }\nfunction Resizable_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction Resizable_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? Resizable_ownKeys(Object(t), !0).forEach(function (r) { Resizable_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Resizable_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction Resizable_defineProperty(e, r, t) { return (r = Resizable_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction Resizable_toPropertyKey(t) { var i = Resizable_toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction Resizable_toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n\n\n\n\n// The base <Resizable> component.\n// This component does not have state and relies on the parent to set its props based on callback data.\nclass Resizable extends external_commonjs_react_commonjs2_react_amd_react_root_React_.Component {\n constructor() {\n super(...arguments);\n this.handleRefs = {};\n this.lastHandleRect = null;\n this.slack = null;\n this.lastSize = null;\n }\n componentWillUnmount() {\n this.resetData();\n }\n resetData() {\n this.lastHandleRect = this.slack = this.lastSize = null;\n }\n\n // Clamp width and height within provided constraints\n runConstraints(width, height) {\n const {\n minConstraints,\n maxConstraints,\n lockAspectRatio\n } = this.props;\n // short circuit\n if (!minConstraints && !maxConstraints && !lockAspectRatio) return [width, height];\n\n // If constraining to min and max, we need to also fit width and height to aspect ratio.\n if (lockAspectRatio) {\n const ratio = this.props.width / this.props.height;\n const deltaW = width - this.props.width;\n const deltaH = height - this.props.height;\n\n // Find which coordinate was greater and should push the other toward it.\n // E.g.:\n // ratio = 1, deltaW = 10, deltaH = 5, deltaH should become 10.\n // ratio = 2, deltaW = 10, deltaH = 6, deltaW should become 12.\n if (Math.abs(deltaW) > Math.abs(deltaH * ratio)) {\n height = width / ratio;\n } else {\n width = height * ratio;\n }\n }\n const [oldW, oldH] = [width, height];\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 let [slackW, slackH] = this.slack || [0, 0];\n width += slackW;\n height += slackH;\n if (minConstraints) {\n width = Math.max(minConstraints[0], width);\n height = Math.max(minConstraints[1], height);\n }\n if (maxConstraints) {\n width = Math.min(maxConstraints[0], width);\n height = Math.min(maxConstraints[1], height);\n }\n\n // If the width or height changed, we must have introduced some slack. Record it for the next iteration.\n this.slack = [slackW + (oldW - width), slackH + (oldH - height)];\n return [width, height];\n }\n\n /**\n * Wrapper around drag events to provide more useful data.\n *\n * @param {String} handlerName Handler name to wrap.\n * @return {Function} Handler function.\n */\n resizeHandler(handlerName, axis) {\n return (e, _ref) => {\n let {\n node,\n deltaX,\n deltaY\n } = _ref;\n // Reset data in case it was left over somehow (should not be possible)\n if (handlerName === 'onResizeStart') this.resetData();\n\n // Axis restrictions\n const canDragX = (this.props.axis === 'both' || this.props.axis === 'x') && axis !== 'n' && axis !== 's';\n const canDragY = (this.props.axis === 'both' || this.props.axis === 'y') && axis !== 'e' && axis !== 'w';\n // No dragging possible.\n if (!canDragX && !canDragY) return;\n\n // Decompose axis for later use\n const axisV = axis[0];\n const axisH = axis[axis.length - 1]; // intentionally not axis[1], so that this catches axis === 'w' for example\n\n // Track the element being dragged to account for changes in position.\n // If a handle's position is changed between callbacks, we need to factor this in to the next callback.\n // Failure to do so will cause the element to \"skip\" when resized upwards or leftwards.\n const handleRect = node.getBoundingClientRect();\n if (this.lastHandleRect != null) {\n // If the handle has repositioned on either axis since last render,\n // we need to increase our callback values by this much.\n // Only checking 'n', 'w' since resizing by 's', 'w' won't affect the overall position on page,\n if (axisH === 'w') {\n const deltaLeftSinceLast = handleRect.left - this.lastHandleRect.left;\n deltaX += deltaLeftSinceLast;\n }\n if (axisV === 'n') {\n const deltaTopSinceLast = handleRect.top - this.lastHandleRect.top;\n deltaY += deltaTopSinceLast;\n }\n }\n // Storage of last rect so we know how much it has really moved.\n this.lastHandleRect = handleRect;\n\n // Reverse delta if using top or left drag handles.\n if (axisH === 'w') deltaX = -deltaX;\n if (axisV === 'n') deltaY = -deltaY;\n\n // Update w/h by the deltas. Also factor in transformScale.\n let width = this.props.width + (canDragX ? deltaX / this.props.transformScale : 0);\n let height = this.props.height + (canDragY ? deltaY / this.props.transformScale : 0);\n\n // Run user-provided constraints.\n [width, height] = this.runConstraints(width, height);\n\n // For onResizeStop, use the last size from onResize rather than recalculating.\n // This avoids issues where props.width/height are stale due to React's batched updates.\n if (handlerName === 'onResizeStop' && this.lastSize) {\n ({\n width,\n height\n } = this.lastSize);\n }\n const dimensionsChanged = width !== this.props.width || height !== this.props.height;\n\n // Store the size for use in onResizeStop. We do this after the onResizeStop check\n // above so we don't overwrite the stored value with a potentially stale calculation.\n if (handlerName !== 'onResizeStop') {\n this.lastSize = {\n width,\n height\n };\n }\n\n // Call user-supplied callback if present.\n const cb = typeof this.props[handlerName] === 'function' ? this.props[handlerName] : null;\n // Don't call 'onResize' if dimensions haven't changed.\n const shouldSkipCb = handlerName === 'onResize' && !dimensionsChanged;\n if (cb && !shouldSkipCb) {\n e.persist?.();\n cb(e, {\n node,\n size: {\n width,\n height\n },\n handle: axis\n });\n }\n\n // Reset internal data\n if (handlerName === 'onResizeStop') this.resetData();\n };\n }\n\n // Render a resize handle given an axis & DOM ref. Ref *must* be attached for\n // the underlying draggable library to work properly.\n renderResizeHandle(handleAxis, ref) {\n const {\n handle\n } = this.props;\n // No handle provided, make the default\n if (!handle) {\n return /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_.createElement(\"span\", {\n className: `react-resizable-handle react-resizable-handle-${handleAxis}`,\n ref: ref\n });\n }\n // Handle is a function, such as:\n // `handle={(handleAxis) => <span className={...} />}`\n if (typeof handle === 'function') {\n return handle(handleAxis, ref);\n }\n // Handle is a React component (composite or DOM).\n const isDOMElement = typeof handle.type === 'string';\n const props = Resizable_objectSpread({\n ref\n }, isDOMElement ? {} : {\n handleAxis\n });\n return /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_.cloneElement(handle, props);\n }\n render() {\n // Pass along only props not meant for the `<Resizable>`.`\n // eslint-disable-next-line no-unused-vars\n const _this$props = this.props,\n {\n children,\n className,\n draggableOpts,\n width,\n height,\n handle,\n handleSize,\n lockAspectRatio,\n axis,\n minConstraints,\n maxConstraints,\n onResize,\n onResizeStop,\n onResizeStart,\n resizeHandles,\n transformScale\n } = _this$props,\n p = _objectWithoutProperties(_this$props, _excluded);\n\n // What we're doing here is getting the child of this element, and cloning it with this element's props.\n // We are then defining its children as:\n // 1. Its original children (resizable's child's children), and\n // 2. One or more draggable handles.\n return cloneElement(children, Resizable_objectSpread(Resizable_objectSpread({}, p), {}, {\n className: `${className ? `${className} ` : ''}react-resizable`,\n children: [...external_commonjs_react_commonjs2_react_amd_react_root_React_.Children.toArray(children.props.children), ...resizeHandles.map(handleAxis => {\n // Create a ref to the handle so that `<DraggableCore>` doesn't have to use ReactDOM.findDOMNode().\n const ref = this.handleRefs[handleAxis] ?? (this.handleRefs[handleAxis] = /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_.createRef());\n return /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_.createElement(cjs.DraggableCore, _extends({}, draggableOpts, {\n nodeRef: ref,\n key: `resizableHandle-${handleAxis}`,\n onStop: this.resizeHandler('onResizeStop', handleAxis),\n onStart: this.resizeHandler('onResizeStart', handleAxis),\n onDrag: this.resizeHandler('onResize', handleAxis)\n }), this.renderResizeHandle(handleAxis, ref));\n })]\n }));\n }\n}\nResizable.propTypes = resizableProps;\nResizable.defaultProps = {\n axis: 'both',\n handleSize: [20, 20],\n lockAspectRatio: false,\n minConstraints: [20, 20],\n maxConstraints: [Infinity, Infinity],\n resizeHandles: ['se'],\n transformScale: 1\n};\n;// ./lib/ResizableBox.js\nconst ResizableBox_excluded = [\"handle\", \"handleSize\", \"onResize\", \"onResizeStart\", \"onResizeStop\", \"draggableOpts\", \"minConstraints\", \"maxConstraints\", \"lockAspectRatio\", \"axis\", \"width\", \"height\", \"resizeHandles\", \"style\", \"transformScale\"];\nfunction ResizableBox_extends() { return ResizableBox_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, ResizableBox_extends.apply(null, arguments); }\nfunction ResizableBox_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction ResizableBox_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ResizableBox_ownKeys(Object(t), !0).forEach(function (r) { ResizableBox_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ResizableBox_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction ResizableBox_defineProperty(e, r, t) { return (r = ResizableBox_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction ResizableBox_toPropertyKey(t) { var i = ResizableBox_toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction ResizableBox_toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction ResizableBox_objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = ResizableBox_objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }\nfunction ResizableBox_objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }\n\n\n\n\n\n// ElementConfig gives us an object type where all items present in `defaultProps` are made optional.\n// <ResizableBox> does not have defaultProps, so we can use this type to tell Flow that we don't\n// care about that and will handle it in <Resizable> instead.\n// A <ResizableBox> can also have a `style` property.\n\nclass ResizableBox extends external_commonjs_react_commonjs2_react_amd_react_root_React_.Component {\n constructor() {\n super(...arguments);\n this.state = {\n width: this.props.width,\n height: this.props.height,\n propsWidth: this.props.width,\n propsHeight: this.props.height\n };\n this.onResize = (e, data) => {\n const {\n size\n } = data;\n if (this.props.onResize) {\n e.persist?.();\n this.setState(size, () => this.props.onResize && this.props.onResize(e, data));\n } else {\n this.setState(size);\n }\n };\n }\n static getDerivedStateFromProps(props, state) {\n // If parent changes height/width, set that in our state.\n if (state.propsWidth !== props.width || state.propsHeight !== props.height) {\n return {\n width: props.width,\n height: props.height,\n propsWidth: props.width,\n propsHeight: props.height\n };\n }\n return null;\n }\n render() {\n // Basic wrapper around a Resizable instance.\n // If you use Resizable directly, you are responsible for updating the child component\n // with a new width and height.\n const _this$props = this.props,\n {\n handle,\n handleSize,\n onResize,\n onResizeStart,\n onResizeStop,\n draggableOpts,\n minConstraints,\n maxConstraints,\n lockAspectRatio,\n axis,\n width,\n height,\n resizeHandles,\n style,\n transformScale\n } = _this$props,\n props = ResizableBox_objectWithoutProperties(_this$props, ResizableBox_excluded);\n return /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_.createElement(Resizable, {\n axis: axis,\n draggableOpts: draggableOpts,\n handle: handle,\n handleSize: handleSize,\n height: this.state.height,\n lockAspectRatio: lockAspectRatio,\n maxConstraints: maxConstraints,\n minConstraints: minConstraints,\n onResizeStart: onResizeStart,\n onResize: this.onResize,\n onResizeStop: onResizeStop,\n resizeHandles: resizeHandles,\n transformScale: transformScale,\n width: this.state.width\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_.createElement(\"div\", ResizableBox_extends({}, props, {\n style: ResizableBox_objectSpread(ResizableBox_objectSpread({}, style), {}, {\n width: this.state.width + 'px',\n height: this.state.height + 'px'\n })\n })));\n }\n}\n// PropTypes are identical to <Resizable>, except that children are not strictly required to be present.\nResizableBox.propTypes = ResizableBox_objectSpread(ResizableBox_objectSpread({}, resizableProps), {}, {\n children: (prop_types_default()).element\n});\n// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\nvar injectStylesIntoStyleTag = __webpack_require__(\"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\nvar injectStylesIntoStyleTag_default = /*#__PURE__*/__webpack_require__.n(injectStylesIntoStyleTag);\n// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/styleDomAPI.js\nvar styleDomAPI = __webpack_require__(\"./node_modules/style-loader/dist/runtime/styleDomAPI.js\");\nvar styleDomAPI_default = /*#__PURE__*/__webpack_require__.n(styleDomAPI);\n// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/insertBySelector.js\nvar insertBySelector = __webpack_require__(\"./node_modules/style-loader/dist/runtime/insertBySelector.js\");\nvar insertBySelector_default = /*#__PURE__*/__webpack_require__.n(insertBySelector);\n// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\nvar setAttributesWithoutAttributes = __webpack_require__(\"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\");\nvar setAttributesWithoutAttributes_default = /*#__PURE__*/__webpack_require__.n(setAttributesWithoutAttributes);\n// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/insertStyleElement.js\nvar insertStyleElement = __webpack_require__(\"./node_modules/style-loader/dist/runtime/insertStyleElement.js\");\nvar insertStyleElement_default = /*#__PURE__*/__webpack_require__.n(insertStyleElement);\n// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/styleTagTransform.js\nvar styleTagTransform = __webpack_require__(\"./node_modules/style-loader/dist/runtime/styleTagTransform.js\");\nvar styleTagTransform_default = /*#__PURE__*/__webpack_require__.n(styleTagTransform);\n// EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./css/styles.css\nvar styles = __webpack_require__(\"./node_modules/css-loader/dist/cjs.js!./css/styles.css\");\n;// ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js!./css/styles.css\n\n \n \n \n \n \n \n \n \n \n\nvar options = {};\n\noptions.styleTagTransform = (styleTagTransform_default());\noptions.setAttributes = (setAttributesWithoutAttributes_default());\noptions.insert = insertBySelector_default().bind(null, \"head\");\noptions.domAPI = (styleDomAPI_default());\noptions.insertStyleElement = (insertStyleElement_default());\n\nvar update = injectStylesIntoStyleTag_default()(styles[\"default\"], options);\n\n\n\n\n /* harmony default export */ const cjs_js_css_styles = (styles[\"default\"] && styles[\"default\"].locals ? styles[\"default\"].locals : undefined);\n\n// EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./examples/example.css\nvar example = __webpack_require__(\"./node_modules/css-loader/dist/cjs.js!./examples/example.css\");\n;// ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js!./examples/example.css\n\n \n \n \n \n \n \n \n \n \n\nvar example_options = {};\n\nexample_options.styleTagTransform = (styleTagTransform_default());\nexample_options.setAttributes = (setAttributesWithoutAttributes_default());\nexample_options.insert = insertBySelector_default().bind(null, \"head\");\nexample_options.domAPI = (styleDomAPI_default());\nexample_options.insertStyleElement = (insertStyleElement_default());\n\nvar example_update = injectStylesIntoStyleTag_default()(example[\"default\"], example_options);\n\n\n\n\n /* harmony default export */ const cjs_js_examples_example = (example[\"default\"] && example[\"default\"].locals ? example[\"default\"].locals : undefined);\n\n;// ./examples/ExampleLayout.js\nconst ExampleLayout_excluded = [\"handleAxis\"];\nfunction ExampleLayout_extends() { return ExampleLayout_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, ExampleLayout_extends.apply(null, arguments); }\nfunction ExampleLayout_objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = ExampleLayout_objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }\nfunction ExampleLayout_objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }\n\n\n\n\n\n\n/* global __VERSION__, __GIT_TAG__, __GIT_COMMIT__ */\n\nconst CustomResizeHandle = /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().forwardRef((props, ref) => {\n const {\n handleAxis\n } = props,\n restProps = ExampleLayout_objectWithoutProperties(props, ExampleLayout_excluded);\n return /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"div\", ExampleLayout_extends({\n className: `custom-handle custom-handle-${handleAxis} custom-resize-handle-component`,\n ref: ref\n }, restProps));\n});\nclass ExampleLayout extends (external_commonjs_react_commonjs2_react_amd_react_root_React_default()).Component {\n constructor() {\n super(...arguments);\n this.state = {\n width: 200,\n height: 200,\n absoluteWidth: 200,\n absoluteHeight: 200,\n absoluteLeft: 0,\n absoluteTop: 0\n };\n this.onResetClick = () => {\n this.setState({\n width: 200,\n height: 200,\n absoluteWidth: 200,\n absoluteHeight: 200\n });\n };\n // On top layout\n this.onFirstBoxResize = (event, _ref) => {\n let {\n element,\n size,\n handle\n } = _ref;\n this.setState({\n width: size.width,\n height: size.height\n });\n };\n // On bottom layout. Used to resize the center element around its flex parent.\n this.onResizeAbsolute = (event, _ref2) => {\n let {\n element,\n size,\n handle\n } = _ref2;\n this.setState(state => {\n let newLeft = state.absoluteLeft;\n let newTop = state.absoluteTop;\n const deltaHeight = size.height - state.absoluteHeight;\n const deltaWidth = size.width - state.absoluteWidth;\n if (handle[0] === 'n') {\n newTop -= deltaHeight;\n } else if (handle[0] === 's') {\n newTop += deltaHeight;\n }\n if (handle[handle.length - 1] === 'w') {\n newLeft -= deltaWidth;\n } else if (handle[handle.length - 1] === 'e') {\n newLeft += deltaWidth;\n }\n return {\n absoluteWidth: size.width,\n absoluteHeight: size.height,\n absoluteLeft: newLeft,\n absoluteTop: newTop\n };\n });\n };\n }\n render() {\n return /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"div\", null, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"p\", {\n className: \"version-info\"\n }, \"react-resizable \", \"v3.1.0\" || 0, true && /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", null, \" (\", \"75f5012\", \")\")), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"h3\", null, \"Statically Positioned Layout\"), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"div\", {\n className: \"layoutRoot\"\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(Resizable, {\n className: \"box\",\n height: this.state.height,\n width: this.state.width,\n onResize: this.onFirstBoxResize,\n resizeHandles: ['sw', 'se', 'nw', 'ne', 'w', 'e', 'n', 's']\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"div\", {\n style: {\n width: this.state.width + 'px',\n height: this.state.height + 'px'\n }\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"Raw use of <Resizable> element. 200x200, all Resize Handles.\"), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"button\", {\n onClick: this.onResetClick,\n style: {\n 'marginTop': '10px'\n }\n }, \"Reset this element's width/height\"))), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(ResizableBox, {\n className: \"box\",\n width: 200,\n height: 200\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"<ResizableBox>\")), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(ResizableBox, {\n className: \"custom-box box\",\n width: 200,\n height: 200,\n handle: /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"custom-handle custom-handle-se\"\n }),\n handleSize: [8, 8]\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"<ResizableBox> with custom overflow style & handle in SE corner.\")), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(ResizableBox, {\n className: \"custom-box box\",\n width: 200,\n height: 200,\n handle: /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(CustomResizeHandle, null),\n handleSize: [8, 8]\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"<ResizableBox> with a custom resize handle component.\")), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(ResizableBox, {\n className: \"custom-box box\",\n width: 200,\n height: 200,\n handle: (h, ref) => /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: `custom-handle custom-handle-${h}`,\n ref: ref\n }),\n handleSize: [8, 8],\n resizeHandles: ['sw', 'se', 'nw', 'ne', 'w', 'e', 'n', 's']\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"<ResizableBox> with custom handles in all locations.\")), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(ResizableBox, {\n className: \"box\",\n width: 200,\n height: 200,\n draggableOpts: {\n grid: [25, 25]\n }\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"Resizable box that snaps to even intervals of 25px.\")), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(ResizableBox, {\n className: \"box\",\n width: 200,\n height: 200,\n minConstraints: [150, 150],\n maxConstraints: [500, 300]\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"Resizable box, starting at 200x200. Min size is 150x150, max is 500x300.\")), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(ResizableBox, {\n className: \"box hover-handles\",\n width: 200,\n height: 200,\n minConstraints: [150, 150],\n maxConstraints: [500, 300]\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"Resizable box with a handle that only appears on hover.\")), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(ResizableBox, {\n className: \"box\",\n width: 200,\n height: 200,\n lockAspectRatio: true,\n resizeHandles: ['sw', 'se', 'nw', 'ne', 'w', 'e', 'n', 's']\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"Resizable square with a locked aspect ratio.\")), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(ResizableBox, {\n className: \"box\",\n width: 200,\n height: 120,\n lockAspectRatio: true,\n resizeHandles: ['sw', 'se', 'nw', 'ne', 'w', 'e', 'n', 's']\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"Resizable rectangle with a locked aspect ratio.\")), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(ResizableBox, {\n className: \"box\",\n width: 200,\n height: 200,\n axis: \"x\"\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"Only resizable by \\\"x\\\" axis.\")), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(ResizableBox, {\n className: \"box\",\n width: 200,\n height: 200,\n axis: \"y\"\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"Only resizable by \\\"y\\\" axis.\")), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(ResizableBox, {\n className: \"box\",\n width: 200,\n height: 200,\n axis: \"both\"\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"Resizable (\\\"both\\\" axis).\")), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(ResizableBox, {\n className: \"box\",\n width: 200,\n height: 200,\n axis: \"none\"\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"Not resizable (\\\"none\\\" axis).\"))), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"h3\", null, \"Absolutely Positioned Layout\"), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"div\", {\n className: \"layoutRoot absoluteLayout\"\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(ResizableBox, {\n className: \"box absolutely-positioned top-aligned left-aligned\",\n height: 200,\n width: 200,\n resizeHandles: ['sw', 'se', 'nw', 'ne', 'w', 'e', 'n', 's']\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"Top-left Aligned\")), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(ResizableBox, {\n className: \"box absolutely-positioned bottom-aligned left-aligned\",\n height: 200,\n width: 200,\n resizeHandles: ['sw', 'se', 'nw', 'ne', 'w', 'e', 'n', 's']\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"Bottom-left Aligned\")), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(Resizable, {\n className: \"box absolutely-positioned\",\n height: this.state.absoluteHeight,\n width: this.state.absoluteWidth,\n onResize: this.onResizeAbsolute,\n resizeHandles: ['sw', 'se', 'nw', 'ne', 'w', 'e', 'n', 's']\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"div\", {\n style: {\n width: this.state.absoluteWidth,\n height: this.state.absoluteHeight,\n margin: `${this.state.absoluteTop} 0 0 ${this.state.absoluteLeft}`\n }\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"Raw use of <Resizable> element with controlled position. Resize and reposition in all directions.\"))), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(ResizableBox, {\n className: \"box absolutely-positioned top-aligned right-aligned\",\n height: 200,\n width: 200,\n resizeHandles: ['sw', 'se', 'nw', 'ne', 'w', 'e', 'n', 's']\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"Top-right Aligned\")), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(ResizableBox, {\n className: \"box absolutely-positioned bottom-aligned right-aligned\",\n height: 200,\n width: 200,\n resizeHandles: ['sw', 'se', 'nw', 'ne', 'w', 'e', 'n', 's']\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"Bottom-right Aligned\"))), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"h3\", null, \"Scaled Absolute Layout\"), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"div\", null, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"small\", null, \"If you are nesting Resizables in an element with \", /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"code\", null, \"transform: scale(n)\"), \", be sure to pass the same \", /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"code\", null, \"n\"), \"\\xA0 as the \", /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"code\", null, \"transformScale\"), \" property.\", /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"br\", null), \"This box has scale 0.75.\")), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"div\", {\n className: \"layoutRoot absoluteLayout scaledLayout\"\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(ResizableBox, {\n className: \"box absolutely-positioned top-aligned left-aligned\",\n width: 200,\n height: 200,\n resizeHandles: ['sw', 'se', 'nw', 'ne', 'w', 'e', 'n', 's']\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"<ResizableBox> with incorrect scale 1\")), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(ResizableBox, {\n className: \"box absolutely-positioned bottom-aligned left-aligned\",\n width: 200,\n height: 200,\n transformScale: 0.75,\n resizeHandles: ['sw', 'se', 'nw', 'ne', 'w', 'e', 'n', 's']\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"<ResizableBox> with correct scale 0.75\")), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(Resizable, {\n className: \"box absolutely-positioned\",\n height: this.state.absoluteHeight,\n width: this.state.absoluteWidth,\n onResize: this.onResizeAbsolute,\n transformScale: 0.75,\n resizeHandles: ['sw', 'se', 'nw', 'ne', 'w', 'e', 'n', 's']\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"div\", {\n style: {\n width: this.state.absoluteWidth,\n height: this.state.absoluteHeight,\n margin: `${this.state.absoluteTop} 0 0 ${this.state.absoluteLeft}`\n }\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"Raw use of <Resizable> element with controlled position. Resize and reposition in all directions.\"))), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(ResizableBox, {\n className: \"box absolutely-positioned top-aligned right-aligned\",\n width: 200,\n height: 200,\n transformScale: 0.75,\n resizeHandles: ['sw', 'se', 'nw', 'ne', 'w', 'e', 'n', 's']\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"<ResizableBox> with correct scale 0.75\")), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(ResizableBox, {\n className: \"box absolutely-positioned bottom-aligned right-aligned\",\n width: 200,\n height: 200,\n transformScale: 0.75,\n resizeHandles: ['sw', 'se', 'nw', 'ne', 'w', 'e', 'n', 's']\n }, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(\"span\", {\n className: \"text\"\n }, \"<ResizableBox> with correct scale 0.75\"))));\n }\n}\n;// ./examples/example.js\n\n\n\ndocument.addEventListener(\"DOMContentLoaded\", function (event) {\n var contentDiv = document.getElementById('content');\n external_commonjs_react_dom_commonjs2_react_dom_amd_react_dom_root_ReactDOM_default().render(/*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_default().createElement(ExampleLayout), contentDiv);\n});\n\n//# sourceURL=webpack://ReactResizable/./examples/example.js_+_7_modules?\n}");
|
|
30
|
+
|
|
31
|
+
/***/ },
|
|
32
|
+
|
|
33
|
+
/***/ "./node_modules/clsx/dist/clsx.js"
|
|
34
|
+
/*!****************************************!*\
|
|
35
|
+
!*** ./node_modules/clsx/dist/clsx.js ***!
|
|
36
|
+
\****************************************/
|
|
37
|
+
(module) {
|
|
38
|
+
|
|
39
|
+
eval("{function r(e){var o,t,f=\"\";if(\"string\"==typeof e||\"number\"==typeof e)f+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var n=e.length;for(o=0;o<n;o++)e[o]&&(t=r(e[o]))&&(f&&(f+=\" \"),f+=t)}else for(t in e)e[t]&&(f&&(f+=\" \"),f+=t);return f}function e(){for(var e,o,t=0,f=\"\",n=arguments.length;t<n;t++)(e=arguments[t])&&(o=r(e))&&(f&&(f+=\" \"),f+=o);return f}module.exports=e,module.exports.clsx=e;\n\n//# sourceURL=webpack://ReactResizable/./node_modules/clsx/dist/clsx.js?\n}");
|
|
40
|
+
|
|
41
|
+
/***/ },
|
|
42
|
+
|
|
43
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./css/styles.css"
|
|
44
|
+
/*!**************************************************************!*\
|
|
45
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./css/styles.css ***!
|
|
46
|
+
\**************************************************************/
|
|
47
|
+
(module, __webpack_exports__, __webpack_require__) {
|
|
48
|
+
|
|
49
|
+
"use strict";
|
|
50
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/getUrl.js */ \"./node_modules/css-loader/dist/runtime/getUrl.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__);\n// Imports\n\n\n\nvar ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require__(/*! data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+ */ \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+\"), __webpack_require__.b);\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.react-resizable {\n position: relative;\n}\n.react-resizable-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n background-repeat: no-repeat;\n background-origin: content-box;\n box-sizing: border-box;\n background-image: url(${___CSS_LOADER_URL_REPLACEMENT_0___});\n background-position: bottom right;\n padding: 0 3px 3px 0;\n}\n.react-resizable-handle-sw {\n bottom: 0;\n left: 0;\n cursor: sw-resize;\n transform: rotate(90deg);\n}\n.react-resizable-handle-se {\n bottom: 0;\n right: 0;\n cursor: se-resize;\n}\n.react-resizable-handle-nw {\n top: 0;\n left: 0;\n cursor: nw-resize;\n transform: rotate(180deg);\n}\n.react-resizable-handle-ne {\n top: 0;\n right: 0;\n cursor: ne-resize;\n transform: rotate(270deg);\n}\n.react-resizable-handle-w,\n.react-resizable-handle-e {\n top: 50%;\n margin-top: -10px;\n cursor: ew-resize;\n}\n.react-resizable-handle-w {\n left: 0;\n transform: rotate(135deg);\n}\n.react-resizable-handle-e {\n right: 0;\n transform: rotate(315deg);\n}\n.react-resizable-handle-n,\n.react-resizable-handle-s {\n left: 50%;\n margin-left: -10px;\n cursor: ns-resize;\n}\n.react-resizable-handle-n {\n top: 0;\n transform: rotate(225deg);\n}\n.react-resizable-handle-s {\n bottom: 0;\n transform: rotate(45deg);\n}`, \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://ReactResizable/./css/styles.css?./node_modules/css-loader/dist/cjs.js\n}");
|
|
51
|
+
|
|
52
|
+
/***/ },
|
|
53
|
+
|
|
54
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./examples/example.css"
|
|
55
|
+
/*!********************************************************************!*\
|
|
56
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./examples/example.css ***!
|
|
57
|
+
\********************************************************************/
|
|
58
|
+
(module, __webpack_exports__, __webpack_require__) {
|
|
59
|
+
|
|
60
|
+
"use strict";
|
|
61
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.layoutRoot {\n display: flex;\n background: #eee;\n margin-bottom: 20px;\n flex-wrap: wrap;\n}\n.absoluteLayout {\n height: 600px;\n position: relative;\n justify-content: center;\n align-items: center;\n}\n.scaledLayout {\n width: 125%;\n left: -12.5vw;\n transform: scale(0.75);\n margin-top: -7.5vh;\n}\n\n.box {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n background: #ccc;\n border: 1px solid black;\n text-align: center;\n padding: 10px;\n box-sizing: border-box;\n margin-bottom: 10px;\n overflow: hidden;\n position: relative;\n margin: 20px;\n}\n.box .text {\n text-align: center;\n}\n\n.hover-handles .react-resizable-handle {\n display: none;\n}\n.hover-handles:hover .react-resizable-handle {\n display: block;\n}\n.absolutely-positioned {\n position: absolute !important;\n}\n.left-aligned {\n left: 0;\n}\n.right-aligned {\n right: 0;\n}\n.top-aligned {\n top: 0;\n}\n.bottom-aligned {\n bottom: 0;\n}\n\n.custom-box {\n overflow: visible;\n}\n.custom-handle {\n position: absolute;\n width: 8px;\n height: 8px;\n background-color: #1153aa;\n opacity: 0.75;\n border-radius: 4px;\n}\n.custom-handle-sw {\n bottom: -4px;\n left: -4px;\n cursor: sw-resize;\n}\n.custom-handle-se {\n bottom: -4px;\n right: -4px;\n cursor: se-resize;\n}\n.custom-handle-nw {\n top: -4px;\n left: -4px;\n cursor: nw-resize;\n}\n.custom-handle-ne {\n top: -4px;\n right: -4px;\n cursor: ne-resize;\n}\n.custom-handle-w,\n.custom-handle-e {\n top: 50%;\n margin-top: -4px;\n cursor: ew-resize;\n}\n.custom-handle-w {\n left: -4px;\n}\n.custom-handle-e {\n right: -4px;\n}\n.custom-handle-n,\n.custom-handle-s {\n left: 50%;\n margin-left: -4px;\n cursor: ns-resize;\n}\n.custom-handle-n {\n top: -4px;\n}\n.custom-handle-s {\n bottom: -4px;\n}\n.custom-resize-handle-component {\n background-color: red;\n}\n\n.version-info {\n font-family: monospace;\n font-size: 12px;\n color: #666;\n margin: 10px 20px;\n}`, \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://ReactResizable/./examples/example.css?./node_modules/css-loader/dist/cjs.js\n}");
|
|
62
|
+
|
|
63
|
+
/***/ },
|
|
64
|
+
|
|
65
|
+
/***/ "./node_modules/css-loader/dist/runtime/api.js"
|
|
66
|
+
/*!*****************************************************!*\
|
|
67
|
+
!*** ./node_modules/css-loader/dist/runtime/api.js ***!
|
|
68
|
+
\*****************************************************/
|
|
69
|
+
(module) {
|
|
70
|
+
|
|
71
|
+
"use strict";
|
|
72
|
+
eval("{\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};\n\n//# sourceURL=webpack://ReactResizable/./node_modules/css-loader/dist/runtime/api.js?\n}");
|
|
73
|
+
|
|
74
|
+
/***/ },
|
|
75
|
+
|
|
76
|
+
/***/ "./node_modules/css-loader/dist/runtime/getUrl.js"
|
|
77
|
+
/*!********************************************************!*\
|
|
78
|
+
!*** ./node_modules/css-loader/dist/runtime/getUrl.js ***!
|
|
79
|
+
\********************************************************/
|
|
80
|
+
(module) {
|
|
81
|
+
|
|
82
|
+
"use strict";
|
|
83
|
+
eval("{\n\nmodule.exports = function (url, options) {\n if (!options) {\n options = {};\n }\n if (!url) {\n return url;\n }\n url = String(url.__esModule ? url.default : url);\n\n // If url is already wrapped in quotes, remove them\n if (/^['\"].*['\"]$/.test(url)) {\n url = url.slice(1, -1);\n }\n if (options.hash) {\n url += options.hash;\n }\n\n // Should url be wrapped?\n // See https://drafts.csswg.org/css-values-3/#urls\n if (/[\"'() \\t\\n]|(%20)/.test(url) || options.needQuotes) {\n return \"\\\"\".concat(url.replace(/\"/g, '\\\\\"').replace(/\\n/g, \"\\\\n\"), \"\\\"\");\n }\n return url;\n};\n\n//# sourceURL=webpack://ReactResizable/./node_modules/css-loader/dist/runtime/getUrl.js?\n}");
|
|
84
|
+
|
|
85
|
+
/***/ },
|
|
86
|
+
|
|
87
|
+
/***/ "./node_modules/css-loader/dist/runtime/noSourceMaps.js"
|
|
88
|
+
/*!**************************************************************!*\
|
|
89
|
+
!*** ./node_modules/css-loader/dist/runtime/noSourceMaps.js ***!
|
|
90
|
+
\**************************************************************/
|
|
91
|
+
(module) {
|
|
92
|
+
|
|
93
|
+
"use strict";
|
|
94
|
+
eval("{\n\nmodule.exports = function (i) {\n return i[1];\n};\n\n//# sourceURL=webpack://ReactResizable/./node_modules/css-loader/dist/runtime/noSourceMaps.js?\n}");
|
|
95
|
+
|
|
96
|
+
/***/ },
|
|
97
|
+
|
|
98
|
+
/***/ "./node_modules/object-assign/index.js"
|
|
99
|
+
/*!*********************************************!*\
|
|
100
|
+
!*** ./node_modules/object-assign/index.js ***!
|
|
101
|
+
\*********************************************/
|
|
102
|
+
(module) {
|
|
103
|
+
|
|
104
|
+
"use strict";
|
|
105
|
+
eval("{/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n\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\n//# sourceURL=webpack://ReactResizable/./node_modules/object-assign/index.js?\n}");
|
|
106
|
+
|
|
107
|
+
/***/ },
|
|
108
|
+
|
|
109
|
+
/***/ "./node_modules/prop-types/checkPropTypes.js"
|
|
110
|
+
/*!***************************************************!*\
|
|
111
|
+
!*** ./node_modules/prop-types/checkPropTypes.js ***!
|
|
112
|
+
\***************************************************/
|
|
113
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
114
|
+
|
|
115
|
+
"use strict";
|
|
116
|
+
eval("{/**\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\nvar printWarning = function() {};\n\nif (true) {\n var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/prop-types/lib/ReactPropTypesSecret.js\");\n var loggedTypeFailures = {};\n var has = __webpack_require__(/*! ./lib/has */ \"./node_modules/prop-types/lib/has.js\");\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 (true) {\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 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\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 (true) {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n\n\n//# sourceURL=webpack://ReactResizable/./node_modules/prop-types/checkPropTypes.js?\n}");
|
|
117
|
+
|
|
118
|
+
/***/ },
|
|
119
|
+
|
|
120
|
+
/***/ "./node_modules/prop-types/factoryWithTypeCheckers.js"
|
|
121
|
+
/*!************************************************************!*\
|
|
122
|
+
!*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
|
|
123
|
+
\************************************************************/
|
|
124
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
125
|
+
|
|
126
|
+
"use strict";
|
|
127
|
+
eval("{/**\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\nvar ReactIs = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\nvar assign = __webpack_require__(/*! object-assign */ \"./node_modules/object-assign/index.js\");\n\nvar ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/prop-types/lib/ReactPropTypesSecret.js\");\nvar has = __webpack_require__(/*! ./lib/has */ \"./node_modules/prop-types/lib/has.js\");\nvar checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ \"./node_modules/prop-types/checkPropTypes.js\");\n\nvar printWarning = function() {};\n\nif (true) {\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 = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\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, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\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 (true) {\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 ( true && 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(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\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 (true) {\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 var type = getPreciseType(value);\n if (type === '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 true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 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 var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\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 invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\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 (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\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 props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\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 // falsy value can't be a Symbol\n if (!propValue) {\n return false;\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\n//# sourceURL=webpack://ReactResizable/./node_modules/prop-types/factoryWithTypeCheckers.js?\n}");
|
|
128
|
+
|
|
129
|
+
/***/ },
|
|
130
|
+
|
|
131
|
+
/***/ "./node_modules/prop-types/index.js"
|
|
132
|
+
/*!******************************************!*\
|
|
133
|
+
!*** ./node_modules/prop-types/index.js ***!
|
|
134
|
+
\******************************************/
|
|
135
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
136
|
+
|
|
137
|
+
eval("{/**\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 (true) {\n var ReactIs = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\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 = __webpack_require__(/*! ./factoryWithTypeCheckers */ \"./node_modules/prop-types/factoryWithTypeCheckers.js\")(ReactIs.isElement, throwOnDirectAccess);\n} else // removed by dead control flow\n{}\n\n\n//# sourceURL=webpack://ReactResizable/./node_modules/prop-types/index.js?\n}");
|
|
138
|
+
|
|
139
|
+
/***/ },
|
|
140
|
+
|
|
141
|
+
/***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js"
|
|
142
|
+
/*!*************************************************************!*\
|
|
143
|
+
!*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
|
|
144
|
+
\*************************************************************/
|
|
145
|
+
(module) {
|
|
146
|
+
|
|
147
|
+
"use strict";
|
|
148
|
+
eval("{/**\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\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n//# sourceURL=webpack://ReactResizable/./node_modules/prop-types/lib/ReactPropTypesSecret.js?\n}");
|
|
149
|
+
|
|
150
|
+
/***/ },
|
|
151
|
+
|
|
152
|
+
/***/ "./node_modules/prop-types/lib/has.js"
|
|
153
|
+
/*!********************************************!*\
|
|
154
|
+
!*** ./node_modules/prop-types/lib/has.js ***!
|
|
155
|
+
\********************************************/
|
|
156
|
+
(module) {
|
|
157
|
+
|
|
158
|
+
eval("{module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\n\n\n//# sourceURL=webpack://ReactResizable/./node_modules/prop-types/lib/has.js?\n}");
|
|
159
|
+
|
|
160
|
+
/***/ },
|
|
161
|
+
|
|
162
|
+
/***/ "./node_modules/react-draggable/build/cjs/Draggable.js"
|
|
163
|
+
/*!*************************************************************!*\
|
|
164
|
+
!*** ./node_modules/react-draggable/build/cjs/Draggable.js ***!
|
|
165
|
+
\*************************************************************/
|
|
166
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
167
|
+
|
|
168
|
+
"use strict";
|
|
169
|
+
eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"DraggableCore\", ({\n enumerable: true,\n get: function () {\n return _DraggableCore.default;\n }\n}));\nexports[\"default\"] = void 0;\nvar React = _interopRequireWildcard(__webpack_require__(/*! react */ \"react\"));\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\nvar _reactDom = _interopRequireDefault(__webpack_require__(/*! react-dom */ \"react-dom\"));\nvar _clsx = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.js\");\nvar _domFns = __webpack_require__(/*! ./utils/domFns */ \"./node_modules/react-draggable/build/cjs/utils/domFns.js\");\nvar _positionFns = __webpack_require__(/*! ./utils/positionFns */ \"./node_modules/react-draggable/build/cjs/utils/positionFns.js\");\nvar _shims = __webpack_require__(/*! ./utils/shims */ \"./node_modules/react-draggable/build/cjs/utils/shims.js\");\nvar _DraggableCore = _interopRequireDefault(__webpack_require__(/*! ./DraggableCore */ \"./node_modules/react-draggable/build/cjs/DraggableCore.js\"));\nvar _log = _interopRequireDefault(__webpack_require__(/*! ./utils/log */ \"./node_modules/react-draggable/build/cjs/utils/log.js\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); } /*:: import type {ControlPosition, PositionOffsetControlPosition, DraggableCoreProps, DraggableCoreDefaultProps} from './DraggableCore';*/\n/*:: import type {Bounds, DraggableEventHandler} from './utils/types';*/\n/*:: import type {Element as ReactElement} from 'react';*/\n/*:: type DraggableState = {\n dragging: boolean,\n dragged: boolean,\n x: number, y: number,\n slackX: number, slackY: number,\n isElementSVG: boolean,\n prevPropsPosition: ?ControlPosition,\n};*/\n/*:: export type DraggableDefaultProps = {\n ...DraggableCoreDefaultProps,\n axis: 'both' | 'x' | 'y' | 'none',\n bounds: Bounds | string | false,\n defaultClassName: string,\n defaultClassNameDragging: string,\n defaultClassNameDragged: string,\n defaultPosition: ControlPosition,\n scale: number,\n};*/\n/*:: export type DraggableProps = {\n ...DraggableCoreProps,\n ...DraggableDefaultProps,\n positionOffset: PositionOffsetControlPosition,\n position: ControlPosition,\n};*/\n//\n// Define <Draggable>\n//\nclass Draggable extends React.Component /*:: <DraggableProps, DraggableState>*/{\n // React 16.3+\n // Arity (props, state)\n static getDerivedStateFromProps(_ref /*:: */, _ref2 /*:: */) /*: ?Partial<DraggableState>*/{\n let {\n position\n } /*: DraggableProps*/ = _ref /*: DraggableProps*/;\n let {\n prevPropsPosition\n } /*: DraggableState*/ = _ref2 /*: DraggableState*/;\n // Set x/y if a new position is provided in props that is different than the previous.\n if (position && (!prevPropsPosition || position.x !== prevPropsPosition.x || position.y !== prevPropsPosition.y)) {\n (0, _log.default)('Draggable: getDerivedStateFromProps %j', {\n position,\n prevPropsPosition\n });\n return {\n x: position.x,\n y: position.y,\n prevPropsPosition: {\n ...position\n }\n };\n }\n return null;\n }\n constructor(props /*: DraggableProps*/) {\n super(props);\n _defineProperty(this, \"onDragStart\", (e, coreData) => {\n (0, _log.default)('Draggable: onDragStart: %j', coreData);\n\n // Short-circuit if user's callback killed it.\n const shouldStart = this.props.onStart(e, (0, _positionFns.createDraggableData)(this, coreData));\n // Kills start event on core as well, so move handlers are never bound.\n if (shouldStart === false) return false;\n this.setState({\n dragging: true,\n dragged: true\n });\n });\n _defineProperty(this, \"onDrag\", (e, coreData) => {\n if (!this.state.dragging) return false;\n (0, _log.default)('Draggable: onDrag: %j', coreData);\n const uiData = (0, _positionFns.createDraggableData)(this, coreData);\n const newState = {\n x: uiData.x,\n y: uiData.y,\n slackX: 0,\n slackY: 0\n };\n\n // Keep within bounds.\n if (this.props.bounds) {\n // Save original x and y.\n const {\n x,\n y\n } = 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] = (0, _positionFns.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 this.setState(newState);\n });\n _defineProperty(this, \"onDragStop\", (e, coreData) => {\n if (!this.state.dragging) return false;\n\n // Short-circuit if user's callback killed it.\n const shouldContinue = this.props.onStop(e, (0, _positionFns.createDraggableData)(this, coreData));\n if (shouldContinue === false) return false;\n (0, _log.default)('Draggable: onDragStop: %j', coreData);\n const newState /*: Partial<DraggableState>*/ = {\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 {\n x,\n y\n } = this.props.position;\n newState.x = x;\n newState.y = y;\n }\n this.setState(newState);\n });\n this.state = {\n // Whether or not we are currently dragging.\n dragging: false,\n // Whether or not we have been dragged before.\n dragged: false,\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 prevPropsPosition: {\n ...props.position\n },\n // Used for compensating for out-of-bounds drags\n slackX: 0,\n slackY: 0,\n // Can only determine if SVG after mounting\n isElementSVG: false\n };\n if (props.position && !(props.onDrag || props.onStop)) {\n // eslint-disable-next-line no-console\n console.warn('A `position` was applied to this <Draggable>, 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.');\n }\n }\n componentDidMount() {\n // Check to see if the element passed is an instanceof SVGElement\n if (typeof window.SVGElement !== 'undefined' && this.findDOMNode() instanceof window.SVGElement) {\n this.setState({\n isElementSVG: true\n });\n }\n }\n componentWillUnmount() {\n if (this.state.dragging) {\n this.setState({\n dragging: false\n }); // prevents invariant if unmounted while dragging\n }\n }\n\n // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find\n // the underlying DOM node ourselves. See the README for more information.\n findDOMNode() /*: ?HTMLElement*/{\n return this.props?.nodeRef?.current ?? _reactDom.default.findDOMNode(this);\n }\n render() /*: ReactElement<any>*/{\n const {\n axis,\n bounds,\n children,\n defaultPosition,\n defaultClassName,\n defaultClassNameDragging,\n defaultClassNameDragged,\n position,\n positionOffset,\n scale,\n ...draggableCoreProps\n } = this.props;\n let style = {};\n let svgTransform = null;\n\n // If this is controlled, we don't want to move it - unless it's dragging.\n const controlled = Boolean(position);\n const draggable = !controlled || this.state.dragging;\n const validPosition = position || defaultPosition;\n const transformOpts = {\n // Set left if horizontal drag is enabled\n x: (0, _positionFns.canDragX)(this) && draggable ? this.state.x : validPosition.x,\n // Set top if vertical drag is enabled\n y: (0, _positionFns.canDragY)(this) && draggable ? this.state.y : validPosition.y\n };\n\n // If this element was SVG, we use the `transform` attribute.\n if (this.state.isElementSVG) {\n svgTransform = (0, _domFns.createSVGTransform)(transformOpts, positionOffset);\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 <span> so <Draggable>\n // has a clean slate.\n style = (0, _domFns.createCSSTransform)(transformOpts, positionOffset);\n }\n\n // Mark with class while dragging\n const className = (0, _clsx.clsx)(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 /*#__PURE__*/React.createElement(_DraggableCore.default, _extends({}, draggableCoreProps, {\n onStart: this.onDragStart,\n onDrag: this.onDrag,\n onStop: this.onDragStop\n }), /*#__PURE__*/React.cloneElement(React.Children.only(children), {\n className: className,\n style: {\n ...children.props.style,\n ...style\n },\n transform: svgTransform\n }));\n }\n}\nexports[\"default\"] = Draggable;\n_defineProperty(Draggable, \"displayName\", 'Draggable');\n_defineProperty(Draggable, \"propTypes\", {\n // Accepts all props <DraggableCore> accepts.\n ..._DraggableCore.default.propTypes,\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.default.oneOf(['both', 'x', 'y', 'none']),\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 * <Draggable bounds={{right: 300, bottom: 300}}>\n * <div>Content</div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n bounds: _propTypes.default.oneOfType([_propTypes.default.shape({\n left: _propTypes.default.number,\n right: _propTypes.default.number,\n top: _propTypes.default.number,\n bottom: _propTypes.default.number\n }), _propTypes.default.string, _propTypes.default.oneOf([false])]),\n defaultClassName: _propTypes.default.string,\n defaultClassNameDragging: _propTypes.default.string,\n defaultClassNameDragged: _propTypes.default.string,\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 * <Draggable defaultPosition={{x: 25, y: 25}}>\n * <div>I start with transformX: 25px and transformY: 25px;</div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n defaultPosition: _propTypes.default.shape({\n x: _propTypes.default.number,\n y: _propTypes.default.number\n }),\n positionOffset: _propTypes.default.shape({\n x: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n y: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])\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 * <Draggable position={{x: 25, y: 25}}>\n * <div>I start with transformX: 25px and transformY: 25px;</div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n position: _propTypes.default.shape({\n x: _propTypes.default.number,\n y: _propTypes.default.number\n }),\n /**\n * These properties should be defined on the child, not here.\n */\n className: _shims.dontSetMe,\n style: _shims.dontSetMe,\n transform: _shims.dontSetMe\n});\n_defineProperty(Draggable, \"defaultProps\", {\n ..._DraggableCore.default.defaultProps,\n axis: 'both',\n bounds: false,\n defaultClassName: 'react-draggable',\n defaultClassNameDragging: 'react-draggable-dragging',\n defaultClassNameDragged: 'react-draggable-dragged',\n defaultPosition: {\n x: 0,\n y: 0\n },\n scale: 1\n});\n\n//# sourceURL=webpack://ReactResizable/./node_modules/react-draggable/build/cjs/Draggable.js?\n}");
|
|
170
|
+
|
|
171
|
+
/***/ },
|
|
172
|
+
|
|
173
|
+
/***/ "./node_modules/react-draggable/build/cjs/DraggableCore.js"
|
|
174
|
+
/*!*****************************************************************!*\
|
|
175
|
+
!*** ./node_modules/react-draggable/build/cjs/DraggableCore.js ***!
|
|
176
|
+
\*****************************************************************/
|
|
177
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
178
|
+
|
|
179
|
+
"use strict";
|
|
180
|
+
eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar React = _interopRequireWildcard(__webpack_require__(/*! react */ \"react\"));\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\nvar _reactDom = _interopRequireDefault(__webpack_require__(/*! react-dom */ \"react-dom\"));\nvar _domFns = __webpack_require__(/*! ./utils/domFns */ \"./node_modules/react-draggable/build/cjs/utils/domFns.js\");\nvar _positionFns = __webpack_require__(/*! ./utils/positionFns */ \"./node_modules/react-draggable/build/cjs/utils/positionFns.js\");\nvar _shims = __webpack_require__(/*! ./utils/shims */ \"./node_modules/react-draggable/build/cjs/utils/shims.js\");\nvar _log = _interopRequireDefault(__webpack_require__(/*! ./utils/log */ \"./node_modules/react-draggable/build/cjs/utils/log.js\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n/*:: import type {EventHandler, MouseTouchEvent} from './utils/types';*/\n/*:: import type {Element as ReactElement} from 'react';*/\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/*:: export type DraggableData = {\n node: HTMLElement,\n x: number, y: number,\n deltaX: number, deltaY: number,\n lastX: number, lastY: number,\n};*/\n/*:: export type DraggableEventHandler = (e: MouseEvent, data: DraggableData) => void | false;*/\n/*:: export type ControlPosition = {x: number, y: number};*/\n/*:: export type PositionOffsetControlPosition = {x: number|string, y: number|string};*/\n/*:: export type DraggableCoreDefaultProps = {\n allowAnyClick: boolean,\n allowMobileScroll: boolean,\n disabled: boolean,\n enableUserSelectHack: boolean,\n onStart: DraggableEventHandler,\n onDrag: DraggableEventHandler,\n onStop: DraggableEventHandler,\n onMouseDown: (e: MouseEvent) => void,\n scale: number,\n};*/\n/*:: export type DraggableCoreProps = {\n ...DraggableCoreDefaultProps,\n cancel: string,\n children: ReactElement<any>,\n offsetParent: HTMLElement,\n grid: [number, number],\n handle: string,\n nodeRef?: ?React.ElementRef<any>,\n};*/\n//\n// Define <DraggableCore>.\n//\n// <DraggableCore> is for advanced usage of <Draggable>. It maintains minimal internal state so it can\n// work well with libraries that require more control over the element.\n//\n\nclass DraggableCore extends React.Component /*:: <DraggableCoreProps>*/{\n constructor() {\n super(...arguments);\n _defineProperty(this, \"dragging\", false);\n // Used while dragging to determine deltas.\n _defineProperty(this, \"lastX\", NaN);\n _defineProperty(this, \"lastY\", NaN);\n _defineProperty(this, \"touchIdentifier\", null);\n _defineProperty(this, \"mounted\", false);\n _defineProperty(this, \"handleDragStart\", 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 = this.findDOMNode();\n if (!thisNode || !thisNode.ownerDocument || !thisNode.ownerDocument.body) {\n throw new Error('<DraggableCore> not mounted on DragStart!');\n }\n const {\n ownerDocument\n } = thisNode;\n\n // Short circuit if handle or cancel prop was provided and selector doesn't match.\n if (this.props.disabled || !(e.target instanceof ownerDocument.defaultView.Node) || this.props.handle && !(0, _domFns.matchesSelectorAndParentsTo)(e.target, this.props.handle, thisNode) || this.props.cancel && (0, _domFns.matchesSelectorAndParentsTo)(e.target, this.props.cancel, thisNode)) {\n return;\n }\n\n // Prevent scrolling on mobile devices, like ipad/iphone.\n // Important that this is after handle/cancel.\n if (e.type === 'touchstart' && !this.props.allowMobileScroll) e.preventDefault();\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 = (0, _domFns.getTouchIdentifier)(e);\n this.touchIdentifier = touchIdentifier;\n\n // Get the current drag point from the event. This is used as the offset.\n const position = (0, _positionFns.getControlPosition)(e, touchIdentifier, this);\n if (position == null) return; // not possible but satisfies flow\n const {\n x,\n y\n } = position;\n\n // Create an event object with all the data parents need to make a decision here.\n const coreEvent = (0, _positionFns.createCoreData)(this, x, y);\n (0, _log.default)('DraggableCore: handleDragStart: %j', coreEvent);\n\n // Call event handler. If it returns explicit false, cancel.\n (0, _log.default)('calling', this.props.onStart);\n const shouldUpdate = this.props.onStart(e, coreEvent);\n if (shouldUpdate === false || this.mounted === 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) (0, _domFns.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.dragging = true;\n this.lastX = x;\n this.lastY = y;\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 (0, _domFns.addEvent)(ownerDocument, dragEventFor.move, this.handleDrag);\n (0, _domFns.addEvent)(ownerDocument, dragEventFor.stop, this.handleDragStop);\n });\n _defineProperty(this, \"handleDrag\", e => {\n // Get the current drag point from the event. This is used as the offset.\n const position = (0, _positionFns.getControlPosition)(e, this.touchIdentifier, this);\n if (position == null) return;\n let {\n x,\n y\n } = position;\n\n // Snap to grid if prop has been provided\n if (Array.isArray(this.props.grid)) {\n let deltaX = x - this.lastX,\n deltaY = y - this.lastY;\n [deltaX, deltaY] = (0, _positionFns.snapToGrid)(this.props.grid, deltaX, deltaY);\n if (!deltaX && !deltaY) return; // skip useless drag\n x = this.lastX + deltaX, y = this.lastY + deltaY;\n }\n const coreEvent = (0, _positionFns.createCoreData)(this, x, y);\n (0, _log.default)('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 || this.mounted === 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 this.lastX = x;\n this.lastY = y;\n });\n _defineProperty(this, \"handleDragStop\", e => {\n if (!this.dragging) return;\n const position = (0, _positionFns.getControlPosition)(e, this.touchIdentifier, this);\n if (position == null) return;\n let {\n x,\n y\n } = position;\n\n // Snap to grid if prop has been provided\n if (Array.isArray(this.props.grid)) {\n let deltaX = x - this.lastX || 0;\n let deltaY = y - this.lastY || 0;\n [deltaX, deltaY] = (0, _positionFns.snapToGrid)(this.props.grid, deltaX, deltaY);\n x = this.lastX + deltaX, y = this.lastY + deltaY;\n }\n const coreEvent = (0, _positionFns.createCoreData)(this, x, y);\n\n // Call event handler\n const shouldContinue = this.props.onStop(e, coreEvent);\n if (shouldContinue === false || this.mounted === false) return false;\n const thisNode = this.findDOMNode();\n if (thisNode) {\n // Remove user-select hack\n if (this.props.enableUserSelectHack) (0, _domFns.scheduleRemoveUserSelectStyles)(thisNode.ownerDocument);\n }\n (0, _log.default)('DraggableCore: handleDragStop: %j', coreEvent);\n\n // Reset the el.\n this.dragging = false;\n this.lastX = NaN;\n this.lastY = NaN;\n if (thisNode) {\n // Remove event handlers\n (0, _log.default)('DraggableCore: Removing handlers');\n (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.move, this.handleDrag);\n (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.stop, this.handleDragStop);\n }\n });\n _defineProperty(this, \"onMouseDown\", e => {\n dragEventFor = eventsFor.mouse; // on touchscreen laptops we could switch back to mouse\n\n return this.handleDragStart(e);\n });\n _defineProperty(this, \"onMouseUp\", e => {\n dragEventFor = eventsFor.mouse;\n return this.handleDragStop(e);\n });\n // Same as onMouseDown (start drag), but now consider this a touch device.\n _defineProperty(this, \"onTouchStart\", e => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n return this.handleDragStart(e);\n });\n _defineProperty(this, \"onTouchEnd\", e => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n return this.handleDragStop(e);\n });\n }\n componentDidMount() {\n this.mounted = true;\n // Touch handlers must be added with {passive: false} to be cancelable.\n // https://developers.google.com/web/updates/2017/01/scrolling-intervention\n const thisNode = this.findDOMNode();\n if (thisNode) {\n (0, _domFns.addEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {\n passive: false\n });\n }\n }\n componentWillUnmount() {\n this.mounted = false;\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 = this.findDOMNode();\n if (thisNode) {\n const {\n ownerDocument\n } = thisNode;\n (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.move, this.handleDrag);\n (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.move, this.handleDrag);\n (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.stop, this.handleDragStop);\n (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.stop, this.handleDragStop);\n (0, _domFns.removeEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {\n passive: false\n });\n if (this.props.enableUserSelectHack) (0, _domFns.scheduleRemoveUserSelectStyles)(ownerDocument);\n }\n }\n\n // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find\n // the underlying DOM node ourselves. See the README for more information.\n findDOMNode() /*: ?HTMLElement*/{\n return this.props?.nodeRef ? this.props?.nodeRef?.current : _reactDom.default.findDOMNode(this);\n }\n render() /*: React.Element<any>*/{\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return /*#__PURE__*/React.cloneElement(React.Children.only(this.props.children), {\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 onMouseUp: this.onMouseUp,\n // onTouchStart is added on `componentDidMount` so they can be added with\n // {passive: false}, which allows it to cancel. See\n // https://developers.google.com/web/updates/2017/01/scrolling-intervention\n onTouchEnd: this.onTouchEnd\n });\n }\n}\nexports[\"default\"] = DraggableCore;\n_defineProperty(DraggableCore, \"displayName\", 'DraggableCore');\n_defineProperty(DraggableCore, \"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.default.bool,\n /**\n * `allowMobileScroll` turns off cancellation of the 'touchstart' event\n * on mobile devices. Only enable this if you are having trouble with click\n * events. Prefer using 'handle' / 'cancel' instead.\n *\n * Defaults to `false`.\n */\n allowMobileScroll: _propTypes.default.bool,\n children: _propTypes.default.node.isRequired,\n /**\n * `disabled`, if true, stops the <Draggable> from dragging. All handlers,\n * with the exception of `onMouseDown`, will not fire.\n */\n disabled: _propTypes.default.bool,\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.default.bool,\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<DraggableCoreProps>*/) {\n if (props[propName] && props[propName].nodeType !== 1) {\n throw new Error('Draggable\\'s offsetParent must be a DOM Node.');\n }\n },\n /**\n * `grid` specifies the x and y that dragging should snap to.\n */\n grid: _propTypes.default.arrayOf(_propTypes.default.number),\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 * <Draggable handle=\".handle\">\n * <div>\n * <div className=\"handle\">Click me to drag</div>\n * <div>This is some other content</div>\n * </div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n handle: _propTypes.default.string,\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 * <Draggable cancel=\".cancel\">\n * <div>\n * <div className=\"cancel\">You can't drag from here</div>\n * <div>Dragging here works fine</div>\n * </div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n cancel: _propTypes.default.string,\n /* If running in React Strict mode, ReactDOM.findDOMNode() is deprecated.\n * Unfortunately, in order for <Draggable> to work properly, we need raw access\n * to the underlying DOM node. If you want to avoid the warning, pass a `nodeRef`\n * as in this example:\n *\n * function MyComponent() {\n * const nodeRef = React.useRef(null);\n * return (\n * <Draggable nodeRef={nodeRef}>\n * <div ref={nodeRef}>Example Target</div>\n * </Draggable>\n * );\n * }\n *\n * This can be used for arbitrarily nested components, so long as the ref ends up\n * pointing to the actual child DOM node and not a custom component.\n */\n nodeRef: _propTypes.default.object,\n /**\n * Called when dragging starts.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onStart: _propTypes.default.func,\n /**\n * Called while dragging.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onDrag: _propTypes.default.func,\n /**\n * Called when dragging stops.\n * If this function returns the boolean false, the drag will remain active.\n */\n onStop: _propTypes.default.func,\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.default.func,\n /**\n * `scale`, if set, applies scaling while dragging an element\n */\n scale: _propTypes.default.number,\n /**\n * These properties should be defined on the child, not here.\n */\n className: _shims.dontSetMe,\n style: _shims.dontSetMe,\n transform: _shims.dontSetMe\n});\n_defineProperty(DraggableCore, \"defaultProps\", {\n allowAnyClick: false,\n // by default only accept left click\n allowMobileScroll: false,\n disabled: false,\n enableUserSelectHack: true,\n onStart: function () {},\n onDrag: function () {},\n onStop: function () {},\n onMouseDown: function () {},\n scale: 1\n});\n\n//# sourceURL=webpack://ReactResizable/./node_modules/react-draggable/build/cjs/DraggableCore.js?\n}");
|
|
181
|
+
|
|
182
|
+
/***/ },
|
|
183
|
+
|
|
184
|
+
/***/ "./node_modules/react-draggable/build/cjs/cjs.js"
|
|
185
|
+
/*!*******************************************************!*\
|
|
186
|
+
!*** ./node_modules/react-draggable/build/cjs/cjs.js ***!
|
|
187
|
+
\*******************************************************/
|
|
188
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
189
|
+
|
|
190
|
+
"use strict";
|
|
191
|
+
eval("{\n\nconst {\n default: Draggable,\n DraggableCore\n} = __webpack_require__(/*! ./Draggable */ \"./node_modules/react-draggable/build/cjs/Draggable.js\");\n\n// Previous versions of this lib exported <Draggable> as the root export. As to no-// 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\nmodule.exports = Draggable;\nmodule.exports[\"default\"] = Draggable;\nmodule.exports.DraggableCore = DraggableCore;\n\n//# sourceURL=webpack://ReactResizable/./node_modules/react-draggable/build/cjs/cjs.js?\n}");
|
|
192
|
+
|
|
193
|
+
/***/ },
|
|
194
|
+
|
|
195
|
+
/***/ "./node_modules/react-draggable/build/cjs/utils/domFns.js"
|
|
196
|
+
/*!****************************************************************!*\
|
|
197
|
+
!*** ./node_modules/react-draggable/build/cjs/utils/domFns.js ***!
|
|
198
|
+
\****************************************************************/
|
|
199
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
200
|
+
|
|
201
|
+
"use strict";
|
|
202
|
+
eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.addClassName = addClassName;\nexports.addEvent = addEvent;\nexports.addUserSelectStyles = addUserSelectStyles;\nexports.createCSSTransform = createCSSTransform;\nexports.createSVGTransform = createSVGTransform;\nexports.getTouch = getTouch;\nexports.getTouchIdentifier = getTouchIdentifier;\nexports.getTranslation = getTranslation;\nexports.innerHeight = innerHeight;\nexports.innerWidth = innerWidth;\nexports.matchesSelector = matchesSelector;\nexports.matchesSelectorAndParentsTo = matchesSelectorAndParentsTo;\nexports.offsetXYFromParent = offsetXYFromParent;\nexports.outerHeight = outerHeight;\nexports.outerWidth = outerWidth;\nexports.removeClassName = removeClassName;\nexports.removeEvent = removeEvent;\nexports.scheduleRemoveUserSelectStyles = scheduleRemoveUserSelectStyles;\nvar _shims = __webpack_require__(/*! ./shims */ \"./node_modules/react-draggable/build/cjs/utils/shims.js\");\nvar _getPrefix = _interopRequireWildcard(__webpack_require__(/*! ./getPrefix */ \"./node_modules/react-draggable/build/cjs/utils/getPrefix.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n/*:: import type {ControlPosition, PositionOffsetControlPosition, MouseTouchEvent} from './types';*/\nlet matchesSelectorFunc = '';\nfunction matchesSelector(el /*: Node*/, selector /*: string*/) /*: boolean*/{\n if (!matchesSelectorFunc) {\n matchesSelectorFunc = (0, _shims.findInArray)(['matches', 'webkitMatchesSelector', 'mozMatchesSelector', 'msMatchesSelector', 'oMatchesSelector'], function (method) {\n // $FlowIgnore: Doesn't think elements are indexable\n return (0, _shims.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 (!(0, _shims.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.\nfunction 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 // $FlowIgnore[incompatible-type]\n node = node.parentNode;\n } while (node);\n return false;\n}\nfunction addEvent(el /*: ?Node*/, event /*: string*/, handler /*: Function*/, inputOptions /*: Object*/) /*: void*/{\n if (!el) return;\n const options = {\n capture: true,\n ...inputOptions\n };\n // $FlowIgnore[method-unbinding]\n if (el.addEventListener) {\n el.addEventListener(event, handler, options);\n } else if (el.attachEvent) {\n el.attachEvent('on' + event, handler);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = handler;\n }\n}\nfunction removeEvent(el /*: ?Node*/, event /*: string*/, handler /*: Function*/, inputOptions /*: Object*/) /*: void*/{\n if (!el) return;\n const options = {\n capture: true,\n ...inputOptions\n };\n // $FlowIgnore[method-unbinding]\n if (el.removeEventListener) {\n el.removeEventListener(event, handler, options);\n } else if (el.detachEvent) {\n el.detachEvent('on' + event, handler);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = null;\n }\n}\nfunction 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 += (0, _shims.int)(computedStyle.borderTopWidth);\n height += (0, _shims.int)(computedStyle.borderBottomWidth);\n return height;\n}\nfunction 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 += (0, _shims.int)(computedStyle.borderLeftWidth);\n width += (0, _shims.int)(computedStyle.borderRightWidth);\n return width;\n}\nfunction innerHeight(node /*: HTMLElement*/) /*: number*/{\n let height = node.clientHeight;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n height -= (0, _shims.int)(computedStyle.paddingTop);\n height -= (0, _shims.int)(computedStyle.paddingBottom);\n return height;\n}\nfunction innerWidth(node /*: HTMLElement*/) /*: number*/{\n let width = node.clientWidth;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n width -= (0, _shims.int)(computedStyle.paddingLeft);\n width -= (0, _shims.int)(computedStyle.paddingRight);\n return width;\n}\n/*:: interface EventWithOffset {\n clientX: number, clientY: number\n}*/\n// Get from offsetParent\nfunction offsetXYFromParent(evt /*: EventWithOffset*/, offsetParent /*: HTMLElement*/, scale /*: number*/) /*: ControlPosition*/{\n const isBody = offsetParent === offsetParent.ownerDocument.body;\n const offsetParentRect = isBody ? {\n left: 0,\n top: 0\n } : offsetParent.getBoundingClientRect();\n const x = (evt.clientX + offsetParent.scrollLeft - offsetParentRect.left) / scale;\n const y = (evt.clientY + offsetParent.scrollTop - offsetParentRect.top) / scale;\n return {\n x,\n y\n };\n}\nfunction createCSSTransform(controlPos /*: ControlPosition*/, positionOffset /*: PositionOffsetControlPosition*/) /*: Object*/{\n const translation = getTranslation(controlPos, positionOffset, 'px');\n return {\n [(0, _getPrefix.browserPrefixToKey)('transform', _getPrefix.default)]: translation\n };\n}\nfunction createSVGTransform(controlPos /*: ControlPosition*/, positionOffset /*: PositionOffsetControlPosition*/) /*: string*/{\n const translation = getTranslation(controlPos, positionOffset, '');\n return translation;\n}\nfunction getTranslation(_ref /*:: */, positionOffset /*: PositionOffsetControlPosition*/, unitSuffix /*: string*/) /*: string*/{\n let {\n x,\n y\n } /*: ControlPosition*/ = _ref /*: ControlPosition*/;\n let translation = `translate(${x}${unitSuffix},${y}${unitSuffix})`;\n if (positionOffset) {\n const defaultX = `${typeof positionOffset.x === 'string' ? positionOffset.x : positionOffset.x + unitSuffix}`;\n const defaultY = `${typeof positionOffset.y === 'string' ? positionOffset.y : positionOffset.y + unitSuffix}`;\n translation = `translate(${defaultX}, ${defaultY})` + translation;\n }\n return translation;\n}\nfunction getTouch(e /*: MouseTouchEvent*/, identifier /*: number*/) /*: ?{clientX: number, clientY: number}*/{\n return e.targetTouches && (0, _shims.findInArray)(e.targetTouches, t => identifier === t.identifier) || e.changedTouches && (0, _shims.findInArray)(e.changedTouches, t => identifier === t.identifier);\n}\nfunction 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\nfunction 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 {all: inherit;}\\n';\n styleEl.innerHTML += '.react-draggable-transparent-selection *::selection {all: inherit;}\\n';\n doc.getElementsByTagName('head')[0].appendChild(styleEl);\n }\n if (doc.body) addClassName(doc.body, 'react-draggable-transparent-selection');\n}\nfunction scheduleRemoveUserSelectStyles(doc /*: ?Document*/) {\n // Prevent a possible \"forced reflow\"\n if (window.requestAnimationFrame) {\n window.requestAnimationFrame(() => {\n removeUserSelectStyles(doc);\n });\n } else {\n removeUserSelectStyles(doc);\n }\n}\nfunction removeUserSelectStyles(doc /*: ?Document*/) {\n if (!doc) return;\n try {\n if (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 // Remove selection caused by scroll, unless it's a focused input\n // (we use doc.defaultView in case we're in an iframe)\n const selection = (doc.defaultView || window).getSelection();\n if (selection && selection.type !== 'Caret') {\n selection.removeAllRanges();\n }\n }\n } catch (e) {\n // probably IE\n }\n}\nfunction 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}\nfunction 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\n//# sourceURL=webpack://ReactResizable/./node_modules/react-draggable/build/cjs/utils/domFns.js?\n}");
|
|
203
|
+
|
|
204
|
+
/***/ },
|
|
205
|
+
|
|
206
|
+
/***/ "./node_modules/react-draggable/build/cjs/utils/getPrefix.js"
|
|
207
|
+
/*!*******************************************************************!*\
|
|
208
|
+
!*** ./node_modules/react-draggable/build/cjs/utils/getPrefix.js ***!
|
|
209
|
+
\*******************************************************************/
|
|
210
|
+
(__unused_webpack_module, exports) {
|
|
211
|
+
|
|
212
|
+
"use strict";
|
|
213
|
+
eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.browserPrefixToKey = browserPrefixToKey;\nexports.browserPrefixToStyle = browserPrefixToStyle;\nexports[\"default\"] = void 0;\nexports.getPrefix = getPrefix;\nconst prefixes = ['Moz', 'Webkit', 'O', 'ms'];\nfunction getPrefix() /*: string*/{\n let prop /*: string*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'transform';\n // Ensure we're running in an environment where there is actually a global\n // `window` obj\n if (typeof window === 'undefined') return '';\n\n // If we're in a pseudo-browser server-side environment, this access\n // path may not exist, so bail out if it doesn't.\n const style = window.document?.documentElement?.style;\n if (!style) return '';\n if (prop in style) return '';\n for (let i = 0; i < prefixes.length; i++) {\n if (browserPrefixToKey(prop, prefixes[i]) in style) return prefixes[i];\n }\n return '';\n}\nfunction browserPrefixToKey(prop /*: string*/, prefix /*: string*/) /*: string*/{\n return prefix ? `${prefix}${kebabToTitleCase(prop)}` : prop;\n}\nfunction browserPrefixToStyle(prop /*: string*/, prefix /*: string*/) /*: string*/{\n return prefix ? `-${prefix.toLowerCase()}-${prop}` : prop;\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`\nvar _default = exports[\"default\"] = (getPrefix() /*: string*/);\n\n//# sourceURL=webpack://ReactResizable/./node_modules/react-draggable/build/cjs/utils/getPrefix.js?\n}");
|
|
214
|
+
|
|
215
|
+
/***/ },
|
|
216
|
+
|
|
217
|
+
/***/ "./node_modules/react-draggable/build/cjs/utils/log.js"
|
|
218
|
+
/*!*************************************************************!*\
|
|
219
|
+
!*** ./node_modules/react-draggable/build/cjs/utils/log.js ***!
|
|
220
|
+
\*************************************************************/
|
|
221
|
+
(__unused_webpack_module, exports) {
|
|
222
|
+
|
|
223
|
+
"use strict";
|
|
224
|
+
eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = log;\n/*eslint no-console:0*/\nfunction log() {\n if (false) // removed by dead control flow\n{}\n}\n\n//# sourceURL=webpack://ReactResizable/./node_modules/react-draggable/build/cjs/utils/log.js?\n}");
|
|
225
|
+
|
|
226
|
+
/***/ },
|
|
227
|
+
|
|
228
|
+
/***/ "./node_modules/react-draggable/build/cjs/utils/positionFns.js"
|
|
229
|
+
/*!*********************************************************************!*\
|
|
230
|
+
!*** ./node_modules/react-draggable/build/cjs/utils/positionFns.js ***!
|
|
231
|
+
\*********************************************************************/
|
|
232
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
233
|
+
|
|
234
|
+
"use strict";
|
|
235
|
+
eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.canDragX = canDragX;\nexports.canDragY = canDragY;\nexports.createCoreData = createCoreData;\nexports.createDraggableData = createDraggableData;\nexports.getBoundPosition = getBoundPosition;\nexports.getControlPosition = getControlPosition;\nexports.snapToGrid = snapToGrid;\nvar _shims = __webpack_require__(/*! ./shims */ \"./node_modules/react-draggable/build/cjs/utils/shims.js\");\nvar _domFns = __webpack_require__(/*! ./domFns */ \"./node_modules/react-draggable/build/cjs/utils/domFns.js\");\n/*:: import type Draggable from '../Draggable';*/\n/*:: import type {Bounds, ControlPosition, DraggableData, MouseTouchEvent} from './types';*/\n/*:: import type DraggableCore from '../DraggableCore';*/\nfunction 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 {\n bounds\n } = draggable.props;\n bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds);\n const node = findDOMNode(draggable);\n if (typeof bounds === 'string') {\n const {\n ownerDocument\n } = node;\n const ownerWindow = ownerDocument.defaultView;\n let boundNode;\n if (bounds === 'parent') {\n boundNode = node.parentNode;\n } else {\n // Flow assigns the wrong return type (Node) for getRootNode(),\n // so we cast it to one of the correct types (Element).\n // The others are Document and ShadowRoot.\n // All three implement querySelector() so it's safe to call.\n const rootNode = ((node.getRootNode() /*: any*/) /*: Element*/);\n boundNode = rootNode.querySelector(bounds);\n }\n if (!(boundNode instanceof ownerWindow.HTMLElement)) {\n throw new Error('Bounds selector \"' + bounds + '\" could not find an element.');\n }\n const boundNodeEl /*: HTMLElement*/ = boundNode; // for Flow, can't seem to refine correctly\n const nodeStyle = ownerWindow.getComputedStyle(node);\n const boundNodeStyle = ownerWindow.getComputedStyle(boundNodeEl);\n // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n bounds = {\n left: -node.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingLeft) + (0, _shims.int)(nodeStyle.marginLeft),\n top: -node.offsetTop + (0, _shims.int)(boundNodeStyle.paddingTop) + (0, _shims.int)(nodeStyle.marginTop),\n right: (0, _domFns.innerWidth)(boundNodeEl) - (0, _domFns.outerWidth)(node) - node.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingRight) - (0, _shims.int)(nodeStyle.marginRight),\n bottom: (0, _domFns.innerHeight)(boundNodeEl) - (0, _domFns.outerHeight)(node) - node.offsetTop + (0, _shims.int)(boundNodeStyle.paddingBottom) - (0, _shims.int)(nodeStyle.marginBottom)\n };\n }\n\n // Keep x and y below right and bottom limits...\n if ((0, _shims.isNum)(bounds.right)) x = Math.min(x, bounds.right);\n if ((0, _shims.isNum)(bounds.bottom)) y = Math.min(y, bounds.bottom);\n\n // But above left and top limits.\n if ((0, _shims.isNum)(bounds.left)) x = Math.max(x, bounds.left);\n if ((0, _shims.isNum)(bounds.top)) y = Math.max(y, bounds.top);\n return [x, y];\n}\nfunction 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}\nfunction canDragX(draggable /*: Draggable*/) /*: boolean*/{\n return draggable.props.axis === 'both' || draggable.props.axis === 'x';\n}\nfunction canDragY(draggable /*: Draggable*/) /*: boolean*/{\n return draggable.props.axis === 'both' || draggable.props.axis === 'y';\n}\n\n// Get {x, y} positions from event.\nfunction getControlPosition(e /*: MouseTouchEvent*/, touchIdentifier /*: ?number*/, draggableCore /*: DraggableCore*/) /*: ?ControlPosition*/{\n const touchObj = typeof touchIdentifier === 'number' ? (0, _domFns.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 (0, _domFns.offsetXYFromParent)(touchObj || e, offsetParent, draggableCore.props.scale);\n}\n\n// Create an data object exposed by <DraggableCore>'s events\nfunction createCoreData(draggable /*: DraggableCore*/, x /*: number*/, y /*: number*/) /*: DraggableData*/{\n const isStart = !(0, _shims.isNum)(draggable.lastX);\n const node = findDOMNode(draggable);\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,\n deltaY: 0,\n lastX: x,\n lastY: y,\n x,\n y\n };\n } else {\n // Otherwise calculate proper values.\n return {\n node,\n deltaX: x - draggable.lastX,\n deltaY: y - draggable.lastY,\n lastX: draggable.lastX,\n lastY: draggable.lastY,\n x,\n y\n };\n }\n}\n\n// Create an data exposed by <Draggable>'s events\nfunction 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}\nfunction findDOMNode(draggable /*: Draggable | DraggableCore*/) /*: HTMLElement*/{\n const node = draggable.findDOMNode();\n if (!node) {\n throw new Error('<DraggableCore>: Unmounted during event!');\n }\n // $FlowIgnore we can't assert on HTMLElement due to tests... FIXME\n return node;\n}\n\n//# sourceURL=webpack://ReactResizable/./node_modules/react-draggable/build/cjs/utils/positionFns.js?\n}");
|
|
236
|
+
|
|
237
|
+
/***/ },
|
|
238
|
+
|
|
239
|
+
/***/ "./node_modules/react-draggable/build/cjs/utils/shims.js"
|
|
240
|
+
/*!***************************************************************!*\
|
|
241
|
+
!*** ./node_modules/react-draggable/build/cjs/utils/shims.js ***!
|
|
242
|
+
\***************************************************************/
|
|
243
|
+
(__unused_webpack_module, exports) {
|
|
244
|
+
|
|
245
|
+
"use strict";
|
|
246
|
+
eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.dontSetMe = dontSetMe;\nexports.findInArray = findInArray;\nexports.int = int;\nexports.isFunction = isFunction;\nexports.isNum = isNum;\n// @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc\nfunction findInArray(array /*: Array<any> | 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}\nfunction isFunction(func /*: any*/) /*: boolean %checks*/{\n // $FlowIgnore[method-unbinding]\n return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';\n}\nfunction isNum(num /*: any*/) /*: boolean %checks*/{\n return typeof num === 'number' && !isNaN(num);\n}\nfunction int(a /*: string*/) /*: number*/{\n return parseInt(a, 10);\n}\nfunction dontSetMe(props /*: Object*/, propName /*: string*/, componentName /*: string*/) /*: ?Error*/{\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\n//# sourceURL=webpack://ReactResizable/./node_modules/react-draggable/build/cjs/utils/shims.js?\n}");
|
|
247
|
+
|
|
248
|
+
/***/ },
|
|
249
|
+
|
|
250
|
+
/***/ "./node_modules/react-is/cjs/react-is.development.js"
|
|
251
|
+
/*!***********************************************************!*\
|
|
252
|
+
!*** ./node_modules/react-is/cjs/react-is.development.js ***!
|
|
253
|
+
\***********************************************************/
|
|
254
|
+
(__unused_webpack_module, exports) {
|
|
255
|
+
|
|
256
|
+
"use strict";
|
|
257
|
+
eval("{/** @license React v16.13.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\n\n\n\nif (true) {\n (function() {\n'use strict';\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;\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; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\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_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // 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 || type === REACT_SUSPENSE_LIST_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 || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\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\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_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\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;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('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\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.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.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;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n\n\n//# sourceURL=webpack://ReactResizable/./node_modules/react-is/cjs/react-is.development.js?\n}");
|
|
258
|
+
|
|
259
|
+
/***/ },
|
|
260
|
+
|
|
261
|
+
/***/ "./node_modules/react-is/index.js"
|
|
262
|
+
/*!****************************************!*\
|
|
263
|
+
!*** ./node_modules/react-is/index.js ***!
|
|
264
|
+
\****************************************/
|
|
265
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
266
|
+
|
|
267
|
+
"use strict";
|
|
268
|
+
eval("{\n\nif (false) // removed by dead control flow\n{} else {\n module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ \"./node_modules/react-is/cjs/react-is.development.js\");\n}\n\n\n//# sourceURL=webpack://ReactResizable/./node_modules/react-is/index.js?\n}");
|
|
269
|
+
|
|
270
|
+
/***/ },
|
|
271
|
+
|
|
272
|
+
/***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"
|
|
273
|
+
/*!****************************************************************************!*\
|
|
274
|
+
!*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***!
|
|
275
|
+
\****************************************************************************/
|
|
276
|
+
(module) {
|
|
277
|
+
|
|
278
|
+
"use strict";
|
|
279
|
+
eval("{\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};\n\n//# sourceURL=webpack://ReactResizable/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js?\n}");
|
|
280
|
+
|
|
281
|
+
/***/ },
|
|
282
|
+
|
|
283
|
+
/***/ "./node_modules/style-loader/dist/runtime/insertBySelector.js"
|
|
284
|
+
/*!********************************************************************!*\
|
|
285
|
+
!*** ./node_modules/style-loader/dist/runtime/insertBySelector.js ***!
|
|
286
|
+
\********************************************************************/
|
|
287
|
+
(module) {
|
|
288
|
+
|
|
289
|
+
"use strict";
|
|
290
|
+
eval("{\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;\n\n//# sourceURL=webpack://ReactResizable/./node_modules/style-loader/dist/runtime/insertBySelector.js?\n}");
|
|
291
|
+
|
|
292
|
+
/***/ },
|
|
293
|
+
|
|
294
|
+
/***/ "./node_modules/style-loader/dist/runtime/insertStyleElement.js"
|
|
295
|
+
/*!**********************************************************************!*\
|
|
296
|
+
!*** ./node_modules/style-loader/dist/runtime/insertStyleElement.js ***!
|
|
297
|
+
\**********************************************************************/
|
|
298
|
+
(module) {
|
|
299
|
+
|
|
300
|
+
"use strict";
|
|
301
|
+
eval("{\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;\n\n//# sourceURL=webpack://ReactResizable/./node_modules/style-loader/dist/runtime/insertStyleElement.js?\n}");
|
|
302
|
+
|
|
303
|
+
/***/ },
|
|
304
|
+
|
|
305
|
+
/***/ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"
|
|
306
|
+
/*!**********************************************************************************!*\
|
|
307
|
+
!*** ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***!
|
|
308
|
+
\**********************************************************************************/
|
|
309
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
310
|
+
|
|
311
|
+
"use strict";
|
|
312
|
+
eval("{\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = true ? __webpack_require__.nc : 0;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;\n\n//# sourceURL=webpack://ReactResizable/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js?\n}");
|
|
313
|
+
|
|
314
|
+
/***/ },
|
|
315
|
+
|
|
316
|
+
/***/ "./node_modules/style-loader/dist/runtime/styleDomAPI.js"
|
|
317
|
+
/*!***************************************************************!*\
|
|
318
|
+
!*** ./node_modules/style-loader/dist/runtime/styleDomAPI.js ***!
|
|
319
|
+
\***************************************************************/
|
|
320
|
+
(module) {
|
|
321
|
+
|
|
322
|
+
"use strict";
|
|
323
|
+
eval("{\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;\n\n//# sourceURL=webpack://ReactResizable/./node_modules/style-loader/dist/runtime/styleDomAPI.js?\n}");
|
|
324
|
+
|
|
325
|
+
/***/ },
|
|
326
|
+
|
|
327
|
+
/***/ "./node_modules/style-loader/dist/runtime/styleTagTransform.js"
|
|
328
|
+
/*!*********************************************************************!*\
|
|
329
|
+
!*** ./node_modules/style-loader/dist/runtime/styleTagTransform.js ***!
|
|
330
|
+
\*********************************************************************/
|
|
331
|
+
(module) {
|
|
332
|
+
|
|
333
|
+
"use strict";
|
|
334
|
+
eval("{\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;\n\n//# sourceURL=webpack://ReactResizable/./node_modules/style-loader/dist/runtime/styleTagTransform.js?\n}");
|
|
335
|
+
|
|
336
|
+
/***/ },
|
|
337
|
+
|
|
338
|
+
/***/ "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+"
|
|
339
|
+
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
340
|
+
!*** data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+ ***!
|
|
341
|
+
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
342
|
+
(module) {
|
|
343
|
+
|
|
344
|
+
"use strict";
|
|
345
|
+
eval("{module.exports = \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+\";\n\n//# sourceURL=webpack://ReactResizable/data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+?\n}");
|
|
346
|
+
|
|
347
|
+
/***/ },
|
|
348
|
+
|
|
349
|
+
/***/ "react"
|
|
350
|
+
/*!**************************************************************************************!*\
|
|
351
|
+
!*** external {"commonjs":"react","commonjs2":"react","amd":"react","root":"React"} ***!
|
|
352
|
+
\**************************************************************************************/
|
|
353
|
+
(module) {
|
|
354
|
+
|
|
355
|
+
"use strict";
|
|
356
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_react__;
|
|
357
|
+
|
|
358
|
+
/***/ },
|
|
359
|
+
|
|
360
|
+
/***/ "react-dom"
|
|
361
|
+
/*!*****************************************************************************************************!*\
|
|
362
|
+
!*** external {"commonjs":"react-dom","commonjs2":"react-dom","amd":"react-dom","root":"ReactDOM"} ***!
|
|
363
|
+
\*****************************************************************************************************/
|
|
364
|
+
(module) {
|
|
365
|
+
|
|
366
|
+
"use strict";
|
|
367
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_react_dom__;
|
|
368
|
+
|
|
369
|
+
/***/ }
|
|
370
|
+
|
|
371
|
+
/******/ });
|
|
372
|
+
/************************************************************************/
|
|
373
|
+
/******/ // The module cache
|
|
374
|
+
/******/ var __webpack_module_cache__ = {};
|
|
375
|
+
/******/
|
|
376
|
+
/******/ // The require function
|
|
377
|
+
/******/ function __webpack_require__(moduleId) {
|
|
378
|
+
/******/ // Check if module is in cache
|
|
379
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
380
|
+
/******/ if (cachedModule !== undefined) {
|
|
381
|
+
/******/ return cachedModule.exports;
|
|
382
|
+
/******/ }
|
|
383
|
+
/******/ // Check if module exists (development only)
|
|
384
|
+
/******/ if (__webpack_modules__[moduleId] === undefined) {
|
|
385
|
+
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
386
|
+
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
387
|
+
/******/ throw e;
|
|
388
|
+
/******/ }
|
|
389
|
+
/******/ // Create a new module (and put it into the cache)
|
|
390
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
391
|
+
/******/ id: moduleId,
|
|
392
|
+
/******/ // no module.loaded needed
|
|
393
|
+
/******/ exports: {}
|
|
394
|
+
/******/ };
|
|
395
|
+
/******/
|
|
396
|
+
/******/ // Execute the module function
|
|
397
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
398
|
+
/******/
|
|
399
|
+
/******/ // Return the exports of the module
|
|
400
|
+
/******/ return module.exports;
|
|
401
|
+
/******/ }
|
|
402
|
+
/******/
|
|
403
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
404
|
+
/******/ __webpack_require__.m = __webpack_modules__;
|
|
405
|
+
/******/
|
|
406
|
+
/************************************************************************/
|
|
407
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
408
|
+
/******/ (() => {
|
|
409
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
410
|
+
/******/ __webpack_require__.n = (module) => {
|
|
411
|
+
/******/ var getter = module && module.__esModule ?
|
|
412
|
+
/******/ () => (module['default']) :
|
|
413
|
+
/******/ () => (module);
|
|
414
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
415
|
+
/******/ return getter;
|
|
416
|
+
/******/ };
|
|
417
|
+
/******/ })();
|
|
418
|
+
/******/
|
|
419
|
+
/******/ /* webpack/runtime/define property getters */
|
|
420
|
+
/******/ (() => {
|
|
421
|
+
/******/ // define getter functions for harmony exports
|
|
422
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
423
|
+
/******/ for(var key in definition) {
|
|
424
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
425
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
426
|
+
/******/ }
|
|
427
|
+
/******/ }
|
|
428
|
+
/******/ };
|
|
429
|
+
/******/ })();
|
|
430
|
+
/******/
|
|
431
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
432
|
+
/******/ (() => {
|
|
433
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
434
|
+
/******/ })();
|
|
435
|
+
/******/
|
|
436
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
437
|
+
/******/ (() => {
|
|
438
|
+
/******/ // define __esModule on exports
|
|
439
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
440
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
441
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
442
|
+
/******/ }
|
|
443
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
444
|
+
/******/ };
|
|
445
|
+
/******/ })();
|
|
446
|
+
/******/
|
|
447
|
+
/******/ /* webpack/runtime/jsonp chunk loading */
|
|
448
|
+
/******/ (() => {
|
|
449
|
+
/******/ __webpack_require__.b = (typeof document !== 'undefined' && document.baseURI) || self.location.href;
|
|
450
|
+
/******/
|
|
451
|
+
/******/ // object to store loaded and loading chunks
|
|
452
|
+
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
|
453
|
+
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
|
454
|
+
/******/ var installedChunks = {
|
|
455
|
+
/******/ "test": 0
|
|
456
|
+
/******/ };
|
|
457
|
+
/******/
|
|
458
|
+
/******/ // no chunk on demand loading
|
|
459
|
+
/******/
|
|
460
|
+
/******/ // no prefetching
|
|
461
|
+
/******/
|
|
462
|
+
/******/ // no preloaded
|
|
463
|
+
/******/
|
|
464
|
+
/******/ // no HMR
|
|
465
|
+
/******/
|
|
466
|
+
/******/ // no HMR manifest
|
|
467
|
+
/******/
|
|
468
|
+
/******/ // no on chunks loaded
|
|
469
|
+
/******/
|
|
470
|
+
/******/ // no jsonp function
|
|
471
|
+
/******/ })();
|
|
472
|
+
/******/
|
|
473
|
+
/******/ /* webpack/runtime/nonce */
|
|
474
|
+
/******/ (() => {
|
|
475
|
+
/******/ __webpack_require__.nc = undefined;
|
|
476
|
+
/******/ })();
|
|
477
|
+
/******/
|
|
478
|
+
/************************************************************************/
|
|
479
|
+
/******/
|
|
480
|
+
/******/ // startup
|
|
481
|
+
/******/ // Load entry module and return exports
|
|
482
|
+
/******/ // This entry module can't be inlined because the eval devtool is used.
|
|
483
|
+
/******/ var __webpack_exports__ = __webpack_require__("./examples/example.js");
|
|
484
|
+
/******/
|
|
485
|
+
/******/ return __webpack_exports__;
|
|
486
|
+
/******/ })()
|
|
487
|
+
;
|
|
488
|
+
});
|