-
Notifications
You must be signed in to change notification settings - Fork 2
/
332.ff8100f0.iframe.bundle.js
3 lines (3 loc) · 136 KB
/
332.ff8100f0.iframe.bundle.js
1
2
3
/*! For license information please see 332.ff8100f0.iframe.bundle.js.LICENSE.txt */
(self.webpackChunkblockly_mooc=self.webpackChunkblockly_mooc||[]).push([[332],{"./node_modules/prop-types/factoryWithThrowingShims.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var ReactPropTypesSecret=__webpack_require__("./node_modules/prop-types/lib/ReactPropTypesSecret.js");function emptyFunction(){}module.exports=function(){function shim(props,propName,componentName,location,propFullName,secret){if(secret!==ReactPropTypesSecret){var err=new 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 err.name="Invariant Violation",err}}function getShim(){return shim}shim.isRequired=shim;var ReactPropTypes={array:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim};return ReactPropTypes.checkPropTypes=emptyFunction,ReactPropTypes.PropTypes=ReactPropTypes,ReactPropTypes}},"./node_modules/prop-types/index.js":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=__webpack_require__("./node_modules/prop-types/factoryWithThrowingShims.js")()},"./node_modules/prop-types/lib/ReactPropTypesSecret.js":module=>{"use strict";module.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},"./node_modules/react-redux/es/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Provider:()=>components_Provider,ReactReduxContext:()=>ReactReduxContext,batch:()=>react_dom.unstable_batchedUpdates,connect:()=>components_connect,createDispatchHook:()=>createDispatchHook,createSelectorHook:()=>createSelectorHook,createStoreHook:()=>createStoreHook,shallowEqual:()=>shallowEqual,useDispatch:()=>useDispatch,useSelector:()=>useSelector,useStore:()=>useStore_useStore});var shim=__webpack_require__("./node_modules/use-sync-external-store/shim/index.js"),with_selector=__webpack_require__("./node_modules/use-sync-external-store/shim/with-selector.js"),react_dom=__webpack_require__("./node_modules/react-dom/index.js");let batch=function defaultNoopBatch(callback){callback()};const getBatch=()=>batch;var react=__webpack_require__("./node_modules/react/index.js");const ReactReduxContext=(0,react.createContext)(null);function useReduxContext_useReduxContext(){return(0,react.useContext)(ReactReduxContext)}const notInitialized=()=>{throw new Error("uSES not initialized!")};let useSyncExternalStoreWithSelector=notInitialized;const refEquality=(a,b)=>a===b;function createSelectorHook(context=ReactReduxContext){const useReduxContext=context===ReactReduxContext?useReduxContext_useReduxContext:()=>(0,react.useContext)(context);return function useSelector(selector,equalityFn=refEquality){const{store,subscription,getServerState}=useReduxContext(),selectedState=useSyncExternalStoreWithSelector(subscription.addNestedSub,store.getState,getServerState||store.getState,selector,equalityFn);return(0,react.useDebugValue)(selectedState),selectedState}}const useSelector=createSelectorHook();function _extends(){return _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends.apply(this,arguments)}function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],excluded.indexOf(key)>=0||(target[key]=source[key]);return target}var hoist_non_react_statics_cjs=__webpack_require__("./node_modules/react-redux/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),hoist_non_react_statics_cjs_default=__webpack_require__.n(hoist_non_react_statics_cjs),react_is=__webpack_require__("./node_modules/react-redux/node_modules/react-is/index.js");const _excluded=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function pureFinalPropsSelectorFactory(mapStateToProps,mapDispatchToProps,mergeProps,dispatch,{areStatesEqual,areOwnPropsEqual,areStatePropsEqual}){let state,ownProps,stateProps,dispatchProps,mergedProps,hasRunAtLeastOnce=!1;function handleSubsequentCalls(nextState,nextOwnProps){const propsChanged=!areOwnPropsEqual(nextOwnProps,ownProps),stateChanged=!areStatesEqual(nextState,state,nextOwnProps,ownProps);return state=nextState,ownProps=nextOwnProps,propsChanged&&stateChanged?function handleNewPropsAndNewState(){return stateProps=mapStateToProps(state,ownProps),mapDispatchToProps.dependsOnOwnProps&&(dispatchProps=mapDispatchToProps(dispatch,ownProps)),mergedProps=mergeProps(stateProps,dispatchProps,ownProps),mergedProps}():propsChanged?function handleNewProps(){return mapStateToProps.dependsOnOwnProps&&(stateProps=mapStateToProps(state,ownProps)),mapDispatchToProps.dependsOnOwnProps&&(dispatchProps=mapDispatchToProps(dispatch,ownProps)),mergedProps=mergeProps(stateProps,dispatchProps,ownProps),mergedProps}():stateChanged?function handleNewState(){const nextStateProps=mapStateToProps(state,ownProps),statePropsChanged=!areStatePropsEqual(nextStateProps,stateProps);return stateProps=nextStateProps,statePropsChanged&&(mergedProps=mergeProps(stateProps,dispatchProps,ownProps)),mergedProps}():mergedProps}return function pureFinalPropsSelector(nextState,nextOwnProps){return hasRunAtLeastOnce?handleSubsequentCalls(nextState,nextOwnProps):function handleFirstCall(firstState,firstOwnProps){return state=firstState,ownProps=firstOwnProps,stateProps=mapStateToProps(state,ownProps),dispatchProps=mapDispatchToProps(dispatch,ownProps),mergedProps=mergeProps(stateProps,dispatchProps,ownProps),hasRunAtLeastOnce=!0,mergedProps}(nextState,nextOwnProps)}}function wrapMapToPropsConstant(getConstant){return function initConstantSelector(dispatch){const constant=getConstant(dispatch);function constantSelector(){return constant}return constantSelector.dependsOnOwnProps=!1,constantSelector}}function getDependsOnOwnProps(mapToProps){return mapToProps.dependsOnOwnProps?Boolean(mapToProps.dependsOnOwnProps):1!==mapToProps.length}function wrapMapToPropsFunc(mapToProps,methodName){return function initProxySelector(dispatch,{displayName}){const proxy=function mapToPropsProxy(stateOrDispatch,ownProps){return proxy.dependsOnOwnProps?proxy.mapToProps(stateOrDispatch,ownProps):proxy.mapToProps(stateOrDispatch,void 0)};return proxy.dependsOnOwnProps=!0,proxy.mapToProps=function detectFactoryAndVerify(stateOrDispatch,ownProps){proxy.mapToProps=mapToProps,proxy.dependsOnOwnProps=getDependsOnOwnProps(mapToProps);let props=proxy(stateOrDispatch,ownProps);return"function"==typeof props&&(proxy.mapToProps=props,proxy.dependsOnOwnProps=getDependsOnOwnProps(props),props=proxy(stateOrDispatch,ownProps)),props},proxy}}function createInvalidArgFactory(arg,name){return(dispatch,options)=>{throw new Error(`Invalid value of type ${typeof arg} for ${name} argument when connecting component ${options.wrappedComponentName}.`)}}function defaultMergeProps(stateProps,dispatchProps,ownProps){return _extends({},ownProps,stateProps,dispatchProps)}const nullListeners={notify(){},get:()=>[]};function createSubscription(store,parentSub){let unsubscribe,listeners=nullListeners;function handleChangeWrapper(){subscription.onStateChange&&subscription.onStateChange()}function trySubscribe(){unsubscribe||(unsubscribe=parentSub?parentSub.addNestedSub(handleChangeWrapper):store.subscribe(handleChangeWrapper),listeners=function createListenerCollection(){const batch=getBatch();let first=null,last=null;return{clear(){first=null,last=null},notify(){batch((()=>{let listener=first;for(;listener;)listener.callback(),listener=listener.next}))},get(){let listeners=[],listener=first;for(;listener;)listeners.push(listener),listener=listener.next;return listeners},subscribe(callback){let isSubscribed=!0,listener=last={callback,next:null,prev:last};return listener.prev?listener.prev.next=listener:first=listener,function unsubscribe(){isSubscribed&&null!==first&&(isSubscribed=!1,listener.next?listener.next.prev=listener.prev:last=listener.prev,listener.prev?listener.prev.next=listener.next:first=listener.next)}}}}())}const subscription={addNestedSub:function addNestedSub(listener){return trySubscribe(),listeners.subscribe(listener)},notifyNestedSubs:function notifyNestedSubs(){listeners.notify()},handleChangeWrapper,isSubscribed:function isSubscribed(){return Boolean(unsubscribe)},trySubscribe,tryUnsubscribe:function tryUnsubscribe(){unsubscribe&&(unsubscribe(),unsubscribe=void 0,listeners.clear(),listeners=nullListeners)},getListeners:()=>listeners};return subscription}const useIsomorphicLayoutEffect=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?react.useLayoutEffect:react.useEffect;function is(x,y){return x===y?0!==x||0!==y||1/x==1/y:x!=x&&y!=y}function shallowEqual(objA,objB){if(is(objA,objB))return!0;if("object"!=typeof objA||null===objA||"object"!=typeof objB||null===objB)return!1;const keysA=Object.keys(objA),keysB=Object.keys(objB);if(keysA.length!==keysB.length)return!1;for(let i=0;i<keysA.length;i++)if(!Object.prototype.hasOwnProperty.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]]))return!1;return!0}const connect_excluded=["reactReduxForwardedRef"];let useSyncExternalStore=notInitialized;const NO_SUBSCRIPTION_ARRAY=[null,null];function captureWrapperProps(lastWrapperProps,lastChildProps,renderIsScheduled,wrapperProps,childPropsFromStoreUpdate,notifyNestedSubs){lastWrapperProps.current=wrapperProps,renderIsScheduled.current=!1,childPropsFromStoreUpdate.current&&(childPropsFromStoreUpdate.current=null,notifyNestedSubs())}function strictEqual(a,b){return a===b}const components_connect=function connect(mapStateToProps,mapDispatchToProps,mergeProps,{pure,areStatesEqual=strictEqual,areOwnPropsEqual=shallowEqual,areStatePropsEqual=shallowEqual,areMergedPropsEqual=shallowEqual,forwardRef=!1,context=ReactReduxContext}={}){const Context=context,initMapStateToProps=function mapStateToPropsFactory(mapStateToProps){return mapStateToProps?"function"==typeof mapStateToProps?wrapMapToPropsFunc(mapStateToProps):createInvalidArgFactory(mapStateToProps,"mapStateToProps"):wrapMapToPropsConstant((()=>({})))}(mapStateToProps),initMapDispatchToProps=function mapDispatchToPropsFactory(mapDispatchToProps){return mapDispatchToProps&&"object"==typeof mapDispatchToProps?wrapMapToPropsConstant((dispatch=>function bindActionCreators(actionCreators,dispatch){const boundActionCreators={};for(const key in actionCreators){const actionCreator=actionCreators[key];"function"==typeof actionCreator&&(boundActionCreators[key]=(...args)=>dispatch(actionCreator(...args)))}return boundActionCreators}(mapDispatchToProps,dispatch))):mapDispatchToProps?"function"==typeof mapDispatchToProps?wrapMapToPropsFunc(mapDispatchToProps):createInvalidArgFactory(mapDispatchToProps,"mapDispatchToProps"):wrapMapToPropsConstant((dispatch=>({dispatch})))}(mapDispatchToProps),initMergeProps=function mergePropsFactory(mergeProps){return mergeProps?"function"==typeof mergeProps?function wrapMergePropsFunc(mergeProps){return function initMergePropsProxy(dispatch,{displayName,areMergedPropsEqual}){let mergedProps,hasRunOnce=!1;return function mergePropsProxy(stateProps,dispatchProps,ownProps){const nextMergedProps=mergeProps(stateProps,dispatchProps,ownProps);return hasRunOnce?areMergedPropsEqual(nextMergedProps,mergedProps)||(mergedProps=nextMergedProps):(hasRunOnce=!0,mergedProps=nextMergedProps),mergedProps}}}(mergeProps):createInvalidArgFactory(mergeProps,"mergeProps"):()=>defaultMergeProps}(mergeProps),shouldHandleStateChanges=Boolean(mapStateToProps);return WrappedComponent=>{const wrappedComponentName=WrappedComponent.displayName||WrappedComponent.name||"Component",displayName=`Connect(${wrappedComponentName})`,selectorFactoryOptions={shouldHandleStateChanges,displayName,wrappedComponentName,WrappedComponent,initMapStateToProps,initMapDispatchToProps,initMergeProps,areStatesEqual,areStatePropsEqual,areOwnPropsEqual,areMergedPropsEqual};function ConnectFunction(props){const[propsContext,reactReduxForwardedRef,wrapperProps]=(0,react.useMemo)((()=>{const{reactReduxForwardedRef}=props,wrapperProps=_objectWithoutPropertiesLoose(props,connect_excluded);return[props.context,reactReduxForwardedRef,wrapperProps]}),[props]),ContextToUse=(0,react.useMemo)((()=>propsContext&&propsContext.Consumer&&(0,react_is.isContextConsumer)(react.createElement(propsContext.Consumer,null))?propsContext:Context),[propsContext,Context]),contextValue=(0,react.useContext)(ContextToUse),didStoreComeFromProps=Boolean(props.store)&&Boolean(props.store.getState)&&Boolean(props.store.dispatch),didStoreComeFromContext=Boolean(contextValue)&&Boolean(contextValue.store);const store=didStoreComeFromProps?props.store:contextValue.store,getServerState=didStoreComeFromContext?contextValue.getServerState:store.getState,childPropsSelector=(0,react.useMemo)((()=>function finalPropsSelectorFactory(dispatch,_ref){let{initMapStateToProps,initMapDispatchToProps,initMergeProps}=_ref,options=_objectWithoutPropertiesLoose(_ref,_excluded);return pureFinalPropsSelectorFactory(initMapStateToProps(dispatch,options),initMapDispatchToProps(dispatch,options),initMergeProps(dispatch,options),dispatch,options)}(store.dispatch,selectorFactoryOptions)),[store]),[subscription,notifyNestedSubs]=(0,react.useMemo)((()=>{if(!shouldHandleStateChanges)return NO_SUBSCRIPTION_ARRAY;const subscription=createSubscription(store,didStoreComeFromProps?void 0:contextValue.subscription),notifyNestedSubs=subscription.notifyNestedSubs.bind(subscription);return[subscription,notifyNestedSubs]}),[store,didStoreComeFromProps,contextValue]),overriddenContextValue=(0,react.useMemo)((()=>didStoreComeFromProps?contextValue:_extends({},contextValue,{subscription})),[didStoreComeFromProps,contextValue,subscription]),lastChildProps=(0,react.useRef)(),lastWrapperProps=(0,react.useRef)(wrapperProps),childPropsFromStoreUpdate=(0,react.useRef)(),renderIsScheduled=(0,react.useRef)(!1),isMounted=((0,react.useRef)(!1),(0,react.useRef)(!1)),latestSubscriptionCallbackError=(0,react.useRef)();useIsomorphicLayoutEffect((()=>(isMounted.current=!0,()=>{isMounted.current=!1})),[]);const actualChildPropsSelector=(0,react.useMemo)((()=>()=>childPropsFromStoreUpdate.current&&wrapperProps===lastWrapperProps.current?childPropsFromStoreUpdate.current:childPropsSelector(store.getState(),wrapperProps)),[store,wrapperProps]),subscribeForReact=(0,react.useMemo)((()=>reactListener=>subscription?function subscribeUpdates(shouldHandleStateChanges,store,subscription,childPropsSelector,lastWrapperProps,lastChildProps,renderIsScheduled,isMounted,childPropsFromStoreUpdate,notifyNestedSubs,additionalSubscribeListener){if(!shouldHandleStateChanges)return()=>{};let didUnsubscribe=!1,lastThrownError=null;const checkForUpdates=()=>{if(didUnsubscribe||!isMounted.current)return;const latestStoreState=store.getState();let newChildProps,error;try{newChildProps=childPropsSelector(latestStoreState,lastWrapperProps.current)}catch(e){error=e,lastThrownError=e}error||(lastThrownError=null),newChildProps===lastChildProps.current?renderIsScheduled.current||notifyNestedSubs():(lastChildProps.current=newChildProps,childPropsFromStoreUpdate.current=newChildProps,renderIsScheduled.current=!0,additionalSubscribeListener())};return subscription.onStateChange=checkForUpdates,subscription.trySubscribe(),checkForUpdates(),()=>{if(didUnsubscribe=!0,subscription.tryUnsubscribe(),subscription.onStateChange=null,lastThrownError)throw lastThrownError}}(shouldHandleStateChanges,store,subscription,childPropsSelector,lastWrapperProps,lastChildProps,renderIsScheduled,isMounted,childPropsFromStoreUpdate,notifyNestedSubs,reactListener):()=>{}),[subscription]);let actualChildProps;!function useIsomorphicLayoutEffectWithArgs(effectFunc,effectArgs,dependencies){useIsomorphicLayoutEffect((()=>effectFunc(...effectArgs)),dependencies)}(captureWrapperProps,[lastWrapperProps,lastChildProps,renderIsScheduled,wrapperProps,childPropsFromStoreUpdate,notifyNestedSubs]);try{actualChildProps=useSyncExternalStore(subscribeForReact,actualChildPropsSelector,getServerState?()=>childPropsSelector(getServerState(),wrapperProps):actualChildPropsSelector)}catch(err){throw latestSubscriptionCallbackError.current&&(err.message+=`\nThe error may be correlated with this previous error:\n${latestSubscriptionCallbackError.current.stack}\n\n`),err}useIsomorphicLayoutEffect((()=>{latestSubscriptionCallbackError.current=void 0,childPropsFromStoreUpdate.current=void 0,lastChildProps.current=actualChildProps}));const renderedWrappedComponent=(0,react.useMemo)((()=>react.createElement(WrappedComponent,_extends({},actualChildProps,{ref:reactReduxForwardedRef}))),[reactReduxForwardedRef,WrappedComponent,actualChildProps]);return(0,react.useMemo)((()=>shouldHandleStateChanges?react.createElement(ContextToUse.Provider,{value:overriddenContextValue},renderedWrappedComponent):renderedWrappedComponent),[ContextToUse,renderedWrappedComponent,overriddenContextValue])}const Connect=react.memo(ConnectFunction);if(Connect.WrappedComponent=WrappedComponent,Connect.displayName=ConnectFunction.displayName=displayName,forwardRef){const forwarded=react.forwardRef((function forwardConnectRef(props,ref){return react.createElement(Connect,_extends({},props,{reactReduxForwardedRef:ref}))}));return forwarded.displayName=displayName,forwarded.WrappedComponent=WrappedComponent,hoist_non_react_statics_cjs_default()(forwarded,WrappedComponent)}return hoist_non_react_statics_cjs_default()(Connect,WrappedComponent)}};const components_Provider=function Provider({store,context,children,serverState}){const contextValue=(0,react.useMemo)((()=>{const subscription=createSubscription(store);return{store,subscription,getServerState:serverState?()=>serverState:void 0}}),[store,serverState]),previousState=(0,react.useMemo)((()=>store.getState()),[store]);useIsomorphicLayoutEffect((()=>{const{subscription}=contextValue;return subscription.onStateChange=subscription.notifyNestedSubs,subscription.trySubscribe(),previousState!==store.getState()&&subscription.notifyNestedSubs(),()=>{subscription.tryUnsubscribe(),subscription.onStateChange=void 0}}),[contextValue,previousState]);const Context=context||ReactReduxContext;return react.createElement(Context.Provider,{value:contextValue},children)};function createStoreHook(context=ReactReduxContext){const useReduxContext=context===ReactReduxContext?useReduxContext_useReduxContext:()=>(0,react.useContext)(context);return function useStore(){const{store}=useReduxContext();return store}}const useStore_useStore=createStoreHook();function createDispatchHook(context=ReactReduxContext){const useStore=context===ReactReduxContext?useStore_useStore:createStoreHook(context);return function useDispatch(){return useStore().dispatch}}const useDispatch=createDispatchHook();var fn,newBatch;fn=with_selector.useSyncExternalStoreWithSelector,useSyncExternalStoreWithSelector=fn,(fn=>{useSyncExternalStore=fn})(shim.useSyncExternalStore),newBatch=react_dom.unstable_batchedUpdates,batch=newBatch},"./node_modules/react-redux/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var reactIs=__webpack_require__("./node_modules/react-redux/node_modules/hoist-non-react-statics/node_modules/react-is/index.js"),REACT_STATICS={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},KNOWN_STATICS={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},MEMO_STATICS={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},TYPE_STATICS={};function getStatics(component){return reactIs.isMemo(component)?MEMO_STATICS:TYPE_STATICS[component.$$typeof]||REACT_STATICS}TYPE_STATICS[reactIs.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},TYPE_STATICS[reactIs.Memo]=MEMO_STATICS;var defineProperty=Object.defineProperty,getOwnPropertyNames=Object.getOwnPropertyNames,getOwnPropertySymbols=Object.getOwnPropertySymbols,getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,getPrototypeOf=Object.getPrototypeOf,objectPrototype=Object.prototype;module.exports=function hoistNonReactStatics(targetComponent,sourceComponent,blacklist){if("string"!=typeof sourceComponent){if(objectPrototype){var inheritedComponent=getPrototypeOf(sourceComponent);inheritedComponent&&inheritedComponent!==objectPrototype&&hoistNonReactStatics(targetComponent,inheritedComponent,blacklist)}var keys=getOwnPropertyNames(sourceComponent);getOwnPropertySymbols&&(keys=keys.concat(getOwnPropertySymbols(sourceComponent)));for(var targetStatics=getStatics(targetComponent),sourceStatics=getStatics(sourceComponent),i=0;i<keys.length;++i){var key=keys[i];if(!(KNOWN_STATICS[key]||blacklist&&blacklist[key]||sourceStatics&&sourceStatics[key]||targetStatics&&targetStatics[key])){var descriptor=getOwnPropertyDescriptor(sourceComponent,key);try{defineProperty(targetComponent,key,descriptor)}catch(e){}}}}return targetComponent}},"./node_modules/react-redux/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var b="function"==typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.memo"):60115,r=b?Symbol.for("react.lazy"):60116;function t(a){if("object"==typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof){case k:case n:case h:return a;default:return u}}case r:case q:case d:return u}}}function v(a){return t(a)===m}exports.typeOf=t,exports.AsyncMode=l,exports.ConcurrentMode=m,exports.ContextConsumer=k,exports.ContextProvider=h,exports.Element=c,exports.ForwardRef=n,exports.Fragment=e,exports.Lazy=r,exports.Memo=q,exports.Portal=d,exports.Profiler=g,exports.StrictMode=f,exports.Suspense=p,exports.isValidElementType=function(a){return"string"==typeof a||"function"==typeof a||a===e||a===m||a===g||a===f||a===p||"object"==typeof a&&null!==a&&(a.$$typeof===r||a.$$typeof===q||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n)},exports.isAsyncMode=function(a){return v(a)||t(a)===l},exports.isConcurrentMode=v,exports.isContextConsumer=function(a){return t(a)===k},exports.isContextProvider=function(a){return t(a)===h},exports.isElement=function(a){return"object"==typeof a&&null!==a&&a.$$typeof===c},exports.isForwardRef=function(a){return t(a)===n},exports.isFragment=function(a){return t(a)===e},exports.isLazy=function(a){return t(a)===r},exports.isMemo=function(a){return t(a)===q},exports.isPortal=function(a){return t(a)===d},exports.isProfiler=function(a){return t(a)===g},exports.isStrictMode=function(a){return t(a)===f},exports.isSuspense=function(a){return t(a)===p}},"./node_modules/react-redux/node_modules/hoist-non-react-statics/node_modules/react-is/index.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module.exports=__webpack_require__("./node_modules/react-redux/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js")},"./node_modules/react-redux/node_modules/react-is/cjs/react-is.production.min.js":(__unused_webpack_module,exports)=>{"use strict";var u,b=Symbol.for("react.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),h=Symbol.for("react.context"),k=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),n=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),t=Symbol.for("react.offscreen");function v(a){if("object"==typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}u=Symbol.for("react.module.reference"),exports.isContextConsumer=function(a){return v(a)===h}},"./node_modules/react-redux/node_modules/react-is/index.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module.exports=__webpack_require__("./node_modules/react-redux/node_modules/react-is/cjs/react-is.production.min.js")},"./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var e=__webpack_require__("./node_modules/react/index.js");var k="function"==typeof Object.is?Object.is:function h(a,b){return a===b&&(0!==a||1/a==1/b)||a!=a&&b!=b},l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function t(a,b){return b()}:function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];return n((function(){c.value=d,c.getSnapshot=b,r(c)&&g({inst:c})}),[a,d,b]),m((function(){return r(c)&&g({inst:c}),a((function(){r(c)&&g({inst:c})}))}),[a]),p(d),d};exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u},"./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var h=__webpack_require__("./node_modules/react/index.js"),n=__webpack_require__("./node_modules/use-sync-external-store/shim/index.js");var q="function"==typeof Object.is?Object.is:function p(a,b){return a===b&&(0!==a||1/a==1/b)||a!=a&&b!=b},r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;exports.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f}else f=c.current;c=v((function(){function a(a){if(!c){if(c=!0,d=a,a=l(a),void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}if(b=k,q(d,a))return b;var e=l(a);return void 0!==g&&g(b,e)?b:(d=a,k=e)}var d,k,c=!1,m=void 0===e?null:e;return[function(){return a(b())},null===m?void 0:function(){return a(m())}]}),[b,e,l,g]);var d=r(a,c[0],c[1]);return u((function(){f.hasValue=!0,f.value=d}),[d]),w(d),d}},"./node_modules/use-sync-external-store/shim/index.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module.exports=__webpack_require__("./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js")},"./node_modules/use-sync-external-store/shim/with-selector.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module.exports=__webpack_require__("./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js")}}]);
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzMyLjM3ZDdkNWQ5LmlmcmFtZS5idW5kbGUuanMiLCJtYXBwaW5ncyI6Ijs0TUFTQSxJQUFJQSxxQkFBdUIsb0JBQVEseURBRW5DLFNBQVNDLGdCQUFpQixDQUUxQkMsT0FBT0MsUUFBVSxXQUNmLFNBQVNDLEtBQUtDLE1BQU9DLFNBQVVDLGNBQWVDLFNBQVVDLGFBQWNDLFFBQ3BFLEdBQUlBLFNBQVdWLHFCQUFmLENBSUEsSUFBSVcsSUFBT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