-
Notifications
You must be signed in to change notification settings - Fork 4
/
react-redux-6.0-mark.min.js
2 lines (2 loc) · 9.42 KB
/
react-redux-6.0-mark.min.js
1
2
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("redux")):"function"==typeof define&&define.amd?define(["exports","react","redux"],t):t(e.ReactRedux={},e.React,e.Redux)}(this,function(e,t,r){"use strict";var n="default"in t?t.default:t;var o="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";function i(){}var a,s=(function(e){e.exports=function(){function e(e,t,r,n,i,a){if(a!==o){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return r.checkPropTypes=i,r.PropTypes=r,r}()}(a={exports:{}},a.exports),a.exports),p=s.shape({subscribe:s.func.isRequired,dispatch:s.func.isRequired,getState:s.func.isRequired}),u=n.createContext(null),c=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},d=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},l=function(e,t){var r={};for(var n in e)0>t.indexOf(n)&&Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},h=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t};function v(){var e=function(e){function r(t){c(this,r);var n=h(this,e.call(this,t)),o=t.store;return n.state={storeState:o.getState(),store:o},n}return f(r,e),r.prototype.componentDidMount=function(){this.subscribe()},r.prototype.componentWillUnmount=function(){this.unsubscribe&&(this.unsubscribe(),this._isMounted=!1)},r.prototype.subscribe=function(){var e=this,t=this.props.store;this._isMounted=!0,this.unsubscribe=t.subscribe(function(){var r=t.getState();e._isMounted&&e.setState(function(e){return e.storeState===r?null:{storeState:r}})});var r=t.getState();r!==this.state.storeState&&this.setState({storeState:r})},r.prototype.render=function(){return n.createElement(u.Provider,{value:this.state},t.Children.only(this.props.children))},r}(t.Component);return e.propTypes={store:p.isRequired,children:s.element.isRequired},e}var P=v(),y={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},m={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},O=Object.defineProperty,g=Object.getOwnPropertyNames,b=Object.getOwnPropertySymbols,S=Object.getOwnPropertyDescriptor,w=Object.getPrototypeOf,C=w&&w(Object);var E=function e(t,r,n){if("string"!=typeof r){if(C){var o=w(r);o&&o!==C&&e(t,o,n)}var i=g(r);b&&(i=i.concat(b(r)));for(var a=0;i.length>a;++a){var s=i[a];if(!(y[s]||m[s]||n&&n[s])){var p=S(r,s);try{O(t,s,p)}catch(e){}}}return t}return t},T=function(e,t,r,n,o,i,a,s){if(!e){var p;if(void 0===t)p=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,o,i,a,s],c=0;(p=Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw p.framesToPop=1,p}};function q(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.getDisplayName,i=void 0===o?function(e){return"ConnectAdvanced("+e+")"}:o,a=r.methodName,s=void 0===a?"connectAdvanced":a,p=r.renderCountProp,v=void 0===p?void 0:p,P=r.shouldHandleStateChanges,y=void 0===P||P,m=r.storeKey,O=void 0===m?"store":m,g=r.withRef,b=void 0!==g&&g,S=l(r,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]);return function(r){T("function"==typeof r,"You must pass a component to the function returned by "+s+". Instead received "+JSON.stringify(r));var o=r.displayName||r.name||"Component",a=i(o),p=d({},S,{getDisplayName:i,methodName:s,renderCountProp:v,shouldHandleStateChanges:y,storeKey:O,withRef:b,displayName:a,wrappedComponentName:o,WrappedComponent:r}),l=S.pure?t.PureComponent:t.Component,P=function(t){function o(e){c(this,o);var r=h(this,t.call(this,e));return r.state={wrapperProps:e.wrapperProps,renderCount:0,store:e.store,error:null,childPropsSelector:r.createChildSelector(e.store),childProps:{}},r.state=d({},r.state,o.getChildPropsState(e,r.state)),r}return f(o,t),o.prototype.createChildSelector=function(){return e((arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state.store).dispatch,p)},o.getChildPropsState=function(e,t){try{var r=t.childPropsSelector(e.storeState,e.wrapperProps);return r===t.childProps?null:{childProps:r}}catch(e){return{error:e}}},o.getDerivedStateFromProps=function(e,t){var r=o.getChildPropsState(e,t);return null===r?null:d({},r,{wrapperProps:e.wrapperProps})},o.prototype.shouldComponentUpdate=function(e,t){return t.childProps!==this.state.childProps||!!t.error},o.prototype.render=function(){if(this.state.error)throw this.state.error;return n.createElement(r,this.state.childProps)},o}(t.Component),m=function(e){function t(r){c(this,t);var n=h(this,e.call(this,r));return n.renderInner=n.renderInner.bind(n),n}return f(t,e),t.prototype.renderInner=function(e){return n.createElement(P,{key:this.version,storeState:e.storeState,store:e.store,wrapperProps:this.props})},t.prototype.render=function(){return n.createElement(u.Consumer,null,this.renderInner)},t}(l);return m.WrappedComponent=r,m.displayName=a,E(m,r)}}var j=Object.prototype.hasOwnProperty;function x(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function M(e,t){if(x(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(var n=0;r.length>n;n++)if(!j.call(t,r[n])||!x(e[r[n]],t[r[n]]))return!1;return!0}function R(e){return function(t,r){var n=e(t,r);function o(){return n}return o.dependsOnOwnProps=!1,o}}function _(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?!!e.dependsOnOwnProps:1!==e.length}function N(e,t){return function(t,r){var n=function(e,t){return n.dependsOnOwnProps?n.mapToProps(e,t):n.mapToProps(e)};return n.dependsOnOwnProps=!0,n.mapToProps=function(t,r){n.mapToProps=e,n.dependsOnOwnProps=_(e);var o=n(t,r);return"function"==typeof o&&(n.mapToProps=o,n.dependsOnOwnProps=_(o),o=n(t,r)),o},n}}var D=[function(e){return"function"==typeof e?N(e):void 0},function(e){return e?void 0:R(function(e){return{dispatch:e}})},function(e){return e&&"object"==typeof e?R(function(t){return r.bindActionCreators(e,t)}):void 0}];var I=[function(e){return"function"==typeof e?N(e):void 0},function(e){return e?void 0:R(function(){return{}})}];function k(e,t,r){return d({},r,e,t)}var F=[function(e){return"function"==typeof e?function(e){return function(t,r){var n=r.pure,o=r.areMergedPropsEqual,i=!1,a=void 0;return function(t,r,s){var p=e(t,r,s);return i?n&&o(p,a)||(a=p):(i=!0,a=p),a}}}(e):void 0},function(e){return e?void 0:function(){return k}}];function H(e,t,r,n){return function(o,i){return r(e(o,i),t(n,i),i)}}function A(e,t,r,n,o){var i=o.areStatesEqual,a=o.areOwnPropsEqual,s=o.areStatePropsEqual,p=!1,u=void 0,c=void 0,d=void 0,f=void 0,l=void 0;function h(o,p){var h,v,P=!a(p,c),y=!i(o,u);return u=o,c=p,P&&y?(d=e(u,c),t.dependsOnOwnProps&&(f=t(n,c)),l=r(d,f,c)):P?(e.dependsOnOwnProps&&(d=e(u,c)),t.dependsOnOwnProps&&(f=t(n,c)),l=r(d,f,c)):y?(h=e(u,c),v=!s(h,d),d=h,v&&(l=r(d,f,c)),l):l}return function(o,i){return p?h(o,i):(d=e(u=o,c=i),f=t(n,c),l=r(d,f,c),p=!0,l)}}function U(e,t){var r=t.initMapStateToProps,n=t.initMapDispatchToProps,o=t.initMergeProps,i=l(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),a=r(e,i),s=n(e,i),p=o(e,i);return(i.pure?A:H)(a,s,p,e,i)}function W(e,t,r){for(var n=t.length-1;n>=0;n--){var o=t[n](e);if(o)return o}return function(t,n){throw Error("Invalid value of type "+typeof e+" for "+r+" argument when connecting component "+n.wrappedComponentName+".")}}function K(e,t){return e===t}var L=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.connectHOC,r=void 0===t?q:t,n=e.mapStateToPropsFactories,o=void 0===n?I:n,i=e.mapDispatchToPropsFactories,a=void 0===i?D:i,s=e.mergePropsFactories,p=void 0===s?F:s,u=e.selectorFactory,c=void 0===u?U:u;return function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=i.pure,u=void 0===s||s,f=i.areStatesEqual,h=void 0===f?K:f,v=i.areOwnPropsEqual,P=void 0===v?M:v,y=i.areStatePropsEqual,m=void 0===y?M:y,O=i.areMergedPropsEqual,g=void 0===O?M:O,b=l(i,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),S=W(e,o,"mapStateToProps"),w=W(t,a,"mapDispatchToProps"),C=W(n,p,"mergeProps");return r(c,d({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:!!e,initMapStateToProps:S,initMapDispatchToProps:w,initMergeProps:C,pure:u,areStatesEqual:h,areOwnPropsEqual:P,areStatePropsEqual:m,areMergedPropsEqual:g},b))}}();e.Provider=P,e.createProvider=v,e.connectAdvanced=q,e.connect=L,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=react-redux.min.js.map