LocalCDN-Firefox-Chrome-Brave/resources/react-redux/7.2.5/react-redux.min.jsm

10 lines
14 KiB
JavaScript

!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","react-dom"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).ReactRedux={},e.React,e.ReactDOM)}(this,(function(e,r,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(r);function u(e,r,t){return e(t={path:r,exports:{},require:function(e,r){return function(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},t.exports),t.exports}function a(){}function c(){}c.resetWarningCache=a;u((function(e){e.exports=function(){function e(e,r,t,n,o,u){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==u){var a=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 a.name="Invariant Violation",a}}function r(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:c,resetWarningCache:a};return t.PropTypes=t,t}()}));var i=o.default.createContext(null);var f=function(e){e()},s=function(){return f};var p={notify:function(){},get:function(){return[]}};function l(e,r){var t,n=p;function o(){a.onStateChange&&a.onStateChange()}function u(){t||(t=r?r.addNestedSub(o):e.subscribe(o),n=function(){var e=s(),r=null,t=null;return{clear:function(){r=null,t=null},notify:function(){e((function(){for(var e=r;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],t=r;t;)e.push(t),t=t.next;return e},subscribe:function(e){var n=!0,o=t={callback:e,next:null,prev:t};return o.prev?o.prev.next=o:r=o,function(){n&&null!==r&&(n=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:r=o.next)}}}}())}var a={addNestedSub:function(e){return u(),n.subscribe(e)},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:o,isSubscribed:function(){return!!t},trySubscribe:u,tryUnsubscribe:function(){t&&(t(),t=void 0,n.clear(),n=p)},getListeners:function(){return n}};return a}var d="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect;function y(){return(y=Object.assign||function(e){for(var r=1;arguments.length>r;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function v(e,r){if(null==e)return{};var t,n,o={},u=Object.keys(e);for(n=0;u.length>n;n++)0>r.indexOf(t=u[n])&&(o[t]=e[t]);return o}
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var m="function"==typeof Symbol&&Symbol.for,b=m?Symbol.for("react.element"):60103,h=m?Symbol.for("react.portal"):60106,S=m?Symbol.for("react.fragment"):60107,P=m?Symbol.for("react.strict_mode"):60108,g=m?Symbol.for("react.profiler"):60114,O=m?Symbol.for("react.provider"):60109,w=m?Symbol.for("react.context"):60110,C=m?Symbol.for("react.async_mode"):60111,x=m?Symbol.for("react.concurrent_mode"):60111,E=m?Symbol.for("react.forward_ref"):60112,T=m?Symbol.for("react.suspense"):60113,M=m?Symbol.for("react.suspense_list"):60120,R=m?Symbol.for("react.memo"):60115,$=m?Symbol.for("react.lazy"):60116,N=m?Symbol.for("react.block"):60121,j=m?Symbol.for("react.fundamental"):60117,q=m?Symbol.for("react.responder"):60118,D=m?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var r=e.$$typeof;switch(r){case b:switch(e=e.type){case C:case x:case S:case g:case P:case T:return e;default:switch(e=e&&e.$$typeof){case w:case E:case $:case R:case O:return e;default:return r}}case h:return r}}}function F(e){return _(e)===x}var k={AsyncMode:C,ConcurrentMode:x,ContextConsumer:w,ContextProvider:O,Element:b,ForwardRef:E,Fragment:S,Lazy:$,Memo:R,Portal:h,Profiler:g,StrictMode:P,Suspense:T,isAsyncMode:function(e){return F(e)||_(e)===C},isConcurrentMode:F,isContextConsumer:function(e){return _(e)===w},isContextProvider:function(e){return _(e)===O},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===b},isForwardRef:function(e){return _(e)===E},isFragment:function(e){return _(e)===S},isLazy:function(e){return _(e)===$},isMemo:function(e){return _(e)===R},isPortal:function(e){return _(e)===h},isProfiler:function(e){return _(e)===g},isStrictMode:function(e){return _(e)===P},isSuspense:function(e){return _(e)===T},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===S||e===x||e===g||e===P||e===T||e===M||"object"==typeof e&&null!==e&&(e.$$typeof===$||e.$$typeof===R||e.$$typeof===O||e.$$typeof===w||e.$$typeof===E||e.$$typeof===j||e.$$typeof===q||e.$$typeof===D||e.$$typeof===N)},typeOf:_},H=u((function(e){e.exports=k})),U={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},A={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},W={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},L={};function I(e){return H.isMemo(e)?W:L[e.$$typeof]||U}L[H.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},L[H.Memo]=W;var z=Object.defineProperty,K=Object.getOwnPropertyNames,V=Object.getOwnPropertySymbols,B=Object.getOwnPropertyDescriptor,Y=Object.getPrototypeOf,G=Object.prototype;var J=function e(r,t,n){if("string"!=typeof t){if(G){var o=Y(t);o&&o!==G&&e(r,o,n)}var u=K(t);V&&(u=u.concat(V(t)));for(var a=I(r),c=I(t),i=0;u.length>i;++i){var f=u[i];if(!(A[f]||n&&n[f]||c&&c[f]||a&&a[f])){var s=B(t,f);try{z(r,f,s)}catch(e){}}}}return r},Q=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],X=["reactReduxForwardedRef"],Z=[],ee=[null,null];function re(e,r){return[r.payload,e[1]+1]}function te(e,r,t){d((function(){return e.apply(void 0,r)}),t)}function ne(e,r,t,n,o,u,a){e.current=n,r.current=o,t.current=!1,u.current&&(u.current=null,a())}function oe(e,r,t,n,o,u,a,c,i,f){if(e){var s=!1,p=null,l=function(){if(!s){var e,t,l=r.getState();try{e=n(l,o.current)}catch(e){t=e,p=e}t||(p=null),e===u.current?a.current||i():(u.current=e,c.current=e,a.current=!0,f({type:"STORE_UPDATED",payload:{error:t}}))}};t.onStateChange=l,t.trySubscribe(),l();return function(){if(s=!0,t.tryUnsubscribe(),t.onStateChange=null,p)throw p}}}var ue=function(){return[null,0]};function ae(e,t){void 0===t&&(t={});var n=t,u=n.getDisplayName,a=void 0===u?function(e){return"ConnectAdvanced("+e+")"}:u,c=n.methodName,f=void 0===c?"connectAdvanced":c,s=n.renderCountProp,p=void 0===s?void 0:s,d=n.shouldHandleStateChanges,m=void 0===d||d,b=n.storeKey,h=void 0===b?"store":b,S=n.forwardRef,P=void 0!==S&&S,g=n.context,O=void 0===g?i:g,w=v(n,Q),C=O;return function(t){var n=t.displayName||t.name||"Component",u=a(n),c=y({},w,{getDisplayName:a,methodName:f,renderCountProp:p,shouldHandleStateChanges:m,storeKey:h,displayName:u,wrappedComponentName:n,WrappedComponent:t}),i=w.pure;var s=i?r.useMemo:function(e){return e()};function d(n){var u=r.useMemo((function(){var e=n.reactReduxForwardedRef,r=v(n,X);return[n.context,e,r]}),[n]),a=u[0],i=u[1],f=u[2],p=r.useMemo((function(){return a&&a.Consumer&&H.isContextConsumer(o.default.createElement(a.Consumer,null))?a:C}),[a,C]),d=r.useContext(p),b=!!n.store&&!!n.store.getState&&!!n.store.dispatch,h=b?n.store:d.store,S=r.useMemo((function(){return function(r){return e(r.dispatch,c)}(h)}),[h]),P=r.useMemo((function(){if(!m)return ee;var e=l(h,b?null:d.subscription),r=e.notifyNestedSubs.bind(e);return[e,r]}),[h,b,d]),g=P[0],O=P[1],w=r.useMemo((function(){return b?d:y({},d,{subscription:g})}),[b,d,g]),x=r.useReducer(re,Z,ue),E=x[0][0],T=x[1];if(E&&E.error)throw E.error;var M=r.useRef(),R=r.useRef(f),$=r.useRef(),N=r.useRef(!1),j=s((function(){return $.current&&f===R.current?$.current:S(h.getState(),f)}),[h,E,f]);te(ne,[R,M,N,f,j,$,O]),te(oe,[m,h,g,S,R,M,N,$,O,T],[h,g,S]);var q=r.useMemo((function(){return o.default.createElement(t,y({},j,{ref:i}))}),[i,t,j]);return r.useMemo((function(){return m?o.default.createElement(p.Provider,{value:w},q):q}),[p,q,w])}var b=i?o.default.memo(d):d;if(b.WrappedComponent=t,b.displayName=d.displayName=u,P){var S=o.default.forwardRef((function(e,r){return o.default.createElement(b,y({},e,{reactReduxForwardedRef:r}))}));return S.displayName=u,S.WrappedComponent=t,J(S,t)}return J(b,t)}}function ce(e,r){return e===r?0!==e||0!==r||1/e==1/r:e!=e&&r!=r}function ie(e,r){if(ce(e,r))return!0;if("object"!=typeof e||null===e||"object"!=typeof r||null===r)return!1;var t=Object.keys(e);if(t.length!==Object.keys(r).length)return!1;for(var n=0;t.length>n;n++)if(!Object.prototype.hasOwnProperty.call(r,t[n])||!ce(e[t[n]],r[t[n]]))return!1;return!0}function fe(e){return function(r,t){var n=e(r,t);function o(){return n}return o.dependsOnOwnProps=!1,o}}function se(e){return null!=e.dependsOnOwnProps?!!e.dependsOnOwnProps:1!==e.length}function pe(e,r){return function(r,t){var n=function(e,r){return n.dependsOnOwnProps?n.mapToProps(e,r):n.mapToProps(e)};return n.dependsOnOwnProps=!0,n.mapToProps=function(r,t){n.mapToProps=e,n.dependsOnOwnProps=se(e);var o=n(r,t);return"function"==typeof o&&(n.mapToProps=o,n.dependsOnOwnProps=se(o),o=n(r,t)),o},n}}var le=[function(e){return"function"==typeof e?pe(e):void 0},function(e){return e?void 0:fe((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?fe((function(r){return function(e,r){var t={},n=function(n){var o=e[n];"function"==typeof o&&(t[n]=function(){return r(o.apply(void 0,arguments))})};for(var o in e)n(o);return t}(e,r)})):void 0}];var de=[function(e){return"function"==typeof e?pe(e):void 0},function(e){return e?void 0:fe((function(){return{}}))}];function ye(e,r,t){return y({},t,e,r)}var ve=[function(e){return"function"==typeof e?function(e){return function(r,t){var n,o=t.pure,u=t.areMergedPropsEqual,a=!1;return function(r,t,c){var i=e(r,t,c);return a?o&&u(i,n)||(n=i):(a=!0,n=i),n}}}(e):void 0},function(e){return e?void 0:function(){return ye}}],me=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function be(e,r,t,n){return function(o,u){return t(e(o,u),r(n,u),u)}}function he(e,r,t,n,o){var u,a,c,i,f,s=o.areStatesEqual,p=o.areOwnPropsEqual,l=o.areStatePropsEqual,d=!1;function y(o,d){var y,v,m=!p(d,a),b=!s(o,u);return u=o,a=d,m&&b?(c=e(u,a),r.dependsOnOwnProps&&(i=r(n,a)),f=t(c,i,a)):m?(e.dependsOnOwnProps&&(c=e(u,a)),r.dependsOnOwnProps&&(i=r(n,a)),f=t(c,i,a)):b?(y=e(u,a),v=!l(y,c),c=y,v&&(f=t(c,i,a)),f):f}return function(o,s){return d?y(o,s):(c=e(u=o,a=s),i=r(n,a),f=t(c,i,a),d=!0,f)}}function Se(e,r){var t=r.initMapStateToProps,n=r.initMapDispatchToProps,o=r.initMergeProps,u=v(r,me),a=t(e,u),c=n(e,u),i=o(e,u);return(u.pure?he:be)(a,c,i,e,u)}var Pe=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function ge(e,r,t){for(var n=r.length-1;n>=0;n--){var o=r[n](e);if(o)return o}return function(r,n){throw Error("Invalid value of type "+typeof e+" for "+t+" argument when connecting component "+n.wrappedComponentName+".")}}function Oe(e,r){return e===r}function we(e){var r=void 0===e?{}:e,t=r.connectHOC,n=void 0===t?ae:t,o=r.mapStateToPropsFactories,u=void 0===o?de:o,a=r.mapDispatchToPropsFactories,c=void 0===a?le:a,i=r.mergePropsFactories,f=void 0===i?ve:i,s=r.selectorFactory,p=void 0===s?Se:s;return function(e,r,t,o){void 0===o&&(o={});var a=o.pure,i=void 0===a||a,s=o.areStatesEqual,l=void 0===s?Oe:s,d=o.areOwnPropsEqual,m=void 0===d?ie:d,b=o.areStatePropsEqual,h=void 0===b?ie:b,S=o.areMergedPropsEqual,P=void 0===S?ie:S,g=v(o,Pe),O=ge(e,u,"mapStateToProps"),w=ge(r,c,"mapDispatchToProps"),C=ge(t,f,"mergeProps");return n(p,y({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:!!e,initMapStateToProps:O,initMapDispatchToProps:w,initMergeProps:C,pure:i,areStatesEqual:l,areOwnPropsEqual:m,areStatePropsEqual:h,areMergedPropsEqual:P},g))}}var Ce=we();function xe(){return r.useContext(i)}function Ee(e){void 0===e&&(e=i);var t=e===i?xe:function(){return r.useContext(e)};return function(){return t().store}}var Te=Ee();function Me(e){void 0===e&&(e=i);var r=e===i?Te:Ee(e);return function(){return r().dispatch}}var Re=Me(),$e=function(e,r){return e===r};function Ne(e){void 0===e&&(e=i);var t=e===i?xe:function(){return r.useContext(e)};return function(e,n){void 0===n&&(n=$e);var o=t(),u=function(e,t,n,o){var u,a=r.useReducer((function(e){return e+1}),0)[1],c=r.useMemo((function(){return l(n,o)}),[n,o]),i=r.useRef(),f=r.useRef(),s=r.useRef(),p=r.useRef(),y=n.getState();try{if(e!==f.current||y!==s.current||i.current){var v=e(y);u=void 0!==p.current&&t(v,p.current)?p.current:v}else u=p.current}catch(e){throw i.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+i.current.stack+"\n\n"),e}return d((function(){f.current=e,s.current=y,p.current=u,i.current=void 0})),d((function(){function e(){try{var e=n.getState();if(e===s.current)return;var r=f.current(e);if(t(r,p.current))return;p.current=r,s.current=e}catch(e){i.current=e}a()}return c.onStateChange=e,c.trySubscribe(),e(),function(){return c.tryUnsubscribe()}}),[n,c]),u}(e,n,o.store,o.subscription);return r.useDebugValue(u),u}}var je=Ne();f=t.unstable_batchedUpdates,Object.defineProperty(e,"batch",{enumerable:!0,get:function(){return t.unstable_batchedUpdates}}),e.Provider=function(e){var t=e.store,n=e.context,u=e.children,a=r.useMemo((function(){var e=l(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),c=r.useMemo((function(){return t.getState()}),[t]);return d((function(){var e=a.subscription;return e.trySubscribe(),c!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[a,c]),o.default.createElement((n||i).Provider,{value:a},u)},e.ReactReduxContext=i,e.connect=Ce,e.connectAdvanced=ae,e.createDispatchHook=Me,e.createSelectorHook=Ne,e.createStoreHook=Ee,e.shallowEqual=ie,e.useDispatch=Re,e.useSelector=je,e.useStore=Te,Object.defineProperty(e,"__esModule",{value:!0})}));