import e from"../../@babel/runtime/helpers/esm/inheritsLoose.js";import n from"../../@babel/runtime/helpers/esm/defineProperty.js";import t,{PureComponent as o}from"react";function r(r,i){if("production"!==process.env.NODE_ENV){if("function"!=typeof r)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof i)throw new Error("Expected handleStateChangeOnClient to be a function.")}return function(p){if("production"!==process.env.NODE_ENV&&"function"!=typeof p)throw new Error("Expected WrappedComponent to be a React component.");var c,u=[];function f(){c=r(u.map((function(e){return e.props}))),i(c)}var a=function(n){function o(){return n.apply(this,arguments)||this}e(o,n),o.peek=function(){return c};var r=o.prototype;return r.componentDidMount=function(){u.push(this),f()},r.componentDidUpdate=function(){f()},r.componentWillUnmount=function(){var e=u.indexOf(this);u.splice(e,1),f()},r.render=function(){return t.createElement(p,this.props)},o}(o);return n(a,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(p)+")"),a}}export default r;
//# sourceMappingURL=index.es.js.map
