import{T as t}from"../../../../_virtual/TransitionGroup.js_commonjs-module";import"../../../prop-types/index.js";import e from"react";import"../../../react-lifecycles-compat/react-lifecycles-compat.es.js";import n from"../../../../_virtual/react-lifecycles-compat.es.js_commonjs-proxy";import"./utils/ChildMapping.js";import{__exports as r}from"../../../../_virtual/ChildMapping.js_commonjs-exports";import{p as o}from"../../../../_virtual/index.js_commonjs-module";!function(t,i){i.__esModule=!0,i.default=void 0;var a=d(o.exports),p=d(e),l=n,c=r;function d(t){return t&&t.__esModule?t:{default:t}}function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var f=Object.values||function(t){return Object.keys(t).map((function(e){return t[e]}))},h=function(t){var e,n;function r(e,n){var r,o=(r=t.call(this,e,n)||this).handleExited.bind(u(u(r)));return r.state={handleExited:o,firstRender:!0},r}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var o=r.prototype;return o.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},o.componentDidMount=function(){this.appeared=!0,this.mounted=!0},o.componentWillUnmount=function(){this.mounted=!1},r.getDerivedStateFromProps=function(t,e){var n=e.children,r=e.handleExited;return{children:e.firstRender?(0,c.getInitialChildMapping)(t,r):(0,c.getNextChildMapping)(t,n,r),firstRender:!1}},o.handleExited=function(t,e){var n=(0,c.getChildMapping)(this.props.children);t.key in n||(t.props.onExited&&t.props.onExited(e),this.mounted&&this.setState((function(e){var n=s({},e.children);return delete n[t.key],{children:n}})))},o.render=function(){var t=this.props,e=t.component,n=t.childFactory,r=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,["component","childFactory"]),o=f(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===e?o:p.default.createElement(e,r,o)},r}(p.default.Component);h.childContextTypes={transitionGroup:a.default.object.isRequired},h.propTypes="production"!==process.env.NODE_ENV?{component:a.default.any,children:a.default.node,appear:a.default.bool,enter:a.default.bool,exit:a.default.bool,childFactory:a.default.func}:{},h.defaultProps={component:"div",childFactory:function(t){return t}};var m=(0,l.polyfill)(h);i.default=m,t.exports=i.default}(t,t.exports);
//# sourceMappingURL=TransitionGroup.js.map
