fcc-challenges/random-quote-machine/build/static/js/2.a720d7f8.chunk.js

3 lines
185 KiB
JavaScript
Raw Normal View History

2020-04-02 01:21:47 -07:00
/*! For license information please see 2.a720d7f8.chunk.js.LICENSE.txt */
(this["webpackJsonprandom-quote-machine"]=this["webpackJsonprandom-quote-machine"]||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(22)},function(e,t,n){e.exports=n(26)()},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(1),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(13),m=n.n(p),h=n(12),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,O=(n.withRef,n.forwardRef),C=void 0!==O&&O,N=n.context,M=void 0===N?i:N,z=d(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),j=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.useMemo:function(e){return e()};function T(n){var i=Object(r.useMemo)((function(){var e=n.forwardedRef,t=d(n,["forwardedRef"]);return[n.context,
//# sourceMappingURL=2.a720d7f8.chunk.js.map