{"version":3,"sources":["webpack:///./node_modules/rc-resize-observer/es/index.js","webpack:///./node_modules/rc-resize-observer/es/util.js"],"names":["_typeof","obj","Symbol","iterator","constructor","prototype","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","_possibleConstructorReturn","self","call","ReferenceError","_assertThisInitialized","_getPrototypeOf","o","setPrototypeOf","getPrototypeOf","__proto__","_setPrototypeOf","p","__importStar","this","mod","__esModule","result","k","hasOwnProperty","__importDefault","exports","value","React","findDOMNode_1","toArray_1","warning_1","ref_1","resize_observer_polyfill_1","util_1","ReactResizeObserver","_React$Component","_this","apply","arguments","resizeObserver","childNode","currentElement","state","width","height","onResize","entries","_target$getBoundingCl","getBoundingClientRect","fixedWidth","Math","floor","fixedHeight","size","setState","setChildNode","node","protoProps","staticProps","subClass","superClass","create","_inherits","onComponentUpdated","destroyObserver","disabled","element","default","observe","disconnect","children","childNodes","isValidElement","supportRef","ref","cloneElement","composeRef","map","index","concat","Component","displayName","type","render"],"mappings":"2FAEA,SAASA,EAAQC,GAAwT,OAAtOD,EAArD,mBAAXE,QAAoD,iBAApBA,OAAOC,SAAmC,SAAiBF,GAAO,cAAcA,GAA2B,SAAiBA,GAAO,OAAOA,GAAyB,mBAAXC,QAAyBD,EAAIG,cAAgBF,QAAUD,IAAQC,OAAOG,UAAY,gBAAkBJ,IAAyBA,GAExV,SAASK,EAAgBC,EAAUC,GAAe,KAAMD,aAAoBC,GAAgB,MAAM,IAAIC,UAAU,qCAEhH,SAASC,EAAkBC,EAAQC,GAAS,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CAAE,IAAIE,EAAaH,EAAMC,GAAIE,EAAWC,WAAaD,EAAWC,aAAc,EAAOD,EAAWE,cAAe,EAAU,UAAWF,IAAYA,EAAWG,UAAW,GAAMC,OAAOC,eAAeT,EAAQI,EAAWM,IAAKN,IAI7S,SAASO,EAA2BC,EAAMC,GAAQ,O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js","sourcesContent":["\"use strict\";\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nvar __importStar = this && this.__importStar || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n }\n result[\"default\"] = mod;\n return result;\n};\n\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar React = __importStar(require(\"react\"));\n\nvar findDOMNode_1 = __importDefault(require(\"rc-util/lib/Dom/findDOMNode\"));\n\nvar toArray_1 = __importDefault(require(\"rc-util/lib/Children/toArray\"));\n\nvar warning_1 = __importDefault(require(\"rc-util/lib/warning\"));\n\nvar ref_1 = require(\"rc-util/lib/ref\");\n\nvar resize_observer_polyfill_1 = __importDefault(require(\"resize-observer-polyfill\"));\n\nvar util_1 = require(\"./util\");\n\nvar INTERNAL_PREFIX_KEY = 'rc-observer-key'; // Still need to be compatible with React 15, we use class component here\n\nvar ReactResizeObserver =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(ReactResizeObserver, _React$Component);\n\n function ReactResizeObserver() {\n var _this;\n\n _classCallCheck(this, ReactResizeObserver);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(ReactResizeObserver).apply(this, arguments));\n _this.resizeObserver = null;\n _this.childNode = null;\n _this.currentElement = null;\n _this.state = {\n width: 0,\n height: 0\n };\n\n _this.onResize = function (entries) {\n var onResize = _this.props.onResize;\n var target = entries[0].target;\n\n var _target$getBoundingCl = target.getBoundingClientRect(),\n width = _target$getBoundingCl.width,\n height = _target$getBoundingCl.height;\n /**\n * Resize observer trigger when content size changed.\n * In most case we just care about element size,\n * let's use `boundary` instead of `contentRect` here to avoid shaking.\n */\n\n\n var fixedWidth = Math.floor(width);\n var fixedHeight = Math.floor(height);\n\n if (_this.state.width !== fixedWidth || _this.state.height !== fixedHeight) {\n var size = {\n width: fixedWidth,\n height: fixedHeight\n };\n\n _this.setState(size);\n\n if (onResize) {\n onResize(size);\n }\n }\n };\n\n _this.setChildNode = function (node) {\n _this.childNode = node;\n };\n\n return _this;\n }\n\n _createClass(ReactResizeObserver, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.onComponentUpdated();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n this.onComponentUpdated();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.destroyObserver();\n }\n }, {\n key: \"onComponentUpdated\",\n value: function onComponentUpdated() {\n var disabled = this.props.disabled; // Unregister if disabled\n\n if (disabled) {\n this.destroyObserver();\n return;\n } // Unregister if element changed\n\n\n var element = findDOMNode_1.default(this.childNode || this);\n var elementChanged = element !== this.currentElement;\n\n if (elementChanged) {\n this.destroyObserver();\n this.currentElement = element;\n }\n\n if (!this.resizeObserver && element) {\n this.resizeObserver = new resize_observer_polyfill_1.default(this.onResize);\n this.resizeObserver.observe(element);\n }\n }\n }, {\n key: \"destroyObserver\",\n value: function destroyObserver() {\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n this.resizeObserver = null;\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var children = this.props.children;\n var childNodes = toArray_1.default(children);\n\n if (childNodes.length > 1) {\n warning_1.default(false, 'Find more than one child node with `children` in ResizeObserver. Will only observe first one.');\n } else if (childNodes.length === 0) {\n warning_1.default(false, '`children` of ResizeObserver is empty. Nothing is in observe.');\n return null;\n }\n\n var childNode = childNodes[0];\n\n if (React.isValidElement(childNode) && util_1.supportRef(childNode)) {\n var ref = childNode.ref;\n childNodes[0] = React.cloneElement(childNode, {\n ref: ref_1.composeRef(ref, this.setChildNode)\n });\n }\n\n return childNodes.length === 1 ? childNodes[0] : childNodes.map(function (node, index) {\n if (!React.isValidElement(node) || 'key' in node && node.key !== null) {\n return node;\n }\n\n return React.cloneElement(node, {\n key: \"\".concat(INTERNAL_PREFIX_KEY, \"-\").concat(index)\n });\n });\n }\n }]);\n\n return ReactResizeObserver;\n}(React.Component);\n\nReactResizeObserver.displayName = 'ResizeObserver';\nexports.default = ReactResizeObserver;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction supportRef(node) {\n // Function component\n if (node.type && node.type.prototype && !node.type.prototype.render) {\n return false;\n }\n\n return true;\n}\n\nexports.supportRef = supportRef;"],"sourceRoot":""}