{"version":3,"sources":["../../src/index.ts","../../src/utils/react.ts","../../src/components/Context.ts","../../src/utils/useSyncExternalStore.ts","../../src/hooks/useReduxContext.ts","../../src/hooks/useSelector.ts","../../src/utils/react-is.ts","../../src/connect/selectorFactory.ts","../../src/utils/bindActionCreators.ts","../../src/connect/wrapMapToProps.ts","../../src/connect/invalidArgFactory.ts","../../src/connect/mapDispatchToProps.ts","../../src/connect/mapStateToProps.ts","../../src/connect/mergeProps.ts","../../src/utils/batch.ts","../../src/utils/Subscription.ts","../../src/utils/useIsomorphicLayoutEffect.ts","../../src/utils/shallowEqual.ts","../../src/utils/hoistStatics.ts","../../src/components/connect.tsx","../../src/components/Provider.tsx","../../src/hooks/useStore.ts","../../src/hooks/useDispatch.ts","../../src/exports.ts"],"sourcesContent":["// The primary entry point assumes we are working with React 18, and thus have\r\n// useSyncExternalStore available. We can import that directly from React itself.\r\n// The useSyncExternalStoreWithSelector has to be imported, but we can use the\r\n// non-shim version. This shaves off the byte size of the shim.\r\n\r\nimport * as React from 'react'\r\nimport { useSyncExternalStoreWithSelector } from 'use-sync-external-store/with-selector.js'\r\n\r\nimport { initializeUseSelector } from './hooks/useSelector'\r\nimport { initializeConnect } from './components/connect'\r\n\r\ninitializeUseSelector(useSyncExternalStoreWithSelector)\r\ninitializeConnect(React.useSyncExternalStore)\r\n\r\nexport * from './exports'\r\n","import * as ReactOriginal from 'react'\r\nimport type * as ReactNamespace from 'react'\r\n\r\nexport const React: typeof ReactNamespace =\r\n  // prettier-ignore\r\n  // @ts-ignore\r\n  'default' in ReactOriginal ? ReactOriginal['default'] : ReactOriginal as any\r\n","import type { Context } from 'react'\r\nimport { React } from '../utils/react'\r\nimport type { Action, Store, UnknownAction } from 'redux'\r\nimport type { Subscription } from '../utils/Subscription'\r\nimport type { ProviderProps } from './Provider'\r\n\r\nexport interface ReactReduxContextValue<\r\n  SS = any,\r\n  A extends Action<string> = UnknownAction\r\n> extends Pick<ProviderProps, 'stabilityCheck' | 'identityFunctionCheck'> {\r\n  store: Store<SS, A>\r\n  subscription: Subscription\r\n  getServerState?: () => SS\r\n}\r\n\r\nconst ContextKey = Symbol.for(`react-redux-context`)\r\nconst gT: {\r\n  [ContextKey]?: Map<\r\n    typeof React.createContext,\r\n    Context<ReactReduxContextValue | null>\r\n  >\r\n} = (\r\n  typeof globalThis !== 'undefined'\r\n    ? globalThis\r\n    : /* fall back to a per-module scope (pre-8.1 behaviour) if `globalThis` is not available */ {}\r\n) as any\r\n\r\nfunction getContext(): Context<ReactReduxContextValue | null> {\r\n  if (!React.createContext) return {} as any\r\n\r\n  const contextMap = (gT[ContextKey] ??= new Map<\r\n    typeof React.createContext,\r\n    Context<ReactReduxContextValue | null>\r\n  >())\r\n  let realContext = contextMap.get(React.createContext)\r\n  if (!realContext) {\r\n    realContext = React.createContext<ReactReduxContextValue | null>(\r\n      null as any\r\n    )\r\n    if (process.env.NODE_ENV !== 'production') {\r\n      realContext.displayName = 'ReactRedux'\r\n    }\r\n    contextMap.set(React.createContext, realContext)\r\n  }\r\n  return realContext\r\n}\r\n\r\nexport const ReactReduxContext = /*#__PURE__*/ getContext()\r\n\r\nexport type ReactReduxContextInstance = typeof ReactReduxContext\r\n\r\nexport default ReactReduxContext\r\n","import type { useSyncExternalStore } from 'use-sync-external-store'\r\nimport type { useSyncExternalStoreWithSelector } from 'use-sync-external-store/with-selector'\r\n\r\nexport const notInitialized = () => {\r\n  throw new Error('uSES not initialized!')\r\n}\r\n\r\nexport type uSES = typeof useSyncExternalStore\r\nexport type uSESWS = typeof useSyncExternalStoreWithSelector\r\n","import { React } from '../utils/react'\r\nimport { ReactReduxContext } from '../components/Context'\r\nimport type { ReactReduxContextValue } from '../components/Context'\r\n\r\n/**\r\n * Hook factory, which creates a `useReduxContext` hook bound to a given context. This is a low-level\r\n * hook that you should usually not need to call directly.\r\n *\r\n * @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.\r\n * @returns {Function} A `useReduxContext` hook bound to the specified context.\r\n */\r\nexport function createReduxContextHook(context = ReactReduxContext) {\r\n  return function useReduxContext(): ReactReduxContextValue {\r\n    const contextValue = React.useContext(context)\r\n\r\n    if (process.env.NODE_ENV !== 'production' && !contextValue) {\r\n      throw new Error(\r\n        'could not find react-redux context value; please ensure the component is wrapped in a <Provider>'\r\n      )\r\n    }\r\n\r\n    return contextValue!\r\n  }\r\n}\r\n\r\n/**\r\n * A hook to access the value of the `ReactReduxContext`. This is a low-level\r\n * hook that you should usually not need to call directly.\r\n *\r\n * @returns {any} the value of the `ReactReduxContext`\r\n *\r\n * @example\r\n *\r\n * import React from 'react'\r\n * import { useReduxContext } from 'react-redux'\r\n *\r\n * export const CounterComponent = () => {\r\n *   const { store } = useReduxContext()\r\n *   return <div>{store.getState()}</div>\r\n * }\r\n */\r\nexport const useReduxContext = /*#__PURE__*/ createReduxContextHook()\r\n","//import * as React from 'react'\r\nimport { React } from '../utils/react'\r\n\r\nimport type { ReactReduxContextValue } from '../components/Context'\r\nimport { ReactReduxContext } from '../components/Context'\r\nimport type { EqualityFn, NoInfer } from '../types'\r\nimport type { uSESWS } from '../utils/useSyncExternalStore'\r\nimport { notInitialized } from '../utils/useSyncExternalStore'\r\nimport {\r\n  createReduxContextHook,\r\n  useReduxContext as useDefaultReduxContext,\r\n} from './useReduxContext'\r\n\r\n/**\r\n * The frequency of development mode checks.\r\n *\r\n * @since 8.1.0\r\n * @internal\r\n */\r\nexport type DevModeCheckFrequency = 'never' | 'once' | 'always'\r\n\r\n/**\r\n * Represents the configuration for development mode checks.\r\n *\r\n * @since 9.0.0\r\n * @internal\r\n */\r\nexport interface DevModeChecks {\r\n  /**\r\n   * Overrides the global stability check for the selector.\r\n   * - `once` - Run only the first time the selector is called.\r\n   * - `always` - Run every time the selector is called.\r\n   * - `never` - Never run the stability check.\r\n   *\r\n   * @default 'once'\r\n   *\r\n   * @since 8.1.0\r\n   */\r\n  stabilityCheck: DevModeCheckFrequency\r\n\r\n  /**\r\n   * Overrides the global identity function check for the selector.\r\n   * - `once` - Run only the first time the selector is called.\r\n   * - `always` - Run every time the selector is called.\r\n   * - `never` - Never run the identity function check.\r\n   *\r\n   * **Note**: Previously referred to as `noopCheck`.\r\n   *\r\n   * @default 'once'\r\n   *\r\n   * @since 9.0.0\r\n   */\r\n  identityFunctionCheck: DevModeCheckFrequency\r\n}\r\n\r\nexport interface UseSelectorOptions<Selected = unknown> {\r\n  equalityFn?: EqualityFn<Selected>\r\n\r\n  /**\r\n   * `useSelector` performs additional checks in development mode to help\r\n   * identify and warn about potential issues in selector behavior. This\r\n   * option allows you to customize the behavior of these checks per selector.\r\n   *\r\n   * @since 9.0.0\r\n   */\r\n  devModeChecks?: Partial<DevModeChecks>\r\n}\r\n\r\nexport interface UseSelector {\r\n  <TState = unknown, Selected = unknown>(\r\n    selector: (state: TState) => Selected,\r\n    equalityFn?: EqualityFn<Selected>\r\n  ): Selected\r\n  <TState = unknown, Selected = unknown>(\r\n    selector: (state: TState) => Selected,\r\n    options?: UseSelectorOptions<Selected>\r\n  ): Selected\r\n}\r\n\r\nlet useSyncExternalStoreWithSelector = notInitialized as uSESWS\r\nexport const initializeUseSelector = (fn: uSESWS) => {\r\n  useSyncExternalStoreWithSelector = fn\r\n}\r\n\r\nconst refEquality: EqualityFn<any> = (a, b) => a === b\r\n\r\n/**\r\n * Hook factory, which creates a `useSelector` hook bound to a given context.\r\n *\r\n * @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.\r\n * @returns {Function} A `useSelector` hook bound to the specified context.\r\n */\r\nexport function createSelectorHook(\r\n  context: React.Context<ReactReduxContextValue<\r\n    any,\r\n    any\r\n  > | null> = ReactReduxContext\r\n): UseSelector {\r\n  const useReduxContext =\r\n    context === ReactReduxContext\r\n      ? useDefaultReduxContext\r\n      : createReduxContextHook(context)\r\n\r\n  return function useSelector<TState, Selected extends unknown>(\r\n    selector: (state: TState) => Selected,\r\n    equalityFnOrOptions:\r\n      | EqualityFn<NoInfer<Selected>>\r\n      | UseSelectorOptions<NoInfer<Selected>> = {}\r\n  ): Selected {\r\n    const { equalityFn = refEquality, devModeChecks = {} } =\r\n      typeof equalityFnOrOptions === 'function'\r\n        ? { equalityFn: equalityFnOrOptions }\r\n        : equalityFnOrOptions\r\n    if (process.env.NODE_ENV !== 'production') {\r\n      if (!selector) {\r\n        throw new Error(`You must pass a selector to useSelector`)\r\n      }\r\n      if (typeof selector !== 'function') {\r\n        throw new Error(`You must pass a function as a selector to useSelector`)\r\n      }\r\n      if (typeof equalityFn !== 'function') {\r\n        throw new Error(\r\n          `You must pass a function as an equality function to useSelector`\r\n        )\r\n      }\r\n    }\r\n\r\n    const {\r\n      store,\r\n      subscription,\r\n      getServerState,\r\n      stabilityCheck,\r\n      identityFunctionCheck,\r\n    } = useReduxContext()\r\n\r\n    const firstRun = React.useRef(true)\r\n\r\n    const wrappedSelector = React.useCallback<typeof selector>(\r\n      {\r\n        [selector.name](state: TState) {\r\n          const selected = selector(state)\r\n          if (process.env.NODE_ENV !== 'production') {\r\n            const {\r\n              identityFunctionCheck: finalIdentityFunctionCheck,\r\n              stabilityCheck: finalStabilityCheck,\r\n            } = {\r\n              stabilityCheck,\r\n              identityFunctionCheck,\r\n              ...devModeChecks,\r\n            }\r\n            if (\r\n              finalStabilityCheck === 'always' ||\r\n              (finalStabilityCheck === 'once' && firstRun.current)\r\n            ) {\r\n              const toCompare = selector(state)\r\n              if (!equalityFn(selected, toCompare)) {\r\n                let stack: string | undefined = undefined\r\n                try {\r\n                  throw new Error()\r\n                } catch (e) {\r\n                  ;({ stack } = e as Error)\r\n                }\r\n                console.warn(\r\n                  'Selector ' +\r\n                    (selector.name || 'unknown') +\r\n                    ' returned a different result when called with the same parameters. This can lead to unnecessary rerenders.' +\r\n                    '\\nSelectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization',\r\n                  {\r\n                    state,\r\n                    selected,\r\n                    selected2: toCompare,\r\n                    stack,\r\n                  }\r\n                )\r\n              }\r\n            }\r\n            if (\r\n              finalIdentityFunctionCheck === 'always' ||\r\n              (finalIdentityFunctionCheck === 'once' && firstRun.current)\r\n            ) {\r\n              // @ts-ignore\r\n              if (selected === state) {\r\n                let stack: string | undefined = undefined\r\n                try {\r\n                  throw new Error()\r\n                } catch (e) {\r\n                  ;({ stack } = e as Error)\r\n                }\r\n                console.warn(\r\n                  'Selector ' +\r\n                    (selector.name || 'unknown') +\r\n                    ' returned the root state when called. This can lead to unnecessary rerenders.' +\r\n                    '\\nSelectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.',\r\n                  { stack }\r\n                )\r\n              }\r\n            }\r\n            if (firstRun.current) firstRun.current = false\r\n          }\r\n          return selected\r\n        },\r\n      }[selector.name],\r\n      [selector, stabilityCheck, devModeChecks.stabilityCheck]\r\n    )\r\n\r\n    const selectedState = useSyncExternalStoreWithSelector(\r\n      subscription.addNestedSub,\r\n      store.getState,\r\n      getServerState || store.getState,\r\n      wrappedSelector,\r\n      equalityFn\r\n    )\r\n\r\n    React.useDebugValue(selectedState)\r\n\r\n    return selectedState\r\n  }\r\n}\r\n\r\n/**\r\n * A hook to access the redux store's state. This hook takes a selector function\r\n * as an argument. The selector is called with the store state.\r\n *\r\n * This hook takes an optional equality comparison function as the second parameter\r\n * that allows you to customize the way the selected state is compared to determine\r\n * whether the component needs to be re-rendered.\r\n *\r\n * @param {Function} selector the selector function\r\n * @param {Function=} equalityFn the function that will be used to determine equality\r\n *\r\n * @returns {any} the selected state\r\n *\r\n * @example\r\n *\r\n * import React from 'react'\r\n * import { useSelector } from 'react-redux'\r\n *\r\n * export const CounterComponent = () => {\r\n *   const counter = useSelector(state => state.counter)\r\n *   return <div>{counter}</div>\r\n * }\r\n */\r\nexport const useSelector = /*#__PURE__*/ createSelectorHook()\r\n","import type { ElementType, MemoExoticComponent, ReactElement } from 'react'\r\n\r\n// Directly ported from:\r\n// https://unpkg.com/browse/react-is@18.3.0-canary-ee68446ff-20231115/cjs/react-is.production.js\r\n// It's very possible this could change in the future, but given that\r\n// we only use these in `connect`, this is a low priority.\r\n\r\nconst REACT_ELEMENT_TYPE = Symbol.for('react.element')\r\nconst REACT_PORTAL_TYPE = Symbol.for('react.portal')\r\nconst REACT_FRAGMENT_TYPE = Symbol.for('react.fragment')\r\nconst REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode')\r\nconst REACT_PROFILER_TYPE = Symbol.for('react.profiler')\r\nconst REACT_PROVIDER_TYPE = Symbol.for('react.provider')\r\nconst REACT_CONTEXT_TYPE = Symbol.for('react.context')\r\nconst REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context')\r\nconst REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref')\r\nconst REACT_SUSPENSE_TYPE = Symbol.for('react.suspense')\r\nconst REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list')\r\nconst REACT_MEMO_TYPE = Symbol.for('react.memo')\r\nconst REACT_LAZY_TYPE = Symbol.for('react.lazy')\r\nconst REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen')\r\nconst REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference')\r\n\r\nexport const ForwardRef = REACT_FORWARD_REF_TYPE\r\nexport const Memo = REACT_MEMO_TYPE\r\n\r\nexport function isValidElementType(type: any): type is ElementType {\r\n  if (typeof type === 'string' || typeof type === 'function') {\r\n    return true\r\n  } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\r\n\r\n  if (\r\n    type === REACT_FRAGMENT_TYPE ||\r\n    type === REACT_PROFILER_TYPE ||\r\n    type === REACT_STRICT_MODE_TYPE ||\r\n    type === REACT_SUSPENSE_TYPE ||\r\n    type === REACT_SUSPENSE_LIST_TYPE ||\r\n    type === REACT_OFFSCREEN_TYPE\r\n  ) {\r\n    return true\r\n  }\r\n\r\n  if (typeof type === 'object' && type !== null) {\r\n    if (\r\n      type.$$typeof === REACT_LAZY_TYPE ||\r\n      type.$$typeof === REACT_MEMO_TYPE ||\r\n      type.$$typeof === REACT_PROVIDER_TYPE ||\r\n      type.$$typeof === REACT_CONTEXT_TYPE ||\r\n      type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\r\n      // types supported by any Flight configuration anywhere since\r\n      // we don't know which Flight build this will end up being used\r\n      // with.\r\n      type.$$typeof === REACT_CLIENT_REFERENCE ||\r\n      type.getModuleId !== undefined\r\n    ) {\r\n      return true\r\n    }\r\n  }\r\n\r\n  return false\r\n}\r\n\r\nfunction typeOf(object: any): symbol | undefined {\r\n  if (typeof object === 'object' && object !== null) {\r\n    const $$typeof = object.$$typeof\r\n\r\n    switch ($$typeof) {\r\n      case REACT_ELEMENT_TYPE: {\r\n        const type = object.type\r\n\r\n        switch (type) {\r\n          case REACT_FRAGMENT_TYPE:\r\n          case REACT_PROFILER_TYPE:\r\n          case REACT_STRICT_MODE_TYPE:\r\n          case REACT_SUSPENSE_TYPE:\r\n          case REACT_SUSPENSE_LIST_TYPE:\r\n            return type\r\n\r\n          default: {\r\n            const $$typeofType = type && type.$$typeof\r\n\r\n            switch ($$typeofType) {\r\n              case REACT_SERVER_CONTEXT_TYPE:\r\n              case REACT_CONTEXT_TYPE:\r\n              case REACT_FORWARD_REF_TYPE:\r\n              case REACT_LAZY_TYPE:\r\n              case REACT_MEMO_TYPE:\r\n              case REACT_PROVIDER_TYPE:\r\n                return $$typeofType\r\n\r\n              default:\r\n                return $$typeof\r\n            }\r\n          }\r\n        }\r\n      }\r\n\r\n      case REACT_PORTAL_TYPE: {\r\n        return $$typeof\r\n      }\r\n    }\r\n  }\r\n\r\n  return undefined\r\n}\r\n\r\nexport function isContextConsumer(object: any): object is ReactElement {\r\n  return typeOf(object) === REACT_CONTEXT_TYPE\r\n}\r\n\r\nexport function isMemo(object: any): object is MemoExoticComponent<any> {\r\n  return typeOf(object) === REACT_MEMO_TYPE\r\n}\r\n","import type { Dispatch, Action } from 'redux'\r\nimport type { ComponentType } from 'react'\r\nimport verifySubselectors from './verifySubselectors'\r\nimport type { EqualityFn, ExtendedEqualityFn } from '../types'\r\n\r\nexport type SelectorFactory<S, TProps, TOwnProps, TFactoryOptions> = (\r\n  dispatch: Dispatch<Action<string>>,\r\n  factoryOptions: TFactoryOptions\r\n) => Selector<S, TProps, TOwnProps>\r\n\r\nexport type Selector<S, TProps, TOwnProps = null> = TOwnProps extends\r\n  | null\r\n  | undefined\r\n  ? (state: S) => TProps\r\n  : (state: S, ownProps: TOwnProps) => TProps\r\n\r\nexport type MapStateToProps<TStateProps, TOwnProps, State> = (\r\n  state: State,\r\n  ownProps: TOwnProps\r\n) => TStateProps\r\n\r\nexport type MapStateToPropsFactory<TStateProps, TOwnProps, State> = (\r\n  initialState: State,\r\n  ownProps: TOwnProps\r\n) => MapStateToProps<TStateProps, TOwnProps, State>\r\n\r\nexport type MapStateToPropsParam<TStateProps, TOwnProps, State> =\r\n  | MapStateToPropsFactory<TStateProps, TOwnProps, State>\r\n  | MapStateToProps<TStateProps, TOwnProps, State>\r\n  | null\r\n  | undefined\r\n\r\nexport type MapDispatchToPropsFunction<TDispatchProps, TOwnProps> = (\r\n  dispatch: Dispatch<Action<string>>,\r\n  ownProps: TOwnProps\r\n) => TDispatchProps\r\n\r\nexport type MapDispatchToProps<TDispatchProps, TOwnProps> =\r\n  | MapDispatchToPropsFunction<TDispatchProps, TOwnProps>\r\n  | TDispatchProps\r\n\r\nexport type MapDispatchToPropsFactory<TDispatchProps, TOwnProps> = (\r\n  dispatch: Dispatch<Action<string>>,\r\n  ownProps: TOwnProps\r\n) => MapDispatchToPropsFunction<TDispatchProps, TOwnProps>\r\n\r\nexport type MapDispatchToPropsParam<TDispatchProps, TOwnProps> =\r\n  | MapDispatchToPropsFactory<TDispatchProps, TOwnProps>\r\n  | MapDispatchToProps<TDispatchProps, TOwnProps>\r\n\r\nexport type MapDispatchToPropsNonObject<TDispatchProps, TOwnProps> =\r\n  | MapDispatchToPropsFactory<TDispatchProps, TOwnProps>\r\n  | MapDispatchToPropsFunction<TDispatchProps, TOwnProps>\r\n\r\nexport type MergeProps<TStateProps, TDispatchProps, TOwnProps, TMergedProps> = (\r\n  stateProps: TStateProps,\r\n  dispatchProps: TDispatchProps,\r\n  ownProps: TOwnProps\r\n) => TMergedProps\r\n\r\ninterface PureSelectorFactoryComparisonOptions<TStateProps, TOwnProps, State> {\r\n  readonly areStatesEqual: ExtendedEqualityFn<State, TOwnProps>\r\n  readonly areStatePropsEqual: EqualityFn<TStateProps>\r\n  readonly areOwnPropsEqual: EqualityFn<TOwnProps>\r\n}\r\n\r\nexport function pureFinalPropsSelectorFactory<\r\n  TStateProps,\r\n  TOwnProps,\r\n  TDispatchProps,\r\n  TMergedProps,\r\n  State\r\n>(\r\n  mapStateToProps: WrappedMapStateToProps<TStateProps, TOwnProps, State>,\r\n  mapDispatchToProps: WrappedMapDispatchToProps<TDispatchProps, TOwnProps>,\r\n  mergeProps: MergeProps<TStateProps, TDispatchProps, TOwnProps, TMergedProps>,\r\n  dispatch: Dispatch<Action<string>>,\r\n  {\r\n    areStatesEqual,\r\n    areOwnPropsEqual,\r\n    areStatePropsEqual,\r\n  }: PureSelectorFactoryComparisonOptions<TStateProps, TOwnProps, State>\r\n) {\r\n  let hasRunAtLeastOnce = false\r\n  let state: State\r\n  let ownProps: TOwnProps\r\n  let stateProps: TStateProps\r\n  let dispatchProps: TDispatchProps\r\n  let mergedProps: TMergedProps\r\n\r\n  function handleFirstCall(firstState: State, firstOwnProps: TOwnProps) {\r\n    state = firstState\r\n    ownProps = firstOwnProps\r\n    stateProps = mapStateToProps(state, ownProps)\r\n    dispatchProps = mapDispatchToProps(dispatch, ownProps)\r\n    mergedProps = mergeProps(stateProps, dispatchProps, ownProps)\r\n    hasRunAtLeastOnce = true\r\n    return mergedProps\r\n  }\r\n\r\n  function handleNewPropsAndNewState() {\r\n    stateProps = mapStateToProps(state, ownProps)\r\n\r\n    if (mapDispatchToProps.dependsOnOwnProps)\r\n      dispatchProps = mapDispatchToProps(dispatch, ownProps)\r\n\r\n    mergedProps = mergeProps(stateProps, dispatchProps, ownProps)\r\n    return mergedProps\r\n  }\r\n\r\n  function handleNewProps() {\r\n    if (mapStateToProps.dependsOnOwnProps)\r\n      stateProps = mapStateToProps(state, ownProps)\r\n\r\n    if (mapDispatchToProps.dependsOnOwnProps)\r\n      dispatchProps = mapDispatchToProps(dispatch, ownProps)\r\n\r\n    mergedProps = mergeProps(stateProps, dispatchProps, ownProps)\r\n    return mergedProps\r\n  }\r\n\r\n  function handleNewState() {\r\n    const nextStateProps = mapStateToProps(state, ownProps)\r\n    const statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps)\r\n    stateProps = nextStateProps\r\n\r\n    if (statePropsChanged)\r\n      mergedProps = mergeProps(stateProps, dispatchProps, ownProps)\r\n\r\n    return mergedProps\r\n  }\r\n\r\n  function handleSubsequentCalls(nextState: State, nextOwnProps: TOwnProps) {\r\n    const propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps)\r\n    const stateChanged = !areStatesEqual(\r\n      nextState,\r\n      state,\r\n      nextOwnProps,\r\n      ownProps\r\n    )\r\n    state = nextState\r\n    ownProps = nextOwnProps\r\n\r\n    if (propsChanged && stateChanged) return handleNewPropsAndNewState()\r\n    if (propsChanged) return handleNewProps()\r\n    if (stateChanged) return handleNewState()\r\n    return mergedProps\r\n  }\r\n\r\n  return function pureFinalPropsSelector(\r\n    nextState: State,\r\n    nextOwnProps: TOwnProps\r\n  ) {\r\n    return hasRunAtLeastOnce\r\n      ? handleSubsequentCalls(nextState, nextOwnProps)\r\n      : handleFirstCall(nextState, nextOwnProps)\r\n  }\r\n}\r\n\r\ninterface WrappedMapStateToProps<TStateProps, TOwnProps, State> {\r\n  (state: State, ownProps: TOwnProps): TStateProps\r\n  readonly dependsOnOwnProps: boolean\r\n}\r\n\r\ninterface WrappedMapDispatchToProps<TDispatchProps, TOwnProps> {\r\n  (dispatch: Dispatch<Action<string>>, ownProps: TOwnProps): TDispatchProps\r\n  readonly dependsOnOwnProps: boolean\r\n}\r\n\r\nexport interface InitOptions<TStateProps, TOwnProps, TMergedProps, State>\r\n  extends PureSelectorFactoryComparisonOptions<TStateProps, TOwnProps, State> {\r\n  readonly shouldHandleStateChanges: boolean\r\n  readonly displayName: string\r\n  readonly wrappedComponentName: string\r\n  readonly WrappedComponent: ComponentType<TOwnProps>\r\n  readonly areMergedPropsEqual: EqualityFn<TMergedProps>\r\n}\r\n\r\nexport interface SelectorFactoryOptions<\r\n  TStateProps,\r\n  TOwnProps,\r\n  TDispatchProps,\r\n  TMergedProps,\r\n  State\r\n> extends InitOptions<TStateProps, TOwnProps, TMergedProps, State> {\r\n  readonly initMapStateToProps: (\r\n    dispatch: Dispatch<Action<string>>,\r\n    options: InitOptions<TStateProps, TOwnProps, TMergedProps, State>\r\n  ) => WrappedMapStateToProps<TStateProps, TOwnProps, State>\r\n  readonly initMapDispatchToProps: (\r\n    dispatch: Dispatch<Action<string>>,\r\n    options: InitOptions<TStateProps, TOwnProps, TMergedProps, State>\r\n  ) => WrappedMapDispatchToProps<TDispatchProps, TOwnProps>\r\n  readonly initMergeProps: (\r\n    dispatch: Dispatch<Action<string>>,\r\n    options: InitOptions<TStateProps, TOwnProps, TMergedProps, State>\r\n  ) => MergeProps<TStateProps, TDispatchProps, TOwnProps, TMergedProps>\r\n}\r\n\r\n// TODO: Add more comments\r\n\r\n// The selector returned by selectorFactory will memoize its results,\r\n// allowing connect's shouldComponentUpdate to return false if final\r\n// props have not changed.\r\n\r\nexport default function finalPropsSelectorFactory<\r\n  TStateProps,\r\n  TOwnProps,\r\n  TDispatchProps,\r\n  TMergedProps,\r\n  State\r\n>(\r\n  dispatch: Dispatch<Action<string>>,\r\n  {\r\n    initMapStateToProps,\r\n    initMapDispatchToProps,\r\n    initMergeProps,\r\n    ...options\r\n  }: SelectorFactoryOptions<\r\n    TStateProps,\r\n    TOwnProps,\r\n    TDispatchProps,\r\n    TMergedProps,\r\n    State\r\n  >\r\n) {\r\n  const mapStateToProps = initMapStateToProps(dispatch, options)\r\n  const mapDispatchToProps = initMapDispatchToProps(dispatch, options)\r\n  const mergeProps = initMergeProps(dispatch, options)\r\n\r\n  if (process.env.NODE_ENV !== 'production') {\r\n    verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps)\r\n  }\r\n\r\n  return pureFinalPropsSelectorFactory<\r\n    TStateProps,\r\n    TOwnProps,\r\n    TDispatchProps,\r\n    TMergedProps,\r\n    State\r\n  >(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options)\r\n}\r\n","import type { ActionCreatorsMapObject, Dispatch } from 'redux'\r\n\r\nexport default function bindActionCreators(\r\n  actionCreators: ActionCreatorsMapObject,\r\n  dispatch: Dispatch\r\n): ActionCreatorsMapObject {\r\n  const boundActionCreators: ActionCreatorsMapObject = {}\r\n\r\n  for (const key in actionCreators) {\r\n    const actionCreator = actionCreators[key]\r\n    if (typeof actionCreator === 'function') {\r\n      boundActionCreators[key] = (...args) => dispatch(actionCreator(...args))\r\n    }\r\n  }\r\n  return boundActionCreators\r\n}\r\n","import type { ActionCreatorsMapObject, Dispatch, ActionCreator } from 'redux'\r\n\r\nimport type { FixTypeLater } from '../types'\r\nimport verifyPlainObject from '../utils/verifyPlainObject'\r\n\r\ntype AnyState = { [key: string]: any }\r\ntype StateOrDispatch<S extends AnyState = AnyState> = S | Dispatch\r\n\r\ntype AnyProps = { [key: string]: any }\r\n\r\nexport type MapToProps<P extends AnyProps = AnyProps> = {\r\n  // eslint-disable-next-line no-unused-vars\r\n  (stateOrDispatch: StateOrDispatch, ownProps?: P): FixTypeLater\r\n  dependsOnOwnProps?: boolean\r\n}\r\n\r\nexport function wrapMapToPropsConstant(\r\n  // * Note:\r\n  //  It seems that the dispatch argument\r\n  //  could be a dispatch function in some cases (ex: whenMapDispatchToPropsIsMissing)\r\n  //  and a state object in some others (ex: whenMapStateToPropsIsMissing)\r\n  // eslint-disable-next-line no-unused-vars\r\n  getConstant: (dispatch: Dispatch) =>\r\n    | {\r\n        dispatch?: Dispatch\r\n        dependsOnOwnProps?: boolean\r\n      }\r\n    | ActionCreatorsMapObject\r\n    | ActionCreator<any>\r\n) {\r\n  return function initConstantSelector(dispatch: Dispatch) {\r\n    const constant = getConstant(dispatch)\r\n\r\n    function constantSelector() {\r\n      return constant\r\n    }\r\n    constantSelector.dependsOnOwnProps = false\r\n    return constantSelector\r\n  }\r\n}\r\n\r\n// dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args\r\n// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine\r\n// whether mapToProps needs to be invoked when props have changed.\r\n//\r\n// A length of one signals that mapToProps does not depend on props from the parent component.\r\n// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and\r\n// therefore not reporting its length accurately..\r\n// TODO Can this get pulled out so that we can subscribe directly to the store if we don't need ownProps?\r\nexport function getDependsOnOwnProps(mapToProps: MapToProps) {\r\n  return mapToProps.dependsOnOwnProps\r\n    ? Boolean(mapToProps.dependsOnOwnProps)\r\n    : mapToProps.length !== 1\r\n}\r\n\r\n// Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,\r\n// this function wraps mapToProps in a proxy function which does several things:\r\n//\r\n//  * Detects whether the mapToProps function being called depends on props, which\r\n//    is used by selectorFactory to decide if it should reinvoke on props changes.\r\n//\r\n//  * On first call, handles mapToProps if returns another function, and treats that\r\n//    new function as the true mapToProps for subsequent calls.\r\n//\r\n//  * On first call, verifies the first result is a plain object, in order to warn\r\n//    the developer that their mapToProps function is not returning a valid result.\r\n//\r\nexport function wrapMapToPropsFunc<P extends AnyProps = AnyProps>(\r\n  mapToProps: MapToProps,\r\n  methodName: string\r\n) {\r\n  return function initProxySelector(\r\n    dispatch: Dispatch,\r\n    { displayName }: { displayName: string }\r\n  ) {\r\n    const proxy = function mapToPropsProxy(\r\n      stateOrDispatch: StateOrDispatch,\r\n      ownProps?: P\r\n    ): MapToProps {\r\n      return proxy.dependsOnOwnProps\r\n        ? proxy.mapToProps(stateOrDispatch, ownProps)\r\n        : proxy.mapToProps(stateOrDispatch, undefined)\r\n    }\r\n\r\n    // allow detectFactoryAndVerify to get ownProps\r\n    proxy.dependsOnOwnProps = true\r\n\r\n    proxy.mapToProps = function detectFactoryAndVerify(\r\n      stateOrDispatch: StateOrDispatch,\r\n      ownProps?: P\r\n    ): MapToProps {\r\n      proxy.mapToProps = mapToProps\r\n      proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps)\r\n      let props = proxy(stateOrDispatch, ownProps)\r\n\r\n      if (typeof props === 'function') {\r\n        proxy.mapToProps = props\r\n        proxy.dependsOnOwnProps = getDependsOnOwnProps(props)\r\n        props = proxy(stateOrDispatch, ownProps)\r\n      }\r\n\r\n      if (process.env.NODE_ENV !== 'production')\r\n        verifyPlainObject(props, displayName, methodName)\r\n\r\n      return props\r\n    }\r\n\r\n    return proxy\r\n  }\r\n}\r\n","import type { Action, Dispatch } from 'redux'\r\n\r\nexport function createInvalidArgFactory(arg: unknown, name: string) {\r\n  return (\r\n    dispatch: Dispatch<Action<string>>,\r\n    options: { readonly wrappedComponentName: string }\r\n  ) => {\r\n    throw new Error(\r\n      `Invalid value of type ${typeof arg} for ${name} argument when connecting component ${\r\n        options.wrappedComponentName\r\n      }.`\r\n    )\r\n  }\r\n}\r\n","import type { Action, Dispatch } from 'redux'\r\nimport bindActionCreators from '../utils/bindActionCreators'\r\nimport { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps'\r\nimport { createInvalidArgFactory } from './invalidArgFactory'\r\nimport type { MapDispatchToPropsParam } from './selectorFactory'\r\n\r\nexport function mapDispatchToPropsFactory<TDispatchProps, TOwnProps>(\r\n  mapDispatchToProps:\r\n    | MapDispatchToPropsParam<TDispatchProps, TOwnProps>\r\n    | undefined\r\n) {\r\n  return mapDispatchToProps && typeof mapDispatchToProps === 'object'\r\n    ? wrapMapToPropsConstant((dispatch: Dispatch<Action<string>>) =>\r\n        // @ts-ignore\r\n        bindActionCreators(mapDispatchToProps, dispatch)\r\n      )\r\n    : !mapDispatchToProps\r\n    ? wrapMapToPropsConstant((dispatch: Dispatch<Action<string>>) => ({\r\n        dispatch,\r\n      }))\r\n    : typeof mapDispatchToProps === 'function'\r\n    ? // @ts-ignore\r\n      wrapMapToPropsFunc(mapDispatchToProps, 'mapDispatchToProps')\r\n    : createInvalidArgFactory(mapDispatchToProps, 'mapDispatchToProps')\r\n}\r\n","import { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps'\r\nimport { createInvalidArgFactory } from './invalidArgFactory'\r\nimport type { MapStateToPropsParam } from './selectorFactory'\r\n\r\nexport function mapStateToPropsFactory<TStateProps, TOwnProps, State>(\r\n  mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>\r\n) {\r\n  return !mapStateToProps\r\n    ? wrapMapToPropsConstant(() => ({}))\r\n    : typeof mapStateToProps === 'function'\r\n    ? // @ts-ignore\r\n      wrapMapToPropsFunc(mapStateToProps, 'mapStateToProps')\r\n    : createInvalidArgFactory(mapStateToProps, 'mapStateToProps')\r\n}\r\n","import type { Action, Dispatch } from 'redux'\r\nimport verifyPlainObject from '../utils/verifyPlainObject'\r\nimport { createInvalidArgFactory } from './invalidArgFactory'\r\nimport type { MergeProps } from './selectorFactory'\r\nimport type { EqualityFn } from '../types'\r\n\r\nexport function defaultMergeProps<\r\n  TStateProps,\r\n  TDispatchProps,\r\n  TOwnProps,\r\n  TMergedProps\r\n>(\r\n  stateProps: TStateProps,\r\n  dispatchProps: TDispatchProps,\r\n  ownProps: TOwnProps\r\n): TMergedProps {\r\n  // @ts-ignore\r\n  return { ...ownProps, ...stateProps, ...dispatchProps }\r\n}\r\n\r\nexport function wrapMergePropsFunc<\r\n  TStateProps,\r\n  TDispatchProps,\r\n  TOwnProps,\r\n  TMergedProps\r\n>(\r\n  mergeProps: MergeProps<TStateProps, TDispatchProps, TOwnProps, TMergedProps>\r\n): (\r\n  dispatch: Dispatch<Action<string>>,\r\n  options: {\r\n    readonly displayName: string\r\n    readonly areMergedPropsEqual: EqualityFn<TMergedProps>\r\n  }\r\n) => MergeProps<TStateProps, TDispatchProps, TOwnProps, TMergedProps> {\r\n  return function initMergePropsProxy(\r\n    dispatch,\r\n    { displayName, areMergedPropsEqual }\r\n  ) {\r\n    let hasRunOnce = false\r\n    let mergedProps: TMergedProps\r\n\r\n    return function mergePropsProxy(\r\n      stateProps: TStateProps,\r\n      dispatchProps: TDispatchProps,\r\n      ownProps: TOwnProps\r\n    ) {\r\n      const nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps)\r\n\r\n      if (hasRunOnce) {\r\n        if (!areMergedPropsEqual(nextMergedProps, mergedProps))\r\n          mergedProps = nextMergedProps\r\n      } else {\r\n        hasRunOnce = true\r\n        mergedProps = nextMergedProps\r\n\r\n        if (process.env.NODE_ENV !== 'production')\r\n          verifyPlainObject(mergedProps, displayName, 'mergeProps')\r\n      }\r\n\r\n      return mergedProps\r\n    }\r\n  }\r\n}\r\n\r\nexport function mergePropsFactory<\r\n  TStateProps,\r\n  TDispatchProps,\r\n  TOwnProps,\r\n  TMergedProps\r\n>(\r\n  mergeProps?: MergeProps<TStateProps, TDispatchProps, TOwnProps, TMergedProps>\r\n) {\r\n  return !mergeProps\r\n    ? () => defaultMergeProps\r\n    : typeof mergeProps === 'function'\r\n    ? wrapMergePropsFunc(mergeProps)\r\n    : createInvalidArgFactory(mergeProps, 'mergeProps')\r\n}\r\n","// Default to a dummy \"batch\" implementation that just runs the callback\r\nexport function defaultNoopBatch(callback: () => void) {\r\n  callback()\r\n}\r\n","import { defaultNoopBatch as batch } from './batch'\r\n\r\n// encapsulates the subscription logic for connecting a component to the redux store, as\r\n// well as nesting subscriptions of descendant components, so that we can ensure the\r\n// ancestor components re-render before descendants\r\n\r\ntype VoidFunc = () => void\r\n\r\ntype Listener = {\r\n  callback: VoidFunc\r\n  next: Listener | null\r\n  prev: Listener | null\r\n}\r\n\r\nfunction createListenerCollection() {\r\n  let first: Listener | null = null\r\n  let last: Listener | null = null\r\n\r\n  return {\r\n    clear() {\r\n      first = null\r\n      last = null\r\n    },\r\n\r\n    notify() {\r\n      batch(() => {\r\n        let listener = first\r\n        while (listener) {\r\n          listener.callback()\r\n          listener = listener.next\r\n        }\r\n      })\r\n    },\r\n\r\n    get() {\r\n      let listeners: Listener[] = []\r\n      let listener = first\r\n      while (listener) {\r\n        listeners.push(listener)\r\n        listener = listener.next\r\n      }\r\n      return listeners\r\n    },\r\n\r\n    subscribe(callback: () => void) {\r\n      let isSubscribed = true\r\n\r\n      let listener: Listener = (last = {\r\n        callback,\r\n        next: null,\r\n        prev: last,\r\n      })\r\n\r\n      if (listener.prev) {\r\n        listener.prev.next = listener\r\n      } else {\r\n        first = listener\r\n      }\r\n\r\n      return function unsubscribe() {\r\n        if (!isSubscribed || first === null) return\r\n        isSubscribed = false\r\n\r\n        if (listener.next) {\r\n          listener.next.prev = listener.prev\r\n        } else {\r\n          last = listener.prev\r\n        }\r\n        if (listener.prev) {\r\n          listener.prev.next = listener.next\r\n        } else {\r\n          first = listener.next\r\n        }\r\n      }\r\n    },\r\n  }\r\n}\r\n\r\ntype ListenerCollection = ReturnType<typeof createListenerCollection>\r\n\r\nexport interface Subscription {\r\n  addNestedSub: (listener: VoidFunc) => VoidFunc\r\n  notifyNestedSubs: VoidFunc\r\n  handleChangeWrapper: VoidFunc\r\n  isSubscribed: () => boolean\r\n  onStateChange?: VoidFunc | null\r\n  trySubscribe: VoidFunc\r\n  tryUnsubscribe: VoidFunc\r\n  getListeners: () => ListenerCollection\r\n}\r\n\r\nconst nullListeners = {\r\n  notify() {},\r\n  get: () => [],\r\n} as unknown as ListenerCollection\r\n\r\nexport function createSubscription(store: any, parentSub?: Subscription) {\r\n  let unsubscribe: VoidFunc | undefined\r\n  let listeners: ListenerCollection = nullListeners\r\n\r\n  // Reasons to keep the subscription active\r\n  let subscriptionsAmount = 0\r\n\r\n  // Is this specific subscription subscribed (or only nested ones?)\r\n  let selfSubscribed = false\r\n\r\n  function addNestedSub(listener: () => void) {\r\n    trySubscribe()\r\n\r\n    const cleanupListener = listeners.subscribe(listener)\r\n\r\n    // cleanup nested sub\r\n    let removed = false\r\n    return () => {\r\n      if (!removed) {\r\n        removed = true\r\n        cleanupListener()\r\n        tryUnsubscribe()\r\n      }\r\n    }\r\n  }\r\n\r\n  function notifyNestedSubs() {\r\n    listeners.notify()\r\n  }\r\n\r\n  function handleChangeWrapper() {\r\n    if (subscription.onStateChange) {\r\n      subscription.onStateChange()\r\n    }\r\n  }\r\n\r\n  function isSubscribed() {\r\n    return selfSubscribed\r\n  }\r\n\r\n  function trySubscribe() {\r\n    subscriptionsAmount++\r\n    if (!unsubscribe) {\r\n      unsubscribe = parentSub\r\n        ? parentSub.addNestedSub(handleChangeWrapper)\r\n        : store.subscribe(handleChangeWrapper)\r\n\r\n      listeners = createListenerCollection()\r\n    }\r\n  }\r\n\r\n  function tryUnsubscribe() {\r\n    subscriptionsAmount--\r\n    if (unsubscribe && subscriptionsAmount === 0) {\r\n      unsubscribe()\r\n      unsubscribe = undefined\r\n      listeners.clear()\r\n      listeners = nullListeners\r\n    }\r\n  }\r\n\r\n  function trySubscribeSelf() {\r\n    if (!selfSubscribed) {\r\n      selfSubscribed = true\r\n      trySubscribe()\r\n    }\r\n  }\r\n\r\n  function tryUnsubscribeSelf() {\r\n    if (selfSubscribed) {\r\n      selfSubscribed = false\r\n      tryUnsubscribe()\r\n    }\r\n  }\r\n\r\n  const subscription: Subscription = {\r\n    addNestedSub,\r\n    notifyNestedSubs,\r\n    handleChangeWrapper,\r\n    isSubscribed,\r\n    trySubscribe: trySubscribeSelf,\r\n    tryUnsubscribe: tryUnsubscribeSelf,\r\n    getListeners: () => listeners,\r\n  }\r\n\r\n  return subscription\r\n}\r\n","import { React } from '../utils/react'\r\n\r\n// React currently throws a warning when using useLayoutEffect on the server.\r\n// To get around it, we can conditionally useEffect on the server (no-op) and\r\n// useLayoutEffect in the browser. We need useLayoutEffect to ensure the store\r\n// subscription callback always has the selector from the latest render commit\r\n// available, otherwise a store update may happen between render and the effect,\r\n// which may cause missed updates; we also must ensure the store subscription\r\n// is created synchronously, otherwise a store update may occur before the\r\n// subscription is created and an inconsistent state may be observed\r\n\r\n// Matches logic in React's `shared/ExecutionEnvironment` file\r\nexport const canUseDOM = !!(\r\n  typeof window !== 'undefined' &&\r\n  typeof window.document !== 'undefined' &&\r\n  typeof window.document.createElement !== 'undefined'\r\n)\r\n\r\nexport const useIsomorphicLayoutEffect = canUseDOM\r\n  ? React.useLayoutEffect\r\n  : React.useEffect\r\n","function is(x: unknown, y: unknown) {\r\n  if (x === y) {\r\n    return x !== 0 || y !== 0 || 1 / x === 1 / y\r\n  } else {\r\n    return x !== x && y !== y\r\n  }\r\n}\r\n\r\nexport default function shallowEqual(objA: any, objB: any) {\r\n  if (is(objA, objB)) return true\r\n\r\n  if (\r\n    typeof objA !== 'object' ||\r\n    objA === null ||\r\n    typeof objB !== 'object' ||\r\n    objB === null\r\n  ) {\r\n    return false\r\n  }\r\n\r\n  const keysA = Object.keys(objA)\r\n  const keysB = Object.keys(objB)\r\n\r\n  if (keysA.length !== keysB.length) return false\r\n\r\n  for (let i = 0; i < keysA.length; i++) {\r\n    if (\r\n      !Object.prototype.hasOwnProperty.call(objB, keysA[i]) ||\r\n      !is(objA[keysA[i]], objB[keysA[i]])\r\n    ) {\r\n      return false\r\n    }\r\n  }\r\n\r\n  return true\r\n}\r\n","// Copied directly from:\r\n// https://github.com/mridgway/hoist-non-react-statics/blob/main/src/index.js\r\n// https://unpkg.com/browse/@types/hoist-non-react-statics@3.3.1/index.d.ts\r\n\r\n/**\r\n * Copyright 2015, Yahoo! Inc.\r\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\r\n */\r\nimport type * as React from 'react'\r\nimport { ForwardRef, Memo, isMemo } from '../utils/react-is'\r\n\r\nconst REACT_STATICS = {\r\n  childContextTypes: true,\r\n  contextType: true,\r\n  contextTypes: true,\r\n  defaultProps: true,\r\n  displayName: true,\r\n  getDefaultProps: true,\r\n  getDerivedStateFromError: true,\r\n  getDerivedStateFromProps: true,\r\n  mixins: true,\r\n  propTypes: true,\r\n  type: true,\r\n} as const\r\n\r\nconst KNOWN_STATICS = {\r\n  name: true,\r\n  length: true,\r\n  prototype: true,\r\n  caller: true,\r\n  callee: true,\r\n  arguments: true,\r\n  arity: true,\r\n} as const\r\n\r\nconst FORWARD_REF_STATICS = {\r\n  $$typeof: true,\r\n  render: true,\r\n  defaultProps: true,\r\n  displayName: true,\r\n  propTypes: true,\r\n} as const\r\n\r\nconst MEMO_STATICS = {\r\n  $$typeof: true,\r\n  compare: true,\r\n  defaultProps: true,\r\n  displayName: true,\r\n  propTypes: true,\r\n  type: true,\r\n} as const\r\n\r\nconst TYPE_STATICS = {\r\n  [ForwardRef]: FORWARD_REF_STATICS,\r\n  [Memo]: MEMO_STATICS,\r\n} as const\r\n\r\nfunction getStatics(component: any) {\r\n  // React v16.11 and below\r\n  if (isMemo(component)) {\r\n    return MEMO_STATICS\r\n  }\r\n\r\n  // React v16.12 and above\r\n  return TYPE_STATICS[component['$$typeof']] || REACT_STATICS\r\n}\r\n\r\nexport type NonReactStatics<\r\n  S extends React.ComponentType<any>,\r\n  C extends {\r\n    [key: string]: true\r\n  } = {}\r\n> = {\r\n  [key in Exclude<\r\n    keyof S,\r\n    S extends React.MemoExoticComponent<any>\r\n      ? keyof typeof MEMO_STATICS | keyof C\r\n      : S extends React.ForwardRefExoticComponent<any>\r\n      ? keyof typeof FORWARD_REF_STATICS | keyof C\r\n      : keyof typeof REACT_STATICS | keyof typeof KNOWN_STATICS | keyof C\r\n  >]: S[key]\r\n}\r\n\r\nconst defineProperty = Object.defineProperty\r\nconst getOwnPropertyNames = Object.getOwnPropertyNames\r\nconst getOwnPropertySymbols = Object.getOwnPropertySymbols\r\nconst getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor\r\nconst getPrototypeOf = Object.getPrototypeOf\r\nconst objectPrototype = Object.prototype\r\n\r\nexport default function hoistNonReactStatics<\r\n  T extends React.ComponentType<any>,\r\n  S extends React.ComponentType<any>,\r\n  C extends {\r\n    [key: string]: true\r\n  } = {}\r\n>(targetComponent: T, sourceComponent: S): T & NonReactStatics<S, C> {\r\n  if (typeof sourceComponent !== 'string') {\r\n    // don't hoist over string (html) components\r\n\r\n    if (objectPrototype) {\r\n      const inheritedComponent = getPrototypeOf(sourceComponent)\r\n      if (inheritedComponent && inheritedComponent !== objectPrototype) {\r\n        hoistNonReactStatics(targetComponent, inheritedComponent)\r\n      }\r\n    }\r\n\r\n    let keys: (string | symbol)[] = getOwnPropertyNames(sourceComponent)\r\n\r\n    if (getOwnPropertySymbols) {\r\n      keys = keys.concat(getOwnPropertySymbols(sourceComponent))\r\n    }\r\n\r\n    const targetStatics = getStatics(targetComponent)\r\n    const sourceStatics = getStatics(sourceComponent)\r\n\r\n    for (let i = 0; i < keys.length; ++i) {\r\n      const key = keys[i]\r\n      if (\r\n        !KNOWN_STATICS[key as keyof typeof KNOWN_STATICS] &&\r\n        !(sourceStatics && sourceStatics[key as keyof typeof sourceStatics]) &&\r\n        !(targetStatics && targetStatics[key as keyof typeof targetStatics])\r\n      ) {\r\n        const descriptor = getOwnPropertyDescriptor(sourceComponent, key)\r\n        try {\r\n          // Avoid failures from read-only properties\r\n          defineProperty(targetComponent, key, descriptor!)\r\n        } catch (e) {\r\n          // ignore\r\n        }\r\n      }\r\n    }\r\n  }\r\n\r\n  return targetComponent as any\r\n}\r\n","/* eslint-disable valid-jsdoc, @typescript-eslint/no-unused-vars */\r\nimport type { ComponentType } from 'react'\r\nimport { React } from '../utils/react'\r\nimport { isValidElementType, isContextConsumer } from '../utils/react-is'\r\n\r\nimport type { Store } from 'redux'\r\n\r\nimport type {\r\n  ConnectedComponent,\r\n  InferableComponentEnhancer,\r\n  InferableComponentEnhancerWithProps,\r\n  ResolveThunks,\r\n  DispatchProp,\r\n  ConnectPropsMaybeWithoutContext,\r\n} from '../types'\r\n\r\nimport type {\r\n  MapStateToPropsParam,\r\n  MapDispatchToPropsParam,\r\n  MergeProps,\r\n  MapDispatchToPropsNonObject,\r\n  SelectorFactoryOptions,\r\n} from '../connect/selectorFactory'\r\nimport defaultSelectorFactory from '../connect/selectorFactory'\r\nimport { mapDispatchToPropsFactory } from '../connect/mapDispatchToProps'\r\nimport { mapStateToPropsFactory } from '../connect/mapStateToProps'\r\nimport { mergePropsFactory } from '../connect/mergeProps'\r\n\r\nimport type { Subscription } from '../utils/Subscription'\r\nimport { createSubscription } from '../utils/Subscription'\r\nimport { useIsomorphicLayoutEffect } from '../utils/useIsomorphicLayoutEffect'\r\nimport shallowEqual from '../utils/shallowEqual'\r\nimport hoistStatics from '../utils/hoistStatics'\r\nimport warning from '../utils/warning'\r\n\r\nimport type {\r\n  ReactReduxContextValue,\r\n  ReactReduxContextInstance,\r\n} from './Context'\r\nimport { ReactReduxContext } from './Context'\r\n\r\nimport type { uSES } from '../utils/useSyncExternalStore'\r\nimport { notInitialized } from '../utils/useSyncExternalStore'\r\n\r\nlet useSyncExternalStore = notInitialized as uSES\r\nexport const initializeConnect = (fn: uSES) => {\r\n  useSyncExternalStore = fn\r\n}\r\n\r\n// Define some constant arrays just to avoid re-creating these\r\nconst EMPTY_ARRAY: [unknown, number] = [null, 0]\r\nconst NO_SUBSCRIPTION_ARRAY = [null, null]\r\n\r\n// Attempts to stringify whatever not-really-a-component value we were given\r\n// for logging in an error message\r\nconst stringifyComponent = (Comp: unknown) => {\r\n  try {\r\n    return JSON.stringify(Comp)\r\n  } catch (err) {\r\n    return String(Comp)\r\n  }\r\n}\r\n\r\ntype EffectFunc = (...args: any[]) => void | ReturnType<React.EffectCallback>\r\n\r\n// This is \"just\" a `useLayoutEffect`, but with two modifications:\r\n// - we need to fall back to `useEffect` in SSR to avoid annoying warnings\r\n// - we extract this to a separate function to avoid closing over values\r\n//   and causing memory leaks\r\nfunction useIsomorphicLayoutEffectWithArgs(\r\n  effectFunc: EffectFunc,\r\n  effectArgs: any[],\r\n  dependencies?: React.DependencyList\r\n) {\r\n  useIsomorphicLayoutEffect(() => effectFunc(...effectArgs), dependencies)\r\n}\r\n\r\n// Effect callback, extracted: assign the latest props values to refs for later usage\r\nfunction captureWrapperProps(\r\n  lastWrapperProps: React.MutableRefObject<unknown>,\r\n  lastChildProps: React.MutableRefObject<unknown>,\r\n  renderIsScheduled: React.MutableRefObject<boolean>,\r\n  wrapperProps: unknown,\r\n  // actualChildProps: unknown,\r\n  childPropsFromStoreUpdate: React.MutableRefObject<unknown>,\r\n  notifyNestedSubs: () => void\r\n) {\r\n  // We want to capture the wrapper props and child props we used for later comparisons\r\n  lastWrapperProps.current = wrapperProps\r\n  renderIsScheduled.current = false\r\n\r\n  // If the render was from a store update, clear out that reference and cascade the subscriber update\r\n  if (childPropsFromStoreUpdate.current) {\r\n    childPropsFromStoreUpdate.current = null\r\n    notifyNestedSubs()\r\n  }\r\n}\r\n\r\n// Effect callback, extracted: subscribe to the Redux store or nearest connected ancestor,\r\n// check for updates after dispatched actions, and trigger re-renders.\r\nfunction subscribeUpdates(\r\n  shouldHandleStateChanges: boolean,\r\n  store: Store,\r\n  subscription: Subscription,\r\n  childPropsSelector: (state: unknown, props: unknown) => unknown,\r\n  lastWrapperProps: React.MutableRefObject<unknown>,\r\n  lastChildProps: React.MutableRefObject<unknown>,\r\n  renderIsScheduled: React.MutableRefObject<boolean>,\r\n  isMounted: React.MutableRefObject<boolean>,\r\n  childPropsFromStoreUpdate: React.MutableRefObject<unknown>,\r\n  notifyNestedSubs: () => void,\r\n  // forceComponentUpdateDispatch: React.Dispatch<any>,\r\n  additionalSubscribeListener: () => void\r\n) {\r\n  // If we're not subscribed to the store, nothing to do here\r\n  if (!shouldHandleStateChanges) return () => {}\r\n\r\n  // Capture values for checking if and when this component unmounts\r\n  let didUnsubscribe = false\r\n  let lastThrownError: Error | null = null\r\n\r\n  // We'll run this callback every time a store subscription update propagates to this component\r\n  const checkForUpdates = () => {\r\n    if (didUnsubscribe || !isMounted.current) {\r\n      // Don't run stale listeners.\r\n      // Redux doesn't guarantee unsubscriptions happen until next dispatch.\r\n      return\r\n    }\r\n\r\n    // TODO We're currently calling getState ourselves here, rather than letting `uSES` do it\r\n    const latestStoreState = store.getState()\r\n\r\n    let newChildProps, error\r\n    try {\r\n      // Actually run the selector with the most recent store state and wrapper props\r\n      // to determine what the child props should be\r\n      newChildProps = childPropsSelector(\r\n        latestStoreState,\r\n        lastWrapperProps.current\r\n      )\r\n    } catch (e) {\r\n      error = e\r\n      lastThrownError = e as Error | null\r\n    }\r\n\r\n    if (!error) {\r\n      lastThrownError = null\r\n    }\r\n\r\n    // If the child props haven't changed, nothing to do here - cascade the subscription update\r\n    if (newChildProps === lastChildProps.current) {\r\n      if (!renderIsScheduled.current) {\r\n        notifyNestedSubs()\r\n      }\r\n    } else {\r\n      // Save references to the new child props.  Note that we track the \"child props from store update\"\r\n      // as a ref instead of a useState/useReducer because we need a way to determine if that value has\r\n      // been processed.  If this went into useState/useReducer, we couldn't clear out the value without\r\n      // forcing another re-render, which we don't want.\r\n      lastChildProps.current = newChildProps\r\n      childPropsFromStoreUpdate.current = newChildProps\r\n      renderIsScheduled.current = true\r\n\r\n      // TODO This is hacky and not how `uSES` is meant to be used\r\n      // Trigger the React `useSyncExternalStore` subscriber\r\n      additionalSubscribeListener()\r\n    }\r\n  }\r\n\r\n  // Actually subscribe to the nearest connected ancestor (or store)\r\n  subscription.onStateChange = checkForUpdates\r\n  subscription.trySubscribe()\r\n\r\n  // Pull data from the store after first render in case the store has\r\n  // changed since we began.\r\n  checkForUpdates()\r\n\r\n  const unsubscribeWrapper = () => {\r\n    didUnsubscribe = true\r\n    subscription.tryUnsubscribe()\r\n    subscription.onStateChange = null\r\n\r\n    if (lastThrownError) {\r\n      // It's possible that we caught an error due to a bad mapState function, but the\r\n      // parent re-rendered without this component and we're about to unmount.\r\n      // This shouldn't happen as long as we do top-down subscriptions correctly, but\r\n      // if we ever do those wrong, this throw will surface the error in our tests.\r\n      // In that case, throw the error from here so it doesn't get lost.\r\n      throw lastThrownError\r\n    }\r\n  }\r\n\r\n  return unsubscribeWrapper\r\n}\r\n\r\n// Reducer initial state creation for our update reducer\r\nconst initStateUpdates = () => EMPTY_ARRAY\r\n\r\nexport interface ConnectProps {\r\n  /** A custom Context instance that the component can use to access the store from an alternate Provider using that same Context instance */\r\n  context?: ReactReduxContextInstance\r\n  /** A Redux store instance to be used for subscriptions instead of the store from a Provider */\r\n  store?: Store\r\n}\r\n\r\ninterface InternalConnectProps extends ConnectProps {\r\n  reactReduxForwardedRef?: React.ForwardedRef<unknown>\r\n}\r\n\r\nfunction strictEqual(a: unknown, b: unknown) {\r\n  return a === b\r\n}\r\n\r\n/**\r\n * Infers the type of props that a connector will inject into a component.\r\n */\r\nexport type ConnectedProps<TConnector> =\r\n  TConnector extends InferableComponentEnhancerWithProps<\r\n    infer TInjectedProps,\r\n    any\r\n  >\r\n    ? unknown extends TInjectedProps\r\n      ? TConnector extends InferableComponentEnhancer<infer TInjectedProps>\r\n        ? TInjectedProps\r\n        : never\r\n      : TInjectedProps\r\n    : never\r\n\r\nexport interface ConnectOptions<\r\n  State = unknown,\r\n  TStateProps = {},\r\n  TOwnProps = {},\r\n  TMergedProps = {}\r\n> {\r\n  forwardRef?: boolean\r\n  context?: typeof ReactReduxContext\r\n  areStatesEqual?: (\r\n    nextState: State,\r\n    prevState: State,\r\n    nextOwnProps: TOwnProps,\r\n    prevOwnProps: TOwnProps\r\n  ) => boolean\r\n\r\n  areOwnPropsEqual?: (\r\n    nextOwnProps: TOwnProps,\r\n    prevOwnProps: TOwnProps\r\n  ) => boolean\r\n\r\n  areStatePropsEqual?: (\r\n    nextStateProps: TStateProps,\r\n    prevStateProps: TStateProps\r\n  ) => boolean\r\n  areMergedPropsEqual?: (\r\n    nextMergedProps: TMergedProps,\r\n    prevMergedProps: TMergedProps\r\n  ) => boolean\r\n}\r\n\r\n/**\r\n * Connects a React component to a Redux store.\r\n *\r\n * - Without arguments, just wraps the component, without changing the behavior / props\r\n *\r\n * - If 2 params are passed (3rd param, mergeProps, is skipped), default behavior\r\n * is to override ownProps (as stated in the docs), so what remains is everything that's\r\n * not a state or dispatch prop\r\n *\r\n * - When 3rd param is passed, we don't know if ownProps propagate and whether they\r\n * should be valid component props, because it depends on mergeProps implementation.\r\n * As such, it is the user's responsibility to extend ownProps interface from state or\r\n * dispatch props or both when applicable\r\n *\r\n * @param mapStateToProps\r\n * @param mapDispatchToProps\r\n * @param mergeProps\r\n * @param options\r\n */\r\nexport interface Connect<DefaultState = unknown> {\r\n  // tslint:disable:no-unnecessary-generics\r\n  (): InferableComponentEnhancer<DispatchProp>\r\n\r\n  /** mapState only */\r\n  <TStateProps = {}, no_dispatch = {}, TOwnProps = {}, State = DefaultState>(\r\n    mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>\r\n  ): InferableComponentEnhancerWithProps<TStateProps & DispatchProp, TOwnProps>\r\n\r\n  /** mapDispatch only (as a function) */\r\n  <no_state = {}, TDispatchProps = {}, TOwnProps = {}>(\r\n    mapStateToProps: null | undefined,\r\n    mapDispatchToProps: MapDispatchToPropsNonObject<TDispatchProps, TOwnProps>\r\n  ): InferableComponentEnhancerWithProps<TDispatchProps, TOwnProps>\r\n\r\n  /** mapDispatch only (as an object) */\r\n  <no_state = {}, TDispatchProps = {}, TOwnProps = {}>(\r\n    mapStateToProps: null | undefined,\r\n    mapDispatchToProps: MapDispatchToPropsParam<TDispatchProps, TOwnProps>\r\n  ): InferableComponentEnhancerWithProps<\r\n    ResolveThunks<TDispatchProps>,\r\n    TOwnProps\r\n  >\r\n\r\n  /** mapState and mapDispatch (as a function)*/\r\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(\r\n    mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>,\r\n    mapDispatchToProps: MapDispatchToPropsNonObject<TDispatchProps, TOwnProps>\r\n  ): InferableComponentEnhancerWithProps<\r\n    TStateProps & TDispatchProps,\r\n    TOwnProps\r\n  >\r\n\r\n  /** mapState and mapDispatch (nullish) */\r\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(\r\n    mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>,\r\n    mapDispatchToProps: null | undefined\r\n  ): InferableComponentEnhancerWithProps<TStateProps, TOwnProps>\r\n\r\n  /** mapState and mapDispatch (as an object) */\r\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(\r\n    mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>,\r\n    mapDispatchToProps: MapDispatchToPropsParam<TDispatchProps, TOwnProps>\r\n  ): InferableComponentEnhancerWithProps<\r\n    TStateProps & ResolveThunks<TDispatchProps>,\r\n    TOwnProps\r\n  >\r\n\r\n  /** mergeProps only */\r\n  <no_state = {}, no_dispatch = {}, TOwnProps = {}, TMergedProps = {}>(\r\n    mapStateToProps: null | undefined,\r\n    mapDispatchToProps: null | undefined,\r\n    mergeProps: MergeProps<undefined, DispatchProp, TOwnProps, TMergedProps>\r\n  ): InferableComponentEnhancerWithProps<TMergedProps, TOwnProps>\r\n\r\n  /** mapState and mergeProps */\r\n  <\r\n    TStateProps = {},\r\n    no_dispatch = {},\r\n    TOwnProps = {},\r\n    TMergedProps = {},\r\n    State = DefaultState\r\n  >(\r\n    mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>,\r\n    mapDispatchToProps: null | undefined,\r\n    mergeProps: MergeProps<TStateProps, DispatchProp, TOwnProps, TMergedProps>\r\n  ): InferableComponentEnhancerWithProps<TMergedProps, TOwnProps>\r\n\r\n  /** mapDispatch (as a object) and mergeProps */\r\n  <no_state = {}, TDispatchProps = {}, TOwnProps = {}, TMergedProps = {}>(\r\n    mapStateToProps: null | undefined,\r\n    mapDispatchToProps: MapDispatchToPropsParam<TDispatchProps, TOwnProps>,\r\n    mergeProps: MergeProps<undefined, TDispatchProps, TOwnProps, TMergedProps>\r\n  ): InferableComponentEnhancerWithProps<TMergedProps, TOwnProps>\r\n\r\n  /** mapState and options */\r\n  <TStateProps = {}, no_dispatch = {}, TOwnProps = {}, State = DefaultState>(\r\n    mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>,\r\n    mapDispatchToProps: null | undefined,\r\n    mergeProps: null | undefined,\r\n    options: ConnectOptions<State, TStateProps, TOwnProps>\r\n  ): InferableComponentEnhancerWithProps<DispatchProp & TStateProps, TOwnProps>\r\n\r\n  /** mapDispatch (as a function) and options */\r\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}>(\r\n    mapStateToProps: null | undefined,\r\n    mapDispatchToProps: MapDispatchToPropsNonObject<TDispatchProps, TOwnProps>,\r\n    mergeProps: null | undefined,\r\n    options: ConnectOptions<{}, TStateProps, TOwnProps>\r\n  ): InferableComponentEnhancerWithProps<TDispatchProps, TOwnProps>\r\n\r\n  /** mapDispatch (as an object) and options*/\r\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}>(\r\n    mapStateToProps: null | undefined,\r\n    mapDispatchToProps: MapDispatchToPropsParam<TDispatchProps, TOwnProps>,\r\n    mergeProps: null | undefined,\r\n    options: ConnectOptions<{}, TStateProps, TOwnProps>\r\n  ): InferableComponentEnhancerWithProps<\r\n    ResolveThunks<TDispatchProps>,\r\n    TOwnProps\r\n  >\r\n\r\n  /** mapState,  mapDispatch (as a function), and options */\r\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(\r\n    mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>,\r\n    mapDispatchToProps: MapDispatchToPropsNonObject<TDispatchProps, TOwnProps>,\r\n    mergeProps: null | undefined,\r\n    options: ConnectOptions<State, TStateProps, TOwnProps>\r\n  ): InferableComponentEnhancerWithProps<\r\n    TStateProps & TDispatchProps,\r\n    TOwnProps\r\n  >\r\n\r\n  /** mapState,  mapDispatch (as an object), and options */\r\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(\r\n    mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>,\r\n    mapDispatchToProps: MapDispatchToPropsParam<TDispatchProps, TOwnProps>,\r\n    mergeProps: null | undefined,\r\n    options: ConnectOptions<State, TStateProps, TOwnProps>\r\n  ): InferableComponentEnhancerWithProps<\r\n    TStateProps & ResolveThunks<TDispatchProps>,\r\n    TOwnProps\r\n  >\r\n\r\n  /** mapState, mapDispatch, mergeProps, and options */\r\n  <\r\n    TStateProps = {},\r\n    TDispatchProps = {},\r\n    TOwnProps = {},\r\n    TMergedProps = {},\r\n    State = DefaultState\r\n  >(\r\n    mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>,\r\n    mapDispatchToProps: MapDispatchToPropsParam<TDispatchProps, TOwnProps>,\r\n    mergeProps: MergeProps<\r\n      TStateProps,\r\n      TDispatchProps,\r\n      TOwnProps,\r\n      TMergedProps\r\n    >,\r\n    options?: ConnectOptions<State, TStateProps, TOwnProps, TMergedProps>\r\n  ): InferableComponentEnhancerWithProps<TMergedProps, TOwnProps>\r\n  // tslint:enable:no-unnecessary-generics\r\n}\r\n\r\nlet hasWarnedAboutDeprecatedPureOption = false\r\n\r\n/**\r\n * Connects a React component to a Redux store.\r\n *\r\n * - Without arguments, just wraps the component, without changing the behavior / props\r\n *\r\n * - If 2 params are passed (3rd param, mergeProps, is skipped), default behavior\r\n * is to override ownProps (as stated in the docs), so what remains is everything that's\r\n * not a state or dispatch prop\r\n *\r\n * - When 3rd param is passed, we don't know if ownProps propagate and whether they\r\n * should be valid component props, because it depends on mergeProps implementation.\r\n * As such, it is the user's responsibility to extend ownProps interface from state or\r\n * dispatch props or both when applicable\r\n *\r\n * @param mapStateToProps A function that extracts values from state\r\n * @param mapDispatchToProps Setup for dispatching actions\r\n * @param mergeProps Optional callback to merge state and dispatch props together\r\n * @param options Options for configuring the connection\r\n *\r\n */\r\nfunction connect<\r\n  TStateProps = {},\r\n  TDispatchProps = {},\r\n  TOwnProps = {},\r\n  TMergedProps = {},\r\n  State = unknown\r\n>(\r\n  mapStateToProps?: MapStateToPropsParam<TStateProps, TOwnProps, State>,\r\n  mapDispatchToProps?: MapDispatchToPropsParam<TDispatchProps, TOwnProps>,\r\n  mergeProps?: MergeProps<TStateProps, TDispatchProps, TOwnProps, TMergedProps>,\r\n  {\r\n    // The `pure` option has been removed, so TS doesn't like us destructuring this to check its existence.\r\n    // @ts-ignore\r\n    pure,\r\n    areStatesEqual = strictEqual,\r\n    areOwnPropsEqual = shallowEqual,\r\n    areStatePropsEqual = shallowEqual,\r\n    areMergedPropsEqual = shallowEqual,\r\n\r\n    // use React's forwardRef to expose a ref of the wrapped component\r\n    forwardRef = false,\r\n\r\n    // the context consumer to use\r\n    context = ReactReduxContext,\r\n  }: ConnectOptions<unknown, unknown, unknown, unknown> = {}\r\n): unknown {\r\n  if (process.env.NODE_ENV !== 'production') {\r\n    if (pure !== undefined && !hasWarnedAboutDeprecatedPureOption) {\r\n      hasWarnedAboutDeprecatedPureOption = true\r\n      warning(\r\n        'The `pure` option has been removed. `connect` is now always a \"pure/memoized\" component'\r\n      )\r\n    }\r\n  }\r\n\r\n  const Context = context\r\n\r\n  const initMapStateToProps = mapStateToPropsFactory(mapStateToProps)\r\n  const initMapDispatchToProps = mapDispatchToPropsFactory(mapDispatchToProps)\r\n  const initMergeProps = mergePropsFactory(mergeProps)\r\n\r\n  const shouldHandleStateChanges = Boolean(mapStateToProps)\r\n\r\n  const wrapWithConnect = <TProps,>(\r\n    WrappedComponent: ComponentType<TProps>\r\n  ) => {\r\n    type WrappedComponentProps = TProps &\r\n      ConnectPropsMaybeWithoutContext<TProps>\r\n\r\n    if (process.env.NODE_ENV !== 'production') {\r\n      const isValid = /*#__PURE__*/ isValidElementType(WrappedComponent)\r\n      if (!isValid)\r\n        throw new Error(\r\n          `You must pass a component to the function returned by connect. Instead received ${stringifyComponent(\r\n            WrappedComponent\r\n          )}`\r\n        )\r\n    }\r\n\r\n    const wrappedComponentName =\r\n      WrappedComponent.displayName || WrappedComponent.name || 'Component'\r\n\r\n    const displayName = `Connect(${wrappedComponentName})`\r\n\r\n    const selectorFactoryOptions: SelectorFactoryOptions<\r\n      any,\r\n      any,\r\n      any,\r\n      any,\r\n      State\r\n    > = {\r\n      shouldHandleStateChanges,\r\n      displayName,\r\n      wrappedComponentName,\r\n      WrappedComponent,\r\n      // @ts-ignore\r\n      initMapStateToProps,\r\n      // @ts-ignore\r\n      initMapDispatchToProps,\r\n      initMergeProps,\r\n      areStatesEqual,\r\n      areStatePropsEqual,\r\n      areOwnPropsEqual,\r\n      areMergedPropsEqual,\r\n    }\r\n\r\n    function ConnectFunction<TOwnProps>(\r\n      props: InternalConnectProps & TOwnProps\r\n    ) {\r\n      const [propsContext, reactReduxForwardedRef, wrapperProps] =\r\n        React.useMemo(() => {\r\n          // Distinguish between actual \"data\" props that were passed to the wrapper component,\r\n          // and values needed to control behavior (forwarded refs, alternate context instances).\r\n          // To maintain the wrapperProps object reference, memoize this destructuring.\r\n          const { reactReduxForwardedRef, ...wrapperProps } = props\r\n          return [props.context, reactReduxForwardedRef, wrapperProps]\r\n        }, [props])\r\n\r\n      const ContextToUse: ReactReduxContextInstance = React.useMemo(() => {\r\n        // Users may optionally pass in a custom context instance to use instead of our ReactReduxContext.\r\n        // Memoize the check that determines which context instance we should use.\r\n        let ResultContext = Context\r\n        if (propsContext?.Consumer) {\r\n          if (process.env.NODE_ENV !== 'production') {\r\n            const isValid = /*#__PURE__*/ isContextConsumer(\r\n              // @ts-ignore\r\n              <propsContext.Consumer />\r\n            )\r\n            if (!isValid) {\r\n              throw new Error(\r\n                'You must pass a valid React context consumer as `props.context`'\r\n              )\r\n            }\r\n            ResultContext = propsContext\r\n          }\r\n        }\r\n        return ResultContext\r\n      }, [propsContext, Context])\r\n\r\n      // Retrieve the store and ancestor subscription via context, if available\r\n      const contextValue = React.useContext(ContextToUse)\r\n\r\n      // The store _must_ exist as either a prop or in context.\r\n      // We'll check to see if it _looks_ like a Redux store first.\r\n      // This allows us to pass through a `store` prop that is just a plain value.\r\n      const didStoreComeFromProps =\r\n        Boolean(props.store) &&\r\n        Boolean(props.store!.getState) &&\r\n        Boolean(props.store!.dispatch)\r\n      const didStoreComeFromContext =\r\n        Boolean(contextValue) && Boolean(contextValue!.store)\r\n\r\n      if (\r\n        process.env.NODE_ENV !== 'production' &&\r\n        !didStoreComeFromProps &&\r\n        !didStoreComeFromContext\r\n      ) {\r\n        throw new Error(\r\n          `Could not find \"store\" in the context of ` +\r\n            `\"${displayName}\". Either wrap the root component in a <Provider>, ` +\r\n            `or pass a custom React context provider to <Provider> and the corresponding ` +\r\n            `React context consumer to ${displayName} in connect options.`\r\n        )\r\n      }\r\n\r\n      // Based on the previous check, one of these must be true\r\n      const store: Store = didStoreComeFromProps\r\n        ? props.store!\r\n        : contextValue!.store\r\n\r\n      const getServerState = didStoreComeFromContext\r\n        ? contextValue!.getServerState\r\n        : store.getState\r\n\r\n      const childPropsSelector = React.useMemo(() => {\r\n        // The child props selector needs the store reference as an input.\r\n        // Re-create this selector whenever the store changes.\r\n        return defaultSelectorFactory(store.dispatch, selectorFactoryOptions)\r\n      }, [store])\r\n\r\n      const [subscription, notifyNestedSubs] = React.useMemo(() => {\r\n        if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY\r\n\r\n        // This Subscription's source should match where store came from: props vs. context. A component\r\n        // connected to the store via props shouldn't use subscription from context, or vice versa.\r\n        const subscription = createSubscription(\r\n          store,\r\n          didStoreComeFromProps ? undefined : contextValue!.subscription\r\n        )\r\n\r\n        // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in\r\n        // the middle of the notification loop, where `subscription` will then be null. This can\r\n        // probably be avoided if Subscription's listeners logic is changed to not call listeners\r\n        // that have been unsubscribed in the  middle of the notification loop.\r\n        const notifyNestedSubs =\r\n          subscription.notifyNestedSubs.bind(subscription)\r\n\r\n        return [subscription, notifyNestedSubs]\r\n      }, [store, didStoreComeFromProps, contextValue])\r\n\r\n      // Determine what {store, subscription} value should be put into nested context, if necessary,\r\n      // and memoize that value to avoid unnecessary context updates.\r\n      const overriddenContextValue = React.useMemo(() => {\r\n        if (didStoreComeFromProps) {\r\n          // This component is directly subscribed to a store from props.\r\n          // We don't want descendants reading from this store - pass down whatever\r\n          // the existing context value is from the nearest connected ancestor.\r\n          return contextValue!\r\n        }\r\n\r\n        // Otherwise, put this component's subscription instance into context, so that\r\n        // connected descendants won't update until after this component is done\r\n        return {\r\n          ...contextValue,\r\n          subscription,\r\n        } as ReactReduxContextValue\r\n      }, [didStoreComeFromProps, contextValue, subscription])\r\n\r\n      // Set up refs to coordinate values between the subscription effect and the render logic\r\n      const lastChildProps = React.useRef<unknown>()\r\n      const lastWrapperProps = React.useRef(wrapperProps)\r\n      const childPropsFromStoreUpdate = React.useRef<unknown>()\r\n      const renderIsScheduled = React.useRef(false)\r\n      const isProcessingDispatch = React.useRef(false)\r\n      const isMounted = React.useRef(false)\r\n\r\n      const latestSubscriptionCallbackError = React.useRef<Error>()\r\n\r\n      useIsomorphicLayoutEffect(() => {\r\n        isMounted.current = true\r\n        return () => {\r\n          isMounted.current = false\r\n        }\r\n      }, [])\r\n\r\n      const actualChildPropsSelector = React.useMemo(() => {\r\n        const selector = () => {\r\n          // Tricky logic here:\r\n          // - This render may have been triggered by a Redux store update that produced new child props\r\n          // - However, we may have gotten new wrapper props after that\r\n          // If we have new child props, and the same wrapper props, we know we should use the new child props as-is.\r\n          // But, if we have new wrapper props, those might change the child props, so we have to recalculate things.\r\n          // So, we'll use the child props from store update only if the wrapper props are the same as last time.\r\n          if (\r\n            childPropsFromStoreUpdate.current &&\r\n            wrapperProps === lastWrapperProps.current\r\n          ) {\r\n            return childPropsFromStoreUpdate.current\r\n          }\r\n\r\n          // TODO We're reading the store directly in render() here. Bad idea?\r\n          // This will likely cause Bad Things (TM) to happen in Concurrent Mode.\r\n          // Note that we do this because on renders _not_ caused by store updates, we need the latest store state\r\n          // to determine what the child props should be.\r\n          return childPropsSelector(store.getState(), wrapperProps)\r\n        }\r\n        return selector\r\n      }, [store, wrapperProps])\r\n\r\n      // We need this to execute synchronously every time we re-render. However, React warns\r\n      // about useLayoutEffect in SSR, so we try to detect environment and fall back to\r\n      // just useEffect instead to avoid the warning, since neither will run anyway.\r\n\r\n      const subscribeForReact = React.useMemo(() => {\r\n        const subscribe = (reactListener: () => void) => {\r\n          if (!subscription) {\r\n            return () => {}\r\n          }\r\n\r\n          return subscribeUpdates(\r\n            shouldHandleStateChanges,\r\n            store,\r\n            subscription,\r\n            // @ts-ignore\r\n            childPropsSelector,\r\n            lastWrapperProps,\r\n            lastChildProps,\r\n            renderIsScheduled,\r\n            isMounted,\r\n            childPropsFromStoreUpdate,\r\n            notifyNestedSubs,\r\n            reactListener\r\n          )\r\n        }\r\n\r\n        return subscribe\r\n      }, [subscription])\r\n\r\n      useIsomorphicLayoutEffectWithArgs(captureWrapperProps, [\r\n        lastWrapperProps,\r\n        lastChildProps,\r\n        renderIsScheduled,\r\n        wrapperProps,\r\n        childPropsFromStoreUpdate,\r\n        notifyNestedSubs,\r\n      ])\r\n\r\n      let actualChildProps: Record<string, unknown>\r\n\r\n      try {\r\n        actualChildProps = useSyncExternalStore(\r\n          // TODO We're passing through a big wrapper that does a bunch of extra side effects besides subscribing\r\n          subscribeForReact,\r\n          // TODO This is incredibly hacky. We've already processed the store update and calculated new child props,\r\n          // TODO and we're just passing that through so it triggers a re-render for us rather than relying on `uSES`.\r\n          actualChildPropsSelector,\r\n          getServerState\r\n            ? () => childPropsSelector(getServerState(), wrapperProps)\r\n            : actualChildPropsSelector\r\n        )\r\n      } catch (err) {\r\n        if (latestSubscriptionCallbackError.current) {\r\n          ;(\r\n            err as Error\r\n          ).message += `\\nThe error may be correlated with this previous error:\\n${latestSubscriptionCallbackError.current.stack}\\n\\n`\r\n        }\r\n\r\n        throw err\r\n      }\r\n\r\n      useIsomorphicLayoutEffect(() => {\r\n        latestSubscriptionCallbackError.current = undefined\r\n        childPropsFromStoreUpdate.current = undefined\r\n        lastChildProps.current = actualChildProps\r\n      })\r\n\r\n      // Now that all that's done, we can finally try to actually render the child component.\r\n      // We memoize the elements for the rendered child component as an optimization.\r\n      const renderedWrappedComponent = React.useMemo(() => {\r\n        return (\r\n          // @ts-ignore\r\n          <WrappedComponent\r\n            {...actualChildProps}\r\n            ref={reactReduxForwardedRef}\r\n          />\r\n        )\r\n      }, [reactReduxForwardedRef, WrappedComponent, actualChildProps])\r\n\r\n      // If React sees the exact same element reference as last time, it bails out of re-rendering\r\n      // that child, same as if it was wrapped in React.memo() or returned false from shouldComponentUpdate.\r\n      const renderedChild = React.useMemo(() => {\r\n        if (shouldHandleStateChanges) {\r\n          // If this component is subscribed to store updates, we need to pass its own\r\n          // subscription instance down to our descendants. That means rendering the same\r\n          // Context instance, and putting a different value into the context.\r\n          return (\r\n            <ContextToUse.Provider value={overriddenContextValue}>\r\n              {renderedWrappedComponent}\r\n            </ContextToUse.Provider>\r\n          )\r\n        }\r\n\r\n        return renderedWrappedComponent\r\n      }, [ContextToUse, renderedWrappedComponent, overriddenContextValue])\r\n\r\n      return renderedChild\r\n    }\r\n\r\n    const _Connect = React.memo(ConnectFunction)\r\n\r\n    type ConnectedWrapperComponent = typeof _Connect & {\r\n      WrappedComponent: typeof WrappedComponent\r\n    }\r\n\r\n    // Add a hacky cast to get the right output type\r\n    const Connect = _Connect as unknown as ConnectedComponent<\r\n      typeof WrappedComponent,\r\n      WrappedComponentProps\r\n    >\r\n    Connect.WrappedComponent = WrappedComponent\r\n    Connect.displayName = ConnectFunction.displayName = displayName\r\n\r\n    if (forwardRef) {\r\n      const _forwarded = React.forwardRef(function forwardConnectRef(\r\n        props,\r\n        ref\r\n      ) {\r\n        // @ts-ignore\r\n        return <Connect {...props} reactReduxForwardedRef={ref} />\r\n      })\r\n\r\n      const forwarded = _forwarded as ConnectedWrapperComponent\r\n      forwarded.displayName = displayName\r\n      forwarded.WrappedComponent = WrappedComponent\r\n      return /*#__PURE__*/ hoistStatics(forwarded, WrappedComponent)\r\n    }\r\n\r\n    return /*#__PURE__*/ hoistStatics(Connect, WrappedComponent)\r\n  }\r\n\r\n  return wrapWithConnect\r\n}\r\n\r\nexport default connect as Connect\r\n","import type { Context, ReactNode } from 'react'\r\nimport { React } from '../utils/react'\r\nimport type { Action, Store, UnknownAction } from 'redux'\r\nimport type { DevModeCheckFrequency } from '../hooks/useSelector'\r\nimport { createSubscription } from '../utils/Subscription'\r\nimport { useIsomorphicLayoutEffect } from '../utils/useIsomorphicLayoutEffect'\r\nimport type { ReactReduxContextValue } from './Context'\r\nimport { ReactReduxContext } from './Context'\r\n\r\nexport interface ProviderProps<\r\n  A extends Action<string> = UnknownAction,\r\n  S = unknown\r\n> {\r\n  /**\r\n   * The single Redux store in your application.\r\n   */\r\n  store: Store<S, A>\r\n\r\n  /**\r\n   * An optional server state snapshot. Will be used during initial hydration render if available, to ensure that the UI output is consistent with the HTML generated on the server.\r\n   */\r\n  serverState?: S\r\n\r\n  /**\r\n   * Optional context to be used internally in react-redux. Use React.createContext() to create a context to be used.\r\n   * If this is used, you'll need to customize `connect` by supplying the same context provided to the Provider.\r\n   * Set the initial value to null, and the hooks will error\r\n   * if this is not overwritten by Provider.\r\n   */\r\n  context?: Context<ReactReduxContextValue<S, A> | null>\r\n\r\n  /**\r\n   * Determines the frequency of stability checks for all selectors.\r\n   * This setting overrides the global configuration for\r\n   * the `useSelector` stability check, allowing you to specify how often\r\n   * these checks should occur in development mode.\r\n   *\r\n   * @since 8.1.0\r\n   */\r\n  stabilityCheck?: DevModeCheckFrequency\r\n\r\n  /**\r\n   * Determines the frequency of identity function checks for all selectors.\r\n   * This setting overrides the global configuration for\r\n   * the `useSelector` identity function check, allowing you to specify how often\r\n   * these checks should occur in development mode.\r\n   *\r\n   * **Note**: Previously referred to as `noopCheck`.\r\n   *\r\n   * @since 9.0.0\r\n   */\r\n  identityFunctionCheck?: DevModeCheckFrequency\r\n\r\n  children: ReactNode\r\n}\r\n\r\nfunction Provider<A extends Action<string> = UnknownAction, S = unknown>({\r\n  store,\r\n  context,\r\n  children,\r\n  serverState,\r\n  stabilityCheck = 'once',\r\n  identityFunctionCheck = 'once',\r\n}: ProviderProps<A, S>) {\r\n  const contextValue = React.useMemo(() => {\r\n    const subscription = createSubscription(store)\r\n    return {\r\n      store,\r\n      subscription,\r\n      getServerState: serverState ? () => serverState : undefined,\r\n      stabilityCheck,\r\n      identityFunctionCheck,\r\n    }\r\n  }, [store, serverState, stabilityCheck, identityFunctionCheck])\r\n\r\n  const previousState = React.useMemo(() => store.getState(), [store])\r\n\r\n  useIsomorphicLayoutEffect(() => {\r\n    const { subscription } = contextValue\r\n    subscription.onStateChange = subscription.notifyNestedSubs\r\n    subscription.trySubscribe()\r\n\r\n    if (previousState !== store.getState()) {\r\n      subscription.notifyNestedSubs()\r\n    }\r\n    return () => {\r\n      subscription.tryUnsubscribe()\r\n      subscription.onStateChange = undefined\r\n    }\r\n  }, [contextValue, previousState])\r\n\r\n  const Context = context || ReactReduxContext\r\n\r\n  // @ts-ignore 'AnyAction' is assignable to the constraint of type 'A', but 'A' could be instantiated with a different subtype\r\n  return <Context.Provider value={contextValue}>{children}</Context.Provider>\r\n}\r\n\r\nexport default Provider\r\n","import type { Context } from 'react'\r\nimport type { Action as BasicAction, UnknownAction, Store } from 'redux'\r\nimport type { ReactReduxContextValue } from '../components/Context'\r\nimport { ReactReduxContext } from '../components/Context'\r\nimport {\r\n  useReduxContext as useDefaultReduxContext,\r\n  createReduxContextHook,\r\n} from './useReduxContext'\r\n\r\n/**\r\n * Hook factory, which creates a `useStore` hook bound to a given context.\r\n *\r\n * @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.\r\n * @returns {Function} A `useStore` hook bound to the specified context.\r\n */\r\nexport function createStoreHook<\r\n  S = unknown,\r\n  A extends BasicAction = UnknownAction\r\n  // @ts-ignore\r\n>(context?: Context<ReactReduxContextValue<S, A> | null> = ReactReduxContext) {\r\n  const useReduxContext =\r\n    // @ts-ignore\r\n    context === ReactReduxContext\r\n      ? useDefaultReduxContext\r\n      : // @ts-ignore\r\n        createReduxContextHook(context)\r\n  return function useStore<\r\n    State = S,\r\n    Action2 extends BasicAction = A\r\n    // @ts-ignore\r\n  >() {\r\n    const { store } = useReduxContext()\r\n    // @ts-ignore\r\n    return store as Store<State, Action2>\r\n  }\r\n}\r\n\r\n/**\r\n * A hook to access the redux store.\r\n *\r\n * @returns {any} the redux store\r\n *\r\n * @example\r\n *\r\n * import React from 'react'\r\n * import { useStore } from 'react-redux'\r\n *\r\n * export const ExampleComponent = () => {\r\n *   const store = useStore()\r\n *   return <div>{store.getState()}</div>\r\n * }\r\n */\r\nexport const useStore = /*#__PURE__*/ createStoreHook()\r\n","import type { Action, Dispatch, UnknownAction } from 'redux'\r\nimport type { Context } from 'react'\r\n\r\nimport type { ReactReduxContextValue } from '../components/Context'\r\nimport { ReactReduxContext } from '../components/Context'\r\nimport { useStore as useDefaultStore, createStoreHook } from './useStore'\r\n\r\n/**\r\n * Hook factory, which creates a `useDispatch` hook bound to a given context.\r\n *\r\n * @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.\r\n * @returns {Function} A `useDispatch` hook bound to the specified context.\r\n */\r\nexport function createDispatchHook<\r\n  S = unknown,\r\n  A extends Action<string> = UnknownAction\r\n  // @ts-ignore\r\n>(context?: Context<ReactReduxContextValue<S, A> | null> = ReactReduxContext) {\r\n  const useStore =\r\n    // @ts-ignore\r\n    context === ReactReduxContext ? useDefaultStore : createStoreHook(context)\r\n\r\n  return function useDispatch<\r\n    AppDispatch extends Dispatch<A> = Dispatch<A>\r\n  >(): AppDispatch {\r\n    const store = useStore()\r\n    // @ts-ignore\r\n    return store.dispatch\r\n  }\r\n}\r\n\r\n/**\r\n * A hook to access the redux `dispatch` function.\r\n *\r\n * @returns {any|function} redux store's `dispatch` function\r\n *\r\n * @example\r\n *\r\n * import React, { useCallback } from 'react'\r\n * import { useDispatch } from 'react-redux'\r\n *\r\n * export const CounterComponent = ({ value }) => {\r\n *   const dispatch = useDispatch()\r\n *   const increaseCounter = useCallback(() => dispatch({ type: 'increase-counter' }), [])\r\n *   return (\r\n *     <div>\r\n *       <span>{value}</span>\r\n *       <button onClick={increaseCounter}>Increase counter</button>\r\n *     </div>\r\n *   )\r\n * }\r\n */\r\nexport const useDispatch = /*#__PURE__*/ createDispatchHook()\r\n","import Provider from './components/Provider'\r\nimport type { ProviderProps } from './components/Provider'\r\nimport connect from './components/connect'\r\nimport type {\r\n  Connect,\r\n  ConnectProps,\r\n  ConnectedProps,\r\n} from './components/connect'\r\nimport type {\r\n  SelectorFactory,\r\n  Selector,\r\n  MapStateToProps,\r\n  MapStateToPropsFactory,\r\n  MapStateToPropsParam,\r\n  MapDispatchToPropsFunction,\r\n  MapDispatchToProps,\r\n  MapDispatchToPropsFactory,\r\n  MapDispatchToPropsParam,\r\n  MapDispatchToPropsNonObject,\r\n  MergeProps,\r\n} from './connect/selectorFactory'\r\nimport { ReactReduxContext } from './components/Context'\r\nimport type { ReactReduxContextValue } from './components/Context'\r\n\r\nimport { useDispatch, createDispatchHook } from './hooks/useDispatch'\r\nimport { useSelector, createSelectorHook } from './hooks/useSelector'\r\nimport { useStore, createStoreHook } from './hooks/useStore'\r\n\r\nimport shallowEqual from './utils/shallowEqual'\r\nimport type { Subscription } from './utils/Subscription'\r\nimport { defaultNoopBatch } from './utils/batch'\r\n\r\nexport * from './types'\r\nexport type {\r\n  ProviderProps,\r\n  SelectorFactory,\r\n  Selector,\r\n  MapStateToProps,\r\n  MapStateToPropsFactory,\r\n  MapStateToPropsParam,\r\n  Connect,\r\n  ConnectProps,\r\n  ConnectedProps,\r\n  MapDispatchToPropsFunction,\r\n  MapDispatchToProps,\r\n  MapDispatchToPropsFactory,\r\n  MapDispatchToPropsParam,\r\n  MapDispatchToPropsNonObject,\r\n  MergeProps,\r\n  ReactReduxContextValue,\r\n  Subscription,\r\n}\r\n\r\n/**\r\n * @deprecated As of React 18, batching is enabled by default for ReactDOM and React Native.\r\n * This is now a no-op that immediately runs the callback.\r\n */\r\nconst batch = defaultNoopBatch\r\n\r\nexport {\r\n  Provider,\r\n  ReactReduxContext,\r\n  connect,\r\n  useDispatch,\r\n  createDispatchHook,\r\n  useSelector,\r\n  createSelectorHook,\r\n  useStore,\r\n  createStoreHook,\r\n  shallowEqual,\r\n  batch,\r\n}\r\n"],"mappings":"0kBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,cAAAE,GAAA,sBAAAC,EAAA,UAAAC,GAAA,YAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,oBAAAC,EAAA,iBAAAC,EAAA,gBAAAC,GAAA,gBAAAC,GAAA,aAAAC,IAAA,eAAAC,GAAAb,IAKA,IAAAc,GAAuB,qBACvBC,GAAiD,oDCNjD,IAAAC,EAA+B,qBAGlBC,EAGX,YAAaD,EAA8B,UAAaA,ECS1D,IAAME,GAAa,OAAO,IAAI,qBAAqB,EAC7CC,GAMJ,OAAO,WAAe,IAClB,WAC2F,CAAC,EAGlG,SAASC,IAAqD,CAC5D,GAAI,CAACC,EAAM,cAAe,MAAO,CAAC,EAElC,IAAMC,EAAcH,GAAAD,MAAAC,GAAAD,IAAmB,IAAI,KAIvCK,EAAcD,EAAW,IAAID,EAAM,aAAa,EACpD,OAAKE,IACHA,EAAcF,EAAM,cAClB,IACF,EAIAC,EAAW,IAAID,EAAM,cAAeE,CAAW,GAE1CA,CACT,CAEO,IAAMC,EAAkCJ,GAAW,EC5CnD,IAAMK,EAAiB,IAAM,CAClC,MAAM,IAAI,MAAM,uBAAuB,CACzC,ECMO,SAASC,EAAuBC,EAAUC,EAAmB,CAClE,OAAO,UAAmD,CASxD,OARqBC,EAAM,WAAWF,CAAO,CAS/C,CACF,CAkBO,IAAMG,EAAgCJ,EAAuB,ECsCpE,IAAIK,GAAmCC,EAC1BC,GAAyBC,GAAe,CACnDH,GAAmCG,CACrC,EAEMC,GAA+B,CAACC,EAAGC,IAAMD,IAAMC,EAQ9C,SAASC,GACdC,EAGYC,EAC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AAIF,EACzB,OAAAE,EAAa,cAAgBA,EAAa,iBAC1CA,EAAa,aAAa,EAEtBE,IAAkBV,EAAM,SAAS,GACnCQ,EAAa,iBAAiB,EAEzB,IAAM,CACXA,EAAa,eAAe,EAC5BA,EAAa,cAAgB,MAC/B,CACF,EAAG,CAACF,EAAcI,CAAa,CAAC,EAKzBH,EAAA,eAHSN,GAAWW,GAGX,SAAR,CAAiB,MAAON,GAAeJ,CAAS,CAC1D,CAEA,IAAOW,GAAQd,GClFR,SAASe,EAIdC,EAAyDC,EAAmB,CAC5E,IAAMC,EAEJF,IAAYC,EACRC,EAEAC,EAAuBH,CAAO,EACpC,OAAO,UAIH,CACF,GAAM,CAAE,MAAAI,CAAM,EAAIF,EAAgB,EAElC,OAAOE,CACT,CACF,CAiBO,IAAMC,EAAyBN,EAAgB,ECvC/C,SAASO,GAIdC,EAAyDC,EAAmB,CAC5E,IAAMC,EAEJF,IAAYC,EAAoBC,EAAkBC,EAAgBH,CAAO,EAE3E,OAAO,UAEU,CAGf,OAFcE,EAAS,EAEV,QACf,CACF,CAuBO,IAAME,GAA4BL,GAAmB,ECK5D,IAAMM,GAAQC,EvB9CdC,GAAsB,mCAAgC,EACtDC,GAAwB,uBAAoB","names":["src_exports","__export","Provider_default","ReactReduxContext","batch","connect_default","createDispatchHook","createSelectorHook","createStoreHook","shallowEqual","useDispatch","useSelector","useStore","__toCommonJS","React","import_with_selector","ReactOriginal","React","ContextKey","gT","getContext","React","contextMap","realContext","ReactReduxContext","notInitialized","createReduxContextHook","context","ReactReduxContext","React","useReduxContext","useSyncExternalStoreWithSelector","notInitialized","initializeUseSelector","fn","refEquality","a","b","createSelectorHook","context","ReactReduxContext","useReduxContext","createReduxContextHook","selector","equalityFnOrOptions","equalityFn","devModeChecks","store","subscription","getServerState","stabilityCheck","identityFunctionCheck","firstRun","React","wrappedSelector","state","selected","finalStabilityCheck","toCompare","e","finalIdentityFunctionCheck","selectedState","useSelector","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_SERVER_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_OFFSCREEN_TYPE","REACT_CLIENT_REFERENCE","ForwardRef","Memo","typeOf","object","$$typeof","REACT_ELEMENT_TYPE","type","REACT_FRAGMENT_TYPE","REACT_PROFILER_TYPE","REACT_STRICT_MODE_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","$$typeofType","REACT_SERVER_CONTEXT_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_LAZY_TYPE","REACT_MEMO_TYPE","REACT_PROVIDER_TYPE","REACT_PORTAL_TYPE","isMemo","object","typeOf","REACT_MEMO_TYPE","pureFinalPropsSelectorFactory","mapStateToProps","mapDispatchToProps","mergeProps","dispatch","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","hasRunAtLeastOnce","state","ownProps","stateProps","dispatchProps","mergedProps","handleFirstCall","firstState","firstOwnProps","handleNewPropsAndNewState","handleNewProps","handleNewState","nextStateProps","statePropsChanged","handleSubsequentCalls","nextState","nextOwnProps","propsChanged","stateChanged","finalPropsSelectorFactory","initMapStateToProps","initMapDispatchToProps","initMergeProps","options","bindActionCreators","actionCreators","dispatch","boundActionCreators","key","actionCreator","args","wrapMapToPropsConstant","getConstant","dispatch","constant","constantSelector","getDependsOnOwnProps","mapToProps","wrapMapToPropsFunc","methodName","displayName","proxy","stateOrDispatch","ownProps","props","createInvalidArgFactory","arg","name","dispatch","options","mapDispatchToPropsFactory","mapDispatchToProps","wrapMapToPropsConstant","dispatch","bindActionCreators","wrapMapToPropsFunc","createInvalidArgFactory","mapStateToPropsFactory","mapStateToProps","wrapMapToPropsFunc","createInvalidArgFactory","wrapMapToPropsConstant","defaultMergeProps","stateProps","dispatchProps","ownProps","wrapMergePropsFunc","mergeProps","dispatch","displayName","areMergedPropsEqual","hasRunOnce","mergedProps","nextMergedProps","mergePropsFactory","createInvalidArgFactory","defaultNoopBatch","callback","createListenerCollection","first","last","defaultNoopBatch","listener","listeners","callback","isSubscribed","nullListeners","createSubscription","store","parentSub","unsubscribe","subscriptionsAmount","selfSubscribed","addNestedSub","trySubscribe","cleanupListener","removed","tryUnsubscribe","notifyNestedSubs","handleChangeWrapper","subscription","trySubscribeSelf","tryUnsubscribeSelf","canUseDOM","useIsomorphicLayoutEffect","React","is","x","y","shallowEqual","objA","objB","keysA","keysB","i","REACT_STATICS","KNOWN_STATICS","FORWARD_REF_STATICS","MEMO_STATICS","TYPE_STATICS","ForwardRef","Memo","getStatics","component","isMemo","defineProperty","getOwnPropertyNames","getOwnPropertySymbols","getOwnPropertyDescriptor","getPrototypeOf","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","inheritedComponent","keys","targetStatics","sourceStatics","i","key","descriptor","useSyncExternalStore","notInitialized","initializeConnect","fn","NO_SUBSCRIPTION_ARRAY","useIsomorphicLayoutEffectWithArgs","effectFunc","effectArgs","dependencies","useIsomorphicLayoutEffect","captureWrapperProps","lastWrapperProps","lastChildProps","renderIsScheduled","wrapperProps","childPropsFromStoreUpdate","notifyNestedSubs","subscribeUpdates","shouldHandleStateChanges","store","subscription","childPropsSelector","isMounted","additionalSubscribeListener","didUnsubscribe","lastThrownError","checkForUpdates","latestStoreState","newChildProps","error","e","strictEqual","a","b","connect","mapStateToProps","mapDispatchToProps","mergeProps","pure","areStatesEqual","strictEqual","areOwnPropsEqual","shallowEqual","areStatePropsEqual","areMergedPropsEqual","forwardRef","context","ReactReduxContext","Context","initMapStateToProps","mapStateToPropsFactory","initMapDispatchToProps","mapDispatchToPropsFactory","initMergeProps","mergePropsFactory","shouldHandleStateChanges","WrappedComponent","wrappedComponentName","displayName","selectorFactoryOptions","ConnectFunction","props","propsContext","reactReduxForwardedRef","wrapperProps","React","ContextToUse","ResultContext","contextValue","didStoreComeFromProps","didStoreComeFromContext","store","getServerState","childPropsSelector","finalPropsSelectorFactory","subscription","notifyNestedSubs","NO_SUBSCRIPTION_ARRAY","createSubscription","overriddenContextValue","lastChildProps","lastWrapperProps","childPropsFromStoreUpdate","renderIsScheduled","isProcessingDispatch","isMounted","latestSubscriptionCallbackError","useIsomorphicLayoutEffect","actualChildPropsSelector","subscribeForReact","reactListener","subscribeUpdates","useIsomorphicLayoutEffectWithArgs","captureWrapperProps","actualChildProps","useSyncExternalStore","err","renderedWrappedComponent","Connect","forwarded","ref","hoistNonReactStatics","connect_default","Provider","store","context","children","serverState","stabilityCheck","identityFunctionCheck","contextValue","React","subscription","createSubscription","previousState","useIsomorphicLayoutEffect","ReactReduxContext","Provider_default","createStoreHook","context","ReactReduxContext","useReduxContext","createReduxContextHook","store","useStore","createDispatchHook","context","ReactReduxContext","useStore","createStoreHook","useDispatch","batch","defaultNoopBatch","initializeUseSelector","initializeConnect"]}