mirror of
https://github.com/TrentSPalmer/fcc-challenges.git
synced 2024-11-23 03:41:30 -08:00
3 lines
186 KiB
JavaScript
3 lines
186 KiB
JavaScript
|
/*! For license information please see 2.07dbc1f4.chunk.js.LICENSE.txt */
|
||
|
(this["webpackJsonpcalculator-react"]=this["webpackJsonpcalculator-react"]||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(25)},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return W}));var r=n(0),o=n.n(r),i=(n(9),o.a.createContext(null));var a=function(e){e()},l={notify:function(){}};function u(){var e=a,t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}var c=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=l,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=u())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=l)},e}();var s=function(e){var t=e.store,n=e.context,a=e.children,l=Object(r.useMemo)((function(){var e=new c(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),u=Object(r.useMemo)((function(){return t.getState()}),[t]);Object(r.useEffect)((function(){var e=l.subscription;return e.trySubscribe(),u!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[l,u]);var s=n||i;return o.a.createElement(s.Provider,{value:l},a)};function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function d(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var p=n(19),m=n.n(p),h=n(18),y="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?r.useLayoutEffect:r.useEffect,v=[],g=[null,null];function b(e,t){var n=e[1];return[t.payload,n+1]}function w(e,t,n){y((function(){return e.apply(void 0,t)}),n)}function k(e,t,n,r,o,i,a){e.current=r,t.current=o,n.current=!1,i.current&&(i.current=null,a())}function x(e,t,n,r,o,i,a,l,u,c){if(e){var s=!1,f=null,d=function(){if(!s){var e,n,d=t.getState();try{e=r(d,o.current)}catch(p){n=p,f=p}n||(f=null),e===i.current?a.current||u():(i.current=e,l.current=e,a.current=!0,c({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=d,n.trySubscribe(),d();return function(){if(s=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}}var E=function(){return[null,0]};function T(e,t){void 0===t&&(t={});var n=t,a=n.getDisplayName,l=void 0===a?function(e){return"ConnectAdvanced("+e+")"}:a,u=n.methodName,s=void 0===u?"connectAdvanced":u,p=n.renderCountProp,y=void 0===p?void 0:p,T=n.shouldHandleStateChanges,S=void 0===T||T,P=n.storeKey,_=void 0===P?"store":P,C=(n.withRef,n.forwardRef),O=void 0!==C&&C,N=n.context,M=void 0===N?i:N,z=d(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),I=M;return function(t){var n=t.displayName||t.name||"Component",i=l(n),a=f({},z,{getDisplayName:l,methodName:s,renderCountProp:y,shouldHandleStateChanges:S,storeKey:_,displayName:i,wrappedComponentName:n,WrappedComponent:t}),u=z.pure;var p=u?r.
|
||
|
//# sourceMappingURL=2.07dbc1f4.chunk.js.map
|