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,CAACi4B,UAAU,SAAC0mC,EAAA,EAAe,IAAI,UACpC,SAAC,KAAQ,CAACl5F,MAAOA,EAAM,UACnB,SAAC,EAAG,SAShBm5F","sources":["../node_modules/@reduxjs/toolkit/src/query/react/useSerializedStableValue.ts","../node_modules/@reduxjs/toolkit/src/query/react/constants.ts","../node_modules/@reduxjs/toolkit/src/query/react/useShallowStableValue.ts","../node_modules/@reduxjs/toolkit/src/query/defaultSerializeQueryArgs.ts","../node_modules/@reduxjs/toolkit/src/query/endpointDefinitions.ts","../node_modules/@reduxjs/toolkit/src/query/react/buildHooks.ts","../node_modules/@reduxjs/toolkit/src/query/utils/capitalize.ts","../node_modules/@reduxjs/toolkit/src/query/tsHelpers.ts","../node_modules/@reduxjs/toolkit/src/query/react/module.ts","../node_modules/@reduxjs/toolkit/src/query/react/index.ts","app/apiSlice.js","containers/SuspenseContent.js","features/common/headerSlice.js","features/common/modalSlice.js","features/common/rightDrawerSlice.js","features/integration/integrationSlice.js","features/leads/leadSlice.js","../node_modules/@reduxjs/toolkit/src/query/core/apiState.ts","../node_modules/@reduxjs/toolkit/src/query/utils/joinUrls.ts","../node_modules/@reduxjs/toolkit/src/query/utils/isAbsoluteUrl.ts","../node_modules/@reduxjs/toolkit/src/query/utils/flatten.ts","../node_modules/@reduxjs/toolkit/src/query/utils/copyWithStructuralSharing.ts","../node_modules/@reduxjs/toolkit/src/query/fetchBaseQuery.ts","../node_modules/@reduxjs/toolkit/src/query/HandledError.ts","../node_modules/@reduxjs/toolkit/src/query/retry.ts","../node_modules/@reduxjs/toolkit/src/query/core/setupListeners.ts","../node_modules/@reduxjs/toolkit/src/query/utils/isNotNullish.ts","../node_modules/@reduxjs/toolkit/src/query/core/buildInitiate.ts","../node_modules/@reduxjs/toolkit/src/query/core/buildThunks.ts","../node_modules/@reduxjs/toolkit/src/query/core/buildSlice.ts","../node_modules/@reduxjs/toolkit/src/query/utils/isOnline.ts","../node_modules/@reduxjs/toolkit/src/query/utils/isDocumentVisible.ts","../node_modules/@reduxjs/toolkit/src/query/core/buildSelectors.ts","../node_modules/@reduxjs/toolkit/src/query/createApi.ts","../node_modules/@reduxjs/toolkit/src/query/core/buildMiddleware/cacheCollection.ts","../node_modules/@reduxjs/toolkit/src/query/core/buildMiddleware/batchActions.ts","../node_modules/@reduxjs/toolkit/src/query/core/buildMiddleware/invalidationByTags.ts","../node_modules/@reduxjs/toolkit/src/query/core/buildMiddleware/polling.ts","../node_modules/@reduxjs/toolkit/src/query/core/buildMiddleware/cacheLifecycle.ts","../node_modules/@reduxjs/toolkit/src/query/core/buildMiddleware/queryLifecycle.ts","../node_modules/@reduxjs/toolkit/src/query/core/buildMiddleware/devMiddleware.ts","../node_modules/@reduxjs/toolkit/src/query/core/buildMiddleware/index.ts","../node_modules/@reduxjs/toolkit/src/query/core/buildMiddleware/windowEventHandling.ts","../node_modules/@reduxjs/toolkit/src/query/core/module.ts","../node_modules/@reduxjs/toolkit/src/query/core/index.ts","../node_modules/redux-thunk/es/index.js","../node_modules/@reduxjs/toolkit/src/devtoolsExtension.ts","../node_modules/@reduxjs/toolkit/src/isPlainObject.ts","../node_modules/@reduxjs/toolkit/src/utils.ts","../node_modules/@reduxjs/toolkit/src/getDefaultMiddleware.ts","../node_modules/@reduxjs/toolkit/src/configureStore.ts","../node_modules/@reduxjs/toolkit/src/createAction.ts","../node_modules/@reduxjs/toolkit/src/mapBuilders.ts","../node_modules/@reduxjs/toolkit/src/createSlice.ts","../node_modules/@reduxjs/toolkit/src/createReducer.ts","../node_modules/@reduxjs/toolkit/src/nanoid.ts","../node_modules/@reduxjs/toolkit/src/createAsyncThunk.ts","../node_modules/@reduxjs/toolkit/src/tsHelpers.ts","../node_modules/@reduxjs/toolkit/src/matchers.ts","../node_modules/@reduxjs/toolkit/src/listenerMiddleware/index.ts","../node_modules/@reduxjs/toolkit/src/listenerMiddleware/utils.ts","../node_modules/@reduxjs/toolkit/src/autoBatchEnhancer.ts","../node_modules/@reduxjs/toolkit/src/index.ts","../node_modules/@babel/runtime/helpers/esm/construct.js","../node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","../node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","../node_modules/@remix-run/router/history.ts","../node_modules/@remix-run/router/utils.ts","../node_modules/@remix-run/router/router.ts","../node_modules/axios/node_modules/form-data/lib/browser.js","../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js","../node_modules/hoist-non-react-statics/node_modules/react-is/index.js","../node_modules/react-dom/cjs/react-dom.production.min.js","../node_modules/react-dom/client.js","../node_modules/react-dom/index.js","../node_modules/react-redux/es/utils/batch.js","../node_modules/react-redux/es/components/Context.js","../node_modules/react-redux/es/hooks/useReduxContext.js","../node_modules/react-redux/es/utils/useSyncExternalStore.js","../node_modules/react-redux/es/hooks/useSelector.js","../node_modules/react-redux/es/utils/Subscription.js","../node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js","../node_modules/react-redux/es/components/Provider.js","../node_modules/react-redux/es/hooks/useStore.js","../node_modules/react-redux/es/hooks/useDispatch.js","../node_modules/react-redux/es/utils/shallowEqual.js","../node_modules/react-redux/es/index.js","../node_modules/react-redux/es/components/connect.js","../node_modules/react-redux/node_modules/react-is/cjs/react-is.production.min.js","../node_modules/react-redux/node_modules/react-is/index.js","../node_modules/react-router-dom/index.tsx","../node_modules/react-router-dom/dom.ts","../node_modules/react-router/lib/use-sync-external-store-shim/useSyncExternalStoreShimClient.ts","../node_modules/react-router/lib/use-sync-external-store-shim/index.ts","../node_modules/react-router/lib/context.ts","../node_modules/react-router/lib/hooks.tsx","../node_modules/react-router/lib/components.tsx","../node_modules/react/cjs/react-jsx-runtime.production.min.js","../node_modules/react/cjs/react.production.min.js","../node_modules/react/index.js","../node_modules/react/jsx-runtime.js","../node_modules/redux/es/redux.js","../node_modules/reselect/es/defaultMemoize.js","../node_modules/reselect/es/index.js","../node_modules/scheduler/cjs/scheduler.production.min.js","../node_modules/scheduler/index.js","../node_modules/theme-change/index.js","../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js","../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js","../node_modules/use-sync-external-store/shim/index.js","../node_modules/use-sync-external-store/shim/with-selector.js","../node_modules/@babel/runtime/helpers/arrayLikeToArray.js","../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","../node_modules/@babel/runtime/helpers/iterableToArray.js","../node_modules/@babel/runtime/helpers/nonIterableSpread.js","../node_modules/@babel/runtime/helpers/toConsumableArray.js","../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","../node_modules/@babel/runtime/helpers/esm/classCallCheck.js","../node_modules/@babel/runtime/helpers/esm/createClass.js","../node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","../node_modules/@babel/runtime/helpers/esm/createSuper.js","../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","../node_modules/@babel/runtime/helpers/esm/inherits.js","../node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","../node_modules/@babel/runtime/helpers/esm/objectSpread2.js","../node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js","../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../node_modules/@babel/runtime/helpers/esm/slicedToArray.js","../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../node_modules/@babel/runtime/helpers/esm/typeof.js","../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../node_modules/axios/lib/helpers/bind.js","../node_modules/axios/lib/utils.js","../node_modules/axios/lib/core/AxiosError.js","../node_modules/axios/lib/env/classes/FormData.js","../node_modules/axios/lib/helpers/toFormData.js","../node_modules/axios/lib/helpers/AxiosURLSearchParams.js","../node_modules/axios/lib/helpers/buildURL.js","../node_modules/axios/lib/core/InterceptorManager.js","../node_modules/axios/lib/defaults/transitional.js","../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","../node_modules/axios/lib/platform/browser/classes/FormData.js","../node_modules/axios/lib/platform/browser/index.js","../node_modules/axios/lib/helpers/formDataToJSON.js","../node_modules/axios/lib/helpers/cookies.js","../node_modules/axios/lib/core/buildFullPath.js","../node_modules/axios/lib/helpers/isAbsoluteURL.js","../node_modules/axios/lib/helpers/combineURLs.js","../node_modules/axios/lib/helpers/isURLSameOrigin.js","../node_modules/axios/lib/cancel/CanceledError.js","../node_modules/axios/lib/helpers/parseHeaders.js","../node_modules/axios/lib/core/AxiosHeaders.js","../node_modules/axios/lib/helpers/speedometer.js","../node_modules/axios/lib/adapters/xhr.js","../node_modules/axios/lib/core/settle.js","../node_modules/axios/lib/helpers/parseProtocol.js","../node_modules/axios/lib/adapters/index.js","../node_modules/axios/lib/defaults/index.js","../node_modules/axios/lib/helpers/toURLEncodedForm.js","../node_modules/axios/lib/core/transformData.js","../node_modules/axios/lib/cancel/isCancel.js","../node_modules/axios/lib/core/dispatchRequest.js","../node_modules/axios/lib/core/mergeConfig.js","../node_modules/axios/lib/env/data.js","../node_modules/axios/lib/helpers/validator.js","../node_modules/axios/lib/core/Axios.js","../node_modules/axios/lib/cancel/CancelToken.js","../node_modules/axios/lib/axios.js","../node_modules/axios/lib/helpers/spread.js","../node_modules/axios/lib/helpers/isAxiosError.js","../node_modules/axios/index.js","../node_modules/immer/src/utils/errors.ts","../node_modules/immer/src/utils/common.ts","../node_modules/immer/src/utils/plugins.ts","../node_modules/immer/src/core/scope.ts","../node_modules/immer/src/core/finalize.ts","../node_modules/immer/src/core/proxy.ts","../node_modules/immer/src/core/immerClass.ts","../node_modules/immer/src/core/current.ts","../node_modules/immer/src/plugins/es5.ts","../node_modules/immer/src/plugins/patches.ts","../node_modules/immer/src/immer.ts","../node_modules/immer/src/utils/env.ts","../webpack/bootstrap","../webpack/runtime/compat get default export","../webpack/runtime/create fake namespace object","../webpack/runtime/define property getters","../webpack/runtime/ensure chunk","../webpack/runtime/get javascript chunk filename","../webpack/runtime/get mini-css chunk filename","../webpack/runtime/global","../webpack/runtime/hasOwnProperty shorthand","../webpack/runtime/load script","../webpack/runtime/make namespace object","../webpack/runtime/node module decorator","../webpack/runtime/publicPath","../webpack/runtime/css loading","../webpack/runtime/jsonp chunk loading","app/auth.js","app/init.js","features/integration/AnswersGrid.js","features/integration/TestResults.js","features/integration/DisplayTestResults.js","pages/protected/TestResultsPage.js","App.js","reportWebVitals.js","app/store.js","index.js"],"sourcesContent":["import { useEffect, useRef, useMemo } from 'react'\r\nimport type { SerializeQueryArgs } from '@reduxjs/toolkit/dist/query/defaultSerializeQueryArgs'\r\nimport type { EndpointDefinition } from '@reduxjs/toolkit/dist/query/endpointDefinitions'\r\n\r\nexport function useStableQueryArgs(\r\n queryArgs: T,\r\n serialize: SerializeQueryArgs,\r\n endpointDefinition: EndpointDefinition,\r\n endpointName: string\r\n) {\r\n const incoming = useMemo(\r\n () => ({\r\n queryArgs,\r\n serialized:\r\n typeof queryArgs == 'object'\r\n ? serialize({ queryArgs, endpointDefinition, endpointName })\r\n : queryArgs,\r\n }),\r\n [queryArgs, serialize, endpointDefinition, endpointName]\r\n )\r\n const cache = useRef(incoming)\r\n useEffect(() => {\r\n if (cache.current.serialized !== incoming.serialized) {\r\n cache.current = incoming\r\n }\r\n }, [incoming])\r\n\r\n return cache.current.serialized === incoming.serialized\r\n ? cache.current.queryArgs\r\n : queryArgs\r\n}\r\n","export const UNINITIALIZED_VALUE = Symbol()\r\nexport type UninitializedValue = typeof UNINITIALIZED_VALUE\r\n","import { useEffect, useRef } from 'react'\r\nimport { shallowEqual } from 'react-redux'\r\n\r\nexport function useShallowStableValue(value: T) {\r\n const cache = useRef(value)\r\n useEffect(() => {\r\n if (!shallowEqual(cache.current, value)) {\r\n cache.current = value\r\n }\r\n }, [value])\r\n\r\n return shallowEqual(cache.current, value) ? cache.current : value\r\n}\r\n","import type { QueryCacheKey } from './core/apiState'\r\nimport type { EndpointDefinition } from './endpointDefinitions'\r\nimport { isPlainObject } from '@reduxjs/toolkit'\r\n\r\nexport const defaultSerializeQueryArgs: SerializeQueryArgs = ({\r\n endpointName,\r\n queryArgs,\r\n}) => {\r\n // Sort the object keys before stringifying, to prevent useQuery({ a: 1, b: 2 }) having a different cache key than useQuery({ b: 2, a: 1 })\r\n return `${endpointName}(${JSON.stringify(queryArgs, (key, value) =>\r\n isPlainObject(value)\r\n ? Object.keys(value)\r\n .sort()\r\n .reduce((acc, key) => {\r\n acc[key] = (value as any)[key]\r\n return acc\r\n }, {})\r\n : value\r\n )})`\r\n}\r\n\r\nexport type SerializeQueryArgs = (_: {\r\n queryArgs: QueryArgs\r\n endpointDefinition: EndpointDefinition\r\n endpointName: string\r\n}) => ReturnType\r\n\r\nexport type InternalSerializeQueryArgs = (_: {\r\n queryArgs: any\r\n endpointDefinition: EndpointDefinition\r\n endpointName: string\r\n}) => QueryCacheKey\r\n","import type { AnyAction, ThunkDispatch } from '@reduxjs/toolkit'\r\nimport { SerializeQueryArgs } from './defaultSerializeQueryArgs'\r\nimport type { QuerySubState, RootState } from './core/apiState'\r\nimport type {\r\n BaseQueryExtraOptions,\r\n BaseQueryFn,\r\n BaseQueryResult,\r\n BaseQueryArg,\r\n BaseQueryApi,\r\n QueryReturnValue,\r\n BaseQueryError,\r\n BaseQueryMeta,\r\n} from './baseQueryTypes'\r\nimport type {\r\n HasRequiredProps,\r\n MaybePromise,\r\n OmitFromUnion,\r\n CastAny,\r\n} from './tsHelpers'\r\nimport type { NEVER } from './fakeBaseQuery'\r\n\r\nconst resultType = /* @__PURE__ */ Symbol()\r\nconst baseQuery = /* @__PURE__ */ Symbol()\r\n\r\ninterface EndpointDefinitionWithQuery<\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n ResultType\r\n> {\r\n /**\r\n * `query` can be a function that returns either a `string` or an `object` which is passed to your `baseQuery`. If you are using [fetchBaseQuery](./fetchBaseQuery), this can return either a `string` or an `object` of properties in `FetchArgs`. If you use your own custom [`baseQuery`](../../rtk-query/usage/customizing-queries), you can customize this behavior to your liking.\r\n *\r\n * @example\r\n *\r\n * ```ts\r\n * // codeblock-meta title=\"query example\"\r\n *\r\n * import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react'\r\n * interface Post {\r\n * id: number\r\n * name: string\r\n * }\r\n * type PostsResponse = Post[]\r\n *\r\n * const api = createApi({\r\n * baseQuery: fetchBaseQuery({ baseUrl: '/' }),\r\n * tagTypes: ['Post'],\r\n * endpoints: (build) => ({\r\n * getPosts: build.query({\r\n * // highlight-start\r\n * query: () => 'posts',\r\n * // highlight-end\r\n * }),\r\n * addPost: build.mutation>({\r\n * // highlight-start\r\n * query: (body) => ({\r\n * url: `posts`,\r\n * method: 'POST',\r\n * body,\r\n * }),\r\n * // highlight-end\r\n * invalidatesTags: [{ type: 'Post', id: 'LIST' }],\r\n * }),\r\n * })\r\n * })\r\n * ```\r\n */\r\n query(arg: QueryArg): BaseQueryArg\r\n queryFn?: never\r\n /**\r\n * A function to manipulate the data returned by a query or mutation.\r\n */\r\n transformResponse?(\r\n baseQueryReturnValue: BaseQueryResult,\r\n meta: BaseQueryMeta,\r\n arg: QueryArg\r\n ): ResultType | Promise\r\n /**\r\n * A function to manipulate the data returned by a failed query or mutation.\r\n */\r\n transformErrorResponse?(\r\n baseQueryReturnValue: BaseQueryError,\r\n meta: BaseQueryMeta,\r\n arg: QueryArg\r\n ): unknown\r\n /**\r\n * Defaults to `true`.\r\n *\r\n * Most apps should leave this setting on. The only time it can be a performance issue\r\n * is if an API returns extremely large amounts of data (e.g. 10,000 rows per request) and\r\n * you're unable to paginate it.\r\n *\r\n * For details of how this works, please see the below. When it is set to `false`,\r\n * every request will cause subscribed components to rerender, even when the data has not changed.\r\n *\r\n * @see https://redux-toolkit.js.org/api/other-exports#copywithstructuralsharing\r\n */\r\n structuralSharing?: boolean\r\n}\r\n\r\ninterface EndpointDefinitionWithQueryFn<\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n ResultType\r\n> {\r\n /**\r\n * Can be used in place of `query` as an inline function that bypasses `baseQuery` completely for the endpoint.\r\n *\r\n * @example\r\n * ```ts\r\n * // codeblock-meta title=\"Basic queryFn example\"\r\n *\r\n * import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react'\r\n * interface Post {\r\n * id: number\r\n * name: string\r\n * }\r\n * type PostsResponse = Post[]\r\n *\r\n * const api = createApi({\r\n * baseQuery: fetchBaseQuery({ baseUrl: '/' }),\r\n * endpoints: (build) => ({\r\n * getPosts: build.query({\r\n * query: () => 'posts',\r\n * }),\r\n * flipCoin: build.query<'heads' | 'tails', void>({\r\n * // highlight-start\r\n * queryFn(arg, queryApi, extraOptions, baseQuery) {\r\n * const randomVal = Math.random()\r\n * if (randomVal < 0.45) {\r\n * return { data: 'heads' }\r\n * }\r\n * if (randomVal < 0.9) {\r\n * return { data: 'tails' }\r\n * }\r\n * return { error: { status: 500, statusText: 'Internal Server Error', data: \"Coin landed on it's edge!\" } }\r\n * }\r\n * // highlight-end\r\n * })\r\n * })\r\n * })\r\n * ```\r\n */\r\n queryFn(\r\n arg: QueryArg,\r\n api: BaseQueryApi,\r\n extraOptions: BaseQueryExtraOptions,\r\n baseQuery: (arg: Parameters[0]) => ReturnType\r\n ): MaybePromise>>\r\n query?: never\r\n transformResponse?: never\r\n transformErrorResponse?: never\r\n /**\r\n * Defaults to `true`.\r\n *\r\n * Most apps should leave this setting on. The only time it can be a performance issue\r\n * is if an API returns extremely large amounts of data (e.g. 10,000 rows per request) and\r\n * you're unable to paginate it.\r\n *\r\n * For details of how this works, please see the below. When it is set to `false`,\r\n * every request will cause subscribed components to rerender, even when the data has not changed.\r\n *\r\n * @see https://redux-toolkit.js.org/api/other-exports#copywithstructuralsharing\r\n */\r\n structuralSharing?: boolean\r\n}\r\n\r\nexport interface BaseEndpointTypes<\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n ResultType\r\n> {\r\n QueryArg: QueryArg\r\n BaseQuery: BaseQuery\r\n ResultType: ResultType\r\n}\r\n\r\nexport type BaseEndpointDefinition<\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n ResultType\r\n> = (\r\n | ([CastAny, {}>] extends [NEVER]\r\n ? never\r\n : EndpointDefinitionWithQuery)\r\n | EndpointDefinitionWithQueryFn\r\n) & {\r\n /* phantom type */\r\n [resultType]?: ResultType\r\n /* phantom type */\r\n [baseQuery]?: BaseQuery\r\n} & HasRequiredProps<\r\n BaseQueryExtraOptions,\r\n { extraOptions: BaseQueryExtraOptions },\r\n { extraOptions?: BaseQueryExtraOptions }\r\n >\r\n\r\nexport enum DefinitionType {\r\n query = 'query',\r\n mutation = 'mutation',\r\n}\r\n\r\nexport type GetResultDescriptionFn<\r\n TagTypes extends string,\r\n ResultType,\r\n QueryArg,\r\n ErrorType,\r\n MetaType\r\n> = (\r\n result: ResultType | undefined,\r\n error: ErrorType | undefined,\r\n arg: QueryArg,\r\n meta: MetaType\r\n) => ReadonlyArray>\r\n\r\nexport type FullTagDescription = {\r\n type: TagType\r\n id?: number | string\r\n}\r\nexport type TagDescription = TagType | FullTagDescription\r\nexport type ResultDescription<\r\n TagTypes extends string,\r\n ResultType,\r\n QueryArg,\r\n ErrorType,\r\n MetaType\r\n> =\r\n | ReadonlyArray>\r\n | GetResultDescriptionFn\r\n\r\n/** @deprecated please use `onQueryStarted` instead */\r\nexport interface QueryApi {\r\n /** @deprecated please use `onQueryStarted` instead */\r\n dispatch: ThunkDispatch\r\n /** @deprecated please use `onQueryStarted` instead */\r\n getState(): RootState\r\n /** @deprecated please use `onQueryStarted` instead */\r\n extra: unknown\r\n /** @deprecated please use `onQueryStarted` instead */\r\n requestId: string\r\n /** @deprecated please use `onQueryStarted` instead */\r\n context: Context\r\n}\r\n\r\nexport interface QueryTypes<\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n TagTypes extends string,\r\n ResultType,\r\n ReducerPath extends string = string\r\n> extends BaseEndpointTypes {\r\n /**\r\n * The endpoint definition type. To be used with some internal generic types.\r\n * @example\r\n * ```ts\r\n * const useMyWrappedHook: UseQuery = ...\r\n * ```\r\n */\r\n QueryDefinition: QueryDefinition<\r\n QueryArg,\r\n BaseQuery,\r\n TagTypes,\r\n ResultType,\r\n ReducerPath\r\n >\r\n TagTypes: TagTypes\r\n ReducerPath: ReducerPath\r\n}\r\n\r\nexport interface QueryExtraOptions<\r\n TagTypes extends string,\r\n ResultType,\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n ReducerPath extends string = string\r\n> {\r\n type: DefinitionType.query\r\n /**\r\n * Used by `query` endpoints. Determines which 'tag' is attached to the cached data returned by the query.\r\n * Expects an array of tag type strings, an array of objects of tag types with ids, or a function that returns such an array.\r\n * 1. `['Post']` - equivalent to `2`\r\n * 2. `[{ type: 'Post' }]` - equivalent to `1`\r\n * 3. `[{ type: 'Post', id: 1 }]`\r\n * 4. `(result, error, arg) => ['Post']` - equivalent to `5`\r\n * 5. `(result, error, arg) => [{ type: 'Post' }]` - equivalent to `4`\r\n * 6. `(result, error, arg) => [{ type: 'Post', id: 1 }]`\r\n *\r\n * @example\r\n *\r\n * ```ts\r\n * // codeblock-meta title=\"providesTags example\"\r\n *\r\n * import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react'\r\n * interface Post {\r\n * id: number\r\n * name: string\r\n * }\r\n * type PostsResponse = Post[]\r\n *\r\n * const api = createApi({\r\n * baseQuery: fetchBaseQuery({ baseUrl: '/' }),\r\n * tagTypes: ['Posts'],\r\n * endpoints: (build) => ({\r\n * getPosts: build.query({\r\n * query: () => 'posts',\r\n * // highlight-start\r\n * providesTags: (result) =>\r\n * result\r\n * ? [\r\n * ...result.map(({ id }) => ({ type: 'Posts' as const, id })),\r\n * { type: 'Posts', id: 'LIST' },\r\n * ]\r\n * : [{ type: 'Posts', id: 'LIST' }],\r\n * // highlight-end\r\n * })\r\n * })\r\n * })\r\n * ```\r\n */\r\n providesTags?: ResultDescription<\r\n TagTypes,\r\n ResultType,\r\n QueryArg,\r\n BaseQueryError,\r\n BaseQueryMeta\r\n >\r\n /**\r\n * Not to be used. A query should not invalidate tags in the cache.\r\n */\r\n invalidatesTags?: never\r\n\r\n /**\r\n * Can be provided to return a custom cache key value based on the query arguments.\r\n *\r\n * This is primarily intended for cases where a non-serializable value is passed as part of the query arg object and should be excluded from the cache key. It may also be used for cases where an endpoint should only have a single cache entry, such as an infinite loading / pagination implementation.\r\n *\r\n * Unlike the `createApi` version which can _only_ return a string, this per-endpoint option can also return an an object, number, or boolean. If it returns a string, that value will be used as the cache key directly. If it returns an object / number / boolean, that value will be passed to the built-in `defaultSerializeQueryArgs`. This simplifies the use case of stripping out args you don't want included in the cache key.\r\n *\r\n *\r\n * @example\r\n *\r\n * ```ts\r\n * // codeblock-meta title=\"serializeQueryArgs : exclude value\"\r\n *\r\n * import { createApi, fetchBaseQuery, defaultSerializeQueryArgs } from '@reduxjs/toolkit/query/react'\r\n * interface Post {\r\n * id: number\r\n * name: string\r\n * }\r\n *\r\n * interface MyApiClient {\r\n * fetchPost: (id: string) => Promise\r\n * }\r\n *\r\n * createApi({\r\n * baseQuery: fetchBaseQuery({ baseUrl: '/' }),\r\n * endpoints: (build) => ({\r\n * // Example: an endpoint with an API client passed in as an argument,\r\n * // but only the item ID should be used as the cache key\r\n * getPost: build.query({\r\n * queryFn: async ({ id, client }) => {\r\n * const post = await client.fetchPost(id)\r\n * return { data: post }\r\n * },\r\n * // highlight-start\r\n * serializeQueryArgs: ({ queryArgs, endpointDefinition, endpointName }) => {\r\n * const { id } = queryArgs\r\n * // This can return a string, an object, a number, or a boolean.\r\n * // If it returns an object, number or boolean, that value\r\n * // will be serialized automatically via `defaultSerializeQueryArgs`\r\n * return { id } // omit `client` from the cache key\r\n *\r\n * // Alternately, you can use `defaultSerializeQueryArgs` yourself:\r\n * // return defaultSerializeQueryArgs({\r\n * // endpointName,\r\n * // queryArgs: { id },\r\n * // endpointDefinition\r\n * // })\r\n * // Or create and return a string yourself:\r\n * // return `getPost(${id})`\r\n * },\r\n * // highlight-end\r\n * }),\r\n * }),\r\n *})\r\n * ```\r\n */\r\n serializeQueryArgs?: SerializeQueryArgs<\r\n QueryArg,\r\n string | number | boolean | Record\r\n >\r\n\r\n /**\r\n * Can be provided to merge an incoming response value into the current cache data.\r\n * If supplied, no automatic structural sharing will be applied - it's up to\r\n * you to update the cache appropriately.\r\n *\r\n * Since RTKQ normally replaces cache entries with the new response, you will usually\r\n * need to use this with the `serializeQueryArgs` or `forceRefetch` options to keep\r\n * an existing cache entry so that it can be updated.\r\n *\r\n * Since this is wrapped with Immer, you , you may either mutate the `currentCacheValue` directly,\r\n * or return a new value, but _not_ both at once.\r\n *\r\n * Will only be called if the existing `currentCacheData` is _not_ `undefined` - on first response,\r\n * the cache entry will just save the response data directly.\r\n *\r\n * Useful if you don't want a new request to completely override the current cache value,\r\n * maybe because you have manually updated it from another source and don't want those\r\n * updates to get lost.\r\n *\r\n *\r\n * @example\r\n *\r\n * ```ts\r\n * // codeblock-meta title=\"merge: pagination\"\r\n *\r\n * import { createApi, fetchBaseQuery, defaultSerializeQueryArgs } from '@reduxjs/toolkit/query/react'\r\n * interface Post {\r\n * id: number\r\n * name: string\r\n * }\r\n *\r\n * createApi({\r\n * baseQuery: fetchBaseQuery({ baseUrl: '/' }),\r\n * endpoints: (build) => ({\r\n * listItems: build.query({\r\n * query: (pageNumber) => `/listItems?page=${pageNumber}`,\r\n * // Only have one cache entry because the arg always maps to one string\r\n * serializeQueryArgs: ({ endpointName }) => {\r\n * return endpointName\r\n * },\r\n * // Always merge incoming data to the cache entry\r\n * merge: (currentCache, newItems) => {\r\n * currentCache.push(...newItems)\r\n * },\r\n * // Refetch when the page arg changes\r\n * forceRefetch({ currentArg, previousArg }) {\r\n * return currentArg !== previousArg\r\n * },\r\n * }),\r\n * }),\r\n *})\r\n * ```\r\n */\r\n merge?(\r\n currentCacheData: ResultType,\r\n responseData: ResultType\r\n ): ResultType | void\r\n\r\n /**\r\n * Check to see if the endpoint should force a refetch in cases where it normally wouldn't.\r\n * This is primarily useful for \"infinite scroll\" / pagination use cases where\r\n * RTKQ is keeping a single cache entry that is added to over time, in combination\r\n * with `serializeQueryArgs` returning a fixed cache key and a `merge` callback\r\n * set to add incoming data to the cache entry each time.\r\n *\r\n * @example\r\n *\r\n * ```ts\r\n * // codeblock-meta title=\"forceRefresh: pagination\"\r\n *\r\n * import { createApi, fetchBaseQuery, defaultSerializeQueryArgs } from '@reduxjs/toolkit/query/react'\r\n * interface Post {\r\n * id: number\r\n * name: string\r\n * }\r\n *\r\n * createApi({\r\n * baseQuery: fetchBaseQuery({ baseUrl: '/' }),\r\n * endpoints: (build) => ({\r\n * listItems: build.query({\r\n * query: (pageNumber) => `/listItems?page=${pageNumber}`,\r\n * // Only have one cache entry because the arg always maps to one string\r\n * serializeQueryArgs: ({ endpointName }) => {\r\n * return endpointName\r\n * },\r\n * // Always merge incoming data to the cache entry\r\n * merge: (currentCache, newItems) => {\r\n * currentCache.push(...newItems)\r\n * },\r\n * // Refetch when the page arg changes\r\n * forceRefetch({ currentArg, previousArg }) {\r\n * return currentArg !== previousArg\r\n * },\r\n * }),\r\n * }),\r\n *})\r\n * ```\r\n */\r\n forceRefetch?(params: {\r\n currentArg: QueryArg | undefined\r\n previousArg: QueryArg | undefined\r\n state: RootState\r\n endpointState?: QuerySubState\r\n }): boolean\r\n\r\n /**\r\n * All of these are `undefined` at runtime, purely to be used in TypeScript declarations!\r\n */\r\n Types?: QueryTypes\r\n}\r\n\r\nexport type QueryDefinition<\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n TagTypes extends string,\r\n ResultType,\r\n ReducerPath extends string = string\r\n> = BaseEndpointDefinition &\r\n QueryExtraOptions\r\n\r\nexport interface MutationTypes<\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n TagTypes extends string,\r\n ResultType,\r\n ReducerPath extends string = string\r\n> extends BaseEndpointTypes {\r\n /**\r\n * The endpoint definition type. To be used with some internal generic types.\r\n * @example\r\n * ```ts\r\n * const useMyWrappedHook: UseMutation = ...\r\n * ```\r\n */\r\n MutationDefinition: MutationDefinition<\r\n QueryArg,\r\n BaseQuery,\r\n TagTypes,\r\n ResultType,\r\n ReducerPath\r\n >\r\n TagTypes: TagTypes\r\n ReducerPath: ReducerPath\r\n}\r\n\r\nexport interface MutationExtraOptions<\r\n TagTypes extends string,\r\n ResultType,\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n ReducerPath extends string = string\r\n> {\r\n type: DefinitionType.mutation\r\n /**\r\n * Used by `mutation` endpoints. Determines which cached data should be either re-fetched or removed from the cache.\r\n * Expects the same shapes as `providesTags`.\r\n *\r\n * @example\r\n *\r\n * ```ts\r\n * // codeblock-meta title=\"invalidatesTags example\"\r\n * import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react'\r\n * interface Post {\r\n * id: number\r\n * name: string\r\n * }\r\n * type PostsResponse = Post[]\r\n *\r\n * const api = createApi({\r\n * baseQuery: fetchBaseQuery({ baseUrl: '/' }),\r\n * tagTypes: ['Posts'],\r\n * endpoints: (build) => ({\r\n * getPosts: build.query({\r\n * query: () => 'posts',\r\n * providesTags: (result) =>\r\n * result\r\n * ? [\r\n * ...result.map(({ id }) => ({ type: 'Posts' as const, id })),\r\n * { type: 'Posts', id: 'LIST' },\r\n * ]\r\n * : [{ type: 'Posts', id: 'LIST' }],\r\n * }),\r\n * addPost: build.mutation>({\r\n * query(body) {\r\n * return {\r\n * url: `posts`,\r\n * method: 'POST',\r\n * body,\r\n * }\r\n * },\r\n * // highlight-start\r\n * invalidatesTags: [{ type: 'Posts', id: 'LIST' }],\r\n * // highlight-end\r\n * }),\r\n * })\r\n * })\r\n * ```\r\n */\r\n invalidatesTags?: ResultDescription<\r\n TagTypes,\r\n ResultType,\r\n QueryArg,\r\n BaseQueryError,\r\n BaseQueryMeta\r\n >\r\n /**\r\n * Not to be used. A mutation should not provide tags to the cache.\r\n */\r\n providesTags?: never\r\n\r\n /**\r\n * All of these are `undefined` at runtime, purely to be used in TypeScript declarations!\r\n */\r\n Types?: MutationTypes\r\n}\r\n\r\nexport type MutationDefinition<\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n TagTypes extends string,\r\n ResultType,\r\n ReducerPath extends string = string\r\n> = BaseEndpointDefinition &\r\n MutationExtraOptions\r\n\r\nexport type EndpointDefinition<\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n TagTypes extends string,\r\n ResultType,\r\n ReducerPath extends string = string\r\n> =\r\n | QueryDefinition\r\n | MutationDefinition\r\n\r\nexport type EndpointDefinitions = Record<\r\n string,\r\n EndpointDefinition\r\n>\r\n\r\nexport function isQueryDefinition(\r\n e: EndpointDefinition\r\n): e is QueryDefinition {\r\n return e.type === DefinitionType.query\r\n}\r\n\r\nexport function isMutationDefinition(\r\n e: EndpointDefinition\r\n): e is MutationDefinition {\r\n return e.type === DefinitionType.mutation\r\n}\r\n\r\nexport type EndpointBuilder<\r\n BaseQuery extends BaseQueryFn,\r\n TagTypes extends string,\r\n ReducerPath extends string\r\n> = {\r\n /**\r\n * An endpoint definition that retrieves data, and may provide tags to the cache.\r\n *\r\n * @example\r\n * ```js\r\n * // codeblock-meta title=\"Example of all query endpoint options\"\r\n * const api = createApi({\r\n * baseQuery,\r\n * endpoints: (build) => ({\r\n * getPost: build.query({\r\n * query: (id) => ({ url: `post/${id}` }),\r\n * // Pick out data and prevent nested properties in a hook or selector\r\n * transformResponse: (response) => response.data,\r\n * // Pick out error and prevent nested properties in a hook or selector\r\n * transformErrorResponse: (response) => response.error,\r\n * // `result` is the server response\r\n * providesTags: (result, error, id) => [{ type: 'Post', id }],\r\n * // trigger side effects or optimistic updates\r\n * onQueryStarted(id, { dispatch, getState, extra, requestId, queryFulfilled, getCacheEntry, updateCachedData }) {},\r\n * // handle subscriptions etc\r\n * onCacheEntryAdded(id, { dispatch, getState, extra, requestId, cacheEntryRemoved, cacheDataLoaded, getCacheEntry, updateCachedData }) {},\r\n * }),\r\n * }),\r\n *});\r\n *```\r\n */\r\n query(\r\n definition: OmitFromUnion<\r\n QueryDefinition,\r\n 'type'\r\n >\r\n ): QueryDefinition\r\n /**\r\n * An endpoint definition that alters data on the server or will possibly invalidate the cache.\r\n *\r\n * @example\r\n * ```js\r\n * // codeblock-meta title=\"Example of all mutation endpoint options\"\r\n * const api = createApi({\r\n * baseQuery,\r\n * endpoints: (build) => ({\r\n * updatePost: build.mutation({\r\n * query: ({ id, ...patch }) => ({ url: `post/${id}`, method: 'PATCH', body: patch }),\r\n * // Pick out data and prevent nested properties in a hook or selector\r\n * transformResponse: (response) => response.data,\r\n * // Pick out error and prevent nested properties in a hook or selector\r\n * transformErrorResponse: (response) => response.error,\r\n * // `result` is the server response\r\n * invalidatesTags: (result, error, id) => [{ type: 'Post', id }],\r\n * // trigger side effects or optimistic updates\r\n * onQueryStarted(id, { dispatch, getState, extra, requestId, queryFulfilled, getCacheEntry }) {},\r\n * // handle subscriptions etc\r\n * onCacheEntryAdded(id, { dispatch, getState, extra, requestId, cacheEntryRemoved, cacheDataLoaded, getCacheEntry }) {},\r\n * }),\r\n * }),\r\n * });\r\n * ```\r\n */\r\n mutation(\r\n definition: OmitFromUnion<\r\n MutationDefinition<\r\n QueryArg,\r\n BaseQuery,\r\n TagTypes,\r\n ResultType,\r\n ReducerPath\r\n >,\r\n 'type'\r\n >\r\n ): MutationDefinition\r\n}\r\n\r\nexport type AssertTagTypes = >(t: T) => T\r\n\r\nexport function calculateProvidedBy(\r\n description:\r\n | ResultDescription\r\n | undefined,\r\n result: ResultType | undefined,\r\n error: ErrorType | undefined,\r\n queryArg: QueryArg,\r\n meta: MetaType | undefined,\r\n assertTagTypes: AssertTagTypes\r\n): readonly FullTagDescription[] {\r\n if (isFunction(description)) {\r\n return description(\r\n result as ResultType,\r\n error as undefined,\r\n queryArg,\r\n meta as MetaType\r\n )\r\n .map(expandTagDescription)\r\n .map(assertTagTypes)\r\n }\r\n if (Array.isArray(description)) {\r\n return description.map(expandTagDescription).map(assertTagTypes)\r\n }\r\n return []\r\n}\r\n\r\nfunction isFunction(t: T): t is Extract {\r\n return typeof t === 'function'\r\n}\r\n\r\nexport function expandTagDescription(\r\n description: TagDescription\r\n): FullTagDescription {\r\n return typeof description === 'string' ? { type: description } : description\r\n}\r\n\r\nexport type QueryArgFrom> =\r\n D extends BaseEndpointDefinition ? QA : unknown\r\nexport type ResultTypeFrom> =\r\n D extends BaseEndpointDefinition ? RT : unknown\r\n\r\nexport type ReducerPathFrom<\r\n D extends EndpointDefinition\r\n> = D extends EndpointDefinition ? RP : unknown\r\n\r\nexport type TagTypesFrom> =\r\n D extends EndpointDefinition ? RP : unknown\r\n\r\nexport type ReplaceTagTypes<\r\n Definitions extends EndpointDefinitions,\r\n NewTagTypes extends string\r\n> = {\r\n [K in keyof Definitions]: Definitions[K] extends QueryDefinition<\r\n infer QueryArg,\r\n infer BaseQuery,\r\n any,\r\n infer ResultType,\r\n infer ReducerPath\r\n >\r\n ? QueryDefinition\r\n : Definitions[K] extends MutationDefinition<\r\n infer QueryArg,\r\n infer BaseQuery,\r\n any,\r\n infer ResultType,\r\n infer ReducerPath\r\n >\r\n ? MutationDefinition<\r\n QueryArg,\r\n BaseQuery,\r\n NewTagTypes,\r\n ResultType,\r\n ReducerPath\r\n >\r\n : never\r\n}\r\n","import type { AnyAction, ThunkAction, ThunkDispatch } from '@reduxjs/toolkit'\r\nimport { createSelector } from '@reduxjs/toolkit'\r\nimport type { Selector } from '@reduxjs/toolkit'\r\nimport type { DependencyList } from 'react'\r\nimport {\r\n useCallback,\r\n useDebugValue,\r\n useEffect,\r\n useLayoutEffect,\r\n useMemo,\r\n useRef,\r\n useState,\r\n} from 'react'\r\nimport { QueryStatus, skipToken } from '@reduxjs/toolkit/query'\r\nimport type {\r\n QuerySubState,\r\n SubscriptionOptions,\r\n QueryKeys,\r\n RootState,\r\n} from '@reduxjs/toolkit/dist/query/core/apiState'\r\nimport type {\r\n EndpointDefinitions,\r\n MutationDefinition,\r\n QueryDefinition,\r\n QueryArgFrom,\r\n ResultTypeFrom,\r\n} from '@reduxjs/toolkit/dist/query/endpointDefinitions'\r\nimport type {\r\n QueryResultSelectorResult,\r\n MutationResultSelectorResult,\r\n SkipToken,\r\n} from '@reduxjs/toolkit/dist/query/core/buildSelectors'\r\nimport type {\r\n QueryActionCreatorResult,\r\n MutationActionCreatorResult,\r\n} from '@reduxjs/toolkit/dist/query/core/buildInitiate'\r\nimport type { SerializeQueryArgs } from '@reduxjs/toolkit/dist/query/defaultSerializeQueryArgs'\r\nimport { shallowEqual } from 'react-redux'\r\nimport type { Api, ApiContext } from '@reduxjs/toolkit/dist/query/apiTypes'\r\nimport type {\r\n Id,\r\n NoInfer,\r\n Override,\r\n} from '@reduxjs/toolkit/dist/query/tsHelpers'\r\nimport type {\r\n ApiEndpointMutation,\r\n ApiEndpointQuery,\r\n CoreModule,\r\n PrefetchOptions,\r\n} from '@reduxjs/toolkit/dist/query/core/module'\r\nimport type { ReactHooksModuleOptions } from './module'\r\nimport { useStableQueryArgs } from './useSerializedStableValue'\r\nimport type { UninitializedValue } from './constants'\r\nimport { UNINITIALIZED_VALUE } from './constants'\r\nimport { useShallowStableValue } from './useShallowStableValue'\r\nimport type { BaseQueryFn } from '../baseQueryTypes'\r\nimport { defaultSerializeQueryArgs } from '../defaultSerializeQueryArgs'\r\n\r\n// Copy-pasted from React-Redux\r\nexport const useIsomorphicLayoutEffect =\r\n typeof window !== 'undefined' &&\r\n !!window.document &&\r\n !!window.document.createElement\r\n ? useLayoutEffect\r\n : useEffect\r\n\r\nexport interface QueryHooks<\r\n Definition extends QueryDefinition\r\n> {\r\n useQuery: UseQuery\r\n useLazyQuery: UseLazyQuery\r\n useQuerySubscription: UseQuerySubscription\r\n useLazyQuerySubscription: UseLazyQuerySubscription\r\n useQueryState: UseQueryState\r\n}\r\n\r\nexport interface MutationHooks<\r\n Definition extends MutationDefinition\r\n> {\r\n useMutation: UseMutation\r\n}\r\n\r\n/**\r\n * A React hook that automatically triggers fetches of data from an endpoint, 'subscribes' the component to the cached data, and reads the request status and cached data from the Redux store. The component will re-render as the loading status changes and the data becomes available.\r\n *\r\n * The query arg is used as a cache key. Changing the query arg will tell the hook to re-fetch the data if it does not exist in the cache already, and the hook will return the data for that query arg once it's available.\r\n *\r\n * This hook combines the functionality of both [`useQueryState`](#usequerystate) and [`useQuerySubscription`](#usequerysubscription) together, and is intended to be used in the majority of situations.\r\n *\r\n * #### Features\r\n *\r\n * - Automatically triggers requests to retrieve data based on the hook argument and whether cached data exists by default\r\n * - 'Subscribes' the component to keep cached data in the store, and 'unsubscribes' when the component unmounts\r\n * - Accepts polling/re-fetching options to trigger automatic re-fetches when the corresponding criteria is met\r\n * - Returns the latest request status and cached data from the Redux store\r\n * - Re-renders as the request status changes and data becomes available\r\n */\r\nexport type UseQuery> = <\r\n R extends Record = UseQueryStateDefaultResult\r\n>(\r\n arg: QueryArgFrom | SkipToken,\r\n options?: UseQuerySubscriptionOptions & UseQueryStateOptions\r\n) => UseQueryHookResult\r\n\r\nexport type UseQueryHookResult<\r\n D extends QueryDefinition,\r\n R = UseQueryStateDefaultResult\r\n> = UseQueryStateResult & UseQuerySubscriptionResult\r\n\r\n/**\r\n * Helper type to manually type the result\r\n * of the `useQuery` hook in userland code.\r\n */\r\nexport type TypedUseQueryHookResult<\r\n ResultType,\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n R = UseQueryStateDefaultResult<\r\n QueryDefinition\r\n >\r\n> = TypedUseQueryStateResult &\r\n TypedUseQuerySubscriptionResult\r\n\r\ninterface UseQuerySubscriptionOptions extends SubscriptionOptions {\r\n /**\r\n * Prevents a query from automatically running.\r\n *\r\n * @remarks\r\n * When `skip` is true (or `skipToken` is passed in as `arg`):\r\n *\r\n * - **If the query has cached data:**\r\n * * The cached data **will not be used** on the initial load, and will ignore updates from any identical query until the `skip` condition is removed\r\n * * The query will have a status of `uninitialized`\r\n * * If `skip: false` is set after the initial load, the cached result will be used\r\n * - **If the query does not have cached data:**\r\n * * The query will have a status of `uninitialized`\r\n * * The query will not exist in the state when viewed with the dev tools\r\n * * The query will not automatically fetch on mount\r\n * * The query will not automatically run when additional components with the same query are added that do run\r\n *\r\n * @example\r\n * ```tsx\r\n * // codeblock-meta title=\"Skip example\"\r\n * const Pokemon = ({ name, skip }: { name: string; skip: boolean }) => {\r\n * const { data, error, status } = useGetPokemonByNameQuery(name, {\r\n * skip,\r\n * });\r\n *\r\n * return (\r\n *
\r\n * {name} - {status}\r\n *
\r\n * );\r\n * };\r\n * ```\r\n */\r\n skip?: boolean\r\n /**\r\n * Defaults to `false`. This setting allows you to control whether if a cached result is already available, RTK Query will only serve a cached result, or if it should `refetch` when set to `true` or if an adequate amount of time has passed since the last successful query result.\r\n * - `false` - Will not cause a query to be performed _unless_ it does not exist yet.\r\n * - `true` - Will always refetch when a new subscriber to a query is added. Behaves the same as calling the `refetch` callback or passing `forceRefetch: true` in the action creator.\r\n * - `number` - **Value is in seconds**. If a number is provided and there is an existing query in the cache, it will compare the current time vs the last fulfilled timestamp, and only refetch if enough time has elapsed.\r\n *\r\n * If you specify this option alongside `skip: true`, this **will not be evaluated** until `skip` is false.\r\n */\r\n refetchOnMountOrArgChange?: boolean | number\r\n}\r\n\r\n/**\r\n * A React hook that automatically triggers fetches of data from an endpoint, and 'subscribes' the component to the cached data.\r\n *\r\n * The query arg is used as a cache key. Changing the query arg will tell the hook to re-fetch the data if it does not exist in the cache already.\r\n *\r\n * Note that this hook does not return a request status or cached data. For that use-case, see [`useQuery`](#usequery) or [`useQueryState`](#usequerystate).\r\n *\r\n * #### Features\r\n *\r\n * - Automatically triggers requests to retrieve data based on the hook argument and whether cached data exists by default\r\n * - 'Subscribes' the component to keep cached data in the store, and 'unsubscribes' when the component unmounts\r\n * - Accepts polling/re-fetching options to trigger automatic re-fetches when the corresponding criteria is met\r\n */\r\nexport type UseQuerySubscription<\r\n D extends QueryDefinition\r\n> = (\r\n arg: QueryArgFrom | SkipToken,\r\n options?: UseQuerySubscriptionOptions\r\n) => UseQuerySubscriptionResult\r\n\r\nexport type UseQuerySubscriptionResult<\r\n D extends QueryDefinition\r\n> = Pick, 'refetch'>\r\n\r\n/**\r\n * Helper type to manually type the result\r\n * of the `useQuerySubscription` hook in userland code.\r\n */\r\nexport type TypedUseQuerySubscriptionResult<\r\n ResultType,\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn\r\n> = UseQuerySubscriptionResult<\r\n QueryDefinition\r\n>\r\n\r\nexport type UseLazyQueryLastPromiseInfo<\r\n D extends QueryDefinition\r\n> = {\r\n lastArg: QueryArgFrom\r\n}\r\n\r\n/**\r\n * A React hook similar to [`useQuery`](#usequery), but with manual control over when the data fetching occurs.\r\n *\r\n * This hook includes the functionality of [`useLazyQuerySubscription`](#uselazyquerysubscription).\r\n *\r\n * #### Features\r\n *\r\n * - Manual control over firing a request to retrieve data\r\n * - 'Subscribes' the component to keep cached data in the store, and 'unsubscribes' when the component unmounts\r\n * - Returns the latest request status and cached data from the Redux store\r\n * - Re-renders as the request status changes and data becomes available\r\n * - Accepts polling/re-fetching options to trigger automatic re-fetches when the corresponding criteria is met and the fetch has been manually called at least once\r\n *\r\n * #### Note\r\n *\r\n * When the trigger function returned from a LazyQuery is called, it always initiates a new request to the server even if there is cached data. Set `preferCacheValue`(the second argument to the function) as `true` if you want it to immediately return a cached value if one exists.\r\n */\r\nexport type UseLazyQuery> = <\r\n R extends Record = UseQueryStateDefaultResult\r\n>(\r\n options?: SubscriptionOptions & Omit, 'skip'>\r\n) => [\r\n LazyQueryTrigger,\r\n UseQueryStateResult,\r\n UseLazyQueryLastPromiseInfo\r\n]\r\n\r\nexport type LazyQueryTrigger> = {\r\n /**\r\n * Triggers a lazy query.\r\n *\r\n * By default, this will start a new request even if there is already a value in the cache.\r\n * If you want to use the cache value and only start a request if there is no cache value, set the second argument to `true`.\r\n *\r\n * @remarks\r\n * If you need to access the error or success payload immediately after a lazy query, you can chain .unwrap().\r\n *\r\n * @example\r\n * ```ts\r\n * // codeblock-meta title=\"Using .unwrap with async await\"\r\n * try {\r\n * const payload = await getUserById(1).unwrap();\r\n * console.log('fulfilled', payload)\r\n * } catch (error) {\r\n * console.error('rejected', error);\r\n * }\r\n * ```\r\n */\r\n (\r\n arg: QueryArgFrom,\r\n preferCacheValue?: boolean\r\n ): QueryActionCreatorResult\r\n}\r\n\r\n/**\r\n * A React hook similar to [`useQuerySubscription`](#usequerysubscription), but with manual control over when the data fetching occurs.\r\n *\r\n * Note that this hook does not return a request status or cached data. For that use-case, see [`useLazyQuery`](#uselazyquery).\r\n *\r\n * #### Features\r\n *\r\n * - Manual control over firing a request to retrieve data\r\n * - 'Subscribes' the component to keep cached data in the store, and 'unsubscribes' when the component unmounts\r\n * - Accepts polling/re-fetching options to trigger automatic re-fetches when the corresponding criteria is met and the fetch has been manually called at least once\r\n */\r\nexport type UseLazyQuerySubscription<\r\n D extends QueryDefinition\r\n> = (\r\n options?: SubscriptionOptions\r\n) => readonly [LazyQueryTrigger, QueryArgFrom | UninitializedValue]\r\n\r\nexport type QueryStateSelector<\r\n R extends Record,\r\n D extends QueryDefinition\r\n> = (state: UseQueryStateDefaultResult) => R\r\n\r\n/**\r\n * A React hook that reads the request status and cached data from the Redux store. The component will re-render as the loading status changes and the data becomes available.\r\n *\r\n * Note that this hook does not trigger fetching new data. For that use-case, see [`useQuery`](#usequery) or [`useQuerySubscription`](#usequerysubscription).\r\n *\r\n * #### Features\r\n *\r\n * - Returns the latest request status and cached data from the Redux store\r\n * - Re-renders as the request status changes and data becomes available\r\n */\r\nexport type UseQueryState> = <\r\n R extends Record = UseQueryStateDefaultResult\r\n>(\r\n arg: QueryArgFrom | SkipToken,\r\n options?: UseQueryStateOptions\r\n) => UseQueryStateResult\r\n\r\nexport type UseQueryStateOptions<\r\n D extends QueryDefinition,\r\n R extends Record\r\n> = {\r\n /**\r\n * Prevents a query from automatically running.\r\n *\r\n * @remarks\r\n * When skip is true:\r\n *\r\n * - **If the query has cached data:**\r\n * * The cached data **will not be used** on the initial load, and will ignore updates from any identical query until the `skip` condition is removed\r\n * * The query will have a status of `uninitialized`\r\n * * If `skip: false` is set after skipping the initial load, the cached result will be used\r\n * - **If the query does not have cached data:**\r\n * * The query will have a status of `uninitialized`\r\n * * The query will not exist in the state when viewed with the dev tools\r\n * * The query will not automatically fetch on mount\r\n * * The query will not automatically run when additional components with the same query are added that do run\r\n *\r\n * @example\r\n * ```ts\r\n * // codeblock-meta title=\"Skip example\"\r\n * const Pokemon = ({ name, skip }: { name: string; skip: boolean }) => {\r\n * const { data, error, status } = useGetPokemonByNameQuery(name, {\r\n * skip,\r\n * });\r\n *\r\n * return (\r\n *
\r\n * {name} - {status}\r\n *
\r\n * );\r\n * };\r\n * ```\r\n */\r\n skip?: boolean\r\n /**\r\n * `selectFromResult` allows you to get a specific segment from a query result in a performant manner.\r\n * When using this feature, the component will not rerender unless the underlying data of the selected item has changed.\r\n * If the selected item is one element in a larger collection, it will disregard changes to elements in the same collection.\r\n *\r\n * @example\r\n * ```ts\r\n * // codeblock-meta title=\"Using selectFromResult to extract a single result\"\r\n * function PostsList() {\r\n * const { data: posts } = api.useGetPostsQuery();\r\n *\r\n * return (\r\n *
    \r\n * {posts?.data?.map((post) => (\r\n * \r\n * ))}\r\n *
\r\n * );\r\n * }\r\n *\r\n * function PostById({ id }: { id: number }) {\r\n * // Will select the post with the given id, and will only rerender if the given posts data changes\r\n * const { post } = api.useGetPostsQuery(undefined, {\r\n * selectFromResult: ({ data }) => ({ post: data?.find((post) => post.id === id) }),\r\n * });\r\n *\r\n * return
  • {post?.name}
  • ;\r\n * }\r\n * ```\r\n */\r\n selectFromResult?: QueryStateSelector\r\n}\r\n\r\nexport type UseQueryStateResult<\r\n _ extends QueryDefinition,\r\n R\r\n> = NoInfer\r\n\r\n/**\r\n * Helper type to manually type the result\r\n * of the `useQueryState` hook in userland code.\r\n */\r\nexport type TypedUseQueryStateResult<\r\n ResultType,\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n R = UseQueryStateDefaultResult<\r\n QueryDefinition\r\n >\r\n> = NoInfer\r\n\r\ntype UseQueryStateBaseResult> =\r\n QuerySubState & {\r\n /**\r\n * Where `data` tries to hold data as much as possible, also re-using\r\n * data from the last arguments passed into the hook, this property\r\n * will always contain the received data from the query, for the current query arguments.\r\n */\r\n currentData?: ResultTypeFrom\r\n /**\r\n * Query has not started yet.\r\n */\r\n isUninitialized: false\r\n /**\r\n * Query is currently loading for the first time. No data yet.\r\n */\r\n isLoading: false\r\n /**\r\n * Query is currently fetching, but might have data from an earlier request.\r\n */\r\n isFetching: false\r\n /**\r\n * Query has data from a successful load.\r\n */\r\n isSuccess: false\r\n /**\r\n * Query is currently in \"error\" state.\r\n */\r\n isError: false\r\n }\r\n\r\ntype UseQueryStateDefaultResult> =\r\n Id<\r\n | Override<\r\n Extract<\r\n UseQueryStateBaseResult,\r\n { status: QueryStatus.uninitialized }\r\n >,\r\n { isUninitialized: true }\r\n >\r\n | Override<\r\n UseQueryStateBaseResult,\r\n | { isLoading: true; isFetching: boolean; data: undefined }\r\n | ({\r\n isSuccess: true\r\n isFetching: true\r\n error: undefined\r\n } & Required<\r\n Pick, 'data' | 'fulfilledTimeStamp'>\r\n >)\r\n | ({\r\n isSuccess: true\r\n isFetching: false\r\n error: undefined\r\n } & Required<\r\n Pick<\r\n UseQueryStateBaseResult,\r\n 'data' | 'fulfilledTimeStamp' | 'currentData'\r\n >\r\n >)\r\n | ({ isError: true } & Required<\r\n Pick, 'error'>\r\n >)\r\n >\r\n > & {\r\n /**\r\n * @deprecated will be removed in the next version\r\n * please use the `isLoading`, `isFetching`, `isSuccess`, `isError`\r\n * and `isUninitialized` flags instead\r\n */\r\n status: QueryStatus\r\n }\r\n\r\nexport type MutationStateSelector<\r\n R extends Record,\r\n D extends MutationDefinition\r\n> = (state: MutationResultSelectorResult) => R\r\n\r\nexport type UseMutationStateOptions<\r\n D extends MutationDefinition,\r\n R extends Record\r\n> = {\r\n selectFromResult?: MutationStateSelector\r\n fixedCacheKey?: string\r\n}\r\n\r\nexport type UseMutationStateResult<\r\n D extends MutationDefinition,\r\n R\r\n> = NoInfer & {\r\n originalArgs?: QueryArgFrom\r\n /**\r\n * Resets the hook state to it's initial `uninitialized` state.\r\n * This will also remove the last result from the cache.\r\n */\r\n reset: () => void\r\n}\r\n\r\n/**\r\n * Helper type to manually type the result\r\n * of the `useMutation` hook in userland code.\r\n */\r\nexport type TypedUseMutationResult<\r\n ResultType,\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n R = MutationResultSelectorResult<\r\n MutationDefinition\r\n >\r\n> = UseMutationStateResult<\r\n MutationDefinition,\r\n R\r\n>\r\n\r\n/**\r\n * A React hook that lets you trigger an update request for a given endpoint, and subscribes the component to read the request status from the Redux store. The component will re-render as the loading status changes.\r\n *\r\n * #### Features\r\n *\r\n * - Manual control over firing a request to alter data on the server or possibly invalidate the cache\r\n * - 'Subscribes' the component to keep cached data in the store, and 'unsubscribes' when the component unmounts\r\n * - Returns the latest request status and cached data from the Redux store\r\n * - Re-renders as the request status changes and data becomes available\r\n */\r\nexport type UseMutation> = <\r\n R extends Record = MutationResultSelectorResult\r\n>(\r\n options?: UseMutationStateOptions\r\n) => readonly [MutationTrigger, UseMutationStateResult]\r\n\r\nexport type MutationTrigger> =\r\n {\r\n /**\r\n * Triggers the mutation and returns a Promise.\r\n * @remarks\r\n * If you need to access the error or success payload immediately after a mutation, you can chain .unwrap().\r\n *\r\n * @example\r\n * ```ts\r\n * // codeblock-meta title=\"Using .unwrap with async await\"\r\n * try {\r\n * const payload = await addPost({ id: 1, name: 'Example' }).unwrap();\r\n * console.log('fulfilled', payload)\r\n * } catch (error) {\r\n * console.error('rejected', error);\r\n * }\r\n * ```\r\n */\r\n (arg: QueryArgFrom): MutationActionCreatorResult\r\n }\r\n\r\nconst defaultQueryStateSelector: QueryStateSelector = (x) => x\r\nconst defaultMutationStateSelector: MutationStateSelector = (x) => x\r\n\r\n/**\r\n * Wrapper around `defaultQueryStateSelector` to be used in `useQuery`.\r\n * We want the initial render to already come back with\r\n * `{ isUninitialized: false, isFetching: true, isLoading: true }`\r\n * to prevent that the library user has to do an additional check for `isUninitialized`/\r\n */\r\nconst noPendingQueryStateSelector: QueryStateSelector = (\r\n selected\r\n) => {\r\n if (selected.isUninitialized) {\r\n return {\r\n ...selected,\r\n isUninitialized: false,\r\n isFetching: true,\r\n isLoading: selected.data !== undefined ? false : true,\r\n status: QueryStatus.pending,\r\n } as any\r\n }\r\n return selected\r\n}\r\n\r\ntype GenericPrefetchThunk = (\r\n endpointName: any,\r\n arg: any,\r\n options: PrefetchOptions\r\n) => ThunkAction\r\n\r\n/**\r\n *\r\n * @param opts.api - An API with defined endpoints to create hooks for\r\n * @param opts.moduleOptions.batch - The version of the `batchedUpdates` function to be used\r\n * @param opts.moduleOptions.useDispatch - The version of the `useDispatch` hook to be used\r\n * @param opts.moduleOptions.useSelector - The version of the `useSelector` hook to be used\r\n * @returns An object containing functions to generate hooks based on an endpoint\r\n */\r\nexport function buildHooks({\r\n api,\r\n moduleOptions: {\r\n batch,\r\n useDispatch,\r\n useSelector,\r\n useStore,\r\n unstable__sideEffectsInRender,\r\n },\r\n serializeQueryArgs,\r\n context,\r\n}: {\r\n api: Api\r\n moduleOptions: Required\r\n serializeQueryArgs: SerializeQueryArgs\r\n context: ApiContext\r\n}) {\r\n const usePossiblyImmediateEffect: (\r\n effect: () => void | undefined,\r\n deps?: DependencyList\r\n ) => void = unstable__sideEffectsInRender ? (cb) => cb() : useEffect\r\n\r\n return { buildQueryHooks, buildMutationHook, usePrefetch }\r\n\r\n function queryStatePreSelector(\r\n currentState: QueryResultSelectorResult,\r\n lastResult: UseQueryStateDefaultResult | undefined,\r\n queryArgs: any\r\n ): UseQueryStateDefaultResult {\r\n // if we had a last result and the current result is uninitialized,\r\n // we might have called `api.util.resetApiState`\r\n // in this case, reset the hook\r\n if (lastResult?.endpointName && currentState.isUninitialized) {\r\n const { endpointName } = lastResult\r\n const endpointDefinition = context.endpointDefinitions[endpointName]\r\n if (\r\n serializeQueryArgs({\r\n queryArgs: lastResult.originalArgs,\r\n endpointDefinition,\r\n endpointName,\r\n }) ===\r\n serializeQueryArgs({\r\n queryArgs,\r\n endpointDefinition,\r\n endpointName,\r\n })\r\n )\r\n lastResult = undefined\r\n }\r\n if (queryArgs === skipToken) {\r\n lastResult = undefined\r\n }\r\n // data is the last known good request result we have tracked - or if none has been tracked yet the last good result for the current args\r\n let data = currentState.isSuccess ? currentState.data : lastResult?.data\r\n if (data === undefined) data = currentState.data\r\n\r\n const hasData = data !== undefined\r\n\r\n // isFetching = true any time a request is in flight\r\n const isFetching = currentState.isLoading\r\n // isLoading = true only when loading while no data is present yet (initial load with no data in the cache)\r\n const isLoading = !hasData && isFetching\r\n // isSuccess = true when data is present\r\n const isSuccess = currentState.isSuccess || (isFetching && hasData)\r\n\r\n return {\r\n ...currentState,\r\n data,\r\n currentData: currentState.data,\r\n isFetching,\r\n isLoading,\r\n isSuccess,\r\n } as UseQueryStateDefaultResult\r\n }\r\n\r\n function usePrefetch>(\r\n endpointName: EndpointName,\r\n defaultOptions?: PrefetchOptions\r\n ) {\r\n const dispatch = useDispatch>()\r\n const stableDefaultOptions = useShallowStableValue(defaultOptions)\r\n\r\n return useCallback(\r\n (arg: any, options?: PrefetchOptions) =>\r\n dispatch(\r\n (api.util.prefetch as GenericPrefetchThunk)(endpointName, arg, {\r\n ...stableDefaultOptions,\r\n ...options,\r\n })\r\n ),\r\n [endpointName, dispatch, stableDefaultOptions]\r\n )\r\n }\r\n\r\n function buildQueryHooks(name: string): QueryHooks {\r\n const useQuerySubscription: UseQuerySubscription = (\r\n arg: any,\r\n {\r\n refetchOnReconnect,\r\n refetchOnFocus,\r\n refetchOnMountOrArgChange,\r\n skip = false,\r\n pollingInterval = 0,\r\n } = {}\r\n ) => {\r\n const { initiate } = api.endpoints[name] as ApiEndpointQuery<\r\n QueryDefinition,\r\n Definitions\r\n >\r\n const dispatch = useDispatch>()\r\n const stableArg = useStableQueryArgs(\r\n skip ? skipToken : arg,\r\n // Even if the user provided a per-endpoint `serializeQueryArgs` with\r\n // a consistent return value, _here_ we want to use the default behavior\r\n // so we can tell if _anything_ actually changed. Otherwise, we can end up\r\n // with a case where the query args did change but the serialization doesn't,\r\n // and then we never try to initiate a refetch.\r\n defaultSerializeQueryArgs,\r\n context.endpointDefinitions[name],\r\n name\r\n )\r\n const stableSubscriptionOptions = useShallowStableValue({\r\n refetchOnReconnect,\r\n refetchOnFocus,\r\n pollingInterval,\r\n })\r\n\r\n const lastRenderHadSubscription = useRef(false)\r\n\r\n const promiseRef = useRef>()\r\n\r\n let { queryCacheKey, requestId } = promiseRef.current || {}\r\n\r\n // HACK Because the latest state is in the middleware, we actually\r\n // dispatch an action that will be intercepted and returned.\r\n let currentRenderHasSubscription = false\r\n if (queryCacheKey && requestId) {\r\n // This _should_ return a boolean, even if the types don't line up\r\n const returnedValue = dispatch(\r\n api.internalActions.internal_probeSubscription({\r\n queryCacheKey,\r\n requestId,\r\n })\r\n )\r\n\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (typeof returnedValue !== 'boolean') {\r\n throw new Error(\r\n `Warning: Middleware for RTK-Query API at reducerPath \"${api.reducerPath}\" has not been added to the store.\r\n You must add the middleware for RTK-Query to function correctly!`\r\n )\r\n }\r\n }\r\n\r\n currentRenderHasSubscription = !!returnedValue\r\n }\r\n\r\n const subscriptionRemoved =\r\n !currentRenderHasSubscription && lastRenderHadSubscription.current\r\n\r\n usePossiblyImmediateEffect(() => {\r\n lastRenderHadSubscription.current = currentRenderHasSubscription\r\n })\r\n\r\n usePossiblyImmediateEffect((): void | undefined => {\r\n promiseRef.current = undefined\r\n }, [subscriptionRemoved])\r\n\r\n usePossiblyImmediateEffect((): void | undefined => {\r\n const lastPromise = promiseRef.current\r\n if (\r\n typeof process !== 'undefined' &&\r\n process.env.NODE_ENV === 'removeMeOnCompilation'\r\n ) {\r\n // this is only present to enforce the rule of hooks to keep `isSubscribed` in the dependency array\r\n console.log(subscriptionRemoved)\r\n }\r\n\r\n if (stableArg === skipToken) {\r\n lastPromise?.unsubscribe()\r\n promiseRef.current = undefined\r\n return\r\n }\r\n\r\n const lastSubscriptionOptions = promiseRef.current?.subscriptionOptions\r\n\r\n if (!lastPromise || lastPromise.arg !== stableArg) {\r\n lastPromise?.unsubscribe()\r\n const promise = dispatch(\r\n initiate(stableArg, {\r\n subscriptionOptions: stableSubscriptionOptions,\r\n forceRefetch: refetchOnMountOrArgChange,\r\n })\r\n )\r\n\r\n promiseRef.current = promise\r\n } else if (stableSubscriptionOptions !== lastSubscriptionOptions) {\r\n lastPromise.updateSubscriptionOptions(stableSubscriptionOptions)\r\n }\r\n }, [\r\n dispatch,\r\n initiate,\r\n refetchOnMountOrArgChange,\r\n stableArg,\r\n stableSubscriptionOptions,\r\n subscriptionRemoved,\r\n ])\r\n\r\n useEffect(() => {\r\n return () => {\r\n promiseRef.current?.unsubscribe()\r\n promiseRef.current = undefined\r\n }\r\n }, [])\r\n\r\n return useMemo(\r\n () => ({\r\n /**\r\n * A method to manually refetch data for the query\r\n */\r\n refetch: () => {\r\n if (!promiseRef.current)\r\n throw new Error(\r\n 'Cannot refetch a query that has not been started yet.'\r\n )\r\n return promiseRef.current?.refetch()\r\n },\r\n }),\r\n []\r\n )\r\n }\r\n\r\n const useLazyQuerySubscription: UseLazyQuerySubscription = ({\r\n refetchOnReconnect,\r\n refetchOnFocus,\r\n pollingInterval = 0,\r\n } = {}) => {\r\n const { initiate } = api.endpoints[name] as ApiEndpointQuery<\r\n QueryDefinition,\r\n Definitions\r\n >\r\n const dispatch = useDispatch>()\r\n\r\n const [arg, setArg] = useState(UNINITIALIZED_VALUE)\r\n const promiseRef = useRef | undefined>()\r\n\r\n const stableSubscriptionOptions = useShallowStableValue({\r\n refetchOnReconnect,\r\n refetchOnFocus,\r\n pollingInterval,\r\n })\r\n\r\n usePossiblyImmediateEffect(() => {\r\n const lastSubscriptionOptions = promiseRef.current?.subscriptionOptions\r\n\r\n if (stableSubscriptionOptions !== lastSubscriptionOptions) {\r\n promiseRef.current?.updateSubscriptionOptions(\r\n stableSubscriptionOptions\r\n )\r\n }\r\n }, [stableSubscriptionOptions])\r\n\r\n const subscriptionOptionsRef = useRef(stableSubscriptionOptions)\r\n usePossiblyImmediateEffect(() => {\r\n subscriptionOptionsRef.current = stableSubscriptionOptions\r\n }, [stableSubscriptionOptions])\r\n\r\n const trigger = useCallback(\r\n function (arg: any, preferCacheValue = false) {\r\n let promise: QueryActionCreatorResult\r\n\r\n batch(() => {\r\n promiseRef.current?.unsubscribe()\r\n\r\n promiseRef.current = promise = dispatch(\r\n initiate(arg, {\r\n subscriptionOptions: subscriptionOptionsRef.current,\r\n forceRefetch: !preferCacheValue,\r\n })\r\n )\r\n\r\n setArg(arg)\r\n })\r\n\r\n return promise!\r\n },\r\n [dispatch, initiate]\r\n )\r\n\r\n /* cleanup on unmount */\r\n useEffect(() => {\r\n return () => {\r\n promiseRef?.current?.unsubscribe()\r\n }\r\n }, [])\r\n\r\n /* if \"cleanup on unmount\" was triggered from a fast refresh, we want to reinstate the query */\r\n useEffect(() => {\r\n if (arg !== UNINITIALIZED_VALUE && !promiseRef.current) {\r\n trigger(arg, true)\r\n }\r\n }, [arg, trigger])\r\n\r\n return useMemo(() => [trigger, arg] as const, [trigger, arg])\r\n }\r\n\r\n const useQueryState: UseQueryState = (\r\n arg: any,\r\n { skip = false, selectFromResult } = {}\r\n ) => {\r\n const { select } = api.endpoints[name] as ApiEndpointQuery<\r\n QueryDefinition,\r\n Definitions\r\n >\r\n const stableArg = useStableQueryArgs(\r\n skip ? skipToken : arg,\r\n serializeQueryArgs,\r\n context.endpointDefinitions[name],\r\n name\r\n )\r\n\r\n type ApiRootState = Parameters>[0]\r\n\r\n const lastValue = useRef()\r\n\r\n const selectDefaultResult: Selector = useMemo(\r\n () =>\r\n createSelector(\r\n [\r\n select(stableArg),\r\n (_: ApiRootState, lastResult: any) => lastResult,\r\n (_: ApiRootState) => stableArg,\r\n ],\r\n queryStatePreSelector\r\n ),\r\n [select, stableArg]\r\n )\r\n\r\n const querySelector: Selector = useMemo(\r\n () =>\r\n selectFromResult\r\n ? createSelector([selectDefaultResult], selectFromResult)\r\n : selectDefaultResult,\r\n [selectDefaultResult, selectFromResult]\r\n )\r\n\r\n const currentState = useSelector(\r\n (state: RootState) =>\r\n querySelector(state, lastValue.current),\r\n shallowEqual\r\n )\r\n\r\n const store = useStore>()\r\n const newLastValue = selectDefaultResult(\r\n store.getState(),\r\n lastValue.current\r\n )\r\n useIsomorphicLayoutEffect(() => {\r\n lastValue.current = newLastValue\r\n }, [newLastValue])\r\n\r\n return currentState\r\n }\r\n\r\n return {\r\n useQueryState,\r\n useQuerySubscription,\r\n useLazyQuerySubscription,\r\n useLazyQuery(options) {\r\n const [trigger, arg] = useLazyQuerySubscription(options)\r\n const queryStateResults = useQueryState(arg, {\r\n ...options,\r\n skip: arg === UNINITIALIZED_VALUE,\r\n })\r\n\r\n const info = useMemo(() => ({ lastArg: arg }), [arg])\r\n return useMemo(\r\n () => [trigger, queryStateResults, info],\r\n [trigger, queryStateResults, info]\r\n )\r\n },\r\n useQuery(arg, options) {\r\n const querySubscriptionResults = useQuerySubscription(arg, options)\r\n const queryStateResults = useQueryState(arg, {\r\n selectFromResult:\r\n arg === skipToken || options?.skip\r\n ? undefined\r\n : noPendingQueryStateSelector,\r\n ...options,\r\n })\r\n\r\n const { data, status, isLoading, isSuccess, isError, error } =\r\n queryStateResults\r\n useDebugValue({ data, status, isLoading, isSuccess, isError, error })\r\n\r\n return useMemo(\r\n () => ({ ...queryStateResults, ...querySubscriptionResults }),\r\n [queryStateResults, querySubscriptionResults]\r\n )\r\n },\r\n }\r\n }\r\n\r\n function buildMutationHook(name: string): UseMutation {\r\n return ({\r\n selectFromResult = defaultMutationStateSelector,\r\n fixedCacheKey,\r\n } = {}) => {\r\n const { select, initiate } = api.endpoints[name] as ApiEndpointMutation<\r\n MutationDefinition,\r\n Definitions\r\n >\r\n const dispatch = useDispatch>()\r\n const [promise, setPromise] = useState>()\r\n\r\n useEffect(\r\n () => () => {\r\n if (!promise?.arg.fixedCacheKey) {\r\n promise?.reset()\r\n }\r\n },\r\n [promise]\r\n )\r\n\r\n const triggerMutation = useCallback(\r\n function (arg: Parameters['0']) {\r\n const promise = dispatch(initiate(arg, { fixedCacheKey }))\r\n setPromise(promise)\r\n return promise\r\n },\r\n [dispatch, initiate, fixedCacheKey]\r\n )\r\n\r\n const { requestId } = promise || {}\r\n const mutationSelector = useMemo(\r\n () =>\r\n createSelector(\r\n [select({ fixedCacheKey, requestId: promise?.requestId })],\r\n selectFromResult\r\n ),\r\n [select, promise, selectFromResult, fixedCacheKey]\r\n )\r\n\r\n const currentState = useSelector(mutationSelector, shallowEqual)\r\n const originalArgs =\r\n fixedCacheKey == null ? promise?.arg.originalArgs : undefined\r\n const reset = useCallback(() => {\r\n batch(() => {\r\n if (promise) {\r\n setPromise(undefined)\r\n }\r\n if (fixedCacheKey) {\r\n dispatch(\r\n api.internalActions.removeMutationResult({\r\n requestId,\r\n fixedCacheKey,\r\n })\r\n )\r\n }\r\n })\r\n }, [dispatch, fixedCacheKey, promise, requestId])\r\n\r\n const {\r\n endpointName,\r\n data,\r\n status,\r\n isLoading,\r\n isSuccess,\r\n isError,\r\n error,\r\n } = currentState\r\n useDebugValue({\r\n endpointName,\r\n data,\r\n status,\r\n isLoading,\r\n isSuccess,\r\n isError,\r\n error,\r\n })\r\n\r\n const finalState = useMemo(\r\n () => ({ ...currentState, originalArgs, reset }),\r\n [currentState, originalArgs, reset]\r\n )\r\n\r\n return useMemo(\r\n () => [triggerMutation, finalState] as const,\r\n [triggerMutation, finalState]\r\n )\r\n }\r\n }\r\n}\r\n","export function capitalize(str: string) {\r\n return str.replace(str[0], str[0].toUpperCase())\r\n}\r\n","export type Id = { [K in keyof T]: T[K] } & {}\r\nexport type WithRequiredProp = Omit &\r\n Required>\r\nexport type Override = T2 extends any ? Omit & T2 : never\r\nexport function assertCast(v: any): asserts v is T {}\r\n\r\nexport function safeAssign(\r\n target: T,\r\n ...args: Array>>\r\n) {\r\n Object.assign(target, ...args)\r\n}\r\n\r\n/**\r\n * Convert a Union type `(A|B)` to an intersection type `(A&B)`\r\n */\r\nexport type UnionToIntersection = (\r\n U extends any ? (k: U) => void : never\r\n) extends (k: infer I) => void\r\n ? I\r\n : never\r\n\r\nexport type NonOptionalKeys = {\r\n [K in keyof T]-?: undefined extends T[K] ? never : K\r\n}[keyof T]\r\n\r\nexport type HasRequiredProps = NonOptionalKeys extends never\r\n ? False\r\n : True\r\n\r\nexport type OptionalIfAllPropsOptional = HasRequiredProps\r\n\r\nexport type NoInfer = [T][T extends any ? 0 : never]\r\n\r\nexport type UnwrapPromise = T extends PromiseLike ? V : T\r\n\r\nexport type MaybePromise = T | PromiseLike\r\n\r\nexport type OmitFromUnion = T extends any\r\n ? Omit\r\n : never\r\n\r\nexport type IsAny = true | false extends (\r\n T extends never ? true : false\r\n)\r\n ? True\r\n : False\r\n\r\nexport type CastAny = IsAny\r\n","import type { MutationHooks, QueryHooks } from './buildHooks'\r\nimport { buildHooks } from './buildHooks'\r\nimport { isQueryDefinition, isMutationDefinition } from '../endpointDefinitions'\r\nimport type {\r\n EndpointDefinitions,\r\n QueryDefinition,\r\n MutationDefinition,\r\n QueryArgFrom,\r\n} from '@reduxjs/toolkit/dist/query/endpointDefinitions'\r\nimport type { Api, Module } from '../apiTypes'\r\nimport { capitalize } from '../utils'\r\nimport { safeAssign } from '../tsHelpers'\r\nimport type { BaseQueryFn } from '@reduxjs/toolkit/dist/query/baseQueryTypes'\r\n\r\nimport type { HooksWithUniqueNames } from './namedHooks'\r\n\r\nimport {\r\n useDispatch as rrUseDispatch,\r\n useSelector as rrUseSelector,\r\n useStore as rrUseStore,\r\n batch as rrBatch,\r\n} from 'react-redux'\r\nimport type { QueryKeys } from '../core/apiState'\r\nimport type { PrefetchOptions } from '../core/module'\r\n\r\nexport const reactHooksModuleName = /* @__PURE__ */ Symbol()\r\nexport type ReactHooksModule = typeof reactHooksModuleName\r\n\r\ndeclare module '@reduxjs/toolkit/dist/query/apiTypes' {\r\n export interface ApiModules<\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n BaseQuery extends BaseQueryFn,\r\n Definitions extends EndpointDefinitions,\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n ReducerPath extends string,\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n TagTypes extends string\r\n > {\r\n [reactHooksModuleName]: {\r\n /**\r\n * Endpoints based on the input endpoints provided to `createApi`, containing `select`, `hooks` and `action matchers`.\r\n */\r\n endpoints: {\r\n [K in keyof Definitions]: Definitions[K] extends QueryDefinition<\r\n any,\r\n any,\r\n any,\r\n any,\r\n any\r\n >\r\n ? QueryHooks\r\n : Definitions[K] extends MutationDefinition\r\n ? MutationHooks\r\n : never\r\n }\r\n /**\r\n * A hook that accepts a string endpoint name, and provides a callback that when called, pre-fetches the data for that endpoint.\r\n */\r\n usePrefetch>(\r\n endpointName: EndpointName,\r\n options?: PrefetchOptions\r\n ): (\r\n arg: QueryArgFrom,\r\n options?: PrefetchOptions\r\n ) => void\r\n } & HooksWithUniqueNames\r\n }\r\n}\r\n\r\ntype RR = typeof import('react-redux')\r\n\r\nexport interface ReactHooksModuleOptions {\r\n /**\r\n * The version of the `batchedUpdates` function to be used\r\n */\r\n batch?: RR['batch']\r\n /**\r\n * The version of the `useDispatch` hook to be used\r\n */\r\n useDispatch?: RR['useDispatch']\r\n /**\r\n * The version of the `useSelector` hook to be used\r\n */\r\n useSelector?: RR['useSelector']\r\n /**\r\n * The version of the `useStore` hook to be used\r\n */\r\n useStore?: RR['useStore']\r\n /**\r\n * Enables performing asynchronous tasks immediately within a render.\r\n *\r\n * @example\r\n *\r\n * ```ts\r\n * import {\r\n * buildCreateApi,\r\n * coreModule,\r\n * reactHooksModule\r\n * } from '@reduxjs/toolkit/query/react'\r\n *\r\n * const createApi = buildCreateApi(\r\n * coreModule(),\r\n * reactHooksModule({ unstable__sideEffectsInRender: true })\r\n * )\r\n * ```\r\n */\r\n unstable__sideEffectsInRender?: boolean\r\n}\r\n\r\n/**\r\n * Creates a module that generates react hooks from endpoints, for use with `buildCreateApi`.\r\n *\r\n * @example\r\n * ```ts\r\n * const MyContext = React.createContext(null as any);\r\n * const customCreateApi = buildCreateApi(\r\n * coreModule(),\r\n * reactHooksModule({ useDispatch: createDispatchHook(MyContext) })\r\n * );\r\n * ```\r\n *\r\n * @returns A module for use with `buildCreateApi`\r\n */\r\nexport const reactHooksModule = ({\r\n batch = rrBatch,\r\n useDispatch = rrUseDispatch,\r\n useSelector = rrUseSelector,\r\n useStore = rrUseStore,\r\n unstable__sideEffectsInRender = false,\r\n}: ReactHooksModuleOptions = {}): Module => ({\r\n name: reactHooksModuleName,\r\n init(api, { serializeQueryArgs }, context) {\r\n const anyApi = api as any as Api<\r\n any,\r\n Record,\r\n string,\r\n string,\r\n ReactHooksModule\r\n >\r\n const { buildQueryHooks, buildMutationHook, usePrefetch } = buildHooks({\r\n api,\r\n moduleOptions: {\r\n batch,\r\n useDispatch,\r\n useSelector,\r\n useStore,\r\n unstable__sideEffectsInRender,\r\n },\r\n serializeQueryArgs,\r\n context,\r\n })\r\n safeAssign(anyApi, { usePrefetch })\r\n safeAssign(context, { batch })\r\n\r\n return {\r\n injectEndpoint(endpointName, definition) {\r\n if (isQueryDefinition(definition)) {\r\n const {\r\n useQuery,\r\n useLazyQuery,\r\n useLazyQuerySubscription,\r\n useQueryState,\r\n useQuerySubscription,\r\n } = buildQueryHooks(endpointName)\r\n safeAssign(anyApi.endpoints[endpointName], {\r\n useQuery,\r\n useLazyQuery,\r\n useLazyQuerySubscription,\r\n useQueryState,\r\n useQuerySubscription,\r\n })\r\n ;(api as any)[`use${capitalize(endpointName)}Query`] = useQuery\r\n ;(api as any)[`useLazy${capitalize(endpointName)}Query`] =\r\n useLazyQuery\r\n } else if (isMutationDefinition(definition)) {\r\n const useMutation = buildMutationHook(endpointName)\r\n safeAssign(anyApi.endpoints[endpointName], {\r\n useMutation,\r\n })\r\n ;(api as any)[`use${capitalize(endpointName)}Mutation`] = useMutation\r\n }\r\n },\r\n }\r\n },\r\n})\r\n","import { coreModule, buildCreateApi, CreateApi } from '@reduxjs/toolkit/query'\r\nimport { reactHooksModule, reactHooksModuleName } from './module'\r\n\r\nimport type { MutationHooks, QueryHooks } from './buildHooks'\r\nimport type {\r\n EndpointDefinitions,\r\n QueryDefinition,\r\n MutationDefinition,\r\n QueryArgFrom,\r\n} from '@reduxjs/toolkit/dist/query/endpointDefinitions'\r\nimport type { BaseQueryFn } from '@reduxjs/toolkit/dist/query/baseQueryTypes'\r\n\r\nimport type { QueryKeys } from '@reduxjs/toolkit/dist/query/core/apiState'\r\nimport type { PrefetchOptions } from '@reduxjs/toolkit/dist/query/core/module'\r\n\r\nexport * from '@reduxjs/toolkit/query'\r\nexport { ApiProvider } from './ApiProvider'\r\n\r\nconst createApi = /* @__PURE__ */ buildCreateApi(\r\n coreModule(),\r\n reactHooksModule()\r\n)\r\n\r\nexport type {\r\n TypedUseQueryHookResult,\r\n TypedUseQueryStateResult,\r\n TypedUseQuerySubscriptionResult,\r\n TypedUseMutationResult,\r\n} from './buildHooks'\r\nexport { createApi, reactHooksModule }\r\n","import { createApi, fetchBaseQuery } from \"@reduxjs/toolkit/query/react\";\n\nexport const apiSlice = createApi({\n reducerPath: \"api\",\n baseQuery: fetchBaseQuery({\n baseUrl: \"https://api.mmitsol.com/\",\n // baseUrl: \"http://localhost:5001\",\n \n prepareHeaders: (headers, { getState }) => {\n const token = localStorage.getItem(\"token\");\n\n if (token) {\n headers.set(\"authorization\", `Bearer ${token}`);\n }\n\n return headers;\n },\n }),\n refetchOnFocus: false,\n refetchOnReconnect: true,\n tagTypes: [\n \"Login\",\n \"ListeningTests\"\n ],\n endpoints: (builder) => ({\n // your endpoints here\n }),\n});\n","function SuspenseContent(){\n return(\n
    \n Loading...\n
    \n )\n}\n\nexport default SuspenseContent","import { createSlice } from '@reduxjs/toolkit'\n\nexport const headerSlice = createSlice({\n name: 'header',\n initialState: {\n pageTitle: \"Home\", // current page title state management\n noOfNotifications : 15, // no of unread notifications\n newNotificationMessage : \"\", // message of notification to be shown\n newNotificationStatus : 1, // to check the notification type - success/ error/ info\n },\n reducers: {\n setPageTitle: (state, action) => {\n state.pageTitle = action.payload.title\n },\n\n\n removeNotificationMessage: (state, action) => {\n state.newNotificationMessage = \"\"\n },\n\n showNotification: (state, action) => {\n state.newNotificationMessage = action.payload.message\n state.newNotificationStatus = action.payload.status\n },\n }\n})\n\nexport const { setPageTitle, removeNotificationMessage, showNotification } = headerSlice.actions\n\nexport default headerSlice.reducer","import { createSlice } from '@reduxjs/toolkit'\n\nexport const modalSlice = createSlice({\n name: 'modal',\n initialState: {\n title: \"\", // current title state management\n isOpen : false, // modal state management for opening closing\n bodyType : \"\", // modal content management\n size : \"\", // modal content management\n extraObject : {}, \n },\n reducers: {\n\n openModal: (state, action) => {\n const {title, bodyType, extraObject, size} = action.payload\n state.isOpen = true\n state.bodyType = bodyType\n state.title = title\n state.size = size || 'md'\n state.extraObject = extraObject\n },\n\n closeModal: (state, action) => {\n state.isOpen = false\n state.bodyType = \"\"\n state.title = \"\"\n state.extraObject = {}\n },\n\n }\n})\n\nexport const { openModal, closeModal } = modalSlice.actions\n\nexport default modalSlice.reducer","import { createSlice } from '@reduxjs/toolkit'\n\nexport const rightDrawerSlice = createSlice({\n name: 'rightDrawer',\n initialState: {\n header: \"\", // current title state management\n isOpen : false, // right drawer state management for opening closing\n bodyType : \"\", // right drawer content management\n extraObject : {}, \n },\n reducers: {\n\n openRightDrawer: (state, action) => {\n const {header, bodyType, extraObject} = action.payload\n state.isOpen = true\n state.bodyType = bodyType\n state.header = header\n state.extraObject = extraObject\n },\n\n closeRightDrawer: (state, action) => {\n state.isOpen = false\n state.bodyType = \"\"\n state.header = \"\"\n state.extraObject = {}\n },\n\n }\n})\n\nexport const { openRightDrawer, closeRightDrawer } = rightDrawerSlice.actions\n\nexport default rightDrawerSlice.reducer","import { apiSlice } from \"../../app/apiSlice\";\n\nexport const listeningTestSlice = apiSlice.injectEndpoints({\n endpoints: (builder) => ({\n // Fetch all listening tests\n getAllListeningTests: builder.query({\n query: () => \"/api/listening-tests\",\n providesTags: [\"ListeningTests\"],\n refetchOnMountOrArgChange: true,\n }),\n\n // Fetch a single listening test by ID\n getSingleListeningTest: builder.query({\n query: (testId) => `/api/listening-tests/${testId}`,\n providesTags: (result, error, testId) => [{ type: \"ListeningTest\", id: testId }],\n }),\n\n // Submit Test (Mutation)\n submitTest: builder.mutation({\n query: ({ testId, answers }) => ({\n url: `/api/listening-tests/${testId}/submit`,\n method: \"POST\",\n body: { answers },\n headers: {\n Authorization: `Bearer ${localStorage.getItem(\"token\")}`, // Retrieve JWT token\n \"Content-Type\": \"application/json\",\n },\n }),\n invalidatesTags: [\"ListeningTests\"],\n }),\n\n // Get Test Results\n getTestResults: builder.query({\n query: (testId) => ({\n url: `/api/listening-tests/${testId}/results`,\n // headers: { Authorization: `Bearer ${localStorage.getItem(\"token\")}` }, // Uncomment if needed\n }),\n invalidatesTags: [\"ListeningTests\"],\n refetchOnMountOrArgChange: true,\n }),\n\n // Get Answer Key\n getAnswerKey: builder.query({\n query: (testId) => `/api/listening-tests/${testId}/answer-key`,\n providesTags: [\"ListeningTests\"],\n refetchOnMountOrArgChange: true,\n }),\n }),\n});\n\nexport const { \n useGetAllListeningTestsQuery, \n useGetSingleListeningTestQuery, \n useSubmitTestMutation,\n useGetTestResultsQuery,\n useGetAnswerKeyQuery\n} = listeningTestSlice;\n","import { createSlice, createAsyncThunk } from '@reduxjs/toolkit'\nimport axios from 'axios'\n\n\n\nexport const getLeadsContent = createAsyncThunk('/leads/content', async () => {\n\tconst response = await axios.get('/api/users?page=2', {})\n\treturn response.data;\n})\n\nexport const leadsSlice = createSlice({\n name: 'leads',\n initialState: {\n isLoading: false,\n leads : []\n },\n reducers: {\n\n\n addNewLead: (state, action) => {\n let {newLeadObj} = action.payload\n state.leads = [...state.leads, newLeadObj]\n },\n\n deleteLead: (state, action) => {\n let {index} = action.payload\n state.leads.splice(index, 1)\n }\n },\n\n extraReducers: {\n\t\t[getLeadsContent.pending]: state => {\n\t\t\tstate.isLoading = true\n\t\t},\n\t\t[getLeadsContent.fulfilled]: (state, action) => {\n\t\t\tstate.leads = action.payload.data\n\t\t\tstate.isLoading = false\n\t\t},\n\t\t[getLeadsContent.rejected]: state => {\n\t\t\tstate.isLoading = false\n\t\t},\n }\n})\n\nexport const { addNewLead, deleteLead } = leadsSlice.actions\n\nexport default leadsSlice.reducer","import type { SerializedError } from '@reduxjs/toolkit'\r\nimport type { BaseQueryError } from '../baseQueryTypes'\r\nimport type {\r\n QueryDefinition,\r\n MutationDefinition,\r\n EndpointDefinitions,\r\n BaseEndpointDefinition,\r\n ResultTypeFrom,\r\n QueryArgFrom,\r\n} from '../endpointDefinitions'\r\nimport type { Id, WithRequiredProp } from '../tsHelpers'\r\n\r\nexport type QueryCacheKey = string & { _type: 'queryCacheKey' }\r\nexport type QuerySubstateIdentifier = { queryCacheKey: QueryCacheKey }\r\nexport type MutationSubstateIdentifier =\r\n | {\r\n requestId: string\r\n fixedCacheKey?: string\r\n }\r\n | {\r\n requestId?: string\r\n fixedCacheKey: string\r\n }\r\n\r\nexport type RefetchConfigOptions = {\r\n refetchOnMountOrArgChange: boolean | number\r\n refetchOnReconnect: boolean\r\n refetchOnFocus: boolean\r\n}\r\n\r\n/**\r\n * Strings describing the query state at any given time.\r\n */\r\nexport enum QueryStatus {\r\n uninitialized = 'uninitialized',\r\n pending = 'pending',\r\n fulfilled = 'fulfilled',\r\n rejected = 'rejected',\r\n}\r\n\r\nexport type RequestStatusFlags =\r\n | {\r\n status: QueryStatus.uninitialized\r\n isUninitialized: true\r\n isLoading: false\r\n isSuccess: false\r\n isError: false\r\n }\r\n | {\r\n status: QueryStatus.pending\r\n isUninitialized: false\r\n isLoading: true\r\n isSuccess: false\r\n isError: false\r\n }\r\n | {\r\n status: QueryStatus.fulfilled\r\n isUninitialized: false\r\n isLoading: false\r\n isSuccess: true\r\n isError: false\r\n }\r\n | {\r\n status: QueryStatus.rejected\r\n isUninitialized: false\r\n isLoading: false\r\n isSuccess: false\r\n isError: true\r\n }\r\n\r\nexport function getRequestStatusFlags(status: QueryStatus): RequestStatusFlags {\r\n return {\r\n status,\r\n isUninitialized: status === QueryStatus.uninitialized,\r\n isLoading: status === QueryStatus.pending,\r\n isSuccess: status === QueryStatus.fulfilled,\r\n isError: status === QueryStatus.rejected,\r\n } as any\r\n}\r\n\r\nexport type SubscriptionOptions = {\r\n /**\r\n * How frequently to automatically re-fetch data (in milliseconds). Defaults to `0` (off).\r\n */\r\n pollingInterval?: number\r\n /**\r\n * Defaults to `false`. This setting allows you to control whether RTK Query will try to refetch all subscribed queries after regaining a network connection.\r\n *\r\n * If you specify this option alongside `skip: true`, this **will not be evaluated** until `skip` is false.\r\n *\r\n * Note: requires [`setupListeners`](./setupListeners) to have been called.\r\n */\r\n refetchOnReconnect?: boolean\r\n /**\r\n * Defaults to `false`. This setting allows you to control whether RTK Query will try to refetch all subscribed queries after the application window regains focus.\r\n *\r\n * If you specify this option alongside `skip: true`, this **will not be evaluated** until `skip` is false.\r\n *\r\n * Note: requires [`setupListeners`](./setupListeners) to have been called.\r\n */\r\n refetchOnFocus?: boolean\r\n}\r\nexport type Subscribers = { [requestId: string]: SubscriptionOptions }\r\nexport type QueryKeys = {\r\n [K in keyof Definitions]: Definitions[K] extends QueryDefinition<\r\n any,\r\n any,\r\n any,\r\n any\r\n >\r\n ? K\r\n : never\r\n}[keyof Definitions]\r\nexport type MutationKeys = {\r\n [K in keyof Definitions]: Definitions[K] extends MutationDefinition<\r\n any,\r\n any,\r\n any,\r\n any\r\n >\r\n ? K\r\n : never\r\n}[keyof Definitions]\r\n\r\ntype BaseQuerySubState> = {\r\n /**\r\n * The argument originally passed into the hook or `initiate` action call\r\n */\r\n originalArgs: QueryArgFrom\r\n /**\r\n * A unique ID associated with the request\r\n */\r\n requestId: string\r\n /**\r\n * The received data from the query\r\n */\r\n data?: ResultTypeFrom\r\n /**\r\n * The received error if applicable\r\n */\r\n error?:\r\n | SerializedError\r\n | (D extends QueryDefinition\r\n ? BaseQueryError\r\n : never)\r\n /**\r\n * The name of the endpoint associated with the query\r\n */\r\n endpointName: string\r\n /**\r\n * Time that the latest query started\r\n */\r\n startedTimeStamp: number\r\n /**\r\n * Time that the latest query was fulfilled\r\n */\r\n fulfilledTimeStamp?: number\r\n}\r\n\r\nexport type QuerySubState> = Id<\r\n | ({\r\n status: QueryStatus.fulfilled\r\n } & WithRequiredProp<\r\n BaseQuerySubState,\r\n 'data' | 'fulfilledTimeStamp'\r\n > & { error: undefined })\r\n | ({\r\n status: QueryStatus.pending\r\n } & BaseQuerySubState)\r\n | ({\r\n status: QueryStatus.rejected\r\n } & WithRequiredProp, 'error'>)\r\n | {\r\n status: QueryStatus.uninitialized\r\n originalArgs?: undefined\r\n data?: undefined\r\n error?: undefined\r\n requestId?: undefined\r\n endpointName?: string\r\n startedTimeStamp?: undefined\r\n fulfilledTimeStamp?: undefined\r\n }\r\n>\r\n\r\ntype BaseMutationSubState> = {\r\n requestId: string\r\n data?: ResultTypeFrom\r\n error?:\r\n | SerializedError\r\n | (D extends MutationDefinition\r\n ? BaseQueryError\r\n : never)\r\n endpointName: string\r\n startedTimeStamp: number\r\n fulfilledTimeStamp?: number\r\n}\r\n\r\nexport type MutationSubState> =\r\n | (({\r\n status: QueryStatus.fulfilled\r\n } & WithRequiredProp<\r\n BaseMutationSubState,\r\n 'data' | 'fulfilledTimeStamp'\r\n >) & { error: undefined })\r\n | (({\r\n status: QueryStatus.pending\r\n } & BaseMutationSubState) & { data?: undefined })\r\n | ({\r\n status: QueryStatus.rejected\r\n } & WithRequiredProp, 'error'>)\r\n | {\r\n requestId?: undefined\r\n status: QueryStatus.uninitialized\r\n data?: undefined\r\n error?: undefined\r\n endpointName?: string\r\n startedTimeStamp?: undefined\r\n fulfilledTimeStamp?: undefined\r\n }\r\n\r\nexport type CombinedState<\r\n D extends EndpointDefinitions,\r\n E extends string,\r\n ReducerPath extends string\r\n> = {\r\n queries: QueryState\r\n mutations: MutationState\r\n provided: InvalidationState\r\n subscriptions: SubscriptionState\r\n config: ConfigState\r\n}\r\n\r\nexport type InvalidationState = {\r\n [_ in TagTypes]: {\r\n [id: string]: Array\r\n [id: number]: Array\r\n }\r\n}\r\n\r\nexport type QueryState = {\r\n [queryCacheKey: string]: QuerySubState | undefined\r\n}\r\n\r\nexport type SubscriptionState = {\r\n [queryCacheKey: string]: Subscribers | undefined\r\n}\r\n\r\nexport type ConfigState = RefetchConfigOptions & {\r\n reducerPath: ReducerPath\r\n online: boolean\r\n focused: boolean\r\n middlewareRegistered: boolean | 'conflict'\r\n} & ModifiableConfigState\r\n\r\nexport type ModifiableConfigState = {\r\n keepUnusedDataFor: number\r\n} & RefetchConfigOptions\r\n\r\nexport type MutationState = {\r\n [requestId: string]: MutationSubState | undefined\r\n}\r\n\r\nexport type RootState<\r\n Definitions extends EndpointDefinitions,\r\n TagTypes extends string,\r\n ReducerPath extends string\r\n> = {\r\n [P in ReducerPath]: CombinedState\r\n}\r\n","import { isAbsoluteUrl } from './isAbsoluteUrl'\r\n\r\nconst withoutTrailingSlash = (url: string) => url.replace(/\\/$/, '')\r\nconst withoutLeadingSlash = (url: string) => url.replace(/^\\//, '')\r\n\r\nexport function joinUrls(\r\n base: string | undefined,\r\n url: string | undefined\r\n): string {\r\n if (!base) {\r\n return url!\r\n }\r\n if (!url) {\r\n return base\r\n }\r\n\r\n if (isAbsoluteUrl(url)) {\r\n return url\r\n }\r\n\r\n const delimiter = base.endsWith('/') || !url.startsWith('?') ? '/' : ''\r\n base = withoutTrailingSlash(base)\r\n url = withoutLeadingSlash(url)\r\n\r\n return `${base}${delimiter}${url}`;\r\n}\r\n","/**\r\n * If either :// or // is present consider it to be an absolute url\r\n *\r\n * @param url string\r\n */\r\n\r\nexport function isAbsoluteUrl(url: string) {\r\n return new RegExp(`(^|:)//`).test(url)\r\n}\r\n","/**\r\n * Alternative to `Array.flat(1)`\r\n * @param arr An array like [1,2,3,[1,2]]\r\n * @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat\r\n */\r\nexport const flatten = (arr: readonly any[]) => [].concat(...arr)\r\n","import { isPlainObject as _iPO } from '@reduxjs/toolkit'\r\n\r\n// remove type guard\r\nconst isPlainObject: (_: any) => boolean = _iPO\r\n\r\nexport function copyWithStructuralSharing(oldObj: any, newObj: T): T\r\nexport function copyWithStructuralSharing(oldObj: any, newObj: any): any {\r\n if (\r\n oldObj === newObj ||\r\n !(\r\n (isPlainObject(oldObj) && isPlainObject(newObj)) ||\r\n (Array.isArray(oldObj) && Array.isArray(newObj))\r\n )\r\n ) {\r\n return newObj\r\n }\r\n const newKeys = Object.keys(newObj)\r\n const oldKeys = Object.keys(oldObj)\r\n\r\n let isSameObject = newKeys.length === oldKeys.length\r\n const mergeObj: any = Array.isArray(newObj) ? [] : {}\r\n for (const key of newKeys) {\r\n mergeObj[key] = copyWithStructuralSharing(oldObj[key], newObj[key])\r\n if (isSameObject) isSameObject = oldObj[key] === mergeObj[key]\r\n }\r\n return isSameObject ? oldObj : mergeObj\r\n}\r\n","import { joinUrls } from './utils'\r\nimport { isPlainObject } from '@reduxjs/toolkit'\r\nimport type { BaseQueryApi, BaseQueryFn } from './baseQueryTypes'\r\nimport type { MaybePromise, Override } from './tsHelpers'\r\n\r\nexport type ResponseHandler =\r\n | 'content-type'\r\n | 'json'\r\n | 'text'\r\n | ((response: Response) => Promise)\r\n\r\ntype CustomRequestInit = Override<\r\n RequestInit,\r\n {\r\n headers?:\r\n | Headers\r\n | string[][]\r\n | Record\r\n | undefined\r\n }\r\n>\r\n\r\nexport interface FetchArgs extends CustomRequestInit {\r\n url: string\r\n params?: Record\r\n body?: any\r\n responseHandler?: ResponseHandler\r\n validateStatus?: (response: Response, body: any) => boolean\r\n /**\r\n * A number in milliseconds that represents that maximum time a request can take before timing out.\r\n */\r\n timeout?: number\r\n}\r\n\r\n/**\r\n * A mini-wrapper that passes arguments straight through to\r\n * {@link [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)}.\r\n * Avoids storing `fetch` in a closure, in order to permit mocking/monkey-patching.\r\n */\r\nconst defaultFetchFn: typeof fetch = (...args) => fetch(...args)\r\n\r\nconst defaultValidateStatus = (response: Response) =>\r\n response.status >= 200 && response.status <= 299\r\n\r\nconst defaultIsJsonContentType = (headers: Headers) =>\r\n /*applicat*/ /ion\\/(vnd\\.api\\+)?json/.test(headers.get('content-type') || '')\r\n\r\nexport type FetchBaseQueryError =\r\n | {\r\n /**\r\n * * `number`:\r\n * HTTP status code\r\n */\r\n status: number\r\n data: unknown\r\n }\r\n | {\r\n /**\r\n * * `\"FETCH_ERROR\"`:\r\n * An error that occurred during execution of `fetch` or the `fetchFn` callback option\r\n **/\r\n status: 'FETCH_ERROR'\r\n data?: undefined\r\n error: string\r\n }\r\n | {\r\n /**\r\n * * `\"PARSING_ERROR\"`:\r\n * An error happened during parsing.\r\n * Most likely a non-JSON-response was returned with the default `responseHandler` \"JSON\",\r\n * or an error occurred while executing a custom `responseHandler`.\r\n **/\r\n status: 'PARSING_ERROR'\r\n originalStatus: number\r\n data: string\r\n error: string\r\n }\r\n | {\r\n /**\r\n * * `\"TIMEOUT_ERROR\"`:\r\n * Request timed out\r\n **/\r\n status: 'TIMEOUT_ERROR'\r\n data?: undefined\r\n error: string\r\n }\r\n | {\r\n /**\r\n * * `\"CUSTOM_ERROR\"`:\r\n * A custom error type that you can return from your `queryFn` where another error might not make sense.\r\n **/\r\n status: 'CUSTOM_ERROR'\r\n data?: unknown\r\n error: string\r\n }\r\n\r\nfunction stripUndefined(obj: any) {\r\n if (!isPlainObject(obj)) {\r\n return obj\r\n }\r\n const copy: Record = { ...obj }\r\n for (const [k, v] of Object.entries(copy)) {\r\n if (v === undefined) delete copy[k]\r\n }\r\n return copy\r\n}\r\n\r\nexport type FetchBaseQueryArgs = {\r\n baseUrl?: string\r\n prepareHeaders?: (\r\n headers: Headers,\r\n api: Pick<\r\n BaseQueryApi,\r\n 'getState' | 'extra' | 'endpoint' | 'type' | 'forced'\r\n >\r\n ) => MaybePromise\r\n fetchFn?: (\r\n input: RequestInfo,\r\n init?: RequestInit | undefined\r\n ) => Promise\r\n paramsSerializer?: (params: Record) => string\r\n /**\r\n * By default, we only check for 'application/json' and 'application/vnd.api+json' as the content-types for json. If you need to support another format, you can pass\r\n * in a predicate function for your given api to get the same automatic stringifying behavior\r\n * @example\r\n * ```ts\r\n * const isJsonContentType = (headers: Headers) => [\"application/vnd.api+json\", \"application/json\", \"application/vnd.hal+json\"].includes(headers.get(\"content-type\")?.trim());\r\n * ```\r\n */\r\n isJsonContentType?: (headers: Headers) => boolean\r\n /**\r\n * Defaults to `application/json`;\r\n */\r\n jsonContentType?: string\r\n} & RequestInit &\r\n Pick\r\n\r\nexport type FetchBaseQueryMeta = { request: Request; response?: Response }\r\n\r\n/**\r\n * This is a very small wrapper around fetch that aims to simplify requests.\r\n *\r\n * @example\r\n * ```ts\r\n * const baseQuery = fetchBaseQuery({\r\n * baseUrl: 'https://api.your-really-great-app.com/v1/',\r\n * prepareHeaders: (headers, { getState }) => {\r\n * const token = (getState() as RootState).auth.token;\r\n * // If we have a token set in state, let's assume that we should be passing it.\r\n * if (token) {\r\n * headers.set('authorization', `Bearer ${token}`);\r\n * }\r\n * return headers;\r\n * },\r\n * })\r\n * ```\r\n *\r\n * @param {string} baseUrl\r\n * The base URL for an API service.\r\n * Typically in the format of https://example.com/\r\n *\r\n * @param {(headers: Headers, api: { getState: () => unknown; extra: unknown; endpoint: string; type: 'query' | 'mutation'; forced: boolean; }) => Headers} prepareHeaders\r\n * An optional function that can be used to inject headers on requests.\r\n * Provides a Headers object, as well as most of the `BaseQueryApi` (`dispatch` is not available).\r\n * Useful for setting authentication or headers that need to be set conditionally.\r\n *\r\n * @link https://developer.mozilla.org/en-US/docs/Web/API/Headers\r\n *\r\n * @param {(input: RequestInfo, init?: RequestInit | undefined) => Promise} fetchFn\r\n * Accepts a custom `fetch` function if you do not want to use the default on the window.\r\n * Useful in SSR environments if you need to use a library such as `isomorphic-fetch` or `cross-fetch`\r\n *\r\n * @param {(params: Record) => string} paramsSerializer\r\n * An optional function that can be used to stringify querystring parameters.\r\n *\r\n * @param {(headers: Headers) => boolean} isJsonContentType\r\n * An optional predicate function to determine if `JSON.stringify()` should be called on the `body` arg of `FetchArgs`\r\n *\r\n * @param {string} jsonContentType Used when automatically setting the content-type header for a request with a jsonifiable body that does not have an explicit content-type header. Defaults to `application/json`.\r\n *\r\n * @param {number} timeout\r\n * A number in milliseconds that represents the maximum time a request can take before timing out.\r\n */\r\nexport function fetchBaseQuery({\r\n baseUrl,\r\n prepareHeaders = (x) => x,\r\n fetchFn = defaultFetchFn,\r\n paramsSerializer,\r\n isJsonContentType = defaultIsJsonContentType,\r\n jsonContentType = 'application/json',\r\n timeout: defaultTimeout,\r\n validateStatus: globalValidateStatus,\r\n ...baseFetchOptions\r\n}: FetchBaseQueryArgs = {}): BaseQueryFn<\r\n string | FetchArgs,\r\n unknown,\r\n FetchBaseQueryError,\r\n {},\r\n FetchBaseQueryMeta\r\n> {\r\n if (typeof fetch === 'undefined' && fetchFn === defaultFetchFn) {\r\n console.warn(\r\n 'Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments.'\r\n )\r\n }\r\n return async (arg, api) => {\r\n const { signal, getState, extra, endpoint, forced, type } = api\r\n let meta: FetchBaseQueryMeta | undefined\r\n let {\r\n url,\r\n method = 'GET' as const,\r\n headers = new Headers(baseFetchOptions.headers),\r\n body = undefined,\r\n params = undefined,\r\n responseHandler = 'json' as const,\r\n validateStatus = globalValidateStatus ?? defaultValidateStatus,\r\n timeout = defaultTimeout,\r\n ...rest\r\n } = typeof arg == 'string' ? { url: arg } : arg\r\n let config: RequestInit = {\r\n ...baseFetchOptions,\r\n method,\r\n signal,\r\n body,\r\n ...rest,\r\n }\r\n\r\n headers = new Headers(stripUndefined(headers))\r\n config.headers =\r\n (await prepareHeaders(headers, {\r\n getState,\r\n extra,\r\n endpoint,\r\n forced,\r\n type,\r\n })) || headers\r\n\r\n // Only set the content-type to json if appropriate. Will not be true for FormData, ArrayBuffer, Blob, etc.\r\n const isJsonifiable = (body: any) =>\r\n typeof body === 'object' &&\r\n (isPlainObject(body) ||\r\n Array.isArray(body) ||\r\n typeof body.toJSON === 'function')\r\n\r\n if (!config.headers.has('content-type') && isJsonifiable(body)) {\r\n config.headers.set('content-type', jsonContentType)\r\n }\r\n\r\n if (isJsonifiable(body) && isJsonContentType(config.headers)) {\r\n config.body = JSON.stringify(body)\r\n }\r\n\r\n if (params) {\r\n const divider = ~url.indexOf('?') ? '&' : '?'\r\n const query = paramsSerializer\r\n ? paramsSerializer(params)\r\n : new URLSearchParams(stripUndefined(params))\r\n url += divider + query\r\n }\r\n\r\n url = joinUrls(baseUrl, url)\r\n\r\n const request = new Request(url, config)\r\n const requestClone = request.clone()\r\n meta = { request: requestClone }\r\n\r\n let response,\r\n timedOut = false,\r\n timeoutId =\r\n timeout &&\r\n setTimeout(() => {\r\n timedOut = true\r\n api.abort()\r\n }, timeout)\r\n try {\r\n response = await fetchFn(request)\r\n } catch (e) {\r\n return {\r\n error: {\r\n status: timedOut ? 'TIMEOUT_ERROR' : 'FETCH_ERROR',\r\n error: String(e),\r\n },\r\n meta,\r\n }\r\n } finally {\r\n if (timeoutId) clearTimeout(timeoutId)\r\n }\r\n const responseClone = response.clone()\r\n\r\n meta.response = responseClone\r\n\r\n let resultData: any\r\n let responseText: string = ''\r\n try {\r\n let handleResponseError\r\n await Promise.all([\r\n handleResponse(response, responseHandler).then(\r\n (r) => (resultData = r),\r\n (e) => (handleResponseError = e)\r\n ),\r\n // see https://github.com/node-fetch/node-fetch/issues/665#issuecomment-538995182\r\n // we *have* to \"use up\" both streams at the same time or they will stop running in node-fetch scenarios\r\n responseClone.text().then(\r\n (r) => (responseText = r),\r\n () => {}\r\n ),\r\n ])\r\n if (handleResponseError) throw handleResponseError\r\n } catch (e) {\r\n return {\r\n error: {\r\n status: 'PARSING_ERROR',\r\n originalStatus: response.status,\r\n data: responseText,\r\n error: String(e),\r\n },\r\n meta,\r\n }\r\n }\r\n\r\n return validateStatus(response, resultData)\r\n ? {\r\n data: resultData,\r\n meta,\r\n }\r\n : {\r\n error: {\r\n status: response.status,\r\n data: resultData,\r\n },\r\n meta,\r\n }\r\n }\r\n\r\n async function handleResponse(\r\n response: Response,\r\n responseHandler: ResponseHandler\r\n ) {\r\n if (typeof responseHandler === 'function') {\r\n return responseHandler(response)\r\n }\r\n\r\n if (responseHandler === 'content-type') {\r\n responseHandler = isJsonContentType(response.headers) ? 'json' : 'text'\r\n }\r\n\r\n if (responseHandler === 'json') {\r\n const text = await response.text()\r\n return text.length ? JSON.parse(text) : null\r\n }\r\n\r\n return response.text()\r\n }\r\n}\r\n","export class HandledError {\r\n constructor(\r\n public readonly value: any,\r\n public readonly meta: any = undefined\r\n ) {}\r\n}\r\n","import type {\r\n BaseQueryApi,\r\n BaseQueryArg,\r\n BaseQueryEnhancer,\r\n BaseQueryExtraOptions,\r\n BaseQueryFn,\r\n} from './baseQueryTypes'\r\nimport { FetchBaseQueryError } from './fetchBaseQuery'\r\nimport { HandledError } from './HandledError'\r\n\r\n/**\r\n * Exponential backoff based on the attempt number.\r\n *\r\n * @remarks\r\n * 1. 600ms * random(0.4, 1.4)\r\n * 2. 1200ms * random(0.4, 1.4)\r\n * 3. 2400ms * random(0.4, 1.4)\r\n * 4. 4800ms * random(0.4, 1.4)\r\n * 5. 9600ms * random(0.4, 1.4)\r\n *\r\n * @param attempt - Current attempt\r\n * @param maxRetries - Maximum number of retries\r\n */\r\nasync function defaultBackoff(attempt: number = 0, maxRetries: number = 5) {\r\n const attempts = Math.min(attempt, maxRetries)\r\n\r\n const timeout = ~~((Math.random() + 0.4) * (300 << attempts)) // Force a positive int in the case we make this an option\r\n await new Promise((resolve) =>\r\n setTimeout((res: any) => resolve(res), timeout)\r\n )\r\n}\r\n\r\ntype RetryConditionFunction = (\r\n error: FetchBaseQueryError,\r\n args: BaseQueryArg,\r\n extraArgs: {\r\n attempt: number\r\n baseQueryApi: BaseQueryApi\r\n extraOptions: BaseQueryExtraOptions & RetryOptions\r\n }\r\n) => boolean\r\n\r\nexport type RetryOptions = {\r\n /**\r\n * Function used to determine delay between retries\r\n */\r\n backoff?: (attempt: number, maxRetries: number) => Promise\r\n} & (\r\n | {\r\n /**\r\n * How many times the query will be retried (default: 5)\r\n */\r\n maxRetries?: number\r\n retryCondition?: undefined\r\n }\r\n | {\r\n /**\r\n * Callback to determine if a retry should be attempted.\r\n * Return `true` for another retry and `false` to quit trying prematurely.\r\n */\r\n retryCondition?: RetryConditionFunction\r\n maxRetries?: undefined\r\n }\r\n)\r\n\r\nfunction fail(e: any): never {\r\n throw Object.assign(new HandledError({ error: e }), {\r\n throwImmediately: true,\r\n })\r\n}\r\n\r\nconst EMPTY_OPTIONS = {}\r\n\r\nconst retryWithBackoff: BaseQueryEnhancer<\r\n unknown,\r\n RetryOptions,\r\n RetryOptions | void\r\n> = (baseQuery, defaultOptions) => async (args, api, extraOptions) => {\r\n // We need to figure out `maxRetries` before we define `defaultRetryCondition.\r\n // This is probably goofy, but ought to work.\r\n // Put our defaults in one array, filter out undefineds, grab the last value.\r\n const possibleMaxRetries: number[] = [\r\n 5,\r\n ((defaultOptions as any) || EMPTY_OPTIONS).maxRetries,\r\n ((extraOptions as any) || EMPTY_OPTIONS).maxRetries,\r\n ].filter(Boolean)\r\n const [maxRetries] = possibleMaxRetries.slice(-1)\r\n\r\n const defaultRetryCondition: RetryConditionFunction = (_, __, { attempt }) =>\r\n attempt <= maxRetries\r\n\r\n const options: {\r\n maxRetries: number\r\n backoff: typeof defaultBackoff\r\n retryCondition: typeof defaultRetryCondition\r\n } = {\r\n maxRetries,\r\n backoff: defaultBackoff,\r\n retryCondition: defaultRetryCondition,\r\n ...defaultOptions,\r\n ...extraOptions,\r\n }\r\n let retry = 0\r\n\r\n while (true) {\r\n try {\r\n const result = await baseQuery(args, api, extraOptions)\r\n // baseQueries _should_ return an error property, so we should check for that and throw it to continue retrying\r\n if (result.error) {\r\n throw new HandledError(result)\r\n }\r\n return result\r\n } catch (e: any) {\r\n retry++\r\n\r\n if (e.throwImmediately) {\r\n if (e instanceof HandledError) {\r\n return e.value\r\n }\r\n\r\n // We don't know what this is, so we have to rethrow it\r\n throw e\r\n }\r\n\r\n if (\r\n e instanceof HandledError &&\r\n !options.retryCondition(e.value.error as FetchBaseQueryError, args, {\r\n attempt: retry,\r\n baseQueryApi: api,\r\n extraOptions,\r\n })\r\n ) {\r\n return e.value\r\n }\r\n await options.backoff(retry, options.maxRetries)\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * A utility that can wrap `baseQuery` in the API definition to provide retries with a basic exponential backoff.\r\n *\r\n * @example\r\n *\r\n * ```ts\r\n * // codeblock-meta title=\"Retry every request 5 times by default\"\r\n * import { createApi, fetchBaseQuery, retry } from '@reduxjs/toolkit/query/react'\r\n * interface Post {\r\n * id: number\r\n * name: string\r\n * }\r\n * type PostsResponse = Post[]\r\n *\r\n * // maxRetries: 5 is the default, and can be omitted. Shown for documentation purposes.\r\n * const staggeredBaseQuery = retry(fetchBaseQuery({ baseUrl: '/' }), { maxRetries: 5 });\r\n * export const api = createApi({\r\n * baseQuery: staggeredBaseQuery,\r\n * endpoints: (build) => ({\r\n * getPosts: build.query({\r\n * query: () => ({ url: 'posts' }),\r\n * }),\r\n * getPost: build.query({\r\n * query: (id) => ({ url: `post/${id}` }),\r\n * extraOptions: { maxRetries: 8 }, // You can override the retry behavior on each endpoint\r\n * }),\r\n * }),\r\n * });\r\n *\r\n * export const { useGetPostsQuery, useGetPostQuery } = api;\r\n * ```\r\n */\r\nexport const retry = /* @__PURE__ */ Object.assign(retryWithBackoff, { fail })\r\n","import type {\r\n ThunkDispatch,\r\n ActionCreatorWithoutPayload, // Workaround for API-Extractor\r\n} from '@reduxjs/toolkit'\r\nimport { createAction } from '@reduxjs/toolkit'\r\n\r\nexport const onFocus = /* @__PURE__ */ createAction('__rtkq/focused')\r\nexport const onFocusLost = /* @__PURE__ */ createAction('__rtkq/unfocused')\r\nexport const onOnline = /* @__PURE__ */ createAction('__rtkq/online')\r\nexport const onOffline = /* @__PURE__ */ createAction('__rtkq/offline')\r\n\r\nlet initialized = false\r\n\r\n/**\r\n * A utility used to enable `refetchOnMount` and `refetchOnReconnect` behaviors.\r\n * It requires the dispatch method from your store.\r\n * Calling `setupListeners(store.dispatch)` will configure listeners with the recommended defaults,\r\n * but you have the option of providing a callback for more granular control.\r\n *\r\n * @example\r\n * ```ts\r\n * setupListeners(store.dispatch)\r\n * ```\r\n *\r\n * @param dispatch - The dispatch method from your store\r\n * @param customHandler - An optional callback for more granular control over listener behavior\r\n * @returns Return value of the handler.\r\n * The default handler returns an `unsubscribe` method that can be called to remove the listeners.\r\n */\r\nexport function setupListeners(\r\n dispatch: ThunkDispatch,\r\n customHandler?: (\r\n dispatch: ThunkDispatch,\r\n actions: {\r\n onFocus: typeof onFocus\r\n onFocusLost: typeof onFocusLost\r\n onOnline: typeof onOnline\r\n onOffline: typeof onOffline\r\n }\r\n ) => () => void\r\n) {\r\n function defaultHandler() {\r\n const handleFocus = () => dispatch(onFocus())\r\n const handleFocusLost = () => dispatch(onFocusLost())\r\n const handleOnline = () => dispatch(onOnline())\r\n const handleOffline = () => dispatch(onOffline())\r\n const handleVisibilityChange = () => {\r\n if (window.document.visibilityState === 'visible') {\r\n handleFocus()\r\n } else {\r\n handleFocusLost()\r\n }\r\n }\r\n\r\n if (!initialized) {\r\n if (typeof window !== 'undefined' && window.addEventListener) {\r\n // Handle focus events\r\n window.addEventListener(\r\n 'visibilitychange',\r\n handleVisibilityChange,\r\n false\r\n )\r\n window.addEventListener('focus', handleFocus, false)\r\n\r\n // Handle connection events\r\n window.addEventListener('online', handleOnline, false)\r\n window.addEventListener('offline', handleOffline, false)\r\n initialized = true\r\n }\r\n }\r\n const unsubscribe = () => {\r\n window.removeEventListener('focus', handleFocus)\r\n window.removeEventListener('visibilitychange', handleVisibilityChange)\r\n window.removeEventListener('online', handleOnline)\r\n window.removeEventListener('offline', handleOffline)\r\n initialized = false\r\n }\r\n return unsubscribe\r\n }\r\n\r\n return customHandler\r\n ? customHandler(dispatch, { onFocus, onFocusLost, onOffline, onOnline })\r\n : defaultHandler()\r\n}\r\n","export function isNotNullish(v: T | null | undefined): v is T {\r\n return v != null\r\n}\r\n","import type {\r\n EndpointDefinitions,\r\n QueryDefinition,\r\n MutationDefinition,\r\n QueryArgFrom,\r\n ResultTypeFrom,\r\n} from '../endpointDefinitions'\r\nimport { DefinitionType, isQueryDefinition } from '../endpointDefinitions'\r\nimport type { QueryThunk, MutationThunk, QueryThunkArg } from './buildThunks'\r\nimport type { AnyAction, ThunkAction, SerializedError } from '@reduxjs/toolkit'\r\nimport type { SubscriptionOptions, RootState } from './apiState'\r\nimport type { InternalSerializeQueryArgs } from '../defaultSerializeQueryArgs'\r\nimport type { Api, ApiContext } from '../apiTypes'\r\nimport type { ApiEndpointQuery } from './module'\r\nimport type { BaseQueryError, QueryReturnValue } from '../baseQueryTypes'\r\nimport type { QueryResultSelectorResult } from './buildSelectors'\r\nimport type { Dispatch } from 'redux'\r\nimport { isNotNullish } from '../utils/isNotNullish'\r\n\r\ndeclare module './module' {\r\n export interface ApiEndpointQuery<\r\n Definition extends QueryDefinition,\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n Definitions extends EndpointDefinitions\r\n > {\r\n initiate: StartQueryActionCreator\r\n }\r\n\r\n export interface ApiEndpointMutation<\r\n Definition extends MutationDefinition,\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n Definitions extends EndpointDefinitions\r\n > {\r\n initiate: StartMutationActionCreator\r\n }\r\n}\r\n\r\nexport const forceQueryFnSymbol = Symbol('forceQueryFn')\r\nexport const isUpsertQuery = (arg: QueryThunkArg) =>\r\n typeof arg[forceQueryFnSymbol] === 'function'\r\n\r\nexport interface StartQueryActionCreatorOptions {\r\n subscribe?: boolean\r\n forceRefetch?: boolean | number\r\n subscriptionOptions?: SubscriptionOptions\r\n [forceQueryFnSymbol]?: () => QueryReturnValue\r\n}\r\n\r\ntype StartQueryActionCreator<\r\n D extends QueryDefinition\r\n> = (\r\n arg: QueryArgFrom,\r\n options?: StartQueryActionCreatorOptions\r\n) => ThunkAction, any, any, AnyAction>\r\n\r\nexport type QueryActionCreatorResult<\r\n D extends QueryDefinition\r\n> = Promise> & {\r\n arg: QueryArgFrom\r\n requestId: string\r\n subscriptionOptions: SubscriptionOptions | undefined\r\n abort(): void\r\n unwrap(): Promise>\r\n unsubscribe(): void\r\n refetch(): QueryActionCreatorResult\r\n updateSubscriptionOptions(options: SubscriptionOptions): void\r\n queryCacheKey: string\r\n}\r\n\r\ntype StartMutationActionCreator<\r\n D extends MutationDefinition\r\n> = (\r\n arg: QueryArgFrom,\r\n options?: {\r\n /**\r\n * If this mutation should be tracked in the store.\r\n * If you just want to manually trigger this mutation using `dispatch` and don't care about the\r\n * result, state & potential errors being held in store, you can set this to false.\r\n * (defaults to `true`)\r\n */\r\n track?: boolean\r\n fixedCacheKey?: string\r\n }\r\n) => ThunkAction, any, any, AnyAction>\r\n\r\nexport type MutationActionCreatorResult<\r\n D extends MutationDefinition\r\n> = Promise<\r\n | { data: ResultTypeFrom }\r\n | {\r\n error:\r\n | Exclude<\r\n BaseQueryError<\r\n D extends MutationDefinition\r\n ? BaseQuery\r\n : never\r\n >,\r\n undefined\r\n >\r\n | SerializedError\r\n }\r\n> & {\r\n /** @internal */\r\n arg: {\r\n /**\r\n * The name of the given endpoint for the mutation\r\n */\r\n endpointName: string\r\n /**\r\n * The original arguments supplied to the mutation call\r\n */\r\n originalArgs: QueryArgFrom\r\n /**\r\n * Whether the mutation is being tracked in the store.\r\n */\r\n track?: boolean\r\n fixedCacheKey?: string\r\n }\r\n /**\r\n * A unique string generated for the request sequence\r\n */\r\n requestId: string\r\n\r\n /**\r\n * A method to cancel the mutation promise. Note that this is not intended to prevent the mutation\r\n * that was fired off from reaching the server, but only to assist in handling the response.\r\n *\r\n * Calling `abort()` prior to the promise resolving will force it to reach the error state with\r\n * the serialized error:\r\n * `{ name: 'AbortError', message: 'Aborted' }`\r\n *\r\n * @example\r\n * ```ts\r\n * const [updateUser] = useUpdateUserMutation();\r\n *\r\n * useEffect(() => {\r\n * const promise = updateUser(id);\r\n * promise\r\n * .unwrap()\r\n * .catch((err) => {\r\n * if (err.name === 'AbortError') return;\r\n * // else handle the unexpected error\r\n * })\r\n *\r\n * return () => {\r\n * promise.abort();\r\n * }\r\n * }, [id, updateUser])\r\n * ```\r\n */\r\n abort(): void\r\n /**\r\n * Unwraps a mutation call to provide the raw response/error.\r\n *\r\n * @remarks\r\n * If you need to access the error or success payload immediately after a mutation, you can chain .unwrap().\r\n *\r\n * @example\r\n * ```ts\r\n * // codeblock-meta title=\"Using .unwrap\"\r\n * addPost({ id: 1, name: 'Example' })\r\n * .unwrap()\r\n * .then((payload) => console.log('fulfilled', payload))\r\n * .catch((error) => console.error('rejected', error));\r\n * ```\r\n *\r\n * @example\r\n * ```ts\r\n * // codeblock-meta title=\"Using .unwrap with async await\"\r\n * try {\r\n * const payload = await addPost({ id: 1, name: 'Example' }).unwrap();\r\n * console.log('fulfilled', payload)\r\n * } catch (error) {\r\n * console.error('rejected', error);\r\n * }\r\n * ```\r\n */\r\n unwrap(): Promise>\r\n /**\r\n * A method to manually unsubscribe from the mutation call, meaning it will be removed from cache after the usual caching grace period.\r\n The value returned by the hook will reset to `isUninitialized` afterwards.\r\n */\r\n reset(): void\r\n /** @deprecated has been renamed to `reset` */\r\n unsubscribe(): void\r\n}\r\n\r\nexport function buildInitiate({\r\n serializeQueryArgs,\r\n queryThunk,\r\n mutationThunk,\r\n api,\r\n context,\r\n}: {\r\n serializeQueryArgs: InternalSerializeQueryArgs\r\n queryThunk: QueryThunk\r\n mutationThunk: MutationThunk\r\n api: Api\r\n context: ApiContext\r\n}) {\r\n const runningQueries: Map<\r\n Dispatch,\r\n Record | undefined>\r\n > = new Map()\r\n const runningMutations: Map<\r\n Dispatch,\r\n Record | undefined>\r\n > = new Map()\r\n\r\n const {\r\n unsubscribeQueryResult,\r\n removeMutationResult,\r\n updateSubscriptionOptions,\r\n } = api.internalActions\r\n return {\r\n buildInitiateQuery,\r\n buildInitiateMutation,\r\n getRunningQueryThunk,\r\n getRunningMutationThunk,\r\n getRunningQueriesThunk,\r\n getRunningMutationsThunk,\r\n getRunningOperationPromises,\r\n removalWarning,\r\n }\r\n\r\n /** @deprecated to be removed in 2.0 */\r\n function removalWarning(): never {\r\n throw new Error(\r\n `This method had to be removed due to a conceptual bug in RTK.\r\n Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details.\r\n See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR.`\r\n )\r\n }\r\n\r\n /** @deprecated to be removed in 2.0 */\r\n function getRunningOperationPromises() {\r\n if (\r\n typeof process !== 'undefined' &&\r\n process.env.NODE_ENV === 'development'\r\n ) {\r\n removalWarning()\r\n } else {\r\n const extract = (\r\n v: Map, Record>\r\n ) =>\r\n Array.from(v.values()).flatMap((queriesForStore) =>\r\n queriesForStore ? Object.values(queriesForStore) : []\r\n )\r\n return [...extract(runningQueries), ...extract(runningMutations)].filter(\r\n isNotNullish\r\n )\r\n }\r\n }\r\n\r\n function getRunningQueryThunk(endpointName: string, queryArgs: any) {\r\n return (dispatch: Dispatch) => {\r\n const endpointDefinition = context.endpointDefinitions[endpointName]\r\n const queryCacheKey = serializeQueryArgs({\r\n queryArgs,\r\n endpointDefinition,\r\n endpointName,\r\n })\r\n return runningQueries.get(dispatch)?.[queryCacheKey] as\r\n | QueryActionCreatorResult\r\n | undefined\r\n }\r\n }\r\n\r\n function getRunningMutationThunk(\r\n /**\r\n * this is only here to allow TS to infer the result type by input value\r\n * we could use it to validate the result, but it's probably not necessary\r\n */\r\n _endpointName: string,\r\n fixedCacheKeyOrRequestId: string\r\n ) {\r\n return (dispatch: Dispatch) => {\r\n return runningMutations.get(dispatch)?.[fixedCacheKeyOrRequestId] as\r\n | MutationActionCreatorResult\r\n | undefined\r\n }\r\n }\r\n\r\n function getRunningQueriesThunk() {\r\n return (dispatch: Dispatch) =>\r\n Object.values(runningQueries.get(dispatch) || {}).filter(isNotNullish)\r\n }\r\n\r\n function getRunningMutationsThunk() {\r\n return (dispatch: Dispatch) =>\r\n Object.values(runningMutations.get(dispatch) || {}).filter(isNotNullish)\r\n }\r\n\r\n function middlewareWarning(dispatch: Dispatch) {\r\n if (process.env.NODE_ENV !== 'production') {\r\n if ((middlewareWarning as any).triggered) return\r\n const registered:\r\n | ReturnType\r\n | boolean = dispatch(\r\n api.internalActions.internal_probeSubscription({\r\n queryCacheKey: 'DOES_NOT_EXIST',\r\n requestId: 'DUMMY_REQUEST_ID',\r\n })\r\n )\r\n\r\n ;(middlewareWarning as any).triggered = true\r\n\r\n // The RTKQ middleware _should_ always return a boolean for `probeSubscription`\r\n if (typeof registered !== 'boolean') {\r\n // Otherwise, must not have been added\r\n throw new Error(\r\n `Warning: Middleware for RTK-Query API at reducerPath \"${api.reducerPath}\" has not been added to the store.\r\nYou must add the middleware for RTK-Query to function correctly!`\r\n )\r\n }\r\n }\r\n }\r\n\r\n function buildInitiateQuery(\r\n endpointName: string,\r\n endpointDefinition: QueryDefinition\r\n ) {\r\n const queryAction: StartQueryActionCreator =\r\n (\r\n arg,\r\n {\r\n subscribe = true,\r\n forceRefetch,\r\n subscriptionOptions,\r\n [forceQueryFnSymbol]: forceQueryFn,\r\n } = {}\r\n ) =>\r\n (dispatch, getState) => {\r\n const queryCacheKey = serializeQueryArgs({\r\n queryArgs: arg,\r\n endpointDefinition,\r\n endpointName,\r\n })\r\n\r\n const thunk = queryThunk({\r\n type: 'query',\r\n subscribe,\r\n forceRefetch: forceRefetch,\r\n subscriptionOptions,\r\n endpointName,\r\n originalArgs: arg,\r\n queryCacheKey,\r\n [forceQueryFnSymbol]: forceQueryFn,\r\n })\r\n const selector = (\r\n api.endpoints[endpointName] as ApiEndpointQuery\r\n ).select(arg)\r\n\r\n const thunkResult = dispatch(thunk)\r\n const stateAfter = selector(getState())\r\n\r\n middlewareWarning(dispatch)\r\n\r\n const { requestId, abort } = thunkResult\r\n\r\n const skippedSynchronously = stateAfter.requestId !== requestId\r\n\r\n const runningQuery = runningQueries.get(dispatch)?.[queryCacheKey]\r\n const selectFromState = () => selector(getState())\r\n\r\n const statePromise: QueryActionCreatorResult = Object.assign(\r\n forceQueryFn\r\n ? // a query has been forced (upsertQueryData)\r\n // -> we want to resolve it once data has been written with the data that will be written\r\n thunkResult.then(selectFromState)\r\n : skippedSynchronously && !runningQuery\r\n ? // a query has been skipped due to a condition and we do not have any currently running query\r\n // -> we want to resolve it immediately with the current data\r\n Promise.resolve(stateAfter)\r\n : // query just started or one is already in flight\r\n // -> wait for the running query, then resolve with data from after that\r\n Promise.all([runningQuery, thunkResult]).then(selectFromState),\r\n {\r\n arg,\r\n requestId,\r\n subscriptionOptions,\r\n queryCacheKey,\r\n abort,\r\n async unwrap() {\r\n const result = await statePromise\r\n\r\n if (result.isError) {\r\n throw result.error\r\n }\r\n\r\n return result.data\r\n },\r\n refetch: () =>\r\n dispatch(\r\n queryAction(arg, { subscribe: false, forceRefetch: true })\r\n ),\r\n unsubscribe() {\r\n if (subscribe)\r\n dispatch(\r\n unsubscribeQueryResult({\r\n queryCacheKey,\r\n requestId,\r\n })\r\n )\r\n },\r\n updateSubscriptionOptions(options: SubscriptionOptions) {\r\n statePromise.subscriptionOptions = options\r\n dispatch(\r\n updateSubscriptionOptions({\r\n endpointName,\r\n requestId,\r\n queryCacheKey,\r\n options,\r\n })\r\n )\r\n },\r\n }\r\n )\r\n\r\n if (!runningQuery && !skippedSynchronously && !forceQueryFn) {\r\n const running = runningQueries.get(dispatch) || {}\r\n running[queryCacheKey] = statePromise\r\n runningQueries.set(dispatch, running)\r\n\r\n statePromise.then(() => {\r\n delete running[queryCacheKey]\r\n if (!Object.keys(running).length) {\r\n runningQueries.delete(dispatch)\r\n }\r\n })\r\n }\r\n\r\n return statePromise\r\n }\r\n return queryAction\r\n }\r\n\r\n function buildInitiateMutation(\r\n endpointName: string\r\n ): StartMutationActionCreator {\r\n return (arg, { track = true, fixedCacheKey } = {}) =>\r\n (dispatch, getState) => {\r\n const thunk = mutationThunk({\r\n type: 'mutation',\r\n endpointName,\r\n originalArgs: arg,\r\n track,\r\n fixedCacheKey,\r\n })\r\n const thunkResult = dispatch(thunk)\r\n middlewareWarning(dispatch)\r\n const { requestId, abort, unwrap } = thunkResult\r\n const returnValuePromise = thunkResult\r\n .unwrap()\r\n .then((data) => ({ data }))\r\n .catch((error) => ({ error }))\r\n\r\n const reset = () => {\r\n dispatch(removeMutationResult({ requestId, fixedCacheKey }))\r\n }\r\n\r\n const ret = Object.assign(returnValuePromise, {\r\n arg: thunkResult.arg,\r\n requestId,\r\n abort,\r\n unwrap,\r\n unsubscribe: reset,\r\n reset,\r\n })\r\n\r\n const running = runningMutations.get(dispatch) || {}\r\n runningMutations.set(dispatch, running)\r\n running[requestId] = ret\r\n ret.then(() => {\r\n delete running[requestId]\r\n if (!Object.keys(running).length) {\r\n runningMutations.delete(dispatch)\r\n }\r\n })\r\n if (fixedCacheKey) {\r\n running[fixedCacheKey] = ret\r\n ret.then(() => {\r\n if (running[fixedCacheKey] === ret) {\r\n delete running[fixedCacheKey]\r\n if (!Object.keys(running).length) {\r\n runningMutations.delete(dispatch)\r\n }\r\n }\r\n })\r\n }\r\n\r\n return ret\r\n }\r\n }\r\n}\r\n","import type { InternalSerializeQueryArgs } from '../defaultSerializeQueryArgs'\r\nimport type { Api, ApiContext } from '../apiTypes'\r\nimport type {\r\n BaseQueryFn,\r\n BaseQueryError,\r\n QueryReturnValue,\r\n} from '../baseQueryTypes'\r\nimport type { RootState, QueryKeys, QuerySubstateIdentifier } from './apiState'\r\nimport { QueryStatus } from './apiState'\r\nimport type {\r\n StartQueryActionCreatorOptions,\r\n QueryActionCreatorResult,\r\n} from './buildInitiate'\r\nimport { forceQueryFnSymbol, isUpsertQuery } from './buildInitiate'\r\nimport {\r\n AssertTagTypes,\r\n EndpointDefinition,\r\n EndpointDefinitions,\r\n isQueryDefinition,\r\n MutationDefinition,\r\n QueryArgFrom,\r\n QueryDefinition,\r\n ResultTypeFrom,\r\n} from '../endpointDefinitions'\r\nimport { calculateProvidedBy } from '../endpointDefinitions'\r\nimport type { AsyncThunkPayloadCreator, Draft } from '@reduxjs/toolkit'\r\nimport {\r\n isAllOf,\r\n isFulfilled,\r\n isPending,\r\n isRejected,\r\n isRejectedWithValue,\r\n} from '@reduxjs/toolkit'\r\nimport type { Patch } from 'immer'\r\nimport { isDraftable, produceWithPatches } from 'immer'\r\nimport type {\r\n AnyAction,\r\n ThunkAction,\r\n ThunkDispatch,\r\n AsyncThunk,\r\n} from '@reduxjs/toolkit'\r\nimport { createAsyncThunk, SHOULD_AUTOBATCH } from '@reduxjs/toolkit'\r\n\r\nimport { HandledError } from '../HandledError'\r\n\r\nimport type { ApiEndpointQuery, PrefetchOptions } from './module'\r\nimport type { UnwrapPromise } from '../tsHelpers'\r\n\r\ndeclare module './module' {\r\n export interface ApiEndpointQuery<\r\n Definition extends QueryDefinition,\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n Definitions extends EndpointDefinitions\r\n > extends Matchers {}\r\n\r\n export interface ApiEndpointMutation<\r\n Definition extends MutationDefinition,\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n Definitions extends EndpointDefinitions\r\n > extends Matchers {}\r\n}\r\n\r\ntype EndpointThunk<\r\n Thunk extends QueryThunk | MutationThunk,\r\n Definition extends EndpointDefinition\r\n> = Definition extends EndpointDefinition<\r\n infer QueryArg,\r\n infer BaseQueryFn,\r\n any,\r\n infer ResultType\r\n>\r\n ? Thunk extends AsyncThunk\r\n ? AsyncThunk<\r\n ResultType,\r\n ATArg & { originalArgs: QueryArg },\r\n ATConfig & { rejectValue: BaseQueryError }\r\n >\r\n : never\r\n : never\r\n\r\nexport type PendingAction<\r\n Thunk extends QueryThunk | MutationThunk,\r\n Definition extends EndpointDefinition\r\n> = ReturnType['pending']>\r\n\r\nexport type FulfilledAction<\r\n Thunk extends QueryThunk | MutationThunk,\r\n Definition extends EndpointDefinition\r\n> = ReturnType['fulfilled']>\r\n\r\nexport type RejectedAction<\r\n Thunk extends QueryThunk | MutationThunk,\r\n Definition extends EndpointDefinition\r\n> = ReturnType['rejected']>\r\n\r\nexport type Matcher = (value: any) => value is M\r\n\r\nexport interface Matchers<\r\n Thunk extends QueryThunk | MutationThunk,\r\n Definition extends EndpointDefinition\r\n> {\r\n matchPending: Matcher>\r\n matchFulfilled: Matcher>\r\n matchRejected: Matcher>\r\n}\r\n\r\nexport interface QueryThunkArg\r\n extends QuerySubstateIdentifier,\r\n StartQueryActionCreatorOptions {\r\n type: 'query'\r\n originalArgs: unknown\r\n endpointName: string\r\n}\r\n\r\nexport interface MutationThunkArg {\r\n type: 'mutation'\r\n originalArgs: unknown\r\n endpointName: string\r\n track?: boolean\r\n fixedCacheKey?: string\r\n}\r\n\r\nexport type ThunkResult = unknown\r\n\r\nexport type ThunkApiMetaConfig = {\r\n pendingMeta: {\r\n startedTimeStamp: number\r\n [SHOULD_AUTOBATCH]: true\r\n }\r\n fulfilledMeta: {\r\n fulfilledTimeStamp: number\r\n baseQueryMeta: unknown\r\n [SHOULD_AUTOBATCH]: true\r\n }\r\n rejectedMeta: {\r\n baseQueryMeta: unknown\r\n [SHOULD_AUTOBATCH]: true\r\n }\r\n}\r\nexport type QueryThunk = AsyncThunk<\r\n ThunkResult,\r\n QueryThunkArg,\r\n ThunkApiMetaConfig\r\n>\r\nexport type MutationThunk = AsyncThunk<\r\n ThunkResult,\r\n MutationThunkArg,\r\n ThunkApiMetaConfig\r\n>\r\n\r\nfunction defaultTransformResponse(baseQueryReturnValue: unknown) {\r\n return baseQueryReturnValue\r\n}\r\n\r\nexport type MaybeDrafted = T | Draft\r\nexport type Recipe = (data: MaybeDrafted) => void | MaybeDrafted\r\nexport type UpsertRecipe = (\r\n data: MaybeDrafted | undefined\r\n) => void | MaybeDrafted\r\n\r\nexport type PatchQueryDataThunk<\r\n Definitions extends EndpointDefinitions,\r\n PartialState\r\n> = >(\r\n endpointName: EndpointName,\r\n args: QueryArgFrom,\r\n patches: readonly Patch[]\r\n) => ThunkAction\r\n\r\nexport type UpdateQueryDataThunk<\r\n Definitions extends EndpointDefinitions,\r\n PartialState\r\n> = >(\r\n endpointName: EndpointName,\r\n args: QueryArgFrom,\r\n updateRecipe: Recipe>\r\n) => ThunkAction\r\n\r\nexport type UpsertQueryDataThunk<\r\n Definitions extends EndpointDefinitions,\r\n PartialState\r\n> = >(\r\n endpointName: EndpointName,\r\n args: QueryArgFrom,\r\n value: ResultTypeFrom\r\n) => ThunkAction<\r\n QueryActionCreatorResult<\r\n Definitions[EndpointName] extends QueryDefinition\r\n ? Definitions[EndpointName]\r\n : never\r\n >,\r\n PartialState,\r\n any,\r\n AnyAction\r\n>\r\n\r\n/**\r\n * An object returned from dispatching a `api.util.updateQueryData` call.\r\n */\r\nexport type PatchCollection = {\r\n /**\r\n * An `immer` Patch describing the cache update.\r\n */\r\n patches: Patch[]\r\n /**\r\n * An `immer` Patch to revert the cache update.\r\n */\r\n inversePatches: Patch[]\r\n /**\r\n * A function that will undo the cache update.\r\n */\r\n undo: () => void\r\n}\r\n\r\nexport function buildThunks<\r\n BaseQuery extends BaseQueryFn,\r\n ReducerPath extends string,\r\n Definitions extends EndpointDefinitions\r\n>({\r\n reducerPath,\r\n baseQuery,\r\n context: { endpointDefinitions },\r\n serializeQueryArgs,\r\n api,\r\n}: {\r\n baseQuery: BaseQuery\r\n reducerPath: ReducerPath\r\n context: ApiContext\r\n serializeQueryArgs: InternalSerializeQueryArgs\r\n api: Api\r\n}) {\r\n type State = RootState\r\n\r\n const patchQueryData: PatchQueryDataThunk =\r\n (endpointName, args, patches) => (dispatch) => {\r\n const endpointDefinition = endpointDefinitions[endpointName]\r\n dispatch(\r\n api.internalActions.queryResultPatched({\r\n queryCacheKey: serializeQueryArgs({\r\n queryArgs: args,\r\n endpointDefinition,\r\n endpointName,\r\n }),\r\n patches,\r\n })\r\n )\r\n }\r\n\r\n const updateQueryData: UpdateQueryDataThunk =\r\n (endpointName, args, updateRecipe) => (dispatch, getState) => {\r\n const currentState = (\r\n api.endpoints[endpointName] as ApiEndpointQuery\r\n ).select(args)(getState())\r\n let ret: PatchCollection = {\r\n patches: [],\r\n inversePatches: [],\r\n undo: () =>\r\n dispatch(\r\n api.util.patchQueryData(endpointName, args, ret.inversePatches)\r\n ),\r\n }\r\n if (currentState.status === QueryStatus.uninitialized) {\r\n return ret\r\n }\r\n if ('data' in currentState) {\r\n if (isDraftable(currentState.data)) {\r\n const [, patches, inversePatches] = produceWithPatches(\r\n currentState.data,\r\n updateRecipe\r\n )\r\n ret.patches.push(...patches)\r\n ret.inversePatches.push(...inversePatches)\r\n } else {\r\n const value = updateRecipe(currentState.data)\r\n ret.patches.push({ op: 'replace', path: [], value })\r\n ret.inversePatches.push({\r\n op: 'replace',\r\n path: [],\r\n value: currentState.data,\r\n })\r\n }\r\n }\r\n\r\n dispatch(api.util.patchQueryData(endpointName, args, ret.patches))\r\n\r\n return ret\r\n }\r\n\r\n const upsertQueryData: UpsertQueryDataThunk =\r\n (endpointName, args, value) => (dispatch) => {\r\n return dispatch(\r\n (\r\n api.endpoints[endpointName] as ApiEndpointQuery<\r\n QueryDefinition,\r\n Definitions\r\n >\r\n ).initiate(args, {\r\n subscribe: false,\r\n forceRefetch: true,\r\n [forceQueryFnSymbol]: () => ({\r\n data: value,\r\n }),\r\n })\r\n )\r\n }\r\n\r\n const executeEndpoint: AsyncThunkPayloadCreator<\r\n ThunkResult,\r\n QueryThunkArg | MutationThunkArg,\r\n ThunkApiMetaConfig & { state: RootState }\r\n > = async (\r\n arg,\r\n {\r\n signal,\r\n abort,\r\n rejectWithValue,\r\n fulfillWithValue,\r\n dispatch,\r\n getState,\r\n extra,\r\n }\r\n ) => {\r\n const endpointDefinition = endpointDefinitions[arg.endpointName]\r\n\r\n try {\r\n let transformResponse: (\r\n baseQueryReturnValue: any,\r\n meta: any,\r\n arg: any\r\n ) => any = defaultTransformResponse\r\n let result: QueryReturnValue\r\n const baseQueryApi = {\r\n signal,\r\n abort,\r\n dispatch,\r\n getState,\r\n extra,\r\n endpoint: arg.endpointName,\r\n type: arg.type,\r\n forced:\r\n arg.type === 'query' ? isForcedQuery(arg, getState()) : undefined,\r\n }\r\n\r\n const forceQueryFn =\r\n arg.type === 'query' ? arg[forceQueryFnSymbol] : undefined\r\n if (forceQueryFn) {\r\n result = forceQueryFn()\r\n } else if (endpointDefinition.query) {\r\n result = await baseQuery(\r\n endpointDefinition.query(arg.originalArgs),\r\n baseQueryApi,\r\n endpointDefinition.extraOptions as any\r\n )\r\n\r\n if (endpointDefinition.transformResponse) {\r\n transformResponse = endpointDefinition.transformResponse\r\n }\r\n } else {\r\n result = await endpointDefinition.queryFn(\r\n arg.originalArgs,\r\n baseQueryApi,\r\n endpointDefinition.extraOptions as any,\r\n (arg) =>\r\n baseQuery(arg, baseQueryApi, endpointDefinition.extraOptions as any)\r\n )\r\n }\r\n if (\r\n typeof process !== 'undefined' &&\r\n process.env.NODE_ENV === 'development'\r\n ) {\r\n const what = endpointDefinition.query ? '`baseQuery`' : '`queryFn`'\r\n let err: undefined | string\r\n if (!result) {\r\n err = `${what} did not return anything.`\r\n } else if (typeof result !== 'object') {\r\n err = `${what} did not return an object.`\r\n } else if (result.error && result.data) {\r\n err = `${what} returned an object containing both \\`error\\` and \\`result\\`.`\r\n } else if (result.error === undefined && result.data === undefined) {\r\n err = `${what} returned an object containing neither a valid \\`error\\` and \\`result\\`. At least one of them should not be \\`undefined\\``\r\n } else {\r\n for (const key of Object.keys(result)) {\r\n if (key !== 'error' && key !== 'data' && key !== 'meta') {\r\n err = `The object returned by ${what} has the unknown property ${key}.`\r\n break\r\n }\r\n }\r\n }\r\n if (err) {\r\n console.error(\r\n `Error encountered handling the endpoint ${arg.endpointName}.\r\n ${err}\r\n It needs to return an object with either the shape \\`{ data: }\\` or \\`{ error: }\\` that may contain an optional \\`meta\\` property.\r\n Object returned was:`,\r\n result\r\n )\r\n }\r\n }\r\n\r\n if (result.error) throw new HandledError(result.error, result.meta)\r\n\r\n return fulfillWithValue(\r\n await transformResponse(result.data, result.meta, arg.originalArgs),\r\n {\r\n fulfilledTimeStamp: Date.now(),\r\n baseQueryMeta: result.meta,\r\n [SHOULD_AUTOBATCH]: true,\r\n }\r\n )\r\n } catch (error) {\r\n let catchedError = error\r\n if (catchedError instanceof HandledError) {\r\n let transformErrorResponse: (\r\n baseQueryReturnValue: any,\r\n meta: any,\r\n arg: any\r\n ) => any = defaultTransformResponse\r\n\r\n if (\r\n endpointDefinition.query &&\r\n endpointDefinition.transformErrorResponse\r\n ) {\r\n transformErrorResponse = endpointDefinition.transformErrorResponse\r\n }\r\n try {\r\n return rejectWithValue(\r\n await transformErrorResponse(\r\n catchedError.value,\r\n catchedError.meta,\r\n arg.originalArgs\r\n ),\r\n { baseQueryMeta: catchedError.meta, [SHOULD_AUTOBATCH]: true }\r\n )\r\n } catch (e) {\r\n catchedError = e\r\n }\r\n }\r\n if (\r\n typeof process !== 'undefined' &&\r\n process.env.NODE_ENV !== 'production'\r\n ) {\r\n console.error(\r\n `An unhandled error occurred processing a request for the endpoint \"${arg.endpointName}\".\r\nIn the case of an unhandled error, no tags will be \"provided\" or \"invalidated\".`,\r\n catchedError\r\n )\r\n } else {\r\n console.error(catchedError)\r\n }\r\n throw catchedError\r\n }\r\n }\r\n\r\n function isForcedQuery(\r\n arg: QueryThunkArg,\r\n state: RootState\r\n ) {\r\n const requestState = state[reducerPath]?.queries?.[arg.queryCacheKey]\r\n const baseFetchOnMountOrArgChange =\r\n state[reducerPath]?.config.refetchOnMountOrArgChange\r\n\r\n const fulfilledVal = requestState?.fulfilledTimeStamp\r\n const refetchVal =\r\n arg.forceRefetch ?? (arg.subscribe && baseFetchOnMountOrArgChange)\r\n\r\n if (refetchVal) {\r\n // Return if its true or compare the dates because it must be a number\r\n return (\r\n refetchVal === true ||\r\n (Number(new Date()) - Number(fulfilledVal)) / 1000 >= refetchVal\r\n )\r\n }\r\n return false\r\n }\r\n\r\n const queryThunk = createAsyncThunk<\r\n ThunkResult,\r\n QueryThunkArg,\r\n ThunkApiMetaConfig & { state: RootState }\r\n >(`${reducerPath}/executeQuery`, executeEndpoint, {\r\n getPendingMeta() {\r\n return { startedTimeStamp: Date.now(), [SHOULD_AUTOBATCH]: true }\r\n },\r\n condition(queryThunkArgs, { getState }) {\r\n const state = getState()\r\n\r\n const requestState =\r\n state[reducerPath]?.queries?.[queryThunkArgs.queryCacheKey]\r\n const fulfilledVal = requestState?.fulfilledTimeStamp\r\n const currentArg = queryThunkArgs.originalArgs\r\n const previousArg = requestState?.originalArgs\r\n const endpointDefinition =\r\n endpointDefinitions[queryThunkArgs.endpointName]\r\n\r\n // Order of these checks matters.\r\n // In order for `upsertQueryData` to successfully run while an existing request is in flight,\r\n /// we have to check for that first, otherwise `queryThunk` will bail out and not run at all.\r\n if (isUpsertQuery(queryThunkArgs)) {\r\n return true\r\n }\r\n\r\n // Don't retry a request that's currently in-flight\r\n if (requestState?.status === 'pending') {\r\n return false\r\n }\r\n\r\n // if this is forced, continue\r\n if (isForcedQuery(queryThunkArgs, state)) {\r\n return true\r\n }\r\n\r\n if (\r\n isQueryDefinition(endpointDefinition) &&\r\n endpointDefinition?.forceRefetch?.({\r\n currentArg,\r\n previousArg,\r\n endpointState: requestState,\r\n state,\r\n })\r\n ) {\r\n return true\r\n }\r\n\r\n // Pull from the cache unless we explicitly force refetch or qualify based on time\r\n if (fulfilledVal) {\r\n // Value is cached and we didn't specify to refresh, skip it.\r\n return false\r\n }\r\n\r\n return true\r\n },\r\n dispatchConditionRejection: true,\r\n })\r\n\r\n const mutationThunk = createAsyncThunk<\r\n ThunkResult,\r\n MutationThunkArg,\r\n ThunkApiMetaConfig & { state: RootState }\r\n >(`${reducerPath}/executeMutation`, executeEndpoint, {\r\n getPendingMeta() {\r\n return { startedTimeStamp: Date.now(), [SHOULD_AUTOBATCH]: true }\r\n },\r\n })\r\n\r\n const hasTheForce = (options: any): options is { force: boolean } =>\r\n 'force' in options\r\n const hasMaxAge = (\r\n options: any\r\n ): options is { ifOlderThan: false | number } => 'ifOlderThan' in options\r\n\r\n const prefetch =\r\n >(\r\n endpointName: EndpointName,\r\n arg: any,\r\n options: PrefetchOptions\r\n ): ThunkAction =>\r\n (dispatch: ThunkDispatch, getState: () => any) => {\r\n const force = hasTheForce(options) && options.force\r\n const maxAge = hasMaxAge(options) && options.ifOlderThan\r\n\r\n const queryAction = (force: boolean = true) =>\r\n (api.endpoints[endpointName] as ApiEndpointQuery).initiate(\r\n arg,\r\n { forceRefetch: force }\r\n )\r\n const latestStateValue = (\r\n api.endpoints[endpointName] as ApiEndpointQuery\r\n ).select(arg)(getState())\r\n\r\n if (force) {\r\n dispatch(queryAction())\r\n } else if (maxAge) {\r\n const lastFulfilledTs = latestStateValue?.fulfilledTimeStamp\r\n if (!lastFulfilledTs) {\r\n dispatch(queryAction())\r\n return\r\n }\r\n const shouldRetrigger =\r\n (Number(new Date()) - Number(new Date(lastFulfilledTs))) / 1000 >=\r\n maxAge\r\n if (shouldRetrigger) {\r\n dispatch(queryAction())\r\n }\r\n } else {\r\n // If prefetching with no options, just let it try\r\n dispatch(queryAction(false))\r\n }\r\n }\r\n\r\n function matchesEndpoint(endpointName: string) {\r\n return (action: any): action is AnyAction =>\r\n action?.meta?.arg?.endpointName === endpointName\r\n }\r\n\r\n function buildMatchThunkActions<\r\n Thunk extends\r\n | AsyncThunk\r\n | AsyncThunk\r\n >(thunk: Thunk, endpointName: string) {\r\n return {\r\n matchPending: isAllOf(isPending(thunk), matchesEndpoint(endpointName)),\r\n matchFulfilled: isAllOf(\r\n isFulfilled(thunk),\r\n matchesEndpoint(endpointName)\r\n ),\r\n matchRejected: isAllOf(isRejected(thunk), matchesEndpoint(endpointName)),\r\n } as Matchers\r\n }\r\n\r\n return {\r\n queryThunk,\r\n mutationThunk,\r\n prefetch,\r\n updateQueryData,\r\n upsertQueryData,\r\n patchQueryData,\r\n buildMatchThunkActions,\r\n }\r\n}\r\n\r\nexport function calculateProvidedByThunk(\r\n action: UnwrapPromise<\r\n ReturnType> | ReturnType>\r\n >,\r\n type: 'providesTags' | 'invalidatesTags',\r\n endpointDefinitions: EndpointDefinitions,\r\n assertTagType: AssertTagTypes\r\n) {\r\n return calculateProvidedBy(\r\n endpointDefinitions[action.meta.arg.endpointName][type],\r\n isFulfilled(action) ? action.payload : undefined,\r\n isRejectedWithValue(action) ? action.payload : undefined,\r\n action.meta.arg.originalArgs,\r\n 'baseQueryMeta' in action.meta ? action.meta.baseQueryMeta : undefined,\r\n assertTagType\r\n )\r\n}\r\n","import type { AnyAction, PayloadAction } from '@reduxjs/toolkit'\r\nimport {\r\n combineReducers,\r\n createAction,\r\n createSlice,\r\n isAnyOf,\r\n isFulfilled,\r\n isRejectedWithValue,\r\n createNextState,\r\n prepareAutoBatched,\r\n} from '@reduxjs/toolkit'\r\nimport type {\r\n CombinedState as CombinedQueryState,\r\n QuerySubstateIdentifier,\r\n QuerySubState,\r\n MutationSubstateIdentifier,\r\n MutationSubState,\r\n MutationState,\r\n QueryState,\r\n InvalidationState,\r\n Subscribers,\r\n QueryCacheKey,\r\n SubscriptionState,\r\n ConfigState,\r\n} from './apiState'\r\nimport { QueryStatus } from './apiState'\r\nimport type { MutationThunk, QueryThunk, RejectedAction } from './buildThunks'\r\nimport { calculateProvidedByThunk } from './buildThunks'\r\nimport type {\r\n AssertTagTypes,\r\n EndpointDefinitions,\r\n QueryDefinition,\r\n} from '../endpointDefinitions'\r\nimport type { Patch } from 'immer'\r\nimport { applyPatches } from 'immer'\r\nimport { onFocus, onFocusLost, onOffline, onOnline } from './setupListeners'\r\nimport {\r\n isDocumentVisible,\r\n isOnline,\r\n copyWithStructuralSharing,\r\n} from '../utils'\r\nimport type { ApiContext } from '../apiTypes'\r\nimport { isUpsertQuery } from './buildInitiate'\r\n\r\nfunction updateQuerySubstateIfExists(\r\n state: QueryState,\r\n queryCacheKey: QueryCacheKey,\r\n update: (substate: QuerySubState) => void\r\n) {\r\n const substate = state[queryCacheKey]\r\n if (substate) {\r\n update(substate)\r\n }\r\n}\r\n\r\nexport function getMutationCacheKey(\r\n id:\r\n | MutationSubstateIdentifier\r\n | { requestId: string; arg: { fixedCacheKey?: string | undefined } }\r\n): string\r\nexport function getMutationCacheKey(id: {\r\n fixedCacheKey?: string\r\n requestId?: string\r\n}): string | undefined\r\n\r\nexport function getMutationCacheKey(\r\n id:\r\n | { fixedCacheKey?: string; requestId?: string }\r\n | MutationSubstateIdentifier\r\n | { requestId: string; arg: { fixedCacheKey?: string | undefined } }\r\n): string | undefined {\r\n return ('arg' in id ? id.arg.fixedCacheKey : id.fixedCacheKey) ?? id.requestId\r\n}\r\n\r\nfunction updateMutationSubstateIfExists(\r\n state: MutationState,\r\n id:\r\n | MutationSubstateIdentifier\r\n | { requestId: string; arg: { fixedCacheKey?: string | undefined } },\r\n update: (substate: MutationSubState) => void\r\n) {\r\n const substate = state[getMutationCacheKey(id)]\r\n if (substate) {\r\n update(substate)\r\n }\r\n}\r\n\r\nconst initialState = {} as any\r\n\r\nexport function buildSlice({\r\n reducerPath,\r\n queryThunk,\r\n mutationThunk,\r\n context: {\r\n endpointDefinitions: definitions,\r\n apiUid,\r\n extractRehydrationInfo,\r\n hasRehydrationInfo,\r\n },\r\n assertTagType,\r\n config,\r\n}: {\r\n reducerPath: string\r\n queryThunk: QueryThunk\r\n mutationThunk: MutationThunk\r\n context: ApiContext\r\n assertTagType: AssertTagTypes\r\n config: Omit<\r\n ConfigState,\r\n 'online' | 'focused' | 'middlewareRegistered'\r\n >\r\n}) {\r\n const resetApiState = createAction(`${reducerPath}/resetApiState`)\r\n const querySlice = createSlice({\r\n name: `${reducerPath}/queries`,\r\n initialState: initialState as QueryState,\r\n reducers: {\r\n removeQueryResult: {\r\n reducer(\r\n draft,\r\n { payload: { queryCacheKey } }: PayloadAction\r\n ) {\r\n delete draft[queryCacheKey]\r\n },\r\n prepare: prepareAutoBatched(),\r\n },\r\n queryResultPatched(\r\n draft,\r\n {\r\n payload: { queryCacheKey, patches },\r\n }: PayloadAction<\r\n QuerySubstateIdentifier & { patches: readonly Patch[] }\r\n >\r\n ) {\r\n updateQuerySubstateIfExists(draft, queryCacheKey, (substate) => {\r\n substate.data = applyPatches(substate.data as any, patches.concat())\r\n })\r\n },\r\n },\r\n extraReducers(builder) {\r\n builder\r\n .addCase(queryThunk.pending, (draft, { meta, meta: { arg } }) => {\r\n const upserting = isUpsertQuery(arg)\r\n if (arg.subscribe || upserting) {\r\n // only initialize substate if we want to subscribe to it\r\n draft[arg.queryCacheKey] ??= {\r\n status: QueryStatus.uninitialized,\r\n endpointName: arg.endpointName,\r\n }\r\n }\r\n\r\n updateQuerySubstateIfExists(draft, arg.queryCacheKey, (substate) => {\r\n substate.status = QueryStatus.pending\r\n\r\n substate.requestId =\r\n upserting && substate.requestId\r\n ? // for `upsertQuery` **updates**, keep the current `requestId`\r\n substate.requestId\r\n : // for normal queries or `upsertQuery` **inserts** always update the `requestId`\r\n meta.requestId\r\n if (arg.originalArgs !== undefined) {\r\n substate.originalArgs = arg.originalArgs\r\n }\r\n substate.startedTimeStamp = meta.startedTimeStamp\r\n })\r\n })\r\n .addCase(queryThunk.fulfilled, (draft, { meta, payload }) => {\r\n updateQuerySubstateIfExists(\r\n draft,\r\n meta.arg.queryCacheKey,\r\n (substate) => {\r\n if (\r\n substate.requestId !== meta.requestId &&\r\n !isUpsertQuery(meta.arg)\r\n )\r\n return\r\n const { merge } = definitions[\r\n meta.arg.endpointName\r\n ] as QueryDefinition\r\n substate.status = QueryStatus.fulfilled\r\n\r\n if (merge) {\r\n if (substate.data !== undefined) {\r\n // There's existing cache data. Let the user merge it in themselves.\r\n // We're already inside an Immer-powered reducer, and the user could just mutate `substate.data`\r\n // themselves inside of `merge()`. But, they might also want to return a new value.\r\n // Try to let Immer figure that part out, save the result, and assign it to `substate.data`.\r\n let newData = createNextState(\r\n substate.data,\r\n (draftSubstateData) => {\r\n // As usual with Immer, you can mutate _or_ return inside here, but not both\r\n return merge(draftSubstateData, payload)\r\n }\r\n )\r\n substate.data = newData\r\n } else {\r\n // Presumably a fresh request. Just cache the response data.\r\n substate.data = payload\r\n }\r\n } else {\r\n // Assign or safely update the cache data.\r\n substate.data =\r\n definitions[meta.arg.endpointName].structuralSharing ?? true\r\n ? copyWithStructuralSharing(substate.data, payload)\r\n : payload\r\n }\r\n\r\n delete substate.error\r\n substate.fulfilledTimeStamp = meta.fulfilledTimeStamp\r\n }\r\n )\r\n })\r\n .addCase(\r\n queryThunk.rejected,\r\n (draft, { meta: { condition, arg, requestId }, error, payload }) => {\r\n updateQuerySubstateIfExists(\r\n draft,\r\n arg.queryCacheKey,\r\n (substate) => {\r\n if (condition) {\r\n // request was aborted due to condition (another query already running)\r\n } else {\r\n // request failed\r\n if (substate.requestId !== requestId) return\r\n substate.status = QueryStatus.rejected\r\n substate.error = (payload ?? error) as any\r\n }\r\n }\r\n )\r\n }\r\n )\r\n .addMatcher(hasRehydrationInfo, (draft, action) => {\r\n const { queries } = extractRehydrationInfo(action)!\r\n for (const [key, entry] of Object.entries(queries)) {\r\n if (\r\n // do not rehydrate entries that were currently in flight.\r\n entry?.status === QueryStatus.fulfilled ||\r\n entry?.status === QueryStatus.rejected\r\n ) {\r\n draft[key] = entry\r\n }\r\n }\r\n })\r\n },\r\n })\r\n const mutationSlice = createSlice({\r\n name: `${reducerPath}/mutations`,\r\n initialState: initialState as MutationState,\r\n reducers: {\r\n removeMutationResult: {\r\n reducer(draft, { payload }: PayloadAction) {\r\n const cacheKey = getMutationCacheKey(payload)\r\n if (cacheKey in draft) {\r\n delete draft[cacheKey]\r\n }\r\n },\r\n prepare: prepareAutoBatched(),\r\n },\r\n },\r\n extraReducers(builder) {\r\n builder\r\n .addCase(\r\n mutationThunk.pending,\r\n (draft, { meta, meta: { requestId, arg, startedTimeStamp } }) => {\r\n if (!arg.track) return\r\n\r\n draft[getMutationCacheKey(meta)] = {\r\n requestId,\r\n status: QueryStatus.pending,\r\n endpointName: arg.endpointName,\r\n startedTimeStamp,\r\n }\r\n }\r\n )\r\n .addCase(mutationThunk.fulfilled, (draft, { payload, meta }) => {\r\n if (!meta.arg.track) return\r\n\r\n updateMutationSubstateIfExists(draft, meta, (substate) => {\r\n if (substate.requestId !== meta.requestId) return\r\n substate.status = QueryStatus.fulfilled\r\n substate.data = payload\r\n substate.fulfilledTimeStamp = meta.fulfilledTimeStamp\r\n })\r\n })\r\n .addCase(mutationThunk.rejected, (draft, { payload, error, meta }) => {\r\n if (!meta.arg.track) return\r\n\r\n updateMutationSubstateIfExists(draft, meta, (substate) => {\r\n if (substate.requestId !== meta.requestId) return\r\n\r\n substate.status = QueryStatus.rejected\r\n substate.error = (payload ?? error) as any\r\n })\r\n })\r\n .addMatcher(hasRehydrationInfo, (draft, action) => {\r\n const { mutations } = extractRehydrationInfo(action)!\r\n for (const [key, entry] of Object.entries(mutations)) {\r\n if (\r\n // do not rehydrate entries that were currently in flight.\r\n (entry?.status === QueryStatus.fulfilled ||\r\n entry?.status === QueryStatus.rejected) &&\r\n // only rehydrate endpoints that were persisted using a `fixedCacheKey`\r\n key !== entry?.requestId\r\n ) {\r\n draft[key] = entry\r\n }\r\n }\r\n })\r\n },\r\n })\r\n\r\n const invalidationSlice = createSlice({\r\n name: `${reducerPath}/invalidation`,\r\n initialState: initialState as InvalidationState,\r\n reducers: {},\r\n extraReducers(builder) {\r\n builder\r\n .addCase(\r\n querySlice.actions.removeQueryResult,\r\n (draft, { payload: { queryCacheKey } }) => {\r\n for (const tagTypeSubscriptions of Object.values(draft)) {\r\n for (const idSubscriptions of Object.values(\r\n tagTypeSubscriptions\r\n )) {\r\n const foundAt = idSubscriptions.indexOf(queryCacheKey)\r\n if (foundAt !== -1) {\r\n idSubscriptions.splice(foundAt, 1)\r\n }\r\n }\r\n }\r\n }\r\n )\r\n .addMatcher(hasRehydrationInfo, (draft, action) => {\r\n const { provided } = extractRehydrationInfo(action)!\r\n for (const [type, incomingTags] of Object.entries(provided)) {\r\n for (const [id, cacheKeys] of Object.entries(incomingTags)) {\r\n const subscribedQueries = ((draft[type] ??= {})[\r\n id || '__internal_without_id'\r\n ] ??= [])\r\n for (const queryCacheKey of cacheKeys) {\r\n const alreadySubscribed =\r\n subscribedQueries.includes(queryCacheKey)\r\n if (!alreadySubscribed) {\r\n subscribedQueries.push(queryCacheKey)\r\n }\r\n }\r\n }\r\n }\r\n })\r\n .addMatcher(\r\n isAnyOf(isFulfilled(queryThunk), isRejectedWithValue(queryThunk)),\r\n (draft, action) => {\r\n const providedTags = calculateProvidedByThunk(\r\n action,\r\n 'providesTags',\r\n definitions,\r\n assertTagType\r\n )\r\n const { queryCacheKey } = action.meta.arg\r\n\r\n for (const tagTypeSubscriptions of Object.values(draft)) {\r\n for (const idSubscriptions of Object.values(\r\n tagTypeSubscriptions\r\n )) {\r\n const foundAt = idSubscriptions.indexOf(queryCacheKey)\r\n if (foundAt !== -1) {\r\n idSubscriptions.splice(foundAt, 1)\r\n }\r\n }\r\n }\r\n\r\n for (const { type, id } of providedTags) {\r\n const subscribedQueries = ((draft[type] ??= {})[\r\n id || '__internal_without_id'\r\n ] ??= [])\r\n const alreadySubscribed =\r\n subscribedQueries.includes(queryCacheKey)\r\n if (!alreadySubscribed) {\r\n subscribedQueries.push(queryCacheKey)\r\n }\r\n }\r\n }\r\n )\r\n },\r\n })\r\n\r\n // Dummy slice to generate actions\r\n const subscriptionSlice = createSlice({\r\n name: `${reducerPath}/subscriptions`,\r\n initialState: initialState as SubscriptionState,\r\n reducers: {\r\n updateSubscriptionOptions(\r\n d,\r\n a: PayloadAction<\r\n {\r\n endpointName: string\r\n requestId: string\r\n options: Subscribers[number]\r\n } & QuerySubstateIdentifier\r\n >\r\n ) {\r\n // Dummy\r\n },\r\n unsubscribeQueryResult(\r\n d,\r\n a: PayloadAction<{ requestId: string } & QuerySubstateIdentifier>\r\n ) {\r\n // Dummy\r\n },\r\n internal_probeSubscription(\r\n d,\r\n a: PayloadAction<{ queryCacheKey: string; requestId: string }>\r\n ) {\r\n // dummy\r\n },\r\n },\r\n })\r\n\r\n const internalSubscriptionsSlice = createSlice({\r\n name: `${reducerPath}/internalSubscriptions`,\r\n initialState: initialState as SubscriptionState,\r\n reducers: {\r\n subscriptionsUpdated(state, action: PayloadAction) {\r\n return applyPatches(state, action.payload)\r\n },\r\n },\r\n })\r\n\r\n const configSlice = createSlice({\r\n name: `${reducerPath}/config`,\r\n initialState: {\r\n online: isOnline(),\r\n focused: isDocumentVisible(),\r\n middlewareRegistered: false,\r\n ...config,\r\n } as ConfigState,\r\n reducers: {\r\n middlewareRegistered(state, { payload }: PayloadAction) {\r\n state.middlewareRegistered =\r\n state.middlewareRegistered === 'conflict' || apiUid !== payload\r\n ? 'conflict'\r\n : true\r\n },\r\n },\r\n extraReducers: (builder) => {\r\n builder\r\n .addCase(onOnline, (state) => {\r\n state.online = true\r\n })\r\n .addCase(onOffline, (state) => {\r\n state.online = false\r\n })\r\n .addCase(onFocus, (state) => {\r\n state.focused = true\r\n })\r\n .addCase(onFocusLost, (state) => {\r\n state.focused = false\r\n })\r\n // update the state to be a new object to be picked up as a \"state change\"\r\n // by redux-persist's `autoMergeLevel2`\r\n .addMatcher(hasRehydrationInfo, (draft) => ({ ...draft }))\r\n },\r\n })\r\n\r\n const combinedReducer = combineReducers<\r\n CombinedQueryState\r\n >({\r\n queries: querySlice.reducer,\r\n mutations: mutationSlice.reducer,\r\n provided: invalidationSlice.reducer,\r\n subscriptions: internalSubscriptionsSlice.reducer,\r\n config: configSlice.reducer,\r\n })\r\n\r\n const reducer: typeof combinedReducer = (state, action) =>\r\n combinedReducer(resetApiState.match(action) ? undefined : state, action)\r\n\r\n const actions = {\r\n ...configSlice.actions,\r\n ...querySlice.actions,\r\n ...subscriptionSlice.actions,\r\n ...internalSubscriptionsSlice.actions,\r\n ...mutationSlice.actions,\r\n /** @deprecated has been renamed to `removeMutationResult` */\r\n unsubscribeMutationResult: mutationSlice.actions.removeMutationResult,\r\n resetApiState,\r\n }\r\n\r\n return { reducer, actions }\r\n}\r\nexport type SliceActions = ReturnType['actions']\r\n","/**\r\n * Assumes a browser is online if `undefined`, otherwise makes a best effort\r\n * @link https://developer.mozilla.org/en-US/docs/Web/API/NavigatorOnLine/onLine\r\n */\r\nexport function isOnline() {\r\n // We set the default config value in the store, so we'd need to check for this in a SSR env\r\n return typeof navigator === 'undefined'\r\n ? true\r\n : navigator.onLine === undefined\r\n ? true\r\n : navigator.onLine\r\n}\r\n","/**\r\n * Assumes true for a non-browser env, otherwise makes a best effort\r\n * @link https://developer.mozilla.org/en-US/docs/Web/API/Document/visibilityState\r\n */\r\nexport function isDocumentVisible(): boolean {\r\n // `document` may not exist in non-browser envs (like RN)\r\n if (typeof document === 'undefined') {\r\n return true\r\n }\r\n // Match true for visible, prerender, undefined\r\n return document.visibilityState !== 'hidden'\r\n}\r\n","import { createNextState, createSelector } from '@reduxjs/toolkit'\r\nimport type {\r\n MutationSubState,\r\n QuerySubState,\r\n RootState as _RootState,\r\n RequestStatusFlags,\r\n QueryCacheKey,\r\n} from './apiState'\r\nimport { QueryStatus, getRequestStatusFlags } from './apiState'\r\nimport type {\r\n EndpointDefinitions,\r\n QueryDefinition,\r\n MutationDefinition,\r\n QueryArgFrom,\r\n TagTypesFrom,\r\n ReducerPathFrom,\r\n TagDescription,\r\n} from '../endpointDefinitions'\r\nimport { expandTagDescription } from '../endpointDefinitions'\r\nimport type { InternalSerializeQueryArgs } from '../defaultSerializeQueryArgs'\r\nimport { getMutationCacheKey } from './buildSlice'\r\nimport { flatten } from '../utils'\r\n\r\nexport type SkipToken = typeof skipToken\r\n/**\r\n * Can be passed into `useQuery`, `useQueryState` or `useQuerySubscription`\r\n * instead of the query argument to get the same effect as if setting\r\n * `skip: true` in the query options.\r\n *\r\n * Useful for scenarios where a query should be skipped when `arg` is `undefined`\r\n * and TypeScript complains about it because `arg` is not allowed to be passed\r\n * in as `undefined`, such as\r\n *\r\n * ```ts\r\n * // codeblock-meta title=\"will error if the query argument is not allowed to be undefined\" no-transpile\r\n * useSomeQuery(arg, { skip: !!arg })\r\n * ```\r\n *\r\n * ```ts\r\n * // codeblock-meta title=\"using skipToken instead\" no-transpile\r\n * useSomeQuery(arg ?? skipToken)\r\n * ```\r\n *\r\n * If passed directly into a query or mutation selector, that selector will always\r\n * return an uninitialized state.\r\n */\r\nexport const skipToken = /* @__PURE__ */ Symbol.for('RTKQ/skipToken')\r\n/** @deprecated renamed to `skipToken` */\r\nexport const skipSelector = skipToken\r\n\r\ndeclare module './module' {\r\n export interface ApiEndpointQuery<\r\n Definition extends QueryDefinition,\r\n Definitions extends EndpointDefinitions\r\n > {\r\n select: QueryResultSelectorFactory<\r\n Definition,\r\n _RootState<\r\n Definitions,\r\n TagTypesFrom,\r\n ReducerPathFrom\r\n >\r\n >\r\n }\r\n\r\n export interface ApiEndpointMutation<\r\n Definition extends MutationDefinition,\r\n Definitions extends EndpointDefinitions\r\n > {\r\n select: MutationResultSelectorFactory<\r\n Definition,\r\n _RootState<\r\n Definitions,\r\n TagTypesFrom,\r\n ReducerPathFrom\r\n >\r\n >\r\n }\r\n}\r\n\r\ntype QueryResultSelectorFactory<\r\n Definition extends QueryDefinition,\r\n RootState\r\n> = (\r\n queryArg: QueryArgFrom | SkipToken\r\n) => (state: RootState) => QueryResultSelectorResult\r\n\r\nexport type QueryResultSelectorResult<\r\n Definition extends QueryDefinition\r\n> = QuerySubState & RequestStatusFlags\r\n\r\ntype MutationResultSelectorFactory<\r\n Definition extends MutationDefinition,\r\n RootState\r\n> = (\r\n requestId:\r\n | string\r\n | { requestId: string | undefined; fixedCacheKey: string | undefined }\r\n | SkipToken\r\n) => (state: RootState) => MutationResultSelectorResult\r\n\r\nexport type MutationResultSelectorResult<\r\n Definition extends MutationDefinition\r\n> = MutationSubState & RequestStatusFlags\r\n\r\nconst initialSubState: QuerySubState = {\r\n status: QueryStatus.uninitialized as const,\r\n}\r\n\r\n// abuse immer to freeze default states\r\nconst defaultQuerySubState = /* @__PURE__ */ createNextState(\r\n initialSubState,\r\n () => {}\r\n)\r\nconst defaultMutationSubState = /* @__PURE__ */ createNextState(\r\n initialSubState as MutationSubState,\r\n () => {}\r\n)\r\n\r\nexport function buildSelectors<\r\n Definitions extends EndpointDefinitions,\r\n ReducerPath extends string\r\n>({\r\n serializeQueryArgs,\r\n reducerPath,\r\n}: {\r\n serializeQueryArgs: InternalSerializeQueryArgs\r\n reducerPath: ReducerPath\r\n}) {\r\n type RootState = _RootState\r\n\r\n const selectSkippedQuery = (state: RootState) => defaultQuerySubState\r\n const selectSkippedMutation = (state: RootState) => defaultMutationSubState\r\n\r\n return { buildQuerySelector, buildMutationSelector, selectInvalidatedBy }\r\n\r\n function withRequestFlags(\r\n substate: T\r\n ): T & RequestStatusFlags {\r\n return {\r\n ...substate,\r\n ...getRequestStatusFlags(substate.status),\r\n }\r\n }\r\n\r\n function selectInternalState(rootState: RootState) {\r\n const state = rootState[reducerPath]\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (!state) {\r\n if ((selectInternalState as any).triggered) return state\r\n ;(selectInternalState as any).triggered = true\r\n console.error(\r\n `Error: No data found at \\`state.${reducerPath}\\`. Did you forget to add the reducer to the store?`\r\n )\r\n }\r\n }\r\n return state\r\n }\r\n\r\n function buildQuerySelector(\r\n endpointName: string,\r\n endpointDefinition: QueryDefinition\r\n ) {\r\n return ((queryArgs: any) => {\r\n const serializedArgs = serializeQueryArgs({\r\n queryArgs,\r\n endpointDefinition,\r\n endpointName,\r\n })\r\n const selectQuerySubstate = (state: RootState) =>\r\n selectInternalState(state)?.queries?.[serializedArgs] ??\r\n defaultQuerySubState\r\n const finalSelectQuerySubState =\r\n queryArgs === skipToken ? selectSkippedQuery : selectQuerySubstate\r\n\r\n return createSelector(finalSelectQuerySubState, withRequestFlags)\r\n }) as QueryResultSelectorFactory\r\n }\r\n\r\n function buildMutationSelector() {\r\n return ((id) => {\r\n let mutationId: string | typeof skipToken\r\n if (typeof id === 'object') {\r\n mutationId = getMutationCacheKey(id) ?? skipToken\r\n } else {\r\n mutationId = id\r\n }\r\n const selectMutationSubstate = (state: RootState) =>\r\n selectInternalState(state)?.mutations?.[mutationId as string] ??\r\n defaultMutationSubState\r\n const finalSelectMutationSubstate =\r\n mutationId === skipToken\r\n ? selectSkippedMutation\r\n : selectMutationSubstate\r\n\r\n return createSelector(finalSelectMutationSubstate, withRequestFlags)\r\n }) as MutationResultSelectorFactory\r\n }\r\n\r\n function selectInvalidatedBy(\r\n state: RootState,\r\n tags: ReadonlyArray>\r\n ): Array<{\r\n endpointName: string\r\n originalArgs: any\r\n queryCacheKey: QueryCacheKey\r\n }> {\r\n const apiState = state[reducerPath]\r\n const toInvalidate = new Set()\r\n for (const tag of tags.map(expandTagDescription)) {\r\n const provided = apiState.provided[tag.type]\r\n if (!provided) {\r\n continue\r\n }\r\n\r\n let invalidateSubscriptions =\r\n (tag.id !== undefined\r\n ? // id given: invalidate all queries that provide this type & id\r\n provided[tag.id]\r\n : // no id: invalidate all queries that provide this type\r\n flatten(Object.values(provided))) ?? []\r\n\r\n for (const invalidate of invalidateSubscriptions) {\r\n toInvalidate.add(invalidate)\r\n }\r\n }\r\n\r\n return flatten(\r\n Array.from(toInvalidate.values()).map((queryCacheKey) => {\r\n const querySubState = apiState.queries[queryCacheKey]\r\n return querySubState\r\n ? [\r\n {\r\n queryCacheKey,\r\n endpointName: querySubState.endpointName!,\r\n originalArgs: querySubState.originalArgs,\r\n },\r\n ]\r\n : []\r\n })\r\n )\r\n }\r\n}\r\n","import type { Api, ApiContext, Module, ModuleName } from './apiTypes'\r\nimport type { CombinedState } from './core/apiState'\r\nimport type { BaseQueryArg, BaseQueryFn } from './baseQueryTypes'\r\nimport {\r\n defaultSerializeQueryArgs,\r\n SerializeQueryArgs,\r\n} from './defaultSerializeQueryArgs'\r\nimport type {\r\n EndpointBuilder,\r\n EndpointDefinitions,\r\n} from './endpointDefinitions'\r\nimport { DefinitionType, isQueryDefinition } from './endpointDefinitions'\r\nimport { nanoid } from '@reduxjs/toolkit'\r\nimport type { AnyAction } from '@reduxjs/toolkit'\r\nimport type { NoInfer } from './tsHelpers'\r\nimport { defaultMemoize } from 'reselect'\r\n\r\nexport interface CreateApiOptions<\r\n BaseQuery extends BaseQueryFn,\r\n Definitions extends EndpointDefinitions,\r\n ReducerPath extends string = 'api',\r\n TagTypes extends string = never\r\n> {\r\n /**\r\n * The base query used by each endpoint if no `queryFn` option is specified. RTK Query exports a utility called [fetchBaseQuery](./fetchBaseQuery) as a lightweight wrapper around `fetch` for common use-cases. See [Customizing Queries](../../rtk-query/usage/customizing-queries) if `fetchBaseQuery` does not handle your requirements.\r\n *\r\n * @example\r\n *\r\n * ```ts\r\n * import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query'\r\n *\r\n * const api = createApi({\r\n * // highlight-start\r\n * baseQuery: fetchBaseQuery({ baseUrl: '/' }),\r\n * // highlight-end\r\n * endpoints: (build) => ({\r\n * // ...endpoints\r\n * }),\r\n * })\r\n * ```\r\n */\r\n baseQuery: BaseQuery\r\n /**\r\n * An array of string tag type names. Specifying tag types is optional, but you should define them so that they can be used for caching and invalidation. When defining a tag type, you will be able to [provide](../../rtk-query/usage/automated-refetching#providing-tags) them with `providesTags` and [invalidate](../../rtk-query/usage/automated-refetching#invalidating-tags) them with `invalidatesTags` when configuring [endpoints](#endpoints).\r\n *\r\n * @example\r\n *\r\n * ```ts\r\n * import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query'\r\n *\r\n * const api = createApi({\r\n * baseQuery: fetchBaseQuery({ baseUrl: '/' }),\r\n * // highlight-start\r\n * tagTypes: ['Post', 'User'],\r\n * // highlight-end\r\n * endpoints: (build) => ({\r\n * // ...endpoints\r\n * }),\r\n * })\r\n * ```\r\n */\r\n tagTypes?: readonly TagTypes[]\r\n /**\r\n * The `reducerPath` is a _unique_ key that your service will be mounted to in your store. If you call `createApi` more than once in your application, you will need to provide a unique value each time. Defaults to `'api'`.\r\n *\r\n * @example\r\n *\r\n * ```ts\r\n * // codeblock-meta title=\"apis.js\"\r\n * import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query';\r\n *\r\n * const apiOne = createApi({\r\n * // highlight-start\r\n * reducerPath: 'apiOne',\r\n * // highlight-end\r\n * baseQuery: fetchBaseQuery({ baseUrl: '/' }),\r\n * endpoints: (builder) => ({\r\n * // ...endpoints\r\n * }),\r\n * });\r\n *\r\n * const apiTwo = createApi({\r\n * // highlight-start\r\n * reducerPath: 'apiTwo',\r\n * // highlight-end\r\n * baseQuery: fetchBaseQuery({ baseUrl: '/' }),\r\n * endpoints: (builder) => ({\r\n * // ...endpoints\r\n * }),\r\n * });\r\n * ```\r\n */\r\n reducerPath?: ReducerPath\r\n /**\r\n * Accepts a custom function if you have a need to change the creation of cache keys for any reason.\r\n */\r\n serializeQueryArgs?: SerializeQueryArgs>\r\n /**\r\n * Endpoints are just a set of operations that you want to perform against your server. You define them as an object using the builder syntax. There are two basic endpoint types: [`query`](../../rtk-query/usage/queries) and [`mutation`](../../rtk-query/usage/mutations).\r\n */\r\n endpoints(\r\n build: EndpointBuilder\r\n ): Definitions\r\n /**\r\n * Defaults to `60` _(this value is in seconds)_. This is how long RTK Query will keep your data cached for **after** the last component unsubscribes. For example, if you query an endpoint, then unmount the component, then mount another component that makes the same request within the given time frame, the most recent value will be served from the cache.\r\n *\r\n * ```ts\r\n * // codeblock-meta title=\"keepUnusedDataFor example\"\r\n *\r\n * import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react'\r\n * interface Post {\r\n * id: number\r\n * name: string\r\n * }\r\n * type PostsResponse = Post[]\r\n *\r\n * const api = createApi({\r\n * baseQuery: fetchBaseQuery({ baseUrl: '/' }),\r\n * endpoints: (build) => ({\r\n * getPosts: build.query({\r\n * query: () => 'posts',\r\n * // highlight-start\r\n * keepUnusedDataFor: 5\r\n * // highlight-end\r\n * })\r\n * })\r\n * })\r\n * ```\r\n */\r\n keepUnusedDataFor?: number\r\n /**\r\n * Defaults to `false`. This setting allows you to control whether if a cached result is already available RTK Query will only serve a cached result, or if it should `refetch` when set to `true` or if an adequate amount of time has passed since the last successful query result.\r\n * - `false` - Will not cause a query to be performed _unless_ it does not exist yet.\r\n * - `true` - Will always refetch when a new subscriber to a query is added. Behaves the same as calling the `refetch` callback or passing `forceRefetch: true` in the action creator.\r\n * - `number` - **Value is in seconds**. If a number is provided and there is an existing query in the cache, it will compare the current time vs the last fulfilled timestamp, and only refetch if enough time has elapsed.\r\n *\r\n * If you specify this option alongside `skip: true`, this **will not be evaluated** until `skip` is false.\r\n */\r\n refetchOnMountOrArgChange?: boolean | number\r\n /**\r\n * Defaults to `false`. This setting allows you to control whether RTK Query will try to refetch all subscribed queries after the application window regains focus.\r\n *\r\n * If you specify this option alongside `skip: true`, this **will not be evaluated** until `skip` is false.\r\n *\r\n * Note: requires [`setupListeners`](./setupListeners) to have been called.\r\n */\r\n refetchOnFocus?: boolean\r\n /**\r\n * Defaults to `false`. This setting allows you to control whether RTK Query will try to refetch all subscribed queries after regaining a network connection.\r\n *\r\n * If you specify this option alongside `skip: true`, this **will not be evaluated** until `skip` is false.\r\n *\r\n * Note: requires [`setupListeners`](./setupListeners) to have been called.\r\n */\r\n refetchOnReconnect?: boolean\r\n /**\r\n * A function that is passed every dispatched action. If this returns something other than `undefined`,\r\n * that return value will be used to rehydrate fulfilled & errored queries.\r\n *\r\n * @example\r\n *\r\n * ```ts\r\n * // codeblock-meta title=\"next-redux-wrapper rehydration example\"\r\n * import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react'\r\n * import { HYDRATE } from 'next-redux-wrapper'\r\n *\r\n * export const api = createApi({\r\n * baseQuery: fetchBaseQuery({ baseUrl: '/' }),\r\n * // highlight-start\r\n * extractRehydrationInfo(action, { reducerPath }) {\r\n * if (action.type === HYDRATE) {\r\n * return action.payload[reducerPath]\r\n * }\r\n * },\r\n * // highlight-end\r\n * endpoints: (build) => ({\r\n * // omitted\r\n * }),\r\n * })\r\n * ```\r\n */\r\n extractRehydrationInfo?: (\r\n action: AnyAction,\r\n {\r\n reducerPath,\r\n }: {\r\n reducerPath: ReducerPath\r\n }\r\n ) =>\r\n | undefined\r\n | CombinedState<\r\n NoInfer,\r\n NoInfer,\r\n NoInfer\r\n >\r\n}\r\n\r\nexport type CreateApi = {\r\n /**\r\n * Creates a service to use in your application. Contains only the basic redux logic (the core module).\r\n *\r\n * @link https://rtk-query-docs.netlify.app/api/createApi\r\n */\r\n <\r\n BaseQuery extends BaseQueryFn,\r\n Definitions extends EndpointDefinitions,\r\n ReducerPath extends string = 'api',\r\n TagTypes extends string = never\r\n >(\r\n options: CreateApiOptions\r\n ): Api\r\n}\r\n\r\n/**\r\n * Builds a `createApi` method based on the provided `modules`.\r\n *\r\n * @link https://rtk-query-docs.netlify.app/concepts/customizing-create-api\r\n *\r\n * @example\r\n * ```ts\r\n * const MyContext = React.createContext(null as any);\r\n * const customCreateApi = buildCreateApi(\r\n * coreModule(),\r\n * reactHooksModule({ useDispatch: createDispatchHook(MyContext) })\r\n * );\r\n * ```\r\n *\r\n * @param modules - A variable number of modules that customize how the `createApi` method handles endpoints\r\n * @returns A `createApi` method using the provided `modules`.\r\n */\r\nexport function buildCreateApi, ...Module[]]>(\r\n ...modules: Modules\r\n): CreateApi {\r\n return function baseCreateApi(options) {\r\n const extractRehydrationInfo = defaultMemoize((action: AnyAction) =>\r\n options.extractRehydrationInfo?.(action, {\r\n reducerPath: (options.reducerPath ?? 'api') as any,\r\n })\r\n )\r\n\r\n const optionsWithDefaults: CreateApiOptions = {\r\n reducerPath: 'api',\r\n keepUnusedDataFor: 60,\r\n refetchOnMountOrArgChange: false,\r\n refetchOnFocus: false,\r\n refetchOnReconnect: false,\r\n ...options,\r\n extractRehydrationInfo,\r\n serializeQueryArgs(queryArgsApi) {\r\n let finalSerializeQueryArgs = defaultSerializeQueryArgs\r\n if ('serializeQueryArgs' in queryArgsApi.endpointDefinition) {\r\n const endpointSQA =\r\n queryArgsApi.endpointDefinition.serializeQueryArgs!\r\n finalSerializeQueryArgs = (queryArgsApi) => {\r\n const initialResult = endpointSQA(queryArgsApi)\r\n if (typeof initialResult === 'string') {\r\n // If the user function returned a string, use it as-is\r\n return initialResult\r\n } else {\r\n // Assume they returned an object (such as a subset of the original\r\n // query args) or a primitive, and serialize it ourselves\r\n return defaultSerializeQueryArgs({\r\n ...queryArgsApi,\r\n queryArgs: initialResult,\r\n })\r\n }\r\n }\r\n } else if (options.serializeQueryArgs) {\r\n finalSerializeQueryArgs = options.serializeQueryArgs\r\n }\r\n\r\n return finalSerializeQueryArgs(queryArgsApi)\r\n },\r\n tagTypes: [...(options.tagTypes || [])],\r\n }\r\n\r\n const context: ApiContext = {\r\n endpointDefinitions: {},\r\n batch(fn) {\r\n // placeholder \"batch\" method to be overridden by plugins, for example with React.unstable_batchedUpdate\r\n fn()\r\n },\r\n apiUid: nanoid(),\r\n extractRehydrationInfo,\r\n hasRehydrationInfo: defaultMemoize(\r\n (action) => extractRehydrationInfo(action) != null\r\n ),\r\n }\r\n\r\n const api = {\r\n injectEndpoints,\r\n enhanceEndpoints({ addTagTypes, endpoints }) {\r\n if (addTagTypes) {\r\n for (const eT of addTagTypes) {\r\n if (!optionsWithDefaults.tagTypes!.includes(eT as any)) {\r\n ;(optionsWithDefaults.tagTypes as any[]).push(eT)\r\n }\r\n }\r\n }\r\n if (endpoints) {\r\n for (const [endpointName, partialDefinition] of Object.entries(\r\n endpoints\r\n )) {\r\n if (typeof partialDefinition === 'function') {\r\n partialDefinition(context.endpointDefinitions[endpointName])\r\n } else {\r\n Object.assign(\r\n context.endpointDefinitions[endpointName] || {},\r\n partialDefinition\r\n )\r\n }\r\n }\r\n }\r\n return api\r\n },\r\n } as Api\r\n\r\n const initializedModules = modules.map((m) =>\r\n m.init(api as any, optionsWithDefaults as any, context)\r\n )\r\n\r\n function injectEndpoints(\r\n inject: Parameters[0]\r\n ) {\r\n const evaluatedEndpoints = inject.endpoints({\r\n query: (x) => ({ ...x, type: DefinitionType.query } as any),\r\n mutation: (x) => ({ ...x, type: DefinitionType.mutation } as any),\r\n })\r\n\r\n for (const [endpointName, definition] of Object.entries(\r\n evaluatedEndpoints\r\n )) {\r\n if (\r\n !inject.overrideExisting &&\r\n endpointName in context.endpointDefinitions\r\n ) {\r\n if (\r\n typeof process !== 'undefined' &&\r\n process.env.NODE_ENV === 'development'\r\n ) {\r\n console.error(\r\n `called \\`injectEndpoints\\` to override already-existing endpointName ${endpointName} without specifying \\`overrideExisting: true\\``\r\n )\r\n }\r\n\r\n continue\r\n }\r\n\r\n context.endpointDefinitions[endpointName] = definition\r\n for (const m of initializedModules) {\r\n m.injectEndpoint(endpointName, definition)\r\n }\r\n }\r\n\r\n return api as any\r\n }\r\n\r\n return api.injectEndpoints({ endpoints: options.endpoints as any })\r\n }\r\n}\r\n","import type { BaseQueryFn } from '../../baseQueryTypes'\r\nimport type { QueryDefinition } from '../../endpointDefinitions'\r\nimport type { ConfigState, QueryCacheKey } from '../apiState'\r\nimport type {\r\n QueryStateMeta,\r\n SubMiddlewareApi,\r\n TimeoutId,\r\n InternalHandlerBuilder,\r\n ApiMiddlewareInternalHandler,\r\n InternalMiddlewareState,\r\n} from './types'\r\n\r\nexport type ReferenceCacheCollection = never\r\n\r\nfunction isObjectEmpty(obj: Record) {\r\n // Apparently a for..in loop is faster than `Object.keys()` here:\r\n // https://stackoverflow.com/a/59787784/62937\r\n for (let k in obj) {\r\n // If there is at least one key, it's not empty\r\n return false\r\n }\r\n return true\r\n}\r\n\r\ndeclare module '../../endpointDefinitions' {\r\n interface QueryExtraOptions<\r\n TagTypes extends string,\r\n ResultType,\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n ReducerPath extends string = string\r\n > {\r\n /**\r\n * Overrides the api-wide definition of `keepUnusedDataFor` for this endpoint only. _(This value is in seconds.)_\r\n *\r\n * This is how long RTK Query will keep your data cached for **after** the last component unsubscribes. For example, if you query an endpoint, then unmount the component, then mount another component that makes the same request within the given time frame, the most recent value will be served from the cache.\r\n */\r\n keepUnusedDataFor?: number\r\n }\r\n}\r\n\r\n// Per https://developer.mozilla.org/en-US/docs/Web/API/setTimeout#maximum_delay_value , browsers store\r\n// `setTimeout()` timer values in a 32-bit int. If we pass a value in that's larger than that,\r\n// it wraps and ends up executing immediately.\r\n// Our `keepUnusedDataFor` values are in seconds, so adjust the numbers here accordingly.\r\nexport const THIRTY_TWO_BIT_MAX_INT = 2_147_483_647\r\nexport const THIRTY_TWO_BIT_MAX_TIMER_SECONDS = 2_147_483_647 / 1_000 - 1\r\n\r\nexport const buildCacheCollectionHandler: InternalHandlerBuilder = ({\r\n reducerPath,\r\n api,\r\n context,\r\n internalState,\r\n}) => {\r\n const { removeQueryResult, unsubscribeQueryResult } = api.internalActions\r\n\r\n function anySubscriptionsRemainingForKey(queryCacheKey: string) {\r\n const subscriptions = internalState.currentSubscriptions[queryCacheKey]\r\n return !!subscriptions && !isObjectEmpty(subscriptions)\r\n }\r\n\r\n const currentRemovalTimeouts: QueryStateMeta = {}\r\n\r\n const handler: ApiMiddlewareInternalHandler = (\r\n action,\r\n mwApi,\r\n internalState\r\n ) => {\r\n if (unsubscribeQueryResult.match(action)) {\r\n const state = mwApi.getState()[reducerPath]\r\n const { queryCacheKey } = action.payload\r\n\r\n handleUnsubscribe(\r\n queryCacheKey,\r\n state.queries[queryCacheKey]?.endpointName,\r\n mwApi,\r\n state.config\r\n )\r\n }\r\n\r\n if (api.util.resetApiState.match(action)) {\r\n for (const [key, timeout] of Object.entries(currentRemovalTimeouts)) {\r\n if (timeout) clearTimeout(timeout)\r\n delete currentRemovalTimeouts[key]\r\n }\r\n }\r\n\r\n if (context.hasRehydrationInfo(action)) {\r\n const state = mwApi.getState()[reducerPath]\r\n const { queries } = context.extractRehydrationInfo(action)!\r\n for (const [queryCacheKey, queryState] of Object.entries(queries)) {\r\n // Gotcha:\r\n // If rehydrating before the endpoint has been injected,the global `keepUnusedDataFor`\r\n // will be used instead of the endpoint-specific one.\r\n handleUnsubscribe(\r\n queryCacheKey as QueryCacheKey,\r\n queryState?.endpointName,\r\n mwApi,\r\n state.config\r\n )\r\n }\r\n }\r\n }\r\n\r\n function handleUnsubscribe(\r\n queryCacheKey: QueryCacheKey,\r\n endpointName: string | undefined,\r\n api: SubMiddlewareApi,\r\n config: ConfigState\r\n ) {\r\n const endpointDefinition = context.endpointDefinitions[\r\n endpointName!\r\n ] as QueryDefinition\r\n const keepUnusedDataFor =\r\n endpointDefinition?.keepUnusedDataFor ?? config.keepUnusedDataFor\r\n\r\n if (keepUnusedDataFor === Infinity) {\r\n // Hey, user said keep this forever!\r\n return\r\n }\r\n // Prevent `setTimeout` timers from overflowing a 32-bit internal int, by\r\n // clamping the max value to be at most 1000ms less than the 32-bit max.\r\n // Look, a 24.8-day keepalive ought to be enough for anybody, right? :)\r\n // Also avoid negative values too.\r\n const finalKeepUnusedDataFor = Math.max(\r\n 0,\r\n Math.min(keepUnusedDataFor, THIRTY_TWO_BIT_MAX_TIMER_SECONDS)\r\n )\r\n\r\n if (!anySubscriptionsRemainingForKey(queryCacheKey)) {\r\n const currentTimeout = currentRemovalTimeouts[queryCacheKey]\r\n if (currentTimeout) {\r\n clearTimeout(currentTimeout)\r\n }\r\n currentRemovalTimeouts[queryCacheKey] = setTimeout(() => {\r\n if (!anySubscriptionsRemainingForKey(queryCacheKey)) {\r\n api.dispatch(removeQueryResult({ queryCacheKey }))\r\n }\r\n delete currentRemovalTimeouts![queryCacheKey]\r\n }, finalKeepUnusedDataFor * 1000)\r\n }\r\n }\r\n\r\n return handler\r\n}\r\n","import type { QueryThunk, RejectedAction } from '../buildThunks'\r\nimport type { InternalHandlerBuilder } from './types'\r\nimport type {\r\n SubscriptionState,\r\n QuerySubstateIdentifier,\r\n Subscribers,\r\n} from '../apiState'\r\nimport { produceWithPatches } from 'immer'\r\nimport { createSlice, PayloadAction, AnyAction } from '@reduxjs/toolkit'\r\n\r\n// Copied from https://github.com/feross/queue-microtask\r\nlet promise: Promise\r\nconst queueMicrotaskShim =\r\n typeof queueMicrotask === 'function'\r\n ? queueMicrotask.bind(typeof window !== 'undefined' ? window : global)\r\n : // reuse resolved promise, and allocate it lazily\r\n (cb: () => void) =>\r\n (promise || (promise = Promise.resolve())).then(cb).catch((err: any) =>\r\n setTimeout(() => {\r\n throw err\r\n }, 0)\r\n )\r\n\r\nexport const buildBatchedActionsHandler: InternalHandlerBuilder<\r\n [actionShouldContinue: boolean, subscriptionExists: boolean]\r\n> = ({ api, queryThunk, internalState }) => {\r\n const subscriptionsPrefix = `${api.reducerPath}/subscriptions`\r\n\r\n let previousSubscriptions: SubscriptionState =\r\n null as unknown as SubscriptionState\r\n\r\n let dispatchQueued = false\r\n\r\n const { updateSubscriptionOptions, unsubscribeQueryResult } =\r\n api.internalActions\r\n\r\n // Actually intentionally mutate the subscriptions state used in the middleware\r\n // This is done to speed up perf when loading many components\r\n const actuallyMutateSubscriptions = (\r\n mutableState: SubscriptionState,\r\n action: AnyAction\r\n ) => {\r\n if (updateSubscriptionOptions.match(action)) {\r\n const { queryCacheKey, requestId, options } = action.payload\r\n\r\n if (mutableState?.[queryCacheKey]?.[requestId]) {\r\n mutableState[queryCacheKey]![requestId] = options\r\n }\r\n return true\r\n }\r\n if (unsubscribeQueryResult.match(action)) {\r\n const { queryCacheKey, requestId } = action.payload\r\n if (mutableState[queryCacheKey]) {\r\n delete mutableState[queryCacheKey]![requestId]\r\n }\r\n return true\r\n }\r\n if (api.internalActions.removeQueryResult.match(action)) {\r\n delete mutableState[action.payload.queryCacheKey]\r\n return true\r\n }\r\n if (queryThunk.pending.match(action)) {\r\n const {\r\n meta: { arg, requestId },\r\n } = action\r\n if (arg.subscribe) {\r\n const substate = (mutableState[arg.queryCacheKey] ??= {})\r\n substate[requestId] =\r\n arg.subscriptionOptions ?? substate[requestId] ?? {}\r\n\r\n return true\r\n }\r\n }\r\n if (queryThunk.rejected.match(action)) {\r\n const {\r\n meta: { condition, arg, requestId },\r\n } = action\r\n if (condition && arg.subscribe) {\r\n const substate = (mutableState[arg.queryCacheKey] ??= {})\r\n substate[requestId] =\r\n arg.subscriptionOptions ?? substate[requestId] ?? {}\r\n\r\n return true\r\n }\r\n }\r\n\r\n return false\r\n }\r\n\r\n return (action, mwApi) => {\r\n if (!previousSubscriptions) {\r\n // Initialize it the first time this handler runs\r\n previousSubscriptions = JSON.parse(\r\n JSON.stringify(internalState.currentSubscriptions)\r\n )\r\n }\r\n\r\n // Intercept requests by hooks to see if they're subscribed\r\n // Necessary because we delay updating store state to the end of the tick\r\n if (api.internalActions.internal_probeSubscription.match(action)) {\r\n const { queryCacheKey, requestId } = action.payload\r\n const hasSubscription =\r\n !!internalState.currentSubscriptions[queryCacheKey]?.[requestId]\r\n return [false, hasSubscription]\r\n }\r\n\r\n // Update subscription data based on this action\r\n const didMutate = actuallyMutateSubscriptions(\r\n internalState.currentSubscriptions,\r\n action\r\n )\r\n\r\n if (didMutate) {\r\n if (!dispatchQueued) {\r\n queueMicrotaskShim(() => {\r\n // Deep clone the current subscription data\r\n const newSubscriptions: SubscriptionState = JSON.parse(\r\n JSON.stringify(internalState.currentSubscriptions)\r\n )\r\n // Figure out a smaller diff between original and current\r\n const [, patches] = produceWithPatches(\r\n previousSubscriptions,\r\n () => newSubscriptions\r\n )\r\n\r\n // Sync the store state for visibility\r\n mwApi.next(api.internalActions.subscriptionsUpdated(patches))\r\n // Save the cloned state for later reference\r\n previousSubscriptions = newSubscriptions\r\n dispatchQueued = false\r\n })\r\n dispatchQueued = true\r\n }\r\n\r\n const isSubscriptionSliceAction =\r\n !!action.type?.startsWith(subscriptionsPrefix)\r\n const isAdditionalSubscriptionAction =\r\n queryThunk.rejected.match(action) &&\r\n action.meta.condition &&\r\n !!action.meta.arg.subscribe\r\n\r\n const actionShouldContinue =\r\n !isSubscriptionSliceAction && !isAdditionalSubscriptionAction\r\n\r\n return [actionShouldContinue, false]\r\n }\r\n\r\n return [true, false]\r\n }\r\n}\r\n","import { isAnyOf, isFulfilled, isRejectedWithValue } from '@reduxjs/toolkit'\r\n\r\nimport type { FullTagDescription } from '../../endpointDefinitions'\r\nimport { calculateProvidedBy } from '../../endpointDefinitions'\r\nimport type { QueryCacheKey } from '../apiState'\r\nimport { QueryStatus } from '../apiState'\r\nimport { calculateProvidedByThunk } from '../buildThunks'\r\nimport type {\r\n SubMiddlewareApi,\r\n InternalHandlerBuilder,\r\n ApiMiddlewareInternalHandler,\r\n} from './types'\r\n\r\nexport const buildInvalidationByTagsHandler: InternalHandlerBuilder = ({\r\n reducerPath,\r\n context,\r\n context: { endpointDefinitions },\r\n mutationThunk,\r\n api,\r\n assertTagType,\r\n refetchQuery,\r\n}) => {\r\n const { removeQueryResult } = api.internalActions\r\n const isThunkActionWithTags = isAnyOf(\r\n isFulfilled(mutationThunk),\r\n isRejectedWithValue(mutationThunk)\r\n )\r\n\r\n const handler: ApiMiddlewareInternalHandler = (action, mwApi) => {\r\n if (isThunkActionWithTags(action)) {\r\n invalidateTags(\r\n calculateProvidedByThunk(\r\n action,\r\n 'invalidatesTags',\r\n endpointDefinitions,\r\n assertTagType\r\n ),\r\n mwApi\r\n )\r\n }\r\n\r\n if (api.util.invalidateTags.match(action)) {\r\n invalidateTags(\r\n calculateProvidedBy(\r\n action.payload,\r\n undefined,\r\n undefined,\r\n undefined,\r\n undefined,\r\n assertTagType\r\n ),\r\n mwApi\r\n )\r\n }\r\n }\r\n\r\n function invalidateTags(\r\n tags: readonly FullTagDescription[],\r\n mwApi: SubMiddlewareApi\r\n ) {\r\n const rootState = mwApi.getState()\r\n const state = rootState[reducerPath]\r\n\r\n const toInvalidate = api.util.selectInvalidatedBy(rootState, tags)\r\n\r\n context.batch(() => {\r\n const valuesArray = Array.from(toInvalidate.values())\r\n for (const { queryCacheKey } of valuesArray) {\r\n const querySubState = state.queries[queryCacheKey]\r\n const subscriptionSubState = state.subscriptions[queryCacheKey] ?? {}\r\n\r\n if (querySubState) {\r\n if (Object.keys(subscriptionSubState).length === 0) {\r\n mwApi.dispatch(\r\n removeQueryResult({\r\n queryCacheKey: queryCacheKey as QueryCacheKey,\r\n })\r\n )\r\n } else if (querySubState.status !== QueryStatus.uninitialized) {\r\n mwApi.dispatch(refetchQuery(querySubState, queryCacheKey))\r\n }\r\n }\r\n }\r\n })\r\n }\r\n\r\n return handler\r\n}\r\n","import type { QuerySubstateIdentifier, Subscribers } from '../apiState'\r\nimport { QueryStatus } from '../apiState'\r\nimport type {\r\n QueryStateMeta,\r\n SubMiddlewareApi,\r\n TimeoutId,\r\n InternalHandlerBuilder,\r\n ApiMiddlewareInternalHandler,\r\n InternalMiddlewareState,\r\n} from './types'\r\n\r\nexport const buildPollingHandler: InternalHandlerBuilder = ({\r\n reducerPath,\r\n queryThunk,\r\n api,\r\n refetchQuery,\r\n internalState,\r\n}) => {\r\n const currentPolls: QueryStateMeta<{\r\n nextPollTimestamp: number\r\n timeout?: TimeoutId\r\n pollingInterval: number\r\n }> = {}\r\n\r\n const handler: ApiMiddlewareInternalHandler = (action, mwApi) => {\r\n if (\r\n api.internalActions.updateSubscriptionOptions.match(action) ||\r\n api.internalActions.unsubscribeQueryResult.match(action)\r\n ) {\r\n updatePollingInterval(action.payload, mwApi)\r\n }\r\n\r\n if (\r\n queryThunk.pending.match(action) ||\r\n (queryThunk.rejected.match(action) && action.meta.condition)\r\n ) {\r\n updatePollingInterval(action.meta.arg, mwApi)\r\n }\r\n\r\n if (\r\n queryThunk.fulfilled.match(action) ||\r\n (queryThunk.rejected.match(action) && !action.meta.condition)\r\n ) {\r\n startNextPoll(action.meta.arg, mwApi)\r\n }\r\n\r\n if (api.util.resetApiState.match(action)) {\r\n clearPolls()\r\n }\r\n }\r\n\r\n function startNextPoll(\r\n { queryCacheKey }: QuerySubstateIdentifier,\r\n api: SubMiddlewareApi\r\n ) {\r\n const state = api.getState()[reducerPath]\r\n const querySubState = state.queries[queryCacheKey]\r\n const subscriptions = internalState.currentSubscriptions[queryCacheKey]\r\n\r\n if (!querySubState || querySubState.status === QueryStatus.uninitialized)\r\n return\r\n\r\n const lowestPollingInterval = findLowestPollingInterval(subscriptions)\r\n if (!Number.isFinite(lowestPollingInterval)) return\r\n\r\n const currentPoll = currentPolls[queryCacheKey]\r\n\r\n if (currentPoll?.timeout) {\r\n clearTimeout(currentPoll.timeout)\r\n currentPoll.timeout = undefined\r\n }\r\n\r\n const nextPollTimestamp = Date.now() + lowestPollingInterval\r\n\r\n const currentInterval: typeof currentPolls[number] = (currentPolls[\r\n queryCacheKey\r\n ] = {\r\n nextPollTimestamp,\r\n pollingInterval: lowestPollingInterval,\r\n timeout: setTimeout(() => {\r\n currentInterval!.timeout = undefined\r\n api.dispatch(refetchQuery(querySubState, queryCacheKey))\r\n }, lowestPollingInterval),\r\n })\r\n }\r\n\r\n function updatePollingInterval(\r\n { queryCacheKey }: QuerySubstateIdentifier,\r\n api: SubMiddlewareApi\r\n ) {\r\n const state = api.getState()[reducerPath]\r\n const querySubState = state.queries[queryCacheKey]\r\n const subscriptions = internalState.currentSubscriptions[queryCacheKey]\r\n\r\n if (!querySubState || querySubState.status === QueryStatus.uninitialized) {\r\n return\r\n }\r\n\r\n const lowestPollingInterval = findLowestPollingInterval(subscriptions)\r\n\r\n if (!Number.isFinite(lowestPollingInterval)) {\r\n cleanupPollForKey(queryCacheKey)\r\n return\r\n }\r\n\r\n const currentPoll = currentPolls[queryCacheKey]\r\n const nextPollTimestamp = Date.now() + lowestPollingInterval\r\n\r\n if (!currentPoll || nextPollTimestamp < currentPoll.nextPollTimestamp) {\r\n startNextPoll({ queryCacheKey }, api)\r\n }\r\n }\r\n\r\n function cleanupPollForKey(key: string) {\r\n const existingPoll = currentPolls[key]\r\n if (existingPoll?.timeout) {\r\n clearTimeout(existingPoll.timeout)\r\n }\r\n delete currentPolls[key]\r\n }\r\n\r\n function clearPolls() {\r\n for (const key of Object.keys(currentPolls)) {\r\n cleanupPollForKey(key)\r\n }\r\n }\r\n\r\n function findLowestPollingInterval(subscribers: Subscribers = {}) {\r\n let lowestPollingInterval = Number.POSITIVE_INFINITY\r\n for (let key in subscribers) {\r\n if (!!subscribers[key].pollingInterval) {\r\n lowestPollingInterval = Math.min(\r\n subscribers[key].pollingInterval!,\r\n lowestPollingInterval\r\n )\r\n }\r\n }\r\n\r\n return lowestPollingInterval\r\n }\r\n return handler\r\n}\r\n","import { isAsyncThunkAction, isFulfilled } from '@reduxjs/toolkit'\r\nimport type { AnyAction } from 'redux'\r\nimport type { ThunkDispatch } from 'redux-thunk'\r\nimport type { BaseQueryFn, BaseQueryMeta } from '../../baseQueryTypes'\r\nimport { DefinitionType } from '../../endpointDefinitions'\r\nimport type { RootState } from '../apiState'\r\nimport type {\r\n MutationResultSelectorResult,\r\n QueryResultSelectorResult,\r\n} from '../buildSelectors'\r\nimport { getMutationCacheKey } from '../buildSlice'\r\nimport type { PatchCollection, Recipe } from '../buildThunks'\r\nimport type {\r\n ApiMiddlewareInternalHandler,\r\n InternalHandlerBuilder,\r\n PromiseWithKnownReason,\r\n SubMiddlewareApi,\r\n} from './types'\r\n\r\nexport type ReferenceCacheLifecycle = never\r\n\r\ndeclare module '../../endpointDefinitions' {\r\n export interface QueryBaseLifecycleApi<\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n ResultType,\r\n ReducerPath extends string = string\r\n > extends LifecycleApi {\r\n /**\r\n * Gets the current value of this cache entry.\r\n */\r\n getCacheEntry(): QueryResultSelectorResult<\r\n { type: DefinitionType.query } & BaseEndpointDefinition<\r\n QueryArg,\r\n BaseQuery,\r\n ResultType\r\n >\r\n >\r\n /**\r\n * Updates the current cache entry value.\r\n * For documentation see `api.util.updateQueryData`.\r\n */\r\n updateCachedData(updateRecipe: Recipe): PatchCollection\r\n }\r\n\r\n export interface MutationBaseLifecycleApi<\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n ResultType,\r\n ReducerPath extends string = string\r\n > extends LifecycleApi {\r\n /**\r\n * Gets the current value of this cache entry.\r\n */\r\n getCacheEntry(): MutationResultSelectorResult<\r\n { type: DefinitionType.mutation } & BaseEndpointDefinition<\r\n QueryArg,\r\n BaseQuery,\r\n ResultType\r\n >\r\n >\r\n }\r\n\r\n export interface LifecycleApi {\r\n /**\r\n * The dispatch method for the store\r\n */\r\n dispatch: ThunkDispatch\r\n /**\r\n * A method to get the current state\r\n */\r\n getState(): RootState\r\n /**\r\n * `extra` as provided as `thunk.extraArgument` to the `configureStore` `getDefaultMiddleware` option.\r\n */\r\n extra: unknown\r\n /**\r\n * A unique ID generated for the mutation\r\n */\r\n requestId: string\r\n }\r\n\r\n export interface CacheLifecyclePromises<\r\n ResultType = unknown,\r\n MetaType = unknown\r\n > {\r\n /**\r\n * Promise that will resolve with the first value for this cache key.\r\n * This allows you to `await` until an actual value is in cache.\r\n *\r\n * If the cache entry is removed from the cache before any value has ever\r\n * been resolved, this Promise will reject with\r\n * `new Error('Promise never resolved before cacheEntryRemoved.')`\r\n * to prevent memory leaks.\r\n * You can just re-throw that error (or not handle it at all) -\r\n * it will be caught outside of `cacheEntryAdded`.\r\n *\r\n * If you don't interact with this promise, it will not throw.\r\n */\r\n cacheDataLoaded: PromiseWithKnownReason<\r\n {\r\n /**\r\n * The (transformed) query result.\r\n */\r\n data: ResultType\r\n /**\r\n * The `meta` returned by the `baseQuery`\r\n */\r\n meta: MetaType\r\n },\r\n typeof neverResolvedError\r\n >\r\n /**\r\n * Promise that allows you to wait for the point in time when the cache entry\r\n * has been removed from the cache, by not being used/subscribed to any more\r\n * in the application for too long or by dispatching `api.util.resetApiState`.\r\n */\r\n cacheEntryRemoved: Promise\r\n }\r\n\r\n export interface QueryCacheLifecycleApi<\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n ResultType,\r\n ReducerPath extends string = string\r\n > extends QueryBaseLifecycleApi,\r\n CacheLifecyclePromises> {}\r\n\r\n export interface MutationCacheLifecycleApi<\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n ResultType,\r\n ReducerPath extends string = string\r\n > extends MutationBaseLifecycleApi<\r\n QueryArg,\r\n BaseQuery,\r\n ResultType,\r\n ReducerPath\r\n >,\r\n CacheLifecyclePromises> {}\r\n\r\n interface QueryExtraOptions<\r\n TagTypes extends string,\r\n ResultType,\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n ReducerPath extends string = string\r\n > {\r\n onCacheEntryAdded?(\r\n arg: QueryArg,\r\n api: QueryCacheLifecycleApi\r\n ): Promise | void\r\n }\r\n\r\n interface MutationExtraOptions<\r\n TagTypes extends string,\r\n ResultType,\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n ReducerPath extends string = string\r\n > {\r\n onCacheEntryAdded?(\r\n arg: QueryArg,\r\n api: MutationCacheLifecycleApi<\r\n QueryArg,\r\n BaseQuery,\r\n ResultType,\r\n ReducerPath\r\n >\r\n ): Promise | void\r\n }\r\n}\r\n\r\nconst neverResolvedError = new Error(\r\n 'Promise never resolved before cacheEntryRemoved.'\r\n) as Error & {\r\n message: 'Promise never resolved before cacheEntryRemoved.'\r\n}\r\n\r\nexport const buildCacheLifecycleHandler: InternalHandlerBuilder = ({\r\n api,\r\n reducerPath,\r\n context,\r\n queryThunk,\r\n mutationThunk,\r\n internalState,\r\n}) => {\r\n const isQueryThunk = isAsyncThunkAction(queryThunk)\r\n const isMutationThunk = isAsyncThunkAction(mutationThunk)\r\n const isFulfilledThunk = isFulfilled(queryThunk, mutationThunk)\r\n\r\n type CacheLifecycle = {\r\n valueResolved?(value: { data: unknown; meta: unknown }): unknown\r\n cacheEntryRemoved(): void\r\n }\r\n const lifecycleMap: Record = {}\r\n\r\n const handler: ApiMiddlewareInternalHandler = (\r\n action,\r\n mwApi,\r\n stateBefore\r\n ) => {\r\n const cacheKey = getCacheKey(action)\r\n\r\n if (queryThunk.pending.match(action)) {\r\n const oldState = stateBefore[reducerPath].queries[cacheKey]\r\n const state = mwApi.getState()[reducerPath].queries[cacheKey]\r\n if (!oldState && state) {\r\n handleNewKey(\r\n action.meta.arg.endpointName,\r\n action.meta.arg.originalArgs,\r\n cacheKey,\r\n mwApi,\r\n action.meta.requestId\r\n )\r\n }\r\n } else if (mutationThunk.pending.match(action)) {\r\n const state = mwApi.getState()[reducerPath].mutations[cacheKey]\r\n if (state) {\r\n handleNewKey(\r\n action.meta.arg.endpointName,\r\n action.meta.arg.originalArgs,\r\n cacheKey,\r\n mwApi,\r\n action.meta.requestId\r\n )\r\n }\r\n } else if (isFulfilledThunk(action)) {\r\n const lifecycle = lifecycleMap[cacheKey]\r\n if (lifecycle?.valueResolved) {\r\n lifecycle.valueResolved({\r\n data: action.payload,\r\n meta: action.meta.baseQueryMeta,\r\n })\r\n delete lifecycle.valueResolved\r\n }\r\n } else if (\r\n api.internalActions.removeQueryResult.match(action) ||\r\n api.internalActions.removeMutationResult.match(action)\r\n ) {\r\n const lifecycle = lifecycleMap[cacheKey]\r\n if (lifecycle) {\r\n delete lifecycleMap[cacheKey]\r\n lifecycle.cacheEntryRemoved()\r\n }\r\n } else if (api.util.resetApiState.match(action)) {\r\n for (const [cacheKey, lifecycle] of Object.entries(lifecycleMap)) {\r\n delete lifecycleMap[cacheKey]\r\n lifecycle.cacheEntryRemoved()\r\n }\r\n }\r\n }\r\n\r\n function getCacheKey(action: any) {\r\n if (isQueryThunk(action)) return action.meta.arg.queryCacheKey\r\n if (isMutationThunk(action)) return action.meta.requestId\r\n if (api.internalActions.removeQueryResult.match(action))\r\n return action.payload.queryCacheKey\r\n if (api.internalActions.removeMutationResult.match(action))\r\n return getMutationCacheKey(action.payload)\r\n return ''\r\n }\r\n\r\n function handleNewKey(\r\n endpointName: string,\r\n originalArgs: any,\r\n queryCacheKey: string,\r\n mwApi: SubMiddlewareApi,\r\n requestId: string\r\n ) {\r\n const endpointDefinition = context.endpointDefinitions[endpointName]\r\n const onCacheEntryAdded = endpointDefinition?.onCacheEntryAdded\r\n if (!onCacheEntryAdded) return\r\n\r\n let lifecycle = {} as CacheLifecycle\r\n\r\n const cacheEntryRemoved = new Promise((resolve) => {\r\n lifecycle.cacheEntryRemoved = resolve\r\n })\r\n const cacheDataLoaded: PromiseWithKnownReason<\r\n { data: unknown; meta: unknown },\r\n typeof neverResolvedError\r\n > = Promise.race([\r\n new Promise<{ data: unknown; meta: unknown }>((resolve) => {\r\n lifecycle.valueResolved = resolve\r\n }),\r\n cacheEntryRemoved.then(() => {\r\n throw neverResolvedError\r\n }),\r\n ])\r\n // prevent uncaught promise rejections from happening.\r\n // if the original promise is used in any way, that will create a new promise that will throw again\r\n cacheDataLoaded.catch(() => {})\r\n lifecycleMap[queryCacheKey] = lifecycle\r\n const selector = (api.endpoints[endpointName] as any).select(\r\n endpointDefinition.type === DefinitionType.query\r\n ? originalArgs\r\n : queryCacheKey\r\n )\r\n\r\n const extra = mwApi.dispatch((_, __, extra) => extra)\r\n const lifecycleApi = {\r\n ...mwApi,\r\n getCacheEntry: () => selector(mwApi.getState()),\r\n requestId,\r\n extra,\r\n updateCachedData: (endpointDefinition.type === DefinitionType.query\r\n ? (updateRecipe: Recipe) =>\r\n mwApi.dispatch(\r\n api.util.updateQueryData(\r\n endpointName as never,\r\n originalArgs,\r\n updateRecipe\r\n )\r\n )\r\n : undefined) as any,\r\n\r\n cacheDataLoaded,\r\n cacheEntryRemoved,\r\n }\r\n\r\n const runningHandler = onCacheEntryAdded(originalArgs, lifecycleApi)\r\n // if a `neverResolvedError` was thrown, but not handled in the running handler, do not let it leak out further\r\n Promise.resolve(runningHandler).catch((e) => {\r\n if (e === neverResolvedError) return\r\n throw e\r\n })\r\n }\r\n\r\n return handler\r\n}\r\n","import { isPending, isRejected, isFulfilled } from '@reduxjs/toolkit'\r\nimport type {\r\n BaseQueryError,\r\n BaseQueryFn,\r\n BaseQueryMeta,\r\n} from '../../baseQueryTypes'\r\nimport { DefinitionType } from '../../endpointDefinitions'\r\nimport type { QueryFulfilledRejectionReason } from '../../endpointDefinitions'\r\nimport type { Recipe } from '../buildThunks'\r\nimport type {\r\n PromiseWithKnownReason,\r\n PromiseConstructorWithKnownReason,\r\n InternalHandlerBuilder,\r\n ApiMiddlewareInternalHandler,\r\n} from './types'\r\n\r\nexport type ReferenceQueryLifecycle = never\r\n\r\ndeclare module '../../endpointDefinitions' {\r\n export interface QueryLifecyclePromises<\r\n ResultType,\r\n BaseQuery extends BaseQueryFn\r\n > {\r\n /**\r\n * Promise that will resolve with the (transformed) query result.\r\n *\r\n * If the query fails, this promise will reject with the error.\r\n *\r\n * This allows you to `await` for the query to finish.\r\n *\r\n * If you don't interact with this promise, it will not throw.\r\n */\r\n queryFulfilled: PromiseWithKnownReason<\r\n {\r\n /**\r\n * The (transformed) query result.\r\n */\r\n data: ResultType\r\n /**\r\n * The `meta` returned by the `baseQuery`\r\n */\r\n meta: BaseQueryMeta\r\n },\r\n QueryFulfilledRejectionReason\r\n >\r\n }\r\n\r\n type QueryFulfilledRejectionReason =\r\n | {\r\n error: BaseQueryError\r\n /**\r\n * If this is `false`, that means this error was returned from the `baseQuery` or `queryFn` in a controlled manner.\r\n */\r\n isUnhandledError: false\r\n /**\r\n * The `meta` returned by the `baseQuery`\r\n */\r\n meta: BaseQueryMeta\r\n }\r\n | {\r\n error: unknown\r\n meta?: undefined\r\n /**\r\n * If this is `true`, that means that this error is the result of `baseQueryFn`, `queryFn`, `transformResponse` or `transformErrorResponse` throwing an error instead of handling it properly.\r\n * There can not be made any assumption about the shape of `error`.\r\n */\r\n isUnhandledError: true\r\n }\r\n\r\n interface QueryExtraOptions<\r\n TagTypes extends string,\r\n ResultType,\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n ReducerPath extends string = string\r\n > {\r\n /**\r\n * A function that is called when the individual query is started. The function is called with a lifecycle api object containing properties such as `queryFulfilled`, allowing code to be run when a query is started, when it succeeds, and when it fails (i.e. throughout the lifecycle of an individual query/mutation call).\r\n *\r\n * Can be used to perform side-effects throughout the lifecycle of the query.\r\n *\r\n * @example\r\n * ```ts\r\n * import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query'\r\n * import { messageCreated } from './notificationsSlice\r\n * export interface Post {\r\n * id: number\r\n * name: string\r\n * }\r\n *\r\n * const api = createApi({\r\n * baseQuery: fetchBaseQuery({\r\n * baseUrl: '/',\r\n * }),\r\n * endpoints: (build) => ({\r\n * getPost: build.query({\r\n * query: (id) => `post/${id}`,\r\n * async onQueryStarted(id, { dispatch, queryFulfilled }) {\r\n * // `onStart` side-effect\r\n * dispatch(messageCreated('Fetching posts...'))\r\n * try {\r\n * const { data } = await queryFulfilled\r\n * // `onSuccess` side-effect\r\n * dispatch(messageCreated('Posts received!'))\r\n * } catch (err) {\r\n * // `onError` side-effect\r\n * dispatch(messageCreated('Error fetching posts!'))\r\n * }\r\n * }\r\n * }),\r\n * }),\r\n * })\r\n * ```\r\n */\r\n onQueryStarted?(\r\n arg: QueryArg,\r\n api: QueryLifecycleApi\r\n ): Promise | void\r\n }\r\n\r\n interface MutationExtraOptions<\r\n TagTypes extends string,\r\n ResultType,\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n ReducerPath extends string = string\r\n > {\r\n /**\r\n * A function that is called when the individual mutation is started. The function is called with a lifecycle api object containing properties such as `queryFulfilled`, allowing code to be run when a query is started, when it succeeds, and when it fails (i.e. throughout the lifecycle of an individual query/mutation call).\r\n *\r\n * Can be used for `optimistic updates`.\r\n *\r\n * @example\r\n *\r\n * ```ts\r\n * import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query'\r\n * export interface Post {\r\n * id: number\r\n * name: string\r\n * }\r\n *\r\n * const api = createApi({\r\n * baseQuery: fetchBaseQuery({\r\n * baseUrl: '/',\r\n * }),\r\n * tagTypes: ['Post'],\r\n * endpoints: (build) => ({\r\n * getPost: build.query({\r\n * query: (id) => `post/${id}`,\r\n * providesTags: ['Post'],\r\n * }),\r\n * updatePost: build.mutation & Partial>({\r\n * query: ({ id, ...patch }) => ({\r\n * url: `post/${id}`,\r\n * method: 'PATCH',\r\n * body: patch,\r\n * }),\r\n * invalidatesTags: ['Post'],\r\n * async onQueryStarted({ id, ...patch }, { dispatch, queryFulfilled }) {\r\n * const patchResult = dispatch(\r\n * api.util.updateQueryData('getPost', id, (draft) => {\r\n * Object.assign(draft, patch)\r\n * })\r\n * )\r\n * try {\r\n * await queryFulfilled\r\n * } catch {\r\n * patchResult.undo()\r\n * }\r\n * },\r\n * }),\r\n * }),\r\n * })\r\n * ```\r\n */\r\n onQueryStarted?(\r\n arg: QueryArg,\r\n api: MutationLifecycleApi\r\n ): Promise | void\r\n }\r\n\r\n export interface QueryLifecycleApi<\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n ResultType,\r\n ReducerPath extends string = string\r\n > extends QueryBaseLifecycleApi,\r\n QueryLifecyclePromises {}\r\n\r\n export interface MutationLifecycleApi<\r\n QueryArg,\r\n BaseQuery extends BaseQueryFn,\r\n ResultType,\r\n ReducerPath extends string = string\r\n > extends MutationBaseLifecycleApi<\r\n QueryArg,\r\n BaseQuery,\r\n ResultType,\r\n ReducerPath\r\n >,\r\n QueryLifecyclePromises {}\r\n}\r\n\r\nexport const buildQueryLifecycleHandler: InternalHandlerBuilder = ({\r\n api,\r\n context,\r\n queryThunk,\r\n mutationThunk,\r\n}) => {\r\n const isPendingThunk = isPending(queryThunk, mutationThunk)\r\n const isRejectedThunk = isRejected(queryThunk, mutationThunk)\r\n const isFullfilledThunk = isFulfilled(queryThunk, mutationThunk)\r\n\r\n type CacheLifecycle = {\r\n resolve(value: { data: unknown; meta: unknown }): unknown\r\n reject(value: QueryFulfilledRejectionReason): unknown\r\n }\r\n const lifecycleMap: Record = {}\r\n\r\n const handler: ApiMiddlewareInternalHandler = (action, mwApi) => {\r\n if (isPendingThunk(action)) {\r\n const {\r\n requestId,\r\n arg: { endpointName, originalArgs },\r\n } = action.meta\r\n const endpointDefinition = context.endpointDefinitions[endpointName]\r\n const onQueryStarted = endpointDefinition?.onQueryStarted\r\n if (onQueryStarted) {\r\n const lifecycle = {} as CacheLifecycle\r\n const queryFulfilled =\r\n new (Promise as PromiseConstructorWithKnownReason)<\r\n { data: unknown; meta: unknown },\r\n QueryFulfilledRejectionReason\r\n >((resolve, reject) => {\r\n lifecycle.resolve = resolve\r\n lifecycle.reject = reject\r\n })\r\n // prevent uncaught promise rejections from happening.\r\n // if the original promise is used in any way, that will create a new promise that will throw again\r\n queryFulfilled.catch(() => {})\r\n lifecycleMap[requestId] = lifecycle\r\n const selector = (api.endpoints[endpointName] as any).select(\r\n endpointDefinition.type === DefinitionType.query\r\n ? originalArgs\r\n : requestId\r\n )\r\n\r\n const extra = mwApi.dispatch((_, __, extra) => extra)\r\n const lifecycleApi = {\r\n ...mwApi,\r\n getCacheEntry: () => selector(mwApi.getState()),\r\n requestId,\r\n extra,\r\n updateCachedData: (endpointDefinition.type === DefinitionType.query\r\n ? (updateRecipe: Recipe) =>\r\n mwApi.dispatch(\r\n api.util.updateQueryData(\r\n endpointName as never,\r\n originalArgs,\r\n updateRecipe\r\n )\r\n )\r\n : undefined) as any,\r\n queryFulfilled,\r\n }\r\n onQueryStarted(originalArgs, lifecycleApi)\r\n }\r\n } else if (isFullfilledThunk(action)) {\r\n const { requestId, baseQueryMeta } = action.meta\r\n lifecycleMap[requestId]?.resolve({\r\n data: action.payload,\r\n meta: baseQueryMeta,\r\n })\r\n delete lifecycleMap[requestId]\r\n } else if (isRejectedThunk(action)) {\r\n const { requestId, rejectedWithValue, baseQueryMeta } = action.meta\r\n lifecycleMap[requestId]?.reject({\r\n error: action.payload ?? action.error,\r\n isUnhandledError: !rejectedWithValue,\r\n meta: baseQueryMeta as any,\r\n })\r\n delete lifecycleMap[requestId]\r\n }\r\n }\r\n\r\n return handler\r\n}\r\n","import type { InternalHandlerBuilder } from './types'\r\n\r\nexport const buildDevCheckHandler: InternalHandlerBuilder = ({\r\n api,\r\n context: { apiUid },\r\n reducerPath,\r\n}) => {\r\n return (action, mwApi) => {\r\n if (api.util.resetApiState.match(action)) {\r\n // dispatch after api reset\r\n mwApi.dispatch(api.internalActions.middlewareRegistered(apiUid))\r\n }\r\n\r\n if (\r\n typeof process !== 'undefined' &&\r\n process.env.NODE_ENV === 'development'\r\n ) {\r\n if (\r\n api.internalActions.middlewareRegistered.match(action) &&\r\n action.payload === apiUid &&\r\n mwApi.getState()[reducerPath]?.config?.middlewareRegistered ===\r\n 'conflict'\r\n ) {\r\n console.warn(`There is a mismatch between slice and middleware for the reducerPath \"${reducerPath}\".\r\nYou can only have one api per reducer path, this will lead to crashes in various situations!${\r\n reducerPath === 'api'\r\n ? `\r\nIf you have multiple apis, you *have* to specify the reducerPath option when using createApi!`\r\n : ''\r\n }`)\r\n }\r\n }\r\n }\r\n}\r\n","import type { AnyAction, Middleware, ThunkDispatch } from '@reduxjs/toolkit'\r\nimport { createAction } from '@reduxjs/toolkit'\r\n\r\nimport type {\r\n EndpointDefinitions,\r\n FullTagDescription,\r\n} from '../../endpointDefinitions'\r\nimport type { QueryStatus, QuerySubState, RootState } from '../apiState'\r\nimport type { QueryThunkArg } from '../buildThunks'\r\nimport { buildCacheCollectionHandler } from './cacheCollection'\r\nimport { buildInvalidationByTagsHandler } from './invalidationByTags'\r\nimport { buildPollingHandler } from './polling'\r\nimport type {\r\n BuildMiddlewareInput,\r\n InternalHandlerBuilder,\r\n InternalMiddlewareState,\r\n} from './types'\r\nimport { buildWindowEventHandler } from './windowEventHandling'\r\nimport { buildCacheLifecycleHandler } from './cacheLifecycle'\r\nimport { buildQueryLifecycleHandler } from './queryLifecycle'\r\nimport { buildDevCheckHandler } from './devMiddleware'\r\nimport { buildBatchedActionsHandler } from './batchActions'\r\n\r\nexport function buildMiddleware<\r\n Definitions extends EndpointDefinitions,\r\n ReducerPath extends string,\r\n TagTypes extends string\r\n>(input: BuildMiddlewareInput) {\r\n const { reducerPath, queryThunk, api, context } = input\r\n const { apiUid } = context\r\n\r\n const actions = {\r\n invalidateTags: createAction<\r\n Array>\r\n >(`${reducerPath}/invalidateTags`),\r\n }\r\n\r\n const isThisApiSliceAction = (action: AnyAction) => {\r\n return (\r\n !!action &&\r\n typeof action.type === 'string' &&\r\n action.type.startsWith(`${reducerPath}/`)\r\n )\r\n }\r\n\r\n const handlerBuilders: InternalHandlerBuilder[] = [\r\n buildDevCheckHandler,\r\n buildCacheCollectionHandler,\r\n buildInvalidationByTagsHandler,\r\n buildPollingHandler,\r\n buildCacheLifecycleHandler,\r\n buildQueryLifecycleHandler,\r\n ]\r\n\r\n const middleware: Middleware<\r\n {},\r\n RootState,\r\n ThunkDispatch\r\n > = (mwApi) => {\r\n let initialized = false\r\n\r\n let internalState: InternalMiddlewareState = {\r\n currentSubscriptions: {},\r\n }\r\n\r\n const builderArgs = {\r\n ...(input as any as BuildMiddlewareInput<\r\n EndpointDefinitions,\r\n string,\r\n string\r\n >),\r\n internalState,\r\n refetchQuery,\r\n }\r\n\r\n const handlers = handlerBuilders.map((build) => build(builderArgs))\r\n\r\n const batchedActionsHandler = buildBatchedActionsHandler(builderArgs)\r\n const windowEventsHandler = buildWindowEventHandler(builderArgs)\r\n\r\n return (next) => {\r\n return (action) => {\r\n if (!initialized) {\r\n initialized = true\r\n // dispatch before any other action\r\n mwApi.dispatch(api.internalActions.middlewareRegistered(apiUid))\r\n }\r\n\r\n const mwApiWithNext = { ...mwApi, next }\r\n\r\n const stateBefore = mwApi.getState()\r\n\r\n const [actionShouldContinue, hasSubscription] = batchedActionsHandler(\r\n action,\r\n mwApiWithNext,\r\n stateBefore\r\n )\r\n\r\n let res: any\r\n\r\n if (actionShouldContinue) {\r\n res = next(action)\r\n } else {\r\n res = hasSubscription\r\n }\r\n\r\n if (!!mwApi.getState()[reducerPath]) {\r\n // Only run these checks if the middleware is registered okay\r\n\r\n // This looks for actions that aren't specific to the API slice\r\n windowEventsHandler(action, mwApiWithNext, stateBefore)\r\n\r\n if (\r\n isThisApiSliceAction(action) ||\r\n context.hasRehydrationInfo(action)\r\n ) {\r\n // Only run these additional checks if the actions are part of the API slice,\r\n // or the action has hydration-related data\r\n for (let handler of handlers) {\r\n handler(action, mwApiWithNext, stateBefore)\r\n }\r\n }\r\n }\r\n\r\n return res\r\n }\r\n }\r\n }\r\n\r\n return { middleware, actions }\r\n\r\n function refetchQuery(\r\n querySubState: Exclude<\r\n QuerySubState,\r\n { status: QueryStatus.uninitialized }\r\n >,\r\n queryCacheKey: string,\r\n override: Partial = {}\r\n ) {\r\n return queryThunk({\r\n type: 'query',\r\n endpointName: querySubState.endpointName,\r\n originalArgs: querySubState.originalArgs,\r\n subscribe: false,\r\n forceRefetch: true,\r\n queryCacheKey: queryCacheKey as any,\r\n ...override,\r\n })\r\n }\r\n}\r\n","import { QueryStatus } from '../apiState'\r\nimport type { QueryCacheKey } from '../apiState'\r\nimport { onFocus, onOnline } from '../setupListeners'\r\nimport type {\r\n ApiMiddlewareInternalHandler,\r\n InternalHandlerBuilder,\r\n SubMiddlewareApi,\r\n} from './types'\r\n\r\nexport const buildWindowEventHandler: InternalHandlerBuilder = ({\r\n reducerPath,\r\n context,\r\n api,\r\n refetchQuery,\r\n internalState,\r\n}) => {\r\n const { removeQueryResult } = api.internalActions\r\n\r\n const handler: ApiMiddlewareInternalHandler = (action, mwApi) => {\r\n if (onFocus.match(action)) {\r\n refetchValidQueries(mwApi, 'refetchOnFocus')\r\n }\r\n if (onOnline.match(action)) {\r\n refetchValidQueries(mwApi, 'refetchOnReconnect')\r\n }\r\n }\r\n\r\n function refetchValidQueries(\r\n api: SubMiddlewareApi,\r\n type: 'refetchOnFocus' | 'refetchOnReconnect'\r\n ) {\r\n const state = api.getState()[reducerPath]\r\n const queries = state.queries\r\n const subscriptions = internalState.currentSubscriptions\r\n\r\n context.batch(() => {\r\n for (const queryCacheKey of Object.keys(subscriptions)) {\r\n const querySubState = queries[queryCacheKey]\r\n const subscriptionSubState = subscriptions[queryCacheKey]\r\n\r\n if (!subscriptionSubState || !querySubState) continue\r\n\r\n const shouldRefetch =\r\n Object.values(subscriptionSubState).some(\r\n (sub) => sub[type] === true\r\n ) ||\r\n (Object.values(subscriptionSubState).every(\r\n (sub) => sub[type] === undefined\r\n ) &&\r\n state.config[type])\r\n\r\n if (shouldRefetch) {\r\n if (Object.keys(subscriptionSubState).length === 0) {\r\n api.dispatch(\r\n removeQueryResult({\r\n queryCacheKey: queryCacheKey as QueryCacheKey,\r\n })\r\n )\r\n } else if (querySubState.status !== QueryStatus.uninitialized) {\r\n api.dispatch(refetchQuery(querySubState, queryCacheKey))\r\n }\r\n }\r\n }\r\n })\r\n }\r\n\r\n return handler\r\n}\r\n","/**\r\n * Note: this file should import all other files for type discovery and declaration merging\r\n */\r\nimport type {\r\n PatchQueryDataThunk,\r\n UpdateQueryDataThunk,\r\n UpsertQueryDataThunk,\r\n} from './buildThunks'\r\nimport { buildThunks } from './buildThunks'\r\nimport type {\r\n ActionCreatorWithPayload,\r\n AnyAction,\r\n Middleware,\r\n Reducer,\r\n ThunkAction,\r\n ThunkDispatch,\r\n} from '@reduxjs/toolkit'\r\nimport type {\r\n EndpointDefinitions,\r\n QueryArgFrom,\r\n QueryDefinition,\r\n MutationDefinition,\r\n AssertTagTypes,\r\n TagDescription,\r\n} from '../endpointDefinitions'\r\nimport { isQueryDefinition, isMutationDefinition } from '../endpointDefinitions'\r\nimport type {\r\n CombinedState,\r\n QueryKeys,\r\n MutationKeys,\r\n RootState,\r\n} from './apiState'\r\nimport type { Api, Module } from '../apiTypes'\r\nimport { onFocus, onFocusLost, onOnline, onOffline } from './setupListeners'\r\nimport { buildSlice } from './buildSlice'\r\nimport { buildMiddleware } from './buildMiddleware'\r\nimport { buildSelectors } from './buildSelectors'\r\nimport type {\r\n MutationActionCreatorResult,\r\n QueryActionCreatorResult,\r\n} from './buildInitiate'\r\nimport { buildInitiate } from './buildInitiate'\r\nimport { assertCast, safeAssign } from '../tsHelpers'\r\nimport type { InternalSerializeQueryArgs } from '../defaultSerializeQueryArgs'\r\nimport type { SliceActions } from './buildSlice'\r\nimport type { BaseQueryFn } from '../baseQueryTypes'\r\n\r\nimport type { ReferenceCacheLifecycle } from './buildMiddleware/cacheLifecycle'\r\nimport type { ReferenceQueryLifecycle } from './buildMiddleware/queryLifecycle'\r\nimport type { ReferenceCacheCollection } from './buildMiddleware/cacheCollection'\r\nimport { enablePatches } from 'immer'\r\n\r\n/**\r\n * `ifOlderThan` - (default: `false` | `number`) - _number is value in seconds_\r\n * - If specified, it will only run the query if the difference between `new Date()` and the last `fulfilledTimeStamp` is greater than the given value\r\n *\r\n * @overloadSummary\r\n * `force`\r\n * - If `force: true`, it will ignore the `ifOlderThan` value if it is set and the query will be run even if it exists in the cache.\r\n */\r\nexport type PrefetchOptions =\r\n | {\r\n ifOlderThan?: false | number\r\n }\r\n | { force?: boolean }\r\n\r\nexport const coreModuleName = /* @__PURE__ */ Symbol()\r\nexport type CoreModule =\r\n | typeof coreModuleName\r\n | ReferenceCacheLifecycle\r\n | ReferenceQueryLifecycle\r\n | ReferenceCacheCollection\r\n\r\ninterface ThunkWithReturnValue extends ThunkAction {}\r\n\r\ndeclare module '../apiTypes' {\r\n export interface ApiModules<\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n BaseQuery extends BaseQueryFn,\r\n Definitions extends EndpointDefinitions,\r\n ReducerPath extends string,\r\n TagTypes extends string\r\n > {\r\n [coreModuleName]: {\r\n /**\r\n * This api's reducer should be mounted at `store[api.reducerPath]`.\r\n *\r\n * @example\r\n * ```ts\r\n * configureStore({\r\n * reducer: {\r\n * [api.reducerPath]: api.reducer,\r\n * },\r\n * middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(api.middleware),\r\n * })\r\n * ```\r\n */\r\n reducerPath: ReducerPath\r\n /**\r\n * Internal actions not part of the public API. Note: These are subject to change at any given time.\r\n */\r\n internalActions: InternalActions\r\n /**\r\n * A standard redux reducer that enables core functionality. Make sure it's included in your store.\r\n *\r\n * @example\r\n * ```ts\r\n * configureStore({\r\n * reducer: {\r\n * [api.reducerPath]: api.reducer,\r\n * },\r\n * middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(api.middleware),\r\n * })\r\n * ```\r\n */\r\n reducer: Reducer<\r\n CombinedState,\r\n AnyAction\r\n >\r\n /**\r\n * This is a standard redux middleware and is responsible for things like polling, garbage collection and a handful of other things. Make sure it's included in your store.\r\n *\r\n * @example\r\n * ```ts\r\n * configureStore({\r\n * reducer: {\r\n * [api.reducerPath]: api.reducer,\r\n * },\r\n * middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(api.middleware),\r\n * })\r\n * ```\r\n */\r\n middleware: Middleware<\r\n {},\r\n RootState,\r\n ThunkDispatch\r\n >\r\n /**\r\n * A collection of utility thunks for various situations.\r\n */\r\n util: {\r\n /**\r\n * This method had to be removed due to a conceptual bug in RTK.\r\n *\r\n * Despite TypeScript errors, it will continue working in the \"buggy\" way it did\r\n * before in production builds and will be removed in the next major release.\r\n *\r\n * Nonetheless, you should immediately replace it with the new recommended approach.\r\n * See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR.\r\n *\r\n * Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details.\r\n * @deprecated\r\n */\r\n getRunningOperationPromises: never // this is now types as `never` to immediately throw TS errors on use, but still allow for a comment\r\n\r\n /**\r\n * This method had to be removed due to a conceptual bug in RTK.\r\n * It has been replaced by `api.util.getRunningQueryThunk` and `api.util.getRunningMutationThunk`.\r\n * Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details.\r\n * @deprecated\r\n */\r\n getRunningOperationPromise: never // this is now types as `never` to immediately throw TS errors on use, but still allow for a comment\r\n\r\n /**\r\n * A thunk that (if dispatched) will return a specific running query, identified\r\n * by `endpointName` and `args`.\r\n * If that query is not running, dispatching the thunk will result in `undefined`.\r\n *\r\n * Can be used to await a specific query triggered in any way,\r\n * including via hook calls or manually dispatching `initiate` actions.\r\n *\r\n * See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for details.\r\n */\r\n getRunningQueryThunk>(\r\n endpointName: EndpointName,\r\n args: QueryArgFrom\r\n ): ThunkWithReturnValue<\r\n | QueryActionCreatorResult<\r\n Definitions[EndpointName] & { type: 'query' }\r\n >\r\n | undefined\r\n >\r\n\r\n /**\r\n * A thunk that (if dispatched) will return a specific running mutation, identified\r\n * by `endpointName` and `fixedCacheKey` or `requestId`.\r\n * If that mutation is not running, dispatching the thunk will result in `undefined`.\r\n *\r\n * Can be used to await a specific mutation triggered in any way,\r\n * including via hook trigger functions or manually dispatching `initiate` actions.\r\n *\r\n * See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for details.\r\n */\r\n getRunningMutationThunk>(\r\n endpointName: EndpointName,\r\n fixedCacheKeyOrRequestId: string\r\n ): ThunkWithReturnValue<\r\n | MutationActionCreatorResult<\r\n Definitions[EndpointName] & { type: 'mutation' }\r\n >\r\n | undefined\r\n >\r\n\r\n /**\r\n * A thunk that (if dispatched) will return all running queries.\r\n *\r\n * Useful for SSR scenarios to await all running queries triggered in any way,\r\n * including via hook calls or manually dispatching `initiate` actions.\r\n *\r\n * See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for details.\r\n */\r\n getRunningQueriesThunk(): ThunkWithReturnValue<\r\n Array>\r\n >\r\n\r\n /**\r\n * A thunk that (if dispatched) will return all running mutations.\r\n *\r\n * Useful for SSR scenarios to await all running mutations triggered in any way,\r\n * including via hook calls or manually dispatching `initiate` actions.\r\n *\r\n * See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for details.\r\n */\r\n getRunningMutationsThunk(): ThunkWithReturnValue<\r\n Array>\r\n >\r\n\r\n /**\r\n * A Redux thunk that can be used to manually trigger pre-fetching of data.\r\n *\r\n * The thunk accepts three arguments: the name of the endpoint we are updating (such as `'getPost'`), the appropriate query arg values to construct the desired cache key, and a set of options used to determine if the data actually should be re-fetched based on cache staleness.\r\n *\r\n * React Hooks users will most likely never need to use this directly, as the `usePrefetch` hook will dispatch this thunk internally as needed when you call the prefetching function supplied by the hook.\r\n *\r\n * @example\r\n *\r\n * ```ts no-transpile\r\n * dispatch(api.util.prefetch('getPosts', undefined, { force: true }))\r\n * ```\r\n */\r\n prefetch>(\r\n endpointName: EndpointName,\r\n arg: QueryArgFrom,\r\n options: PrefetchOptions\r\n ): ThunkAction\r\n /**\r\n * A Redux thunk action creator that, when dispatched, creates and applies a set of JSON diff/patch objects to the current state. This immediately updates the Redux state with those changes.\r\n *\r\n * The thunk action creator accepts three arguments: the name of the endpoint we are updating (such as `'getPost'`), the appropriate query arg values to construct the desired cache key, and an `updateRecipe` callback function. The callback receives an Immer-wrapped `draft` of the current state, and may modify the draft to match the expected results after the mutation completes successfully.\r\n *\r\n * The thunk executes _synchronously_, and returns an object containing `{patches: Patch[], inversePatches: Patch[], undo: () => void}`. The `patches` and `inversePatches` are generated using Immer's [`produceWithPatches` method](https://immerjs.github.io/immer/patches).\r\n *\r\n * This is typically used as the first step in implementing optimistic updates. The generated `inversePatches` can be used to revert the updates by calling `dispatch(patchQueryData(endpointName, args, inversePatches))`. Alternatively, the `undo` method can be called directly to achieve the same effect.\r\n *\r\n * Note that the first two arguments (`endpointName` and `args`) are used to determine which existing cache entry to update. If no existing cache entry is found, the `updateRecipe` callback will not run.\r\n *\r\n * @example\r\n *\r\n * ```ts\r\n * const patchCollection = dispatch(\r\n * api.util.updateQueryData('getPosts', undefined, (draftPosts) => {\r\n * draftPosts.push({ id: 1, name: 'Teddy' })\r\n * })\r\n * )\r\n * ```\r\n */\r\n updateQueryData: UpdateQueryDataThunk<\r\n Definitions,\r\n RootState\r\n >\r\n /** @deprecated renamed to `updateQueryData` */\r\n updateQueryResult: UpdateQueryDataThunk<\r\n Definitions,\r\n RootState\r\n >\r\n /**\r\n * A Redux thunk action creator that, when dispatched, acts as an artificial API request to upsert a value into the cache.\r\n *\r\n * The thunk action creator accepts three arguments: the name of the endpoint we are updating (such as `'getPost'`), the appropriate query arg values to construct the desired cache key, and the data to upsert.\r\n *\r\n * If no cache entry for that cache key exists, a cache entry will be created and the data added. If a cache entry already exists, this will _overwrite_ the existing cache entry data.\r\n *\r\n * The thunk executes _asynchronously_, and returns a promise that resolves when the store has been updated.\r\n *\r\n * If dispatched while an actual request is in progress, both the upsert and request will be handled as soon as they resolve, resulting in a \"last result wins\" update behavior.\r\n *\r\n * @example\r\n *\r\n * ```ts\r\n * await dispatch(\r\n * api.util.upsertQueryData('getPost', {id: 1}, {id: 1, text: \"Hello!\"})\r\n * )\r\n * ```\r\n */\r\n upsertQueryData: UpsertQueryDataThunk<\r\n Definitions,\r\n RootState\r\n >\r\n /**\r\n * A Redux thunk that applies a JSON diff/patch array to the cached data for a given query result. This immediately updates the Redux state with those changes.\r\n *\r\n * The thunk accepts three arguments: the name of the endpoint we are updating (such as `'getPost'`), the appropriate query arg values to construct the desired cache key, and a JSON diff/patch array as produced by Immer's `produceWithPatches`.\r\n *\r\n * This is typically used as the second step in implementing optimistic updates. If a request fails, the optimistically-applied changes can be reverted by dispatching `patchQueryData` with the `inversePatches` that were generated by `updateQueryData` earlier.\r\n *\r\n * In cases where it is desired to simply revert the previous changes, it may be preferable to call the `undo` method returned from dispatching `updateQueryData` instead.\r\n *\r\n * @example\r\n * ```ts\r\n * const patchCollection = dispatch(\r\n * api.util.updateQueryData('getPosts', undefined, (draftPosts) => {\r\n * draftPosts.push({ id: 1, name: 'Teddy' })\r\n * })\r\n * )\r\n *\r\n * // later\r\n * dispatch(\r\n * api.util.patchQueryData('getPosts', undefined, patchCollection.inversePatches)\r\n * )\r\n *\r\n * // or\r\n * patchCollection.undo()\r\n * ```\r\n */\r\n patchQueryData: PatchQueryDataThunk<\r\n Definitions,\r\n RootState\r\n >\r\n /** @deprecated renamed to `patchQueryData` */\r\n patchQueryResult: PatchQueryDataThunk<\r\n Definitions,\r\n RootState\r\n >\r\n /**\r\n * A Redux action creator that can be dispatched to manually reset the api state completely. This will immediately remove all existing cache entries, and all queries will be considered 'uninitialized'.\r\n *\r\n * @example\r\n *\r\n * ```ts\r\n * dispatch(api.util.resetApiState())\r\n * ```\r\n */\r\n resetApiState: SliceActions['resetApiState']\r\n /**\r\n * A Redux action creator that can be used to manually invalidate cache tags for [automated re-fetching](../../usage/automated-refetching.mdx).\r\n *\r\n * The action creator accepts one argument: the cache tags to be invalidated. It returns an action with those tags as a payload, and the corresponding `invalidateTags` action type for the api.\r\n *\r\n * Dispatching the result of this action creator will [invalidate](../../usage/automated-refetching.mdx#invalidating-cache-data) the given tags, causing queries to automatically re-fetch if they are subscribed to cache data that [provides](../../usage/automated-refetching.mdx#providing-cache-data) the corresponding tags.\r\n *\r\n * The array of tags provided to the action creator should be in one of the following formats, where `TagType` is equal to a string provided to the [`tagTypes`](../createApi.mdx#tagtypes) property of the api:\r\n *\r\n * - `[TagType]`\r\n * - `[{ type: TagType }]`\r\n * - `[{ type: TagType, id: number | string }]`\r\n *\r\n * @example\r\n *\r\n * ```ts\r\n * dispatch(api.util.invalidateTags(['Post']))\r\n * dispatch(api.util.invalidateTags([{ type: 'Post', id: 1 }]))\r\n * dispatch(\r\n * api.util.invalidateTags([\r\n * { type: 'Post', id: 1 },\r\n * { type: 'Post', id: 'LIST' },\r\n * ])\r\n * )\r\n * ```\r\n */\r\n invalidateTags: ActionCreatorWithPayload<\r\n Array>,\r\n string\r\n >\r\n\r\n /**\r\n * A function to select all `{ endpointName, originalArgs, queryCacheKey }` combinations that would be invalidated by a specific set of tags.\r\n *\r\n * Can be used for mutations that want to do optimistic updates instead of invalidating a set of tags, but don't know exactly what they need to update.\r\n */\r\n selectInvalidatedBy: (\r\n state: RootState,\r\n tags: ReadonlyArray>\r\n ) => Array<{\r\n endpointName: string\r\n originalArgs: any\r\n queryCacheKey: string\r\n }>\r\n }\r\n /**\r\n * Endpoints based on the input endpoints provided to `createApi`, containing `select` and `action matchers`.\r\n */\r\n endpoints: {\r\n [K in keyof Definitions]: Definitions[K] extends QueryDefinition<\r\n any,\r\n any,\r\n any,\r\n any,\r\n any\r\n >\r\n ? ApiEndpointQuery\r\n : Definitions[K] extends MutationDefinition\r\n ? ApiEndpointMutation\r\n : never\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport interface ApiEndpointQuery<\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n Definition extends QueryDefinition,\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n Definitions extends EndpointDefinitions\r\n> {\r\n /**\r\n * All of these are `undefined` at runtime, purely to be used in TypeScript declarations!\r\n */\r\n Types: NonNullable\r\n}\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\r\nexport interface ApiEndpointMutation<\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n Definition extends MutationDefinition,\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n Definitions extends EndpointDefinitions\r\n> {\r\n /**\r\n * All of these are `undefined` at runtime, purely to be used in TypeScript declarations!\r\n */\r\n Types: NonNullable\r\n}\r\n\r\nexport type ListenerActions = {\r\n /**\r\n * Will cause the RTK Query middleware to trigger any refetchOnReconnect-related behavior\r\n * @link https://rtk-query-docs.netlify.app/api/setupListeners\r\n */\r\n onOnline: typeof onOnline\r\n onOffline: typeof onOffline\r\n /**\r\n * Will cause the RTK Query middleware to trigger any refetchOnFocus-related behavior\r\n * @link https://rtk-query-docs.netlify.app/api/setupListeners\r\n */\r\n onFocus: typeof onFocus\r\n onFocusLost: typeof onFocusLost\r\n}\r\n\r\nexport type InternalActions = SliceActions & ListenerActions\r\n\r\n/**\r\n * Creates a module containing the basic redux logic for use with `buildCreateApi`.\r\n *\r\n * @example\r\n * ```ts\r\n * const createBaseApi = buildCreateApi(coreModule());\r\n * ```\r\n */\r\nexport const coreModule = (): Module => ({\r\n name: coreModuleName,\r\n init(\r\n api,\r\n {\r\n baseQuery,\r\n tagTypes,\r\n reducerPath,\r\n serializeQueryArgs,\r\n keepUnusedDataFor,\r\n refetchOnMountOrArgChange,\r\n refetchOnFocus,\r\n refetchOnReconnect,\r\n },\r\n context\r\n ) {\r\n enablePatches()\r\n\r\n assertCast(serializeQueryArgs)\r\n\r\n const assertTagType: AssertTagTypes = (tag) => {\r\n if (\r\n typeof process !== 'undefined' &&\r\n process.env.NODE_ENV === 'development'\r\n ) {\r\n if (!tagTypes.includes(tag.type as any)) {\r\n console.error(\r\n `Tag type '${tag.type}' was used, but not specified in \\`tagTypes\\`!`\r\n )\r\n }\r\n }\r\n return tag\r\n }\r\n\r\n Object.assign(api, {\r\n reducerPath,\r\n endpoints: {},\r\n internalActions: {\r\n onOnline,\r\n onOffline,\r\n onFocus,\r\n onFocusLost,\r\n },\r\n util: {},\r\n })\r\n\r\n const {\r\n queryThunk,\r\n mutationThunk,\r\n patchQueryData,\r\n updateQueryData,\r\n upsertQueryData,\r\n prefetch,\r\n buildMatchThunkActions,\r\n } = buildThunks({\r\n baseQuery,\r\n reducerPath,\r\n context,\r\n api,\r\n serializeQueryArgs,\r\n })\r\n\r\n const { reducer, actions: sliceActions } = buildSlice({\r\n context,\r\n queryThunk,\r\n mutationThunk,\r\n reducerPath,\r\n assertTagType,\r\n config: {\r\n refetchOnFocus,\r\n refetchOnReconnect,\r\n refetchOnMountOrArgChange,\r\n keepUnusedDataFor,\r\n reducerPath,\r\n },\r\n })\r\n\r\n safeAssign(api.util, {\r\n patchQueryData,\r\n updateQueryData,\r\n upsertQueryData,\r\n prefetch,\r\n resetApiState: sliceActions.resetApiState,\r\n })\r\n safeAssign(api.internalActions, sliceActions)\r\n\r\n const { middleware, actions: middlewareActions } = buildMiddleware({\r\n reducerPath,\r\n context,\r\n queryThunk,\r\n mutationThunk,\r\n api,\r\n assertTagType,\r\n })\r\n safeAssign(api.util, middlewareActions)\r\n\r\n safeAssign(api, { reducer: reducer as any, middleware })\r\n\r\n const { buildQuerySelector, buildMutationSelector, selectInvalidatedBy } =\r\n buildSelectors({\r\n serializeQueryArgs: serializeQueryArgs as any,\r\n reducerPath,\r\n })\r\n\r\n safeAssign(api.util, { selectInvalidatedBy })\r\n\r\n const {\r\n buildInitiateQuery,\r\n buildInitiateMutation,\r\n getRunningMutationThunk,\r\n getRunningMutationsThunk,\r\n getRunningQueriesThunk,\r\n getRunningQueryThunk,\r\n getRunningOperationPromises,\r\n removalWarning,\r\n } = buildInitiate({\r\n queryThunk,\r\n mutationThunk,\r\n api,\r\n serializeQueryArgs: serializeQueryArgs as any,\r\n context,\r\n })\r\n\r\n safeAssign(api.util, {\r\n getRunningOperationPromises: getRunningOperationPromises as any,\r\n getRunningOperationPromise: removalWarning as any,\r\n getRunningMutationThunk,\r\n getRunningMutationsThunk,\r\n getRunningQueryThunk,\r\n getRunningQueriesThunk,\r\n })\r\n\r\n return {\r\n name: coreModuleName,\r\n injectEndpoint(endpointName, definition) {\r\n const anyApi = api as any as Api<\r\n any,\r\n Record,\r\n string,\r\n string,\r\n CoreModule\r\n >\r\n anyApi.endpoints[endpointName] ??= {} as any\r\n if (isQueryDefinition(definition)) {\r\n safeAssign(\r\n anyApi.endpoints[endpointName],\r\n {\r\n select: buildQuerySelector(endpointName, definition),\r\n initiate: buildInitiateQuery(endpointName, definition),\r\n },\r\n buildMatchThunkActions(queryThunk, endpointName)\r\n )\r\n } else if (isMutationDefinition(definition)) {\r\n safeAssign(\r\n anyApi.endpoints[endpointName],\r\n {\r\n select: buildMutationSelector(),\r\n initiate: buildInitiateMutation(endpointName),\r\n },\r\n buildMatchThunkActions(mutationThunk, endpointName)\r\n )\r\n }\r\n },\r\n }\r\n },\r\n})\r\n","import { buildCreateApi, CreateApi } from '../createApi'\r\nimport { coreModule, coreModuleName } from './module'\r\n\r\nconst createApi = /* @__PURE__ */ buildCreateApi(coreModule())\r\n\r\nexport { createApi, coreModule }\r\n","/** A function that accepts a potential \"extra argument\" value to be injected later,\r\n * and returns an instance of the thunk middleware that uses that value\r\n */\nfunction createThunkMiddleware(extraArgument) {\n // Standard Redux middleware definition pattern:\n // See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware\n var middleware = function middleware(_ref) {\n var dispatch = _ref.dispatch,\n getState = _ref.getState;\n return function (next) {\n return function (action) {\n // The thunk middleware looks for any functions that were passed to `store.dispatch`.\n // If this \"action\" is really a function, call it and return the result.\n if (typeof action === 'function') {\n // Inject the store's `dispatch` and `getState` methods, as well as any \"extra arg\"\n return action(dispatch, getState, extraArgument);\n } // Otherwise, pass the action down the middleware chain as usual\n\n\n return next(action);\n };\n };\n };\n\n return middleware;\n}\n\nvar thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version\n// with whatever \"extra arg\" they want to inject into their thunks\n\nthunk.withExtraArgument = createThunkMiddleware;\nexport default thunk;","import type { Action, ActionCreator, StoreEnhancer } from 'redux'\r\nimport { compose } from 'redux'\r\n\r\n/**\r\n * @public\r\n */\r\nexport interface DevToolsEnhancerOptions {\r\n /**\r\n * the instance name to be showed on the monitor page. Default value is `document.title`.\r\n * If not specified and there's no document title, it will consist of `tabId` and `instanceId`.\r\n */\r\n name?: string\r\n /**\r\n * action creators functions to be available in the Dispatcher.\r\n */\r\n actionCreators?: ActionCreator[] | { [key: string]: ActionCreator }\r\n /**\r\n * if more than one action is dispatched in the indicated interval, all new actions will be collected and sent at once.\r\n * It is the joint between performance and speed. When set to `0`, all actions will be sent instantly.\r\n * Set it to a higher value when experiencing perf issues (also `maxAge` to a lower value).\r\n *\r\n * @default 500 ms.\r\n */\r\n latency?: number\r\n /**\r\n * (> 1) - maximum allowed actions to be stored in the history tree. The oldest actions are removed once maxAge is reached. It's critical for performance.\r\n *\r\n * @default 50\r\n */\r\n maxAge?: number\r\n /**\r\n * Customizes how actions and state are serialized and deserialized. Can be a boolean or object. If given a boolean, the behavior is the same as if you\r\n * were to pass an object and specify `options` as a boolean. Giving an object allows fine-grained customization using the `replacer` and `reviver`\r\n * functions.\r\n */\r\n serialize?:\r\n | boolean\r\n | {\r\n /**\r\n * - `undefined` - will use regular `JSON.stringify` to send data (it's the fast mode).\r\n * - `false` - will handle also circular references.\r\n * - `true` - will handle also date, regex, undefined, error objects, symbols, maps, sets and functions.\r\n * - object, which contains `date`, `regex`, `undefined`, `error`, `symbol`, `map`, `set` and `function` keys.\r\n * For each of them you can indicate if to include (by setting as `true`).\r\n * For `function` key you can also specify a custom function which handles serialization.\r\n * See [`jsan`](https://github.com/kolodny/jsan) for more details.\r\n */\r\n options?:\r\n | undefined\r\n | boolean\r\n | {\r\n date?: true\r\n regex?: true\r\n undefined?: true\r\n error?: true\r\n symbol?: true\r\n map?: true\r\n set?: true\r\n function?: true | ((fn: (...args: any[]) => any) => string)\r\n }\r\n /**\r\n * [JSON replacer function](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter) used for both actions and states stringify.\r\n * In addition, you can specify a data type by adding a [`__serializedType__`](https://github.com/zalmoxisus/remotedev-serialize/blob/master/helpers/index.js#L4)\r\n * key. So you can deserialize it back while importing or persisting data.\r\n * Moreover, it will also [show a nice preview showing the provided custom type](https://cloud.githubusercontent.com/assets/7957859/21814330/a17d556a-d761-11e6-85ef-159dd12f36c5.png):\r\n */\r\n replacer?: (key: string, value: unknown) => any\r\n /**\r\n * [JSON `reviver` function](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Using_the_reviver_parameter)\r\n * used for parsing the imported actions and states. See [`remotedev-serialize`](https://github.com/zalmoxisus/remotedev-serialize/blob/master/immutable/serialize.js#L8-L41)\r\n * as an example on how to serialize special data types and get them back.\r\n */\r\n reviver?: (key: string, value: unknown) => any\r\n /**\r\n * Automatically serialize/deserialize immutablejs via [remotedev-serialize](https://github.com/zalmoxisus/remotedev-serialize).\r\n * Just pass the Immutable library. It will support all ImmutableJS structures. You can even export them into a file and get them back.\r\n * The only exception is `Record` class, for which you should pass this in addition the references to your classes in `refs`.\r\n */\r\n immutable?: any\r\n /**\r\n * ImmutableJS `Record` classes used to make possible restore its instances back when importing, persisting...\r\n */\r\n refs?: any\r\n }\r\n /**\r\n * function which takes `action` object and id number as arguments, and should return `action` object back.\r\n */\r\n actionSanitizer?: (action: A, id: number) => A\r\n /**\r\n * function which takes `state` object and index as arguments, and should return `state` object back.\r\n */\r\n stateSanitizer?: (state: S, index: number) => S\r\n /**\r\n * *string or array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers).\r\n * If `actionsWhitelist` specified, `actionsBlacklist` is ignored.\r\n * @deprecated Use actionsDenylist instead.\r\n */\r\n actionsBlacklist?: string | string[]\r\n /**\r\n * *string or array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers).\r\n * If `actionsWhitelist` specified, `actionsBlacklist` is ignored.\r\n * @deprecated Use actionsAllowlist instead.\r\n */\r\n actionsWhitelist?: string | string[]\r\n /**\r\n * *string or array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers).\r\n * If `actionsAllowlist` specified, `actionsDenylist` is ignored.\r\n */\r\n actionsDenylist?: string | string[]\r\n /**\r\n * *string or array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers).\r\n * If `actionsAllowlist` specified, `actionsDenylist` is ignored.\r\n */\r\n actionsAllowlist?: string | string[]\r\n /**\r\n * called for every action before sending, takes `state` and `action` object, and returns `true` in case it allows sending the current data to the monitor.\r\n * Use it as a more advanced version of `actionsDenylist`/`actionsAllowlist` parameters.\r\n */\r\n predicate?: (state: S, action: A) => boolean\r\n /**\r\n * if specified as `false`, it will not record the changes till clicking on `Start recording` button.\r\n * Available only for Redux enhancer, for others use `autoPause`.\r\n *\r\n * @default true\r\n */\r\n shouldRecordChanges?: boolean\r\n /**\r\n * if specified, whenever clicking on `Pause recording` button and there are actions in the history log, will add this action type.\r\n * If not specified, will commit when paused. Available only for Redux enhancer.\r\n *\r\n * @default \"@@PAUSED\"\"\r\n */\r\n pauseActionType?: string\r\n /**\r\n * auto pauses when the extension’s window is not opened, and so has zero impact on your app when not in use.\r\n * Not available for Redux enhancer (as it already does it but storing the data to be sent).\r\n *\r\n * @default false\r\n */\r\n autoPause?: boolean\r\n /**\r\n * if specified as `true`, it will not allow any non-monitor actions to be dispatched till clicking on `Unlock changes` button.\r\n * Available only for Redux enhancer.\r\n *\r\n * @default false\r\n */\r\n shouldStartLocked?: boolean\r\n /**\r\n * if set to `false`, will not recompute the states on hot reloading (or on replacing the reducers). Available only for Redux enhancer.\r\n *\r\n * @default true\r\n */\r\n shouldHotReload?: boolean\r\n /**\r\n * if specified as `true`, whenever there's an exception in reducers, the monitors will show the error message, and next actions will not be dispatched.\r\n *\r\n * @default false\r\n */\r\n shouldCatchErrors?: boolean\r\n /**\r\n * If you want to restrict the extension, specify the features you allow.\r\n * If not specified, all of the features are enabled. When set as an object, only those included as `true` will be allowed.\r\n * Note that except `true`/`false`, `import` and `export` can be set as `custom` (which is by default for Redux enhancer), meaning that the importing/exporting occurs on the client side.\r\n * Otherwise, you'll get/set the data right from the monitor part.\r\n */\r\n features?: {\r\n /**\r\n * start/pause recording of dispatched actions\r\n */\r\n pause?: boolean\r\n /**\r\n * lock/unlock dispatching actions and side effects\r\n */\r\n lock?: boolean\r\n /**\r\n * persist states on page reloading\r\n */\r\n persist?: boolean\r\n /**\r\n * export history of actions in a file\r\n */\r\n export?: boolean | 'custom'\r\n /**\r\n * import history of actions from a file\r\n */\r\n import?: boolean | 'custom'\r\n /**\r\n * jump back and forth (time travelling)\r\n */\r\n jump?: boolean\r\n /**\r\n * skip (cancel) actions\r\n */\r\n skip?: boolean\r\n /**\r\n * drag and drop actions in the history list\r\n */\r\n reorder?: boolean\r\n /**\r\n * dispatch custom actions or action creators\r\n */\r\n dispatch?: boolean\r\n /**\r\n * generate tests for the selected actions\r\n */\r\n test?: boolean\r\n }\r\n /**\r\n * Set to true or a stacktrace-returning function to record call stack traces for dispatched actions.\r\n * Defaults to false.\r\n */\r\n trace?: boolean | ((action: A) => string)\r\n /**\r\n * The maximum number of stack trace entries to record per action. Defaults to 10.\r\n */\r\n traceLimit?: number\r\n}\r\n\r\ntype Compose = typeof compose\r\n\r\ninterface ComposeWithDevTools {\r\n (options: DevToolsEnhancerOptions): Compose\r\n (...funcs: StoreEnhancer[]): StoreEnhancer\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport const composeWithDevTools: ComposeWithDevTools =\r\n typeof window !== 'undefined' &&\r\n (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__\r\n ? (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__\r\n : function () {\r\n if (arguments.length === 0) return undefined\r\n if (typeof arguments[0] === 'object') return compose\r\n return compose.apply(null, arguments as any as Function[])\r\n }\r\n\r\n/**\r\n * @public\r\n */\r\nexport const devToolsEnhancer: {\r\n (options: DevToolsEnhancerOptions): StoreEnhancer\r\n} =\r\n typeof window !== 'undefined' && (window as any).__REDUX_DEVTOOLS_EXTENSION__\r\n ? (window as any).__REDUX_DEVTOOLS_EXTENSION__\r\n : function () {\r\n return function (noop) {\r\n return noop\r\n }\r\n }\r\n","/**\r\n * Returns true if the passed value is \"plain\" object, i.e. an object whose\r\n * prototype is the root `Object.prototype`. This includes objects created\r\n * using object literals, but not for instance for class instances.\r\n *\r\n * @param {any} value The value to inspect.\r\n * @returns {boolean} True if the argument appears to be a plain object.\r\n *\r\n * @public\r\n */\r\nexport default function isPlainObject(value: unknown): value is object {\r\n if (typeof value !== 'object' || value === null) return false\r\n\r\n let proto = Object.getPrototypeOf(value)\r\n if (proto === null) return true\r\n\r\n let baseProto = proto\r\n while (Object.getPrototypeOf(baseProto) !== null) {\r\n baseProto = Object.getPrototypeOf(baseProto)\r\n }\r\n\r\n return proto === baseProto\r\n}\r\n","import createNextState, { isDraftable } from 'immer'\r\nimport type { Middleware } from 'redux'\r\n\r\nexport function getTimeMeasureUtils(maxDelay: number, fnName: string) {\r\n let elapsed = 0\r\n return {\r\n measureTime(fn: () => T): T {\r\n const started = Date.now()\r\n try {\r\n return fn()\r\n } finally {\r\n const finished = Date.now()\r\n elapsed += finished - started\r\n }\r\n },\r\n warnIfExceeded() {\r\n if (elapsed > maxDelay) {\r\n console.warn(`${fnName} took ${elapsed}ms, which is more than the warning threshold of ${maxDelay}ms. \r\nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\r\nIt is disabled in production builds, so you don't need to worry about that.`)\r\n }\r\n },\r\n }\r\n}\r\n\r\nexport function delay(ms: number) {\r\n return new Promise((resolve) => setTimeout(resolve, ms))\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport class MiddlewareArray<\r\n Middlewares extends Middleware[]\r\n> extends Array {\r\n constructor(...items: Middlewares)\r\n constructor(...args: any[]) {\r\n super(...args)\r\n Object.setPrototypeOf(this, MiddlewareArray.prototype)\r\n }\r\n\r\n static get [Symbol.species]() {\r\n return MiddlewareArray as any\r\n }\r\n\r\n concat>>(\r\n items: AdditionalMiddlewares\r\n ): MiddlewareArray<[...Middlewares, ...AdditionalMiddlewares]>\r\n\r\n concat>>(\r\n ...items: AdditionalMiddlewares\r\n ): MiddlewareArray<[...Middlewares, ...AdditionalMiddlewares]>\r\n concat(...arr: any[]) {\r\n return super.concat.apply(this, arr)\r\n }\r\n\r\n prepend>>(\r\n items: AdditionalMiddlewares\r\n ): MiddlewareArray<[...AdditionalMiddlewares, ...Middlewares]>\r\n\r\n prepend>>(\r\n ...items: AdditionalMiddlewares\r\n ): MiddlewareArray<[...AdditionalMiddlewares, ...Middlewares]>\r\n\r\n prepend(...arr: any[]) {\r\n if (arr.length === 1 && Array.isArray(arr[0])) {\r\n return new MiddlewareArray(...arr[0].concat(this))\r\n }\r\n return new MiddlewareArray(...arr.concat(this))\r\n }\r\n}\r\n\r\nexport function freezeDraftable(val: T) {\r\n return isDraftable(val) ? createNextState(val, () => {}) : val\r\n}\r\n","import type { Middleware, AnyAction } from 'redux'\r\nimport type { ThunkMiddleware } from 'redux-thunk'\r\nimport thunkMiddleware from 'redux-thunk'\r\nimport type { ImmutableStateInvariantMiddlewareOptions } from './immutableStateInvariantMiddleware'\r\n/* PROD_START_REMOVE_UMD */\r\nimport { createImmutableStateInvariantMiddleware } from './immutableStateInvariantMiddleware'\r\n/* PROD_STOP_REMOVE_UMD */\r\n\r\nimport type { SerializableStateInvariantMiddlewareOptions } from './serializableStateInvariantMiddleware'\r\nimport { createSerializableStateInvariantMiddleware } from './serializableStateInvariantMiddleware'\r\nimport type { ExcludeFromTuple } from './tsHelpers'\r\nimport { MiddlewareArray } from './utils'\r\n\r\nfunction isBoolean(x: any): x is boolean {\r\n return typeof x === 'boolean'\r\n}\r\n\r\ninterface ThunkOptions {\r\n extraArgument: E\r\n}\r\n\r\ninterface GetDefaultMiddlewareOptions {\r\n thunk?: boolean | ThunkOptions\r\n immutableCheck?: boolean | ImmutableStateInvariantMiddlewareOptions\r\n serializableCheck?: boolean | SerializableStateInvariantMiddlewareOptions\r\n}\r\n\r\nexport type ThunkMiddlewareFor<\r\n S,\r\n O extends GetDefaultMiddlewareOptions = {}\r\n> = O extends {\r\n thunk: false\r\n}\r\n ? never\r\n : O extends { thunk: { extraArgument: infer E } }\r\n ? ThunkMiddleware\r\n : ThunkMiddleware\r\n\r\nexport type CurriedGetDefaultMiddleware = <\r\n O extends Partial = {\r\n thunk: true\r\n immutableCheck: true\r\n serializableCheck: true\r\n }\r\n>(\r\n options?: O\r\n) => MiddlewareArray], never>>\r\n\r\nexport function curryGetDefaultMiddleware<\r\n S = any\r\n>(): CurriedGetDefaultMiddleware {\r\n return function curriedGetDefaultMiddleware(options) {\r\n return getDefaultMiddleware(options)\r\n }\r\n}\r\n\r\n/**\r\n * Returns any array containing the default middleware installed by\r\n * `configureStore()`. Useful if you want to configure your store with a custom\r\n * `middleware` array but still keep the default set.\r\n *\r\n * @return The default middleware used by `configureStore()`.\r\n *\r\n * @public\r\n *\r\n * @deprecated Prefer to use the callback notation for the `middleware` option in `configureStore`\r\n * to access a pre-typed `getDefaultMiddleware` instead.\r\n */\r\nexport function getDefaultMiddleware<\r\n S = any,\r\n O extends Partial = {\r\n thunk: true\r\n immutableCheck: true\r\n serializableCheck: true\r\n }\r\n>(\r\n options: O = {} as O\r\n): MiddlewareArray], never>> {\r\n const {\r\n thunk = true,\r\n immutableCheck = true,\r\n serializableCheck = true,\r\n } = options\r\n\r\n let middlewareArray = new MiddlewareArray()\r\n\r\n if (thunk) {\r\n if (isBoolean(thunk)) {\r\n middlewareArray.push(thunkMiddleware)\r\n } else {\r\n middlewareArray.push(\r\n thunkMiddleware.withExtraArgument(thunk.extraArgument)\r\n )\r\n }\r\n }\r\n\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (immutableCheck) {\r\n /* PROD_START_REMOVE_UMD */\r\n let immutableOptions: ImmutableStateInvariantMiddlewareOptions = {}\r\n\r\n if (!isBoolean(immutableCheck)) {\r\n immutableOptions = immutableCheck\r\n }\r\n\r\n middlewareArray.unshift(\r\n createImmutableStateInvariantMiddleware(immutableOptions)\r\n )\r\n /* PROD_STOP_REMOVE_UMD */\r\n }\r\n\r\n if (serializableCheck) {\r\n let serializableOptions: SerializableStateInvariantMiddlewareOptions = {}\r\n\r\n if (!isBoolean(serializableCheck)) {\r\n serializableOptions = serializableCheck\r\n }\r\n\r\n middlewareArray.push(\r\n createSerializableStateInvariantMiddleware(serializableOptions)\r\n )\r\n }\r\n }\r\n\r\n return middlewareArray as any\r\n}\r\n","import type {\r\n Reducer,\r\n ReducersMapObject,\r\n Middleware,\r\n Action,\r\n AnyAction,\r\n StoreEnhancer,\r\n Store,\r\n Dispatch,\r\n PreloadedState,\r\n CombinedState,\r\n} from 'redux'\r\nimport { createStore, compose, applyMiddleware, combineReducers } from 'redux'\r\nimport type { DevToolsEnhancerOptions as DevToolsOptions } from './devtoolsExtension'\r\nimport { composeWithDevTools } from './devtoolsExtension'\r\n\r\nimport isPlainObject from './isPlainObject'\r\nimport type {\r\n ThunkMiddlewareFor,\r\n CurriedGetDefaultMiddleware,\r\n} from './getDefaultMiddleware'\r\nimport { curryGetDefaultMiddleware } from './getDefaultMiddleware'\r\nimport type {\r\n NoInfer,\r\n ExtractDispatchExtensions,\r\n ExtractStoreExtensions,\r\n} from './tsHelpers'\r\n\r\nconst IS_PRODUCTION = process.env.NODE_ENV === 'production'\r\n\r\n/**\r\n * Callback function type, to be used in `ConfigureStoreOptions.enhancers`\r\n *\r\n * @public\r\n */\r\nexport type ConfigureEnhancersCallback = (\r\n defaultEnhancers: readonly StoreEnhancer[]\r\n) => [...E]\r\n\r\n/**\r\n * Options for `configureStore()`.\r\n *\r\n * @public\r\n */\r\nexport interface ConfigureStoreOptions<\r\n S = any,\r\n A extends Action = AnyAction,\r\n M extends Middlewares = Middlewares,\r\n E extends Enhancers = Enhancers\r\n> {\r\n /**\r\n * A single reducer function that will be used as the root reducer, or an\r\n * object of slice reducers that will be passed to `combineReducers()`.\r\n */\r\n reducer: Reducer | ReducersMapObject\r\n\r\n /**\r\n * An array of Redux middleware to install. If not supplied, defaults to\r\n * the set of middleware returned by `getDefaultMiddleware()`.\r\n *\r\n * @example `middleware: (gDM) => gDM().concat(logger, apiMiddleware, yourCustomMiddleware)`\r\n * @see https://redux-toolkit.js.org/api/getDefaultMiddleware#intended-usage\r\n */\r\n middleware?: ((getDefaultMiddleware: CurriedGetDefaultMiddleware) => M) | M\r\n\r\n /**\r\n * Whether to enable Redux DevTools integration. Defaults to `true`.\r\n *\r\n * Additional configuration can be done by passing Redux DevTools options\r\n */\r\n devTools?: boolean | DevToolsOptions\r\n\r\n /**\r\n * The initial state, same as Redux's createStore.\r\n * You may optionally specify it to hydrate the state\r\n * from the server in universal apps, or to restore a previously serialized\r\n * user session. If you use `combineReducers()` to produce the root reducer\r\n * function (either directly or indirectly by passing an object as `reducer`),\r\n * this must be an object with the same shape as the reducer map keys.\r\n */\r\n /*\r\n Not 100% correct but the best approximation we can get:\r\n - if S is a `CombinedState` applying a second `CombinedState` on it does not change anything.\r\n - if it is not, there could be two cases:\r\n - `ReducersMapObject` is being passed in. In this case, we will call `combineReducers` on it and `CombinedState` is correct\r\n - `Reducer` is being passed in. In this case, actually `CombinedState` is wrong and `S` would be correct.\r\n As we cannot distinguish between those two cases without adding another generic parameter,\r\n we just make the pragmatic assumption that the latter almost never happens.\r\n */\r\n preloadedState?: PreloadedState>>\r\n\r\n /**\r\n * The store enhancers to apply. See Redux's `createStore()`.\r\n * All enhancers will be included before the DevTools Extension enhancer.\r\n * If you need to customize the order of enhancers, supply a callback\r\n * function that will receive the original array (ie, `[applyMiddleware]`),\r\n * and should return a new array (such as `[applyMiddleware, offline]`).\r\n * If you only need to add middleware, you can use the `middleware` parameter instead.\r\n */\r\n enhancers?: E | ConfigureEnhancersCallback\r\n}\r\n\r\ntype Middlewares = ReadonlyArray>\r\n\r\ntype Enhancers = ReadonlyArray\r\n\r\nexport interface ToolkitStore<\r\n S = any,\r\n A extends Action = AnyAction,\r\n M extends Middlewares = Middlewares,\r\n> extends Store {\r\n /**\r\n * The `dispatch` method of your store, enhanced by all its middlewares.\r\n *\r\n * @inheritdoc\r\n */\r\n dispatch: ExtractDispatchExtensions & Dispatch\r\n}\r\n\r\n/**\r\n * A Redux store returned by `configureStore()`. Supports dispatching\r\n * side-effectful _thunks_ in addition to plain actions.\r\n *\r\n * @public\r\n */\r\nexport type EnhancedStore<\r\n S = any,\r\n A extends Action = AnyAction,\r\n M extends Middlewares = Middlewares,\r\n E extends Enhancers = Enhancers\r\n> = ToolkitStore & ExtractStoreExtensions\r\n\r\n/**\r\n * A friendly abstraction over the standard Redux `createStore()` function.\r\n *\r\n * @param options The store configuration.\r\n * @returns A configured Redux store.\r\n *\r\n * @public\r\n */\r\nexport function configureStore<\r\n S = any,\r\n A extends Action = AnyAction,\r\n M extends Middlewares = [ThunkMiddlewareFor],\r\n E extends Enhancers = [StoreEnhancer]\r\n>(options: ConfigureStoreOptions): EnhancedStore {\r\n const curriedGetDefaultMiddleware = curryGetDefaultMiddleware()\r\n\r\n const {\r\n reducer = undefined,\r\n middleware = curriedGetDefaultMiddleware(),\r\n devTools = true,\r\n preloadedState = undefined,\r\n enhancers = undefined,\r\n } = options || {}\r\n\r\n let rootReducer: Reducer\r\n\r\n if (typeof reducer === 'function') {\r\n rootReducer = reducer\r\n } else if (isPlainObject(reducer)) {\r\n rootReducer = combineReducers(reducer) as unknown as Reducer\r\n } else {\r\n throw new Error(\r\n '\"reducer\" is a required argument, and must be a function or an object of functions that can be passed to combineReducers'\r\n )\r\n }\r\n\r\n let finalMiddleware = middleware\r\n if (typeof finalMiddleware === 'function') {\r\n finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware)\r\n\r\n if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) {\r\n throw new Error(\r\n 'when using a middleware builder function, an array of middleware must be returned'\r\n )\r\n }\r\n }\r\n if (\r\n !IS_PRODUCTION &&\r\n finalMiddleware.some((item: any) => typeof item !== 'function')\r\n ) {\r\n throw new Error(\r\n 'each middleware provided to configureStore must be a function'\r\n )\r\n }\r\n\r\n const middlewareEnhancer: StoreEnhancer = applyMiddleware(...finalMiddleware)\r\n\r\n let finalCompose = compose\r\n\r\n if (devTools) {\r\n finalCompose = composeWithDevTools({\r\n // Enable capture of stack traces for dispatched Redux actions\r\n trace: !IS_PRODUCTION,\r\n ...(typeof devTools === 'object' && devTools),\r\n })\r\n }\r\n\r\n let storeEnhancers: Enhancers = [middlewareEnhancer]\r\n\r\n if (Array.isArray(enhancers)) {\r\n storeEnhancers = [middlewareEnhancer, ...enhancers]\r\n } else if (typeof enhancers === 'function') {\r\n storeEnhancers = enhancers(storeEnhancers)\r\n }\r\n\r\n const composedEnhancer = finalCompose(...storeEnhancers) as StoreEnhancer\r\n\r\n return createStore(rootReducer, preloadedState, composedEnhancer)\r\n}\r\n","import type { Action } from 'redux'\r\nimport type {\r\n IsUnknownOrNonInferrable,\r\n IfMaybeUndefined,\r\n IfVoid,\r\n IsAny,\r\n} from './tsHelpers'\r\nimport isPlainObject from './isPlainObject'\r\n\r\n/**\r\n * An action with a string type and an associated payload. This is the\r\n * type of action returned by `createAction()` action creators.\r\n *\r\n * @template P The type of the action's payload.\r\n * @template T the type used for the action type.\r\n * @template M The type of the action's meta (optional)\r\n * @template E The type of the action's error (optional)\r\n *\r\n * @public\r\n */\r\nexport type PayloadAction<\r\n P = void,\r\n T extends string = string,\r\n M = never,\r\n E = never\r\n> = {\r\n payload: P\r\n type: T\r\n} & ([M] extends [never]\r\n ? {}\r\n : {\r\n meta: M\r\n }) &\r\n ([E] extends [never]\r\n ? {}\r\n : {\r\n error: E\r\n })\r\n\r\n/**\r\n * A \"prepare\" method to be used as the second parameter of `createAction`.\r\n * Takes any number of arguments and returns a Flux Standard Action without\r\n * type (will be added later) that *must* contain a payload (might be undefined).\r\n *\r\n * @public\r\n */\r\nexport type PrepareAction

    =\r\n | ((...args: any[]) => { payload: P })\r\n | ((...args: any[]) => { payload: P; meta: any })\r\n | ((...args: any[]) => { payload: P; error: any })\r\n | ((...args: any[]) => { payload: P; meta: any; error: any })\r\n\r\n/**\r\n * Internal version of `ActionCreatorWithPreparedPayload`. Not to be used externally.\r\n *\r\n * @internal\r\n */\r\nexport type _ActionCreatorWithPreparedPayload<\r\n PA extends PrepareAction | void,\r\n T extends string = string\r\n> = PA extends PrepareAction\r\n ? ActionCreatorWithPreparedPayload<\r\n Parameters,\r\n P,\r\n T,\r\n ReturnType extends {\r\n error: infer E\r\n }\r\n ? E\r\n : never,\r\n ReturnType extends {\r\n meta: infer M\r\n }\r\n ? M\r\n : never\r\n >\r\n : void\r\n\r\n/**\r\n * Basic type for all action creators.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n */\r\nexport interface BaseActionCreator {\r\n type: T\r\n match: (action: Action) => action is PayloadAction\r\n}\r\n\r\n/**\r\n * An action creator that takes multiple arguments that are passed\r\n * to a `PrepareAction` method to create the final Action.\r\n * @typeParam Args arguments for the action creator function\r\n * @typeParam P `payload` type\r\n * @typeParam T `type` name\r\n * @typeParam E optional `error` type\r\n * @typeParam M optional `meta` type\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithPreparedPayload<\r\n Args extends unknown[],\r\n P,\r\n T extends string = string,\r\n E = never,\r\n M = never\r\n> extends BaseActionCreator {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with `Args` will return\r\n * an Action with a payload of type `P` and (depending on the `PrepareAction`\r\n * method used) a `meta`- and `error` property of types `M` and `E` respectively.\r\n */\r\n (...args: Args): PayloadAction\r\n}\r\n\r\n/**\r\n * An action creator of type `T` that takes an optional payload of type `P`.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithOptionalPayload\r\n extends BaseActionCreator {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with an argument will\r\n * return a {@link PayloadAction} of type `T` with a payload of `P`.\r\n * Calling it without an argument will return a PayloadAction with a payload of `undefined`.\r\n */\r\n (payload?: P): PayloadAction\r\n}\r\n\r\n/**\r\n * An action creator of type `T` that takes no payload.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithoutPayload\r\n extends BaseActionCreator {\r\n /**\r\n * Calling this {@link redux#ActionCreator} will\r\n * return a {@link PayloadAction} of type `T` with a payload of `undefined`\r\n */\r\n (): PayloadAction\r\n}\r\n\r\n/**\r\n * An action creator of type `T` that requires a payload of type P.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithPayload\r\n extends BaseActionCreator {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with an argument will\r\n * return a {@link PayloadAction} of type `T` with a payload of `P`\r\n */\r\n (payload: P): PayloadAction\r\n}\r\n\r\n/**\r\n * An action creator of type `T` whose `payload` type could not be inferred. Accepts everything as `payload`.\r\n *\r\n * @inheritdoc {redux#ActionCreator}\r\n *\r\n * @public\r\n */\r\nexport interface ActionCreatorWithNonInferrablePayload<\r\n T extends string = string\r\n> extends BaseActionCreator {\r\n /**\r\n * Calling this {@link redux#ActionCreator} with an argument will\r\n * return a {@link PayloadAction} of type `T` with a payload\r\n * of exactly the type of the argument.\r\n */\r\n (payload: PT): PayloadAction\r\n}\r\n\r\n/**\r\n * An action creator that produces actions with a `payload` attribute.\r\n *\r\n * @typeParam P the `payload` type\r\n * @typeParam T the `type` of the resulting action\r\n * @typeParam PA if the resulting action is preprocessed by a `prepare` method, the signature of said method.\r\n *\r\n * @public\r\n */\r\nexport type PayloadActionCreator<\r\n P = void,\r\n T extends string = string,\r\n PA extends PrepareAction

    | void = void\r\n> = IfPrepareActionMethodProvided<\r\n PA,\r\n _ActionCreatorWithPreparedPayload,\r\n // else\r\n IsAny<\r\n P,\r\n ActionCreatorWithPayload,\r\n IsUnknownOrNonInferrable<\r\n P,\r\n ActionCreatorWithNonInferrablePayload,\r\n // else\r\n IfVoid<\r\n P,\r\n ActionCreatorWithoutPayload,\r\n // else\r\n IfMaybeUndefined<\r\n P,\r\n ActionCreatorWithOptionalPayload,\r\n // else\r\n ActionCreatorWithPayload\r\n >\r\n >\r\n >\r\n >\r\n>\r\n\r\n/**\r\n * A utility function to create an action creator for the given action type\r\n * string. The action creator accepts a single argument, which will be included\r\n * in the action object as a field called payload. The action creator function\r\n * will also have its toString() overriden so that it returns the action type,\r\n * allowing it to be used in reducer logic that is looking for that action type.\r\n *\r\n * @param type The action type to use for created actions.\r\n * @param prepare (optional) a method that takes any number of arguments and returns { payload } or { payload, meta }.\r\n * If this is given, the resulting action creator will pass its arguments to this method to calculate payload & meta.\r\n *\r\n * @public\r\n */\r\nexport function createAction

    = PayloadActionCreator

    \r\n\r\n/**\r\n * The return value of `createSlice`\r\n *\r\n * @public\r\n */\r\nexport interface Slice<\r\n State = any,\r\n CaseReducers extends SliceCaseReducers = SliceCaseReducers,\r\n Name extends string = string\r\n> {\r\n /**\r\n * The slice name.\r\n */\r\n name: Name\r\n\r\n /**\r\n * The slice's reducer.\r\n */\r\n reducer: Reducer\r\n\r\n /**\r\n * Action creators for the types of actions that are handled by the slice\r\n * reducer.\r\n */\r\n actions: CaseReducerActions\r\n\r\n /**\r\n * The individual case reducer functions that were passed in the `reducers` parameter.\r\n * This enables reuse and testing if they were defined inline when calling `createSlice`.\r\n */\r\n caseReducers: SliceDefinedCaseReducers\r\n\r\n /**\r\n * Provides access to the initial state value given to the slice.\r\n * If a lazy state initializer was provided, it will be called and a fresh value returned.\r\n */\r\n getInitialState: () => State\r\n}\r\n\r\n/**\r\n * Options for `createSlice()`.\r\n *\r\n * @public\r\n */\r\nexport interface CreateSliceOptions<\r\n State = any,\r\n CR extends SliceCaseReducers = SliceCaseReducers,\r\n Name extends string = string\r\n> {\r\n /**\r\n * The slice's name. Used to namespace the generated action types.\r\n */\r\n name: Name\r\n\r\n /**\r\n * The initial state that should be used when the reducer is called the first time. This may also be a \"lazy initializer\" function, which should return an initial state value when called. This will be used whenever the reducer is called with `undefined` as its state value, and is primarily useful for cases like reading initial state from `localStorage`.\r\n */\r\n initialState: State | (() => State)\r\n\r\n /**\r\n * A mapping from action types to action-type-specific *case reducer*\r\n * functions. For every action type, a matching action creator will be\r\n * generated using `createAction()`.\r\n */\r\n reducers: ValidateSliceCaseReducers\r\n\r\n /**\r\n * A callback that receives a *builder* object to define\r\n * case reducers via calls to `builder.addCase(actionCreatorOrType, reducer)`.\r\n * \r\n * Alternatively, a mapping from action types to action-type-specific *case reducer*\r\n * functions. These reducers should have existing action types used\r\n * as the keys, and action creators will _not_ be generated.\r\n * \r\n * @example\r\n```ts\r\nimport { createAction, createSlice, Action, AnyAction } from '@reduxjs/toolkit'\r\nconst incrementBy = createAction('incrementBy')\r\nconst decrement = createAction('decrement')\r\n\r\ninterface RejectedAction extends Action {\r\n error: Error\r\n}\r\n\r\nfunction isRejectedAction(action: AnyAction): action is RejectedAction {\r\n return action.type.endsWith('rejected')\r\n}\r\n\r\ncreateSlice({\r\n name: 'counter',\r\n initialState: 0,\r\n reducers: {},\r\n extraReducers: builder => {\r\n builder\r\n .addCase(incrementBy, (state, action) => {\r\n // action is inferred correctly here if using TS\r\n })\r\n // You can chain calls, or have separate `builder.addCase()` lines each time\r\n .addCase(decrement, (state, action) => {})\r\n // You can match a range of action types\r\n .addMatcher(\r\n isRejectedAction,\r\n // `action` will be inferred as a RejectedAction due to isRejectedAction being defined as a type guard\r\n (state, action) => {}\r\n )\r\n // and provide a default case if no other handlers matched\r\n .addDefaultCase((state, action) => {})\r\n }\r\n})\r\n```\r\n */\r\n extraReducers?:\r\n | CaseReducers, any>\r\n | ((builder: ActionReducerMapBuilder>) => void)\r\n}\r\n\r\n/**\r\n * A CaseReducer with a `prepare` method.\r\n *\r\n * @public\r\n */\r\nexport type CaseReducerWithPrepare = {\r\n reducer: CaseReducer\r\n prepare: PrepareAction\r\n}\r\n\r\n/**\r\n * The type describing a slice's `reducers` option.\r\n *\r\n * @public\r\n */\r\nexport type SliceCaseReducers = {\r\n [K: string]:\r\n | CaseReducer>\r\n | CaseReducerWithPrepare>\r\n}\r\n\r\ntype SliceActionType<\r\n SliceName extends string,\r\n ActionName extends keyof any\r\n> = ActionName extends string | number ? `${SliceName}/${ActionName}` : string\r\n\r\n/**\r\n * Derives the slice's `actions` property from the `reducers` options\r\n *\r\n * @public\r\n */\r\nexport type CaseReducerActions<\r\n CaseReducers extends SliceCaseReducers,\r\n SliceName extends string\r\n> = {\r\n [Type in keyof CaseReducers]: CaseReducers[Type] extends { prepare: any }\r\n ? ActionCreatorForCaseReducerWithPrepare<\r\n CaseReducers[Type],\r\n SliceActionType\r\n >\r\n : ActionCreatorForCaseReducer<\r\n CaseReducers[Type],\r\n SliceActionType\r\n >\r\n}\r\n\r\n/**\r\n * Get a `PayloadActionCreator` type for a passed `CaseReducerWithPrepare`\r\n *\r\n * @internal\r\n */\r\ntype ActionCreatorForCaseReducerWithPrepare<\r\n CR extends { prepare: any },\r\n Type extends string\r\n> = _ActionCreatorWithPreparedPayload\r\n\r\n/**\r\n * Get a `PayloadActionCreator` type for a passed `CaseReducer`\r\n *\r\n * @internal\r\n */\r\ntype ActionCreatorForCaseReducer = CR extends (\r\n state: any,\r\n action: infer Action\r\n) => any\r\n ? Action extends { payload: infer P }\r\n ? PayloadActionCreator\r\n : ActionCreatorWithoutPayload\r\n : ActionCreatorWithoutPayload\r\n\r\n/**\r\n * Extracts the CaseReducers out of a `reducers` object, even if they are\r\n * tested into a `CaseReducerWithPrepare`.\r\n *\r\n * @internal\r\n */\r\ntype SliceDefinedCaseReducers> = {\r\n [Type in keyof CaseReducers]: CaseReducers[Type] extends {\r\n reducer: infer Reducer\r\n }\r\n ? Reducer\r\n : CaseReducers[Type]\r\n}\r\n\r\n/**\r\n * Used on a SliceCaseReducers object.\r\n * Ensures that if a CaseReducer is a `CaseReducerWithPrepare`, that\r\n * the `reducer` and the `prepare` function use the same type of `payload`.\r\n *\r\n * Might do additional such checks in the future.\r\n *\r\n * This type is only ever useful if you want to write your own wrapper around\r\n * `createSlice`. Please don't use it otherwise!\r\n *\r\n * @public\r\n */\r\nexport type ValidateSliceCaseReducers<\r\n S,\r\n ACR extends SliceCaseReducers\r\n> = ACR &\r\n {\r\n [T in keyof ACR]: ACR[T] extends {\r\n reducer(s: S, action?: infer A): any\r\n }\r\n ? {\r\n prepare(...a: never[]): Omit\r\n }\r\n : {}\r\n }\r\n\r\nfunction getType(slice: string, actionKey: string): string {\r\n return `${slice}/${actionKey}`\r\n}\r\n\r\n/**\r\n * A function that accepts an initial state, an object full of reducer\r\n * functions, and a \"slice name\", and automatically generates\r\n * action creators and action types that correspond to the\r\n * reducers and state.\r\n *\r\n * The `reducer` argument is passed to `createReducer()`.\r\n *\r\n * @public\r\n */\r\nexport function createSlice<\r\n State,\r\n CaseReducers extends SliceCaseReducers,\r\n Name extends string = string\r\n>(\r\n options: CreateSliceOptions\r\n): Slice {\r\n const { name } = options\r\n if (!name) {\r\n throw new Error('`name` is a required option for createSlice')\r\n }\r\n\r\n if (\r\n typeof process !== 'undefined' &&\r\n process.env.NODE_ENV === 'development'\r\n ) {\r\n if (options.initialState === undefined) {\r\n console.error(\r\n 'You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`'\r\n )\r\n }\r\n }\r\n\r\n const initialState =\r\n typeof options.initialState == 'function'\r\n ? options.initialState\r\n : freezeDraftable(options.initialState)\r\n\r\n const reducers = options.reducers || {}\r\n\r\n const reducerNames = Object.keys(reducers)\r\n\r\n const sliceCaseReducersByName: Record = {}\r\n const sliceCaseReducersByType: Record = {}\r\n const actionCreators: Record = {}\r\n\r\n reducerNames.forEach((reducerName) => {\r\n const maybeReducerWithPrepare = reducers[reducerName]\r\n const type = getType(name, reducerName)\r\n\r\n let caseReducer: CaseReducer\r\n let prepareCallback: PrepareAction | undefined\r\n\r\n if ('reducer' in maybeReducerWithPrepare) {\r\n caseReducer = maybeReducerWithPrepare.reducer\r\n prepareCallback = maybeReducerWithPrepare.prepare\r\n } else {\r\n caseReducer = maybeReducerWithPrepare\r\n }\r\n\r\n sliceCaseReducersByName[reducerName] = caseReducer\r\n sliceCaseReducersByType[type] = caseReducer\r\n actionCreators[reducerName] = prepareCallback\r\n ? createAction(type, prepareCallback)\r\n : createAction(type)\r\n })\r\n\r\n function buildReducer() {\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (typeof options.extraReducers === 'object') {\r\n if (!hasWarnedAboutObjectNotation) {\r\n hasWarnedAboutObjectNotation = true\r\n console.warn(\r\n \"The object notation for `createSlice.extraReducers` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice\"\r\n )\r\n }\r\n }\r\n }\r\n const [\r\n extraReducers = {},\r\n actionMatchers = [],\r\n defaultCaseReducer = undefined,\r\n ] =\r\n typeof options.extraReducers === 'function'\r\n ? executeReducerBuilderCallback(options.extraReducers)\r\n : [options.extraReducers]\r\n\r\n const finalCaseReducers = { ...extraReducers, ...sliceCaseReducersByType }\r\n\r\n return createReducer(initialState, (builder) => {\r\n for (let key in finalCaseReducers) {\r\n builder.addCase(key, finalCaseReducers[key] as CaseReducer)\r\n }\r\n for (let m of actionMatchers) {\r\n builder.addMatcher(m.matcher, m.reducer)\r\n }\r\n if (defaultCaseReducer) {\r\n builder.addDefaultCase(defaultCaseReducer)\r\n }\r\n })\r\n }\r\n\r\n let _reducer: ReducerWithInitialState\r\n\r\n return {\r\n name,\r\n reducer(state, action) {\r\n if (!_reducer) _reducer = buildReducer()\r\n\r\n return _reducer(state, action)\r\n },\r\n actions: actionCreators as any,\r\n caseReducers: sliceCaseReducersByName as any,\r\n getInitialState() {\r\n if (!_reducer) _reducer = buildReducer()\r\n\r\n return _reducer.getInitialState()\r\n },\r\n }\r\n}\r\n","import type { Draft } from 'immer'\r\nimport createNextState, { isDraft, isDraftable } from 'immer'\r\nimport type { AnyAction, Action, Reducer } from 'redux'\r\nimport type { ActionReducerMapBuilder } from './mapBuilders'\r\nimport { executeReducerBuilderCallback } from './mapBuilders'\r\nimport type { NoInfer } from './tsHelpers'\r\nimport { freezeDraftable } from './utils'\r\n\r\n/**\r\n * Defines a mapping from action types to corresponding action object shapes.\r\n *\r\n * @deprecated This should not be used manually - it is only used for internal\r\n * inference purposes and should not have any further value.\r\n * It might be removed in the future.\r\n * @public\r\n */\r\nexport type Actions = Record\r\n\r\n/**\r\n * @deprecated use `TypeGuard` instead\r\n */\r\nexport interface ActionMatcher {\r\n (action: AnyAction): action is A\r\n}\r\n\r\nexport type ActionMatcherDescription = {\r\n matcher: ActionMatcher\r\n reducer: CaseReducer>\r\n}\r\n\r\nexport type ReadonlyActionMatcherDescriptionCollection = ReadonlyArray<\r\n ActionMatcherDescription\r\n>\r\n\r\nexport type ActionMatcherDescriptionCollection = Array<\r\n ActionMatcherDescription\r\n>\r\n\r\n/**\r\n * A *case reducer* is a reducer function for a specific action type. Case\r\n * reducers can be composed to full reducers using `createReducer()`.\r\n *\r\n * Unlike a normal Redux reducer, a case reducer is never called with an\r\n * `undefined` state to determine the initial state. Instead, the initial\r\n * state is explicitly specified as an argument to `createReducer()`.\r\n *\r\n * In addition, a case reducer can choose to mutate the passed-in `state`\r\n * value directly instead of returning a new state. This does not actually\r\n * cause the store state to be mutated directly; instead, thanks to\r\n * [immer](https://github.com/mweststrate/immer), the mutations are\r\n * translated to copy operations that result in a new state.\r\n *\r\n * @public\r\n */\r\nexport type CaseReducer = (\r\n state: Draft,\r\n action: A\r\n) => S | void | Draft\r\n\r\n/**\r\n * A mapping from action types to case reducers for `createReducer()`.\r\n *\r\n * @deprecated This should not be used manually - it is only used\r\n * for internal inference purposes and using it manually\r\n * would lead to type erasure.\r\n * It might be removed in the future.\r\n * @public\r\n */\r\nexport type CaseReducers = {\r\n [T in keyof AS]: AS[T] extends Action ? CaseReducer : void\r\n}\r\n\r\nexport type NotFunction = T extends Function ? never : T\r\n\r\nfunction isStateFunction(x: unknown): x is () => S {\r\n return typeof x === 'function'\r\n}\r\n\r\nexport type ReducerWithInitialState> = Reducer & {\r\n getInitialState: () => S\r\n}\r\n\r\nlet hasWarnedAboutObjectNotation = false\r\n\r\n/**\r\n * A utility function that allows defining a reducer as a mapping from action\r\n * type to *case reducer* functions that handle these action types. The\r\n * reducer's initial state is passed as the first argument.\r\n *\r\n * @remarks\r\n * The body of every case reducer is implicitly wrapped with a call to\r\n * `produce()` from the [immer](https://github.com/mweststrate/immer) library.\r\n * This means that rather than returning a new state object, you can also\r\n * mutate the passed-in state object directly; these mutations will then be\r\n * automatically and efficiently translated into copies, giving you both\r\n * convenience and immutability.\r\n *\r\n * @overloadSummary\r\n * This overload accepts a callback function that receives a `builder` object as its argument.\r\n * That builder provides `addCase`, `addMatcher` and `addDefaultCase` functions that may be\r\n * called to define what actions this reducer will handle.\r\n *\r\n * @param initialState - `State | (() => State)`: The initial state that should be used when the reducer is called the first time. This may also be a \"lazy initializer\" function, which should return an initial state value when called. This will be used whenever the reducer is called with `undefined` as its state value, and is primarily useful for cases like reading initial state from `localStorage`.\r\n * @param builderCallback - `(builder: Builder) => void` A callback that receives a *builder* object to define\r\n * case reducers via calls to `builder.addCase(actionCreatorOrType, reducer)`.\r\n * @example\r\n```ts\r\nimport {\r\n createAction,\r\n createReducer,\r\n AnyAction,\r\n PayloadAction,\r\n} from \"@reduxjs/toolkit\";\r\n\r\nconst increment = createAction(\"increment\");\r\nconst decrement = createAction(\"decrement\");\r\n\r\nfunction isActionWithNumberPayload(\r\n action: AnyAction\r\n): action is PayloadAction {\r\n return typeof action.payload === \"number\";\r\n}\r\n\r\nconst reducer = createReducer(\r\n {\r\n counter: 0,\r\n sumOfNumberPayloads: 0,\r\n unhandledActions: 0,\r\n },\r\n (builder) => {\r\n builder\r\n .addCase(increment, (state, action) => {\r\n // action is inferred correctly here\r\n state.counter += action.payload;\r\n })\r\n // You can chain calls, or have separate `builder.addCase()` lines each time\r\n .addCase(decrement, (state, action) => {\r\n state.counter -= action.payload;\r\n })\r\n // You can apply a \"matcher function\" to incoming actions\r\n .addMatcher(isActionWithNumberPayload, (state, action) => {})\r\n // and provide a default case if no other handlers matched\r\n .addDefaultCase((state, action) => {});\r\n }\r\n);\r\n```\r\n * @public\r\n */\r\nexport function createReducer>(\r\n initialState: S | (() => S),\r\n builderCallback: (builder: ActionReducerMapBuilder) => void\r\n): ReducerWithInitialState\r\n\r\n/**\r\n * A utility function that allows defining a reducer as a mapping from action\r\n * type to *case reducer* functions that handle these action types. The\r\n * reducer's initial state is passed as the first argument.\r\n *\r\n * The body of every case reducer is implicitly wrapped with a call to\r\n * `produce()` from the [immer](https://github.com/mweststrate/immer) library.\r\n * This means that rather than returning a new state object, you can also\r\n * mutate the passed-in state object directly; these mutations will then be\r\n * automatically and efficiently translated into copies, giving you both\r\n * convenience and immutability.\r\n * \r\n * @overloadSummary\r\n * This overload accepts an object where the keys are string action types, and the values\r\n * are case reducer functions to handle those action types.\r\n *\r\n * @param initialState - `State | (() => State)`: The initial state that should be used when the reducer is called the first time. This may also be a \"lazy initializer\" function, which should return an initial state value when called. This will be used whenever the reducer is called with `undefined` as its state value, and is primarily useful for cases like reading initial state from `localStorage`.\r\n * @param actionsMap - An object mapping from action types to _case reducers_, each of which handles one specific action type.\r\n * @param actionMatchers - An array of matcher definitions in the form `{matcher, reducer}`.\r\n * All matching reducers will be executed in order, independently if a case reducer matched or not.\r\n * @param defaultCaseReducer - A \"default case\" reducer that is executed if no case reducer and no matcher\r\n * reducer was executed for this action.\r\n *\r\n * @example\r\n```js\r\nconst counterReducer = createReducer(0, {\r\n increment: (state, action) => state + action.payload,\r\n decrement: (state, action) => state - action.payload\r\n})\r\n\r\n// Alternately, use a \"lazy initializer\" to provide the initial state\r\n// (works with either form of createReducer)\r\nconst initialState = () => 0\r\nconst counterReducer = createReducer(initialState, {\r\n increment: (state, action) => state + action.payload,\r\n decrement: (state, action) => state - action.payload\r\n})\r\n```\r\n \r\n * Action creators that were generated using [`createAction`](./createAction) may be used directly as the keys here, using computed property syntax:\r\n\r\n```js\r\nconst increment = createAction('increment')\r\nconst decrement = createAction('decrement')\r\n\r\nconst counterReducer = createReducer(0, {\r\n [increment]: (state, action) => state + action.payload,\r\n [decrement.type]: (state, action) => state - action.payload\r\n})\r\n```\r\n * @public\r\n */\r\nexport function createReducer<\r\n S extends NotFunction,\r\n CR extends CaseReducers = CaseReducers\r\n>(\r\n initialState: S | (() => S),\r\n actionsMap: CR,\r\n actionMatchers?: ActionMatcherDescriptionCollection,\r\n defaultCaseReducer?: CaseReducer\r\n): ReducerWithInitialState\r\n\r\nexport function createReducer>(\r\n initialState: S | (() => S),\r\n mapOrBuilderCallback:\r\n | CaseReducers\r\n | ((builder: ActionReducerMapBuilder) => void),\r\n actionMatchers: ReadonlyActionMatcherDescriptionCollection = [],\r\n defaultCaseReducer?: CaseReducer\r\n): ReducerWithInitialState {\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (typeof mapOrBuilderCallback === 'object') {\r\n if (!hasWarnedAboutObjectNotation) {\r\n hasWarnedAboutObjectNotation = true\r\n console.warn(\r\n \"The object notation for `createReducer` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer\"\r\n )\r\n }\r\n }\r\n }\r\n\r\n let [actionsMap, finalActionMatchers, finalDefaultCaseReducer] =\r\n typeof mapOrBuilderCallback === 'function'\r\n ? executeReducerBuilderCallback(mapOrBuilderCallback)\r\n : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer]\r\n\r\n // Ensure the initial state gets frozen either way (if draftable)\r\n let getInitialState: () => S\r\n if (isStateFunction(initialState)) {\r\n getInitialState = () => freezeDraftable(initialState())\r\n } else {\r\n const frozenInitialState = freezeDraftable(initialState)\r\n getInitialState = () => frozenInitialState\r\n }\r\n\r\n function reducer(state = getInitialState(), action: any): S {\r\n let caseReducers = [\r\n actionsMap[action.type],\r\n ...finalActionMatchers\r\n .filter(({ matcher }) => matcher(action))\r\n .map(({ reducer }) => reducer),\r\n ]\r\n if (caseReducers.filter((cr) => !!cr).length === 0) {\r\n caseReducers = [finalDefaultCaseReducer]\r\n }\r\n\r\n return caseReducers.reduce((previousState, caseReducer): S => {\r\n if (caseReducer) {\r\n if (isDraft(previousState)) {\r\n // If it's already a draft, we must already be inside a `createNextState` call,\r\n // likely because this is being wrapped in `createReducer`, `createSlice`, or nested\r\n // inside an existing draft. It's safe to just pass the draft to the mutator.\r\n const draft = previousState as Draft // We can assume this is already a draft\r\n const result = caseReducer(draft, action)\r\n\r\n if (result === undefined) {\r\n return previousState\r\n }\r\n\r\n return result as S\r\n } else if (!isDraftable(previousState)) {\r\n // If state is not draftable (ex: a primitive, such as 0), we want to directly\r\n // return the caseReducer func and not wrap it with produce.\r\n const result = caseReducer(previousState as any, action)\r\n\r\n if (result === undefined) {\r\n if (previousState === null) {\r\n return previousState\r\n }\r\n throw Error(\r\n 'A case reducer on a non-draftable value must not return undefined'\r\n )\r\n }\r\n\r\n return result as S\r\n } else {\r\n // @ts-ignore createNextState() produces an Immutable> rather\r\n // than an Immutable, and TypeScript cannot find out how to reconcile\r\n // these two types.\r\n return createNextState(previousState, (draft: Draft) => {\r\n return caseReducer(draft, action)\r\n })\r\n }\r\n }\r\n\r\n return previousState\r\n }, state)\r\n }\r\n\r\n reducer.getInitialState = getInitialState\r\n\r\n return reducer as ReducerWithInitialState\r\n}\r\n","// Borrowed from https://github.com/ai/nanoid/blob/3.0.2/non-secure/index.js\r\n// This alphabet uses `A-Za-z0-9_-` symbols. A genetic algorithm helped\r\n// optimize the gzip compression for this alphabet.\r\nlet urlAlphabet =\r\n 'ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW'\r\n\r\n/**\r\n *\r\n * @public\r\n */\r\nexport let nanoid = (size = 21) => {\r\n let id = ''\r\n // A compact alternative for `for (var i = 0; i < step; i++)`.\r\n let i = size\r\n while (i--) {\r\n // `| 0` is more compact and faster than `Math.floor()`.\r\n id += urlAlphabet[(Math.random() * 64) | 0]\r\n }\r\n return id\r\n}\r\n","import type { Dispatch, AnyAction } from 'redux'\r\nimport type {\r\n PayloadAction,\r\n ActionCreatorWithPreparedPayload,\r\n} from './createAction'\r\nimport { createAction } from './createAction'\r\nimport type { ThunkDispatch } from 'redux-thunk'\r\nimport type { FallbackIfUnknown, Id, IsAny, IsUnknown } from './tsHelpers'\r\nimport { nanoid } from './nanoid'\r\n\r\n// @ts-ignore we need the import of these types due to a bundling issue.\r\ntype _Keep = PayloadAction | ActionCreatorWithPreparedPayload\r\n\r\nexport type BaseThunkAPI<\r\n S,\r\n E,\r\n D extends Dispatch = Dispatch,\r\n RejectedValue = undefined,\r\n RejectedMeta = unknown,\r\n FulfilledMeta = unknown\r\n> = {\r\n dispatch: D\r\n getState: () => S\r\n extra: E\r\n requestId: string\r\n signal: AbortSignal\r\n abort: (reason?: string) => void\r\n rejectWithValue: IsUnknown<\r\n RejectedMeta,\r\n (value: RejectedValue) => RejectWithValue,\r\n (\r\n value: RejectedValue,\r\n meta: RejectedMeta\r\n ) => RejectWithValue\r\n >\r\n fulfillWithValue: IsUnknown<\r\n FulfilledMeta,\r\n (\r\n value: FulfilledValue\r\n ) => FulfillWithMeta,\r\n (\r\n value: FulfilledValue,\r\n meta: FulfilledMeta\r\n ) => FulfillWithMeta\r\n >\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport interface SerializedError {\r\n name?: string\r\n message?: string\r\n stack?: string\r\n code?: string\r\n}\r\n\r\nconst commonProperties: Array = [\r\n 'name',\r\n 'message',\r\n 'stack',\r\n 'code',\r\n]\r\n\r\nclass RejectWithValue {\r\n /*\r\n type-only property to distinguish between RejectWithValue and FulfillWithMeta\r\n does not exist at runtime\r\n */\r\n private readonly _type!: 'RejectWithValue'\r\n constructor(\r\n public readonly payload: Payload,\r\n public readonly meta: RejectedMeta\r\n ) {}\r\n}\r\n\r\nclass FulfillWithMeta {\r\n /*\r\n type-only property to distinguish between RejectWithValue and FulfillWithMeta\r\n does not exist at runtime\r\n */\r\n private readonly _type!: 'FulfillWithMeta'\r\n constructor(\r\n public readonly payload: Payload,\r\n public readonly meta: FulfilledMeta\r\n ) {}\r\n}\r\n\r\n/**\r\n * Serializes an error into a plain object.\r\n * Reworked from https://github.com/sindresorhus/serialize-error\r\n *\r\n * @public\r\n */\r\nexport const miniSerializeError = (value: any): SerializedError => {\r\n if (typeof value === 'object' && value !== null) {\r\n const simpleError: SerializedError = {}\r\n for (const property of commonProperties) {\r\n if (typeof value[property] === 'string') {\r\n simpleError[property] = value[property]\r\n }\r\n }\r\n\r\n return simpleError\r\n }\r\n\r\n return { message: String(value) }\r\n}\r\n\r\ntype AsyncThunkConfig = {\r\n state?: unknown\r\n dispatch?: Dispatch\r\n extra?: unknown\r\n rejectValue?: unknown\r\n serializedErrorType?: unknown\r\n pendingMeta?: unknown\r\n fulfilledMeta?: unknown\r\n rejectedMeta?: unknown\r\n}\r\n\r\ntype GetState = ThunkApiConfig extends {\r\n state: infer State\r\n}\r\n ? State\r\n : unknown\r\ntype GetExtra = ThunkApiConfig extends { extra: infer Extra }\r\n ? Extra\r\n : unknown\r\ntype GetDispatch = ThunkApiConfig extends {\r\n dispatch: infer Dispatch\r\n}\r\n ? FallbackIfUnknown<\r\n Dispatch,\r\n ThunkDispatch<\r\n GetState,\r\n GetExtra,\r\n AnyAction\r\n >\r\n >\r\n : ThunkDispatch, GetExtra, AnyAction>\r\n\r\ntype GetThunkAPI = BaseThunkAPI<\r\n GetState,\r\n GetExtra,\r\n GetDispatch,\r\n GetRejectValue,\r\n GetRejectedMeta,\r\n GetFulfilledMeta\r\n>\r\n\r\ntype GetRejectValue = ThunkApiConfig extends {\r\n rejectValue: infer RejectValue\r\n}\r\n ? RejectValue\r\n : unknown\r\n\r\ntype GetPendingMeta = ThunkApiConfig extends {\r\n pendingMeta: infer PendingMeta\r\n}\r\n ? PendingMeta\r\n : unknown\r\n\r\ntype GetFulfilledMeta = ThunkApiConfig extends {\r\n fulfilledMeta: infer FulfilledMeta\r\n}\r\n ? FulfilledMeta\r\n : unknown\r\n\r\ntype GetRejectedMeta = ThunkApiConfig extends {\r\n rejectedMeta: infer RejectedMeta\r\n}\r\n ? RejectedMeta\r\n : unknown\r\n\r\ntype GetSerializedErrorType = ThunkApiConfig extends {\r\n serializedErrorType: infer GetSerializedErrorType\r\n}\r\n ? GetSerializedErrorType\r\n : SerializedError\r\n\r\ntype MaybePromise = T | Promise | (T extends any ? Promise : never)\r\n\r\n/**\r\n * A type describing the return value of the `payloadCreator` argument to `createAsyncThunk`.\r\n * Might be useful for wrapping `createAsyncThunk` in custom abstractions.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkPayloadCreatorReturnValue<\r\n Returned,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = MaybePromise<\r\n | IsUnknown<\r\n GetFulfilledMeta,\r\n Returned,\r\n FulfillWithMeta>\r\n >\r\n | RejectWithValue<\r\n GetRejectValue,\r\n GetRejectedMeta\r\n >\r\n>\r\n/**\r\n * A type describing the `payloadCreator` argument to `createAsyncThunk`.\r\n * Might be useful for wrapping `createAsyncThunk` in custom abstractions.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkPayloadCreator<\r\n Returned,\r\n ThunkArg = void,\r\n ThunkApiConfig extends AsyncThunkConfig = {}\r\n> = (\r\n arg: ThunkArg,\r\n thunkAPI: GetThunkAPI\r\n) => AsyncThunkPayloadCreatorReturnValue\r\n\r\n/**\r\n * A ThunkAction created by `createAsyncThunk`.\r\n * Dispatching it returns a Promise for either a\r\n * fulfilled or rejected action.\r\n * Also, the returned value contains an `abort()` method\r\n * that allows the asyncAction to be cancelled from the outside.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkAction<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = (\r\n dispatch: GetDispatch,\r\n getState: () => GetState,\r\n extra: GetExtra\r\n) => Promise<\r\n | ReturnType>\r\n | ReturnType>\r\n> & {\r\n abort: (reason?: string) => void\r\n requestId: string\r\n arg: ThunkArg\r\n unwrap: () => Promise\r\n}\r\n\r\ntype AsyncThunkActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = IsAny<\r\n ThunkArg,\r\n // any handling\r\n (arg: ThunkArg) => AsyncThunkAction,\r\n // unknown handling\r\n unknown extends ThunkArg\r\n ? (arg: ThunkArg) => AsyncThunkAction // argument not specified or specified as void or undefined\r\n : [ThunkArg] extends [void] | [undefined]\r\n ? () => AsyncThunkAction // argument contains void\r\n : [void] extends [ThunkArg] // make optional\r\n ? (arg?: ThunkArg) => AsyncThunkAction // argument contains undefined\r\n : [undefined] extends [ThunkArg]\r\n ? WithStrictNullChecks<\r\n // with strict nullChecks: make optional\r\n (\r\n arg?: ThunkArg\r\n ) => AsyncThunkAction,\r\n // without strict null checks this will match everything, so don't make it optional\r\n (arg: ThunkArg) => AsyncThunkAction\r\n > // default case: normal argument\r\n : (arg: ThunkArg) => AsyncThunkAction\r\n>\r\n\r\n/**\r\n * Options object for `createAsyncThunk`.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunkOptions<\r\n ThunkArg = void,\r\n ThunkApiConfig extends AsyncThunkConfig = {}\r\n> = {\r\n /**\r\n * A method to control whether the asyncThunk should be executed. Has access to the\r\n * `arg`, `api.getState()` and `api.extra` arguments.\r\n *\r\n * @returns `false` if it should be skipped\r\n */\r\n condition?(\r\n arg: ThunkArg,\r\n api: Pick, 'getState' | 'extra'>\r\n ): MaybePromise\r\n /**\r\n * If `condition` returns `false`, the asyncThunk will be skipped.\r\n * This option allows you to control whether a `rejected` action with `meta.condition == false`\r\n * will be dispatched or not.\r\n *\r\n * @default `false`\r\n */\r\n dispatchConditionRejection?: boolean\r\n\r\n serializeError?: (x: unknown) => GetSerializedErrorType\r\n\r\n /**\r\n * A function to use when generating the `requestId` for the request sequence.\r\n *\r\n * @default `nanoid`\r\n */\r\n idGenerator?: (arg: ThunkArg) => string\r\n} & IsUnknown<\r\n GetPendingMeta,\r\n {\r\n /**\r\n * A method to generate additional properties to be added to `meta` of the pending action.\r\n *\r\n * Using this optional overload will not modify the types correctly, this overload is only in place to support JavaScript users.\r\n * Please use the `ThunkApiConfig` parameter `pendingMeta` to get access to a correctly typed overload\r\n */\r\n getPendingMeta?(\r\n base: {\r\n arg: ThunkArg\r\n requestId: string\r\n },\r\n api: Pick, 'getState' | 'extra'>\r\n ): GetPendingMeta\r\n },\r\n {\r\n /**\r\n * A method to generate additional properties to be added to `meta` of the pending action.\r\n */\r\n getPendingMeta(\r\n base: {\r\n arg: ThunkArg\r\n requestId: string\r\n },\r\n api: Pick, 'getState' | 'extra'>\r\n ): GetPendingMeta\r\n }\r\n>\r\n\r\nexport type AsyncThunkPendingActionCreator<\r\n ThunkArg,\r\n ThunkApiConfig = {}\r\n> = ActionCreatorWithPreparedPayload<\r\n [string, ThunkArg, GetPendingMeta?],\r\n undefined,\r\n string,\r\n never,\r\n {\r\n arg: ThunkArg\r\n requestId: string\r\n requestStatus: 'pending'\r\n } & GetPendingMeta\r\n>\r\n\r\nexport type AsyncThunkRejectedActionCreator<\r\n ThunkArg,\r\n ThunkApiConfig = {}\r\n> = ActionCreatorWithPreparedPayload<\r\n [\r\n Error | null,\r\n string,\r\n ThunkArg,\r\n GetRejectValue?,\r\n GetRejectedMeta?\r\n ],\r\n GetRejectValue | undefined,\r\n string,\r\n GetSerializedErrorType,\r\n {\r\n arg: ThunkArg\r\n requestId: string\r\n requestStatus: 'rejected'\r\n aborted: boolean\r\n condition: boolean\r\n } & (\r\n | ({ rejectedWithValue: false } & {\r\n [K in keyof GetRejectedMeta]?: undefined\r\n })\r\n | ({ rejectedWithValue: true } & GetRejectedMeta)\r\n )\r\n>\r\n\r\nexport type AsyncThunkFulfilledActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig = {}\r\n> = ActionCreatorWithPreparedPayload<\r\n [Returned, string, ThunkArg, GetFulfilledMeta?],\r\n Returned,\r\n string,\r\n never,\r\n {\r\n arg: ThunkArg\r\n requestId: string\r\n requestStatus: 'fulfilled'\r\n } & GetFulfilledMeta\r\n>\r\n\r\n/**\r\n * A type describing the return value of `createAsyncThunk`.\r\n * Might be useful for wrapping `createAsyncThunk` in custom abstractions.\r\n *\r\n * @public\r\n */\r\nexport type AsyncThunk<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n> = AsyncThunkActionCreator & {\r\n pending: AsyncThunkPendingActionCreator\r\n rejected: AsyncThunkRejectedActionCreator\r\n fulfilled: AsyncThunkFulfilledActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig\r\n >\r\n typePrefix: string\r\n}\r\n\r\ntype OverrideThunkApiConfigs = Id<\r\n NewConfig & Omit\r\n>\r\n\r\ntype CreateAsyncThunk = {\r\n /**\r\n *\r\n * @param typePrefix\r\n * @param payloadCreator\r\n * @param options\r\n *\r\n * @public\r\n */\r\n // separate signature without `AsyncThunkConfig` for better inference\r\n (\r\n typePrefix: string,\r\n payloadCreator: AsyncThunkPayloadCreator<\r\n Returned,\r\n ThunkArg,\r\n CurriedThunkApiConfig\r\n >,\r\n options?: AsyncThunkOptions\r\n ): AsyncThunk\r\n\r\n /**\r\n *\r\n * @param typePrefix\r\n * @param payloadCreator\r\n * @param options\r\n *\r\n * @public\r\n */\r\n (\r\n typePrefix: string,\r\n payloadCreator: AsyncThunkPayloadCreator<\r\n Returned,\r\n ThunkArg,\r\n OverrideThunkApiConfigs\r\n >,\r\n options?: AsyncThunkOptions<\r\n ThunkArg,\r\n OverrideThunkApiConfigs\r\n >\r\n ): AsyncThunk<\r\n Returned,\r\n ThunkArg,\r\n OverrideThunkApiConfigs\r\n >\r\n\r\n withTypes(): CreateAsyncThunk<\r\n OverrideThunkApiConfigs\r\n >\r\n}\r\n\r\nexport const createAsyncThunk = (() => {\r\n function createAsyncThunk<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig extends AsyncThunkConfig\r\n >(\r\n typePrefix: string,\r\n payloadCreator: AsyncThunkPayloadCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig\r\n >,\r\n options?: AsyncThunkOptions\r\n ): AsyncThunk {\r\n type RejectedValue = GetRejectValue\r\n type PendingMeta = GetPendingMeta\r\n type FulfilledMeta = GetFulfilledMeta\r\n type RejectedMeta = GetRejectedMeta\r\n\r\n const fulfilled: AsyncThunkFulfilledActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig\r\n > = createAction(\r\n typePrefix + '/fulfilled',\r\n (\r\n payload: Returned,\r\n requestId: string,\r\n arg: ThunkArg,\r\n meta?: FulfilledMeta\r\n ) => ({\r\n payload,\r\n meta: {\r\n ...((meta as any) || {}),\r\n arg,\r\n requestId,\r\n requestStatus: 'fulfilled' as const,\r\n },\r\n })\r\n )\r\n\r\n const pending: AsyncThunkPendingActionCreator =\r\n createAction(\r\n typePrefix + '/pending',\r\n (requestId: string, arg: ThunkArg, meta?: PendingMeta) => ({\r\n payload: undefined,\r\n meta: {\r\n ...((meta as any) || {}),\r\n arg,\r\n requestId,\r\n requestStatus: 'pending' as const,\r\n },\r\n })\r\n )\r\n\r\n const rejected: AsyncThunkRejectedActionCreator =\r\n createAction(\r\n typePrefix + '/rejected',\r\n (\r\n error: Error | null,\r\n requestId: string,\r\n arg: ThunkArg,\r\n payload?: RejectedValue,\r\n meta?: RejectedMeta\r\n ) => ({\r\n payload,\r\n error: ((options && options.serializeError) || miniSerializeError)(\r\n error || 'Rejected'\r\n ) as GetSerializedErrorType,\r\n meta: {\r\n ...((meta as any) || {}),\r\n arg,\r\n requestId,\r\n rejectedWithValue: !!payload,\r\n requestStatus: 'rejected' as const,\r\n aborted: error?.name === 'AbortError',\r\n condition: error?.name === 'ConditionError',\r\n },\r\n })\r\n )\r\n\r\n let displayedWarning = false\r\n\r\n const AC =\r\n typeof AbortController !== 'undefined'\r\n ? AbortController\r\n : class implements AbortController {\r\n signal = {\r\n aborted: false,\r\n addEventListener() {},\r\n dispatchEvent() {\r\n return false\r\n },\r\n onabort() {},\r\n removeEventListener() {},\r\n reason: undefined,\r\n throwIfAborted() {},\r\n }\r\n abort() {\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (!displayedWarning) {\r\n displayedWarning = true\r\n console.info(\r\n `This platform does not implement AbortController. \r\nIf you want to use the AbortController to react to \\`abort\\` events, please consider importing a polyfill like 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'.`\r\n )\r\n }\r\n }\r\n }\r\n }\r\n\r\n function actionCreator(\r\n arg: ThunkArg\r\n ): AsyncThunkAction {\r\n return (dispatch, getState, extra) => {\r\n const requestId = options?.idGenerator\r\n ? options.idGenerator(arg)\r\n : nanoid()\r\n\r\n const abortController = new AC()\r\n let abortReason: string | undefined\r\n\r\n const abortedPromise = new Promise((_, reject) =>\r\n abortController.signal.addEventListener('abort', () =>\r\n reject({ name: 'AbortError', message: abortReason || 'Aborted' })\r\n )\r\n )\r\n\r\n let started = false\r\n function abort(reason?: string) {\r\n if (started) {\r\n abortReason = reason\r\n abortController.abort()\r\n }\r\n }\r\n\r\n const promise = (async function () {\r\n let finalAction: ReturnType\r\n try {\r\n let conditionResult = options?.condition?.(arg, { getState, extra })\r\n if (isThenable(conditionResult)) {\r\n conditionResult = await conditionResult\r\n }\r\n if (conditionResult === false) {\r\n // eslint-disable-next-line no-throw-literal\r\n throw {\r\n name: 'ConditionError',\r\n message: 'Aborted due to condition callback returning false.',\r\n }\r\n }\r\n started = true\r\n dispatch(\r\n pending(\r\n requestId,\r\n arg,\r\n options?.getPendingMeta?.(\r\n { requestId, arg },\r\n { getState, extra }\r\n )\r\n )\r\n )\r\n finalAction = await Promise.race([\r\n abortedPromise,\r\n Promise.resolve(\r\n payloadCreator(arg, {\r\n dispatch,\r\n getState,\r\n extra,\r\n requestId,\r\n signal: abortController.signal,\r\n abort,\r\n rejectWithValue: ((\r\n value: RejectedValue,\r\n meta?: RejectedMeta\r\n ) => {\r\n return new RejectWithValue(value, meta)\r\n }) as any,\r\n fulfillWithValue: ((value: unknown, meta?: FulfilledMeta) => {\r\n return new FulfillWithMeta(value, meta)\r\n }) as any,\r\n })\r\n ).then((result) => {\r\n if (result instanceof RejectWithValue) {\r\n throw result\r\n }\r\n if (result instanceof FulfillWithMeta) {\r\n return fulfilled(result.payload, requestId, arg, result.meta)\r\n }\r\n return fulfilled(result as any, requestId, arg)\r\n }),\r\n ])\r\n } catch (err) {\r\n finalAction =\r\n err instanceof RejectWithValue\r\n ? rejected(null, requestId, arg, err.payload, err.meta)\r\n : rejected(err as any, requestId, arg)\r\n }\r\n // We dispatch the result action _after_ the catch, to avoid having any errors\r\n // here get swallowed by the try/catch block,\r\n // per https://twitter.com/dan_abramov/status/770914221638942720\r\n // and https://github.com/reduxjs/redux-toolkit/blob/e85eb17b39a2118d859f7b7746e0f3fee523e089/docs/tutorials/advanced-tutorial.md#async-error-handling-logic-in-thunks\r\n\r\n const skipDispatch =\r\n options &&\r\n !options.dispatchConditionRejection &&\r\n rejected.match(finalAction) &&\r\n (finalAction as any).meta.condition\r\n\r\n if (!skipDispatch) {\r\n dispatch(finalAction)\r\n }\r\n return finalAction\r\n })()\r\n return Object.assign(promise as Promise, {\r\n abort,\r\n requestId,\r\n arg,\r\n unwrap() {\r\n return promise.then(unwrapResult)\r\n },\r\n })\r\n }\r\n }\r\n\r\n return Object.assign(\r\n actionCreator as AsyncThunkActionCreator<\r\n Returned,\r\n ThunkArg,\r\n ThunkApiConfig\r\n >,\r\n {\r\n pending,\r\n rejected,\r\n fulfilled,\r\n typePrefix,\r\n }\r\n )\r\n }\r\n createAsyncThunk.withTypes = createAsyncThunk as unknown\r\n\r\n return createAsyncThunk as CreateAsyncThunk\r\n})()\r\n\r\ninterface UnwrappableAction {\r\n payload: any\r\n meta?: any\r\n error?: any\r\n}\r\n\r\ntype UnwrappedActionPayload = Exclude<\r\n T,\r\n { error: any }\r\n>['payload']\r\n\r\n/**\r\n * @public\r\n */\r\nexport function unwrapResult(\r\n action: R\r\n): UnwrappedActionPayload {\r\n if (action.meta && action.meta.rejectedWithValue) {\r\n throw action.payload\r\n }\r\n if (action.error) {\r\n throw action.error\r\n }\r\n return action.payload\r\n}\r\n\r\ntype WithStrictNullChecks = undefined extends boolean\r\n ? False\r\n : True\r\n\r\nfunction isThenable(value: any): value is PromiseLike {\r\n return (\r\n value !== null &&\r\n typeof value === 'object' &&\r\n typeof value.then === 'function'\r\n )\r\n}\r\n","import type { Middleware, StoreEnhancer } from 'redux'\r\nimport type { MiddlewareArray } from './utils'\r\n\r\n/**\r\n * return True if T is `any`, otherwise return False\r\n * taken from https://github.com/joonhocho/tsdef\r\n *\r\n * @internal\r\n */\r\nexport type IsAny =\r\n // test if we are going the left AND right path in the condition\r\n true | false extends (T extends never ? true : false) ? True : False\r\n\r\n/**\r\n * return True if T is `unknown`, otherwise return False\r\n * taken from https://github.com/joonhocho/tsdef\r\n *\r\n * @internal\r\n */\r\nexport type IsUnknown = unknown extends T\r\n ? IsAny\r\n : False\r\n\r\nexport type FallbackIfUnknown = IsUnknown\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IfMaybeUndefined = [undefined] extends [P]\r\n ? True\r\n : False\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IfVoid = [void] extends [P] ? True : False\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IsEmptyObj = T extends any\r\n ? keyof T extends never\r\n ? IsUnknown>>\r\n : False\r\n : never\r\n\r\n/**\r\n * returns True if TS version is above 3.5, False if below.\r\n * uses feature detection to detect TS version >= 3.5\r\n * * versions below 3.5 will return `{}` for unresolvable interference\r\n * * versions above will return `unknown`\r\n *\r\n * @internal\r\n */\r\nexport type AtLeastTS35 = [True, False][IsUnknown<\r\n ReturnType<() => T>,\r\n 0,\r\n 1\r\n>]\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type IsUnknownOrNonInferrable = AtLeastTS35<\r\n IsUnknown,\r\n IsEmptyObj>\r\n>\r\n\r\n/**\r\n * Convert a Union type `(A|B)` to an intersection type `(A&B)`\r\n */\r\nexport type UnionToIntersection = (\r\n U extends any ? (k: U) => void : never\r\n) extends (k: infer I) => void\r\n ? I\r\n : never\r\n\r\n// Appears to have a convenient side effect of ignoring `never` even if that's not what you specified\r\nexport type ExcludeFromTuple = T extends [\r\n infer Head,\r\n ...infer Tail\r\n]\r\n ? ExcludeFromTuple\r\n : Acc\r\n\r\ntype ExtractDispatchFromMiddlewareTuple<\r\n MiddlewareTuple extends any[],\r\n Acc extends {}\r\n> = MiddlewareTuple extends [infer Head, ...infer Tail]\r\n ? ExtractDispatchFromMiddlewareTuple<\r\n Tail,\r\n Acc & (Head extends Middleware ? IsAny : {})\r\n >\r\n : Acc\r\n\r\nexport type ExtractDispatchExtensions = M extends MiddlewareArray<\r\n infer MiddlewareTuple\r\n>\r\n ? ExtractDispatchFromMiddlewareTuple\r\n : M extends ReadonlyArray\r\n ? ExtractDispatchFromMiddlewareTuple<[...M], {}>\r\n : never\r\n\r\nexport type ExtractStoreExtensions = E extends any[]\r\n ? UnionToIntersection ? Ext extends {} ? Ext : {} : {}>\r\n : {}\r\n\r\n/**\r\n * Helper type. Passes T out again, but boxes it in a way that it cannot\r\n * \"widen\" the type by accident if it is a generic that should be inferred\r\n * from elsewhere.\r\n *\r\n * @internal\r\n */\r\nexport type NoInfer = [T][T extends any ? 0 : never]\r\n\r\nexport type Omit = Pick>\r\n\r\nexport interface TypeGuard {\r\n (value: any): value is T\r\n}\r\n\r\nexport interface HasMatchFunction {\r\n match: TypeGuard\r\n}\r\n\r\nexport const hasMatchFunction = (\r\n v: Matcher\r\n): v is HasMatchFunction => {\r\n return v && typeof (v as HasMatchFunction).match === 'function'\r\n}\r\n\r\n/** @public */\r\nexport type Matcher = HasMatchFunction | TypeGuard\r\n\r\n/** @public */\r\nexport type ActionFromMatcher> = M extends Matcher<\r\n infer T\r\n>\r\n ? T\r\n : never\r\n\r\nexport type Id = { [K in keyof T]: T[K] } & {}\r\n","import type {\r\n ActionFromMatcher,\r\n Matcher,\r\n UnionToIntersection,\r\n} from './tsHelpers'\r\nimport { hasMatchFunction } from './tsHelpers'\r\nimport type {\r\n AsyncThunk,\r\n AsyncThunkFulfilledActionCreator,\r\n AsyncThunkPendingActionCreator,\r\n AsyncThunkRejectedActionCreator,\r\n} from './createAsyncThunk'\r\n\r\n/** @public */\r\nexport type ActionMatchingAnyOf<\r\n Matchers extends [Matcher, ...Matcher[]]\r\n> = ActionFromMatcher\r\n\r\n/** @public */\r\nexport type ActionMatchingAllOf<\r\n Matchers extends [Matcher, ...Matcher[]]\r\n> = UnionToIntersection>\r\n\r\nconst matches = (matcher: Matcher, action: any) => {\r\n if (hasMatchFunction(matcher)) {\r\n return matcher.match(action)\r\n } else {\r\n return matcher(action)\r\n }\r\n}\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action matches any one of the supplied type guards or action\r\n * creators.\r\n *\r\n * @param matchers The type guards or action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isAnyOf, ...Matcher[]]>(\r\n ...matchers: Matchers\r\n) {\r\n return (action: any): action is ActionMatchingAnyOf => {\r\n return matchers.some((matcher) => matches(matcher, action))\r\n }\r\n}\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action matches all of the supplied type guards or action\r\n * creators.\r\n *\r\n * @param matchers The type guards or action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isAllOf, ...Matcher[]]>(\r\n ...matchers: Matchers\r\n) {\r\n return (action: any): action is ActionMatchingAllOf => {\r\n return matchers.every((matcher) => matches(matcher, action))\r\n }\r\n}\r\n\r\n/**\r\n * @param action A redux action\r\n * @param validStatus An array of valid meta.requestStatus values\r\n *\r\n * @internal\r\n */\r\nexport function hasExpectedRequestMetadata(\r\n action: any,\r\n validStatus: readonly string[]\r\n) {\r\n if (!action || !action.meta) return false\r\n\r\n const hasValidRequestId = typeof action.meta.requestId === 'string'\r\n const hasValidRequestStatus =\r\n validStatus.indexOf(action.meta.requestStatus) > -1\r\n\r\n return hasValidRequestId && hasValidRequestStatus\r\n}\r\n\r\nfunction isAsyncThunkArray(a: [any] | AnyAsyncThunk[]): a is AnyAsyncThunk[] {\r\n return (\r\n typeof a[0] === 'function' &&\r\n 'pending' in a[0] &&\r\n 'fulfilled' in a[0] &&\r\n 'rejected' in a[0]\r\n )\r\n}\r\n\r\nexport type UnknownAsyncThunkPendingAction = ReturnType<\r\n AsyncThunkPendingActionCreator\r\n>\r\n\r\nexport type PendingActionFromAsyncThunk =\r\n ActionFromMatcher\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is pending.\r\n *\r\n * @public\r\n */\r\nexport function isPending(): (\r\n action: any\r\n) => action is UnknownAsyncThunkPendingAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is pending.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isPending<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is PendingActionFromAsyncThunk\r\n/**\r\n * Tests if `action` is a pending thunk action\r\n * @public\r\n */\r\nexport function isPending(action: any): action is UnknownAsyncThunkPendingAction\r\nexport function isPending<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => hasExpectedRequestMetadata(action, ['pending'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isPending()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is PendingActionFromAsyncThunk => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher, ...Matcher[]] = asyncThunks.map(\r\n (asyncThunk) => asyncThunk.pending\r\n ) as any\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkRejectedAction = ReturnType<\r\n AsyncThunkRejectedActionCreator\r\n>\r\n\r\nexport type RejectedActionFromAsyncThunk =\r\n ActionFromMatcher\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is rejected.\r\n *\r\n * @public\r\n */\r\nexport function isRejected(): (\r\n action: any\r\n) => action is UnknownAsyncThunkRejectedAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is rejected.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isRejected<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is RejectedActionFromAsyncThunk\r\n/**\r\n * Tests if `action` is a rejected thunk action\r\n * @public\r\n */\r\nexport function isRejected(\r\n action: any\r\n): action is UnknownAsyncThunkRejectedAction\r\nexport function isRejected<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => hasExpectedRequestMetadata(action, ['rejected'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isRejected()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is RejectedActionFromAsyncThunk => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher, ...Matcher[]] = asyncThunks.map(\r\n (asyncThunk) => asyncThunk.rejected\r\n ) as any\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkRejectedWithValueAction = ReturnType<\r\n AsyncThunkRejectedActionCreator\r\n>\r\n\r\nexport type RejectedWithValueActionFromAsyncThunk =\r\n ActionFromMatcher &\r\n (T extends AsyncThunk\r\n ? { payload: RejectedValue }\r\n : unknown)\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is rejected with value.\r\n *\r\n * @public\r\n */\r\nexport function isRejectedWithValue(): (\r\n action: any\r\n) => action is UnknownAsyncThunkRejectedAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is rejected with value.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isRejectedWithValue<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (\r\n action: any\r\n) => action is RejectedWithValueActionFromAsyncThunk\r\n/**\r\n * Tests if `action` is a rejected thunk action with value\r\n * @public\r\n */\r\nexport function isRejectedWithValue(\r\n action: any\r\n): action is UnknownAsyncThunkRejectedAction\r\nexport function isRejectedWithValue<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n const hasFlag = (action: any): action is any => {\r\n return action && action.meta && action.meta.rejectedWithValue\r\n }\r\n\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => {\r\n const combinedMatcher = isAllOf(isRejected(...asyncThunks), hasFlag)\r\n\r\n return combinedMatcher(action)\r\n }\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isRejectedWithValue()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is RejectedActionFromAsyncThunk => {\r\n const combinedMatcher = isAllOf(isRejected(...asyncThunks), hasFlag)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkFulfilledAction = ReturnType<\r\n AsyncThunkFulfilledActionCreator\r\n>\r\n\r\nexport type FulfilledActionFromAsyncThunk =\r\n ActionFromMatcher\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator, and that\r\n * the action is fulfilled.\r\n *\r\n * @public\r\n */\r\nexport function isFulfilled(): (\r\n action: any\r\n) => action is UnknownAsyncThunkFulfilledAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators,\r\n * and that the action is fulfilled.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isFulfilled<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is FulfilledActionFromAsyncThunk\r\n/**\r\n * Tests if `action` is a fulfilled thunk action\r\n * @public\r\n */\r\nexport function isFulfilled(\r\n action: any\r\n): action is UnknownAsyncThunkFulfilledAction\r\nexport function isFulfilled<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) => hasExpectedRequestMetadata(action, ['fulfilled'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isFulfilled()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is FulfilledActionFromAsyncThunk => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher, ...Matcher[]] = asyncThunks.map(\r\n (asyncThunk) => asyncThunk.fulfilled\r\n ) as any\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n\r\nexport type UnknownAsyncThunkAction =\r\n | UnknownAsyncThunkPendingAction\r\n | UnknownAsyncThunkRejectedAction\r\n | UnknownAsyncThunkFulfilledAction\r\n\r\nexport type AnyAsyncThunk = {\r\n pending: { match: (action: any) => action is any }\r\n fulfilled: { match: (action: any) => action is any }\r\n rejected: { match: (action: any) => action is any }\r\n}\r\n\r\nexport type ActionsFromAsyncThunk =\r\n | ActionFromMatcher\r\n | ActionFromMatcher\r\n | ActionFromMatcher\r\n\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action was created by an async thunk action creator.\r\n *\r\n * @public\r\n */\r\nexport function isAsyncThunkAction(): (\r\n action: any\r\n) => action is UnknownAsyncThunkAction\r\n/**\r\n * A higher-order function that returns a function that may be used to check\r\n * whether an action belongs to one of the provided async thunk action creators.\r\n *\r\n * @param asyncThunks (optional) The async thunk action creators to match against.\r\n *\r\n * @public\r\n */\r\nexport function isAsyncThunkAction<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(\r\n ...asyncThunks: AsyncThunks\r\n): (action: any) => action is ActionsFromAsyncThunk\r\n/**\r\n * Tests if `action` is a thunk action\r\n * @public\r\n */\r\nexport function isAsyncThunkAction(\r\n action: any\r\n): action is UnknownAsyncThunkAction\r\nexport function isAsyncThunkAction<\r\n AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]]\r\n>(...asyncThunks: AsyncThunks | [any]) {\r\n if (asyncThunks.length === 0) {\r\n return (action: any) =>\r\n hasExpectedRequestMetadata(action, ['pending', 'fulfilled', 'rejected'])\r\n }\r\n\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isAsyncThunkAction()(asyncThunks[0])\r\n }\r\n\r\n return (\r\n action: any\r\n ): action is ActionsFromAsyncThunk => {\r\n // note: this type will be correct because we have at least 1 asyncThunk\r\n const matchers: [Matcher, ...Matcher[]] = [] as any\r\n\r\n for (const asyncThunk of asyncThunks) {\r\n matchers.push(\r\n asyncThunk.pending,\r\n asyncThunk.rejected,\r\n asyncThunk.fulfilled\r\n )\r\n }\r\n\r\n const combinedMatcher = isAnyOf(...matchers)\r\n\r\n return combinedMatcher(action)\r\n }\r\n}\r\n","import type { Dispatch, AnyAction, MiddlewareAPI } from 'redux'\r\nimport type { ThunkDispatch } from 'redux-thunk'\r\nimport { createAction } from '../createAction'\r\nimport { nanoid } from '../nanoid'\r\n\r\nimport type {\r\n ListenerMiddleware,\r\n ListenerMiddlewareInstance,\r\n AddListenerOverloads,\r\n AnyListenerPredicate,\r\n CreateListenerMiddlewareOptions,\r\n TypedAddListener,\r\n TypedCreateListenerEntry,\r\n FallbackAddListenerOptions,\r\n ListenerEntry,\r\n ListenerErrorHandler,\r\n UnsubscribeListener,\r\n TakePattern,\r\n ListenerErrorInfo,\r\n ForkedTaskExecutor,\r\n ForkedTask,\r\n TypedRemoveListener,\r\n TaskResult,\r\n AbortSignalWithReason,\r\n UnsubscribeListenerOptions,\r\n} from './types'\r\nimport {\r\n abortControllerWithReason,\r\n addAbortSignalListener,\r\n assertFunction,\r\n catchRejection,\r\n} from './utils'\r\nimport {\r\n listenerCancelled,\r\n listenerCompleted,\r\n TaskAbortError,\r\n taskCancelled,\r\n taskCompleted,\r\n} from './exceptions'\r\nimport {\r\n runTask,\r\n promisifyAbortSignal,\r\n validateActive,\r\n createPause,\r\n createDelay,\r\n} from './task'\r\nexport { TaskAbortError } from './exceptions'\r\nexport type {\r\n ListenerEffect,\r\n ListenerMiddleware,\r\n ListenerEffectAPI,\r\n ListenerMiddlewareInstance,\r\n CreateListenerMiddlewareOptions,\r\n ListenerErrorHandler,\r\n TypedStartListening,\r\n TypedAddListener,\r\n TypedStopListening,\r\n TypedRemoveListener,\r\n UnsubscribeListener,\r\n UnsubscribeListenerOptions,\r\n ForkedTaskExecutor,\r\n ForkedTask,\r\n ForkedTaskAPI,\r\n AsyncTaskExecutor,\r\n SyncTaskExecutor,\r\n TaskCancelled,\r\n TaskRejected,\r\n TaskResolved,\r\n TaskResult,\r\n} from './types'\r\n\r\n//Overly-aggressive byte-shaving\r\nconst { assign } = Object\r\n/**\r\n * @internal\r\n */\r\nconst INTERNAL_NIL_TOKEN = {} as const\r\n\r\nconst alm = 'listenerMiddleware' as const\r\n\r\nconst createFork = (parentAbortSignal: AbortSignalWithReason) => {\r\n const linkControllers = (controller: AbortController) =>\r\n addAbortSignalListener(parentAbortSignal, () =>\r\n abortControllerWithReason(controller, parentAbortSignal.reason)\r\n )\r\n\r\n return (taskExecutor: ForkedTaskExecutor): ForkedTask => {\r\n assertFunction(taskExecutor, 'taskExecutor')\r\n const childAbortController = new AbortController()\r\n\r\n linkControllers(childAbortController)\r\n\r\n const result = runTask(\r\n async (): Promise => {\r\n validateActive(parentAbortSignal)\r\n validateActive(childAbortController.signal)\r\n const result = (await taskExecutor({\r\n pause: createPause(childAbortController.signal),\r\n delay: createDelay(childAbortController.signal),\r\n signal: childAbortController.signal,\r\n })) as T\r\n validateActive(childAbortController.signal)\r\n return result\r\n },\r\n () => abortControllerWithReason(childAbortController, taskCompleted)\r\n )\r\n\r\n return {\r\n result: createPause>(parentAbortSignal)(result),\r\n cancel() {\r\n abortControllerWithReason(childAbortController, taskCancelled)\r\n },\r\n }\r\n }\r\n}\r\n\r\nconst createTakePattern = (\r\n startListening: AddListenerOverloads<\r\n UnsubscribeListener,\r\n S,\r\n Dispatch\r\n >,\r\n signal: AbortSignal\r\n): TakePattern => {\r\n /**\r\n * A function that takes a ListenerPredicate and an optional timeout,\r\n * and resolves when either the predicate returns `true` based on an action\r\n * state combination or when the timeout expires.\r\n * If the parent listener is canceled while waiting, this will throw a\r\n * TaskAbortError.\r\n */\r\n const take = async

    >(\r\n predicate: P,\r\n timeout: number | undefined\r\n ) => {\r\n validateActive(signal)\r\n\r\n // Placeholder unsubscribe function until the listener is added\r\n let unsubscribe: UnsubscribeListener = () => {}\r\n\r\n const tuplePromise = new Promise<[AnyAction, S, S]>((resolve) => {\r\n // Inside the Promise, we synchronously add the listener.\r\n unsubscribe = startListening({\r\n predicate: predicate as any,\r\n effect: (action, listenerApi): void => {\r\n // One-shot listener that cleans up as soon as the predicate passes\r\n listenerApi.unsubscribe()\r\n // Resolve the promise with the same arguments the predicate saw\r\n resolve([\r\n action,\r\n listenerApi.getState(),\r\n listenerApi.getOriginalState(),\r\n ])\r\n },\r\n })\r\n })\r\n\r\n const promises: (Promise | Promise<[AnyAction, S, S]>)[] = [\r\n promisifyAbortSignal(signal),\r\n tuplePromise,\r\n ]\r\n\r\n if (timeout != null) {\r\n promises.push(\r\n new Promise((resolve) => setTimeout(resolve, timeout, null))\r\n )\r\n }\r\n\r\n try {\r\n const output = await Promise.race(promises)\r\n\r\n validateActive(signal)\r\n return output\r\n } finally {\r\n // Always clean up the listener\r\n unsubscribe()\r\n }\r\n }\r\n\r\n return ((predicate: AnyListenerPredicate, timeout: number | undefined) =>\r\n catchRejection(take(predicate, timeout))) as TakePattern\r\n}\r\n\r\nconst getListenerEntryPropsFrom = (options: FallbackAddListenerOptions) => {\r\n let { type, actionCreator, matcher, predicate, effect } = options\r\n\r\n if (type) {\r\n predicate = createAction(type).match\r\n } else if (actionCreator) {\r\n type = actionCreator!.type\r\n predicate = actionCreator.match\r\n } else if (matcher) {\r\n predicate = matcher\r\n } else if (predicate) {\r\n // pass\r\n } else {\r\n throw new Error(\r\n 'Creating or removing a listener requires one of the known fields for matching an action'\r\n )\r\n }\r\n\r\n assertFunction(effect, 'options.listener')\r\n\r\n return { predicate, type, effect }\r\n}\r\n\r\n/** Accepts the possible options for creating a listener, and returns a formatted listener entry */\r\nexport const createListenerEntry: TypedCreateListenerEntry = (\r\n options: FallbackAddListenerOptions\r\n) => {\r\n const { type, predicate, effect } = getListenerEntryPropsFrom(options)\r\n\r\n const id = nanoid()\r\n const entry: ListenerEntry = {\r\n id,\r\n effect,\r\n type,\r\n predicate,\r\n pending: new Set(),\r\n unsubscribe: () => {\r\n throw new Error('Unsubscribe not initialized')\r\n },\r\n }\r\n\r\n return entry\r\n}\r\n\r\nconst createClearListenerMiddleware = (\r\n listenerMap: Map\r\n) => {\r\n return () => {\r\n listenerMap.forEach(cancelActiveListeners)\r\n\r\n listenerMap.clear()\r\n }\r\n}\r\n\r\n/**\r\n * Safely reports errors to the `errorHandler` provided.\r\n * Errors that occur inside `errorHandler` are notified in a new task.\r\n * Inspired by [rxjs reportUnhandledError](https://github.com/ReactiveX/rxjs/blob/6fafcf53dc9e557439b25debaeadfd224b245a66/src/internal/util/reportUnhandledError.ts)\r\n * @param errorHandler\r\n * @param errorToNotify\r\n */\r\nconst safelyNotifyError = (\r\n errorHandler: ListenerErrorHandler,\r\n errorToNotify: unknown,\r\n errorInfo: ListenerErrorInfo\r\n): void => {\r\n try {\r\n errorHandler(errorToNotify, errorInfo)\r\n } catch (errorHandlerError) {\r\n // We cannot let an error raised here block the listener queue.\r\n // The error raised here will be picked up by `window.onerror`, `process.on('error')` etc...\r\n setTimeout(() => {\r\n throw errorHandlerError\r\n }, 0)\r\n }\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport const addListener = createAction(\r\n `${alm}/add`\r\n) as TypedAddListener\r\n\r\n/**\r\n * @public\r\n */\r\nexport const clearAllListeners = createAction(`${alm}/removeAll`)\r\n\r\n/**\r\n * @public\r\n */\r\nexport const removeListener = createAction(\r\n `${alm}/remove`\r\n) as TypedRemoveListener\r\n\r\nconst defaultErrorHandler: ListenerErrorHandler = (...args: unknown[]) => {\r\n console.error(`${alm}/error`, ...args)\r\n}\r\n\r\nconst cancelActiveListeners = (\r\n entry: ListenerEntry>\r\n) => {\r\n entry.pending.forEach((controller) => {\r\n abortControllerWithReason(controller, listenerCancelled)\r\n })\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport function createListenerMiddleware<\r\n S = unknown,\r\n D extends Dispatch = ThunkDispatch,\r\n ExtraArgument = unknown\r\n>(middlewareOptions: CreateListenerMiddlewareOptions = {}) {\r\n const listenerMap = new Map()\r\n const { extra, onError = defaultErrorHandler } = middlewareOptions\r\n\r\n assertFunction(onError, 'onError')\r\n\r\n const insertEntry = (entry: ListenerEntry) => {\r\n entry.unsubscribe = () => listenerMap.delete(entry!.id)\r\n\r\n listenerMap.set(entry.id, entry)\r\n return (cancelOptions?: UnsubscribeListenerOptions) => {\r\n entry.unsubscribe()\r\n if (cancelOptions?.cancelActive) {\r\n cancelActiveListeners(entry)\r\n }\r\n }\r\n }\r\n\r\n const findListenerEntry = (\r\n comparator: (entry: ListenerEntry) => boolean\r\n ): ListenerEntry | undefined => {\r\n for (const entry of Array.from(listenerMap.values())) {\r\n if (comparator(entry)) {\r\n return entry\r\n }\r\n }\r\n\r\n return undefined\r\n }\r\n\r\n const startListening = (options: FallbackAddListenerOptions) => {\r\n let entry = findListenerEntry(\r\n (existingEntry) => existingEntry.effect === options.effect\r\n )\r\n\r\n if (!entry) {\r\n entry = createListenerEntry(options as any)\r\n }\r\n\r\n return insertEntry(entry)\r\n }\r\n\r\n const stopListening = (\r\n options: FallbackAddListenerOptions & UnsubscribeListenerOptions\r\n ): boolean => {\r\n const { type, effect, predicate } = getListenerEntryPropsFrom(options)\r\n\r\n const entry = findListenerEntry((entry) => {\r\n const matchPredicateOrType =\r\n typeof type === 'string'\r\n ? entry.type === type\r\n : entry.predicate === predicate\r\n\r\n return matchPredicateOrType && entry.effect === effect\r\n })\r\n\r\n if (entry) {\r\n entry.unsubscribe()\r\n if (options.cancelActive) {\r\n cancelActiveListeners(entry)\r\n }\r\n }\r\n\r\n return !!entry\r\n }\r\n\r\n const notifyListener = async (\r\n entry: ListenerEntry>,\r\n action: AnyAction,\r\n api: MiddlewareAPI,\r\n getOriginalState: () => S\r\n ) => {\r\n const internalTaskController = new AbortController()\r\n const take = createTakePattern(\r\n startListening,\r\n internalTaskController.signal\r\n )\r\n\r\n try {\r\n entry.pending.add(internalTaskController)\r\n await Promise.resolve(\r\n entry.effect(\r\n action,\r\n // Use assign() rather than ... to avoid extra helper functions added to bundle\r\n assign({}, api, {\r\n getOriginalState,\r\n condition: (\r\n predicate: AnyListenerPredicate,\r\n timeout?: number\r\n ) => take(predicate, timeout).then(Boolean),\r\n take,\r\n delay: createDelay(internalTaskController.signal),\r\n pause: createPause(internalTaskController.signal),\r\n extra,\r\n signal: internalTaskController.signal,\r\n fork: createFork(internalTaskController.signal),\r\n unsubscribe: entry.unsubscribe,\r\n subscribe: () => {\r\n listenerMap.set(entry.id, entry)\r\n },\r\n cancelActiveListeners: () => {\r\n entry.pending.forEach((controller, _, set) => {\r\n if (controller !== internalTaskController) {\r\n abortControllerWithReason(controller, listenerCancelled)\r\n set.delete(controller)\r\n }\r\n })\r\n },\r\n })\r\n )\r\n )\r\n } catch (listenerError) {\r\n if (!(listenerError instanceof TaskAbortError)) {\r\n safelyNotifyError(onError, listenerError, {\r\n raisedBy: 'effect',\r\n })\r\n }\r\n } finally {\r\n abortControllerWithReason(internalTaskController, listenerCompleted) // Notify that the task has completed\r\n entry.pending.delete(internalTaskController)\r\n }\r\n }\r\n\r\n const clearListenerMiddleware = createClearListenerMiddleware(listenerMap)\r\n\r\n const middleware: ListenerMiddleware =\r\n (api) => (next) => (action) => {\r\n if (addListener.match(action)) {\r\n return startListening(action.payload)\r\n }\r\n\r\n if (clearAllListeners.match(action)) {\r\n clearListenerMiddleware()\r\n return\r\n }\r\n\r\n if (removeListener.match(action)) {\r\n return stopListening(action.payload)\r\n }\r\n\r\n // Need to get this state _before_ the reducer processes the action\r\n let originalState: S | typeof INTERNAL_NIL_TOKEN = api.getState()\r\n\r\n // `getOriginalState` can only be called synchronously.\r\n // @see https://github.com/reduxjs/redux-toolkit/discussions/1648#discussioncomment-1932820\r\n const getOriginalState = (): S => {\r\n if (originalState === INTERNAL_NIL_TOKEN) {\r\n throw new Error(\r\n `${alm}: getOriginalState can only be called synchronously`\r\n )\r\n }\r\n\r\n return originalState as S\r\n }\r\n\r\n let result: unknown\r\n\r\n try {\r\n // Actually forward the action to the reducer before we handle listeners\r\n result = next(action)\r\n\r\n if (listenerMap.size > 0) {\r\n let currentState = api.getState()\r\n // Work around ESBuild+TS transpilation issue\r\n const listenerEntries = Array.from(listenerMap.values())\r\n for (let entry of listenerEntries) {\r\n let runListener = false\r\n\r\n try {\r\n runListener = entry.predicate(action, currentState, originalState)\r\n } catch (predicateError) {\r\n runListener = false\r\n\r\n safelyNotifyError(onError, predicateError, {\r\n raisedBy: 'predicate',\r\n })\r\n }\r\n\r\n if (!runListener) {\r\n continue\r\n }\r\n\r\n notifyListener(entry, action, api, getOriginalState)\r\n }\r\n }\r\n } finally {\r\n // Remove `originalState` store from this scope.\r\n originalState = INTERNAL_NIL_TOKEN\r\n }\r\n\r\n return result\r\n }\r\n\r\n return {\r\n middleware,\r\n startListening,\r\n stopListening,\r\n clearListeners: clearListenerMiddleware,\r\n } as ListenerMiddlewareInstance\r\n}\r\n","import type { AbortSignalWithReason } from './types'\r\n\r\nexport const assertFunction: (\r\n func: unknown,\r\n expected: string\r\n) => asserts func is (...args: unknown[]) => unknown = (\r\n func: unknown,\r\n expected: string\r\n) => {\r\n if (typeof func !== 'function') {\r\n throw new TypeError(`${expected} is not a function`)\r\n }\r\n}\r\n\r\nexport const noop = () => {}\r\n\r\nexport const catchRejection = (\r\n promise: Promise,\r\n onError = noop\r\n): Promise => {\r\n promise.catch(onError)\r\n\r\n return promise\r\n}\r\n\r\nexport const addAbortSignalListener = (\r\n abortSignal: AbortSignal,\r\n callback: (evt: Event) => void\r\n) => {\r\n abortSignal.addEventListener('abort', callback, { once: true })\r\n}\r\n\r\n/**\r\n * Calls `abortController.abort(reason)` and patches `signal.reason`.\r\n * if it is not supported.\r\n *\r\n * At the time of writing `signal.reason` is available in FF chrome, edge node 17 and deno.\r\n * @param abortController\r\n * @param reason\r\n * @returns\r\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/reason\r\n */\r\nexport const abortControllerWithReason = (\r\n abortController: AbortController,\r\n reason: T\r\n): void => {\r\n type Consumer = (val: T) => void\r\n\r\n const signal = abortController.signal as AbortSignalWithReason\r\n\r\n if (signal.aborted) {\r\n return\r\n }\r\n\r\n // Patch `reason` if necessary.\r\n // - We use defineProperty here because reason is a getter of `AbortSignal.__proto__`.\r\n // - We need to patch 'reason' before calling `.abort()` because listeners to the 'abort'\r\n // event are are notified immediately.\r\n if (!('reason' in signal)) {\r\n Object.defineProperty(signal, 'reason', {\r\n enumerable: true,\r\n value: reason,\r\n configurable: true,\r\n writable: true,\r\n })\r\n }\r\n\r\n ;(abortController.abort as Consumer)(reason)\r\n}\r\n","import type { StoreEnhancer } from 'redux'\r\n\r\nexport const SHOULD_AUTOBATCH = 'RTK_autoBatch'\r\n\r\nexport const prepareAutoBatched =\r\n () =>\r\n (payload: T): { payload: T; meta: unknown } => ({\r\n payload,\r\n meta: { [SHOULD_AUTOBATCH]: true },\r\n })\r\n\r\n// TODO Remove this in 2.0\r\n// Copied from https://github.com/feross/queue-microtask\r\nlet promise: Promise\r\nconst queueMicrotaskShim =\r\n typeof queueMicrotask === 'function'\r\n ? queueMicrotask.bind(typeof window !== 'undefined' ? window : global)\r\n : // reuse resolved promise, and allocate it lazily\r\n (cb: () => void) =>\r\n (promise || (promise = Promise.resolve())).then(cb).catch((err: any) =>\r\n setTimeout(() => {\r\n throw err\r\n }, 0)\r\n )\r\n\r\nexport type AutoBatchOptions =\r\n | { type: 'tick' }\r\n | { type: 'timer'; timeout: number }\r\n | { type: 'raf' }\r\n | { type: 'callback'; queueNotification: (notify: () => void) => void }\r\n\r\nconst createQueueWithTimer = (timeout: number) => {\r\n return (notify: () => void) => {\r\n setTimeout(notify, timeout)\r\n }\r\n}\r\n\r\n/**\r\n * A Redux store enhancer that watches for \"low-priority\" actions, and delays\r\n * notifying subscribers until either the queued callback executes or the\r\n * next \"standard-priority\" action is dispatched.\r\n *\r\n * This allows dispatching multiple \"low-priority\" actions in a row with only\r\n * a single subscriber notification to the UI after the sequence of actions\r\n * is finished, thus improving UI re-render performance.\r\n *\r\n * Watches for actions with the `action.meta[SHOULD_AUTOBATCH]` attribute.\r\n * This can be added to `action.meta` manually, or by using the\r\n * `prepareAutoBatched` helper.\r\n *\r\n * By default, it will queue a notification for the end of the event loop tick.\r\n * However, you can pass several other options to configure the behavior:\r\n * - `{type: 'tick'}: queues using `queueMicrotask` (default)\r\n * - `{type: 'timer, timeout: number}`: queues using `setTimeout`\r\n * - `{type: 'raf'}`: queues using `requestAnimationFrame`\r\n * - `{type: 'callback', queueNotification: (notify: () => void) => void}: lets you provide your own callback\r\n *\r\n *\r\n */\r\nexport const autoBatchEnhancer =\r\n (options: AutoBatchOptions = { type: 'raf' }): StoreEnhancer =>\r\n (next) =>\r\n (...args) => {\r\n const store = next(...args)\r\n\r\n let notifying = true\r\n let shouldNotifyAtEndOfTick = false\r\n let notificationQueued = false\r\n\r\n const listeners = new Set<() => void>()\r\n\r\n const queueCallback =\r\n options.type === 'tick'\r\n ? queueMicrotaskShim\r\n : options.type === 'raf'\r\n ? requestAnimationFrame\r\n : options.type === 'callback'\r\n ? options.queueNotification\r\n : createQueueWithTimer(options.timeout)\r\n\r\n const notifyListeners = () => {\r\n // We're running at the end of the event loop tick.\r\n // Run the real listener callbacks to actually update the UI.\r\n notificationQueued = false\r\n if (shouldNotifyAtEndOfTick) {\r\n shouldNotifyAtEndOfTick = false\r\n listeners.forEach((l) => l())\r\n }\r\n }\r\n\r\n return Object.assign({}, store, {\r\n // Override the base `store.subscribe` method to keep original listeners\r\n // from running if we're delaying notifications\r\n subscribe(listener: () => void) {\r\n // Each wrapped listener will only call the real listener if\r\n // the `notifying` flag is currently active when it's called.\r\n // This lets the base store work as normal, while the actual UI\r\n // update becomes controlled by this enhancer.\r\n const wrappedListener: typeof listener = () => notifying && listener()\r\n const unsubscribe = store.subscribe(wrappedListener)\r\n listeners.add(listener)\r\n return () => {\r\n unsubscribe()\r\n listeners.delete(listener)\r\n }\r\n },\r\n // Override the base `store.dispatch` method so that we can check actions\r\n // for the `shouldAutoBatch` flag and determine if batching is active\r\n dispatch(action: any) {\r\n try {\r\n // If the action does _not_ have the `shouldAutoBatch` flag,\r\n // we resume/continue normal notify-after-each-dispatch behavior\r\n notifying = !action?.meta?.[SHOULD_AUTOBATCH]\r\n // If a `notifyListeners` microtask was queued, you can't cancel it.\r\n // Instead, we set a flag so that it's a no-op when it does run\r\n shouldNotifyAtEndOfTick = !notifying\r\n if (shouldNotifyAtEndOfTick) {\r\n // We've seen at least 1 action with `SHOULD_AUTOBATCH`. Try to queue\r\n // a microtask to notify listeners at the end of the event loop tick.\r\n // Make sure we only enqueue this _once_ per tick.\r\n if (!notificationQueued) {\r\n notificationQueued = true\r\n queueCallback(notifyListeners)\r\n }\r\n }\r\n // Go ahead and process the action as usual, including reducers.\r\n // If normal notification behavior is enabled, the store will notify\r\n // all of its own listeners, and the wrapper callbacks above will\r\n // see `notifying` is true and pass on to the real listener callbacks.\r\n // If we're \"batching\" behavior, then the wrapped callbacks will\r\n // bail out, causing the base store notification behavior to be no-ops.\r\n return store.dispatch(action)\r\n } finally {\r\n // Assume we're back to normal behavior after each action\r\n notifying = true\r\n }\r\n },\r\n })\r\n }\r\n","import { enableES5 } from 'immer'\r\nexport * from 'redux'\r\nexport {\r\n default as createNextState,\r\n current,\r\n freeze,\r\n original,\r\n isDraft,\r\n} from 'immer'\r\nexport type { Draft } from 'immer'\r\nexport { createSelector } from 'reselect'\r\nexport type {\r\n Selector,\r\n OutputParametricSelector,\r\n OutputSelector,\r\n ParametricSelector,\r\n} from 'reselect'\r\nexport { createDraftSafeSelector } from './createDraftSafeSelector'\r\nexport type { ThunkAction, ThunkDispatch, ThunkMiddleware } from 'redux-thunk'\r\n\r\n// We deliberately enable Immer's ES5 support, on the grounds that\r\n// we assume RTK will be used with React Native and other Proxy-less\r\n// environments. In addition, that's how Immer 4 behaved, and since\r\n// we want to ship this in an RTK minor, we should keep the same behavior.\r\nenableES5()\r\n\r\nexport {\r\n // js\r\n configureStore,\r\n} from './configureStore'\r\nexport type {\r\n // types\r\n ConfigureEnhancersCallback,\r\n ConfigureStoreOptions,\r\n EnhancedStore,\r\n} from './configureStore'\r\nexport type { DevToolsEnhancerOptions } from './devtoolsExtension'\r\nexport {\r\n // js\r\n createAction,\r\n getType,\r\n} from './createAction'\r\nexport type {\r\n // types\r\n PayloadAction,\r\n PayloadActionCreator,\r\n ActionCreatorWithNonInferrablePayload,\r\n ActionCreatorWithOptionalPayload,\r\n ActionCreatorWithPayload,\r\n ActionCreatorWithoutPayload,\r\n ActionCreatorWithPreparedPayload,\r\n PrepareAction,\r\n} from './createAction'\r\nexport {\r\n // js\r\n createReducer,\r\n} from './createReducer'\r\nexport type {\r\n // types\r\n Actions,\r\n CaseReducer,\r\n CaseReducers,\r\n} from './createReducer'\r\nexport {\r\n // js\r\n createSlice,\r\n} from './createSlice'\r\n\r\nexport type {\r\n // types\r\n CreateSliceOptions,\r\n Slice,\r\n CaseReducerActions,\r\n SliceCaseReducers,\r\n ValidateSliceCaseReducers,\r\n CaseReducerWithPrepare,\r\n SliceActionCreator,\r\n} from './createSlice'\r\nexport {\r\n // js\r\n createImmutableStateInvariantMiddleware,\r\n isImmutableDefault,\r\n} from './immutableStateInvariantMiddleware'\r\nexport type {\r\n // types\r\n ImmutableStateInvariantMiddlewareOptions,\r\n} from './immutableStateInvariantMiddleware'\r\nexport {\r\n // js\r\n createSerializableStateInvariantMiddleware,\r\n findNonSerializableValue,\r\n isPlain,\r\n} from './serializableStateInvariantMiddleware'\r\nexport type {\r\n // types\r\n SerializableStateInvariantMiddlewareOptions,\r\n} from './serializableStateInvariantMiddleware'\r\nexport {\r\n // js\r\n getDefaultMiddleware,\r\n} from './getDefaultMiddleware'\r\nexport type {\r\n // types\r\n ActionReducerMapBuilder,\r\n} from './mapBuilders'\r\nexport { MiddlewareArray } from './utils'\r\n\r\nexport { createEntityAdapter } from './entities/create_adapter'\r\nexport type {\r\n Dictionary,\r\n EntityState,\r\n EntityAdapter,\r\n EntitySelectors,\r\n EntityStateAdapter,\r\n EntityId,\r\n Update,\r\n IdSelector,\r\n Comparer,\r\n} from './entities/models'\r\n\r\nexport {\r\n createAsyncThunk,\r\n unwrapResult,\r\n miniSerializeError,\r\n} from './createAsyncThunk'\r\nexport type {\r\n AsyncThunk,\r\n AsyncThunkOptions,\r\n AsyncThunkAction,\r\n AsyncThunkPayloadCreatorReturnValue,\r\n AsyncThunkPayloadCreator,\r\n SerializedError,\r\n} from './createAsyncThunk'\r\n\r\nexport {\r\n // js\r\n isAllOf,\r\n isAnyOf,\r\n isPending,\r\n isRejected,\r\n isFulfilled,\r\n isAsyncThunkAction,\r\n isRejectedWithValue,\r\n} from './matchers'\r\nexport type {\r\n // types\r\n ActionMatchingAllOf,\r\n ActionMatchingAnyOf,\r\n} from './matchers'\r\n\r\nexport { nanoid } from './nanoid'\r\n\r\nexport { default as isPlainObject } from './isPlainObject'\r\n\r\nexport type {\r\n ListenerEffect,\r\n ListenerMiddleware,\r\n ListenerEffectAPI,\r\n ListenerMiddlewareInstance,\r\n CreateListenerMiddlewareOptions,\r\n ListenerErrorHandler,\r\n TypedStartListening,\r\n TypedAddListener,\r\n TypedStopListening,\r\n TypedRemoveListener,\r\n UnsubscribeListener,\r\n UnsubscribeListenerOptions,\r\n ForkedTaskExecutor,\r\n ForkedTask,\r\n ForkedTaskAPI,\r\n AsyncTaskExecutor,\r\n SyncTaskExecutor,\r\n TaskCancelled,\r\n TaskRejected,\r\n TaskResolved,\r\n TaskResult,\r\n} from './listenerMiddleware/index'\r\nexport type { AnyListenerPredicate } from './listenerMiddleware/types'\r\n\r\nexport {\r\n createListenerMiddleware,\r\n addListener,\r\n removeListener,\r\n clearAllListeners,\r\n TaskAbortError,\r\n} from './listenerMiddleware/index'\r\n\r\nexport {\r\n SHOULD_AUTOBATCH,\r\n prepareAutoBatched,\r\n autoBatchEnhancer,\r\n AutoBatchOptions,\r\n} from './autoBatchEnhancer'\r\n","import isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _construct(t, e, r) {\n if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);\n var o = [null];\n o.push.apply(o, e);\n var p = new (t.bind.apply(t, o))();\n return r && setPrototypeOf(p, r.prototype), p;\n}\nexport { _construct as default };","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nfunction _wrapNativeSuper(t) {\n var r = \"function\" == typeof Map ? new Map() : void 0;\n return _wrapNativeSuper = function _wrapNativeSuper(t) {\n if (null === t || !isNativeFunction(t)) return t;\n if (\"function\" != typeof t) throw new TypeError(\"Super expression must either be null or a function\");\n if (void 0 !== r) {\n if (r.has(t)) return r.get(t);\n r.set(t, Wrapper);\n }\n function Wrapper() {\n return construct(t, arguments, getPrototypeOf(this).constructor);\n }\n return Wrapper.prototype = Object.create(t.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: !1,\n writable: !0,\n configurable: !0\n }\n }), setPrototypeOf(Wrapper, t);\n }, _wrapNativeSuper(t);\n}\nexport { _wrapNativeSuper as default };","function _isNativeFunction(t) {\n try {\n return -1 !== Function.toString.call(t).indexOf(\"[native code]\");\n } catch (n) {\n return \"function\" == typeof t;\n }\n}\nexport { _isNativeFunction as default };","////////////////////////////////////////////////////////////////////////////////\n//#region Types and Constants\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Actions represent the type of change to a location value.\n */\nexport enum Action {\n /**\n * A POP indicates a change to an arbitrary index in the history stack, such\n * as a back or forward navigation. It does not describe the direction of the\n * navigation, only that the current index changed.\n *\n * Note: This is the default action for newly created history objects.\n */\n Pop = \"POP\",\n\n /**\n * A PUSH indicates a new entry being added to the history stack, such as when\n * a link is clicked and a new page loads. When this happens, all subsequent\n * entries in the stack are lost.\n */\n Push = \"PUSH\",\n\n /**\n * A REPLACE indicates the entry at the current index in the history stack\n * being replaced by a new one.\n */\n Replace = \"REPLACE\",\n}\n\n/**\n * The pathname, search, and hash values of a URL.\n */\nexport interface Path {\n /**\n * A URL pathname, beginning with a /.\n */\n pathname: string;\n\n /**\n * A URL search string, beginning with a ?.\n */\n search: string;\n\n /**\n * A URL fragment identifier, beginning with a #.\n */\n hash: string;\n}\n\n/**\n * An entry in a history stack. A location contains information about the\n * URL path, as well as possibly some arbitrary state and a key.\n */\nexport interface Location extends Path {\n /**\n * A value of arbitrary data associated with this location.\n */\n state: any;\n\n /**\n * A unique string associated with this location. May be used to safely store\n * and retrieve data in some other storage API, like `localStorage`.\n *\n * Note: This value is always \"default\" on the initial location.\n */\n key: string;\n}\n\n/**\n * A change to the current location.\n */\nexport interface Update {\n /**\n * The action that triggered the change.\n */\n action: Action;\n\n /**\n * The new location.\n */\n location: Location;\n}\n\n/**\n * A function that receives notifications about location changes.\n */\nexport interface Listener {\n (update: Update): void;\n}\n\n/**\n * Describes a location that is the destination of some navigation, either via\n * `history.push` or `history.replace`. May be either a URL or the pieces of a\n * URL path.\n */\nexport type To = string | Partial;\n\n/**\n * A history is an interface to the navigation stack. The history serves as the\n * source of truth for the current location, as well as provides a set of\n * methods that may be used to change it.\n *\n * It is similar to the DOM's `window.history` object, but with a smaller, more\n * focused API.\n */\nexport interface History {\n /**\n * The last action that modified the current location. This will always be\n * Action.Pop when a history instance is first created. This value is mutable.\n */\n readonly action: Action;\n\n /**\n * The current location. This value is mutable.\n */\n readonly location: Location;\n\n /**\n * Returns a valid href for the given `to` value that may be used as\n * the value of an attribute.\n *\n * @param to - The destination URL\n */\n createHref(to: To): string;\n\n /**\n * Encode a location the same way window.history would do (no-op for memory\n * history) so we ensure our PUSH/REPLAC e navigations for data routers\n * behave the same as POP\n *\n * @param location The incoming location from router.navigate()\n */\n encodeLocation(location: Location): Location;\n\n /**\n * Pushes a new location onto the history stack, increasing its length by one.\n * If there were any entries in the stack after the current one, they are\n * lost.\n *\n * @param to - The new URL\n * @param state - Data to associate with the new location\n */\n push(to: To, state?: any): void;\n\n /**\n * Replaces the current location in the history stack with a new one. The\n * location that was replaced will no longer be available.\n *\n * @param to - The new URL\n * @param state - Data to associate with the new location\n */\n replace(to: To, state?: any): void;\n\n /**\n * Navigates `n` entries backward/forward in the history stack relative to the\n * current index. For example, a \"back\" navigation would use go(-1).\n *\n * @param delta - The delta in the stack index\n */\n go(delta: number): void;\n\n /**\n * Sets up a listener that will be called whenever the current location\n * changes.\n *\n * @param listener - A function that will be called when the location changes\n * @returns unlisten - A function that may be used to stop listening\n */\n listen(listener: Listener): () => void;\n}\n\ntype HistoryState = {\n usr: any;\n key?: string;\n};\n\nconst PopStateEventType = \"popstate\";\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Memory History\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * A user-supplied object that describes a location. Used when providing\n * entries to `createMemoryHistory` via its `initialEntries` option.\n */\nexport type InitialEntry = string | Partial;\n\nexport type MemoryHistoryOptions = {\n initialEntries?: InitialEntry[];\n initialIndex?: number;\n v5Compat?: boolean;\n};\n\n/**\n * A memory history stores locations in memory. This is useful in stateful\n * environments where there is no web browser, such as node tests or React\n * Native.\n */\nexport interface MemoryHistory extends History {\n /**\n * The current index in the history stack.\n */\n readonly index: number;\n}\n\n/**\n * Memory history stores the current location in memory. It is designed for use\n * in stateful non-browser environments like tests and React Native.\n */\nexport function createMemoryHistory(\n options: MemoryHistoryOptions = {}\n): MemoryHistory {\n let { initialEntries = [\"/\"], initialIndex, v5Compat = false } = options;\n let entries: Location[]; // Declare so we can access from createMemoryLocation\n entries = initialEntries.map((entry, index) =>\n createMemoryLocation(\n entry,\n typeof entry === \"string\" ? null : entry.state,\n index === 0 ? \"default\" : undefined\n )\n );\n let index = clampIndex(\n initialIndex == null ? entries.length - 1 : initialIndex\n );\n let action = Action.Pop;\n let listener: Listener | null = null;\n\n function clampIndex(n: number): number {\n return Math.min(Math.max(n, 0), entries.length - 1);\n }\n function getCurrentLocation(): Location {\n return entries[index];\n }\n function createMemoryLocation(\n to: To,\n state: any = null,\n key?: string\n ): Location {\n let location = createLocation(\n entries ? getCurrentLocation().pathname : \"/\",\n to,\n state,\n key\n );\n warning(\n location.pathname.charAt(0) === \"/\",\n `relative pathnames are not supported in memory history: ${JSON.stringify(\n to\n )}`\n );\n return location;\n }\n\n let history: MemoryHistory = {\n get index() {\n return index;\n },\n get action() {\n return action;\n },\n get location() {\n return getCurrentLocation();\n },\n createHref(to) {\n return typeof to === \"string\" ? to : createPath(to);\n },\n encodeLocation(location) {\n return location;\n },\n push(to, state) {\n action = Action.Push;\n let nextLocation = createMemoryLocation(to, state);\n index += 1;\n entries.splice(index, entries.length, nextLocation);\n if (v5Compat && listener) {\n listener({ action, location: nextLocation });\n }\n },\n replace(to, state) {\n action = Action.Replace;\n let nextLocation = createMemoryLocation(to, state);\n entries[index] = nextLocation;\n if (v5Compat && listener) {\n listener({ action, location: nextLocation });\n }\n },\n go(delta) {\n action = Action.Pop;\n index = clampIndex(index + delta);\n if (listener) {\n listener({ action, location: getCurrentLocation() });\n }\n },\n listen(fn: Listener) {\n listener = fn;\n return () => {\n listener = null;\n };\n },\n };\n\n return history;\n}\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Browser History\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * A browser history stores the current location in regular URLs in a web\n * browser environment. This is the standard for most web apps and provides the\n * cleanest URLs the browser's address bar.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#browserhistory\n */\nexport interface BrowserHistory extends UrlHistory {}\n\nexport type BrowserHistoryOptions = UrlHistoryOptions;\n\n/**\n * Browser history stores the location in regular URLs. This is the standard for\n * most web apps, but it requires some configuration on the server to ensure you\n * serve the same app at multiple URLs.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory\n */\nexport function createBrowserHistory(\n options: BrowserHistoryOptions = {}\n): BrowserHistory {\n function createBrowserLocation(\n window: Window,\n globalHistory: Window[\"history\"]\n ) {\n let { pathname, search, hash } = window.location;\n return createLocation(\n \"\",\n { pathname, search, hash },\n // state defaults to `null` because `window.history.state` does\n (globalHistory.state && globalHistory.state.usr) || null,\n (globalHistory.state && globalHistory.state.key) || \"default\"\n );\n }\n\n function createBrowserHref(window: Window, to: To) {\n return typeof to === \"string\" ? to : createPath(to);\n }\n\n return getUrlBasedHistory(\n createBrowserLocation,\n createBrowserHref,\n null,\n options\n );\n}\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Hash History\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * A hash history stores the current location in the fragment identifier portion\n * of the URL in a web browser environment.\n *\n * This is ideal for apps that do not control the server for some reason\n * (because the fragment identifier is never sent to the server), including some\n * shared hosting environments that do not provide fine-grained controls over\n * which pages are served at which URLs.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#hashhistory\n */\nexport interface HashHistory extends UrlHistory {}\n\nexport type HashHistoryOptions = UrlHistoryOptions;\n\n/**\n * Hash history stores the location in window.location.hash. This makes it ideal\n * for situations where you don't want to send the location to the server for\n * some reason, either because you do cannot configure it or the URL space is\n * reserved for something else.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory\n */\nexport function createHashHistory(\n options: HashHistoryOptions = {}\n): HashHistory {\n function createHashLocation(\n window: Window,\n globalHistory: Window[\"history\"]\n ) {\n let {\n pathname = \"/\",\n search = \"\",\n hash = \"\",\n } = parsePath(window.location.hash.substr(1));\n return createLocation(\n \"\",\n { pathname, search, hash },\n // state defaults to `null` because `window.history.state` does\n (globalHistory.state && globalHistory.state.usr) || null,\n (globalHistory.state && globalHistory.state.key) || \"default\"\n );\n }\n\n function createHashHref(window: Window, to: To) {\n let base = window.document.querySelector(\"base\");\n let href = \"\";\n\n if (base && base.getAttribute(\"href\")) {\n let url = window.location.href;\n let hashIndex = url.indexOf(\"#\");\n href = hashIndex === -1 ? url : url.slice(0, hashIndex);\n }\n\n return href + \"#\" + (typeof to === \"string\" ? to : createPath(to));\n }\n\n function validateHashLocation(location: Location, to: To) {\n warning(\n location.pathname.charAt(0) === \"/\",\n `relative pathnames are not supported in hash history.push(${JSON.stringify(\n to\n )})`\n );\n }\n\n return getUrlBasedHistory(\n createHashLocation,\n createHashHref,\n validateHashLocation,\n options\n );\n}\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region UTILS\n////////////////////////////////////////////////////////////////////////////////\n\nfunction warning(cond: any, message: string) {\n if (!cond) {\n // eslint-disable-next-line no-console\n if (typeof console !== \"undefined\") console.warn(message);\n\n try {\n // Welcome to debugging history!\n //\n // This error is thrown as a convenience so you can more easily\n // find the source for a warning that appears in the console by\n // enabling \"pause on exceptions\" in your JavaScript debugger.\n throw new Error(message);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n}\n\nfunction createKey() {\n return Math.random().toString(36).substr(2, 8);\n}\n\n/**\n * For browser-based histories, we combine the state and key into an object\n */\nfunction getHistoryState(location: Location): HistoryState {\n return {\n usr: location.state,\n key: location.key,\n };\n}\n\n/**\n * Creates a Location object with a unique key from the given Path\n */\nexport function createLocation(\n current: string | Location,\n to: To,\n state: any = null,\n key?: string\n): Readonly {\n let location: Readonly = {\n pathname: typeof current === \"string\" ? current : current.pathname,\n search: \"\",\n hash: \"\",\n ...(typeof to === \"string\" ? parsePath(to) : to),\n state,\n // TODO: This could be cleaned up. push/replace should probably just take\n // full Locations now and avoid the need to run through this flow at all\n // But that's a pretty big refactor to the current test suite so going to\n // keep as is for the time being and just let any incoming keys take precedence\n key: (to && (to as Location).key) || key || createKey(),\n };\n return location;\n}\n\n/**\n * Creates a string URL path from the given pathname, search, and hash components.\n */\nexport function createPath({\n pathname = \"/\",\n search = \"\",\n hash = \"\",\n}: Partial) {\n if (search && search !== \"?\")\n pathname += search.charAt(0) === \"?\" ? search : \"?\" + search;\n if (hash && hash !== \"#\")\n pathname += hash.charAt(0) === \"#\" ? hash : \"#\" + hash;\n return pathname;\n}\n\n/**\n * Parses a string URL path into its separate pathname, search, and hash components.\n */\nexport function parsePath(path: string): Partial {\n let parsedPath: Partial = {};\n\n if (path) {\n let hashIndex = path.indexOf(\"#\");\n if (hashIndex >= 0) {\n parsedPath.hash = path.substr(hashIndex);\n path = path.substr(0, hashIndex);\n }\n\n let searchIndex = path.indexOf(\"?\");\n if (searchIndex >= 0) {\n parsedPath.search = path.substr(searchIndex);\n path = path.substr(0, searchIndex);\n }\n\n if (path) {\n parsedPath.pathname = path;\n }\n }\n\n return parsedPath;\n}\n\nexport function createURL(location: Location | string): URL {\n // window.location.origin is \"null\" (the literal string value) in Firefox\n // under certain conditions, notably when serving from a local HTML file\n // See https://bugzilla.mozilla.org/show_bug.cgi?id=878297\n let base =\n typeof window !== \"undefined\" &&\n typeof window.location !== \"undefined\" &&\n window.location.origin !== \"null\"\n ? window.location.origin\n : \"unknown://unknown\";\n let href = typeof location === \"string\" ? location : createPath(location);\n return new URL(href, base);\n}\n\nexport interface UrlHistory extends History {}\n\nexport type UrlHistoryOptions = {\n window?: Window;\n v5Compat?: boolean;\n};\n\nfunction getUrlBasedHistory(\n getLocation: (window: Window, globalHistory: Window[\"history\"]) => Location,\n createHref: (window: Window, to: To) => string,\n validateLocation: ((location: Location, to: To) => void) | null,\n options: UrlHistoryOptions = {}\n): UrlHistory {\n let { window = document.defaultView!, v5Compat = false } = options;\n let globalHistory = window.history;\n let action = Action.Pop;\n let listener: Listener | null = null;\n\n function handlePop() {\n action = Action.Pop;\n if (listener) {\n listener({ action, location: history.location });\n }\n }\n\n function push(to: To, state?: any) {\n action = Action.Push;\n let location = createLocation(history.location, to, state);\n if (validateLocation) validateLocation(location, to);\n\n let historyState = getHistoryState(location);\n let url = history.createHref(location);\n\n // try...catch because iOS limits us to 100 pushState calls :/\n try {\n globalHistory.pushState(historyState, \"\", url);\n } catch (error) {\n // They are going to lose state here, but there is no real\n // way to warn them about it since the page will refresh...\n window.location.assign(url);\n }\n\n if (v5Compat && listener) {\n listener({ action, location: history.location });\n }\n }\n\n function replace(to: To, state?: any) {\n action = Action.Replace;\n let location = createLocation(history.location, to, state);\n if (validateLocation) validateLocation(location, to);\n\n let historyState = getHistoryState(location);\n let url = history.createHref(location);\n globalHistory.replaceState(historyState, \"\", url);\n\n if (v5Compat && listener) {\n listener({ action, location: history.location });\n }\n }\n\n let history: History = {\n get action() {\n return action;\n },\n get location() {\n return getLocation(window, globalHistory);\n },\n listen(fn: Listener) {\n if (listener) {\n throw new Error(\"A history only accepts one active listener\");\n }\n window.addEventListener(PopStateEventType, handlePop);\n listener = fn;\n\n return () => {\n window.removeEventListener(PopStateEventType, handlePop);\n listener = null;\n };\n },\n createHref(to) {\n return createHref(window, to);\n },\n encodeLocation(location) {\n // Encode a Location the same way window.location would\n let url = createURL(createPath(location));\n return {\n ...location,\n pathname: url.pathname,\n search: url.search,\n hash: url.hash,\n };\n },\n push,\n replace,\n go(n) {\n return globalHistory.go(n);\n },\n };\n\n return history;\n}\n\n//#endregion\n","import type { Location, Path, To } from \"./history\";\nimport { parsePath } from \"./history\";\n\n/**\n * Map of routeId -> data returned from a loader/action/error\n */\nexport interface RouteData {\n [routeId: string]: any;\n}\n\nexport enum ResultType {\n data = \"data\",\n deferred = \"deferred\",\n redirect = \"redirect\",\n error = \"error\",\n}\n\n/**\n * Successful result from a loader or action\n */\nexport interface SuccessResult {\n type: ResultType.data;\n data: any;\n statusCode?: number;\n headers?: Headers;\n}\n\n/**\n * Successful defer() result from a loader or action\n */\nexport interface DeferredResult {\n type: ResultType.deferred;\n deferredData: DeferredData;\n}\n\n/**\n * Redirect result from a loader or action\n */\nexport interface RedirectResult {\n type: ResultType.redirect;\n status: number;\n location: string;\n revalidate: boolean;\n}\n\n/**\n * Unsuccessful result from a loader or action\n */\nexport interface ErrorResult {\n type: ResultType.error;\n error: any;\n headers?: Headers;\n}\n\n/**\n * Result from a loader or action - potentially successful or unsuccessful\n */\nexport type DataResult =\n | SuccessResult\n | DeferredResult\n | RedirectResult\n | ErrorResult;\n\nexport type FormMethod = \"get\" | \"post\" | \"put\" | \"patch\" | \"delete\";\nexport type FormEncType =\n | \"application/x-www-form-urlencoded\"\n | \"multipart/form-data\";\n\n/**\n * @private\n * Internal interface to pass around for action submissions, not intended for\n * external consumption\n */\nexport interface Submission {\n formMethod: Exclude;\n formAction: string;\n formEncType: FormEncType;\n formData: FormData;\n}\n\n/**\n * @private\n * Arguments passed to route loader/action functions. Same for now but we keep\n * this as a private implementation detail in case they diverge in the future.\n */\ninterface DataFunctionArgs {\n request: Request;\n params: Params;\n}\n\n/**\n * Arguments passed to loader functions\n */\nexport interface LoaderFunctionArgs extends DataFunctionArgs {}\n\n/**\n * Arguments passed to action functions\n */\nexport interface ActionFunctionArgs extends DataFunctionArgs {}\n\n/**\n * Route loader function signature\n */\nexport interface LoaderFunction {\n (args: LoaderFunctionArgs): Promise | Response | Promise | any;\n}\n\n/**\n * Route action function signature\n */\nexport interface ActionFunction {\n (args: ActionFunctionArgs): Promise | Response | Promise | any;\n}\n\n/**\n * Route shouldRevalidate function signature. This runs after any submission\n * (navigation or fetcher), so we flatten the navigation/fetcher submission\n * onto the arguments. It shouldn't matter whether it came from a navigation\n * or a fetcher, what really matters is the URLs and the formData since loaders\n * have to re-run based on the data models that were potentially mutated.\n */\nexport interface ShouldRevalidateFunction {\n (args: {\n currentUrl: URL;\n currentParams: AgnosticDataRouteMatch[\"params\"];\n nextUrl: URL;\n nextParams: AgnosticDataRouteMatch[\"params\"];\n formMethod?: Submission[\"formMethod\"];\n formAction?: Submission[\"formAction\"];\n formEncType?: Submission[\"formEncType\"];\n formData?: Submission[\"formData\"];\n actionResult?: DataResult;\n defaultShouldRevalidate: boolean;\n }): boolean;\n}\n\n/**\n * Base RouteObject with common props shared by all types of routes\n */\ntype AgnosticBaseRouteObject = {\n caseSensitive?: boolean;\n path?: string;\n id?: string;\n loader?: LoaderFunction;\n action?: ActionFunction;\n hasErrorBoundary?: boolean;\n shouldRevalidate?: ShouldRevalidateFunction;\n handle?: any;\n};\n\n/**\n * Index routes must not have children\n */\nexport type AgnosticIndexRouteObject = AgnosticBaseRouteObject & {\n children?: undefined;\n index: true;\n};\n\n/**\n * Non-index routes may have children, but cannot have index\n */\nexport type AgnosticNonIndexRouteObject = AgnosticBaseRouteObject & {\n children?: AgnosticRouteObject[];\n index?: false;\n};\n\n/**\n * A route object represents a logical route, with (optionally) its child\n * routes organized in a tree-like structure.\n */\nexport type AgnosticRouteObject =\n | AgnosticIndexRouteObject\n | AgnosticNonIndexRouteObject;\n\nexport type AgnosticDataIndexRouteObject = AgnosticIndexRouteObject & {\n id: string;\n};\n\nexport type AgnosticDataNonIndexRouteObject = AgnosticNonIndexRouteObject & {\n children?: AgnosticDataRouteObject[];\n id: string;\n};\n\n/**\n * A data route object, which is just a RouteObject with a required unique ID\n */\nexport type AgnosticDataRouteObject =\n | AgnosticDataIndexRouteObject\n | AgnosticDataNonIndexRouteObject;\n\n// Recursive helper for finding path parameters in the absence of wildcards\ntype _PathParam =\n // split path into individual path segments\n Path extends `${infer L}/${infer R}`\n ? _PathParam | _PathParam\n : // find params after `:`\n Path extends `${string}:${infer Param}`\n ? Param\n : // otherwise, there aren't any params present\n never;\n\n/**\n * Examples:\n * \"/a/b/*\" -> \"*\"\n * \":a\" -> \"a\"\n * \"/a/:b\" -> \"b\"\n * \"/a/blahblahblah:b\" -> \"b\"\n * \"/:a/:b\" -> \"a\" | \"b\"\n * \"/:a/b/:c/*\" -> \"a\" | \"c\" | \"*\"\n */\ntype PathParam =\n // check if path is just a wildcard\n Path extends \"*\"\n ? \"*\"\n : // look for wildcard at the end of the path\n Path extends `${infer Rest}/*`\n ? \"*\" | _PathParam\n : // look for params in the absence of wildcards\n _PathParam;\n\n// Attempt to parse the given string segment. If it fails, then just return the\n// plain string type as a default fallback. Otherwise return the union of the\n// parsed string literals that were referenced as dynamic segments in the route.\nexport type ParamParseKey =\n // if could not find path params, fallback to `string`\n [PathParam] extends [never] ? string : PathParam;\n\n/**\n * The parameters that were parsed from the URL path.\n */\nexport type Params = {\n readonly [key in Key]: string | undefined;\n};\n\n/**\n * A RouteMatch contains info about how a route matched a URL.\n */\nexport interface AgnosticRouteMatch<\n ParamKey extends string = string,\n RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject\n> {\n /**\n * The names and values of dynamic parameters in the URL.\n */\n params: Params;\n /**\n * The portion of the URL pathname that was matched.\n */\n pathname: string;\n /**\n * The portion of the URL pathname that was matched before child routes.\n */\n pathnameBase: string;\n /**\n * The route object that was used to match.\n */\n route: RouteObjectType;\n}\n\nexport interface AgnosticDataRouteMatch\n extends AgnosticRouteMatch {}\n\nfunction isIndexRoute(\n route: AgnosticRouteObject\n): route is AgnosticIndexRouteObject {\n return route.index === true;\n}\n\n// Walk the route tree generating unique IDs where necessary so we are working\n// solely with AgnosticDataRouteObject's within the Router\nexport function convertRoutesToDataRoutes(\n routes: AgnosticRouteObject[],\n parentPath: number[] = [],\n allIds: Set = new Set()\n): AgnosticDataRouteObject[] {\n return routes.map((route, index) => {\n let treePath = [...parentPath, index];\n let id = typeof route.id === \"string\" ? route.id : treePath.join(\"-\");\n invariant(\n route.index !== true || !route.children,\n `Cannot specify children on an index route`\n );\n invariant(\n !allIds.has(id),\n `Found a route id collision on id \"${id}\". Route ` +\n \"id's must be globally unique within Data Router usages\"\n );\n allIds.add(id);\n\n if (isIndexRoute(route)) {\n let indexRoute: AgnosticDataIndexRouteObject = { ...route, id };\n return indexRoute;\n } else {\n let pathOrLayoutRoute: AgnosticDataNonIndexRouteObject = {\n ...route,\n id,\n children: route.children\n ? convertRoutesToDataRoutes(route.children, treePath, allIds)\n : undefined,\n };\n return pathOrLayoutRoute;\n }\n });\n}\n\n/**\n * Matches the given routes to a location and returns the match data.\n *\n * @see https://reactrouter.com/docs/en/v6/utils/match-routes\n */\nexport function matchRoutes<\n RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject\n>(\n routes: RouteObjectType[],\n locationArg: Partial | string,\n basename = \"/\"\n): AgnosticRouteMatch[] | null {\n let location =\n typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg;\n\n let pathname = stripBasename(location.pathname || \"/\", basename);\n\n if (pathname == null) {\n return null;\n }\n\n let branches = flattenRoutes(routes);\n rankRouteBranches(branches);\n\n let matches = null;\n for (let i = 0; matches == null && i < branches.length; ++i) {\n matches = matchRouteBranch(\n branches[i],\n // Incoming pathnames are generally encoded from either window.location\n // or from router.navigate, but we want to match against the unencoded\n // paths in the route definitions. Memory router locations won't be\n // encoded here but there also shouldn't be anything to decode so this\n // should be a safe operation. This avoids needing matchRoutes to be\n // history-aware.\n safelyDecodeURI(pathname)\n );\n }\n\n return matches;\n}\n\ninterface RouteMeta<\n RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject\n> {\n relativePath: string;\n caseSensitive: boolean;\n childrenIndex: number;\n route: RouteObjectType;\n}\n\ninterface RouteBranch<\n RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject\n> {\n path: string;\n score: number;\n routesMeta: RouteMeta[];\n}\n\nfunction flattenRoutes<\n RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject\n>(\n routes: RouteObjectType[],\n branches: RouteBranch[] = [],\n parentsMeta: RouteMeta[] = [],\n parentPath = \"\"\n): RouteBranch[] {\n routes.forEach((route, index) => {\n let meta: RouteMeta = {\n relativePath: route.path || \"\",\n caseSensitive: route.caseSensitive === true,\n childrenIndex: index,\n route,\n };\n\n if (meta.relativePath.startsWith(\"/\")) {\n invariant(\n meta.relativePath.startsWith(parentPath),\n `Absolute route path \"${meta.relativePath}\" nested under path ` +\n `\"${parentPath}\" is not valid. An absolute child route path ` +\n `must start with the combined path of all its parent routes.`\n );\n\n meta.relativePath = meta.relativePath.slice(parentPath.length);\n }\n\n let path = joinPaths([parentPath, meta.relativePath]);\n let routesMeta = parentsMeta.concat(meta);\n\n // Add the children before adding this route to the array so we traverse the\n // route tree depth-first and child routes appear before their parents in\n // the \"flattened\" version.\n if (route.children && route.children.length > 0) {\n invariant(\n // Our types know better, but runtime JS may not!\n // @ts-expect-error\n route.index !== true,\n `Index routes must not have child routes. Please remove ` +\n `all child routes from route path \"${path}\".`\n );\n\n flattenRoutes(route.children, branches, routesMeta, path);\n }\n\n // Routes without a path shouldn't ever match by themselves unless they are\n // index routes, so don't add them to the list of possible branches.\n if (route.path == null && !route.index) {\n return;\n }\n\n branches.push({ path, score: computeScore(path, route.index), routesMeta });\n });\n\n return branches;\n}\n\nfunction rankRouteBranches(branches: RouteBranch[]): void {\n branches.sort((a, b) =>\n a.score !== b.score\n ? b.score - a.score // Higher score first\n : compareIndexes(\n a.routesMeta.map((meta) => meta.childrenIndex),\n b.routesMeta.map((meta) => meta.childrenIndex)\n )\n );\n}\n\nconst paramRe = /^:\\w+$/;\nconst dynamicSegmentValue = 3;\nconst indexRouteValue = 2;\nconst emptySegmentValue = 1;\nconst staticSegmentValue = 10;\nconst splatPenalty = -2;\nconst isSplat = (s: string) => s === \"*\";\n\nfunction computeScore(path: string, index: boolean | undefined): number {\n let segments = path.split(\"/\");\n let initialScore = segments.length;\n if (segments.some(isSplat)) {\n initialScore += splatPenalty;\n }\n\n if (index) {\n initialScore += indexRouteValue;\n }\n\n return segments\n .filter((s) => !isSplat(s))\n .reduce(\n (score, segment) =>\n score +\n (paramRe.test(segment)\n ? dynamicSegmentValue\n : segment === \"\"\n ? emptySegmentValue\n : staticSegmentValue),\n initialScore\n );\n}\n\nfunction compareIndexes(a: number[], b: number[]): number {\n let siblings =\n a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]);\n\n return siblings\n ? // If two routes are siblings, we should try to match the earlier sibling\n // first. This allows people to have fine-grained control over the matching\n // behavior by simply putting routes with identical paths in the order they\n // want them tried.\n a[a.length - 1] - b[b.length - 1]\n : // Otherwise, it doesn't really make sense to rank non-siblings by index,\n // so they sort equally.\n 0;\n}\n\nfunction matchRouteBranch<\n ParamKey extends string = string,\n RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject\n>(\n branch: RouteBranch,\n pathname: string\n): AgnosticRouteMatch[] | null {\n let { routesMeta } = branch;\n\n let matchedParams = {};\n let matchedPathname = \"/\";\n let matches: AgnosticRouteMatch[] = [];\n for (let i = 0; i < routesMeta.length; ++i) {\n let meta = routesMeta[i];\n let end = i === routesMeta.length - 1;\n let remainingPathname =\n matchedPathname === \"/\"\n ? pathname\n : pathname.slice(matchedPathname.length) || \"/\";\n let match = matchPath(\n { path: meta.relativePath, caseSensitive: meta.caseSensitive, end },\n remainingPathname\n );\n\n if (!match) return null;\n\n Object.assign(matchedParams, match.params);\n\n let route = meta.route;\n\n matches.push({\n // TODO: Can this as be avoided?\n params: matchedParams as Params,\n pathname: joinPaths([matchedPathname, match.pathname]),\n pathnameBase: normalizePathname(\n joinPaths([matchedPathname, match.pathnameBase])\n ),\n route,\n });\n\n if (match.pathnameBase !== \"/\") {\n matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);\n }\n }\n\n return matches;\n}\n\n/**\n * Returns a path with params interpolated.\n *\n * @see https://reactrouter.com/docs/en/v6/utils/generate-path\n */\nexport function generatePath(\n path: Path,\n params: {\n [key in PathParam]: string;\n } = {} as any\n): string {\n return path\n .replace(/:(\\w+)/g, (_, key: PathParam) => {\n invariant(params[key] != null, `Missing \":${key}\" param`);\n return params[key]!;\n })\n .replace(/(\\/?)\\*/, (_, prefix, __, str) => {\n const star = \"*\" as PathParam;\n\n if (params[star] == null) {\n // If no splat was provided, trim the trailing slash _unless_ it's\n // the entire path\n return str === \"/*\" ? \"/\" : \"\";\n }\n\n // Apply the splat\n return `${prefix}${params[star]}`;\n });\n}\n\n/**\n * A PathPattern is used to match on some portion of a URL pathname.\n */\nexport interface PathPattern {\n /**\n * A string to match against a URL pathname. May contain `:id`-style segments\n * to indicate placeholders for dynamic parameters. May also end with `/*` to\n * indicate matching the rest of the URL pathname.\n */\n path: Path;\n /**\n * Should be `true` if the static portions of the `path` should be matched in\n * the same case.\n */\n caseSensitive?: boolean;\n /**\n * Should be `true` if this pattern should match the entire URL pathname.\n */\n end?: boolean;\n}\n\n/**\n * A PathMatch contains info about how a PathPattern matched on a URL pathname.\n */\nexport interface PathMatch {\n /**\n * The names and values of dynamic parameters in the URL.\n */\n params: Params;\n /**\n * The portion of the URL pathname that was matched.\n */\n pathname: string;\n /**\n * The portion of the URL pathname that was matched before child routes.\n */\n pathnameBase: string;\n /**\n * The pattern that was used to match.\n */\n pattern: PathPattern;\n}\n\ntype Mutable = {\n -readonly [P in keyof T]: T[P];\n};\n\n/**\n * Performs pattern matching on a URL pathname and returns information about\n * the match.\n *\n * @see https://reactrouter.com/docs/en/v6/utils/match-path\n */\nexport function matchPath<\n ParamKey extends ParamParseKey,\n Path extends string\n>(\n pattern: PathPattern | Path,\n pathname: string\n): PathMatch | null {\n if (typeof pattern === \"string\") {\n pattern = { path: pattern, caseSensitive: false, end: true };\n }\n\n let [matcher, paramNames] = compilePath(\n pattern.path,\n pattern.caseSensitive,\n pattern.end\n );\n\n let match = pathname.match(matcher);\n if (!match) return null;\n\n let matchedPathname = match[0];\n let pathnameBase = matchedPathname.replace(/(.)\\/+$/, \"$1\");\n let captureGroups = match.slice(1);\n let params: Params = paramNames.reduce>(\n (memo, paramName, index) => {\n // We need to compute the pathnameBase here using the raw splat value\n // instead of using params[\"*\"] later because it will be decoded then\n if (paramName === \"*\") {\n let splatValue = captureGroups[index] || \"\";\n pathnameBase = matchedPathname\n .slice(0, matchedPathname.length - splatValue.length)\n .replace(/(.)\\/+$/, \"$1\");\n }\n\n memo[paramName] = safelyDecodeURIComponent(\n captureGroups[index] || \"\",\n paramName\n );\n return memo;\n },\n {}\n );\n\n return {\n params,\n pathname: matchedPathname,\n pathnameBase,\n pattern,\n };\n}\n\nfunction compilePath(\n path: string,\n caseSensitive = false,\n end = true\n): [RegExp, string[]] {\n warning(\n path === \"*\" || !path.endsWith(\"*\") || path.endsWith(\"/*\"),\n `Route path \"${path}\" will be treated as if it were ` +\n `\"${path.replace(/\\*$/, \"/*\")}\" because the \\`*\\` character must ` +\n `always follow a \\`/\\` in the pattern. To get rid of this warning, ` +\n `please change the route path to \"${path.replace(/\\*$/, \"/*\")}\".`\n );\n\n let paramNames: string[] = [];\n let regexpSource =\n \"^\" +\n path\n .replace(/\\/*\\*?$/, \"\") // Ignore trailing / and /*, we'll handle it below\n .replace(/^\\/*/, \"/\") // Make sure it has a leading /\n .replace(/[\\\\.*+^$?{}|()[\\]]/g, \"\\\\$&\") // Escape special regex chars\n .replace(/:(\\w+)/g, (_: string, paramName: string) => {\n paramNames.push(paramName);\n return \"([^\\\\/]+)\";\n });\n\n if (path.endsWith(\"*\")) {\n paramNames.push(\"*\");\n regexpSource +=\n path === \"*\" || path === \"/*\"\n ? \"(.*)$\" // Already matched the initial /, just match the rest\n : \"(?:\\\\/(.+)|\\\\/*)$\"; // Don't include the / in params[\"*\"]\n } else if (end) {\n // When matching to the end, ignore trailing slashes\n regexpSource += \"\\\\/*$\";\n } else if (path !== \"\" && path !== \"/\") {\n // If our path is non-empty and contains anything beyond an initial slash,\n // then we have _some_ form of path in our regex so we should expect to\n // match only if we find the end of this path segment. Look for an optional\n // non-captured trailing slash (to match a portion of the URL) or the end\n // of the path (if we've matched to the end). We used to do this with a\n // word boundary but that gives false positives on routes like\n // /user-preferences since `-` counts as a word boundary.\n regexpSource += \"(?:(?=\\\\/|$))\";\n } else {\n // Nothing to match for \"\" or \"/\"\n }\n\n let matcher = new RegExp(regexpSource, caseSensitive ? undefined : \"i\");\n\n return [matcher, paramNames];\n}\n\nfunction safelyDecodeURI(value: string) {\n try {\n return decodeURI(value);\n } catch (error) {\n warning(\n false,\n `The URL path \"${value}\" could not be decoded because it is is a ` +\n `malformed URL segment. This is probably due to a bad percent ` +\n `encoding (${error}).`\n );\n\n return value;\n }\n}\n\nfunction safelyDecodeURIComponent(value: string, paramName: string) {\n try {\n return decodeURIComponent(value);\n } catch (error) {\n warning(\n false,\n `The value for the URL param \"${paramName}\" will not be decoded because` +\n ` the string \"${value}\" is a malformed URL segment. This is probably` +\n ` due to a bad percent encoding (${error}).`\n );\n\n return value;\n }\n}\n\n/**\n * @private\n */\nexport function stripBasename(\n pathname: string,\n basename: string\n): string | null {\n if (basename === \"/\") return pathname;\n\n if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {\n return null;\n }\n\n // We want to leave trailing slash behavior in the user's control, so if they\n // specify a basename with a trailing slash, we should support it\n let startIndex = basename.endsWith(\"/\")\n ? basename.length - 1\n : basename.length;\n let nextChar = pathname.charAt(startIndex);\n if (nextChar && nextChar !== \"/\") {\n // pathname does not start with basename/\n return null;\n }\n\n return pathname.slice(startIndex) || \"/\";\n}\n\n/**\n * @private\n */\nexport function invariant(value: boolean, message?: string): asserts value;\nexport function invariant(\n value: T | null | undefined,\n message?: string\n): asserts value is T;\nexport function invariant(value: any, message?: string) {\n if (value === false || value === null || typeof value === \"undefined\") {\n throw new Error(message);\n }\n}\n\n/**\n * @private\n */\nexport function warning(cond: any, message: string): void {\n if (!cond) {\n // eslint-disable-next-line no-console\n if (typeof console !== \"undefined\") console.warn(message);\n\n try {\n // Welcome to debugging React Router!\n //\n // This error is thrown as a convenience so you can more easily\n // find the source for a warning that appears in the console by\n // enabling \"pause on exceptions\" in your JavaScript debugger.\n throw new Error(message);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n}\n\n/**\n * Returns a resolved path object relative to the given pathname.\n *\n * @see https://reactrouter.com/docs/en/v6/utils/resolve-path\n */\nexport function resolvePath(to: To, fromPathname = \"/\"): Path {\n let {\n pathname: toPathname,\n search = \"\",\n hash = \"\",\n } = typeof to === \"string\" ? parsePath(to) : to;\n\n let pathname = toPathname\n ? toPathname.startsWith(\"/\")\n ? toPathname\n : resolvePathname(toPathname, fromPathname)\n : fromPathname;\n\n return {\n pathname,\n search: normalizeSearch(search),\n hash: normalizeHash(hash),\n };\n}\n\nfunction resolvePathname(relativePath: string, fromPathname: string): string {\n let segments = fromPathname.replace(/\\/+$/, \"\").split(\"/\");\n let relativeSegments = relativePath.split(\"/\");\n\n relativeSegments.forEach((segment) => {\n if (segment === \"..\") {\n // Keep the root \"\" segment so the pathname starts at /\n if (segments.length > 1) segments.pop();\n } else if (segment !== \".\") {\n segments.push(segment);\n }\n });\n\n return segments.length > 1 ? segments.join(\"/\") : \"/\";\n}\n\nfunction getInvalidPathError(\n char: string,\n field: string,\n dest: string,\n path: Partial\n) {\n return (\n `Cannot include a '${char}' character in a manually specified ` +\n `\\`to.${field}\\` field [${JSON.stringify(\n path\n )}]. Please separate it out to the ` +\n `\\`to.${dest}\\` field. Alternatively you may provide the full path as ` +\n `a string in and the router will parse it for you.`\n );\n}\n\n/**\n * @private\n *\n * When processing relative navigation we want to ignore ancestor routes that\n * do not contribute to the path, such that index/pathless layout routes don't\n * interfere.\n *\n * For example, when moving a route element into an index route and/or a\n * pathless layout route, relative link behavior contained within should stay\n * the same. Both of the following examples should link back to the root:\n *\n * \n * \n * \n *\n * \n * \n * }> // <-- Does not contribute\n * // <-- Does not contribute\n * \n * \n */\nexport function getPathContributingMatches<\n T extends AgnosticRouteMatch = AgnosticRouteMatch\n>(matches: T[]) {\n return matches.filter(\n (match, index) =>\n index === 0 || (match.route.path && match.route.path.length > 0)\n );\n}\n\n/**\n * @private\n */\nexport function resolveTo(\n toArg: To,\n routePathnames: string[],\n locationPathname: string,\n isPathRelative = false\n): Path {\n let to: Partial;\n if (typeof toArg === \"string\") {\n to = parsePath(toArg);\n } else {\n to = { ...toArg };\n\n invariant(\n !to.pathname || !to.pathname.includes(\"?\"),\n getInvalidPathError(\"?\", \"pathname\", \"search\", to)\n );\n invariant(\n !to.pathname || !to.pathname.includes(\"#\"),\n getInvalidPathError(\"#\", \"pathname\", \"hash\", to)\n );\n invariant(\n !to.search || !to.search.includes(\"#\"),\n getInvalidPathError(\"#\", \"search\", \"hash\", to)\n );\n }\n\n let isEmptyPath = toArg === \"\" || to.pathname === \"\";\n let toPathname = isEmptyPath ? \"/\" : to.pathname;\n\n let from: string;\n\n // Routing is relative to the current pathname if explicitly requested.\n //\n // If a pathname is explicitly provided in `to`, it should be relative to the\n // route context. This is explained in `Note on `` values` in our\n // migration guide from v5 as a means of disambiguation between `to` values\n // that begin with `/` and those that do not. However, this is problematic for\n // `to` values that do not provide a pathname. `to` can simply be a search or\n // hash string, in which case we should assume that the navigation is relative\n // to the current location's pathname and *not* the route pathname.\n if (isPathRelative || toPathname == null) {\n from = locationPathname;\n } else {\n let routePathnameIndex = routePathnames.length - 1;\n\n if (toPathname.startsWith(\"..\")) {\n let toSegments = toPathname.split(\"/\");\n\n // Each leading .. segment means \"go up one route\" instead of \"go up one\n // URL segment\". This is a key difference from how works and a\n // major reason we call this a \"to\" value instead of a \"href\".\n while (toSegments[0] === \"..\") {\n toSegments.shift();\n routePathnameIndex -= 1;\n }\n\n to.pathname = toSegments.join(\"/\");\n }\n\n // If there are more \"..\" segments than parent routes, resolve relative to\n // the root / URL.\n from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : \"/\";\n }\n\n let path = resolvePath(to, from);\n\n // Ensure the pathname has a trailing slash if the original \"to\" had one\n let hasExplicitTrailingSlash =\n toPathname && toPathname !== \"/\" && toPathname.endsWith(\"/\");\n // Or if this was a link to the current path which has a trailing slash\n let hasCurrentTrailingSlash =\n (isEmptyPath || toPathname === \".\") && locationPathname.endsWith(\"/\");\n if (\n !path.pathname.endsWith(\"/\") &&\n (hasExplicitTrailingSlash || hasCurrentTrailingSlash)\n ) {\n path.pathname += \"/\";\n }\n\n return path;\n}\n\n/**\n * @private\n */\nexport function getToPathname(to: To): string | undefined {\n // Empty strings should be treated the same as / paths\n return to === \"\" || (to as Path).pathname === \"\"\n ? \"/\"\n : typeof to === \"string\"\n ? parsePath(to).pathname\n : to.pathname;\n}\n\n/**\n * @private\n */\nexport const joinPaths = (paths: string[]): string =>\n paths.join(\"/\").replace(/\\/\\/+/g, \"/\");\n\n/**\n * @private\n */\nexport const normalizePathname = (pathname: string): string =>\n pathname.replace(/\\/+$/, \"\").replace(/^\\/*/, \"/\");\n\n/**\n * @private\n */\nexport const normalizeSearch = (search: string): string =>\n !search || search === \"?\"\n ? \"\"\n : search.startsWith(\"?\")\n ? search\n : \"?\" + search;\n\n/**\n * @private\n */\nexport const normalizeHash = (hash: string): string =>\n !hash || hash === \"#\" ? \"\" : hash.startsWith(\"#\") ? hash : \"#\" + hash;\n\nexport type JsonFunction = (\n data: Data,\n init?: number | ResponseInit\n) => Response;\n\n/**\n * This is a shortcut for creating `application/json` responses. Converts `data`\n * to JSON and sets the `Content-Type` header.\n */\nexport const json: JsonFunction = (data, init = {}) => {\n let responseInit = typeof init === \"number\" ? { status: init } : init;\n\n let headers = new Headers(responseInit.headers);\n if (!headers.has(\"Content-Type\")) {\n headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n }\n\n return new Response(JSON.stringify(data), {\n ...responseInit,\n headers,\n });\n};\n\nexport interface TrackedPromise extends Promise {\n _tracked?: boolean;\n _data?: any;\n _error?: any;\n}\n\nexport class AbortedDeferredError extends Error {}\n\nexport class DeferredData {\n private pendingKeys: Set = new Set();\n private controller: AbortController;\n private abortPromise: Promise;\n private unlistenAbortSignal: () => void;\n private subscriber?: (aborted: boolean) => void = undefined;\n data: Record;\n\n constructor(data: Record) {\n invariant(\n data && typeof data === \"object\" && !Array.isArray(data),\n \"defer() only accepts plain objects\"\n );\n\n // Set up an AbortController + Promise we can race against to exit early\n // cancellation\n let reject: (e: AbortedDeferredError) => void;\n this.abortPromise = new Promise((_, r) => (reject = r));\n this.controller = new AbortController();\n let onAbort = () =>\n reject(new AbortedDeferredError(\"Deferred data aborted\"));\n this.unlistenAbortSignal = () =>\n this.controller.signal.removeEventListener(\"abort\", onAbort);\n this.controller.signal.addEventListener(\"abort\", onAbort);\n\n this.data = Object.entries(data).reduce(\n (acc, [key, value]) =>\n Object.assign(acc, {\n [key]: this.trackPromise(key, value),\n }),\n {}\n );\n }\n\n private trackPromise(\n key: string | number,\n value: Promise | unknown\n ): TrackedPromise | unknown {\n if (!(value instanceof Promise)) {\n return value;\n }\n\n this.pendingKeys.add(key);\n\n // We store a little wrapper promise that will be extended with\n // _data/_error props upon resolve/reject\n let promise: TrackedPromise = Promise.race([value, this.abortPromise]).then(\n (data) => this.onSettle(promise, key, null, data as unknown),\n (error) => this.onSettle(promise, key, error as unknown)\n );\n\n // Register rejection listeners to avoid uncaught promise rejections on\n // errors or aborted deferred values\n promise.catch(() => {});\n\n Object.defineProperty(promise, \"_tracked\", { get: () => true });\n return promise;\n }\n\n private onSettle(\n promise: TrackedPromise,\n key: string | number,\n error: unknown,\n data?: unknown\n ): unknown {\n if (\n this.controller.signal.aborted &&\n error instanceof AbortedDeferredError\n ) {\n this.unlistenAbortSignal();\n Object.defineProperty(promise, \"_error\", { get: () => error });\n return Promise.reject(error);\n }\n\n this.pendingKeys.delete(key);\n\n if (this.done) {\n // Nothing left to abort!\n this.unlistenAbortSignal();\n }\n\n const subscriber = this.subscriber;\n if (error) {\n Object.defineProperty(promise, \"_error\", { get: () => error });\n subscriber && subscriber(false);\n return Promise.reject(error);\n }\n\n Object.defineProperty(promise, \"_data\", { get: () => data });\n subscriber && subscriber(false);\n return data;\n }\n\n subscribe(fn: (aborted: boolean) => void) {\n this.subscriber = fn;\n }\n\n cancel() {\n this.controller.abort();\n this.pendingKeys.forEach((v, k) => this.pendingKeys.delete(k));\n let subscriber = this.subscriber;\n subscriber && subscriber(true);\n }\n\n async resolveData(signal: AbortSignal) {\n let aborted = false;\n if (!this.done) {\n let onAbort = () => this.cancel();\n signal.addEventListener(\"abort\", onAbort);\n aborted = await new Promise((resolve) => {\n this.subscribe((aborted) => {\n signal.removeEventListener(\"abort\", onAbort);\n if (aborted || this.done) {\n resolve(aborted);\n }\n });\n });\n }\n return aborted;\n }\n\n get done() {\n return this.pendingKeys.size === 0;\n }\n\n get unwrappedData() {\n invariant(\n this.data !== null && this.done,\n \"Can only unwrap data on initialized and settled deferreds\"\n );\n\n return Object.entries(this.data).reduce(\n (acc, [key, value]) =>\n Object.assign(acc, {\n [key]: unwrapTrackedPromise(value),\n }),\n {}\n );\n }\n}\n\nfunction isTrackedPromise(value: any): value is TrackedPromise {\n return (\n value instanceof Promise && (value as TrackedPromise)._tracked === true\n );\n}\n\nfunction unwrapTrackedPromise(value: any) {\n if (!isTrackedPromise(value)) {\n return value;\n }\n\n if (value._error) {\n throw value._error;\n }\n return value._data;\n}\n\nexport function defer(data: Record) {\n return new DeferredData(data);\n}\n\nexport type RedirectFunction = (\n url: string,\n init?: number | ResponseInit\n) => Response;\n\n/**\n * A redirect response. Sets the status code and the `Location` header.\n * Defaults to \"302 Found\".\n */\nexport const redirect: RedirectFunction = (url, init = 302) => {\n let responseInit = init;\n if (typeof responseInit === \"number\") {\n responseInit = { status: responseInit };\n } else if (typeof responseInit.status === \"undefined\") {\n responseInit.status = 302;\n }\n\n let headers = new Headers(responseInit.headers);\n headers.set(\"Location\", url);\n\n return new Response(null, {\n ...responseInit,\n headers,\n });\n};\n\n/**\n * @private\n * Utility class we use to hold auto-unwrapped 4xx/5xx Response bodies\n */\nexport class ErrorResponse {\n status: number;\n statusText: string;\n data: any;\n\n constructor(status: number, statusText: string | undefined, data: any) {\n this.status = status;\n this.statusText = statusText || \"\";\n this.data = data;\n }\n}\n\n/**\n * Check if the given error is an ErrorResponse generated from a 4xx/5xx\n * Response throw from an action/loader\n */\nexport function isRouteErrorResponse(e: any): e is ErrorResponse {\n return e instanceof ErrorResponse;\n}\n","import type { History, Location, To } from \"./history\";\nimport {\n Action as HistoryAction,\n createLocation,\n createPath,\n createURL,\n parsePath,\n} from \"./history\";\nimport type {\n DataResult,\n AgnosticDataRouteMatch,\n AgnosticDataRouteObject,\n DeferredResult,\n ErrorResult,\n FormEncType,\n FormMethod,\n RedirectResult,\n RouteData,\n AgnosticRouteObject,\n Submission,\n SuccessResult,\n AgnosticRouteMatch,\n} from \"./utils\";\nimport {\n DeferredData,\n ErrorResponse,\n ResultType,\n convertRoutesToDataRoutes,\n getPathContributingMatches,\n invariant,\n isRouteErrorResponse,\n joinPaths,\n matchRoutes,\n resolveTo,\n} from \"./utils\";\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Types and Constants\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * A Router instance manages all navigation and data loading/mutations\n */\nexport interface Router {\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Return the basename for the router\n */\n get basename(): RouterInit[\"basename\"];\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Return the current state of the router\n */\n get state(): RouterState;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Return the routes for this router instance\n */\n get routes(): AgnosticDataRouteObject[];\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Initialize the router, including adding history listeners and kicking off\n * initial data fetches. Returns a function to cleanup listeners and abort\n * any in-progress loads\n */\n initialize(): Router;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Subscribe to router.state updates\n *\n * @param fn function to call with the new state\n */\n subscribe(fn: RouterSubscriber): () => void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Enable scroll restoration behavior in the router\n *\n * @param savedScrollPositions Object that will manage positions, in case\n * it's being restored from sessionStorage\n * @param getScrollPosition Function to get the active Y scroll position\n * @param getKey Function to get the key to use for restoration\n */\n enableScrollRestoration(\n savedScrollPositions: Record,\n getScrollPosition: GetScrollPositionFunction,\n getKey?: GetScrollRestorationKeyFunction\n ): () => void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Navigate forward/backward in the history stack\n * @param to Delta to move in the history stack\n */\n navigate(to: number): void;\n\n /**\n * Navigate to the given path\n * @param to Path to navigate to\n * @param opts Navigation options (method, submission, etc.)\n */\n navigate(to: To, opts?: RouterNavigateOptions): void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Trigger a fetcher load/submission\n *\n * @param key Fetcher key\n * @param routeId Route that owns the fetcher\n * @param href href to fetch\n * @param opts Fetcher options, (method, submission, etc.)\n */\n fetch(\n key: string,\n routeId: string,\n href: string,\n opts?: RouterNavigateOptions\n ): void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Trigger a revalidation of all current route loaders and fetcher loads\n */\n revalidate(): void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Utility function to create an href for the given location\n * @param location\n */\n createHref(location: Location | URL): string;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Get/create a fetcher for the given key\n * @param key\n */\n getFetcher(key?: string): Fetcher;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Delete the fetcher for a given key\n * @param key\n */\n deleteFetcher(key?: string): void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Cleanup listeners and abort any in-progress loads\n */\n dispose(): void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Internal fetch AbortControllers accessed by unit tests\n */\n _internalFetchControllers: Map;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Internal pending DeferredData instances accessed by unit tests\n */\n _internalActiveDeferreds: Map;\n}\n\n/**\n * State maintained internally by the router. During a navigation, all states\n * reflect the the \"old\" location unless otherwise noted.\n */\nexport interface RouterState {\n /**\n * The action of the most recent navigation\n */\n historyAction: HistoryAction;\n\n /**\n * The current location reflected by the router\n */\n location: Location;\n\n /**\n * The current set of route matches\n */\n matches: AgnosticDataRouteMatch[];\n\n /**\n * Tracks whether we've completed our initial data load\n */\n initialized: boolean;\n\n /**\n * Current scroll position we should start at for a new view\n * - number -> scroll position to restore to\n * - false -> do not restore scroll at all (used during submissions)\n * - null -> don't have a saved position, scroll to hash or top of page\n */\n restoreScrollPosition: number | false | null;\n\n /**\n * Indicate whether this navigation should skip resetting the scroll position\n * if we are unable to restore the scroll position\n */\n preventScrollReset: boolean;\n\n /**\n * Tracks the state of the current navigation\n */\n navigation: Navigation;\n\n /**\n * Tracks any in-progress revalidations\n */\n revalidation: RevalidationState;\n\n /**\n * Data from the loaders for the current matches\n */\n loaderData: RouteData;\n\n /**\n * Data from the action for the current matches\n */\n actionData: RouteData | null;\n\n /**\n * Errors caught from loaders for the current matches\n */\n errors: RouteData | null;\n\n /**\n * Map of current fetchers\n */\n fetchers: Map;\n}\n\n/**\n * Data that can be passed into hydrate a Router from SSR\n */\nexport type HydrationState = Partial<\n Pick\n>;\n\n/**\n * Initialization options for createRouter\n */\nexport interface RouterInit {\n basename?: string;\n routes: AgnosticRouteObject[];\n history: History;\n hydrationData?: HydrationState;\n}\n\n/**\n * State returned from a server-side query() call\n */\nexport interface StaticHandlerContext {\n location: RouterState[\"location\"];\n matches: RouterState[\"matches\"];\n loaderData: RouterState[\"loaderData\"];\n actionData: RouterState[\"actionData\"];\n errors: RouterState[\"errors\"];\n statusCode: number;\n loaderHeaders: Record;\n actionHeaders: Record;\n _deepestRenderedBoundaryId?: string | null;\n}\n\n/**\n * A StaticHandler instance manages a singular SSR navigation/fetch event\n */\nexport interface StaticHandler {\n dataRoutes: AgnosticDataRouteObject[];\n query(request: Request): Promise;\n queryRoute(request: Request, routeId?: string): Promise;\n}\n\n/**\n * Subscriber function signature for changes to router state\n */\nexport interface RouterSubscriber {\n (state: RouterState): void;\n}\n\ninterface UseMatchesMatch {\n id: string;\n pathname: string;\n params: AgnosticRouteMatch[\"params\"];\n data: unknown;\n handle: unknown;\n}\n\n/**\n * Function signature for determining the key to be used in scroll restoration\n * for a given location\n */\nexport interface GetScrollRestorationKeyFunction {\n (location: Location, matches: UseMatchesMatch[]): string | null;\n}\n\n/**\n * Function signature for determining the current scroll position\n */\nexport interface GetScrollPositionFunction {\n (): number;\n}\n\n/**\n * Options for a navigate() call for a Link navigation\n */\ntype LinkNavigateOptions = {\n replace?: boolean;\n state?: any;\n preventScrollReset?: boolean;\n};\n\n/**\n * Options for a navigate() call for a Form navigation\n */\ntype SubmissionNavigateOptions = {\n replace?: boolean;\n state?: any;\n formMethod?: FormMethod;\n formEncType?: FormEncType;\n formData: FormData;\n};\n\n/**\n * Options to pass to navigate() for either a Link or Form navigation\n */\nexport type RouterNavigateOptions =\n | LinkNavigateOptions\n | SubmissionNavigateOptions;\n\n/**\n * Options to pass to fetch()\n */\nexport type RouterFetchOptions =\n | Omit\n | Omit;\n\n/**\n * Potential states for state.navigation\n */\nexport type NavigationStates = {\n Idle: {\n state: \"idle\";\n location: undefined;\n formMethod: undefined;\n formAction: undefined;\n formEncType: undefined;\n formData: undefined;\n };\n Loading: {\n state: \"loading\";\n location: Location;\n formMethod: FormMethod | undefined;\n formAction: string | undefined;\n formEncType: FormEncType | undefined;\n formData: FormData | undefined;\n };\n Submitting: {\n state: \"submitting\";\n location: Location;\n formMethod: FormMethod;\n formAction: string;\n formEncType: FormEncType;\n formData: FormData;\n };\n};\n\nexport type Navigation = NavigationStates[keyof NavigationStates];\n\nexport type RevalidationState = \"idle\" | \"loading\";\n\n/**\n * Potential states for fetchers\n */\ntype FetcherStates = {\n Idle: {\n state: \"idle\";\n formMethod: undefined;\n formAction: undefined;\n formEncType: undefined;\n formData: undefined;\n data: TData | undefined;\n };\n Loading: {\n state: \"loading\";\n formMethod: FormMethod | undefined;\n formAction: string | undefined;\n formEncType: FormEncType | undefined;\n formData: FormData | undefined;\n data: TData | undefined;\n };\n Submitting: {\n state: \"submitting\";\n formMethod: FormMethod;\n formAction: string;\n formEncType: FormEncType;\n formData: FormData;\n data: TData | undefined;\n };\n};\n\nexport type Fetcher =\n FetcherStates[keyof FetcherStates];\n\ninterface ShortCircuitable {\n /**\n * startNavigation does not need to complete the navigation because we\n * redirected or got interrupted\n */\n shortCircuited?: boolean;\n}\n\ninterface HandleActionResult extends ShortCircuitable {\n /**\n * Error thrown from the current action, keyed by the route containing the\n * error boundary to render the error. To be committed to the state after\n * loaders have completed\n */\n pendingActionError?: RouteData;\n /**\n * Data returned from the current action, keyed by the route owning the action.\n * To be committed to the state after loaders have completed\n */\n pendingActionData?: RouteData;\n}\n\ninterface HandleLoadersResult extends ShortCircuitable {\n /**\n * loaderData returned from the current set of loaders\n */\n loaderData?: RouterState[\"loaderData\"];\n /**\n * errors thrown from the current set of loaders\n */\n errors?: RouterState[\"errors\"];\n}\n\n/**\n * Tuple of [key, href, DataRouteMatch, DataRouteMatch[]] for a revalidating\n * fetcher.load()\n */\ntype RevalidatingFetcher = [\n string,\n string,\n AgnosticDataRouteMatch,\n AgnosticDataRouteMatch[]\n];\n\n/**\n * Tuple of [href, DataRouteMatch, DataRouteMatch[]] for an active\n * fetcher.load()\n */\ntype FetchLoadMatch = [\n string,\n AgnosticDataRouteMatch,\n AgnosticDataRouteMatch[]\n];\n\n/**\n * Wrapper object to allow us to throw any response out from callLoaderOrAction\n * for queryRouter while preserving whether or not it was thrown or returned\n * from the loader/action\n */\ninterface QueryRouteResponse {\n type: ResultType.data | ResultType.error;\n response: Response;\n}\n\nexport const IDLE_NAVIGATION: NavigationStates[\"Idle\"] = {\n state: \"idle\",\n location: undefined,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n};\n\nexport const IDLE_FETCHER: FetcherStates[\"Idle\"] = {\n state: \"idle\",\n data: undefined,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n};\n\nconst isBrowser =\n typeof window !== \"undefined\" &&\n typeof window.document !== \"undefined\" &&\n typeof window.document.createElement !== \"undefined\";\nconst isServer = !isBrowser;\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region createRouter\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Create a router and listen to history POP navigations\n */\nexport function createRouter(init: RouterInit): Router {\n invariant(\n init.routes.length > 0,\n \"You must provide a non-empty routes array to createRouter\"\n );\n\n let dataRoutes = convertRoutesToDataRoutes(init.routes);\n // Cleanup function for history\n let unlistenHistory: (() => void) | null = null;\n // Externally-provided functions to call on all state changes\n let subscribers = new Set();\n // Externally-provided object to hold scroll restoration locations during routing\n let savedScrollPositions: Record | null = null;\n // Externally-provided function to get scroll restoration keys\n let getScrollRestorationKey: GetScrollRestorationKeyFunction | null = null;\n // Externally-provided function to get current scroll position\n let getScrollPosition: GetScrollPositionFunction | null = null;\n // One-time flag to control the initial hydration scroll restoration. Because\n // we don't get the saved positions from until _after_\n // the initial render, we need to manually trigger a separate updateState to\n // send along the restoreScrollPosition\n let initialScrollRestored = false;\n\n let initialMatches = matchRoutes(\n dataRoutes,\n init.history.location,\n init.basename\n );\n let initialErrors: RouteData | null = null;\n\n if (initialMatches == null) {\n // If we do not match a user-provided-route, fall back to the root\n // to allow the error boundary to take over\n let { matches, route, error } = getNotFoundMatches(dataRoutes);\n initialMatches = matches;\n initialErrors = { [route.id]: error };\n }\n\n let initialized =\n !initialMatches.some((m) => m.route.loader) || init.hydrationData != null;\n\n let router: Router;\n let state: RouterState = {\n historyAction: init.history.action,\n location: init.history.location,\n matches: initialMatches,\n initialized,\n navigation: IDLE_NAVIGATION,\n restoreScrollPosition: null,\n preventScrollReset: false,\n revalidation: \"idle\",\n loaderData: (init.hydrationData && init.hydrationData.loaderData) || {},\n actionData: (init.hydrationData && init.hydrationData.actionData) || null,\n errors: (init.hydrationData && init.hydrationData.errors) || initialErrors,\n fetchers: new Map(),\n };\n\n // -- Stateful internal variables to manage navigations --\n // Current navigation in progress (to be committed in completeNavigation)\n let pendingAction: HistoryAction = HistoryAction.Pop;\n // Should the current navigation prevent the scroll reset if scroll cannot\n // be restored?\n let pendingPreventScrollReset = false;\n // AbortController for the active navigation\n let pendingNavigationController: AbortController | null;\n // We use this to avoid touching history in completeNavigation if a\n // revalidation is entirely uninterrupted\n let isUninterruptedRevalidation = false;\n // Use this internal flag to force revalidation of all loaders:\n // - submissions (completed or interrupted)\n // - useRevalidate()\n // - X-Remix-Revalidate (from redirect)\n let isRevalidationRequired = false;\n // Use this internal array to capture routes that require revalidation due\n // to a cancelled deferred on action submission\n let cancelledDeferredRoutes: string[] = [];\n // Use this internal array to capture fetcher loads that were cancelled by an\n // action navigation and require revalidation\n let cancelledFetcherLoads: string[] = [];\n // AbortControllers for any in-flight fetchers\n let fetchControllers = new Map();\n // Track loads based on the order in which they started\n let incrementingLoadId = 0;\n // Track the outstanding pending navigation data load to be compared against\n // the globally incrementing load when a fetcher load lands after a completed\n // navigation\n let pendingNavigationLoadId = -1;\n // Fetchers that triggered data reloads as a result of their actions\n let fetchReloadIds = new Map();\n // Fetchers that triggered redirect navigations from their actions\n let fetchRedirectIds = new Set();\n // Most recent href/match for fetcher.load calls for fetchers\n let fetchLoadMatches = new Map();\n // Store DeferredData instances for active route matches. When a\n // route loader returns defer() we stick one in here. Then, when a nested\n // promise resolves we update loaderData. If a new navigation starts we\n // cancel active deferreds for eliminated routes.\n let activeDeferreds = new Map();\n\n // Initialize the router, all side effects should be kicked off from here.\n // Implemented as a Fluent API for ease of:\n // let router = createRouter(init).initialize();\n function initialize() {\n // If history informs us of a POP navigation, start the navigation but do not update\n // state. We'll update our own state once the navigation completes\n unlistenHistory = init.history.listen(\n ({ action: historyAction, location }) =>\n startNavigation(historyAction, location)\n );\n\n // Kick off initial data load if needed. Use Pop to avoid modifying history\n if (!state.initialized) {\n startNavigation(HistoryAction.Pop, state.location);\n }\n\n return router;\n }\n\n // Clean up a router and it's side effects\n function dispose() {\n if (unlistenHistory) {\n unlistenHistory();\n }\n subscribers.clear();\n pendingNavigationController && pendingNavigationController.abort();\n state.fetchers.forEach((_, key) => deleteFetcher(key));\n }\n\n // Subscribe to state updates for the router\n function subscribe(fn: RouterSubscriber) {\n subscribers.add(fn);\n return () => subscribers.delete(fn);\n }\n\n // Update our state and notify the calling context of the change\n function updateState(newState: Partial): void {\n state = {\n ...state,\n ...newState,\n };\n subscribers.forEach((subscriber) => subscriber(state));\n }\n\n // Complete a navigation returning the state.navigation back to the IDLE_NAVIGATION\n // and setting state.[historyAction/location/matches] to the new route.\n // - Location is a required param\n // - Navigation will always be set to IDLE_NAVIGATION\n // - Can pass any other state in newState\n function completeNavigation(\n location: Location,\n newState: Partial>\n ): void {\n // Deduce if we're in a loading/actionReload state:\n // - We have committed actionData in the store\n // - The current navigation was a submission\n // - We're past the submitting state and into the loading state\n // - The location we've finished loading is different from the submission\n // location, indicating we redirected from the action (avoids false\n // positives for loading/submissionRedirect when actionData returned\n // on a prior submission)\n let isActionReload =\n state.actionData != null &&\n state.navigation.formMethod != null &&\n state.navigation.state === \"loading\" &&\n state.navigation.formAction?.split(\"?\")[0] === location.pathname;\n\n // Always preserve any existing loaderData from re-used routes\n let newLoaderData = newState.loaderData\n ? {\n loaderData: mergeLoaderData(\n state.loaderData,\n newState.loaderData,\n newState.matches || []\n ),\n }\n : {};\n\n updateState({\n // Clear existing actionData on any completed navigation beyond the original\n // action, unless we're currently finishing the loading/actionReload state.\n // Do this prior to spreading in newState in case we got back to back actions\n ...(isActionReload ? {} : { actionData: null }),\n ...newState,\n ...newLoaderData,\n historyAction: pendingAction,\n location,\n initialized: true,\n navigation: IDLE_NAVIGATION,\n revalidation: \"idle\",\n // Don't restore on submission navigations\n restoreScrollPosition: state.navigation.formData\n ? false\n : getSavedScrollPosition(location, newState.matches || state.matches),\n preventScrollReset: pendingPreventScrollReset,\n });\n\n if (isUninterruptedRevalidation) {\n // If this was an uninterrupted revalidation then do not touch history\n } else if (pendingAction === HistoryAction.Pop) {\n // Do nothing for POP - URL has already been updated\n } else if (pendingAction === HistoryAction.Push) {\n init.history.push(location, location.state);\n } else if (pendingAction === HistoryAction.Replace) {\n init.history.replace(location, location.state);\n }\n\n // Reset stateful navigation vars\n pendingAction = HistoryAction.Pop;\n pendingPreventScrollReset = false;\n isUninterruptedRevalidation = false;\n isRevalidationRequired = false;\n cancelledDeferredRoutes = [];\n cancelledFetcherLoads = [];\n }\n\n // Trigger a navigation event, which can either be a numerical POP or a PUSH\n // replace with an optional submission\n async function navigate(\n to: number | To,\n opts?: RouterNavigateOptions\n ): Promise {\n if (typeof to === \"number\") {\n init.history.go(to);\n return;\n }\n\n let { path, submission, error } = normalizeNavigateOptions(to, opts);\n\n let location = createLocation(state.location, path, opts && opts.state);\n\n // When using navigate as a PUSH/REPLACE we aren't reading an already-encoded\n // URL from window.location, so we need to encode it here so the behavior\n // remains the same as POP and non-data-router usages. new URL() does all\n // the same encoding we'd get from a history.pushState/window.location read\n // without having to touch history\n location = init.history.encodeLocation(location);\n\n let historyAction =\n (opts && opts.replace) === true || submission != null\n ? HistoryAction.Replace\n : HistoryAction.Push;\n let preventScrollReset =\n opts && \"preventScrollReset\" in opts\n ? opts.preventScrollReset === true\n : undefined;\n\n return await startNavigation(historyAction, location, {\n submission,\n // Send through the formData serialization error if we have one so we can\n // render at the right error boundary after we match routes\n pendingError: error,\n preventScrollReset,\n replace: opts && opts.replace,\n });\n }\n\n // Revalidate all current loaders. If a navigation is in progress or if this\n // is interrupted by a navigation, allow this to \"succeed\" by calling all\n // loaders during the next loader round\n function revalidate() {\n interruptActiveLoads();\n updateState({ revalidation: \"loading\" });\n\n // If we're currently submitting an action, we don't need to start a new\n // navigation, we'll just let the follow up loader execution call all loaders\n if (state.navigation.state === \"submitting\") {\n return;\n }\n\n // If we're currently in an idle state, start a new navigation for the current\n // action/location and mark it as uninterrupted, which will skip the history\n // update in completeNavigation\n if (state.navigation.state === \"idle\") {\n startNavigation(state.historyAction, state.location, {\n startUninterruptedRevalidation: true,\n });\n return;\n }\n\n // Otherwise, if we're currently in a loading state, just start a new\n // navigation to the navigation.location but do not trigger an uninterrupted\n // revalidation so that history correctly updates once the navigation completes\n startNavigation(\n pendingAction || state.historyAction,\n state.navigation.location,\n { overrideNavigation: state.navigation }\n );\n }\n\n // Start a navigation to the given action/location. Can optionally provide a\n // overrideNavigation which will override the normalLoad in the case of a redirect\n // navigation\n async function startNavigation(\n historyAction: HistoryAction,\n location: Location,\n opts?: {\n submission?: Submission;\n overrideNavigation?: Navigation;\n pendingError?: ErrorResponse;\n startUninterruptedRevalidation?: boolean;\n preventScrollReset?: boolean;\n replace?: boolean;\n }\n ): Promise {\n // Abort any in-progress navigations and start a new one. Unset any ongoing\n // uninterrupted revalidations unless told otherwise, since we want this\n // new navigation to update history normally\n pendingNavigationController && pendingNavigationController.abort();\n pendingNavigationController = null;\n pendingAction = historyAction;\n isUninterruptedRevalidation =\n (opts && opts.startUninterruptedRevalidation) === true;\n\n // Save the current scroll position every time we start a new navigation,\n // and track whether we should reset scroll on completion\n saveScrollPosition(state.location, state.matches);\n pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;\n\n let loadingNavigation = opts && opts.overrideNavigation;\n let matches = matchRoutes(dataRoutes, location, init.basename);\n\n // Short circuit with a 404 on the root error boundary if we match nothing\n if (!matches) {\n let {\n matches: notFoundMatches,\n route,\n error,\n } = getNotFoundMatches(dataRoutes);\n // Cancel all pending deferred on 404s since we don't keep any routes\n cancelActiveDeferreds();\n completeNavigation(location, {\n matches: notFoundMatches,\n loaderData: {},\n errors: {\n [route.id]: error,\n },\n });\n return;\n }\n\n // Short circuit if it's only a hash change\n if (isHashChangeOnly(state.location, location)) {\n completeNavigation(location, { matches });\n return;\n }\n\n // Create a controller/Request for this navigation\n pendingNavigationController = new AbortController();\n let request = createRequest(\n location,\n pendingNavigationController.signal,\n opts && opts.submission\n );\n let pendingActionData: RouteData | undefined;\n let pendingError: RouteData | undefined;\n\n if (opts && opts.pendingError) {\n // If we have a pendingError, it means the user attempted a GET submission\n // with binary FormData so assign here and skip to handleLoaders. That\n // way we handle calling loaders above the boundary etc. It's not really\n // different from an actionError in that sense.\n pendingError = {\n [findNearestBoundary(matches).route.id]: opts.pendingError,\n };\n } else if (opts && opts.submission) {\n // Call action if we received an action submission\n let actionOutput = await handleAction(\n request,\n location,\n opts.submission,\n matches,\n { replace: opts.replace }\n );\n\n if (actionOutput.shortCircuited) {\n return;\n }\n\n pendingActionData = actionOutput.pendingActionData;\n pendingError = actionOutput.pendingActionError;\n\n let navigation: NavigationStates[\"Loading\"] = {\n state: \"loading\",\n location,\n ...opts.submission,\n };\n loadingNavigation = navigation;\n }\n\n // Call loaders\n let { shortCircuited, loaderData, errors } = await handleLoaders(\n request,\n location,\n matches,\n loadingNavigation,\n opts && opts.submission,\n opts && opts.replace,\n pendingActionData,\n pendingError\n );\n\n if (shortCircuited) {\n return;\n }\n\n // Clean up now that the action/loaders have completed. Don't clean up if\n // we short circuited because pendingNavigationController will have already\n // been assigned to a new controller for the next navigation\n pendingNavigationController = null;\n\n completeNavigation(location, {\n matches,\n loaderData,\n errors,\n });\n }\n\n // Call the action matched by the leaf route for this navigation and handle\n // redirects/errors\n async function handleAction(\n request: Request,\n location: Location,\n submission: Submission,\n matches: AgnosticDataRouteMatch[],\n opts?: { replace?: boolean }\n ): Promise {\n interruptActiveLoads();\n\n // Put us in a submitting state\n let navigation: NavigationStates[\"Submitting\"] = {\n state: \"submitting\",\n location,\n ...submission,\n };\n updateState({ navigation });\n\n // Call our action and get the result\n let result: DataResult;\n let actionMatch = getTargetMatch(matches, location);\n\n if (!actionMatch.route.action) {\n result = getMethodNotAllowedResult(location);\n } else {\n result = await callLoaderOrAction(\n \"action\",\n request,\n actionMatch,\n matches,\n router.basename\n );\n\n if (request.signal.aborted) {\n return { shortCircuited: true };\n }\n }\n\n if (isRedirectResult(result)) {\n let redirectNavigation: NavigationStates[\"Loading\"] = {\n state: \"loading\",\n location: createLocation(state.location, result.location),\n ...submission,\n };\n await startRedirectNavigation(\n result,\n redirectNavigation,\n opts && opts.replace\n );\n return { shortCircuited: true };\n }\n\n if (isErrorResult(result)) {\n // Store off the pending error - we use it to determine which loaders\n // to call and will commit it when we complete the navigation\n let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);\n\n // By default, all submissions are REPLACE navigations, but if the\n // action threw an error that'll be rendered in an errorElement, we fall\n // back to PUSH so that the user can use the back button to get back to\n // the pre-submission form location to try again\n if ((opts && opts.replace) !== true) {\n pendingAction = HistoryAction.Push;\n }\n\n return {\n pendingActionError: { [boundaryMatch.route.id]: result.error },\n };\n }\n\n if (isDeferredResult(result)) {\n throw new Error(\"defer() is not supported in actions\");\n }\n\n return {\n pendingActionData: { [actionMatch.route.id]: result.data },\n };\n }\n\n // Call all applicable loaders for the given matches, handling redirects,\n // errors, etc.\n async function handleLoaders(\n request: Request,\n location: Location,\n matches: AgnosticDataRouteMatch[],\n overrideNavigation?: Navigation,\n submission?: Submission,\n replace?: boolean,\n pendingActionData?: RouteData,\n pendingError?: RouteData\n ): Promise {\n // Figure out the right navigation we want to use for data loading\n let loadingNavigation = overrideNavigation;\n if (!loadingNavigation) {\n let navigation: NavigationStates[\"Loading\"] = {\n state: \"loading\",\n location,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n };\n loadingNavigation = navigation;\n }\n\n let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(\n state,\n matches,\n submission,\n location,\n isRevalidationRequired,\n cancelledDeferredRoutes,\n cancelledFetcherLoads,\n pendingActionData,\n pendingError,\n fetchLoadMatches\n );\n\n // Cancel pending deferreds for no-longer-matched routes or routes we're\n // about to reload. Note that if this is an action reload we would have\n // already cancelled all pending deferreds so this would be a no-op\n cancelActiveDeferreds(\n (routeId) =>\n !(matches && matches.some((m) => m.route.id === routeId)) ||\n (matchesToLoad && matchesToLoad.some((m) => m.route.id === routeId))\n );\n\n // Short circuit if we have no loaders to run\n if (matchesToLoad.length === 0 && revalidatingFetchers.length === 0) {\n completeNavigation(location, {\n matches,\n loaderData: mergeLoaderData(state.loaderData, {}, matches),\n // Commit pending error if we're short circuiting\n errors: pendingError || null,\n actionData: pendingActionData || null,\n });\n return { shortCircuited: true };\n }\n\n // If this is an uninterrupted revalidation, we remain in our current idle\n // state. If not, we need to switch to our loading state and load data,\n // preserving any new action data or existing action data (in the case of\n // a revalidation interrupting an actionReload)\n if (!isUninterruptedRevalidation) {\n revalidatingFetchers.forEach(([key]) => {\n let fetcher = state.fetchers.get(key);\n let revalidatingFetcher: FetcherStates[\"Loading\"] = {\n state: \"loading\",\n data: fetcher && fetcher.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n };\n state.fetchers.set(key, revalidatingFetcher);\n });\n updateState({\n navigation: loadingNavigation,\n actionData: pendingActionData || state.actionData || null,\n ...(revalidatingFetchers.length > 0\n ? { fetchers: new Map(state.fetchers) }\n : {}),\n });\n }\n\n pendingNavigationLoadId = ++incrementingLoadId;\n revalidatingFetchers.forEach(([key]) =>\n fetchControllers.set(key, pendingNavigationController!)\n );\n\n let { results, loaderResults, fetcherResults } =\n await callLoadersAndMaybeResolveData(\n state.matches,\n matches,\n matchesToLoad,\n revalidatingFetchers,\n request\n );\n\n if (request.signal.aborted) {\n return { shortCircuited: true };\n }\n\n // Clean up _after_ loaders have completed. Don't clean up if we short\n // circuited because fetchControllers would have been aborted and\n // reassigned to new controllers for the next navigation\n revalidatingFetchers.forEach(([key]) => fetchControllers.delete(key));\n\n // If any loaders returned a redirect Response, start a new REPLACE navigation\n let redirect = findRedirect(results);\n if (redirect) {\n let redirectNavigation = getLoaderRedirect(state, redirect);\n await startRedirectNavigation(redirect, redirectNavigation, replace);\n return { shortCircuited: true };\n }\n\n // Process and commit output from loaders\n let { loaderData, errors } = processLoaderData(\n state,\n matches,\n matchesToLoad,\n loaderResults,\n pendingError,\n revalidatingFetchers,\n fetcherResults,\n activeDeferreds\n );\n\n // Wire up subscribers to update loaderData as promises settle\n activeDeferreds.forEach((deferredData, routeId) => {\n deferredData.subscribe((aborted) => {\n // Note: No need to updateState here since the TrackedPromise on\n // loaderData is stable across resolve/reject\n // Remove this instance if we were aborted or if promises have settled\n if (aborted || deferredData.done) {\n activeDeferreds.delete(routeId);\n }\n });\n });\n\n markFetchRedirectsDone();\n let didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId);\n\n return {\n loaderData,\n errors,\n ...(didAbortFetchLoads || revalidatingFetchers.length > 0\n ? { fetchers: new Map(state.fetchers) }\n : {}),\n };\n }\n\n function getFetcher(key: string): Fetcher {\n return state.fetchers.get(key) || IDLE_FETCHER;\n }\n\n // Trigger a fetcher load/submit for the given fetcher key\n function fetch(\n key: string,\n routeId: string,\n href: string,\n opts?: RouterFetchOptions\n ) {\n if (isServer) {\n throw new Error(\n \"router.fetch() was called during the server render, but it shouldn't be. \" +\n \"You are likely calling a useFetcher() method in the body of your component. \" +\n \"Try moving it to a useEffect or a callback.\"\n );\n }\n\n if (fetchControllers.has(key)) abortFetcher(key);\n\n let matches = matchRoutes(dataRoutes, href, init.basename);\n if (!matches) {\n setFetcherError(key, routeId, new ErrorResponse(404, \"Not Found\", null));\n return;\n }\n\n let { path, submission } = normalizeNavigateOptions(href, opts, true);\n let match = getTargetMatch(matches, path);\n\n if (submission) {\n handleFetcherAction(key, routeId, path, match, matches, submission);\n return;\n }\n\n // Store off the match so we can call it's shouldRevalidate on subsequent\n // revalidations\n fetchLoadMatches.set(key, [path, match, matches]);\n handleFetcherLoader(key, routeId, path, match, matches);\n }\n\n // Call the action for the matched fetcher.submit(), and then handle redirects,\n // errors, and revalidation\n async function handleFetcherAction(\n key: string,\n routeId: string,\n path: string,\n match: AgnosticDataRouteMatch,\n requestMatches: AgnosticDataRouteMatch[],\n submission: Submission\n ) {\n interruptActiveLoads();\n fetchLoadMatches.delete(key);\n\n if (!match.route.action) {\n let { error } = getMethodNotAllowedResult(path);\n setFetcherError(key, routeId, error);\n return;\n }\n\n // Put this fetcher into it's submitting state\n let existingFetcher = state.fetchers.get(key);\n let fetcher: FetcherStates[\"Submitting\"] = {\n state: \"submitting\",\n ...submission,\n data: existingFetcher && existingFetcher.data,\n };\n state.fetchers.set(key, fetcher);\n updateState({ fetchers: new Map(state.fetchers) });\n\n // Call the action for the fetcher\n let abortController = new AbortController();\n let fetchRequest = createRequest(path, abortController.signal, submission);\n fetchControllers.set(key, abortController);\n\n let actionResult = await callLoaderOrAction(\n \"action\",\n fetchRequest,\n match,\n requestMatches,\n router.basename\n );\n\n if (fetchRequest.signal.aborted) {\n // We can delete this so long as we weren't aborted by ou our own fetcher\n // re-submit which would have put _new_ controller is in fetchControllers\n if (fetchControllers.get(key) === abortController) {\n fetchControllers.delete(key);\n }\n return;\n }\n\n if (isRedirectResult(actionResult)) {\n fetchControllers.delete(key);\n fetchRedirectIds.add(key);\n let loadingFetcher: FetcherStates[\"Loading\"] = {\n state: \"loading\",\n ...submission,\n data: undefined,\n };\n state.fetchers.set(key, loadingFetcher);\n updateState({ fetchers: new Map(state.fetchers) });\n\n let redirectNavigation: NavigationStates[\"Loading\"] = {\n state: \"loading\",\n location: createLocation(state.location, actionResult.location),\n ...submission,\n };\n await startRedirectNavigation(actionResult, redirectNavigation);\n return;\n }\n\n // Process any non-redirect errors thrown\n if (isErrorResult(actionResult)) {\n setFetcherError(key, routeId, actionResult.error);\n return;\n }\n\n if (isDeferredResult(actionResult)) {\n invariant(false, \"defer() is not supported in actions\");\n }\n\n // Start the data load for current matches, or the next location if we're\n // in the middle of a navigation\n let nextLocation = state.navigation.location || state.location;\n let revalidationRequest = createRequest(\n nextLocation,\n abortController.signal\n );\n let matches =\n state.navigation.state !== \"idle\"\n ? matchRoutes(dataRoutes, state.navigation.location, init.basename)\n : state.matches;\n\n invariant(matches, \"Didn't find any matches after fetcher action\");\n\n let loadId = ++incrementingLoadId;\n fetchReloadIds.set(key, loadId);\n\n let loadFetcher: FetcherStates[\"Loading\"] = {\n state: \"loading\",\n data: actionResult.data,\n ...submission,\n };\n state.fetchers.set(key, loadFetcher);\n\n let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(\n state,\n matches,\n submission,\n nextLocation,\n isRevalidationRequired,\n cancelledDeferredRoutes,\n cancelledFetcherLoads,\n { [match.route.id]: actionResult.data },\n undefined, // No need to send through errors since we short circuit above\n fetchLoadMatches\n );\n\n // Put all revalidating fetchers into the loading state, except for the\n // current fetcher which we want to keep in it's current loading state which\n // contains it's action submission info + action data\n revalidatingFetchers\n .filter(([staleKey]) => staleKey !== key)\n .forEach(([staleKey]) => {\n let existingFetcher = state.fetchers.get(staleKey);\n let revalidatingFetcher: FetcherStates[\"Loading\"] = {\n state: \"loading\",\n data: existingFetcher && existingFetcher.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n };\n state.fetchers.set(staleKey, revalidatingFetcher);\n fetchControllers.set(staleKey, abortController);\n });\n\n updateState({ fetchers: new Map(state.fetchers) });\n\n let { results, loaderResults, fetcherResults } =\n await callLoadersAndMaybeResolveData(\n state.matches,\n matches,\n matchesToLoad,\n revalidatingFetchers,\n revalidationRequest\n );\n\n if (abortController.signal.aborted) {\n return;\n }\n\n fetchReloadIds.delete(key);\n fetchControllers.delete(key);\n revalidatingFetchers.forEach(([staleKey]) =>\n fetchControllers.delete(staleKey)\n );\n\n let redirect = findRedirect(results);\n if (redirect) {\n let redirectNavigation = getLoaderRedirect(state, redirect);\n await startRedirectNavigation(redirect, redirectNavigation);\n return;\n }\n\n // Process and commit output from loaders\n let { loaderData, errors } = processLoaderData(\n state,\n state.matches,\n matchesToLoad,\n loaderResults,\n undefined,\n revalidatingFetchers,\n fetcherResults,\n activeDeferreds\n );\n\n let doneFetcher: FetcherStates[\"Idle\"] = {\n state: \"idle\",\n data: actionResult.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n };\n state.fetchers.set(key, doneFetcher);\n\n let didAbortFetchLoads = abortStaleFetchLoads(loadId);\n\n // If we are currently in a navigation loading state and this fetcher is\n // more recent than the navigation, we want the newer data so abort the\n // navigation and complete it with the fetcher data\n if (\n state.navigation.state === \"loading\" &&\n loadId > pendingNavigationLoadId\n ) {\n invariant(pendingAction, \"Expected pending action\");\n pendingNavigationController && pendingNavigationController.abort();\n\n completeNavigation(state.navigation.location, {\n matches,\n loaderData,\n errors,\n fetchers: new Map(state.fetchers),\n });\n } else {\n // otherwise just update with the fetcher data, preserving any existing\n // loaderData for loaders that did not need to reload. We have to\n // manually merge here since we aren't going through completeNavigation\n updateState({\n errors,\n loaderData: mergeLoaderData(state.loaderData, loaderData, matches),\n ...(didAbortFetchLoads ? { fetchers: new Map(state.fetchers) } : {}),\n });\n isRevalidationRequired = false;\n }\n }\n\n // Call the matched loader for fetcher.load(), handling redirects, errors, etc.\n async function handleFetcherLoader(\n key: string,\n routeId: string,\n path: string,\n match: AgnosticDataRouteMatch,\n matches: AgnosticDataRouteMatch[]\n ) {\n let existingFetcher = state.fetchers.get(key);\n // Put this fetcher into it's loading state\n let loadingFetcher: FetcherStates[\"Loading\"] = {\n state: \"loading\",\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n data: existingFetcher && existingFetcher.data,\n };\n state.fetchers.set(key, loadingFetcher);\n updateState({ fetchers: new Map(state.fetchers) });\n\n // Call the loader for this fetcher route match\n let abortController = new AbortController();\n let fetchRequest = createRequest(path, abortController.signal);\n fetchControllers.set(key, abortController);\n let result: DataResult = await callLoaderOrAction(\n \"loader\",\n fetchRequest,\n match,\n matches,\n router.basename\n );\n\n // Deferred isn't supported or fetcher loads, await everything and treat it\n // as a normal load. resolveDeferredData will return undefined if this\n // fetcher gets aborted, so we just leave result untouched and short circuit\n // below if that happens\n if (isDeferredResult(result)) {\n result =\n (await resolveDeferredData(result, fetchRequest.signal, true)) ||\n result;\n }\n\n // We can delete this so long as we weren't aborted by ou our own fetcher\n // re-load which would have put _new_ controller is in fetchControllers\n if (fetchControllers.get(key) === abortController) {\n fetchControllers.delete(key);\n }\n\n if (fetchRequest.signal.aborted) {\n return;\n }\n\n // If the loader threw a redirect Response, start a new REPLACE navigation\n if (isRedirectResult(result)) {\n let redirectNavigation = getLoaderRedirect(state, result);\n await startRedirectNavigation(result, redirectNavigation);\n return;\n }\n\n // Process any non-redirect errors thrown\n if (isErrorResult(result)) {\n let boundaryMatch = findNearestBoundary(state.matches, routeId);\n state.fetchers.delete(key);\n // TODO: In remix, this would reset to IDLE_NAVIGATION if it was a catch -\n // do we need to behave any differently with our non-redirect errors?\n // What if it was a non-redirect Response?\n updateState({\n fetchers: new Map(state.fetchers),\n errors: {\n [boundaryMatch.route.id]: result.error,\n },\n });\n return;\n }\n\n invariant(!isDeferredResult(result), \"Unhandled fetcher deferred data\");\n\n // Put the fetcher back into an idle state\n let doneFetcher: FetcherStates[\"Idle\"] = {\n state: \"idle\",\n data: result.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n };\n state.fetchers.set(key, doneFetcher);\n updateState({ fetchers: new Map(state.fetchers) });\n }\n\n /**\n * Utility function to handle redirects returned from an action or loader.\n * Normally, a redirect \"replaces\" the navigation that triggered it. So, for\n * example:\n *\n * - user is on /a\n * - user clicks a link to /b\n * - loader for /b redirects to /c\n *\n * In a non-JS app the browser would track the in-flight navigation to /b and\n * then replace it with /c when it encountered the redirect response. In\n * the end it would only ever update the URL bar with /c.\n *\n * In client-side routing using pushState/replaceState, we aim to emulate\n * this behavior and we also do not update history until the end of the\n * navigation (including processed redirects). This means that we never\n * actually touch history until we've processed redirects, so we just use\n * the history action from the original navigation (PUSH or REPLACE).\n */\n async function startRedirectNavigation(\n redirect: RedirectResult,\n navigation: Navigation,\n replace?: boolean\n ) {\n if (redirect.revalidate) {\n isRevalidationRequired = true;\n }\n invariant(\n navigation.location,\n \"Expected a location on the redirect navigation\"\n );\n // There's no need to abort on redirects, since we don't detect the\n // redirect until the action/loaders have settled\n pendingNavigationController = null;\n\n let redirectHistoryAction =\n replace === true ? HistoryAction.Replace : HistoryAction.Push;\n\n await startNavigation(redirectHistoryAction, navigation.location, {\n overrideNavigation: navigation,\n });\n }\n\n async function callLoadersAndMaybeResolveData(\n currentMatches: AgnosticDataRouteMatch[],\n matches: AgnosticDataRouteMatch[],\n matchesToLoad: AgnosticDataRouteMatch[],\n fetchersToLoad: RevalidatingFetcher[],\n request: Request\n ) {\n // Call all navigation loaders and revalidating fetcher loaders in parallel,\n // then slice off the results into separate arrays so we can handle them\n // accordingly\n let results = await Promise.all([\n ...matchesToLoad.map((match) =>\n callLoaderOrAction(\"loader\", request, match, matches, router.basename)\n ),\n ...fetchersToLoad.map(([, href, match, fetchMatches]) =>\n callLoaderOrAction(\n \"loader\",\n createRequest(href, request.signal),\n match,\n fetchMatches,\n router.basename\n )\n ),\n ]);\n let loaderResults = results.slice(0, matchesToLoad.length);\n let fetcherResults = results.slice(matchesToLoad.length);\n\n await Promise.all([\n resolveDeferredResults(\n currentMatches,\n matchesToLoad,\n loaderResults,\n request.signal,\n false,\n state.loaderData\n ),\n resolveDeferredResults(\n currentMatches,\n fetchersToLoad.map(([, , match]) => match),\n fetcherResults,\n request.signal,\n true\n ),\n ]);\n\n return { results, loaderResults, fetcherResults };\n }\n\n function interruptActiveLoads() {\n // Every interruption triggers a revalidation\n isRevalidationRequired = true;\n\n // Cancel pending route-level deferreds and mark cancelled routes for\n // revalidation\n cancelledDeferredRoutes.push(...cancelActiveDeferreds());\n\n // Abort in-flight fetcher loads\n fetchLoadMatches.forEach((_, key) => {\n if (fetchControllers.has(key)) {\n cancelledFetcherLoads.push(key);\n abortFetcher(key);\n }\n });\n }\n\n function setFetcherError(key: string, routeId: string, error: any) {\n let boundaryMatch = findNearestBoundary(state.matches, routeId);\n deleteFetcher(key);\n updateState({\n errors: {\n [boundaryMatch.route.id]: error,\n },\n fetchers: new Map(state.fetchers),\n });\n }\n\n function deleteFetcher(key: string): void {\n if (fetchControllers.has(key)) abortFetcher(key);\n fetchLoadMatches.delete(key);\n fetchReloadIds.delete(key);\n fetchRedirectIds.delete(key);\n state.fetchers.delete(key);\n }\n\n function abortFetcher(key: string) {\n let controller = fetchControllers.get(key);\n invariant(controller, `Expected fetch controller: ${key}`);\n controller.abort();\n fetchControllers.delete(key);\n }\n\n function markFetchersDone(keys: string[]) {\n for (let key of keys) {\n let fetcher = getFetcher(key);\n let doneFetcher: FetcherStates[\"Idle\"] = {\n state: \"idle\",\n data: fetcher.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n };\n state.fetchers.set(key, doneFetcher);\n }\n }\n\n function markFetchRedirectsDone(): void {\n let doneKeys = [];\n for (let key of fetchRedirectIds) {\n let fetcher = state.fetchers.get(key);\n invariant(fetcher, `Expected fetcher: ${key}`);\n if (fetcher.state === \"loading\") {\n fetchRedirectIds.delete(key);\n doneKeys.push(key);\n }\n }\n markFetchersDone(doneKeys);\n }\n\n function abortStaleFetchLoads(landedId: number): boolean {\n let yeetedKeys = [];\n for (let [key, id] of fetchReloadIds) {\n if (id < landedId) {\n let fetcher = state.fetchers.get(key);\n invariant(fetcher, `Expected fetcher: ${key}`);\n if (fetcher.state === \"loading\") {\n abortFetcher(key);\n fetchReloadIds.delete(key);\n yeetedKeys.push(key);\n }\n }\n }\n markFetchersDone(yeetedKeys);\n return yeetedKeys.length > 0;\n }\n\n function cancelActiveDeferreds(\n predicate?: (routeId: string) => boolean\n ): string[] {\n let cancelledRouteIds: string[] = [];\n activeDeferreds.forEach((dfd, routeId) => {\n if (!predicate || predicate(routeId)) {\n // Cancel the deferred - but do not remove from activeDeferreds here -\n // we rely on the subscribers to do that so our tests can assert proper\n // cleanup via _internalActiveDeferreds\n dfd.cancel();\n cancelledRouteIds.push(routeId);\n activeDeferreds.delete(routeId);\n }\n });\n return cancelledRouteIds;\n }\n\n // Opt in to capturing and reporting scroll positions during navigations,\n // used by the component\n function enableScrollRestoration(\n positions: Record,\n getPosition: GetScrollPositionFunction,\n getKey?: GetScrollRestorationKeyFunction\n ) {\n savedScrollPositions = positions;\n getScrollPosition = getPosition;\n getScrollRestorationKey = getKey || ((location) => location.key);\n\n // Perform initial hydration scroll restoration, since we miss the boat on\n // the initial updateState() because we've not yet rendered \n // and therefore have no savedScrollPositions available\n if (!initialScrollRestored && state.navigation === IDLE_NAVIGATION) {\n initialScrollRestored = true;\n let y = getSavedScrollPosition(state.location, state.matches);\n if (y != null) {\n updateState({ restoreScrollPosition: y });\n }\n }\n\n return () => {\n savedScrollPositions = null;\n getScrollPosition = null;\n getScrollRestorationKey = null;\n };\n }\n\n function saveScrollPosition(\n location: Location,\n matches: AgnosticDataRouteMatch[]\n ): void {\n if (savedScrollPositions && getScrollRestorationKey && getScrollPosition) {\n let userMatches = matches.map((m) =>\n createUseMatchesMatch(m, state.loaderData)\n );\n let key = getScrollRestorationKey(location, userMatches) || location.key;\n savedScrollPositions[key] = getScrollPosition();\n }\n }\n\n function getSavedScrollPosition(\n location: Location,\n matches: AgnosticDataRouteMatch[]\n ): number | null {\n if (savedScrollPositions && getScrollRestorationKey && getScrollPosition) {\n let userMatches = matches.map((m) =>\n createUseMatchesMatch(m, state.loaderData)\n );\n let key = getScrollRestorationKey(location, userMatches) || location.key;\n let y = savedScrollPositions[key];\n if (typeof y === \"number\") {\n return y;\n }\n }\n return null;\n }\n\n router = {\n get basename() {\n return init.basename;\n },\n get state() {\n return state;\n },\n get routes() {\n return dataRoutes;\n },\n initialize,\n subscribe,\n enableScrollRestoration,\n navigate,\n fetch,\n revalidate,\n // Passthrough to history-aware createHref used by useHref so we get proper\n // hash-aware URLs in DOM paths\n createHref: (to: To) => init.history.createHref(to),\n getFetcher,\n deleteFetcher,\n dispose,\n _internalFetchControllers: fetchControllers,\n _internalActiveDeferreds: activeDeferreds,\n };\n\n return router;\n}\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region createStaticHandler\n////////////////////////////////////////////////////////////////////////////////\n\nconst validActionMethods = new Set([\"POST\", \"PUT\", \"PATCH\", \"DELETE\"]);\nconst validRequestMethods = new Set([\"GET\", \"HEAD\", ...validActionMethods]);\n\nexport function unstable_createStaticHandler(\n routes: AgnosticRouteObject[]\n): StaticHandler {\n invariant(\n routes.length > 0,\n \"You must provide a non-empty routes array to unstable_createStaticHandler\"\n );\n\n let dataRoutes = convertRoutesToDataRoutes(routes);\n\n /**\n * The query() method is intended for document requests, in which we want to\n * call an optional action and potentially multiple loaders for all nested\n * routes. It returns a StaticHandlerContext object, which is very similar\n * to the router state (location, loaderData, actionData, errors, etc.) and\n * also adds SSR-specific information such as the statusCode and headers\n * from action/loaders Responses.\n *\n * It _should_ never throw and should report all errors through the\n * returned context.errors object, properly associating errors to their error\n * boundary. Additionally, it tracks _deepestRenderedBoundaryId which can be\n * used to emulate React error boundaries during SSr by performing a second\n * pass only down to the boundaryId.\n *\n * The one exception where we do not return a StaticHandlerContext is when a\n * redirect response is returned or thrown from any action/loader. We\n * propagate that out and return the raw Response so the HTTP server can\n * return it directly.\n */\n async function query(\n request: Request\n ): Promise {\n let url = new URL(request.url);\n let location = createLocation(\"\", createPath(url), null, \"default\");\n let matches = matchRoutes(dataRoutes, location);\n\n if (!validRequestMethods.has(request.method)) {\n let {\n matches: methodNotAllowedMatches,\n route,\n error,\n } = getMethodNotAllowedMatches(dataRoutes);\n return {\n location,\n matches: methodNotAllowedMatches,\n loaderData: {},\n actionData: null,\n errors: {\n [route.id]: error,\n },\n statusCode: error.status,\n loaderHeaders: {},\n actionHeaders: {},\n };\n } else if (!matches) {\n let {\n matches: notFoundMatches,\n route,\n error,\n } = getNotFoundMatches(dataRoutes);\n return {\n location,\n matches: notFoundMatches,\n loaderData: {},\n actionData: null,\n errors: {\n [route.id]: error,\n },\n statusCode: error.status,\n loaderHeaders: {},\n actionHeaders: {},\n };\n }\n\n let result = await queryImpl(request, location, matches);\n if (result instanceof Response) {\n return result;\n }\n\n // When returning StaticHandlerContext, we patch back in the location here\n // since we need it for React Context. But this helps keep our submit and\n // loadRouteData operating on a Request instead of a Location\n return { location, ...result };\n }\n\n /**\n * The queryRoute() method is intended for targeted route requests, either\n * for fetch ?_data requests or resource route requests. In this case, we\n * are only ever calling a single action or loader, and we are returning the\n * returned value directly. In most cases, this will be a Response returned\n * from the action/loader, but it may be a primitive or other value as well -\n * and in such cases the calling context should handle that accordingly.\n *\n * We do respect the throw/return differentiation, so if an action/loader\n * throws, then this method will throw the value. This is important so we\n * can do proper boundary identification in Remix where a thrown Response\n * must go to the Catch Boundary but a returned Response is happy-path.\n *\n * One thing to note is that any Router-initiated thrown Response (such as a\n * 404 or 405) will have a custom X-Remix-Router-Error: \"yes\" header on it\n * in order to differentiate from responses thrown from user actions/loaders.\n */\n async function queryRoute(request: Request, routeId?: string): Promise {\n let url = new URL(request.url);\n let location = createLocation(\"\", createPath(url), null, \"default\");\n let matches = matchRoutes(dataRoutes, location);\n\n if (!validRequestMethods.has(request.method)) {\n throw createRouterErrorResponse(null, {\n status: 405,\n statusText: \"Method Not Allowed\",\n });\n } else if (!matches) {\n throw createRouterErrorResponse(null, {\n status: 404,\n statusText: \"Not Found\",\n });\n }\n\n let match = routeId\n ? matches.find((m) => m.route.id === routeId)\n : getTargetMatch(matches, location);\n\n if (!match) {\n throw createRouterErrorResponse(null, {\n status: 404,\n statusText: \"Not Found\",\n });\n }\n\n let result = await queryImpl(request, location, matches, match);\n if (result instanceof Response) {\n return result;\n }\n\n let error = result.errors ? Object.values(result.errors)[0] : undefined;\n if (error !== undefined) {\n // If we got back result.errors, that means the loader/action threw\n // _something_ that wasn't a Response, but it's not guaranteed/required\n // to be an `instanceof Error` either, so we have to use throw here to\n // preserve the \"error\" state outside of queryImpl.\n throw error;\n }\n\n // Pick off the right state value to return\n let routeData = [result.actionData, result.loaderData].find((v) => v);\n return Object.values(routeData || {})[0];\n }\n\n async function queryImpl(\n request: Request,\n location: Location,\n matches: AgnosticDataRouteMatch[],\n routeMatch?: AgnosticDataRouteMatch\n ): Promise | Response> {\n invariant(\n request.signal,\n \"query()/queryRoute() requests must contain an AbortController signal\"\n );\n\n try {\n if (validActionMethods.has(request.method)) {\n let result = await submit(\n request,\n matches,\n routeMatch || getTargetMatch(matches, location),\n routeMatch != null\n );\n return result;\n }\n\n let result = await loadRouteData(request, matches, routeMatch);\n return result instanceof Response\n ? result\n : {\n ...result,\n actionData: null,\n actionHeaders: {},\n };\n } catch (e) {\n // If the user threw/returned a Response in callLoaderOrAction, we throw\n // it to bail out and then return or throw here based on whether the user\n // returned or threw\n if (isQueryRouteResponse(e)) {\n if (e.type === ResultType.error && !isRedirectResponse(e.response)) {\n throw e.response;\n }\n return e.response;\n }\n // Redirects are always returned since they don't propagate to catch\n // boundaries\n if (isRedirectResponse(e)) {\n return e;\n }\n throw e;\n }\n }\n\n async function submit(\n request: Request,\n matches: AgnosticDataRouteMatch[],\n actionMatch: AgnosticDataRouteMatch,\n isRouteRequest: boolean\n ): Promise | Response> {\n let result: DataResult;\n if (!actionMatch.route.action) {\n if (isRouteRequest) {\n throw createRouterErrorResponse(null, {\n status: 405,\n statusText: \"Method Not Allowed\",\n });\n }\n result = getMethodNotAllowedResult(request.url);\n } else {\n result = await callLoaderOrAction(\n \"action\",\n request,\n actionMatch,\n matches,\n undefined, // Basename not currently supported in static handlers\n true,\n isRouteRequest\n );\n\n if (request.signal.aborted) {\n let method = isRouteRequest ? \"queryRoute\" : \"query\";\n throw new Error(`${method}() call aborted`);\n }\n }\n\n if (isRedirectResult(result)) {\n // Uhhhh - this should never happen, we should always throw these from\n // callLoaderOrAction, but the type narrowing here keeps TS happy and we\n // can get back on the \"throw all redirect responses\" train here should\n // this ever happen :/\n throw new Response(null, {\n status: result.status,\n headers: {\n Location: result.location,\n },\n });\n }\n\n if (isDeferredResult(result)) {\n throw new Error(\"defer() is not supported in actions\");\n }\n\n if (isRouteRequest) {\n // Note: This should only be non-Response values if we get here, since\n // isRouteRequest should throw any Response received in callLoaderOrAction\n if (isErrorResult(result)) {\n let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);\n return {\n matches: [actionMatch],\n loaderData: {},\n actionData: null,\n errors: {\n [boundaryMatch.route.id]: result.error,\n },\n // Note: statusCode + headers are unused here since queryRoute will\n // return the raw Response or value\n statusCode: 500,\n loaderHeaders: {},\n actionHeaders: {},\n };\n }\n\n return {\n matches: [actionMatch],\n loaderData: {},\n actionData: { [actionMatch.route.id]: result.data },\n errors: null,\n // Note: statusCode + headers are unused here since queryRoute will\n // return the raw Response or value\n statusCode: 200,\n loaderHeaders: {},\n actionHeaders: {},\n };\n }\n\n if (isErrorResult(result)) {\n // Store off the pending error - we use it to determine which loaders\n // to call and will commit it when we complete the navigation\n let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);\n let context = await loadRouteData(request, matches, undefined, {\n [boundaryMatch.route.id]: result.error,\n });\n\n // action status codes take precedence over loader status codes\n return {\n ...context,\n statusCode: isRouteErrorResponse(result.error)\n ? result.error.status\n : 500,\n actionData: null,\n actionHeaders: {\n ...(result.headers ? { [actionMatch.route.id]: result.headers } : {}),\n },\n };\n }\n\n let context = await loadRouteData(request, matches);\n\n return {\n ...context,\n // action status codes take precedence over loader status codes\n ...(result.statusCode ? { statusCode: result.statusCode } : {}),\n actionData: {\n [actionMatch.route.id]: result.data,\n },\n actionHeaders: {\n ...(result.headers ? { [actionMatch.route.id]: result.headers } : {}),\n },\n };\n }\n\n async function loadRouteData(\n request: Request,\n matches: AgnosticDataRouteMatch[],\n routeMatch?: AgnosticDataRouteMatch,\n pendingActionError?: RouteData\n ): Promise<\n | Omit\n | Response\n > {\n let isRouteRequest = routeMatch != null;\n let requestMatches = routeMatch\n ? [routeMatch]\n : getLoaderMatchesUntilBoundary(\n matches,\n Object.keys(pendingActionError || {})[0]\n );\n let matchesToLoad = requestMatches.filter((m) => m.route.loader);\n\n // Short circuit if we have no loaders to run\n if (matchesToLoad.length === 0) {\n return {\n matches,\n loaderData: {},\n errors: pendingActionError || null,\n statusCode: 200,\n loaderHeaders: {},\n };\n }\n\n let results = await Promise.all([\n ...matchesToLoad.map((match) =>\n callLoaderOrAction(\n \"loader\",\n request,\n match,\n matches,\n undefined, // Basename not currently supported in static handlers\n true,\n isRouteRequest\n )\n ),\n ]);\n\n if (request.signal.aborted) {\n let method = isRouteRequest ? \"queryRoute\" : \"query\";\n throw new Error(`${method}() call aborted`);\n }\n\n // Can't do anything with these without the Remix side of things, so just\n // cancel them for now\n results.forEach((result) => {\n if (isDeferredResult(result)) {\n result.deferredData.cancel();\n }\n });\n\n // Process and commit output from loaders\n let context = processRouteLoaderData(\n matches,\n matchesToLoad,\n results,\n pendingActionError\n );\n\n return {\n ...context,\n matches,\n };\n }\n\n function createRouterErrorResponse(\n body: BodyInit | null | undefined,\n init: ResponseInit\n ) {\n return new Response(body, {\n ...init,\n headers: {\n ...init.headers,\n \"X-Remix-Router-Error\": \"yes\",\n },\n });\n }\n\n return {\n dataRoutes,\n query,\n queryRoute,\n };\n}\n\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Helpers\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Given an existing StaticHandlerContext and an error thrown at render time,\n * provide an updated StaticHandlerContext suitable for a second SSR render\n */\nexport function getStaticContextFromError(\n routes: AgnosticDataRouteObject[],\n context: StaticHandlerContext,\n error: any\n) {\n let newContext: StaticHandlerContext = {\n ...context,\n statusCode: 500,\n errors: {\n [context._deepestRenderedBoundaryId || routes[0].id]: error,\n },\n };\n return newContext;\n}\n\n// Normalize navigation options by converting formMethod=GET formData objects to\n// URLSearchParams so they behave identically to links with query params\nfunction normalizeNavigateOptions(\n to: To,\n opts?: RouterNavigateOptions,\n isFetcher = false\n): {\n path: string;\n submission?: Submission;\n error?: ErrorResponse;\n} {\n let path = typeof to === \"string\" ? to : createPath(to);\n\n // Return location verbatim on non-submission navigations\n if (!opts || (!(\"formMethod\" in opts) && !(\"formData\" in opts))) {\n return { path };\n }\n\n // Create a Submission on non-GET navigations\n if (opts.formMethod != null && opts.formMethod !== \"get\") {\n return {\n path,\n submission: {\n formMethod: opts.formMethod,\n formAction: stripHashFromPath(path),\n formEncType:\n (opts && opts.formEncType) || \"application/x-www-form-urlencoded\",\n formData: opts.formData,\n },\n };\n }\n\n // No formData to flatten for GET submission\n if (!opts.formData) {\n return { path };\n }\n\n // Flatten submission onto URLSearchParams for GET submissions\n let parsedPath = parsePath(path);\n try {\n let searchParams = convertFormDataToSearchParams(opts.formData);\n // Since fetcher GET submissions only run a single loader (as opposed to\n // navigation GET submissions which run all loaders), we need to preserve\n // any incoming ?index params\n if (\n isFetcher &&\n parsedPath.search &&\n hasNakedIndexQuery(parsedPath.search)\n ) {\n searchParams.append(\"index\", \"\");\n }\n parsedPath.search = `?${searchParams}`;\n } catch (e) {\n return {\n path,\n error: new ErrorResponse(\n 400,\n \"Bad Request\",\n \"Cannot submit binary form data using GET\"\n ),\n };\n }\n\n return { path: createPath(parsedPath) };\n}\n\nfunction getLoaderRedirect(\n state: RouterState,\n redirect: RedirectResult\n): Navigation {\n let { formMethod, formAction, formEncType, formData } = state.navigation;\n let navigation: NavigationStates[\"Loading\"] = {\n state: \"loading\",\n location: createLocation(state.location, redirect.location),\n formMethod: formMethod || undefined,\n formAction: formAction || undefined,\n formEncType: formEncType || undefined,\n formData: formData || undefined,\n };\n return navigation;\n}\n\n// Filter out all routes below any caught error as they aren't going to\n// render so we don't need to load them\nfunction getLoaderMatchesUntilBoundary(\n matches: AgnosticDataRouteMatch[],\n boundaryId?: string\n) {\n let boundaryMatches = matches;\n if (boundaryId) {\n let index = matches.findIndex((m) => m.route.id === boundaryId);\n if (index >= 0) {\n boundaryMatches = matches.slice(0, index);\n }\n }\n return boundaryMatches;\n}\n\nfunction getMatchesToLoad(\n state: RouterState,\n matches: AgnosticDataRouteMatch[],\n submission: Submission | undefined,\n location: Location,\n isRevalidationRequired: boolean,\n cancelledDeferredRoutes: string[],\n cancelledFetcherLoads: string[],\n pendingActionData?: RouteData,\n pendingError?: RouteData,\n fetchLoadMatches?: Map\n): [AgnosticDataRouteMatch[], RevalidatingFetcher[]] {\n let actionResult = pendingError\n ? Object.values(pendingError)[0]\n : pendingActionData\n ? Object.values(pendingActionData)[0]\n : null;\n\n // Pick navigation matches that are net-new or qualify for revalidation\n let boundaryId = pendingError ? Object.keys(pendingError)[0] : undefined;\n let boundaryMatches = getLoaderMatchesUntilBoundary(matches, boundaryId);\n let navigationMatches = boundaryMatches.filter(\n (match, index) =>\n match.route.loader != null &&\n (isNewLoader(state.loaderData, state.matches[index], match) ||\n // If this route had a pending deferred cancelled it must be revalidated\n cancelledDeferredRoutes.some((id) => id === match.route.id) ||\n shouldRevalidateLoader(\n state.location,\n state.matches[index],\n submission,\n location,\n match,\n isRevalidationRequired,\n actionResult\n ))\n );\n\n // Pick fetcher.loads that need to be revalidated\n let revalidatingFetchers: RevalidatingFetcher[] = [];\n fetchLoadMatches &&\n fetchLoadMatches.forEach(([href, match, fetchMatches], key) => {\n // This fetcher was cancelled from a prior action submission - force reload\n if (cancelledFetcherLoads.includes(key)) {\n revalidatingFetchers.push([key, href, match, fetchMatches]);\n } else if (isRevalidationRequired) {\n let shouldRevalidate = shouldRevalidateLoader(\n href,\n match,\n submission,\n href,\n match,\n isRevalidationRequired,\n actionResult\n );\n if (shouldRevalidate) {\n revalidatingFetchers.push([key, href, match, fetchMatches]);\n }\n }\n });\n\n return [navigationMatches, revalidatingFetchers];\n}\n\nfunction isNewLoader(\n currentLoaderData: RouteData,\n currentMatch: AgnosticDataRouteMatch,\n match: AgnosticDataRouteMatch\n) {\n let isNew =\n // [a] -> [a, b]\n !currentMatch ||\n // [a, b] -> [a, c]\n match.route.id !== currentMatch.route.id;\n\n // Handle the case that we don't have data for a re-used route, potentially\n // from a prior error or from a cancelled pending deferred\n let isMissingData = currentLoaderData[match.route.id] === undefined;\n\n // Always load if this is a net-new route or we don't yet have data\n return isNew || isMissingData;\n}\n\nfunction isNewRouteInstance(\n currentMatch: AgnosticDataRouteMatch,\n match: AgnosticDataRouteMatch\n) {\n let currentPath = currentMatch.route.path;\n return (\n // param change for this match, /users/123 -> /users/456\n currentMatch.pathname !== match.pathname ||\n // splat param changed, which is not present in match.path\n // e.g. /files/images/avatar.jpg -> files/finances.xls\n (currentPath &&\n currentPath.endsWith(\"*\") &&\n currentMatch.params[\"*\"] !== match.params[\"*\"])\n );\n}\n\nfunction shouldRevalidateLoader(\n currentLocation: string | Location,\n currentMatch: AgnosticDataRouteMatch,\n submission: Submission | undefined,\n location: string | Location,\n match: AgnosticDataRouteMatch,\n isRevalidationRequired: boolean,\n actionResult: DataResult | undefined\n) {\n let currentUrl = createURL(currentLocation);\n let currentParams = currentMatch.params;\n let nextUrl = createURL(location);\n let nextParams = match.params;\n\n // This is the default implementation as to when we revalidate. If the route\n // provides it's own implementation, then we give them full control but\n // provide this value so they can leverage it if needed after they check\n // their own specific use cases\n // Note that fetchers always provide the same current/next locations so the\n // URL-based checks here don't apply to fetcher shouldRevalidate calls\n let defaultShouldRevalidate =\n isNewRouteInstance(currentMatch, match) ||\n // Clicked the same link, resubmitted a GET form\n currentUrl.toString() === nextUrl.toString() ||\n // Search params affect all loaders\n currentUrl.search !== nextUrl.search ||\n // Forced revalidation due to submission, useRevalidate, or X-Remix-Revalidate\n isRevalidationRequired;\n\n if (match.route.shouldRevalidate) {\n let routeChoice = match.route.shouldRevalidate({\n currentUrl,\n currentParams,\n nextUrl,\n nextParams,\n ...submission,\n actionResult,\n defaultShouldRevalidate,\n });\n if (typeof routeChoice === \"boolean\") {\n return routeChoice;\n }\n }\n\n return defaultShouldRevalidate;\n}\n\nasync function callLoaderOrAction(\n type: \"loader\" | \"action\",\n request: Request,\n match: AgnosticDataRouteMatch,\n matches: AgnosticDataRouteMatch[],\n basename: string | undefined,\n isStaticRequest: boolean = false,\n isRouteRequest: boolean = false\n): Promise {\n let resultType;\n let result;\n\n // Setup a promise we can race against so that abort signals short circuit\n let reject: () => void;\n let abortPromise = new Promise((_, r) => (reject = r));\n let onReject = () => reject();\n request.signal.addEventListener(\"abort\", onReject);\n\n try {\n let handler = match.route[type];\n invariant(\n handler,\n `Could not find the ${type} to run on the \"${match.route.id}\" route`\n );\n\n result = await Promise.race([\n handler({ request, params: match.params }),\n abortPromise,\n ]);\n } catch (e) {\n resultType = ResultType.error;\n result = e;\n } finally {\n request.signal.removeEventListener(\"abort\", onReject);\n }\n\n if (result instanceof Response) {\n let status = result.status;\n\n // Process redirects\n if (status >= 300 && status <= 399) {\n let location = result.headers.get(\"Location\");\n invariant(\n location,\n \"Redirects returned/thrown from loaders/actions must have a Location header\"\n );\n\n // Support relative routing in redirects\n let activeMatches = matches.slice(0, matches.indexOf(match) + 1);\n let routePathnames = getPathContributingMatches(activeMatches).map(\n (match) => match.pathnameBase\n );\n let requestPath = createURL(request.url).pathname;\n let resolvedLocation = resolveTo(location, routePathnames, requestPath);\n invariant(\n createPath(resolvedLocation),\n `Unable to resolve redirect location: ${result.headers.get(\"Location\")}`\n );\n\n // Prepend the basename to the redirect location if we have one\n if (basename) {\n let path = resolvedLocation.pathname;\n resolvedLocation.pathname =\n path === \"/\" ? basename : joinPaths([basename, path]);\n }\n\n location = createPath(resolvedLocation);\n\n // Don't process redirects in the router during static requests requests.\n // Instead, throw the Response and let the server handle it with an HTTP\n // redirect. We also update the Location header in place in this flow so\n // basename and relative routing is taken into account\n if (isStaticRequest) {\n result.headers.set(\"Location\", location);\n throw result;\n }\n\n return {\n type: ResultType.redirect,\n status,\n location,\n revalidate: result.headers.get(\"X-Remix-Revalidate\") !== null,\n };\n }\n\n // For SSR single-route requests, we want to hand Responses back directly\n // without unwrapping. We do this with the QueryRouteResponse wrapper\n // interface so we can know whether it was returned or thrown\n if (isRouteRequest) {\n // eslint-disable-next-line no-throw-literal\n throw {\n type: resultType || ResultType.data,\n response: result,\n };\n }\n\n let data: any;\n let contentType = result.headers.get(\"Content-Type\");\n if (contentType && contentType.startsWith(\"application/json\")) {\n data = await result.json();\n } else {\n data = await result.text();\n }\n\n if (resultType === ResultType.error) {\n return {\n type: resultType,\n error: new ErrorResponse(status, result.statusText, data),\n headers: result.headers,\n };\n }\n\n return {\n type: ResultType.data,\n data,\n statusCode: result.status,\n headers: result.headers,\n };\n }\n\n if (resultType === ResultType.error) {\n return { type: resultType, error: result };\n }\n\n if (result instanceof DeferredData) {\n return { type: ResultType.deferred, deferredData: result };\n }\n\n return { type: ResultType.data, data: result };\n}\n\nfunction createRequest(\n location: string | Location,\n signal: AbortSignal,\n submission?: Submission\n): Request {\n let url = createURL(stripHashFromPath(location)).toString();\n let init: RequestInit = { signal };\n\n if (submission) {\n let { formMethod, formEncType, formData } = submission;\n init.method = formMethod.toUpperCase();\n init.body =\n formEncType === \"application/x-www-form-urlencoded\"\n ? convertFormDataToSearchParams(formData)\n : formData;\n }\n\n // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n return new Request(url, init);\n}\n\nfunction convertFormDataToSearchParams(formData: FormData): URLSearchParams {\n let searchParams = new URLSearchParams();\n\n for (let [key, value] of formData.entries()) {\n invariant(\n typeof value === \"string\",\n 'File inputs are not supported with encType \"application/x-www-form-urlencoded\", ' +\n 'please use \"multipart/form-data\" instead.'\n );\n searchParams.append(key, value);\n }\n\n return searchParams;\n}\n\nfunction processRouteLoaderData(\n matches: AgnosticDataRouteMatch[],\n matchesToLoad: AgnosticDataRouteMatch[],\n results: DataResult[],\n pendingError: RouteData | undefined,\n activeDeferreds?: Map\n): {\n loaderData: RouterState[\"loaderData\"];\n errors: RouterState[\"errors\"] | null;\n statusCode: number;\n loaderHeaders: Record;\n} {\n // Fill in loaderData/errors from our loaders\n let loaderData: RouterState[\"loaderData\"] = {};\n let errors: RouterState[\"errors\"] | null = null;\n let statusCode: number | undefined;\n let foundError = false;\n let loaderHeaders: Record = {};\n\n // Process loader results into state.loaderData/state.errors\n results.forEach((result, index) => {\n let id = matchesToLoad[index].route.id;\n invariant(\n !isRedirectResult(result),\n \"Cannot handle redirect results in processLoaderData\"\n );\n if (isErrorResult(result)) {\n // Look upwards from the matched route for the closest ancestor\n // error boundary, defaulting to the root match\n let boundaryMatch = findNearestBoundary(matches, id);\n let error = result.error;\n // If we have a pending action error, we report it at the highest-route\n // that throws a loader error, and then clear it out to indicate that\n // it was consumed\n if (pendingError) {\n error = Object.values(pendingError)[0];\n pendingError = undefined;\n }\n errors = Object.assign(errors || {}, {\n [boundaryMatch.route.id]: error,\n });\n // Once we find our first (highest) error, we set the status code and\n // prevent deeper status codes from overriding\n if (!foundError) {\n foundError = true;\n statusCode = isRouteErrorResponse(result.error)\n ? result.error.status\n : 500;\n }\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n } else if (isDeferredResult(result)) {\n activeDeferreds && activeDeferreds.set(id, result.deferredData);\n loaderData[id] = result.deferredData.data;\n // TODO: Add statusCode/headers once we wire up streaming in Remix\n } else {\n loaderData[id] = result.data;\n // Error status codes always override success status codes, but if all\n // loaders are successful we take the deepest status code.\n if (\n result.statusCode != null &&\n result.statusCode !== 200 &&\n !foundError\n ) {\n statusCode = result.statusCode;\n }\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n }\n });\n\n // If we didn't consume the pending action error (i.e., all loaders\n // resolved), then consume it here\n if (pendingError) {\n errors = pendingError;\n }\n\n return {\n loaderData,\n errors,\n statusCode: statusCode || 200,\n loaderHeaders,\n };\n}\n\nfunction processLoaderData(\n state: RouterState,\n matches: AgnosticDataRouteMatch[],\n matchesToLoad: AgnosticDataRouteMatch[],\n results: DataResult[],\n pendingError: RouteData | undefined,\n revalidatingFetchers: RevalidatingFetcher[],\n fetcherResults: DataResult[],\n activeDeferreds: Map\n): {\n loaderData: RouterState[\"loaderData\"];\n errors?: RouterState[\"errors\"];\n} {\n let { loaderData, errors } = processRouteLoaderData(\n matches,\n matchesToLoad,\n results,\n pendingError,\n activeDeferreds\n );\n\n // Process results from our revalidating fetchers\n for (let index = 0; index < revalidatingFetchers.length; index++) {\n let [key, , match] = revalidatingFetchers[index];\n invariant(\n fetcherResults !== undefined && fetcherResults[index] !== undefined,\n \"Did not find corresponding fetcher result\"\n );\n let result = fetcherResults[index];\n\n // Process fetcher non-redirect errors\n if (isErrorResult(result)) {\n let boundaryMatch = findNearestBoundary(state.matches, match.route.id);\n if (!(errors && errors[boundaryMatch.route.id])) {\n errors = {\n ...errors,\n [boundaryMatch.route.id]: result.error,\n };\n }\n state.fetchers.delete(key);\n } else if (isRedirectResult(result)) {\n // Should never get here, redirects should get processed above, but we\n // keep this to type narrow to a success result in the else\n throw new Error(\"Unhandled fetcher revalidation redirect\");\n } else if (isDeferredResult(result)) {\n // Should never get here, deferred data should be awaited for fetchers\n // in resolveDeferredResults\n throw new Error(\"Unhandled fetcher deferred data\");\n } else {\n let doneFetcher: FetcherStates[\"Idle\"] = {\n state: \"idle\",\n data: result.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n };\n state.fetchers.set(key, doneFetcher);\n }\n }\n\n return { loaderData, errors };\n}\n\nfunction mergeLoaderData(\n loaderData: RouteData,\n newLoaderData: RouteData,\n matches: AgnosticDataRouteMatch[]\n): RouteData {\n let mergedLoaderData = { ...newLoaderData };\n matches.forEach((match) => {\n let id = match.route.id;\n if (newLoaderData[id] === undefined && loaderData[id] !== undefined) {\n mergedLoaderData[id] = loaderData[id];\n }\n });\n return mergedLoaderData;\n}\n\n// Find the nearest error boundary, looking upwards from the leaf route (or the\n// route specified by routeId) for the closest ancestor error boundary,\n// defaulting to the root match\nfunction findNearestBoundary(\n matches: AgnosticDataRouteMatch[],\n routeId?: string\n): AgnosticDataRouteMatch {\n let eligibleMatches = routeId\n ? matches.slice(0, matches.findIndex((m) => m.route.id === routeId) + 1)\n : [...matches];\n return (\n eligibleMatches.reverse().find((m) => m.route.hasErrorBoundary === true) ||\n matches[0]\n );\n}\n\nfunction getShortCircuitMatches(\n routes: AgnosticDataRouteObject[],\n status: number,\n statusText: string\n): {\n matches: AgnosticDataRouteMatch[];\n route: AgnosticDataRouteObject;\n error: ErrorResponse;\n} {\n // Prefer a root layout route if present, otherwise shim in a route object\n let route = routes.find((r) => r.index || !r.path || r.path === \"/\") || {\n id: `__shim-${status}-route__`,\n };\n\n return {\n matches: [\n {\n params: {},\n pathname: \"\",\n pathnameBase: \"\",\n route,\n },\n ],\n route,\n error: new ErrorResponse(status, statusText, null),\n };\n}\n\nfunction getNotFoundMatches(routes: AgnosticDataRouteObject[]) {\n return getShortCircuitMatches(routes, 404, \"Not Found\");\n}\n\nfunction getMethodNotAllowedMatches(routes: AgnosticDataRouteObject[]) {\n return getShortCircuitMatches(routes, 405, \"Method Not Allowed\");\n}\n\nfunction getMethodNotAllowedResult(path: Location | string): ErrorResult {\n let href = typeof path === \"string\" ? path : createPath(path);\n console.warn(\n \"You're trying to submit to a route that does not have an action. To \" +\n \"fix this, please add an `action` function to the route for \" +\n `[${href}]`\n );\n return {\n type: ResultType.error,\n error: new ErrorResponse(405, \"Method Not Allowed\", \"\"),\n };\n}\n\n// Find any returned redirect errors, starting from the lowest match\nfunction findRedirect(results: DataResult[]): RedirectResult | undefined {\n for (let i = results.length - 1; i >= 0; i--) {\n let result = results[i];\n if (isRedirectResult(result)) {\n return result;\n }\n }\n}\n\nfunction stripHashFromPath(path: To) {\n let parsedPath = typeof path === \"string\" ? parsePath(path) : path;\n return createPath({ ...parsedPath, hash: \"\" });\n}\n\nfunction isHashChangeOnly(a: Location, b: Location): boolean {\n return (\n a.pathname === b.pathname && a.search === b.search && a.hash !== b.hash\n );\n}\n\nfunction isDeferredResult(result: DataResult): result is DeferredResult {\n return result.type === ResultType.deferred;\n}\n\nfunction isErrorResult(result: DataResult): result is ErrorResult {\n return result.type === ResultType.error;\n}\n\nfunction isRedirectResult(result?: DataResult): result is RedirectResult {\n return (result && result.type) === ResultType.redirect;\n}\n\nfunction isRedirectResponse(result: any): result is Response {\n if (!(result instanceof Response)) {\n return false;\n }\n\n let status = result.status;\n let location = result.headers.get(\"Location\");\n return status >= 300 && status <= 399 && location != null;\n}\n\nfunction isQueryRouteResponse(obj: any): obj is QueryRouteResponse {\n return (\n obj &&\n obj.response instanceof Response &&\n (obj.type === ResultType.data || ResultType.error)\n );\n}\n\nasync function resolveDeferredResults(\n currentMatches: AgnosticDataRouteMatch[],\n matchesToLoad: AgnosticDataRouteMatch[],\n results: DataResult[],\n signal: AbortSignal,\n isFetcher: boolean,\n currentLoaderData?: RouteData\n) {\n for (let index = 0; index < results.length; index++) {\n let result = results[index];\n let match = matchesToLoad[index];\n let currentMatch = currentMatches.find(\n (m) => m.route.id === match.route.id\n );\n let isRevalidatingLoader =\n currentMatch != null &&\n !isNewRouteInstance(currentMatch, match) &&\n (currentLoaderData && currentLoaderData[match.route.id]) !== undefined;\n\n if (isDeferredResult(result) && (isFetcher || isRevalidatingLoader)) {\n // Note: we do not have to touch activeDeferreds here since we race them\n // against the signal in resolveDeferredData and they'll get aborted\n // there if needed\n await resolveDeferredData(result, signal, isFetcher).then((result) => {\n if (result) {\n results[index] = result || results[index];\n }\n });\n }\n }\n}\n\nasync function resolveDeferredData(\n result: DeferredResult,\n signal: AbortSignal,\n unwrap = false\n): Promise {\n let aborted = await result.deferredData.resolveData(signal);\n if (aborted) {\n return;\n }\n\n if (unwrap) {\n try {\n return {\n type: ResultType.data,\n data: result.deferredData.unwrappedData,\n };\n } catch (e) {\n // Handle any TrackedPromise._error values encountered while unwrapping\n return {\n type: ResultType.error,\n error: e,\n };\n }\n }\n\n return {\n type: ResultType.data,\n data: result.deferredData.data,\n };\n}\n\nfunction hasNakedIndexQuery(search: string): boolean {\n return new URLSearchParams(search).getAll(\"index\").some((v) => v === \"\");\n}\n\n// Note: This should match the format exported by useMatches, so if you change\n// this please also change that :) Eventually we'll DRY this up\nfunction createUseMatchesMatch(\n match: AgnosticDataRouteMatch,\n loaderData: RouteData\n): UseMatchesMatch {\n let { route, pathname, params } = match;\n return {\n id: route.id,\n pathname,\n params,\n data: loaderData[route.id] as unknown,\n handle: route.handle as unknown,\n };\n}\n\nfunction getTargetMatch(\n matches: AgnosticDataRouteMatch[],\n location: Location | string\n) {\n let search =\n typeof location === \"string\" ? parsePath(location).search : location.search;\n if (\n matches[matches.length - 1].route.index &&\n hasNakedIndexQuery(search || \"\")\n ) {\n // Return the leaf index route when index is present\n return matches[matches.length - 1];\n }\n // Otherwise grab the deepest \"path contributing\" match (ignoring index and\n // pathless layout routes)\n let pathMatches = getPathContributingMatches(matches);\n return pathMatches[pathMatches.length - 1];\n}\n//#endregion\n","/* eslint-env browser */\nmodule.exports = typeof self == 'object' ? self.FormData : window.FormData;\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/**\n * @license React\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';var aa=require(\"react\"),ca=require(\"scheduler\");function p(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cb}return!1}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var z={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){z[a]=new v(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){z[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){z[a]=new v(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){z[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){z[a]=new v(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){z[a]=new v(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){z[a]=new v(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){z[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1)});var ra=/[\\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(ra,\nsa);z[b]=new v(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1)});\nz.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2h||e[g]!==f[h]){var k=\"\\n\"+e[g].replace(\" at new \",\" at \");a.displayName&&k.includes(\"\")&&(k=k.replace(\"\",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{Na=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Ma(a):\"\"}\nfunction Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma(\"Lazy\");case 13:return Ma(\"Suspense\");case 19:return Ma(\"SuspenseList\");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return\"\"}}\nfunction Qa(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ya:return\"Fragment\";case wa:return\"Portal\";case Aa:return\"Profiler\";case za:return\"StrictMode\";case Ea:return\"Suspense\";case Fa:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case Ca:return(a.displayName||\"Context\")+\".Consumer\";case Ba:return(a._context.displayName||\"Context\")+\".Provider\";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName||\nb.name||\"\",a=\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||\"Memo\";case Ha:b=a._payload;a=a._init;try{return Qa(a(b))}catch(c){}}return null}\nfunction Ra(a){var b=a.type;switch(a.tag){case 24:return\"Cache\";case 9:return(b.displayName||\"Context\")+\".Consumer\";case 10:return(b._context.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return a=b.render,a=a.displayName||a.name||\"\",b.displayName||(\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 5:return b;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return Qa(b);case 8:return b===za?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";\ncase 12:return\"Profiler\";case 21:return\"Scope\";case 13:return\"Suspense\";case 19:return\"SuspenseList\";case 25:return\"TracingMarker\";case 1:case 0:case 17:case 2:case 14:case 15:if(\"function\"===typeof b)return b.displayName||b.name||null;if(\"string\"===typeof b)return b}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"string\":case \"undefined\":return a;case \"object\":return a;default:return\"\"}}\nfunction Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function ab(a,b){b=b.checked;null!=b&&ta(a,\"checked\",b,!1)}\nfunction bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?cb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction db(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction cb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}var eb=Array.isArray;\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e\"+b.valueOf().toString()+\"\";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,\nzoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a]})});function rb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(\"\"+b).trim():b+\"px\"}\nfunction sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=rb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var tb=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if(\"object\"!==typeof b.dangerouslySetInnerHTML||!(\"__html\"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(p(62));}}\nfunction vb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(p(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a>>=0;return 0===a?32:31-(pc(a)/qc|0)|0}var rc=64,sc=4194304;\nfunction tc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;\ndefault:return a}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)))}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b}\nfunction Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Je(c)}}function Le(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Le(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nfunction Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){if(null!==d&&Ne(c))if(b=d.start,a=d.end,void 0===a&&(a=b),\"selectionStart\"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c,\nd);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});\"function\"===typeof c.focus&&c.focus();for(c=0;c=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}\nfunction Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(Wf);E(H)}function ag(a,b,c){if(H.current!==Vf)throw Error(p(168));G(H,b);G(Wf,c)}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,Ra(a)||\"Unknown\",e));return A({},c,d)}\nfunction cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return!0}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c)}var eg=null,fg=!1,gg=!1;function hg(a){null===eg?eg=[a]:eg.push(a)}function ig(a){fg=!0;hg(a)}\nfunction jg(){if(!gg&&null!==eg){gg=!0;var a=0,b=C;try{var c=eg;for(C=1;a>=g;e-=g;rg=1<<32-oc(b)+e|c<w?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;ww?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x}if(n.done)return c(e,\nm),I&&tg(e,w),l;if(null===m){for(;!n.done;w++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);I&&tg(e,w);return l}for(m=d(e,m);!n.done;w++,n=h.next())n=y(m,e,w,n.value,k),null!==n&&(a&&null!==n.alternate&&m.delete(null===n.key?w:n.key),g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);a&&m.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function J(a,d,f,h){\"object\"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if(\"object\"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k=\nf.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||\"object\"===typeof k&&null!==k&&k.$$typeof===Ha&&uh(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=sh(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ya?(d=Ah(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=yh(f.type,f.key,f.props,null,a.mode,h),h.ref=sh(a,d,f),h.return=a,a=h)}return g(a);case wa:a:{for(l=f.key;null!==\nd;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=zh(f,a.mode,h);d.return=a;a=d}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h)}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);th(a,f)}return\"string\"===typeof f&&\"\"!==f||\"number\"===typeof f?(f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):\n(c(a,d),d=xh(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return J}var Bh=vh(!0),Ch=vh(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(a){if(a===Dh)throw Error(p(174));return a}function Ih(a,b){G(Gh,b);G(Fh,a);G(Eh,Dh);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:lb(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=lb(b,a)}E(Eh);G(Eh,b)}function Jh(){E(Eh);E(Fh);E(Gh)}\nfunction Kh(a){Hh(Gh.current);var b=Hh(Eh.current);var c=lb(b,a.type);b!==c&&(G(Fh,a),G(Eh,c))}function Lh(a){Fh.current===a&&(E(Eh),E(Fh))}var M=Uf(0);\nfunction Mh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||\"$?\"===c.data||\"$!\"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var Nh=[];\nfunction Oh(){for(var a=0;ac?c:4;a(!0);var d=Qh.transition;Qh.transition={};try{a(!1),b()}finally{C=c,Qh.transition=d}}function Fi(){return di().memoizedState}\nfunction Gi(a,b,c){var d=lh(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,c);else if(c=Yg(a,b,c,d),null!==c){var e=L();mh(c,a,d,e);Ji(c,b,d)}}\nfunction ri(a,b,c){var d=lh(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,Xg(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=Yg(a,b,e,d);null!==c&&(e=L(),mh(c,a,d,e),Ji(c,b,d))}}\nfunction Hi(a){var b=a.alternate;return a===N||null!==b&&b===N}function Ii(a,b){Th=Sh=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Ji(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}\nvar ai={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(a,b){ci().memoizedState=[a,void 0===b?null:b];return a},useContext:Vg,useEffect:vi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ti(4194308,\n4,yi.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ti(4194308,4,a,b)},useInsertionEffect:function(a,b){return ti(4,2,a,b)},useMemo:function(a,b){var c=ci();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=ci();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Gi.bind(null,N,a);return[d.memoizedState,a]},useRef:function(a){var b=\nci();a={current:a};return b.memoizedState=a},useState:qi,useDebugValue:Ai,useDeferredValue:function(a){return ci().memoizedState=a},useTransition:function(){var a=qi(!1),b=a[0];a=Ei.bind(null,a[1]);ci().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=N,e=ci();if(I){if(void 0===c)throw Error(p(407));c=c()}else{c=b();if(null===R)throw Error(p(349));0!==(Rh&30)||ni(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;vi(ki.bind(null,d,\nf,a),[a]);d.flags|=2048;li(9,mi.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=ci(),b=R.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=\":\"+b+\"R\"+c;c=Uh++;0\\x3c/script>\",a=a.removeChild(a.firstChild)):\n\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;Aj(a,b,!1,!1);b.stateNode=a;a:{g=vb(c,d);switch(c){case \"dialog\":D(\"cancel\",a);D(\"close\",a);e=d;break;case \"iframe\":case \"object\":case \"embed\":D(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;eHj&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304)}else{if(!d)if(a=Mh(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Ej(f,!0),null===f.tail&&\"hidden\"===f.tailMode&&!g.alternate&&!I)return S(b),null}else 2*B()-f.renderingStartTime>Hj&&1073741824!==c&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g)}if(null!==f.tail)return b=f.tail,f.rendering=\nb,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=M.current,G(M,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Ij(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(gj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null}throw Error(p(156,b.tag));}\nfunction Jj(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return Jh(),E(Wf),E(H),Oh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Lh(b),null;case 13:E(M);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Ig()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(M),null;case 4:return Jh(),null;case 10:return Rg(b.type._context),null;case 22:case 23:return Ij(),\nnull;case 24:return null;default:return null}}var Kj=!1,U=!1,Lj=\"function\"===typeof WeakSet?WeakSet:Set,V=null;function Mj(a,b){var c=a.ref;if(null!==c)if(\"function\"===typeof c)try{c(null)}catch(d){W(a,b,d)}else c.current=null}function Nj(a,b,c){try{c()}catch(d){W(a,b,d)}}var Oj=!1;\nfunction Pj(a,b){Cf=dd;a=Me();if(Ne(a)){if(\"selectionStart\"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(F){c=null;break a}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+=\nq.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode}q=y}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Df={focusedElem:a,selectionRange:c};dd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break;\ncase 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Lg(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent=\"\":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163));}}catch(F){W(b,b.return,F)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}n=Oj;Oj=!1;return n}\nfunction Qj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Nj(b,c,f)}e=e.next}while(e!==d)}}function Rj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Sj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}\"function\"===typeof b?b(a):b.current=a}}\nfunction Tj(a){var b=a.alternate;null!==b&&(a.alternate=null,Tj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Uj(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction Vj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Uj(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}\nfunction Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling}\nfunction Xj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Xj(a,b,c),a=a.sibling;null!==a;)Xj(a,b,c),a=a.sibling}var X=null,Yj=!1;function Zj(a,b,c){for(c=c.child;null!==c;)ak(a,b,c),c=c.sibling}\nfunction ak(a,b,c){if(lc&&\"function\"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c)}catch(h){}switch(c.tag){case 5:U||Mj(c,b);case 6:var d=X,e=Yj;X=null;Zj(a,b,c);X=d;Yj=e;null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Yj;X=c.stateNode.containerInfo;Yj=!0;\nZj(a,b,c);X=d;Yj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Nj(c,b,g):0!==(f&4)&&Nj(c,b,g));e=e.next}while(e!==d)}Zj(a,b,c);break;case 1:if(!U&&(Mj(c,b),d=c.stateNode,\"function\"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){W(c,b,h)}Zj(a,b,c);break;case 21:Zj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!==\nc.memoizedState,Zj(a,b,c),U=d):Zj(a,b,c);break;default:Zj(a,b,c)}}function bk(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Lj);b.forEach(function(b){var d=ck.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction dk(a,b){var c=b.deletions;if(null!==c)for(var d=0;de&&(e=g);d&=~f}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*mk(d/1960))-d;if(10a?16:a;if(null===xk)var d=!1;else{a=xk;xk=null;yk=0;if(0!==(K&6))throw Error(p(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;kB()-gk?Lk(a,0):sk|=c);Ek(a,b)}function Zk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=L();a=Zg(a,b);null!==a&&(Ac(a,b,c),Ek(a,c))}function vj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Zk(a,c)}\nfunction ck(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p(314));}null!==d&&d.delete(b);Zk(a,c)}var Wk;\nWk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Wf.current)Ug=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return Ug=!1,zj(a,b,c);Ug=0!==(a.flags&131072)?!0:!1}else Ug=!1,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;jj(a,b);a=b.pendingProps;var e=Yf(b,H.current);Tg(b,c);e=Xh(null,b,d,a,e,c);var f=bi();b.flags|=1;\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=\nnull,Zf(d)?(f=!0,cg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,ah(b),e.updater=nh,b.stateNode=e,e._reactInternals=b,rh(b,d,a,c),b=kj(null,b,d,!0,f,c)):(b.tag=0,I&&f&&vg(b),Yi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{jj(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=$k(d);a=Lg(d,a);switch(e){case 0:b=dj(null,b,d,a,c);break a;case 1:b=ij(null,b,d,a,c);break a;case 11:b=Zi(null,b,d,a,c);break a;case 14:b=aj(null,b,d,Lg(d.type,a),c);break a}throw Error(p(306,\nd,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),dj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),ij(a,b,d,e,c);case 3:a:{lj(b);if(null===a)throw Error(p(387));d=b.pendingProps;f=b.memoizedState;e=f.element;bh(a,b);gh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=\nf,b.memoizedState=f,b.flags&256){e=Ki(Error(p(423)),b);b=mj(a,b,d,c,e);break a}else if(d!==e){e=Ki(Error(p(424)),b);b=mj(a,b,d,c,e);break a}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=!0,zg=null,c=Ch(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ig();if(d===e){b=$i(a,b,c);break a}Yi(a,b,d,c)}b=b.child}return b;case 5:return Kh(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32),\nhj(a,b),Yi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return pj(a,b,c);case 4:return Ih(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Bh(b,null,d,c):Yi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),Zi(a,b,d,e,c);case 7:return Yi(a,b,b.pendingProps,c),b.child;case 8:return Yi(a,b,b.pendingProps.children,c),b.child;case 12:return Yi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;\ng=e.value;G(Mg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=$i(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=ch(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);Sg(f.return,\nc,b);h.lanes|=c;break}k=k.next}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);Sg(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}Yi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,Tg(b,c),e=Vg(e),d=d(e),b.flags|=1,Yi(a,b,d,c),\nb.child;case 14:return d=b.type,e=Lg(d,b.pendingProps),e=Lg(d.type,e),aj(a,b,d,e,c);case 15:return cj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),jj(a,b),b.tag=1,Zf(d)?(a=!0,cg(b)):a=!1,Tg(b,c),ph(b,d,e),rh(b,d,e,c),kj(null,b,d,!0,a,c);case 19:return yj(a,b,c);case 22:return ej(a,b,c)}throw Error(p(156,b.tag));};function Gk(a,b){return ac(a,b)}\nfunction al(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function Bg(a,b,c,d){return new al(a,b,c,d)}function bj(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction $k(a){if(\"function\"===typeof a)return bj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14}return 2}\nfunction wh(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction yh(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)bj(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ya:return Ah(c.children,e,f,b);case za:g=8;e|=8;break;case Aa:return a=Bg(12,c,b,e|2),a.elementType=Aa,a.lanes=f,a;case Ea:return a=Bg(13,c,b,e),a.elementType=Ea,a.lanes=f,a;case Fa:return a=Bg(19,c,b,e),a.elementType=Fa,a.lanes=f,a;case Ia:return qj(c,e,f,b);default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case Ba:g=10;break a;case Ca:g=9;break a;case Da:g=11;\nbreak a;case Ga:g=14;break a;case Ha:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,\"\"));}b=Bg(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Ah(a,b,c,d){a=Bg(7,a,d,b);a.lanes=c;return a}function qj(a,b,c,d){a=Bg(22,a,d,b);a.elementType=Ia;a.lanes=c;a.stateNode={isHidden:!1};return a}function xh(a,b,c){a=Bg(6,a,null,b);a.lanes=c;return a}\nfunction zh(a,b,c){b=Bg(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction bl(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData=\nnull}function cl(a,b,c,d,e,f,g,h,k){a=new bl(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=Bg(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};ah(f);return a}function dl(a,b,c){var d=3 batch = newBatch; // Supply a getter just to skip dealing with ESM bindings\n\nexport const getBatch = () => batch;","import { createContext } from 'react';\nexport const ReactReduxContext = /*#__PURE__*/createContext(null);\n\nif (process.env.NODE_ENV !== 'production') {\n ReactReduxContext.displayName = 'ReactRedux';\n}\n\nexport default ReactReduxContext;","import { useContext } from 'react';\nimport { ReactReduxContext } from '../components/Context';\n\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

    \r\n * }\r\n */\nexport function useReduxContext() {\n const contextValue = useContext(ReactReduxContext);\n\n if (process.env.NODE_ENV !== 'production' && !contextValue) {\n throw new Error('could not find react-redux context value; please ensure the component is wrapped in a ');\n }\n\n return contextValue;\n}","export const notInitialized = () => {\n throw new Error('uSES not initialized!');\n};","import { useContext, useDebugValue } from 'react';\nimport { useReduxContext as useDefaultReduxContext } from './useReduxContext';\nimport { ReactReduxContext } from '../components/Context';\nimport { notInitialized } from '../utils/useSyncExternalStore';\nlet useSyncExternalStoreWithSelector = notInitialized;\nexport const initializeUseSelector = fn => {\n useSyncExternalStoreWithSelector = fn;\n};\n\nconst refEquality = (a, b) => a === b;\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 ``.\r\n * @returns {Function} A `useSelector` hook bound to the specified context.\r\n */\n\n\nexport function createSelectorHook(context = ReactReduxContext) {\n const useReduxContext = context === ReactReduxContext ? useDefaultReduxContext : () => useContext(context);\n return function useSelector(selector, equalityFn = refEquality) {\n if (process.env.NODE_ENV !== 'production') {\n if (!selector) {\n throw new Error(`You must pass a selector to useSelector`);\n }\n\n if (typeof selector !== 'function') {\n throw new Error(`You must pass a function as a selector to useSelector`);\n }\n\n if (typeof equalityFn !== 'function') {\n throw new Error(`You must pass a function as an equality function to useSelector`);\n }\n }\n\n const {\n store,\n subscription,\n getServerState\n } = useReduxContext();\n const selectedState = useSyncExternalStoreWithSelector(subscription.addNestedSub, store.getState, getServerState || store.getState, selector, equalityFn);\n useDebugValue(selectedState);\n return selectedState;\n };\n}\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
    {counter}
    \r\n * }\r\n */\n\nexport const useSelector = /*#__PURE__*/createSelectorHook();","import { getBatch } from './batch'; // encapsulates the subscription logic for connecting a component to the redux store, as\n// well as nesting subscriptions of descendant components, so that we can ensure the\n// ancestor components re-render before descendants\n\nfunction createListenerCollection() {\n const batch = getBatch();\n let first = null;\n let last = null;\n return {\n clear() {\n first = null;\n last = null;\n },\n\n notify() {\n batch(() => {\n let listener = first;\n\n while (listener) {\n listener.callback();\n listener = listener.next;\n }\n });\n },\n\n get() {\n let listeners = [];\n let listener = first;\n\n while (listener) {\n listeners.push(listener);\n listener = listener.next;\n }\n\n return listeners;\n },\n\n subscribe(callback) {\n let isSubscribed = true;\n let listener = last = {\n callback,\n next: null,\n prev: last\n };\n\n if (listener.prev) {\n listener.prev.next = listener;\n } else {\n first = listener;\n }\n\n return function unsubscribe() {\n if (!isSubscribed || first === null) return;\n isSubscribed = false;\n\n if (listener.next) {\n listener.next.prev = listener.prev;\n } else {\n last = listener.prev;\n }\n\n if (listener.prev) {\n listener.prev.next = listener.next;\n } else {\n first = listener.next;\n }\n };\n }\n\n };\n}\n\nconst nullListeners = {\n notify() {},\n\n get: () => []\n};\nexport function createSubscription(store, parentSub) {\n let unsubscribe;\n let listeners = nullListeners;\n\n function addNestedSub(listener) {\n trySubscribe();\n return listeners.subscribe(listener);\n }\n\n function notifyNestedSubs() {\n listeners.notify();\n }\n\n function handleChangeWrapper() {\n if (subscription.onStateChange) {\n subscription.onStateChange();\n }\n }\n\n function isSubscribed() {\n return Boolean(unsubscribe);\n }\n\n function trySubscribe() {\n if (!unsubscribe) {\n unsubscribe = parentSub ? parentSub.addNestedSub(handleChangeWrapper) : store.subscribe(handleChangeWrapper);\n listeners = createListenerCollection();\n }\n }\n\n function tryUnsubscribe() {\n if (unsubscribe) {\n unsubscribe();\n unsubscribe = undefined;\n listeners.clear();\n listeners = nullListeners;\n }\n }\n\n const subscription = {\n addNestedSub,\n notifyNestedSubs,\n handleChangeWrapper,\n isSubscribed,\n trySubscribe,\n tryUnsubscribe,\n getListeners: () => listeners\n };\n return subscription;\n}","import { useEffect, useLayoutEffect } from 'react'; // React currently throws a warning when using useLayoutEffect on the server.\n// To get around it, we can conditionally useEffect on the server (no-op) and\n// useLayoutEffect in the browser. We need useLayoutEffect to ensure the store\n// subscription callback always has the selector from the latest render commit\n// available, otherwise a store update may happen between render and the effect,\n// which may cause missed updates; we also must ensure the store subscription\n// is created synchronously, otherwise a store update may occur before the\n// subscription is created and an inconsistent state may be observed\n// Matches logic in React's `shared/ExecutionEnvironment` file\n\nexport const canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');\nexport const useIsomorphicLayoutEffect = canUseDOM ? useLayoutEffect : useEffect;","import React, { useMemo } from 'react';\nimport { ReactReduxContext } from './Context';\nimport { createSubscription } from '../utils/Subscription';\nimport { useIsomorphicLayoutEffect } from '../utils/useIsomorphicLayoutEffect';\n\nfunction Provider({\n store,\n context,\n children,\n serverState\n}) {\n const contextValue = useMemo(() => {\n const subscription = createSubscription(store);\n return {\n store,\n subscription,\n getServerState: serverState ? () => serverState : undefined\n };\n }, [store, serverState]);\n const previousState = useMemo(() => store.getState(), [store]);\n useIsomorphicLayoutEffect(() => {\n const {\n subscription\n } = contextValue;\n subscription.onStateChange = subscription.notifyNestedSubs;\n subscription.trySubscribe();\n\n if (previousState !== store.getState()) {\n subscription.notifyNestedSubs();\n }\n\n return () => {\n subscription.tryUnsubscribe();\n subscription.onStateChange = undefined;\n };\n }, [contextValue, previousState]);\n const Context = context || ReactReduxContext; // @ts-ignore 'AnyAction' is assignable to the constraint of type 'A', but 'A' could be instantiated with a different subtype\n\n return /*#__PURE__*/React.createElement(Context.Provider, {\n value: contextValue\n }, children);\n}\n\nexport default Provider;","import { useContext } from 'react';\nimport { ReactReduxContext } from '../components/Context';\nimport { useReduxContext as useDefaultReduxContext } from './useReduxContext';\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 ``.\r\n * @returns {Function} A `useStore` hook bound to the specified context.\r\n */\n\nexport function createStoreHook(context = ReactReduxContext) {\n const useReduxContext = // @ts-ignore\n context === ReactReduxContext ? useDefaultReduxContext : () => useContext(context);\n return function useStore() {\n const {\n store\n } = useReduxContext(); // @ts-ignore\n\n return store;\n };\n}\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
    {store.getState()}
    \r\n * }\r\n */\n\nexport const useStore = /*#__PURE__*/createStoreHook();","import { ReactReduxContext } from '../components/Context';\nimport { useStore as useDefaultStore, createStoreHook } from './useStore';\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 ``.\r\n * @returns {Function} A `useDispatch` hook bound to the specified context.\r\n */\n\nexport function createDispatchHook(context = ReactReduxContext) {\n const useStore = // @ts-ignore\n context === ReactReduxContext ? useDefaultStore : createStoreHook(context);\n return function useDispatch() {\n const store = useStore(); // @ts-ignore\n\n return store.dispatch;\n };\n}\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 *
    \r\n * {value}\r\n * \r\n *
    \r\n * )\r\n * }\r\n */\n\nexport const useDispatch = /*#__PURE__*/createDispatchHook();","function is(x, y) {\n if (x === y) {\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n}\n\nexport default function shallowEqual(objA, objB) {\n if (is(objA, objB)) return true;\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n const keysA = Object.keys(objA);\n const keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) return false;\n\n for (let i = 0; i < keysA.length; i++) {\n if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}","// The primary entry point assumes we're working with standard ReactDOM/RN, but\n// older versions that do not include `useSyncExternalStore` (React 16.9 - 17.x).\n// Because of that, the useSyncExternalStore compat shim is needed.\nimport { useSyncExternalStore } from 'use-sync-external-store/shim';\nimport { useSyncExternalStoreWithSelector } from 'use-sync-external-store/shim/with-selector';\nimport { unstable_batchedUpdates as batch } from './utils/reactBatchedUpdates';\nimport { setBatch } from './utils/batch';\nimport { initializeUseSelector } from './hooks/useSelector';\nimport { initializeConnect } from './components/connect';\ninitializeUseSelector(useSyncExternalStoreWithSelector);\ninitializeConnect(useSyncExternalStore); // Enable batched updates in our subscriptions for use\n// with standard React renderers (ReactDOM, React Native)\n\nsetBatch(batch);\nexport { batch };\nexport * from './exports';","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"reactReduxForwardedRef\"];\n\n/* eslint-disable valid-jsdoc, @typescript-eslint/no-unused-vars */\nimport hoistStatics from 'hoist-non-react-statics';\nimport React, { useContext, useMemo, useRef } from 'react';\nimport { isValidElementType, isContextConsumer } from 'react-is';\nimport defaultSelectorFactory from '../connect/selectorFactory';\nimport { mapDispatchToPropsFactory } from '../connect/mapDispatchToProps';\nimport { mapStateToPropsFactory } from '../connect/mapStateToProps';\nimport { mergePropsFactory } from '../connect/mergeProps';\nimport { createSubscription } from '../utils/Subscription';\nimport { useIsomorphicLayoutEffect } from '../utils/useIsomorphicLayoutEffect';\nimport shallowEqual from '../utils/shallowEqual';\nimport warning from '../utils/warning';\nimport { ReactReduxContext } from './Context';\nimport { notInitialized } from '../utils/useSyncExternalStore';\nlet useSyncExternalStore = notInitialized;\nexport const initializeConnect = fn => {\n useSyncExternalStore = fn;\n}; // Define some constant arrays just to avoid re-creating these\n\nconst EMPTY_ARRAY = [null, 0];\nconst NO_SUBSCRIPTION_ARRAY = [null, null]; // Attempts to stringify whatever not-really-a-component value we were given\n// for logging in an error message\n\nconst stringifyComponent = Comp => {\n try {\n return JSON.stringify(Comp);\n } catch (err) {\n return String(Comp);\n }\n};\n\n// This is \"just\" a `useLayoutEffect`, but with two modifications:\n// - we need to fall back to `useEffect` in SSR to avoid annoying warnings\n// - we extract this to a separate function to avoid closing over values\n// and causing memory leaks\nfunction useIsomorphicLayoutEffectWithArgs(effectFunc, effectArgs, dependencies) {\n useIsomorphicLayoutEffect(() => effectFunc(...effectArgs), dependencies);\n} // Effect callback, extracted: assign the latest props values to refs for later usage\n\n\nfunction captureWrapperProps(lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, // actualChildProps: unknown,\nchildPropsFromStoreUpdate, notifyNestedSubs) {\n // We want to capture the wrapper props and child props we used for later comparisons\n lastWrapperProps.current = wrapperProps;\n renderIsScheduled.current = false; // If the render was from a store update, clear out that reference and cascade the subscriber update\n\n if (childPropsFromStoreUpdate.current) {\n childPropsFromStoreUpdate.current = null;\n notifyNestedSubs();\n }\n} // Effect callback, extracted: subscribe to the Redux store or nearest connected ancestor,\n// check for updates after dispatched actions, and trigger re-renders.\n\n\nfunction subscribeUpdates(shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, isMounted, childPropsFromStoreUpdate, notifyNestedSubs, // forceComponentUpdateDispatch: React.Dispatch,\nadditionalSubscribeListener) {\n // If we're not subscribed to the store, nothing to do here\n if (!shouldHandleStateChanges) return () => {}; // Capture values for checking if and when this component unmounts\n\n let didUnsubscribe = false;\n let lastThrownError = null; // We'll run this callback every time a store subscription update propagates to this component\n\n const checkForUpdates = () => {\n if (didUnsubscribe || !isMounted.current) {\n // Don't run stale listeners.\n // Redux doesn't guarantee unsubscriptions happen until next dispatch.\n return;\n } // TODO We're currently calling getState ourselves here, rather than letting `uSES` do it\n\n\n const latestStoreState = store.getState();\n let newChildProps, error;\n\n try {\n // Actually run the selector with the most recent store state and wrapper props\n // to determine what the child props should be\n newChildProps = childPropsSelector(latestStoreState, lastWrapperProps.current);\n } catch (e) {\n error = e;\n lastThrownError = e;\n }\n\n if (!error) {\n lastThrownError = null;\n } // If the child props haven't changed, nothing to do here - cascade the subscription update\n\n\n if (newChildProps === lastChildProps.current) {\n if (!renderIsScheduled.current) {\n notifyNestedSubs();\n }\n } else {\n // Save references to the new child props. Note that we track the \"child props from store update\"\n // as a ref instead of a useState/useReducer because we need a way to determine if that value has\n // been processed. If this went into useState/useReducer, we couldn't clear out the value without\n // forcing another re-render, which we don't want.\n lastChildProps.current = newChildProps;\n childPropsFromStoreUpdate.current = newChildProps;\n renderIsScheduled.current = true; // TODO This is hacky and not how `uSES` is meant to be used\n // Trigger the React `useSyncExternalStore` subscriber\n\n additionalSubscribeListener();\n }\n }; // Actually subscribe to the nearest connected ancestor (or store)\n\n\n subscription.onStateChange = checkForUpdates;\n subscription.trySubscribe(); // Pull data from the store after first render in case the store has\n // changed since we began.\n\n checkForUpdates();\n\n const unsubscribeWrapper = () => {\n didUnsubscribe = true;\n subscription.tryUnsubscribe();\n subscription.onStateChange = null;\n\n if (lastThrownError) {\n // It's possible that we caught an error due to a bad mapState function, but the\n // parent re-rendered without this component and we're about to unmount.\n // This shouldn't happen as long as we do top-down subscriptions correctly, but\n // if we ever do those wrong, this throw will surface the error in our tests.\n // In that case, throw the error from here so it doesn't get lost.\n throw lastThrownError;\n }\n };\n\n return unsubscribeWrapper;\n} // Reducer initial state creation for our update reducer\n\n\nconst initStateUpdates = () => EMPTY_ARRAY;\n\nfunction strictEqual(a, b) {\n return a === b;\n}\n/**\r\n * Infers the type of props that a connector will inject into a component.\r\n */\n\n\nlet hasWarnedAboutDeprecatedPureOption = false;\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 */\n\nfunction connect(mapStateToProps, mapDispatchToProps, mergeProps, {\n // The `pure` option has been removed, so TS doesn't like us destructuring this to check its existence.\n // @ts-ignore\n pure,\n areStatesEqual = strictEqual,\n areOwnPropsEqual = shallowEqual,\n areStatePropsEqual = shallowEqual,\n areMergedPropsEqual = shallowEqual,\n // use React's forwardRef to expose a ref of the wrapped component\n forwardRef = false,\n // the context consumer to use\n context = ReactReduxContext\n} = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (pure !== undefined && !hasWarnedAboutDeprecatedPureOption) {\n hasWarnedAboutDeprecatedPureOption = true;\n warning('The `pure` option has been removed. `connect` is now always a \"pure/memoized\" component');\n }\n }\n\n const Context = context;\n const initMapStateToProps = mapStateToPropsFactory(mapStateToProps);\n const initMapDispatchToProps = mapDispatchToPropsFactory(mapDispatchToProps);\n const initMergeProps = mergePropsFactory(mergeProps);\n const shouldHandleStateChanges = Boolean(mapStateToProps);\n\n const wrapWithConnect = WrappedComponent => {\n if (process.env.NODE_ENV !== 'production' && !isValidElementType(WrappedComponent)) {\n throw new Error(`You must pass a component to the function returned by connect. Instead received ${stringifyComponent(WrappedComponent)}`);\n }\n\n const wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n const displayName = `Connect(${wrappedComponentName})`;\n const selectorFactoryOptions = {\n shouldHandleStateChanges,\n displayName,\n wrappedComponentName,\n WrappedComponent,\n // @ts-ignore\n initMapStateToProps,\n // @ts-ignore\n initMapDispatchToProps,\n initMergeProps,\n areStatesEqual,\n areStatePropsEqual,\n areOwnPropsEqual,\n areMergedPropsEqual\n };\n\n function ConnectFunction(props) {\n const [propsContext, reactReduxForwardedRef, wrapperProps] = useMemo(() => {\n // Distinguish between actual \"data\" props that were passed to the wrapper component,\n // and values needed to control behavior (forwarded refs, alternate context instances).\n // To maintain the wrapperProps object reference, memoize this destructuring.\n const {\n reactReduxForwardedRef\n } = props,\n wrapperProps = _objectWithoutPropertiesLoose(props, _excluded);\n\n return [props.context, reactReduxForwardedRef, wrapperProps];\n }, [props]);\n const ContextToUse = useMemo(() => {\n // Users may optionally pass in a custom context instance to use instead of our ReactReduxContext.\n // Memoize the check that determines which context instance we should use.\n return propsContext && propsContext.Consumer && // @ts-ignore\n isContextConsumer( /*#__PURE__*/React.createElement(propsContext.Consumer, null)) ? propsContext : Context;\n }, [propsContext, Context]); // Retrieve the store and ancestor subscription via context, if available\n\n const contextValue = useContext(ContextToUse); // The store _must_ exist as either a prop or in context.\n // We'll check to see if it _looks_ like a Redux store first.\n // This allows us to pass through a `store` prop that is just a plain value.\n\n const didStoreComeFromProps = Boolean(props.store) && Boolean(props.store.getState) && Boolean(props.store.dispatch);\n const didStoreComeFromContext = Boolean(contextValue) && Boolean(contextValue.store);\n\n if (process.env.NODE_ENV !== 'production' && !didStoreComeFromProps && !didStoreComeFromContext) {\n throw new Error(`Could not find \"store\" in the context of ` + `\"${displayName}\". Either wrap the root component in a , ` + `or pass a custom React context provider to and the corresponding ` + `React context consumer to ${displayName} in connect options.`);\n } // Based on the previous check, one of these must be true\n\n\n const store = didStoreComeFromProps ? props.store : contextValue.store;\n const getServerState = didStoreComeFromContext ? contextValue.getServerState : store.getState;\n const childPropsSelector = useMemo(() => {\n // The child props selector needs the store reference as an input.\n // Re-create this selector whenever the store changes.\n return defaultSelectorFactory(store.dispatch, selectorFactoryOptions);\n }, [store]);\n const [subscription, notifyNestedSubs] = useMemo(() => {\n if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY; // This Subscription's source should match where store came from: props vs. context. A component\n // connected to the store via props shouldn't use subscription from context, or vice versa.\n\n const subscription = createSubscription(store, didStoreComeFromProps ? undefined : contextValue.subscription); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in\n // the middle of the notification loop, where `subscription` will then be null. This can\n // probably be avoided if Subscription's listeners logic is changed to not call listeners\n // that have been unsubscribed in the middle of the notification loop.\n\n const notifyNestedSubs = subscription.notifyNestedSubs.bind(subscription);\n return [subscription, notifyNestedSubs];\n }, [store, didStoreComeFromProps, contextValue]); // Determine what {store, subscription} value should be put into nested context, if necessary,\n // and memoize that value to avoid unnecessary context updates.\n\n const overriddenContextValue = useMemo(() => {\n if (didStoreComeFromProps) {\n // This component is directly subscribed to a store from props.\n // We don't want descendants reading from this store - pass down whatever\n // the existing context value is from the nearest connected ancestor.\n return contextValue;\n } // Otherwise, put this component's subscription instance into context, so that\n // connected descendants won't update until after this component is done\n\n\n return _extends({}, contextValue, {\n subscription\n });\n }, [didStoreComeFromProps, contextValue, subscription]); // Set up refs to coordinate values between the subscription effect and the render logic\n\n const lastChildProps = useRef();\n const lastWrapperProps = useRef(wrapperProps);\n const childPropsFromStoreUpdate = useRef();\n const renderIsScheduled = useRef(false);\n const isProcessingDispatch = useRef(false);\n const isMounted = useRef(false);\n const latestSubscriptionCallbackError = useRef();\n useIsomorphicLayoutEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n const actualChildPropsSelector = useMemo(() => {\n const selector = () => {\n // Tricky logic here:\n // - This render may have been triggered by a Redux store update that produced new child props\n // - However, we may have gotten new wrapper props after that\n // If we have new child props, and the same wrapper props, we know we should use the new child props as-is.\n // But, if we have new wrapper props, those might change the child props, so we have to recalculate things.\n // So, we'll use the child props from store update only if the wrapper props are the same as last time.\n if (childPropsFromStoreUpdate.current && wrapperProps === lastWrapperProps.current) {\n return childPropsFromStoreUpdate.current;\n } // TODO We're reading the store directly in render() here. Bad idea?\n // This will likely cause Bad Things (TM) to happen in Concurrent Mode.\n // Note that we do this because on renders _not_ caused by store updates, we need the latest store state\n // to determine what the child props should be.\n\n\n return childPropsSelector(store.getState(), wrapperProps);\n };\n\n return selector;\n }, [store, wrapperProps]); // We need this to execute synchronously every time we re-render. However, React warns\n // about useLayoutEffect in SSR, so we try to detect environment and fall back to\n // just useEffect instead to avoid the warning, since neither will run anyway.\n\n const subscribeForReact = useMemo(() => {\n const subscribe = reactListener => {\n if (!subscription) {\n return () => {};\n }\n\n return subscribeUpdates(shouldHandleStateChanges, store, subscription, // @ts-ignore\n childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, isMounted, childPropsFromStoreUpdate, notifyNestedSubs, reactListener);\n };\n\n return subscribe;\n }, [subscription]);\n useIsomorphicLayoutEffectWithArgs(captureWrapperProps, [lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, childPropsFromStoreUpdate, notifyNestedSubs]);\n let actualChildProps;\n\n try {\n actualChildProps = useSyncExternalStore( // TODO We're passing through a big wrapper that does a bunch of extra side effects besides subscribing\n subscribeForReact, // TODO This is incredibly hacky. We've already processed the store update and calculated new child props,\n // TODO and we're just passing that through so it triggers a re-render for us rather than relying on `uSES`.\n actualChildPropsSelector, getServerState ? () => childPropsSelector(getServerState(), wrapperProps) : actualChildPropsSelector);\n } catch (err) {\n if (latestSubscriptionCallbackError.current) {\n ;\n err.message += `\\nThe error may be correlated with this previous error:\\n${latestSubscriptionCallbackError.current.stack}\\n\\n`;\n }\n\n throw err;\n }\n\n useIsomorphicLayoutEffect(() => {\n latestSubscriptionCallbackError.current = undefined;\n childPropsFromStoreUpdate.current = undefined;\n lastChildProps.current = actualChildProps;\n }); // Now that all that's done, we can finally try to actually render the child component.\n // We memoize the elements for the rendered child component as an optimization.\n\n const renderedWrappedComponent = useMemo(() => {\n return (\n /*#__PURE__*/\n // @ts-ignore\n React.createElement(WrappedComponent, _extends({}, actualChildProps, {\n ref: reactReduxForwardedRef\n }))\n );\n }, [reactReduxForwardedRef, WrappedComponent, actualChildProps]); // If React sees the exact same element reference as last time, it bails out of re-rendering\n // that child, same as if it was wrapped in React.memo() or returned false from shouldComponentUpdate.\n\n const renderedChild = useMemo(() => {\n if (shouldHandleStateChanges) {\n // If this component is subscribed to store updates, we need to pass its own\n // subscription instance down to our descendants. That means rendering the same\n // Context instance, and putting a different value into the context.\n return /*#__PURE__*/React.createElement(ContextToUse.Provider, {\n value: overriddenContextValue\n }, renderedWrappedComponent);\n }\n\n return renderedWrappedComponent;\n }, [ContextToUse, renderedWrappedComponent, overriddenContextValue]);\n return renderedChild;\n }\n\n const _Connect = React.memo(ConnectFunction);\n\n // Add a hacky cast to get the right output type\n const Connect = _Connect;\n Connect.WrappedComponent = WrappedComponent;\n Connect.displayName = ConnectFunction.displayName = displayName;\n\n if (forwardRef) {\n const _forwarded = React.forwardRef(function forwardConnectRef(props, ref) {\n // @ts-ignore\n return /*#__PURE__*/React.createElement(Connect, _extends({}, props, {\n reactReduxForwardedRef: ref\n }));\n });\n\n const forwarded = _forwarded;\n forwarded.displayName = displayName;\n forwarded.WrappedComponent = WrappedComponent;\n return hoistStatics(forwarded, WrappedComponent);\n }\n\n return hoistStatics(Connect, WrappedComponent);\n };\n\n return wrapWithConnect;\n}\n\nexport default connect;","/**\n * @license React\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=Symbol.for(\"react.element\"),c=Symbol.for(\"react.portal\"),d=Symbol.for(\"react.fragment\"),e=Symbol.for(\"react.strict_mode\"),f=Symbol.for(\"react.profiler\"),g=Symbol.for(\"react.provider\"),h=Symbol.for(\"react.context\"),k=Symbol.for(\"react.server_context\"),l=Symbol.for(\"react.forward_ref\"),m=Symbol.for(\"react.suspense\"),n=Symbol.for(\"react.suspense_list\"),p=Symbol.for(\"react.memo\"),q=Symbol.for(\"react.lazy\"),t=Symbol.for(\"react.offscreen\"),u;u=Symbol.for(\"react.module.reference\");\nfunction v(a){if(\"object\"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;\nexports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};\nexports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||\"object\"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};exports.typeOf=v;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/**\n * NOTE: If you refactor this to split up the modules into separate files,\n * you'll need to update the rollup config for react-router-dom-v5-compat.\n */\nimport * as React from \"react\";\nimport type {\n NavigateOptions,\n RelativeRoutingType,\n RouteObject,\n To,\n} from \"react-router\";\nimport {\n Router,\n createPath,\n useHref,\n useLocation,\n useMatch,\n useMatches,\n useNavigate,\n useNavigation,\n useResolvedPath,\n UNSAFE_DataRouterContext as DataRouterContext,\n UNSAFE_DataRouterStateContext as DataRouterStateContext,\n UNSAFE_NavigationContext as NavigationContext,\n UNSAFE_RouteContext as RouteContext,\n UNSAFE_enhanceManualRouteObjects as enhanceManualRouteObjects,\n} from \"react-router\";\nimport type {\n BrowserHistory,\n Fetcher,\n FormEncType,\n FormMethod,\n GetScrollRestorationKeyFunction,\n HashHistory,\n History,\n HydrationState,\n Router as RemixRouter,\n} from \"@remix-run/router\";\nimport {\n createRouter,\n createBrowserHistory,\n createHashHistory,\n invariant,\n joinPaths,\n matchPath,\n} from \"@remix-run/router\";\n\nimport type {\n SubmitOptions,\n ParamKeyValuePair,\n URLSearchParamsInit,\n} from \"./dom\";\nimport {\n createSearchParams,\n defaultMethod,\n getFormSubmissionInfo,\n getSearchParamsForLocation,\n shouldProcessLinkClick,\n} from \"./dom\";\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Re-exports\n////////////////////////////////////////////////////////////////////////////////\n\nexport type {\n FormEncType,\n FormMethod,\n ParamKeyValuePair,\n SubmitOptions,\n URLSearchParamsInit,\n};\nexport { createSearchParams };\n\n// Note: Keep in sync with react-router exports!\nexport type {\n ActionFunction,\n ActionFunctionArgs,\n AwaitProps,\n DataRouteMatch,\n DataRouteObject,\n Fetcher,\n Hash,\n IndexRouteObject,\n IndexRouteProps,\n JsonFunction,\n LayoutRouteProps,\n LoaderFunction,\n LoaderFunctionArgs,\n Location,\n MemoryRouterProps,\n NavigateFunction,\n NavigateOptions,\n NavigateProps,\n Navigation,\n Navigator,\n NonIndexRouteObject,\n OutletProps,\n Params,\n ParamParseKey,\n Path,\n PathMatch,\n Pathname,\n PathPattern,\n PathRouteProps,\n RedirectFunction,\n RelativeRoutingType,\n RouteMatch,\n RouteObject,\n RouteProps,\n RouterProps,\n RouterProviderProps,\n RoutesProps,\n Search,\n ShouldRevalidateFunction,\n To,\n} from \"react-router\";\nexport {\n AbortedDeferredError,\n Await,\n MemoryRouter,\n Navigate,\n NavigationType,\n Outlet,\n Route,\n Router,\n RouterProvider,\n Routes,\n createMemoryRouter,\n createPath,\n createRoutesFromChildren,\n createRoutesFromElements,\n defer,\n isRouteErrorResponse,\n generatePath,\n json,\n matchPath,\n matchRoutes,\n parsePath,\n redirect,\n renderMatches,\n resolvePath,\n useActionData,\n useAsyncError,\n useAsyncValue,\n useHref,\n useInRouterContext,\n useLoaderData,\n useLocation,\n useMatch,\n useMatches,\n useNavigate,\n useNavigation,\n useNavigationType,\n useOutlet,\n useOutletContext,\n useParams,\n useResolvedPath,\n useRevalidator,\n useRouteError,\n useRouteLoaderData,\n useRoutes,\n} from \"react-router\";\n\n///////////////////////////////////////////////////////////////////////////////\n// DANGER! PLEASE READ ME!\n// We provide these exports as an escape hatch in the event that you need any\n// routing data that we don't provide an explicit API for. With that said, we\n// want to cover your use case if we can, so if you feel the need to use these\n// we want to hear from you. Let us know what you're building and we'll do our\n// best to make sure we can support you!\n//\n// We consider these exports an implementation detail and do not guarantee\n// against any breaking changes, regardless of the semver release. Use with\n// extreme caution and only if you understand the consequences. Godspeed.\n///////////////////////////////////////////////////////////////////////////////\n\n/** @internal */\nexport {\n UNSAFE_DataRouterContext,\n UNSAFE_DataRouterStateContext,\n UNSAFE_DataStaticRouterContext,\n UNSAFE_NavigationContext,\n UNSAFE_LocationContext,\n UNSAFE_RouteContext,\n UNSAFE_enhanceManualRouteObjects,\n} from \"react-router\";\n//#endregion\n\ndeclare global {\n var __staticRouterHydrationData: HydrationState | undefined;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Routers\n////////////////////////////////////////////////////////////////////////////////\n\nexport function createBrowserRouter(\n routes: RouteObject[],\n opts?: {\n basename?: string;\n hydrationData?: HydrationState;\n window?: Window;\n }\n): RemixRouter {\n return createRouter({\n basename: opts?.basename,\n history: createBrowserHistory({ window: opts?.window }),\n hydrationData: opts?.hydrationData || window?.__staticRouterHydrationData,\n routes: enhanceManualRouteObjects(routes),\n }).initialize();\n}\n\nexport function createHashRouter(\n routes: RouteObject[],\n opts?: {\n basename?: string;\n hydrationData?: HydrationState;\n window?: Window;\n }\n): RemixRouter {\n return createRouter({\n basename: opts?.basename,\n history: createHashHistory({ window: opts?.window }),\n hydrationData: opts?.hydrationData || window?.__staticRouterHydrationData,\n routes: enhanceManualRouteObjects(routes),\n }).initialize();\n}\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Components\n////////////////////////////////////////////////////////////////////////////////\n\nexport interface BrowserRouterProps {\n basename?: string;\n children?: React.ReactNode;\n window?: Window;\n}\n\n/**\n * A `` for use in web browsers. Provides the cleanest URLs.\n */\nexport function BrowserRouter({\n basename,\n children,\n window,\n}: BrowserRouterProps) {\n let historyRef = React.useRef();\n if (historyRef.current == null) {\n historyRef.current = createBrowserHistory({ window, v5Compat: true });\n }\n\n let history = historyRef.current;\n let [state, setState] = React.useState({\n action: history.action,\n location: history.location,\n });\n\n React.useLayoutEffect(() => history.listen(setState), [history]);\n\n return (\n \n );\n}\n\nexport interface HashRouterProps {\n basename?: string;\n children?: React.ReactNode;\n window?: Window;\n}\n\n/**\n * A `` for use in web browsers. Stores the location in the hash\n * portion of the URL so it is not sent to the server.\n */\nexport function HashRouter({ basename, children, window }: HashRouterProps) {\n let historyRef = React.useRef();\n if (historyRef.current == null) {\n historyRef.current = createHashHistory({ window, v5Compat: true });\n }\n\n let history = historyRef.current;\n let [state, setState] = React.useState({\n action: history.action,\n location: history.location,\n });\n\n React.useLayoutEffect(() => history.listen(setState), [history]);\n\n return (\n \n );\n}\n\nexport interface HistoryRouterProps {\n basename?: string;\n children?: React.ReactNode;\n history: History;\n}\n\n/**\n * A `` that accepts a pre-instantiated history object. It's important\n * to note that using your own history object is highly discouraged and may add\n * two versions of the history library to your bundles unless you use the same\n * version of the history library that React Router uses internally.\n */\nfunction HistoryRouter({ basename, children, history }: HistoryRouterProps) {\n const [state, setState] = React.useState({\n action: history.action,\n location: history.location,\n });\n\n React.useLayoutEffect(() => history.listen(setState), [history]);\n\n return (\n \n );\n}\n\nif (__DEV__) {\n HistoryRouter.displayName = \"unstable_HistoryRouter\";\n}\n\nexport { HistoryRouter as unstable_HistoryRouter };\n\nexport interface LinkProps\n extends Omit, \"href\"> {\n reloadDocument?: boolean;\n replace?: boolean;\n state?: any;\n preventScrollReset?: boolean;\n relative?: RelativeRoutingType;\n to: To;\n}\n\n/**\n * The public API for rendering a history-aware
    .\n */\nexport const Link = React.forwardRef(\n function LinkWithRef(\n {\n onClick,\n relative,\n reloadDocument,\n replace,\n state,\n target,\n to,\n preventScrollReset,\n ...rest\n },\n ref\n ) {\n let href = useHref(to, { relative });\n let internalOnClick = useLinkClickHandler(to, {\n replace,\n state,\n target,\n preventScrollReset,\n relative,\n });\n function handleClick(\n event: React.MouseEvent\n ) {\n if (onClick) onClick(event);\n if (!event.defaultPrevented) {\n internalOnClick(event);\n }\n }\n\n return (\n // eslint-disable-next-line jsx-a11y/anchor-has-content\n \n );\n }\n);\n\nif (__DEV__) {\n Link.displayName = \"Link\";\n}\n\nexport interface NavLinkProps\n extends Omit {\n children?:\n | React.ReactNode\n | ((props: { isActive: boolean; isPending: boolean }) => React.ReactNode);\n caseSensitive?: boolean;\n className?:\n | string\n | ((props: {\n isActive: boolean;\n isPending: boolean;\n }) => string | undefined);\n end?: boolean;\n style?:\n | React.CSSProperties\n | ((props: {\n isActive: boolean;\n isPending: boolean;\n }) => React.CSSProperties | undefined);\n}\n\n/**\n * A wrapper that knows if it's \"active\" or not.\n */\nexport const NavLink = React.forwardRef(\n function NavLinkWithRef(\n {\n \"aria-current\": ariaCurrentProp = \"page\",\n caseSensitive = false,\n className: classNameProp = \"\",\n end = false,\n style: styleProp,\n to,\n children,\n ...rest\n },\n ref\n ) {\n let path = useResolvedPath(to, { relative: rest.relative });\n let location = useLocation();\n let routerState = React.useContext(DataRouterStateContext);\n\n let toPathname = path.pathname;\n let locationPathname = location.pathname;\n let nextLocationPathname =\n routerState && routerState.navigation && routerState.navigation.location\n ? routerState.navigation.location.pathname\n : null;\n\n if (!caseSensitive) {\n locationPathname = locationPathname.toLowerCase();\n nextLocationPathname = nextLocationPathname\n ? nextLocationPathname.toLowerCase()\n : null;\n toPathname = toPathname.toLowerCase();\n }\n\n let isActive =\n locationPathname === toPathname ||\n (!end &&\n locationPathname.startsWith(toPathname) &&\n locationPathname.charAt(toPathname.length) === \"/\");\n\n let isPending =\n nextLocationPathname != null &&\n (nextLocationPathname === toPathname ||\n (!end &&\n nextLocationPathname.startsWith(toPathname) &&\n nextLocationPathname.charAt(toPathname.length) === \"/\"));\n\n let ariaCurrent = isActive ? ariaCurrentProp : undefined;\n\n let className: string | undefined;\n if (typeof classNameProp === \"function\") {\n className = classNameProp({ isActive, isPending });\n } else {\n // If the className prop is not a function, we use a default `active`\n // class for s that are active. In v5 `active` was the default\n // value for `activeClassName`, but we are removing that API and can still\n // use the old default behavior for a cleaner upgrade path and keep the\n // simple styling rules working as they currently do.\n className = [\n classNameProp,\n isActive ? \"active\" : null,\n isPending ? \"pending\" : null,\n ]\n .filter(Boolean)\n .join(\" \");\n }\n\n let style =\n typeof styleProp === \"function\"\n ? styleProp({ isActive, isPending })\n : styleProp;\n\n return (\n \n {typeof children === \"function\"\n ? children({ isActive, isPending })\n : children}\n \n );\n }\n);\n\nif (__DEV__) {\n NavLink.displayName = \"NavLink\";\n}\n\nexport interface FormProps extends React.FormHTMLAttributes {\n /**\n * The HTTP verb to use when the form is submit. Supports \"get\", \"post\",\n * \"put\", \"delete\", \"patch\".\n */\n method?: FormMethod;\n\n /**\n * Normal `
    ` but supports React Router's relative paths.\n */\n action?: string;\n\n /**\n * Forces a full document navigation instead of a fetch.\n */\n reloadDocument?: boolean;\n\n /**\n * Replaces the current entry in the browser history stack when the form\n * navigates. Use this if you don't want the user to be able to click \"back\"\n * to the page with the form on it.\n */\n replace?: boolean;\n\n /**\n * Determines whether the form action is relative to the route hierarchy or\n * the pathname. Use this if you want to opt out of navigating the route\n * hierarchy and want to instead route based on /-delimited URL segments\n */\n relative?: RelativeRoutingType;\n\n /**\n * A function to call when the form is submitted. If you call\n * `event.preventDefault()` then this form will not do anything.\n */\n onSubmit?: React.FormEventHandler;\n}\n\n/**\n * A `@remix-run/router`-aware ``. It behaves like a normal form except\n * that the interaction with the server is with `fetch` instead of new document\n * requests, allowing components to add nicer UX to the page as the form is\n * submitted and returns with data.\n */\nexport const Form = React.forwardRef(\n (props, ref) => {\n return ;\n }\n);\n\nif (__DEV__) {\n Form.displayName = \"Form\";\n}\n\ntype HTMLSubmitEvent = React.BaseSyntheticEvent<\n SubmitEvent,\n Event,\n HTMLFormElement\n>;\n\ntype HTMLFormSubmitter = HTMLButtonElement | HTMLInputElement;\n\ninterface FormImplProps extends FormProps {\n fetcherKey?: string;\n routeId?: string;\n}\n\nconst FormImpl = React.forwardRef(\n (\n {\n reloadDocument,\n replace,\n method = defaultMethod,\n action,\n onSubmit,\n fetcherKey,\n routeId,\n relative,\n ...props\n },\n forwardedRef\n ) => {\n let submit = useSubmitImpl(fetcherKey, routeId);\n let formMethod: FormMethod =\n method.toLowerCase() === \"get\" ? \"get\" : \"post\";\n let formAction = useFormAction(action, { relative });\n let submitHandler: React.FormEventHandler = (event) => {\n onSubmit && onSubmit(event);\n if (event.defaultPrevented) return;\n event.preventDefault();\n\n let submitter = (event as unknown as HTMLSubmitEvent).nativeEvent\n .submitter as HTMLFormSubmitter | null;\n\n submit(submitter || event.currentTarget, { method, replace, relative });\n };\n\n return (\n \n );\n }\n);\n\nif (__DEV__) {\n Form.displayName = \"Form\";\n}\n\ninterface ScrollRestorationProps {\n getKey?: GetScrollRestorationKeyFunction;\n storageKey?: string;\n}\n\n/**\n * This component will emulate the browser's scroll restoration on location\n * changes.\n */\nexport function ScrollRestoration({\n getKey,\n storageKey,\n}: ScrollRestorationProps) {\n useScrollRestoration({ getKey, storageKey });\n return null;\n}\n\nif (__DEV__) {\n ScrollRestoration.displayName = \"ScrollRestoration\";\n}\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Hooks\n////////////////////////////////////////////////////////////////////////////////\n\nenum DataRouterHook {\n UseScrollRestoration = \"useScrollRestoration\",\n UseSubmitImpl = \"useSubmitImpl\",\n UseFetcher = \"useFetcher\",\n}\n\nenum DataRouterStateHook {\n UseFetchers = \"useFetchers\",\n UseScrollRestoration = \"useScrollRestoration\",\n}\n\nfunction getDataRouterConsoleError(\n hookName: DataRouterHook | DataRouterStateHook\n) {\n return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;\n}\n\nfunction useDataRouterContext(hookName: DataRouterHook) {\n let ctx = React.useContext(DataRouterContext);\n invariant(ctx, getDataRouterConsoleError(hookName));\n return ctx;\n}\n\nfunction useDataRouterState(hookName: DataRouterStateHook) {\n let state = React.useContext(DataRouterStateContext);\n invariant(state, getDataRouterConsoleError(hookName));\n return state;\n}\n\n/**\n * Handles the click behavior for router `` components. This is useful if\n * you need to create custom `` components with the same click behavior we\n * use in our exported ``.\n */\nexport function useLinkClickHandler(\n to: To,\n {\n target,\n replace: replaceProp,\n state,\n preventScrollReset,\n relative,\n }: {\n target?: React.HTMLAttributeAnchorTarget;\n replace?: boolean;\n state?: any;\n preventScrollReset?: boolean;\n relative?: RelativeRoutingType;\n } = {}\n): (event: React.MouseEvent) => void {\n let navigate = useNavigate();\n let location = useLocation();\n let path = useResolvedPath(to, { relative });\n\n return React.useCallback(\n (event: React.MouseEvent) => {\n if (shouldProcessLinkClick(event, target)) {\n event.preventDefault();\n\n // If the URL hasn't changed, a regular will do a replace instead of\n // a push, so do the same here unless the replace prop is explicitly set\n let replace =\n replaceProp !== undefined\n ? replaceProp\n : createPath(location) === createPath(path);\n\n navigate(to, { replace, state, preventScrollReset, relative });\n }\n },\n [\n location,\n navigate,\n path,\n replaceProp,\n state,\n target,\n to,\n preventScrollReset,\n relative,\n ]\n );\n}\n\n/**\n * A convenient wrapper for reading and writing search parameters via the\n * URLSearchParams interface.\n */\nexport function useSearchParams(\n defaultInit?: URLSearchParamsInit\n): [URLSearchParams, SetURLSearchParams] {\n warning(\n typeof URLSearchParams !== \"undefined\",\n `You cannot use the \\`useSearchParams\\` hook in a browser that does not ` +\n `support the URLSearchParams API. If you need to support Internet ` +\n `Explorer 11, we recommend you load a polyfill such as ` +\n `https://github.com/ungap/url-search-params\\n\\n` +\n `If you're unsure how to load polyfills, we recommend you check out ` +\n `https://polyfill.io/v3/ which provides some recommendations about how ` +\n `to load polyfills only for users that need them, instead of for every ` +\n `user.`\n );\n\n let defaultSearchParamsRef = React.useRef(createSearchParams(defaultInit));\n\n let location = useLocation();\n let searchParams = React.useMemo(\n () =>\n getSearchParamsForLocation(\n location.search,\n defaultSearchParamsRef.current\n ),\n [location.search]\n );\n\n let navigate = useNavigate();\n let setSearchParams = React.useCallback(\n (nextInit, navigateOptions) => {\n const newSearchParams = createSearchParams(\n typeof nextInit === \"function\" ? nextInit(searchParams) : nextInit\n );\n navigate(\"?\" + newSearchParams, navigateOptions);\n },\n [navigate, searchParams]\n );\n\n return [searchParams, setSearchParams];\n}\n\ntype SetURLSearchParams = (\n nextInit?:\n | URLSearchParamsInit\n | ((prev: URLSearchParams) => URLSearchParamsInit),\n navigateOpts?: NavigateOptions\n) => void;\n\ntype SubmitTarget =\n | HTMLFormElement\n | HTMLButtonElement\n | HTMLInputElement\n | FormData\n | URLSearchParams\n | { [name: string]: string }\n | null;\n\n/**\n * Submits a HTML `` to the server without reloading the page.\n */\nexport interface SubmitFunction {\n (\n /**\n * Specifies the `` to be submitted to the server, a specific\n * `

    (\r\n type: T\r\n): PayloadActionCreator\r\n\r\n/**\r\n * A utility function to create an action creator for the given action type\r\n * string. The action creator accepts a single argument, which will be included\r\n * in the action object as a field called payload. The action creator function\r\n * will also have its toString() overriden so that it returns the action type,\r\n * allowing it to be used in reducer logic that is looking for that action type.\r\n *\r\n * @param type The action type to use for created actions.\r\n * @param prepare (optional) a method that takes any number of arguments and returns { payload } or { payload, meta }.\r\n * If this is given, the resulting action creator will pass its arguments to this method to calculate payload & meta.\r\n *\r\n * @public\r\n */\r\nexport function createAction<\r\n PA extends PrepareAction,\r\n T extends string = string\r\n>(\r\n type: T,\r\n prepareAction: PA\r\n): PayloadActionCreator['payload'], T, PA>\r\n\r\nexport function createAction(type: string, prepareAction?: Function): any {\r\n function actionCreator(...args: any[]) {\r\n if (prepareAction) {\r\n let prepared = prepareAction(...args)\r\n if (!prepared) {\r\n throw new Error('prepareAction did not return an object')\r\n }\r\n\r\n return {\r\n type,\r\n payload: prepared.payload,\r\n ...('meta' in prepared && { meta: prepared.meta }),\r\n ...('error' in prepared && { error: prepared.error }),\r\n }\r\n }\r\n return { type, payload: args[0] }\r\n }\r\n\r\n actionCreator.toString = () => `${type}`\r\n\r\n actionCreator.type = type\r\n\r\n actionCreator.match = (action: Action): action is PayloadAction =>\r\n action.type === type\r\n\r\n return actionCreator\r\n}\r\n\r\nexport function isFSA(action: unknown): action is {\r\n type: string\r\n payload?: unknown\r\n error?: unknown\r\n meta?: unknown\r\n} {\r\n return (\r\n isPlainObject(action) &&\r\n typeof (action as any).type === 'string' &&\r\n Object.keys(action).every(isValidKey)\r\n )\r\n}\r\n\r\nfunction isValidKey(key: string) {\r\n return ['type', 'payload', 'error', 'meta'].indexOf(key) > -1\r\n}\r\n\r\n/**\r\n * Returns the action type of the actions created by the passed\r\n * `createAction()`-generated action creator (arbitrary action creators\r\n * are not supported).\r\n *\r\n * @param action The action creator whose action type to get.\r\n * @returns The action type used by the action creator.\r\n *\r\n * @public\r\n */\r\nexport function getType(\r\n actionCreator: PayloadActionCreator\r\n): T {\r\n return `${actionCreator}` as T\r\n}\r\n\r\n// helper types for more readable typings\r\n\r\ntype IfPrepareActionMethodProvided<\r\n PA extends PrepareAction | void,\r\n True,\r\n False\r\n> = PA extends (...args: any[]) => any ? True : False\r\n","import type { Action, AnyAction } from 'redux'\r\nimport type {\r\n CaseReducer,\r\n CaseReducers,\r\n ActionMatcherDescriptionCollection,\r\n} from './createReducer'\r\nimport type { TypeGuard } from './tsHelpers'\r\n\r\nexport interface TypedActionCreator {\r\n (...args: any[]): Action\r\n type: Type\r\n}\r\n\r\n/**\r\n * A builder for an action <-> reducer map.\r\n *\r\n * @public\r\n */\r\nexport interface ActionReducerMapBuilder {\r\n /**\r\n * Adds a case reducer to handle a single exact action type.\r\n * @remarks\r\n * All calls to `builder.addCase` must come before any calls to `builder.addMatcher` or `builder.addDefaultCase`.\r\n * @param actionCreator - Either a plain action type string, or an action creator generated by [`createAction`](./createAction) that can be used to determine the action type.\r\n * @param reducer - The actual case reducer function.\r\n */\r\n addCase>(\r\n actionCreator: ActionCreator,\r\n reducer: CaseReducer>\r\n ): ActionReducerMapBuilder\r\n /**\r\n * Adds a case reducer to handle a single exact action type.\r\n * @remarks\r\n * All calls to `builder.addCase` must come before any calls to `builder.addMatcher` or `builder.addDefaultCase`.\r\n * @param actionCreator - Either a plain action type string, or an action creator generated by [`createAction`](./createAction) that can be used to determine the action type.\r\n * @param reducer - The actual case reducer function.\r\n */\r\n addCase>(\r\n type: Type,\r\n reducer: CaseReducer\r\n ): ActionReducerMapBuilder\r\n\r\n /**\r\n * Allows you to match your incoming actions against your own filter function instead of only the `action.type` property.\r\n * @remarks\r\n * If multiple matcher reducers match, all of them will be executed in the order\r\n * they were defined in - even if a case reducer already matched.\r\n * All calls to `builder.addMatcher` must come after any calls to `builder.addCase` and before any calls to `builder.addDefaultCase`.\r\n * @param matcher - A matcher function. In TypeScript, this should be a [type predicate](https://www.typescriptlang.org/docs/handbook/advanced-types.html#using-type-predicates)\r\n * function\r\n * @param reducer - The actual case reducer function.\r\n *\r\n * @example\r\n```ts\r\nimport {\r\n createAction,\r\n createReducer,\r\n AsyncThunk,\r\n AnyAction,\r\n} from \"@reduxjs/toolkit\";\r\n\r\ntype GenericAsyncThunk = AsyncThunk;\r\n\r\ntype PendingAction = ReturnType;\r\ntype RejectedAction = ReturnType;\r\ntype FulfilledAction = ReturnType;\r\n\r\nconst initialState: Record = {};\r\nconst resetAction = createAction(\"reset-tracked-loading-state\");\r\n\r\nfunction isPendingAction(action: AnyAction): action is PendingAction {\r\n return action.type.endsWith(\"/pending\");\r\n}\r\n\r\nconst reducer = createReducer(initialState, (builder) => {\r\n builder\r\n .addCase(resetAction, () => initialState)\r\n // matcher can be defined outside as a type predicate function\r\n .addMatcher(isPendingAction, (state, action) => {\r\n state[action.meta.requestId] = \"pending\";\r\n })\r\n .addMatcher(\r\n // matcher can be defined inline as a type predicate function\r\n (action): action is RejectedAction => action.type.endsWith(\"/rejected\"),\r\n (state, action) => {\r\n state[action.meta.requestId] = \"rejected\";\r\n }\r\n )\r\n // matcher can just return boolean and the matcher can receive a generic argument\r\n .addMatcher(\r\n (action) => action.type.endsWith(\"/fulfilled\"),\r\n (state, action) => {\r\n state[action.meta.requestId] = \"fulfilled\";\r\n }\r\n );\r\n});\r\n```\r\n */\r\n addMatcher(\r\n matcher: TypeGuard | ((action: any) => boolean),\r\n reducer: CaseReducer\r\n ): Omit, 'addCase'>\r\n\r\n /**\r\n * Adds a \"default case\" reducer that is executed if no case reducer and no matcher\r\n * reducer was executed for this action.\r\n * @param reducer - The fallback \"default case\" reducer function.\r\n *\r\n * @example\r\n```ts\r\nimport { createReducer } from '@reduxjs/toolkit'\r\nconst initialState = { otherActions: 0 }\r\nconst reducer = createReducer(initialState, builder => {\r\n builder\r\n // .addCase(...)\r\n // .addMatcher(...)\r\n .addDefaultCase((state, action) => {\r\n state.otherActions++\r\n })\r\n})\r\n```\r\n */\r\n addDefaultCase(reducer: CaseReducer): {}\r\n}\r\n\r\nexport function executeReducerBuilderCallback(\r\n builderCallback: (builder: ActionReducerMapBuilder) => void\r\n): [\r\n CaseReducers,\r\n ActionMatcherDescriptionCollection,\r\n CaseReducer | undefined\r\n] {\r\n const actionsMap: CaseReducers = {}\r\n const actionMatchers: ActionMatcherDescriptionCollection = []\r\n let defaultCaseReducer: CaseReducer | undefined\r\n const builder = {\r\n addCase(\r\n typeOrActionCreator: string | TypedActionCreator,\r\n reducer: CaseReducer\r\n ) {\r\n if (process.env.NODE_ENV !== 'production') {\r\n /*\r\n to keep the definition by the user in line with actual behavior, \r\n we enforce `addCase` to always be called before calling `addMatcher`\r\n as matching cases take precedence over matchers\r\n */\r\n if (actionMatchers.length > 0) {\r\n throw new Error(\r\n '`builder.addCase` should only be called before calling `builder.addMatcher`'\r\n )\r\n }\r\n if (defaultCaseReducer) {\r\n throw new Error(\r\n '`builder.addCase` should only be called before calling `builder.addDefaultCase`'\r\n )\r\n }\r\n }\r\n const type =\r\n typeof typeOrActionCreator === 'string'\r\n ? typeOrActionCreator\r\n : typeOrActionCreator.type\r\n if (type in actionsMap) {\r\n throw new Error(\r\n 'addCase cannot be called with two reducers for the same action type'\r\n )\r\n }\r\n actionsMap[type] = reducer\r\n return builder\r\n },\r\n addMatcher(\r\n matcher: TypeGuard,\r\n reducer: CaseReducer\r\n ) {\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (defaultCaseReducer) {\r\n throw new Error(\r\n '`builder.addMatcher` should only be called before calling `builder.addDefaultCase`'\r\n )\r\n }\r\n }\r\n actionMatchers.push({ matcher, reducer })\r\n return builder\r\n },\r\n addDefaultCase(reducer: CaseReducer) {\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (defaultCaseReducer) {\r\n throw new Error('`builder.addDefaultCase` can only be called once')\r\n }\r\n }\r\n defaultCaseReducer = reducer\r\n return builder\r\n },\r\n }\r\n builderCallback(builder)\r\n return [actionsMap, actionMatchers, defaultCaseReducer]\r\n}\r\n","import type { AnyAction, Reducer } from 'redux'\r\nimport { createNextState } from '.'\r\nimport type {\r\n ActionCreatorWithoutPayload,\r\n PayloadAction,\r\n PayloadActionCreator,\r\n PrepareAction,\r\n _ActionCreatorWithPreparedPayload,\r\n} from './createAction'\r\nimport { createAction } from './createAction'\r\nimport type {\r\n CaseReducer,\r\n CaseReducers,\r\n ReducerWithInitialState,\r\n} from './createReducer'\r\nimport { createReducer, NotFunction } from './createReducer'\r\nimport type { ActionReducerMapBuilder } from './mapBuilders'\r\nimport { executeReducerBuilderCallback } from './mapBuilders'\r\nimport type { NoInfer } from './tsHelpers'\r\nimport { freezeDraftable } from './utils'\r\n\r\nlet hasWarnedAboutObjectNotation = false\r\n\r\n/**\r\n * An action creator attached to a slice.\r\n *\r\n * @deprecated please use PayloadActionCreator directly\r\n *\r\n * @public\r\n */\r\nexport type SliceActionCreator