Socket
Socket
Sign inDemoInstall

@reduxjs/toolkit

Package Overview
Dependencies
Maintainers
4
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reduxjs/toolkit - npm Package Compare versions

Comparing version 1.9.1 to 2.0.0-alpha.0

2

dist/autoBatchEnhancer.d.ts

@@ -7,3 +7,3 @@ import type { StoreEnhancer } from 'redux';

};
export declare type AutoBatchOptions = {
export type AutoBatchOptions = {
type: 'tick';

@@ -10,0 +10,0 @@ } | {

@@ -10,3 +10,3 @@ import type { Reducer, ReducersMapObject, Middleware, Action, AnyAction, StoreEnhancer, Store, Dispatch, PreloadedState, CombinedState } from 'redux';

*/
export declare type ConfigureEnhancersCallback<E extends Enhancers = Enhancers> = (defaultEnhancers: readonly StoreEnhancer[]) => [...E];
export type ConfigureEnhancersCallback<E extends Enhancers = Enhancers> = (defaultEnhancers: readonly StoreEnhancer[]) => [...E];
/**

@@ -56,4 +56,4 @@ * Options for `configureStore()`.

}
declare type Middlewares<S> = ReadonlyArray<Middleware<{}, S>>;
declare type Enhancers = ReadonlyArray<StoreEnhancer>;
type Middlewares<S> = ReadonlyArray<Middleware<{}, S>>;
type Enhancers = ReadonlyArray<StoreEnhancer>;
export interface ToolkitStore<S = any, A extends Action = AnyAction, M extends Middlewares<S> = Middlewares<S>> extends Store<S, A> {

@@ -73,3 +73,3 @@ /**

*/
export declare type EnhancedStore<S = any, A extends Action = AnyAction, M extends Middlewares<S> = Middlewares<S>, E extends Enhancers = Enhancers> = ToolkitStore<S, A, M> & ExtractStoreExtensions<E>;
export type EnhancedStore<S = any, A extends Action = AnyAction, M extends Middlewares<S> = Middlewares<S>, E extends Enhancers = Enhancers> = ToolkitStore<S, A, M> & ExtractStoreExtensions<E>;
/**

@@ -76,0 +76,0 @@ * A friendly abstraction over the standard Redux `createStore()` function.

@@ -14,3 +14,3 @@ import type { Action } from 'redux';

*/
export declare type PayloadAction<P = void, T extends string = string, M = never, E = never> = {
export type PayloadAction<P = void, T extends string = string, M = never, E = never> = {
payload: P;

@@ -30,3 +30,3 @@ type: T;

*/
export declare type PrepareAction<P> = ((...args: any[]) => {
export type PrepareAction<P> = ((...args: any[]) => {
payload: P;

@@ -49,3 +49,3 @@ }) | ((...args: any[]) => {

*/
export declare type _ActionCreatorWithPreparedPayload<PA extends PrepareAction<any> | void, T extends string = string> = PA extends PrepareAction<infer P> ? ActionCreatorWithPreparedPayload<Parameters<PA>, P, T, ReturnType<PA> extends {
export type _ActionCreatorWithPreparedPayload<PA extends PrepareAction<any> | void, T extends string = string> = PA extends PrepareAction<infer P> ? ActionCreatorWithPreparedPayload<Parameters<PA>, P, T, ReturnType<PA> extends {
error: infer E;

@@ -152,3 +152,3 @@ } ? E : never, ReturnType<PA> extends {

*/
export declare type PayloadActionCreator<P = void, T extends string = string, PA extends PrepareAction<P> | void = void> = IfPrepareActionMethodProvided<PA, _ActionCreatorWithPreparedPayload<PA, T>, IsAny<P, ActionCreatorWithPayload<any, T>, IsUnknownOrNonInferrable<P, ActionCreatorWithNonInferrablePayload<T>, IfVoid<P, ActionCreatorWithoutPayload<T>, IfMaybeUndefined<P, ActionCreatorWithOptionalPayload<P, T>, ActionCreatorWithPayload<P, T>>>>>>;
export type PayloadActionCreator<P = void, T extends string = string, PA extends PrepareAction<P> | void = void> = IfPrepareActionMethodProvided<PA, _ActionCreatorWithPreparedPayload<PA, T>, IsAny<P, ActionCreatorWithPayload<any, T>, IsUnknownOrNonInferrable<P, ActionCreatorWithNonInferrablePayload<T>, IfVoid<P, ActionCreatorWithoutPayload<T>, IfMaybeUndefined<P, ActionCreatorWithOptionalPayload<P, T>, ActionCreatorWithPayload<P, T>>>>>>;
/**

@@ -199,3 +199,3 @@ * A utility function to create an action creator for the given action type

export declare function getType<T extends string>(actionCreator: PayloadActionCreator<any, T>): T;
declare type IfPrepareActionMethodProvided<PA extends PrepareAction<any> | void, True, False> = PA extends (...args: any[]) => any ? True : False;
type IfPrepareActionMethodProvided<PA extends PrepareAction<any> | void, True, False> = PA extends (...args: any[]) => any ? True : False;
export {};

@@ -5,3 +5,3 @@ import type { Dispatch, AnyAction } from 'redux';

import type { FallbackIfUnknown, Id, IsAny, IsUnknown } from './tsHelpers';
export declare type BaseThunkAPI<S, E, D extends Dispatch = Dispatch, RejectedValue = undefined, RejectedMeta = unknown, FulfilledMeta = unknown> = {
export type BaseThunkAPI<S, E, D extends Dispatch = Dispatch, RejectedValue = undefined, RejectedMeta = unknown, FulfilledMeta = unknown> = {
dispatch: D;

@@ -44,3 +44,3 @@ getState: () => S;

export declare const miniSerializeError: (value: any) => SerializedError;
declare type AsyncThunkConfig = {
type AsyncThunkConfig = {
state?: unknown;

@@ -55,28 +55,28 @@ dispatch?: Dispatch;

};
declare type GetState<ThunkApiConfig> = ThunkApiConfig extends {
type GetState<ThunkApiConfig> = ThunkApiConfig extends {
state: infer State;
} ? State : unknown;
declare type GetExtra<ThunkApiConfig> = ThunkApiConfig extends {
type GetExtra<ThunkApiConfig> = ThunkApiConfig extends {
extra: infer Extra;
} ? Extra : unknown;
declare type GetDispatch<ThunkApiConfig> = ThunkApiConfig extends {
type GetDispatch<ThunkApiConfig> = ThunkApiConfig extends {
dispatch: infer Dispatch;
} ? FallbackIfUnknown<Dispatch, ThunkDispatch<GetState<ThunkApiConfig>, GetExtra<ThunkApiConfig>, AnyAction>> : ThunkDispatch<GetState<ThunkApiConfig>, GetExtra<ThunkApiConfig>, AnyAction>;
declare type GetThunkAPI<ThunkApiConfig> = BaseThunkAPI<GetState<ThunkApiConfig>, GetExtra<ThunkApiConfig>, GetDispatch<ThunkApiConfig>, GetRejectValue<ThunkApiConfig>, GetRejectedMeta<ThunkApiConfig>, GetFulfilledMeta<ThunkApiConfig>>;
declare type GetRejectValue<ThunkApiConfig> = ThunkApiConfig extends {
type GetThunkAPI<ThunkApiConfig> = BaseThunkAPI<GetState<ThunkApiConfig>, GetExtra<ThunkApiConfig>, GetDispatch<ThunkApiConfig>, GetRejectValue<ThunkApiConfig>, GetRejectedMeta<ThunkApiConfig>, GetFulfilledMeta<ThunkApiConfig>>;
type GetRejectValue<ThunkApiConfig> = ThunkApiConfig extends {
rejectValue: infer RejectValue;
} ? RejectValue : unknown;
declare type GetPendingMeta<ThunkApiConfig> = ThunkApiConfig extends {
type GetPendingMeta<ThunkApiConfig> = ThunkApiConfig extends {
pendingMeta: infer PendingMeta;
} ? PendingMeta : unknown;
declare type GetFulfilledMeta<ThunkApiConfig> = ThunkApiConfig extends {
type GetFulfilledMeta<ThunkApiConfig> = ThunkApiConfig extends {
fulfilledMeta: infer FulfilledMeta;
} ? FulfilledMeta : unknown;
declare type GetRejectedMeta<ThunkApiConfig> = ThunkApiConfig extends {
type GetRejectedMeta<ThunkApiConfig> = ThunkApiConfig extends {
rejectedMeta: infer RejectedMeta;
} ? RejectedMeta : unknown;
declare type GetSerializedErrorType<ThunkApiConfig> = ThunkApiConfig extends {
type GetSerializedErrorType<ThunkApiConfig> = ThunkApiConfig extends {
serializedErrorType: infer GetSerializedErrorType;
} ? GetSerializedErrorType : SerializedError;
declare type MaybePromise<T> = T | Promise<T> | (T extends any ? Promise<T> : never);
type MaybePromise<T> = T | Promise<T> | (T extends any ? Promise<T> : never);
/**

@@ -88,3 +88,3 @@ * A type describing the return value of the `payloadCreator` argument to `createAsyncThunk`.

*/
export declare type AsyncThunkPayloadCreatorReturnValue<Returned, ThunkApiConfig extends AsyncThunkConfig> = MaybePromise<IsUnknown<GetFulfilledMeta<ThunkApiConfig>, Returned, FulfillWithMeta<Returned, GetFulfilledMeta<ThunkApiConfig>>> | RejectWithValue<GetRejectValue<ThunkApiConfig>, GetRejectedMeta<ThunkApiConfig>>>;
export type AsyncThunkPayloadCreatorReturnValue<Returned, ThunkApiConfig extends AsyncThunkConfig> = MaybePromise<IsUnknown<GetFulfilledMeta<ThunkApiConfig>, Returned, FulfillWithMeta<Returned, GetFulfilledMeta<ThunkApiConfig>>> | RejectWithValue<GetRejectValue<ThunkApiConfig>, GetRejectedMeta<ThunkApiConfig>>>;
/**

@@ -96,3 +96,3 @@ * A type describing the `payloadCreator` argument to `createAsyncThunk`.

*/
export declare type AsyncThunkPayloadCreator<Returned, ThunkArg = void, ThunkApiConfig extends AsyncThunkConfig = {}> = (arg: ThunkArg, thunkAPI: GetThunkAPI<ThunkApiConfig>) => AsyncThunkPayloadCreatorReturnValue<Returned, ThunkApiConfig>;
export type AsyncThunkPayloadCreator<Returned, ThunkArg = void, ThunkApiConfig extends AsyncThunkConfig = {}> = (arg: ThunkArg, thunkAPI: GetThunkAPI<ThunkApiConfig>) => AsyncThunkPayloadCreatorReturnValue<Returned, ThunkApiConfig>;
/**

@@ -107,3 +107,3 @@ * A ThunkAction created by `createAsyncThunk`.

*/
export declare type AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig extends AsyncThunkConfig> = (dispatch: GetDispatch<ThunkApiConfig>, getState: () => GetState<ThunkApiConfig>, extra: GetExtra<ThunkApiConfig>) => Promise<ReturnType<AsyncThunkFulfilledActionCreator<Returned, ThunkArg>> | ReturnType<AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig>>> & {
export type AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig extends AsyncThunkConfig> = (dispatch: GetDispatch<ThunkApiConfig>, getState: () => GetState<ThunkApiConfig>, extra: GetExtra<ThunkApiConfig>) => Promise<ReturnType<AsyncThunkFulfilledActionCreator<Returned, ThunkArg>> | ReturnType<AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig>>> & {
abort: (reason?: string) => void;

@@ -114,3 +114,3 @@ requestId: string;

};
declare type AsyncThunkActionCreator<Returned, ThunkArg, ThunkApiConfig extends AsyncThunkConfig> = IsAny<ThunkArg, (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>, unknown extends ThunkArg ? (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> : [ThunkArg] extends [void] | [undefined] ? () => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> : [void] extends [ThunkArg] ? (arg?: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> : [undefined] extends [ThunkArg] ? WithStrictNullChecks<(arg?: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>, (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>> : (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>>;
type AsyncThunkActionCreator<Returned, ThunkArg, ThunkApiConfig extends AsyncThunkConfig> = IsAny<ThunkArg, (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>, unknown extends ThunkArg ? (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> : [ThunkArg] extends [void] | [undefined] ? () => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> : [void] extends [ThunkArg] ? (arg?: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> : [undefined] extends [ThunkArg] ? WithStrictNullChecks<(arg?: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>, (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>> : (arg: ThunkArg) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>>;
/**

@@ -121,3 +121,3 @@ * Options object for `createAsyncThunk`.

*/
export declare type AsyncThunkOptions<ThunkArg = void, ThunkApiConfig extends AsyncThunkConfig = {}> = {
export type AsyncThunkOptions<ThunkArg = void, ThunkApiConfig extends AsyncThunkConfig = {}> = {
/**

@@ -165,3 +165,3 @@ * A method to control whether the asyncThunk should be executed. Has access to the

}>;
export declare type AsyncThunkPendingActionCreator<ThunkArg, ThunkApiConfig = {}> = ActionCreatorWithPreparedPayload<[
export type AsyncThunkPendingActionCreator<ThunkArg, ThunkApiConfig = {}> = ActionCreatorWithPreparedPayload<[
string,

@@ -175,3 +175,3 @@ ThunkArg,

} & GetPendingMeta<ThunkApiConfig>>;
export declare type AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig = {}> = ActionCreatorWithPreparedPayload<[
export type AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig = {}> = ActionCreatorWithPreparedPayload<[
Error | null,

@@ -195,3 +195,3 @@ string,

} & GetRejectedMeta<ThunkApiConfig>))>;
export declare type AsyncThunkFulfilledActionCreator<Returned, ThunkArg, ThunkApiConfig = {}> = ActionCreatorWithPreparedPayload<[
export type AsyncThunkFulfilledActionCreator<Returned, ThunkArg, ThunkApiConfig = {}> = ActionCreatorWithPreparedPayload<[
Returned,

@@ -212,3 +212,3 @@ string,

*/
export declare type AsyncThunk<Returned, ThunkArg, ThunkApiConfig extends AsyncThunkConfig> = AsyncThunkActionCreator<Returned, ThunkArg, ThunkApiConfig> & {
export type AsyncThunk<Returned, ThunkArg, ThunkApiConfig extends AsyncThunkConfig> = AsyncThunkActionCreator<Returned, ThunkArg, ThunkApiConfig> & {
pending: AsyncThunkPendingActionCreator<ThunkArg, ThunkApiConfig>;

@@ -219,4 +219,4 @@ rejected: AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig>;

};
declare type OverrideThunkApiConfigs<OldConfig, NewConfig> = Id<NewConfig & Omit<OldConfig, keyof NewConfig>>;
declare type CreateAsyncThunk<CurriedThunkApiConfig extends AsyncThunkConfig> = {
type OverrideThunkApiConfigs<OldConfig, NewConfig> = Id<NewConfig & Omit<OldConfig, keyof NewConfig>>;
type CreateAsyncThunk<CurriedThunkApiConfig extends AsyncThunkConfig> = {
/**

@@ -248,3 +248,3 @@ *

}
declare type UnwrappedActionPayload<T extends UnwrappableAction> = Exclude<T, {
type UnwrappedActionPayload<T extends UnwrappableAction> = Exclude<T, {
error: any;

@@ -256,3 +256,3 @@ }>['payload'];

export declare function unwrapResult<R extends UnwrappableAction>(action: R): UnwrappedActionPayload<R>;
declare type WithStrictNullChecks<True, False> = undefined extends boolean ? False : True;
type WithStrictNullChecks<True, False> = undefined extends boolean ? False : True;
export {};

@@ -13,3 +13,3 @@ import type { Draft } from 'immer';

*/
export declare type Actions<T extends keyof any = string> = Record<T, Action>;
export type Actions<T extends keyof any = string> = Record<T, Action>;
/**

@@ -21,8 +21,8 @@ * @deprecated use `TypeGuard` instead

}
export declare type ActionMatcherDescription<S, A extends AnyAction> = {
export type ActionMatcherDescription<S, A extends AnyAction> = {
matcher: ActionMatcher<A>;
reducer: CaseReducer<S, NoInfer<A>>;
};
export declare type ReadonlyActionMatcherDescriptionCollection<S> = ReadonlyArray<ActionMatcherDescription<S, any>>;
export declare type ActionMatcherDescriptionCollection<S> = Array<ActionMatcherDescription<S, any>>;
export type ReadonlyActionMatcherDescriptionCollection<S> = ReadonlyArray<ActionMatcherDescription<S, any>>;
export type ActionMatcherDescriptionCollection<S> = Array<ActionMatcherDescription<S, any>>;
/**

@@ -44,3 +44,3 @@ * A *case reducer* is a reducer function for a specific action type. Case

*/
export declare type CaseReducer<S = any, A extends Action = AnyAction> = (state: Draft<S>, action: A) => S | void | Draft<S>;
export type CaseReducer<S = any, A extends Action = AnyAction> = (state: Draft<S>, action: A) => NoInfer<S> | void | Draft<NoInfer<S>>;
/**

@@ -55,7 +55,7 @@ * A mapping from action types to case reducers for `createReducer()`.

*/
export declare type CaseReducers<S, AS extends Actions> = {
export type CaseReducers<S, AS extends Actions> = {
[T in keyof AS]: AS[T] extends Action ? CaseReducer<S, AS[T]> : void;
};
export declare type NotFunction<T> = T extends Function ? never : T;
export declare type ReducerWithInitialState<S extends NotFunction<any>> = Reducer<S> & {
export type NotFunction<T> = T extends Function ? never : T;
export type ReducerWithInitialState<S extends NotFunction<any>> = Reducer<S> & {
getInitialState: () => S;

@@ -128,54 +128,1 @@ };

export declare function createReducer<S extends NotFunction<any>>(initialState: S | (() => S), builderCallback: (builder: ActionReducerMapBuilder<S>) => void): ReducerWithInitialState<S>;
/**
* A utility function that allows defining a reducer as a mapping from action
* type to *case reducer* functions that handle these action types. The
* reducer's initial state is passed as the first argument.
*
* The body of every case reducer is implicitly wrapped with a call to
* `produce()` from the [immer](https://github.com/mweststrate/immer) library.
* This means that rather than returning a new state object, you can also
* mutate the passed-in state object directly; these mutations will then be
* automatically and efficiently translated into copies, giving you both
* convenience and immutability.
*
* @overloadSummary
* This overload accepts an object where the keys are string action types, and the values
* are case reducer functions to handle those action types.
*
* @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`.
* @param actionsMap - An object mapping from action types to _case reducers_, each of which handles one specific action type.
* @param actionMatchers - An array of matcher definitions in the form `{matcher, reducer}`.
* All matching reducers will be executed in order, independently if a case reducer matched or not.
* @param defaultCaseReducer - A "default case" reducer that is executed if no case reducer and no matcher
* reducer was executed for this action.
*
* @example
```js
const counterReducer = createReducer(0, {
increment: (state, action) => state + action.payload,
decrement: (state, action) => state - action.payload
})
// Alternately, use a "lazy initializer" to provide the initial state
// (works with either form of createReducer)
const initialState = () => 0
const counterReducer = createReducer(initialState, {
increment: (state, action) => state + action.payload,
decrement: (state, action) => state - action.payload
})
```
* Action creators that were generated using [`createAction`](./createAction) may be used directly as the keys here, using computed property syntax:
```js
const increment = createAction('increment')
const decrement = createAction('decrement')
const counterReducer = createReducer(0, {
[increment]: (state, action) => state + action.payload,
[decrement.type]: (state, action) => state - action.payload
})
```
* @public
*/
export declare function createReducer<S extends NotFunction<any>, CR extends CaseReducers<S, any> = CaseReducers<S, any>>(initialState: S | (() => S), actionsMap: CR, actionMatchers?: ActionMatcherDescriptionCollection<S>, defaultCaseReducer?: CaseReducer<S>): ReducerWithInitialState<S>;
import type { Reducer } from 'redux';
import type { ActionCreatorWithoutPayload, PayloadAction, PayloadActionCreator, PrepareAction, _ActionCreatorWithPreparedPayload } from './createAction';
import type { CaseReducer, CaseReducers } from './createReducer';
import type { CaseReducer } from './createReducer';
import type { ActionReducerMapBuilder } from './mapBuilders';

@@ -13,3 +13,3 @@ import type { NoInfer } from './tsHelpers';

*/
export declare type SliceActionCreator<P> = PayloadActionCreator<P>;
export type SliceActionCreator<P> = PayloadActionCreator<P>;
/**

@@ -110,3 +110,3 @@ * The return value of `createSlice`

*/
extraReducers?: CaseReducers<NoInfer<State>, any> | ((builder: ActionReducerMapBuilder<NoInfer<State>>) => void);
extraReducers?: (builder: ActionReducerMapBuilder<NoInfer<State>>) => void;
}

@@ -118,3 +118,3 @@ /**

*/
export declare type CaseReducerWithPrepare<State, Action extends PayloadAction> = {
export type CaseReducerWithPrepare<State, Action extends PayloadAction> = {
reducer: CaseReducer<State, Action>;

@@ -128,6 +128,6 @@ prepare: PrepareAction<Action['payload']>;

*/
export declare type SliceCaseReducers<State> = {
export type SliceCaseReducers<State> = {
[K: string]: CaseReducer<State, PayloadAction<any>> | CaseReducerWithPrepare<State, PayloadAction<any, string, any, any>>;
};
declare type SliceActionType<SliceName extends string, ActionName extends keyof any> = ActionName extends string | number ? `${SliceName}/${ActionName}` : string;
type SliceActionType<SliceName extends string, ActionName extends keyof any> = ActionName extends string | number ? `${SliceName}/${ActionName}` : string;
/**

@@ -138,3 +138,3 @@ * Derives the slice's `actions` property from the `reducers` options

*/
export declare type CaseReducerActions<CaseReducers extends SliceCaseReducers<any>, SliceName extends string> = {
export type CaseReducerActions<CaseReducers extends SliceCaseReducers<any>, SliceName extends string> = {
[Type in keyof CaseReducers]: CaseReducers[Type] extends {

@@ -149,3 +149,3 @@ prepare: any;

*/
declare type ActionCreatorForCaseReducerWithPrepare<CR extends {
type ActionCreatorForCaseReducerWithPrepare<CR extends {
prepare: any;

@@ -158,3 +158,3 @@ }, Type extends string> = _ActionCreatorWithPreparedPayload<CR['prepare'], Type>;

*/
declare type ActionCreatorForCaseReducer<CR, Type extends string> = CR extends (state: any, action: infer Action) => any ? Action extends {
type ActionCreatorForCaseReducer<CR, Type extends string> = CR extends (state: any, action: infer Action) => any ? Action extends {
payload: infer P;

@@ -168,3 +168,3 @@ } ? PayloadActionCreator<P, Type> : ActionCreatorWithoutPayload<Type> : ActionCreatorWithoutPayload<Type>;

*/
declare type SliceDefinedCaseReducers<CaseReducers extends SliceCaseReducers<any>> = {
type SliceDefinedCaseReducers<CaseReducers extends SliceCaseReducers<any>> = {
[Type in keyof CaseReducers]: CaseReducers[Type] extends {

@@ -186,3 +186,3 @@ reducer: infer Reducer;

*/
export declare type ValidateSliceCaseReducers<S, ACR extends SliceCaseReducers<S>> = ACR & {
export type ValidateSliceCaseReducers<S, ACR extends SliceCaseReducers<S>> = ACR & {
[T in keyof ACR]: ACR[T] extends {

@@ -189,0 +189,0 @@ reducer(s: S, action?: infer A): any;

@@ -214,3 +214,3 @@ import type { Action, ActionCreator, StoreEnhancer } from 'redux';

}
declare type Compose = typeof compose;
type Compose = typeof compose;
interface ComposeWithDevTools {

@@ -217,0 +217,0 @@ (options: DevToolsEnhancerOptions): Compose;

@@ -6,11 +6,11 @@ import type { PayloadAction } from '../createAction';

*/
export declare type EntityId = number | string;
export type EntityId = number | string;
/**
* @public
*/
export declare type Comparer<T> = (a: T, b: T) => number;
export type Comparer<T> = (a: T, b: T) => number;
/**
* @public
*/
export declare type IdSelector<T> = (model: T) => EntityId;
export type IdSelector<T> = (model: T) => EntityId;
/**

@@ -31,3 +31,3 @@ * @public

*/
export declare type Update<T> = {
export type Update<T> = {
id: EntityId;

@@ -50,3 +50,3 @@ changes: Partial<T>;

}
export declare type PreventAny<S, T> = IsAny<S, EntityState<T>, S>;
export type PreventAny<S, T> = IsAny<S, EntityState<T>, S>;
/**

@@ -53,0 +53,0 @@ * @public

@@ -15,3 +15,3 @@ import type { AnyAction } from 'redux';

}
export declare type ThunkMiddlewareFor<S, O extends GetDefaultMiddlewareOptions = {}> = O extends {
export type ThunkMiddlewareFor<S, O extends GetDefaultMiddlewareOptions = {}> = O extends {
thunk: false;

@@ -23,3 +23,3 @@ } ? never : O extends {

} ? ThunkMiddleware<S, AnyAction, E> : ThunkMiddleware<S, AnyAction>;
export declare type CurriedGetDefaultMiddleware<S = any> = <O extends Partial<GetDefaultMiddlewareOptions> = {
export type CurriedGetDefaultMiddleware<S = any> = <O extends Partial<GetDefaultMiddlewareOptions> = {
thunk: true;

@@ -26,0 +26,0 @@ immutableCheck: true;

@@ -14,3 +14,3 @@ import type { Middleware } from 'redux';

};
declare type IsImmutableFunc = (value: any) => boolean;
type IsImmutableFunc = (value: any) => boolean;
/**

@@ -17,0 +17,0 @@ * Options for `createImmutableStateInvariantMiddleware()`.

export * from 'redux';
export { default as createNextState, current, freeze, original, isDraft, } from 'immer';
export { produce as createNextState, current, freeze, original, isDraft, } from 'immer';
export type { Draft } from 'immer';

@@ -4,0 +4,0 @@ export { createSelector } from 'reselect';

@@ -15,3 +15,3 @@ import type { Dispatch, AnyAction } from 'redux';

*/
export declare const clearAllListeners: import("../createAction").ActionCreatorWithoutPayload<string>;
export declare const clearAllListeners: import("../createAction").ActionCreatorWithoutPayload<"listenerMiddleware/removeAll">;
/**

@@ -18,0 +18,0 @@ * @public

@@ -22,3 +22,3 @@ import type { AbortSignalWithReason, TaskResult } from './types';

*/
export declare const runTask: <T>(task: () => Promise<T>, cleanUp?: (() => void) | undefined) => Promise<TaskResult<T>>;
export declare const runTask: <T>(task: () => Promise<T>, cleanUp?: () => void) => Promise<TaskResult<T>>;
/**

@@ -25,0 +25,0 @@ * Given an input `AbortSignal` and a promise returns another promise that resolves

@@ -9,3 +9,3 @@ import type { PayloadAction, BaseActionCreator } from '../createAction';

*/
export declare type AbortSignalWithReason<T> = AbortSignal & {
export type AbortSignalWithReason<T> = AbortSignal & {
reason?: T;

@@ -23,5 +23,5 @@ };

/** @internal */
export declare type AnyListenerPredicate<State> = (action: AnyAction, currentState: State, originalState: State) => boolean;
export type AnyListenerPredicate<State> = (action: AnyAction, currentState: State, originalState: State) => boolean;
/** @public */
export declare type ListenerPredicate<Action extends AnyAction, State> = (action: AnyAction, currentState: State, originalState: State) => action is Action;
export type ListenerPredicate<Action extends AnyAction, State> = (action: AnyAction, currentState: State, originalState: State) => action is Action;
/** @public */

@@ -34,3 +34,3 @@ export interface ConditionFunction<State> {

/** @internal */
export declare type MatchFunction<T> = (v: any) => v is T;
export type MatchFunction<T> = (v: any) => v is T;
/** @public */

@@ -65,5 +65,5 @@ export interface ForkedTaskAPI {

/** @public */
export declare type ForkedTaskExecutor<T> = AsyncTaskExecutor<T> | SyncTaskExecutor<T>;
export type ForkedTaskExecutor<T> = AsyncTaskExecutor<T> | SyncTaskExecutor<T>;
/** @public */
export declare type TaskResolved<T> = {
export type TaskResolved<T> = {
readonly status: 'ok';

@@ -73,3 +73,3 @@ readonly value: T;

/** @public */
export declare type TaskRejected = {
export type TaskRejected = {
readonly status: 'rejected';

@@ -79,3 +79,3 @@ readonly error: unknown;

/** @public */
export declare type TaskCancelled = {
export type TaskCancelled = {
readonly status: 'cancelled';

@@ -85,3 +85,3 @@ readonly error: TaskAbortError;

/** @public */
export declare type TaskResult<Value> = TaskResolved<Value> | TaskRejected | TaskCancelled;
export type TaskResult<Value> = TaskResolved<Value> | TaskRejected | TaskCancelled;
/** @public */

@@ -223,3 +223,3 @@ export interface ForkedTask<T> {

/** @public */
export declare type ListenerEffect<Action extends AnyAction, State, Dispatch extends ReduxDispatch<AnyAction>, ExtraArgument = unknown> = (action: Action, api: ListenerEffectAPI<State, Dispatch, ExtraArgument>) => void | Promise<void>;
export type ListenerEffect<Action extends AnyAction, State, Dispatch extends ReduxDispatch<AnyAction>, ExtraArgument = unknown> = (action: Action, api: ListenerEffectAPI<State, Dispatch, ExtraArgument>) => void | Promise<void>;
/**

@@ -253,3 +253,3 @@ * @public

/** @public */
export declare type ListenerMiddleware<State = unknown, Dispatch extends ThunkDispatch<State, unknown, AnyAction> = ThunkDispatch<State, unknown, AnyAction>, ExtraArgument = unknown> = Middleware<{
export type ListenerMiddleware<State = unknown, Dispatch extends ThunkDispatch<State, unknown, AnyAction> = ThunkDispatch<State, unknown, AnyAction>, ExtraArgument = unknown> = Middleware<{
(action: ReduxAction<'listenerMiddleware/add'>): UnsubscribeListener;

@@ -271,5 +271,5 @@ }, State, Dispatch>;

/** @public */
export declare type TakePatternOutputWithoutTimeout<State, Predicate extends AnyListenerPredicate<State>> = Predicate extends MatchFunction<infer Action> ? Promise<[Action, State, State]> : Promise<[AnyAction, State, State]>;
export type TakePatternOutputWithoutTimeout<State, Predicate extends AnyListenerPredicate<State>> = Predicate extends MatchFunction<infer Action> ? Promise<[Action, State, State]> : Promise<[AnyAction, State, State]>;
/** @public */
export declare type TakePatternOutputWithTimeout<State, Predicate extends AnyListenerPredicate<State>> = Predicate extends MatchFunction<infer Action> ? Promise<[Action, State, State] | null> : Promise<[AnyAction, State, State] | null>;
export type TakePatternOutputWithTimeout<State, Predicate extends AnyListenerPredicate<State>> = Predicate extends MatchFunction<infer Action> ? Promise<[Action, State, State] | null> : Promise<[AnyAction, State, State] | null>;
/** @public */

@@ -286,3 +286,3 @@ export interface TakePattern<State> {

/** @public */
export declare type UnsubscribeListener = (unsubscribeOptions?: UnsubscribeListenerOptions) => void;
export type UnsubscribeListener = (unsubscribeOptions?: UnsubscribeListenerOptions) => void;
/**

@@ -335,3 +335,3 @@ * @public

/** @public */
export declare type RemoveListenerOverloads<State = unknown, Dispatch extends ReduxDispatch = ThunkDispatch<State, unknown, AnyAction>> = AddListenerOverloads<boolean, State, Dispatch, any, UnsubscribeListenerOptions>;
export type RemoveListenerOverloads<State = unknown, Dispatch extends ReduxDispatch = ThunkDispatch<State, unknown, AnyAction>> = AddListenerOverloads<boolean, State, Dispatch, any, UnsubscribeListenerOptions>;
/** @public */

@@ -348,17 +348,17 @@ export interface RemoveListenerAction<Action extends AnyAction, State, Dispatch extends ReduxDispatch<AnyAction>> {

* A "pre-typed" version of `addListenerAction`, so the listener args are well-typed */
export declare type TypedAddListener<State, Dispatch extends ReduxDispatch<AnyAction> = ThunkDispatch<State, unknown, AnyAction>, ExtraArgument = unknown, Payload = ListenerEntry<State, Dispatch>, T extends string = 'listenerMiddleware/add'> = BaseActionCreator<Payload, T> & AddListenerOverloads<PayloadAction<Payload, T>, State, Dispatch, ExtraArgument>;
export type TypedAddListener<State, Dispatch extends ReduxDispatch<AnyAction> = ThunkDispatch<State, unknown, AnyAction>, ExtraArgument = unknown, Payload = ListenerEntry<State, Dispatch>, T extends string = 'listenerMiddleware/add'> = BaseActionCreator<Payload, T> & AddListenerOverloads<PayloadAction<Payload, T>, State, Dispatch, ExtraArgument>;
/**
* @public
* A "pre-typed" version of `removeListenerAction`, so the listener args are well-typed */
export declare type TypedRemoveListener<State, Dispatch extends ReduxDispatch<AnyAction> = ThunkDispatch<State, unknown, AnyAction>, Payload = ListenerEntry<State, Dispatch>, T extends string = 'listenerMiddleware/remove'> = BaseActionCreator<Payload, T> & AddListenerOverloads<PayloadAction<Payload, T>, State, Dispatch, any, UnsubscribeListenerOptions>;
export type TypedRemoveListener<State, Dispatch extends ReduxDispatch<AnyAction> = ThunkDispatch<State, unknown, AnyAction>, Payload = ListenerEntry<State, Dispatch>, T extends string = 'listenerMiddleware/remove'> = BaseActionCreator<Payload, T> & AddListenerOverloads<PayloadAction<Payload, T>, State, Dispatch, any, UnsubscribeListenerOptions>;
/**
* @public
* A "pre-typed" version of `middleware.startListening`, so the listener args are well-typed */
export declare type TypedStartListening<State, Dispatch extends ReduxDispatch<AnyAction> = ThunkDispatch<State, unknown, AnyAction>, ExtraArgument = unknown> = AddListenerOverloads<UnsubscribeListener, State, Dispatch, ExtraArgument>;
export type TypedStartListening<State, Dispatch extends ReduxDispatch<AnyAction> = ThunkDispatch<State, unknown, AnyAction>, ExtraArgument = unknown> = AddListenerOverloads<UnsubscribeListener, State, Dispatch, ExtraArgument>;
/** @public
* A "pre-typed" version of `middleware.stopListening`, so the listener args are well-typed */
export declare type TypedStopListening<State, Dispatch extends ReduxDispatch<AnyAction> = ThunkDispatch<State, unknown, AnyAction>> = RemoveListenerOverloads<State, Dispatch>;
export type TypedStopListening<State, Dispatch extends ReduxDispatch<AnyAction> = ThunkDispatch<State, unknown, AnyAction>> = RemoveListenerOverloads<State, Dispatch>;
/** @public
* A "pre-typed" version of `createListenerEntry`, so the listener args are well-typed */
export declare type TypedCreateListenerEntry<State, Dispatch extends ReduxDispatch<AnyAction> = ThunkDispatch<State, unknown, AnyAction>> = AddListenerOverloads<ListenerEntry<State, Dispatch>, State, Dispatch>;
export type TypedCreateListenerEntry<State, Dispatch extends ReduxDispatch<AnyAction> = ThunkDispatch<State, unknown, AnyAction>> = AddListenerOverloads<ListenerEntry<State, Dispatch>, State, Dispatch>;
/**

@@ -368,3 +368,3 @@ * Internal Types

/** @internal An single listener entry */
export declare type ListenerEntry<State = unknown, Dispatch extends ReduxDispatch<AnyAction> = ReduxDispatch<AnyAction>> = {
export type ListenerEntry<State = unknown, Dispatch extends ReduxDispatch<AnyAction> = ReduxDispatch<AnyAction>> = {
id: string;

@@ -381,3 +381,3 @@ effect: ListenerEffect<any, State, Dispatch>;

*/
export declare type FallbackAddListenerOptions = {
export type FallbackAddListenerOptions = {
actionCreator?: TypedActionCreator<string>;

@@ -394,4 +394,4 @@ type?: string;

/** @public */
export declare type GuardedType<T> = T extends (x: any, ...args: unknown[]) => x is infer T ? T : never;
export type GuardedType<T> = T extends (x: any, ...args: unknown[]) => x is infer T ? T : never;
/** @public */
export declare type ListenerPredicateGuardedActionType<T> = T extends ListenerPredicate<infer Action, any> ? Action : never;
export type ListenerPredicateGuardedActionType<T> = T extends ListenerPredicate<infer Action, any> ? Action : never;
import type { ActionFromMatcher, Matcher, UnionToIntersection } from './tsHelpers';
import type { AsyncThunk, AsyncThunkFulfilledActionCreator, AsyncThunkPendingActionCreator, AsyncThunkRejectedActionCreator } from './createAsyncThunk';
/** @public */
export declare type ActionMatchingAnyOf<Matchers extends [Matcher<any>, ...Matcher<any>[]]> = ActionFromMatcher<Matchers[number]>;
export type ActionMatchingAnyOf<Matchers extends [Matcher<any>, ...Matcher<any>[]]> = ActionFromMatcher<Matchers[number]>;
/** @public */
export declare type ActionMatchingAllOf<Matchers extends [Matcher<any>, ...Matcher<any>[]]> = UnionToIntersection<ActionMatchingAnyOf<Matchers>>;
export type ActionMatchingAllOf<Matchers extends [Matcher<any>, ...Matcher<any>[]]> = UnionToIntersection<ActionMatchingAnyOf<Matchers>>;
/**

@@ -34,4 +34,4 @@ * A higher-order function that returns a function that may be used to check

export declare function hasExpectedRequestMetadata(action: any, validStatus: readonly string[]): boolean;
export declare type UnknownAsyncThunkPendingAction = ReturnType<AsyncThunkPendingActionCreator<unknown>>;
export declare type PendingActionFromAsyncThunk<T extends AnyAsyncThunk> = ActionFromMatcher<T['pending']>;
export type UnknownAsyncThunkPendingAction = ReturnType<AsyncThunkPendingActionCreator<unknown>>;
export type PendingActionFromAsyncThunk<T extends AnyAsyncThunk> = ActionFromMatcher<T['pending']>;
/**

@@ -60,4 +60,4 @@ * A higher-order function that returns a function that may be used to check

export declare function isPending(action: any): action is UnknownAsyncThunkPendingAction;
export declare type UnknownAsyncThunkRejectedAction = ReturnType<AsyncThunkRejectedActionCreator<unknown, unknown>>;
export declare type RejectedActionFromAsyncThunk<T extends AnyAsyncThunk> = ActionFromMatcher<T['rejected']>;
export type UnknownAsyncThunkRejectedAction = ReturnType<AsyncThunkRejectedActionCreator<unknown, unknown>>;
export type RejectedActionFromAsyncThunk<T extends AnyAsyncThunk> = ActionFromMatcher<T['rejected']>;
/**

@@ -86,4 +86,4 @@ * A higher-order function that returns a function that may be used to check

export declare function isRejected(action: any): action is UnknownAsyncThunkRejectedAction;
export declare type UnknownAsyncThunkRejectedWithValueAction = ReturnType<AsyncThunkRejectedActionCreator<unknown, unknown>>;
export declare type RejectedWithValueActionFromAsyncThunk<T extends AnyAsyncThunk> = ActionFromMatcher<T['rejected']> & (T extends AsyncThunk<any, any, {
export type UnknownAsyncThunkRejectedWithValueAction = ReturnType<AsyncThunkRejectedActionCreator<unknown, unknown>>;
export type RejectedWithValueActionFromAsyncThunk<T extends AnyAsyncThunk> = ActionFromMatcher<T['rejected']> & (T extends AsyncThunk<any, any, {
rejectValue: infer RejectedValue;

@@ -116,4 +116,4 @@ }> ? {

export declare function isRejectedWithValue(action: any): action is UnknownAsyncThunkRejectedAction;
export declare type UnknownAsyncThunkFulfilledAction = ReturnType<AsyncThunkFulfilledActionCreator<unknown, unknown>>;
export declare type FulfilledActionFromAsyncThunk<T extends AnyAsyncThunk> = ActionFromMatcher<T['fulfilled']>;
export type UnknownAsyncThunkFulfilledAction = ReturnType<AsyncThunkFulfilledActionCreator<unknown, unknown>>;
export type FulfilledActionFromAsyncThunk<T extends AnyAsyncThunk> = ActionFromMatcher<T['fulfilled']>;
/**

@@ -142,4 +142,4 @@ * A higher-order function that returns a function that may be used to check

export declare function isFulfilled(action: any): action is UnknownAsyncThunkFulfilledAction;
export declare type UnknownAsyncThunkAction = UnknownAsyncThunkPendingAction | UnknownAsyncThunkRejectedAction | UnknownAsyncThunkFulfilledAction;
export declare type AnyAsyncThunk = {
export type UnknownAsyncThunkAction = UnknownAsyncThunkPendingAction | UnknownAsyncThunkRejectedAction | UnknownAsyncThunkFulfilledAction;
export type AnyAsyncThunk = {
pending: {

@@ -155,3 +155,3 @@ match: (action: any) => action is any;

};
export declare type ActionsFromAsyncThunk<T extends AnyAsyncThunk> = ActionFromMatcher<T['pending']> | ActionFromMatcher<T['fulfilled']> | ActionFromMatcher<T['rejected']>;
export type ActionsFromAsyncThunk<T extends AnyAsyncThunk> = ActionFromMatcher<T['pending']> | ActionFromMatcher<T['fulfilled']> | ActionFromMatcher<T['rejected']>;
/**

@@ -158,0 +158,0 @@ * A higher-order function that returns a function that may be used to check

@@ -10,4 +10,4 @@ import type { EndpointDefinitions, EndpointBuilder, EndpointDefinition, ReplaceTagTypes } from './endpointDefinitions';

}
export declare type ModuleName = keyof ApiModules<any, any, any, any>;
export declare type Module<Name extends ModuleName> = {
export type ModuleName = keyof ApiModules<any, any, any, any>;
export type Module<Name extends ModuleName> = {
name: Name;

@@ -25,3 +25,3 @@ init<BaseQuery extends BaseQueryFn, Definitions extends EndpointDefinitions, ReducerPath extends string, TagTypes extends string>(api: Api<BaseQuery, EndpointDefinitions, ReducerPath, TagTypes, ModuleName>, options: WithRequiredProp<CreateApiOptions<BaseQuery, Definitions, ReducerPath, TagTypes>, 'reducerPath' | 'serializeQueryArgs' | 'keepUnusedDataFor' | 'refetchOnMountOrArgChange' | 'refetchOnFocus' | 'refetchOnReconnect' | 'tagTypes'>, context: ApiContext<Definitions>): {

}
export declare type Api<BaseQuery extends BaseQueryFn, Definitions extends EndpointDefinitions, ReducerPath extends string, TagTypes extends string, Enhancers extends ModuleName = CoreModule> = UnionToIntersection<ApiModules<BaseQuery, Definitions, ReducerPath, TagTypes>[Enhancers]> & {
export type Api<BaseQuery extends BaseQueryFn, Definitions extends EndpointDefinitions, ReducerPath extends string, TagTypes extends string, Enhancers extends ModuleName = CoreModule> = UnionToIntersection<ApiModules<BaseQuery, Definitions, ReducerPath, TagTypes>[Enhancers]> & {
/**

@@ -28,0 +28,0 @@ * A function to inject the endpoints into the original API, but also give you that same API with correct types for these endpoints back. Useful with code-splitting.

@@ -21,3 +21,3 @@ import type { ThunkDispatch } from '@reduxjs/toolkit';

}
export declare type QueryReturnValue<T = unknown, E = unknown, M = unknown> = {
export type QueryReturnValue<T = unknown, E = unknown, M = unknown> = {
error: E;

@@ -31,12 +31,12 @@ data?: undefined;

};
export declare type BaseQueryFn<Args = any, Result = unknown, Error = unknown, DefinitionExtraOptions = {}, Meta = {}> = (args: Args, api: BaseQueryApi, extraOptions: DefinitionExtraOptions) => MaybePromise<QueryReturnValue<Result, Error, Meta>>;
export declare type BaseQueryEnhancer<AdditionalArgs = unknown, AdditionalDefinitionExtraOptions = unknown, Config = void> = <BaseQuery extends BaseQueryFn>(baseQuery: BaseQuery, config: Config) => BaseQueryFn<BaseQueryArg<BaseQuery> & AdditionalArgs, BaseQueryResult<BaseQuery>, BaseQueryError<BaseQuery>, BaseQueryExtraOptions<BaseQuery> & AdditionalDefinitionExtraOptions, NonNullable<BaseQueryMeta<BaseQuery>>>;
export declare type BaseQueryResult<BaseQuery extends BaseQueryFn> = UnwrapPromise<ReturnType<BaseQuery>> extends infer Unwrapped ? Unwrapped extends {
export type BaseQueryFn<Args = any, Result = unknown, Error = unknown, DefinitionExtraOptions = {}, Meta = {}> = (args: Args, api: BaseQueryApi, extraOptions: DefinitionExtraOptions) => MaybePromise<QueryReturnValue<Result, Error, Meta>>;
export type BaseQueryEnhancer<AdditionalArgs = unknown, AdditionalDefinitionExtraOptions = unknown, Config = void> = <BaseQuery extends BaseQueryFn>(baseQuery: BaseQuery, config: Config) => BaseQueryFn<BaseQueryArg<BaseQuery> & AdditionalArgs, BaseQueryResult<BaseQuery>, BaseQueryError<BaseQuery>, BaseQueryExtraOptions<BaseQuery> & AdditionalDefinitionExtraOptions, NonNullable<BaseQueryMeta<BaseQuery>>>;
export type BaseQueryResult<BaseQuery extends BaseQueryFn> = UnwrapPromise<ReturnType<BaseQuery>> extends infer Unwrapped ? Unwrapped extends {
data: any;
} ? Unwrapped['data'] : never : never;
export declare type BaseQueryMeta<BaseQuery extends BaseQueryFn> = UnwrapPromise<ReturnType<BaseQuery>>['meta'];
export declare type BaseQueryError<BaseQuery extends BaseQueryFn> = Exclude<UnwrapPromise<ReturnType<BaseQuery>>, {
export type BaseQueryMeta<BaseQuery extends BaseQueryFn> = UnwrapPromise<ReturnType<BaseQuery>>['meta'];
export type BaseQueryError<BaseQuery extends BaseQueryFn> = Exclude<UnwrapPromise<ReturnType<BaseQuery>>, {
error?: undefined;
}>['error'];
export declare type BaseQueryArg<T extends (arg: any, ...args: any[]) => any> = T extends (arg: infer A, ...args: any[]) => any ? A : any;
export declare type BaseQueryExtraOptions<BaseQuery extends BaseQueryFn> = Parameters<BaseQuery>[2];
export type BaseQueryArg<T extends (arg: any, ...args: any[]) => any> = T extends (arg: infer A, ...args: any[]) => any ? A : any;
export type BaseQueryExtraOptions<BaseQuery extends BaseQueryFn> = Parameters<BaseQuery>[2];

@@ -5,9 +5,9 @@ import type { SerializedError } from '@reduxjs/toolkit';

import type { Id, WithRequiredProp } from '../tsHelpers';
export declare type QueryCacheKey = string & {
export type QueryCacheKey = string & {
_type: 'queryCacheKey';
};
export declare type QuerySubstateIdentifier = {
export type QuerySubstateIdentifier = {
queryCacheKey: QueryCacheKey;
};
export declare type MutationSubstateIdentifier = {
export type MutationSubstateIdentifier = {
requestId: string;

@@ -19,3 +19,3 @@ fixedCacheKey?: string;

};
export declare type RefetchConfigOptions = {
export type RefetchConfigOptions = {
refetchOnMountOrArgChange: boolean | number;

@@ -34,3 +34,3 @@ refetchOnReconnect: boolean;

}
export declare type RequestStatusFlags = {
export type RequestStatusFlags = {
status: QueryStatus.uninitialized;

@@ -61,3 +61,3 @@ isUninitialized: true;

export declare function getRequestStatusFlags(status: QueryStatus): RequestStatusFlags;
export declare type SubscriptionOptions = {
export type SubscriptionOptions = {
/**

@@ -84,12 +84,12 @@ * How frequently to automatically re-fetch data (in milliseconds). Defaults to `0` (off).

};
export declare type Subscribers = {
export type Subscribers = {
[requestId: string]: SubscriptionOptions;
};
export declare type QueryKeys<Definitions extends EndpointDefinitions> = {
export type QueryKeys<Definitions extends EndpointDefinitions> = {
[K in keyof Definitions]: Definitions[K] extends QueryDefinition<any, any, any, any> ? K : never;
}[keyof Definitions];
export declare type MutationKeys<Definitions extends EndpointDefinitions> = {
export type MutationKeys<Definitions extends EndpointDefinitions> = {
[K in keyof Definitions]: Definitions[K] extends MutationDefinition<any, any, any, any> ? K : never;
}[keyof Definitions];
declare type BaseQuerySubState<D extends BaseEndpointDefinition<any, any, any>> = {
type BaseQuerySubState<D extends BaseEndpointDefinition<any, any, any>> = {
/**

@@ -124,3 +124,3 @@ * The argument originally passed into the hook or `initiate` action call

};
export declare type QuerySubState<D extends BaseEndpointDefinition<any, any, any>> = Id<({
export type QuerySubState<D extends BaseEndpointDefinition<any, any, any>> = Id<({
status: QueryStatus.fulfilled;

@@ -143,3 +143,3 @@ } & WithRequiredProp<BaseQuerySubState<D>, 'data' | 'fulfilledTimeStamp'> & {

}>;
declare type BaseMutationSubState<D extends BaseEndpointDefinition<any, any, any>> = {
type BaseMutationSubState<D extends BaseEndpointDefinition<any, any, any>> = {
requestId: string;

@@ -152,3 +152,3 @@ data?: ResultTypeFrom<D>;

};
export declare type MutationSubState<D extends BaseEndpointDefinition<any, any, any>> = (({
export type MutationSubState<D extends BaseEndpointDefinition<any, any, any>> = (({
status: QueryStatus.fulfilled;

@@ -172,3 +172,3 @@ } & WithRequiredProp<BaseMutationSubState<D>, 'data' | 'fulfilledTimeStamp'>) & {

};
export declare type CombinedState<D extends EndpointDefinitions, E extends string, ReducerPath extends string> = {
export type CombinedState<D extends EndpointDefinitions, E extends string, ReducerPath extends string> = {
queries: QueryState<D>;

@@ -180,3 +180,3 @@ mutations: MutationState<D>;

};
export declare type InvalidationState<TagTypes extends string> = {
export type InvalidationState<TagTypes extends string> = {
[_ in TagTypes]: {

@@ -187,9 +187,9 @@ [id: string]: Array<QueryCacheKey>;

};
export declare type QueryState<D extends EndpointDefinitions> = {
export type QueryState<D extends EndpointDefinitions> = {
[queryCacheKey: string]: QuerySubState<D[string]> | undefined;
};
export declare type SubscriptionState = {
export type SubscriptionState = {
[queryCacheKey: string]: Subscribers | undefined;
};
export declare type ConfigState<ReducerPath> = RefetchConfigOptions & {
export type ConfigState<ReducerPath> = RefetchConfigOptions & {
reducerPath: ReducerPath;

@@ -200,11 +200,11 @@ online: boolean;

} & ModifiableConfigState;
export declare type ModifiableConfigState = {
export type ModifiableConfigState = {
keepUnusedDataFor: number;
} & RefetchConfigOptions;
export declare type MutationState<D extends EndpointDefinitions> = {
export type MutationState<D extends EndpointDefinitions> = {
[requestId: string]: MutationSubState<D[string]> | undefined;
};
export declare type RootState<Definitions extends EndpointDefinitions, TagTypes extends string, ReducerPath extends string> = {
export type RootState<Definitions extends EndpointDefinitions, TagTypes extends string, ReducerPath extends string> = {
[P in ReducerPath]: CombinedState<Definitions, TagTypes, P>;
};
export {};

@@ -26,4 +26,4 @@ import type { EndpointDefinitions, QueryDefinition, MutationDefinition, QueryArgFrom, ResultTypeFrom } from '../endpointDefinitions';

}
declare type StartQueryActionCreator<D extends QueryDefinition<any, any, any, any, any>> = (arg: QueryArgFrom<D>, options?: StartQueryActionCreatorOptions) => ThunkAction<QueryActionCreatorResult<D>, any, any, AnyAction>;
export declare type QueryActionCreatorResult<D extends QueryDefinition<any, any, any, any>> = Promise<QueryResultSelectorResult<D>> & {
type StartQueryActionCreator<D extends QueryDefinition<any, any, any, any, any>> = (arg: QueryArgFrom<D>, options?: StartQueryActionCreatorOptions) => ThunkAction<QueryActionCreatorResult<D>, any, any, AnyAction>;
export type QueryActionCreatorResult<D extends QueryDefinition<any, any, any, any>> = Promise<QueryResultSelectorResult<D>> & {
arg: QueryArgFrom<D>;

@@ -39,3 +39,3 @@ requestId: string;

};
declare type StartMutationActionCreator<D extends MutationDefinition<any, any, any, any>> = (arg: QueryArgFrom<D>, options?: {
type StartMutationActionCreator<D extends MutationDefinition<any, any, any, any>> = (arg: QueryArgFrom<D>, options?: {
/**

@@ -50,3 +50,3 @@ * If this mutation should be tracked in the store.

}) => ThunkAction<MutationActionCreatorResult<D>, any, any, AnyAction>;
export declare type MutationActionCreatorResult<D extends MutationDefinition<any, any, any, any>> = Promise<{
export type MutationActionCreatorResult<D extends MutationDefinition<any, any, any, any>> = Promise<{
data: ResultTypeFrom<D>;

@@ -53,0 +53,0 @@ } | {

import type { BaseQueryFn } from '../../baseQueryTypes';
import type { InternalHandlerBuilder } from './types';
export declare type ReferenceCacheCollection = never;
export type ReferenceCacheCollection = never;
declare module '../../endpointDefinitions' {

@@ -5,0 +5,0 @@ interface QueryExtraOptions<TagTypes extends string, ResultType, QueryArg, BaseQuery extends BaseQueryFn, ReducerPath extends string = string> {

@@ -8,3 +8,3 @@ import type { AnyAction } from 'redux';

import type { InternalHandlerBuilder, PromiseWithKnownReason } from './types';
export declare type ReferenceCacheLifecycle = never;
export type ReferenceCacheLifecycle = never;
declare module '../../endpointDefinitions' {

@@ -11,0 +11,0 @@ interface QueryBaseLifecycleApi<QueryArg, BaseQuery extends BaseQueryFn, ResultType, ReducerPath extends string = string> extends LifecycleApi<ReducerPath> {

import type { BaseQueryError, BaseQueryFn, BaseQueryMeta } from '../../baseQueryTypes';
import type { PromiseWithKnownReason, InternalHandlerBuilder } from './types';
export declare type ReferenceQueryLifecycle = never;
export type ReferenceQueryLifecycle = never;
declare module '../../endpointDefinitions' {

@@ -5,0 +5,0 @@ interface QueryLifecyclePromises<ResultType, BaseQuery extends BaseQueryFn> {

@@ -6,4 +6,4 @@ import type { AnyAction, AsyncThunkAction, Dispatch, Middleware, MiddlewareAPI, ThunkDispatch } from '@reduxjs/toolkit';

import type { MutationThunk, QueryThunk, QueryThunkArg, ThunkResult } from '../buildThunks';
export declare type QueryStateMeta<T> = Record<string, undefined | T>;
export declare type TimeoutId = ReturnType<typeof setTimeout>;
export type QueryStateMeta<T> = Record<string, undefined | T>;
export type TimeoutId = ReturnType<typeof setTimeout>;
export interface InternalMiddlewareState {

@@ -20,3 +20,3 @@ currentSubscriptions: SubscriptionState;

}
export declare type SubMiddlewareApi = MiddlewareAPI<ThunkDispatch<any, any, AnyAction>, RootState<EndpointDefinitions, string, string>>;
export type SubMiddlewareApi = MiddlewareAPI<ThunkDispatch<any, any, AnyAction>, RootState<EndpointDefinitions, string, string>>;
export interface BuildSubMiddlewareInput extends BuildMiddlewareInput<EndpointDefinitions, string, string> {

@@ -28,7 +28,7 @@ internalState: InternalMiddlewareState;

}
export declare type SubMiddlewareBuilder = (input: BuildSubMiddlewareInput) => Middleware<{}, RootState<EndpointDefinitions, string, string>, ThunkDispatch<any, any, AnyAction>>;
export declare type ApiMiddlewareInternalHandler<ReturnType = void> = (action: AnyAction, mwApi: SubMiddlewareApi & {
export type SubMiddlewareBuilder = (input: BuildSubMiddlewareInput) => Middleware<{}, RootState<EndpointDefinitions, string, string>, ThunkDispatch<any, any, AnyAction>>;
export type ApiMiddlewareInternalHandler<ReturnType = void> = (action: AnyAction, mwApi: SubMiddlewareApi & {
next: Dispatch<AnyAction>;
}, prevState: RootState<EndpointDefinitions, string, string>) => ReturnType;
export declare type InternalHandlerBuilder<ReturnType = void> = (input: BuildSubMiddlewareInput) => ApiMiddlewareInternalHandler<ReturnType>;
export type InternalHandlerBuilder<ReturnType = void> = (input: BuildSubMiddlewareInput) => ApiMiddlewareInternalHandler<ReturnType>;
export interface PromiseConstructorWithKnownReason {

@@ -35,0 +35,0 @@ /**

import type { MutationSubState, QuerySubState, RootState as _RootState, RequestStatusFlags, QueryCacheKey } from './apiState';
import type { EndpointDefinitions, QueryDefinition, MutationDefinition, QueryArgFrom, TagTypesFrom, ReducerPathFrom, TagDescription } from '../endpointDefinitions';
import type { InternalSerializeQueryArgs } from '../defaultSerializeQueryArgs';
export declare type SkipToken = typeof skipToken;
export type SkipToken = typeof skipToken;
/**

@@ -38,9 +38,9 @@ * Can be passed into `useQuery`, `useQueryState` or `useQuerySubscription`

}
declare type QueryResultSelectorFactory<Definition extends QueryDefinition<any, any, any, any>, RootState> = (queryArg: QueryArgFrom<Definition> | SkipToken) => (state: RootState) => QueryResultSelectorResult<Definition>;
export declare type QueryResultSelectorResult<Definition extends QueryDefinition<any, any, any, any>> = QuerySubState<Definition> & RequestStatusFlags;
declare type MutationResultSelectorFactory<Definition extends MutationDefinition<any, any, any, any>, RootState> = (requestId: string | {
type QueryResultSelectorFactory<Definition extends QueryDefinition<any, any, any, any>, RootState> = (queryArg: QueryArgFrom<Definition> | SkipToken) => (state: RootState) => QueryResultSelectorResult<Definition>;
export type QueryResultSelectorResult<Definition extends QueryDefinition<any, any, any, any>> = QuerySubState<Definition> & RequestStatusFlags;
type MutationResultSelectorFactory<Definition extends MutationDefinition<any, any, any, any>, RootState> = (requestId: string | {
requestId: string | undefined;
fixedCacheKey: string | undefined;
} | SkipToken) => (state: RootState) => MutationResultSelectorResult<Definition>;
export declare type MutationResultSelectorResult<Definition extends MutationDefinition<any, any, any, any>> = MutationSubState<Definition> & RequestStatusFlags;
export type MutationResultSelectorResult<Definition extends MutationDefinition<any, any, any, any>> = MutationSubState<Definition> & RequestStatusFlags;
export declare function buildSelectors<Definitions extends EndpointDefinitions, ReducerPath extends string>({ serializeQueryArgs, reducerPath, }: {

@@ -50,11 +50,5 @@ serializeQueryArgs: InternalSerializeQueryArgs;

}): {
buildQuerySelector: (endpointName: string, endpointDefinition: QueryDefinition<any, any, any, any>) => QueryResultSelectorFactory<any, {
[x: string]: import("./apiState").CombinedState<Definitions, string, string>;
}>;
buildMutationSelector: () => MutationResultSelectorFactory<any, {
[x: string]: import("./apiState").CombinedState<Definitions, string, string>;
}>;
selectInvalidatedBy: (state: {
[x: string]: import("./apiState").CombinedState<Definitions, string, string>;
}, tags: ReadonlyArray<TagDescription<string>>) => Array<{
buildQuerySelector: (endpointName: string, endpointDefinition: QueryDefinition<any, any, any, any>) => QueryResultSelectorFactory<any, _RootState<Definitions, string, string>>;
buildMutationSelector: () => MutationResultSelectorFactory<any, _RootState<Definitions, string, string>>;
selectInvalidatedBy: (state: _RootState<Definitions, string, string>, tags: ReadonlyArray<TagDescription<string>>) => Array<{
endpointName: string;

@@ -61,0 +55,0 @@ originalArgs: any;

@@ -28,6 +28,6 @@ import type { AnyAction } from '@reduxjs/toolkit';

/** @deprecated has been renamed to `removeMutationResult` */
unsubscribeMutationResult: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: MutationSubstateIdentifier], MutationSubstateIdentifier, `${string}/removeMutationResult`, never, unknown>;
resetApiState: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
removeMutationResult: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: MutationSubstateIdentifier], MutationSubstateIdentifier, `${string}/removeMutationResult`, never, unknown>;
subscriptionsUpdated: import("@reduxjs/toolkit").ActionCreatorWithPayload<Patch[], `${string}/subscriptionsUpdated`>;
unsubscribeMutationResult: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: MutationSubstateIdentifier], MutationSubstateIdentifier, `${string}/mutations/removeMutationResult`, never, unknown>;
resetApiState: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<`${string}/resetApiState`>;
removeMutationResult: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: MutationSubstateIdentifier], MutationSubstateIdentifier, `${string}/mutations/removeMutationResult`, never, unknown>;
subscriptionsUpdated: import("@reduxjs/toolkit").ActionCreatorWithPayload<Patch[], `${string}/internalSubscriptions/subscriptionsUpdated`>;
updateSubscriptionOptions: import("@reduxjs/toolkit").ActionCreatorWithPayload<{

@@ -37,17 +37,17 @@ endpointName: string;

options: Subscribers[number];
} & QuerySubstateIdentifier, `${string}/updateSubscriptionOptions`>;
} & QuerySubstateIdentifier, `${string}/subscriptions/updateSubscriptionOptions`>;
unsubscribeQueryResult: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
requestId: string;
} & QuerySubstateIdentifier, `${string}/unsubscribeQueryResult`>;
} & QuerySubstateIdentifier, `${string}/subscriptions/unsubscribeQueryResult`>;
internal_probeSubscription: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
queryCacheKey: string;
requestId: string;
}, `${string}/internal_probeSubscription`>;
removeQueryResult: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: QuerySubstateIdentifier], QuerySubstateIdentifier, `${string}/removeQueryResult`, never, unknown>;
}, `${string}/subscriptions/internal_probeSubscription`>;
removeQueryResult: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: QuerySubstateIdentifier], QuerySubstateIdentifier, `${string}/queries/removeQueryResult`, never, unknown>;
queryResultPatched: import("@reduxjs/toolkit").ActionCreatorWithPayload<QuerySubstateIdentifier & {
patches: readonly Patch[];
}, `${string}/queryResultPatched`>;
middlewareRegistered: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, `${string}/middlewareRegistered`>;
}, `${string}/queries/queryResultPatched`>;
middlewareRegistered: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, `${string}/config/middlewareRegistered`>;
};
};
export declare type SliceActions = ReturnType<typeof buildSlice>['actions'];
export type SliceActions = ReturnType<typeof buildSlice>['actions'];

@@ -19,3 +19,3 @@ import type { InternalSerializeQueryArgs } from '../defaultSerializeQueryArgs';

}
declare type EndpointThunk<Thunk extends QueryThunk | MutationThunk, Definition extends EndpointDefinition<any, any, any, any>> = Definition extends EndpointDefinition<infer QueryArg, infer BaseQueryFn, any, infer ResultType> ? Thunk extends AsyncThunk<unknown, infer ATArg, infer ATConfig> ? AsyncThunk<ResultType, ATArg & {
type EndpointThunk<Thunk extends QueryThunk | MutationThunk, Definition extends EndpointDefinition<any, any, any, any>> = Definition extends EndpointDefinition<infer QueryArg, infer BaseQueryFn, any, infer ResultType> ? Thunk extends AsyncThunk<unknown, infer ATArg, infer ATConfig> ? AsyncThunk<ResultType, ATArg & {
originalArgs: QueryArg;

@@ -25,6 +25,6 @@ }, ATConfig & {

}> : never : never;
export declare type PendingAction<Thunk extends QueryThunk | MutationThunk, Definition extends EndpointDefinition<any, any, any, any>> = ReturnType<EndpointThunk<Thunk, Definition>['pending']>;
export declare type FulfilledAction<Thunk extends QueryThunk | MutationThunk, Definition extends EndpointDefinition<any, any, any, any>> = ReturnType<EndpointThunk<Thunk, Definition>['fulfilled']>;
export declare type RejectedAction<Thunk extends QueryThunk | MutationThunk, Definition extends EndpointDefinition<any, any, any, any>> = ReturnType<EndpointThunk<Thunk, Definition>['rejected']>;
export declare type Matcher<M> = (value: any) => value is M;
export type PendingAction<Thunk extends QueryThunk | MutationThunk, Definition extends EndpointDefinition<any, any, any, any>> = ReturnType<EndpointThunk<Thunk, Definition>['pending']>;
export type FulfilledAction<Thunk extends QueryThunk | MutationThunk, Definition extends EndpointDefinition<any, any, any, any>> = ReturnType<EndpointThunk<Thunk, Definition>['fulfilled']>;
export type RejectedAction<Thunk extends QueryThunk | MutationThunk, Definition extends EndpointDefinition<any, any, any, any>> = ReturnType<EndpointThunk<Thunk, Definition>['rejected']>;
export type Matcher<M> = (value: any) => value is M;
export interface Matchers<Thunk extends QueryThunk | MutationThunk, Definition extends EndpointDefinition<any, any, any, any>> {

@@ -47,4 +47,4 @@ matchPending: Matcher<PendingAction<Thunk, Definition>>;

}
export declare type ThunkResult = unknown;
export declare type ThunkApiMetaConfig = {
export type ThunkResult = unknown;
export type ThunkApiMetaConfig = {
pendingMeta: {

@@ -64,14 +64,14 @@ startedTimeStamp: number;

};
export declare type QueryThunk = AsyncThunk<ThunkResult, QueryThunkArg, ThunkApiMetaConfig>;
export declare type MutationThunk = AsyncThunk<ThunkResult, MutationThunkArg, ThunkApiMetaConfig>;
export declare type MaybeDrafted<T> = T | Draft<T>;
export declare type Recipe<T> = (data: MaybeDrafted<T>) => void | MaybeDrafted<T>;
export declare type UpsertRecipe<T> = (data: MaybeDrafted<T> | undefined) => void | MaybeDrafted<T>;
export declare type PatchQueryDataThunk<Definitions extends EndpointDefinitions, PartialState> = <EndpointName extends QueryKeys<Definitions>>(endpointName: EndpointName, args: QueryArgFrom<Definitions[EndpointName]>, patches: readonly Patch[]) => ThunkAction<void, PartialState, any, AnyAction>;
export declare type UpdateQueryDataThunk<Definitions extends EndpointDefinitions, PartialState> = <EndpointName extends QueryKeys<Definitions>>(endpointName: EndpointName, args: QueryArgFrom<Definitions[EndpointName]>, updateRecipe: Recipe<ResultTypeFrom<Definitions[EndpointName]>>) => ThunkAction<PatchCollection, PartialState, any, AnyAction>;
export declare type UpsertQueryDataThunk<Definitions extends EndpointDefinitions, PartialState> = <EndpointName extends QueryKeys<Definitions>>(endpointName: EndpointName, args: QueryArgFrom<Definitions[EndpointName]>, value: ResultTypeFrom<Definitions[EndpointName]>) => ThunkAction<QueryActionCreatorResult<Definitions[EndpointName] extends QueryDefinition<any, any, any, any> ? Definitions[EndpointName] : never>, PartialState, any, AnyAction>;
export type QueryThunk = AsyncThunk<ThunkResult, QueryThunkArg, ThunkApiMetaConfig>;
export type MutationThunk = AsyncThunk<ThunkResult, MutationThunkArg, ThunkApiMetaConfig>;
export type MaybeDrafted<T> = T | Draft<T>;
export type Recipe<T> = (data: MaybeDrafted<T>) => void | MaybeDrafted<T>;
export type UpsertRecipe<T> = (data: MaybeDrafted<T> | undefined) => void | MaybeDrafted<T>;
export type PatchQueryDataThunk<Definitions extends EndpointDefinitions, PartialState> = <EndpointName extends QueryKeys<Definitions>>(endpointName: EndpointName, args: QueryArgFrom<Definitions[EndpointName]>, patches: readonly Patch[]) => ThunkAction<void, PartialState, any, AnyAction>;
export type UpdateQueryDataThunk<Definitions extends EndpointDefinitions, PartialState> = <EndpointName extends QueryKeys<Definitions>>(endpointName: EndpointName, args: QueryArgFrom<Definitions[EndpointName]>, updateRecipe: Recipe<ResultTypeFrom<Definitions[EndpointName]>>) => ThunkAction<PatchCollection, PartialState, any, AnyAction>;
export type UpsertQueryDataThunk<Definitions extends EndpointDefinitions, PartialState> = <EndpointName extends QueryKeys<Definitions>>(endpointName: EndpointName, args: QueryArgFrom<Definitions[EndpointName]>, value: ResultTypeFrom<Definitions[EndpointName]>) => ThunkAction<QueryActionCreatorResult<Definitions[EndpointName] extends QueryDefinition<any, any, any, any> ? Definitions[EndpointName] : never>, PartialState, any, AnyAction>;
/**
* An object returned from dispatching a `api.util.updateQueryData` call.
*/
export declare type PatchCollection = {
export type PatchCollection = {
/**

@@ -138,5 +138,5 @@ * An `immer` Patch describing the cache update.

prefetch: <EndpointName extends QueryKeys<Definitions>>(endpointName: EndpointName, arg: any, options: PrefetchOptions) => ThunkAction<void, any, any, AnyAction>;
updateQueryData: UpdateQueryDataThunk<EndpointDefinitions, { [P in ReducerPath]: import("./apiState").CombinedState<any, string, P>; }>;
upsertQueryData: UpsertQueryDataThunk<Definitions, { [P in ReducerPath]: import("./apiState").CombinedState<any, string, P>; }>;
patchQueryData: PatchQueryDataThunk<EndpointDefinitions, { [P in ReducerPath]: import("./apiState").CombinedState<any, string, P>; }>;
updateQueryData: UpdateQueryDataThunk<EndpointDefinitions, RootState<any, string, ReducerPath>>;
upsertQueryData: UpsertQueryDataThunk<Definitions, RootState<any, string, ReducerPath>>;
patchQueryData: PatchQueryDataThunk<EndpointDefinitions, RootState<any, string, ReducerPath>>;
buildMatchThunkActions: <Thunk extends AsyncThunk<any, QueryThunkArg, ThunkApiMetaConfig> | AsyncThunk<any, MutationThunkArg, ThunkApiMetaConfig>>(thunk: Thunk, endpointName: string) => Matchers<Thunk, any>;

@@ -143,0 +143,0 @@ };

@@ -27,3 +27,3 @@ /**

*/
export declare type PrefetchOptions = {
export type PrefetchOptions = {
ifOlderThan?: false | number;

@@ -34,3 +34,3 @@ } | {

export declare const coreModuleName: unique symbol;
export declare type CoreModule = typeof coreModuleName | ReferenceCacheLifecycle | ReferenceQueryLifecycle | ReferenceCacheCollection;
export type CoreModule = typeof coreModuleName | ReferenceCacheLifecycle | ReferenceQueryLifecycle | ReferenceCacheCollection;
interface ThunkWithReturnValue<T> extends ThunkAction<T, any, any, AnyAction> {

@@ -313,3 +313,3 @@ }

}
export declare type ListenerActions = {
export type ListenerActions = {
/**

@@ -328,3 +328,3 @@ * Will cause the RTK Query middleware to trigger any refetchOnReconnect-related behavior

};
export declare type InternalActions = SliceActions & ListenerActions;
export type InternalActions = SliceActions & ListenerActions;
/**

@@ -331,0 +331,0 @@ * Creates a module containing the basic redux logic for use with `buildCreateApi`.

@@ -169,3 +169,3 @@ import type { Api, Module, ModuleName } from './apiTypes';

}
export declare type CreateApi<Modules extends ModuleName> = {
export type CreateApi<Modules extends ModuleName> = {
/**

@@ -172,0 +172,0 @@ * Creates a service to use in your application. Contains only the basic redux logic (the core module).

import type { QueryCacheKey } from './core/apiState';
import type { EndpointDefinition } from './endpointDefinitions';
export declare const defaultSerializeQueryArgs: SerializeQueryArgs<any>;
export declare type SerializeQueryArgs<QueryArgs, ReturnType = string> = (_: {
export type SerializeQueryArgs<QueryArgs, ReturnType = string> = (_: {
queryArgs: QueryArgs;

@@ -9,3 +9,3 @@ endpointDefinition: EndpointDefinition<any, any, any, any>;

}) => ReturnType;
export declare type InternalSerializeQueryArgs = (_: {
export type InternalSerializeQueryArgs = (_: {
queryArgs: any;

@@ -12,0 +12,0 @@ endpointDefinition: EndpointDefinition<any, any, any, any>;

@@ -134,3 +134,3 @@ import type { AnyAction, ThunkDispatch } from '@reduxjs/toolkit';

}
export declare type BaseEndpointDefinition<QueryArg, BaseQuery extends BaseQueryFn, ResultType> = (([CastAny<BaseQueryResult<BaseQuery>, {}>] extends [NEVER] ? never : EndpointDefinitionWithQuery<QueryArg, BaseQuery, ResultType>) | EndpointDefinitionWithQueryFn<QueryArg, BaseQuery, ResultType>) & {
export type BaseEndpointDefinition<QueryArg, BaseQuery extends BaseQueryFn, ResultType> = (([CastAny<BaseQueryResult<BaseQuery>, {}>] extends [NEVER] ? never : EndpointDefinitionWithQuery<QueryArg, BaseQuery, ResultType>) | EndpointDefinitionWithQueryFn<QueryArg, BaseQuery, ResultType>) & {
[resultType]?: ResultType;

@@ -147,9 +147,9 @@ [baseQuery]?: BaseQuery;

}
export declare type GetResultDescriptionFn<TagTypes extends string, ResultType, QueryArg, ErrorType, MetaType> = (result: ResultType | undefined, error: ErrorType | undefined, arg: QueryArg, meta: MetaType) => ReadonlyArray<TagDescription<TagTypes>>;
export declare type FullTagDescription<TagType> = {
export type GetResultDescriptionFn<TagTypes extends string, ResultType, QueryArg, ErrorType, MetaType> = (result: ResultType | undefined, error: ErrorType | undefined, arg: QueryArg, meta: MetaType) => ReadonlyArray<TagDescription<TagTypes>>;
export type FullTagDescription<TagType> = {
type: TagType;
id?: number | string;
};
export declare type TagDescription<TagType> = TagType | FullTagDescription<TagType>;
export declare type ResultDescription<TagTypes extends string, ResultType, QueryArg, ErrorType, MetaType> = ReadonlyArray<TagDescription<TagTypes>> | GetResultDescriptionFn<TagTypes, ResultType, QueryArg, ErrorType, MetaType>;
export type TagDescription<TagType> = TagType | FullTagDescription<TagType>;
export type ResultDescription<TagTypes extends string, ResultType, QueryArg, ErrorType, MetaType> = ReadonlyArray<TagDescription<TagTypes>> | GetResultDescriptionFn<TagTypes, ResultType, QueryArg, ErrorType, MetaType>;
/** @deprecated please use `onQueryStarted` instead */

@@ -396,3 +396,3 @@ export interface QueryApi<ReducerPath extends string, Context extends {}> {

}
export declare type QueryDefinition<QueryArg, BaseQuery extends BaseQueryFn, TagTypes extends string, ResultType, ReducerPath extends string = string> = BaseEndpointDefinition<QueryArg, BaseQuery, ResultType> & QueryExtraOptions<TagTypes, ResultType, QueryArg, BaseQuery, ReducerPath>;
export type QueryDefinition<QueryArg, BaseQuery extends BaseQueryFn, TagTypes extends string, ResultType, ReducerPath extends string = string> = BaseEndpointDefinition<QueryArg, BaseQuery, ResultType> & QueryExtraOptions<TagTypes, ResultType, QueryArg, BaseQuery, ReducerPath>;
export interface MutationTypes<QueryArg, BaseQuery extends BaseQueryFn, TagTypes extends string, ResultType, ReducerPath extends string = string> extends BaseEndpointTypes<QueryArg, BaseQuery, ResultType> {

@@ -467,8 +467,8 @@ /**

}
export declare type MutationDefinition<QueryArg, BaseQuery extends BaseQueryFn, TagTypes extends string, ResultType, ReducerPath extends string = string> = BaseEndpointDefinition<QueryArg, BaseQuery, ResultType> & MutationExtraOptions<TagTypes, ResultType, QueryArg, BaseQuery, ReducerPath>;
export declare type EndpointDefinition<QueryArg, BaseQuery extends BaseQueryFn, TagTypes extends string, ResultType, ReducerPath extends string = string> = QueryDefinition<QueryArg, BaseQuery, TagTypes, ResultType, ReducerPath> | MutationDefinition<QueryArg, BaseQuery, TagTypes, ResultType, ReducerPath>;
export declare type EndpointDefinitions = Record<string, EndpointDefinition<any, any, any, any>>;
export type MutationDefinition<QueryArg, BaseQuery extends BaseQueryFn, TagTypes extends string, ResultType, ReducerPath extends string = string> = BaseEndpointDefinition<QueryArg, BaseQuery, ResultType> & MutationExtraOptions<TagTypes, ResultType, QueryArg, BaseQuery, ReducerPath>;
export type EndpointDefinition<QueryArg, BaseQuery extends BaseQueryFn, TagTypes extends string, ResultType, ReducerPath extends string = string> = QueryDefinition<QueryArg, BaseQuery, TagTypes, ResultType, ReducerPath> | MutationDefinition<QueryArg, BaseQuery, TagTypes, ResultType, ReducerPath>;
export type EndpointDefinitions = Record<string, EndpointDefinition<any, any, any, any>>;
export declare function isQueryDefinition(e: EndpointDefinition<any, any, any, any>): e is QueryDefinition<any, any, any, any>;
export declare function isMutationDefinition(e: EndpointDefinition<any, any, any, any>): e is MutationDefinition<any, any, any, any>;
export declare type EndpointBuilder<BaseQuery extends BaseQueryFn, TagTypes extends string, ReducerPath extends string> = {
export type EndpointBuilder<BaseQuery extends BaseQueryFn, TagTypes extends string, ReducerPath extends string> = {
/**

@@ -529,12 +529,12 @@ * An endpoint definition that retrieves data, and may provide tags to the cache.

};
export declare type AssertTagTypes = <T extends FullTagDescription<string>>(t: T) => T;
export type AssertTagTypes = <T extends FullTagDescription<string>>(t: T) => T;
export declare function calculateProvidedBy<ResultType, QueryArg, ErrorType, MetaType>(description: ResultDescription<string, ResultType, QueryArg, ErrorType, MetaType> | undefined, result: ResultType | undefined, error: ErrorType | undefined, queryArg: QueryArg, meta: MetaType | undefined, assertTagTypes: AssertTagTypes): readonly FullTagDescription<string>[];
export declare function expandTagDescription(description: TagDescription<string>): FullTagDescription<string>;
export declare type QueryArgFrom<D extends BaseEndpointDefinition<any, any, any>> = D extends BaseEndpointDefinition<infer QA, any, any> ? QA : unknown;
export declare type ResultTypeFrom<D extends BaseEndpointDefinition<any, any, any>> = D extends BaseEndpointDefinition<any, any, infer RT> ? RT : unknown;
export declare type ReducerPathFrom<D extends EndpointDefinition<any, any, any, any, any>> = D extends EndpointDefinition<any, any, any, any, infer RP> ? RP : unknown;
export declare type TagTypesFrom<D extends EndpointDefinition<any, any, any, any>> = D extends EndpointDefinition<any, any, infer RP, any> ? RP : unknown;
export declare type ReplaceTagTypes<Definitions extends EndpointDefinitions, NewTagTypes extends string> = {
export type QueryArgFrom<D extends BaseEndpointDefinition<any, any, any>> = D extends BaseEndpointDefinition<infer QA, any, any> ? QA : unknown;
export type ResultTypeFrom<D extends BaseEndpointDefinition<any, any, any>> = D extends BaseEndpointDefinition<any, any, infer RT> ? RT : unknown;
export type ReducerPathFrom<D extends EndpointDefinition<any, any, any, any, any>> = D extends EndpointDefinition<any, any, any, any, infer RP> ? RP : unknown;
export type TagTypesFrom<D extends EndpointDefinition<any, any, any, any>> = D extends EndpointDefinition<any, any, infer RP, any> ? RP : unknown;
export type ReplaceTagTypes<Definitions extends EndpointDefinitions, NewTagTypes extends string> = {
[K in keyof Definitions]: Definitions[K] extends QueryDefinition<infer QueryArg, infer BaseQuery, any, infer ResultType, infer ReducerPath> ? QueryDefinition<QueryArg, BaseQuery, NewTagTypes, ResultType, ReducerPath> : Definitions[K] extends MutationDefinition<infer QueryArg, infer BaseQuery, any, infer ResultType, infer ReducerPath> ? MutationDefinition<QueryArg, BaseQuery, NewTagTypes, ResultType, ReducerPath> : never;
};
export {};
import type { BaseQueryFn } from './baseQueryTypes';
declare const _NEVER: unique symbol;
export declare type NEVER = typeof _NEVER;
export type NEVER = typeof _NEVER;
/**

@@ -5,0 +5,0 @@ * Creates a "fake" baseQuery to be used if your api *only* uses the `queryFn` definition syntax.

import type { BaseQueryApi, BaseQueryFn } from './baseQueryTypes';
import type { MaybePromise, Override } from './tsHelpers';
export declare type ResponseHandler = 'content-type' | 'json' | 'text' | ((response: Response) => Promise<any>);
declare type CustomRequestInit = Override<RequestInit, {
export type ResponseHandler = 'content-type' | 'json' | 'text' | ((response: Response) => Promise<any>);
type CustomRequestInit = Override<RequestInit, {
headers?: Headers | string[][] | Record<string, string | undefined> | undefined;

@@ -18,3 +18,3 @@ }>;

}
export declare type FetchBaseQueryError = {
export type FetchBaseQueryError = {
/**

@@ -62,3 +62,3 @@ * * `number`:

};
export declare type FetchBaseQueryArgs = {
export type FetchBaseQueryArgs = {
baseUrl?: string;

@@ -82,3 +82,3 @@ prepareHeaders?: (headers: Headers, api: Pick<BaseQueryApi, 'getState' | 'extra' | 'endpoint' | 'type' | 'forced'>) => MaybePromise<Headers | void>;

} & RequestInit & Pick<FetchArgs, 'responseHandler' | 'validateStatus' | 'timeout'>;
export declare type FetchBaseQueryMeta = {
export type FetchBaseQueryMeta = {
request: Request;

@@ -85,0 +85,0 @@ response?: Response;

@@ -40,4 +40,4 @@ import { useEffect } from 'react';

*/
export declare type UseQuery<D extends QueryDefinition<any, any, any, any>> = <R extends Record<string, any> = UseQueryStateDefaultResult<D>>(arg: QueryArgFrom<D> | SkipToken, options?: UseQuerySubscriptionOptions & UseQueryStateOptions<D, R>) => UseQueryHookResult<D, R>;
export declare type UseQueryHookResult<D extends QueryDefinition<any, any, any, any>, R = UseQueryStateDefaultResult<D>> = UseQueryStateResult<D, R> & UseQuerySubscriptionResult<D>;
export type UseQuery<D extends QueryDefinition<any, any, any, any>> = <R extends Record<string, any> = UseQueryStateDefaultResult<D>>(arg: QueryArgFrom<D> | SkipToken, options?: UseQuerySubscriptionOptions & UseQueryStateOptions<D, R>) => UseQueryHookResult<D, R>;
export type UseQueryHookResult<D extends QueryDefinition<any, any, any, any>, R = UseQueryStateDefaultResult<D>> = UseQueryStateResult<D, R> & UseQuerySubscriptionResult<D>;
/**

@@ -47,3 +47,3 @@ * Helper type to manually type the result

*/
export declare type TypedUseQueryHookResult<ResultType, QueryArg, BaseQuery extends BaseQueryFn, R = UseQueryStateDefaultResult<QueryDefinition<QueryArg, BaseQuery, string, ResultType, string>>> = TypedUseQueryStateResult<ResultType, QueryArg, BaseQuery, R> & TypedUseQuerySubscriptionResult<ResultType, QueryArg, BaseQuery>;
export type TypedUseQueryHookResult<ResultType, QueryArg, BaseQuery extends BaseQueryFn, R = UseQueryStateDefaultResult<QueryDefinition<QueryArg, BaseQuery, string, ResultType, string>>> = TypedUseQueryStateResult<ResultType, QueryArg, BaseQuery, R> & TypedUseQuerySubscriptionResult<ResultType, QueryArg, BaseQuery>;
interface UseQuerySubscriptionOptions extends SubscriptionOptions {

@@ -106,4 +106,4 @@ /**

*/
export declare type UseQuerySubscription<D extends QueryDefinition<any, any, any, any>> = (arg: QueryArgFrom<D> | SkipToken, options?: UseQuerySubscriptionOptions) => UseQuerySubscriptionResult<D>;
export declare type UseQuerySubscriptionResult<D extends QueryDefinition<any, any, any, any>> = Pick<QueryActionCreatorResult<D>, 'refetch'>;
export type UseQuerySubscription<D extends QueryDefinition<any, any, any, any>> = (arg: QueryArgFrom<D> | SkipToken, options?: UseQuerySubscriptionOptions) => UseQuerySubscriptionResult<D>;
export type UseQuerySubscriptionResult<D extends QueryDefinition<any, any, any, any>> = Pick<QueryActionCreatorResult<D>, 'refetch'>;
/**

@@ -113,4 +113,4 @@ * Helper type to manually type the result

*/
export declare type TypedUseQuerySubscriptionResult<ResultType, QueryArg, BaseQuery extends BaseQueryFn> = UseQuerySubscriptionResult<QueryDefinition<QueryArg, BaseQuery, string, ResultType, string>>;
export declare type UseLazyQueryLastPromiseInfo<D extends QueryDefinition<any, any, any, any>> = {
export type TypedUseQuerySubscriptionResult<ResultType, QueryArg, BaseQuery extends BaseQueryFn> = UseQuerySubscriptionResult<QueryDefinition<QueryArg, BaseQuery, string, ResultType, string>>;
export type UseLazyQueryLastPromiseInfo<D extends QueryDefinition<any, any, any, any>> = {
lastArg: QueryArgFrom<D>;

@@ -135,3 +135,3 @@ };

*/
export declare type UseLazyQuery<D extends QueryDefinition<any, any, any, any>> = <R extends Record<string, any> = UseQueryStateDefaultResult<D>>(options?: SubscriptionOptions & Omit<UseQueryStateOptions<D, R>, 'skip'>) => [
export type UseLazyQuery<D extends QueryDefinition<any, any, any, any>> = <R extends Record<string, any> = UseQueryStateDefaultResult<D>>(options?: SubscriptionOptions & Omit<UseQueryStateOptions<D, R>, 'skip'>) => [
LazyQueryTrigger<D>,

@@ -141,3 +141,3 @@ UseQueryStateResult<D, R>,

];
export declare type LazyQueryTrigger<D extends QueryDefinition<any, any, any, any>> = {
export type LazyQueryTrigger<D extends QueryDefinition<any, any, any, any>> = {
/**

@@ -176,4 +176,4 @@ * Triggers a lazy query.

*/
export declare type UseLazyQuerySubscription<D extends QueryDefinition<any, any, any, any>> = (options?: SubscriptionOptions) => readonly [LazyQueryTrigger<D>, QueryArgFrom<D> | UninitializedValue];
export declare type QueryStateSelector<R extends Record<string, any>, D extends QueryDefinition<any, any, any, any>> = (state: UseQueryStateDefaultResult<D>) => R;
export type UseLazyQuerySubscription<D extends QueryDefinition<any, any, any, any>> = (options?: SubscriptionOptions) => readonly [LazyQueryTrigger<D>, QueryArgFrom<D> | UninitializedValue];
export type QueryStateSelector<R extends Record<string, any>, D extends QueryDefinition<any, any, any, any>> = (state: UseQueryStateDefaultResult<D>) => R;
/**

@@ -189,4 +189,4 @@ * 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.

*/
export declare type UseQueryState<D extends QueryDefinition<any, any, any, any>> = <R extends Record<string, any> = UseQueryStateDefaultResult<D>>(arg: QueryArgFrom<D> | SkipToken, options?: UseQueryStateOptions<D, R>) => UseQueryStateResult<D, R>;
export declare type UseQueryStateOptions<D extends QueryDefinition<any, any, any, any>, R extends Record<string, any>> = {
export type UseQueryState<D extends QueryDefinition<any, any, any, any>> = <R extends Record<string, any> = UseQueryStateDefaultResult<D>>(arg: QueryArgFrom<D> | SkipToken, options?: UseQueryStateOptions<D, R>) => UseQueryStateResult<D, R>;
export type UseQueryStateOptions<D extends QueryDefinition<any, any, any, any>, R extends Record<string, any>> = {
/**

@@ -257,3 +257,3 @@ * Prevents a query from automatically running.

};
export declare type UseQueryStateResult<_ extends QueryDefinition<any, any, any, any>, R> = NoInfer<R>;
export type UseQueryStateResult<_ extends QueryDefinition<any, any, any, any>, R> = NoInfer<R>;
/**

@@ -263,4 +263,4 @@ * Helper type to manually type the result

*/
export declare type TypedUseQueryStateResult<ResultType, QueryArg, BaseQuery extends BaseQueryFn, R = UseQueryStateDefaultResult<QueryDefinition<QueryArg, BaseQuery, string, ResultType, string>>> = NoInfer<R>;
declare type UseQueryStateBaseResult<D extends QueryDefinition<any, any, any, any>> = QuerySubState<D> & {
export type TypedUseQueryStateResult<ResultType, QueryArg, BaseQuery extends BaseQueryFn, R = UseQueryStateDefaultResult<QueryDefinition<QueryArg, BaseQuery, string, ResultType, string>>> = NoInfer<R>;
type UseQueryStateBaseResult<D extends QueryDefinition<any, any, any, any>> = QuerySubState<D> & {
/**

@@ -293,3 +293,3 @@ * Where `data` tries to hold data as much as possible, also re-using

};
declare type UseQueryStateDefaultResult<D extends QueryDefinition<any, any, any, any>> = Id<Override<Extract<UseQueryStateBaseResult<D>, {
type UseQueryStateDefaultResult<D extends QueryDefinition<any, any, any, any>> = Id<Override<Extract<UseQueryStateBaseResult<D>, {
status: QueryStatus.uninitialized;

@@ -320,8 +320,8 @@ }>, {

};
export declare type MutationStateSelector<R extends Record<string, any>, D extends MutationDefinition<any, any, any, any>> = (state: MutationResultSelectorResult<D>) => R;
export declare type UseMutationStateOptions<D extends MutationDefinition<any, any, any, any>, R extends Record<string, any>> = {
export type MutationStateSelector<R extends Record<string, any>, D extends MutationDefinition<any, any, any, any>> = (state: MutationResultSelectorResult<D>) => R;
export type UseMutationStateOptions<D extends MutationDefinition<any, any, any, any>, R extends Record<string, any>> = {
selectFromResult?: MutationStateSelector<R, D>;
fixedCacheKey?: string;
};
export declare type UseMutationStateResult<D extends MutationDefinition<any, any, any, any>, R> = NoInfer<R> & {
export type UseMutationStateResult<D extends MutationDefinition<any, any, any, any>, R> = NoInfer<R> & {
originalArgs?: QueryArgFrom<D>;

@@ -338,3 +338,3 @@ /**

*/
export declare type TypedUseMutationResult<ResultType, QueryArg, BaseQuery extends BaseQueryFn, R = MutationResultSelectorResult<MutationDefinition<QueryArg, BaseQuery, string, ResultType, string>>> = UseMutationStateResult<MutationDefinition<QueryArg, BaseQuery, string, ResultType, string>, R>;
export type TypedUseMutationResult<ResultType, QueryArg, BaseQuery extends BaseQueryFn, R = MutationResultSelectorResult<MutationDefinition<QueryArg, BaseQuery, string, ResultType, string>>> = UseMutationStateResult<MutationDefinition<QueryArg, BaseQuery, string, ResultType, string>, R>;
/**

@@ -350,4 +350,4 @@ * 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.

*/
export declare type UseMutation<D extends MutationDefinition<any, any, any, any>> = <R extends Record<string, any> = MutationResultSelectorResult<D>>(options?: UseMutationStateOptions<D, R>) => readonly [MutationTrigger<D>, UseMutationStateResult<D, R>];
export declare type MutationTrigger<D extends MutationDefinition<any, any, any, any>> = {
export type UseMutation<D extends MutationDefinition<any, any, any, any>> = <R extends Record<string, any> = MutationResultSelectorResult<D>>(options?: UseMutationStateOptions<D, R>) => readonly [MutationTrigger<D>, UseMutationStateResult<D, R>];
export type MutationTrigger<D extends MutationDefinition<any, any, any, any>> = {
/**

@@ -387,4 +387,4 @@ * Triggers the mutation and returns a Promise.

buildMutationHook: (name: string) => UseMutation<any>;
usePrefetch: <EndpointName extends QueryKeys<Definitions>>(endpointName: EndpointName, defaultOptions?: PrefetchOptions | undefined) => (arg: any, options?: PrefetchOptions | undefined) => void;
usePrefetch: <EndpointName extends QueryKeys<Definitions>>(endpointName: EndpointName, defaultOptions?: PrefetchOptions) => (arg: any, options?: PrefetchOptions) => void;
};
export {};
export declare const UNINITIALIZED_VALUE: unique symbol;
export declare type UninitializedValue = typeof UNINITIALIZED_VALUE;
export type UninitializedValue = typeof UNINITIALIZED_VALUE;

@@ -9,3 +9,3 @@ import type { MutationHooks, QueryHooks } from './buildHooks';

export declare const reactHooksModuleName: unique symbol;
export declare type ReactHooksModule = typeof reactHooksModuleName;
export type ReactHooksModule = typeof reactHooksModuleName;
declare module '@reduxjs/toolkit/dist/query/apiTypes' {

@@ -27,3 +27,3 @@ interface ApiModules<BaseQuery extends BaseQueryFn, Definitions extends EndpointDefinitions, ReducerPath extends string, TagTypes extends string> {

}
declare type RR = typeof import('react-redux');
type RR = typeof import('react-redux');
export interface ReactHooksModuleOptions {

@@ -30,0 +30,0 @@ /**

import type { UseMutation, UseLazyQuery, UseQuery } from './buildHooks';
import type { DefinitionType, EndpointDefinitions, MutationDefinition, QueryDefinition } from '@reduxjs/toolkit/dist/query/endpointDefinitions';
export declare type HooksWithUniqueNames<Definitions extends EndpointDefinitions> = keyof Definitions extends infer Keys ? Keys extends string ? Definitions[Keys] extends {
export type HooksWithUniqueNames<Definitions extends EndpointDefinitions> = keyof Definitions extends infer Keys ? Keys extends string ? Definitions[Keys] extends {
type: DefinitionType.query;

@@ -5,0 +5,0 @@ } ? {

@@ -1,73 +0,51 @@

var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = function (obj, key, value) { return key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value }) : obj[key] = value; };
var __spreadValues = function (a, b) {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var _i = 0, _c = __getOwnPropSymbols(b); _i < _c.length; _i++) {
var prop = _c[_i];
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = function (a, b) { return __defProps(a, __getOwnPropDescs(b)); };
var __markAsModule = function (target) { return __defProp(target, "__esModule", { value: true }); };
var __export = function (target, all) {
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __reExport = function (target, module2, desc) {
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
var _loop_1 = function (key) {
if (!__hasOwnProp.call(target, key) && key !== "default")
__defProp(target, key, { get: function () { return module2[key]; }, enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
};
for (var _i = 0, _c = __getOwnPropNames(module2); _i < _c.length; _i++) {
var key = _c[_i];
_loop_1(key);
}
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return target;
return to;
};
var __toModule = function (module2) {
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: function () { return module2.default; }, enumerable: true } : { value: module2, enumerable: true })), module2);
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/query/react/index.ts
__markAsModule(exports);
__export(exports, {
ApiProvider: function () { return ApiProvider; },
createApi: function () { return createApi; },
reactHooksModule: function () { return reactHooksModule; }
var react_exports = {};
__export(react_exports, {
ApiProvider: () => ApiProvider,
createApi: () => createApi,
reactHooksModule: () => reactHooksModule
});
var import_query3 = __toModule(require("@reduxjs/toolkit/query"));
module.exports = __toCommonJS(react_exports);
var import_query3 = require("@reduxjs/toolkit/query");
// src/query/react/buildHooks.ts
var import_toolkit2 = __toModule(require("@reduxjs/toolkit"));
var import_react3 = __toModule(require("react"));
var import_query = __toModule(require("@reduxjs/toolkit/query"));
var import_react_redux2 = __toModule(require("react-redux"));
var import_toolkit2 = require("@reduxjs/toolkit");
var import_react3 = require("react");
var import_query = require("@reduxjs/toolkit/query");
var import_react_redux2 = require("react-redux");
// src/query/react/useSerializedStableValue.ts
var import_react = __toModule(require("react"));
var import_react = require("react");
function useStableQueryArgs(queryArgs, serialize, endpointDefinition, endpointName) {
var incoming = (0, import_react.useMemo)(function () { return ({
queryArgs: queryArgs,
serialized: typeof queryArgs == "object" ? serialize({ queryArgs: queryArgs, endpointDefinition: endpointDefinition, endpointName: endpointName }) : queryArgs
}); }, [queryArgs, serialize, endpointDefinition, endpointName]);
var cache = (0, import_react.useRef)(incoming);
(0, import_react.useEffect)(function () {
const incoming = (0, import_react.useMemo)(() => ({
queryArgs,
serialized: typeof queryArgs == "object" ? serialize({ queryArgs, endpointDefinition, endpointName }) : queryArgs
}), [queryArgs, serialize, endpointDefinition, endpointName]);
const cache = (0, import_react.useRef)(incoming);
(0, import_react.useEffect)(() => {
if (cache.current.serialized !== incoming.serialized) {

@@ -82,7 +60,7 @@ cache.current = incoming;

// src/query/react/useShallowStableValue.ts
var import_react2 = __toModule(require("react"));
var import_react_redux = __toModule(require("react-redux"));
var import_react2 = require("react");
var import_react_redux = require("react-redux");
function useShallowStableValue(value) {
var cache = (0, import_react2.useRef)(value);
(0, import_react2.useEffect)(function () {
const cache = (0, import_react2.useRef)(value);
(0, import_react2.useEffect)(() => {
if (!(0, import_react_redux.shallowEqual)(cache.current, value)) {

@@ -95,16 +73,16 @@ cache.current = value;

// src/query/defaultSerializeQueryArgs.ts
var import_toolkit = __toModule(require("@reduxjs/toolkit"));
var defaultSerializeQueryArgs = function (_c) {
var endpointName = _c.endpointName, queryArgs = _c.queryArgs;
return endpointName + "(" + JSON.stringify(queryArgs, function (key, value) { return (0, import_toolkit.isPlainObject)(value) ? Object.keys(value).sort().reduce(function (acc, key2) {
var import_toolkit = require("@reduxjs/toolkit");
var defaultSerializeQueryArgs = ({ endpointName, queryArgs }) => {
return `${endpointName}(${JSON.stringify(queryArgs, (key, value) => (0, import_toolkit.isPlainObject)(value) ? Object.keys(value).sort().reduce((acc, key2) => {
acc[key2] = value[key2];
return acc;
}, {}) : value; }) + ")";
}, {}) : value)})`;
};
// src/query/react/buildHooks.ts
var useIsomorphicLayoutEffect = typeof window !== "undefined" && !!window.document && !!window.document.createElement ? import_react3.useLayoutEffect : import_react3.useEffect;
var defaultMutationStateSelector = function (x) { return x; };
var noPendingQueryStateSelector = function (selected) {
var defaultMutationStateSelector = (x) => x;
var noPendingQueryStateSelector = (selected) => {
if (selected.isUninitialized) {
return __spreadProps(__spreadValues({}, selected), {
return {
...selected,
isUninitialized: false,

@@ -114,22 +92,21 @@ isFetching: true,

status: import_query.QueryStatus.pending
});
};
}
return selected;
};
function buildHooks(_c) {
var api = _c.api, _d = _c.moduleOptions, batch = _d.batch, useDispatch = _d.useDispatch, useSelector = _d.useSelector, useStore = _d.useStore, unstable__sideEffectsInRender = _d.unstable__sideEffectsInRender, serializeQueryArgs = _c.serializeQueryArgs, context = _c.context;
var usePossiblyImmediateEffect = unstable__sideEffectsInRender ? function (cb) { return cb(); } : import_react3.useEffect;
return { buildQueryHooks: buildQueryHooks, buildMutationHook: buildMutationHook, usePrefetch: usePrefetch };
function buildHooks({ api, moduleOptions: { batch, useDispatch, useSelector, useStore, unstable__sideEffectsInRender }, serializeQueryArgs, context }) {
const usePossiblyImmediateEffect = unstable__sideEffectsInRender ? (cb) => cb() : import_react3.useEffect;
return { buildQueryHooks, buildMutationHook, usePrefetch };
function queryStatePreSelector(currentState, lastResult, queryArgs) {
if ((lastResult == null ? void 0 : lastResult.endpointName) && currentState.isUninitialized) {
var endpointName = lastResult.endpointName;
var endpointDefinition = context.endpointDefinitions[endpointName];
const { endpointName } = lastResult;
const endpointDefinition = context.endpointDefinitions[endpointName];
if (serializeQueryArgs({
queryArgs: lastResult.originalArgs,
endpointDefinition: endpointDefinition,
endpointName: endpointName
endpointDefinition,
endpointName
}) === serializeQueryArgs({
queryArgs: queryArgs,
endpointDefinition: endpointDefinition,
endpointName: endpointName
queryArgs,
endpointDefinition,
endpointName
}))

@@ -141,45 +118,55 @@ lastResult = void 0;

}
var data = currentState.isSuccess ? currentState.data : lastResult == null ? void 0 : lastResult.data;
let data = currentState.isSuccess ? currentState.data : lastResult == null ? void 0 : lastResult.data;
if (data === void 0)
data = currentState.data;
var hasData = data !== void 0;
var isFetching = currentState.isLoading;
var isLoading = !hasData && isFetching;
var isSuccess = currentState.isSuccess || isFetching && hasData;
return __spreadProps(__spreadValues({}, currentState), {
data: data,
const hasData = data !== void 0;
const isFetching = currentState.isLoading;
const isLoading = !hasData && isFetching;
const isSuccess = currentState.isSuccess || isFetching && hasData;
return {
...currentState,
data,
currentData: currentState.data,
isFetching: isFetching,
isLoading: isLoading,
isSuccess: isSuccess
});
isFetching,
isLoading,
isSuccess
};
}
function usePrefetch(endpointName, defaultOptions) {
var dispatch = useDispatch();
var stableDefaultOptions = useShallowStableValue(defaultOptions);
return (0, import_react3.useCallback)(function (arg, options) { return dispatch(api.util.prefetch(endpointName, arg, __spreadValues(__spreadValues({}, stableDefaultOptions), options))); }, [endpointName, dispatch, stableDefaultOptions]);
const dispatch = useDispatch();
const stableDefaultOptions = useShallowStableValue(defaultOptions);
return (0, import_react3.useCallback)((arg, options) => dispatch(api.util.prefetch(endpointName, arg, {
...stableDefaultOptions,
...options
})), [endpointName, dispatch, stableDefaultOptions]);
}
function buildQueryHooks(name) {
var useQuerySubscription = function (arg, _c) {
var _d = _c === void 0 ? {} : _c, refetchOnReconnect = _d.refetchOnReconnect, refetchOnFocus = _d.refetchOnFocus, refetchOnMountOrArgChange = _d.refetchOnMountOrArgChange, _e = _d.skip, skip = _e === void 0 ? false : _e, _f = _d.pollingInterval, pollingInterval = _f === void 0 ? 0 : _f;
var initiate = api.endpoints[name].initiate;
var dispatch = useDispatch();
var stableArg = useStableQueryArgs(skip ? import_query.skipToken : arg, defaultSerializeQueryArgs, context.endpointDefinitions[name], name);
var stableSubscriptionOptions = useShallowStableValue({
refetchOnReconnect: refetchOnReconnect,
refetchOnFocus: refetchOnFocus,
pollingInterval: pollingInterval
const useQuerySubscription = (arg, { refetchOnReconnect, refetchOnFocus, refetchOnMountOrArgChange, skip = false, pollingInterval = 0 } = {}) => {
const { initiate } = api.endpoints[name];
const dispatch = useDispatch();
const stableArg = useStableQueryArgs(skip ? import_query.skipToken : arg,
// Even if the user provided a per-endpoint `serializeQueryArgs` with
// a consistent return value, _here_ we want to use the default behavior
// so we can tell if _anything_ actually changed. Otherwise, we can end up
// with a case where the query args did change but the serialization doesn't,
// and then we never try to initiate a refetch.
defaultSerializeQueryArgs, context.endpointDefinitions[name], name);
const stableSubscriptionOptions = useShallowStableValue({
refetchOnReconnect,
refetchOnFocus,
pollingInterval
});
var lastRenderHadSubscription = (0, import_react3.useRef)(false);
var promiseRef = (0, import_react3.useRef)();
var _g = promiseRef.current || {}, queryCacheKey = _g.queryCacheKey, requestId = _g.requestId;
var currentRenderHasSubscription = false;
const lastRenderHadSubscription = (0, import_react3.useRef)(false);
const promiseRef = (0, import_react3.useRef)();
let { queryCacheKey, requestId } = promiseRef.current || {};
let currentRenderHasSubscription = false;
if (queryCacheKey && requestId) {
var returnedValue = dispatch(api.internalActions.internal_probeSubscription({
queryCacheKey: queryCacheKey,
requestId: requestId
const returnedValue = dispatch(api.internalActions.internal_probeSubscription({
queryCacheKey,
requestId
}));
if (true) {
if (typeof returnedValue !== "boolean") {
throw new Error("Warning: Middleware for RTK-Query API at reducerPath \"" + api.reducerPath + "\" has not been added to the store.\n You must add the middleware for RTK-Query to function correctly!");
throw new Error(`Warning: Middleware for RTK-Query API at reducerPath "${api.reducerPath}" has not been added to the store.
You must add the middleware for RTK-Query to function correctly!`);
}

@@ -189,12 +176,12 @@ }

}
var subscriptionRemoved = !currentRenderHasSubscription && lastRenderHadSubscription.current;
usePossiblyImmediateEffect(function () {
const subscriptionRemoved = !currentRenderHasSubscription && lastRenderHadSubscription.current;
usePossiblyImmediateEffect(() => {
lastRenderHadSubscription.current = currentRenderHasSubscription;
});
usePossiblyImmediateEffect(function () {
usePossiblyImmediateEffect(() => {
promiseRef.current = void 0;
}, [subscriptionRemoved]);
usePossiblyImmediateEffect(function () {
usePossiblyImmediateEffect(() => {
var _a;
var lastPromise = promiseRef.current;
const lastPromise = promiseRef.current;
if (typeof process !== "undefined" && false) {

@@ -208,6 +195,6 @@ console.log(subscriptionRemoved);

}
var lastSubscriptionOptions = (_a = promiseRef.current) == null ? void 0 : _a.subscriptionOptions;
const lastSubscriptionOptions = (_a = promiseRef.current) == null ? void 0 : _a.subscriptionOptions;
if (!lastPromise || lastPromise.arg !== stableArg) {
lastPromise == null ? void 0 : lastPromise.unsubscribe();
var promise = dispatch(initiate(stableArg, {
const promise = dispatch(initiate(stableArg, {
subscriptionOptions: stableSubscriptionOptions,

@@ -229,4 +216,4 @@ forceRefetch: refetchOnMountOrArgChange

]);
(0, import_react3.useEffect)(function () {
return function () {
(0, import_react3.useEffect)(() => {
return () => {
var _a;

@@ -237,4 +224,7 @@ (_a = promiseRef.current) == null ? void 0 : _a.unsubscribe();

}, []);
return (0, import_react3.useMemo)(function () { return ({
refetch: function () {
return (0, import_react3.useMemo)(() => ({
/**
* A method to manually refetch data for the query
*/
refetch: () => {
var _a;

@@ -245,18 +235,17 @@ if (!promiseRef.current)

}
}); }, []);
}), []);
};
var useLazyQuerySubscription = function (_c) {
var _d = _c === void 0 ? {} : _c, refetchOnReconnect = _d.refetchOnReconnect, refetchOnFocus = _d.refetchOnFocus, _e = _d.pollingInterval, pollingInterval = _e === void 0 ? 0 : _e;
var initiate = api.endpoints[name].initiate;
var dispatch = useDispatch();
var _f = (0, import_react3.useState)(UNINITIALIZED_VALUE), arg = _f[0], setArg = _f[1];
var promiseRef = (0, import_react3.useRef)();
var stableSubscriptionOptions = useShallowStableValue({
refetchOnReconnect: refetchOnReconnect,
refetchOnFocus: refetchOnFocus,
pollingInterval: pollingInterval
const useLazyQuerySubscription = ({ refetchOnReconnect, refetchOnFocus, pollingInterval = 0 } = {}) => {
const { initiate } = api.endpoints[name];
const dispatch = useDispatch();
const [arg, setArg] = (0, import_react3.useState)(UNINITIALIZED_VALUE);
const promiseRef = (0, import_react3.useRef)();
const stableSubscriptionOptions = useShallowStableValue({
refetchOnReconnect,
refetchOnFocus,
pollingInterval
});
usePossiblyImmediateEffect(function () {
usePossiblyImmediateEffect(() => {
var _a, _b;
var lastSubscriptionOptions = (_a = promiseRef.current) == null ? void 0 : _a.subscriptionOptions;
const lastSubscriptionOptions = (_a = promiseRef.current) == null ? void 0 : _a.subscriptionOptions;
if (stableSubscriptionOptions !== lastSubscriptionOptions) {

@@ -266,10 +255,9 @@ (_b = promiseRef.current) == null ? void 0 : _b.updateSubscriptionOptions(stableSubscriptionOptions);

}, [stableSubscriptionOptions]);
var subscriptionOptionsRef = (0, import_react3.useRef)(stableSubscriptionOptions);
usePossiblyImmediateEffect(function () {
const subscriptionOptionsRef = (0, import_react3.useRef)(stableSubscriptionOptions);
usePossiblyImmediateEffect(() => {
subscriptionOptionsRef.current = stableSubscriptionOptions;
}, [stableSubscriptionOptions]);
var trigger = (0, import_react3.useCallback)(function (arg2, preferCacheValue) {
if (preferCacheValue === void 0) { preferCacheValue = false; }
var promise;
batch(function () {
const trigger = (0, import_react3.useCallback)(function (arg2, preferCacheValue = false) {
let promise;
batch(() => {
var _a;

@@ -285,4 +273,4 @@ (_a = promiseRef.current) == null ? void 0 : _a.unsubscribe();

}, [dispatch, initiate]);
(0, import_react3.useEffect)(function () {
return function () {
(0, import_react3.useEffect)(() => {
return () => {
var _a;

@@ -292,3 +280,3 @@ (_a = promiseRef == null ? void 0 : promiseRef.current) == null ? void 0 : _a.unsubscribe();

}, []);
(0, import_react3.useEffect)(function () {
(0, import_react3.useEffect)(() => {
if (arg !== UNINITIALIZED_VALUE && !promiseRef.current) {

@@ -298,19 +286,18 @@ trigger(arg, true);

}, [arg, trigger]);
return (0, import_react3.useMemo)(function () { return [trigger, arg]; }, [trigger, arg]);
return (0, import_react3.useMemo)(() => [trigger, arg], [trigger, arg]);
};
var useQueryState = function (arg, _c) {
var _d = _c === void 0 ? {} : _c, _e = _d.skip, skip = _e === void 0 ? false : _e, selectFromResult = _d.selectFromResult;
var select = api.endpoints[name].select;
var stableArg = useStableQueryArgs(skip ? import_query.skipToken : arg, serializeQueryArgs, context.endpointDefinitions[name], name);
var lastValue = (0, import_react3.useRef)();
var selectDefaultResult = (0, import_react3.useMemo)(function () { return (0, import_toolkit2.createSelector)([
const useQueryState = (arg, { skip = false, selectFromResult } = {}) => {
const { select } = api.endpoints[name];
const stableArg = useStableQueryArgs(skip ? import_query.skipToken : arg, serializeQueryArgs, context.endpointDefinitions[name], name);
const lastValue = (0, import_react3.useRef)();
const selectDefaultResult = (0, import_react3.useMemo)(() => (0, import_toolkit2.createSelector)([
select(stableArg),
function (_, lastResult) { return lastResult; },
function (_) { return stableArg; }
], queryStatePreSelector); }, [select, stableArg]);
var querySelector = (0, import_react3.useMemo)(function () { return selectFromResult ? (0, import_toolkit2.createSelector)([selectDefaultResult], selectFromResult) : selectDefaultResult; }, [selectDefaultResult, selectFromResult]);
var currentState = useSelector(function (state) { return querySelector(state, lastValue.current); }, import_react_redux2.shallowEqual);
var store = useStore();
var newLastValue = selectDefaultResult(store.getState(), lastValue.current);
useIsomorphicLayoutEffect(function () {
(_, lastResult) => lastResult,
(_) => stableArg
], queryStatePreSelector), [select, stableArg]);
const querySelector = (0, import_react3.useMemo)(() => selectFromResult ? (0, import_toolkit2.createSelector)([selectDefaultResult], selectFromResult) : selectDefaultResult, [selectDefaultResult, selectFromResult]);
const currentState = useSelector((state) => querySelector(state, lastValue.current), import_react_redux2.shallowEqual);
const store = useStore();
const newLastValue = selectDefaultResult(store.getState(), lastValue.current);
useIsomorphicLayoutEffect(() => {
lastValue.current = newLastValue;

@@ -321,21 +308,23 @@ }, [newLastValue]);

return {
useQueryState: useQueryState,
useQuerySubscription: useQuerySubscription,
useLazyQuerySubscription: useLazyQuerySubscription,
useLazyQuery: function (options) {
var _c = useLazyQuerySubscription(options), trigger = _c[0], arg = _c[1];
var queryStateResults = useQueryState(arg, __spreadProps(__spreadValues({}, options), {
useQueryState,
useQuerySubscription,
useLazyQuerySubscription,
useLazyQuery(options) {
const [trigger, arg] = useLazyQuerySubscription(options);
const queryStateResults = useQueryState(arg, {
...options,
skip: arg === UNINITIALIZED_VALUE
}));
var info = (0, import_react3.useMemo)(function () { return ({ lastArg: arg }); }, [arg]);
return (0, import_react3.useMemo)(function () { return [trigger, queryStateResults, info]; }, [trigger, queryStateResults, info]);
});
const info = (0, import_react3.useMemo)(() => ({ lastArg: arg }), [arg]);
return (0, import_react3.useMemo)(() => [trigger, queryStateResults, info], [trigger, queryStateResults, info]);
},
useQuery: function (arg, options) {
var querySubscriptionResults = useQuerySubscription(arg, options);
var queryStateResults = useQueryState(arg, __spreadValues({
selectFromResult: arg === import_query.skipToken || (options == null ? void 0 : options.skip) ? void 0 : noPendingQueryStateSelector
}, options));
var data = queryStateResults.data, status = queryStateResults.status, isLoading = queryStateResults.isLoading, isSuccess = queryStateResults.isSuccess, isError = queryStateResults.isError, error = queryStateResults.error;
(0, import_react3.useDebugValue)({ data: data, status: status, isLoading: isLoading, isSuccess: isSuccess, isError: isError, error: error });
return (0, import_react3.useMemo)(function () { return __spreadValues(__spreadValues({}, queryStateResults), querySubscriptionResults); }, [queryStateResults, querySubscriptionResults]);
useQuery(arg, options) {
const querySubscriptionResults = useQuerySubscription(arg, options);
const queryStateResults = useQueryState(arg, {
selectFromResult: arg === import_query.skipToken || (options == null ? void 0 : options.skip) ? void 0 : noPendingQueryStateSelector,
...options
});
const { data, status, isLoading, isSuccess, isError, error } = queryStateResults;
(0, import_react3.useDebugValue)({ data, status, isLoading, isSuccess, isError, error });
return (0, import_react3.useMemo)(() => ({ ...queryStateResults, ...querySubscriptionResults }), [queryStateResults, querySubscriptionResults]);
}

@@ -345,23 +334,22 @@ };

function buildMutationHook(name) {
return function (_c) {
var _d = _c === void 0 ? {} : _c, _e = _d.selectFromResult, selectFromResult = _e === void 0 ? defaultMutationStateSelector : _e, fixedCacheKey = _d.fixedCacheKey;
var _f = api.endpoints[name], select = _f.select, initiate = _f.initiate;
var dispatch = useDispatch();
var _g = (0, import_react3.useState)(), promise = _g[0], setPromise = _g[1];
(0, import_react3.useEffect)(function () { return function () {
return ({ selectFromResult = defaultMutationStateSelector, fixedCacheKey } = {}) => {
const { select, initiate } = api.endpoints[name];
const dispatch = useDispatch();
const [promise, setPromise] = (0, import_react3.useState)();
(0, import_react3.useEffect)(() => () => {
if (!(promise == null ? void 0 : promise.arg.fixedCacheKey)) {
promise == null ? void 0 : promise.reset();
}
}; }, [promise]);
var triggerMutation = (0, import_react3.useCallback)(function (arg) {
var promise2 = dispatch(initiate(arg, { fixedCacheKey: fixedCacheKey }));
}, [promise]);
const triggerMutation = (0, import_react3.useCallback)(function (arg) {
const promise2 = dispatch(initiate(arg, { fixedCacheKey }));
setPromise(promise2);
return promise2;
}, [dispatch, initiate, fixedCacheKey]);
var requestId = (promise || {}).requestId;
var mutationSelector = (0, import_react3.useMemo)(function () { return (0, import_toolkit2.createSelector)([select({ fixedCacheKey: fixedCacheKey, requestId: promise == null ? void 0 : promise.requestId })], selectFromResult); }, [select, promise, selectFromResult, fixedCacheKey]);
var currentState = useSelector(mutationSelector, import_react_redux2.shallowEqual);
var originalArgs = fixedCacheKey == null ? promise == null ? void 0 : promise.arg.originalArgs : void 0;
var reset = (0, import_react3.useCallback)(function () {
batch(function () {
const { requestId } = promise || {};
const mutationSelector = (0, import_react3.useMemo)(() => (0, import_toolkit2.createSelector)([select({ fixedCacheKey, requestId: promise == null ? void 0 : promise.requestId })], selectFromResult), [select, promise, selectFromResult, fixedCacheKey]);
const currentState = useSelector(mutationSelector, import_react_redux2.shallowEqual);
const originalArgs = fixedCacheKey == null ? promise == null ? void 0 : promise.arg.originalArgs : void 0;
const reset = (0, import_react3.useCallback)(() => {
batch(() => {
if (promise) {

@@ -372,4 +360,4 @@ setPromise(void 0);

dispatch(api.internalActions.removeMutationResult({
requestId: requestId,
fixedCacheKey: fixedCacheKey
requestId,
fixedCacheKey
}));

@@ -379,14 +367,14 @@ }

}, [dispatch, fixedCacheKey, promise, requestId]);
var endpointName = currentState.endpointName, data = currentState.data, status = currentState.status, isLoading = currentState.isLoading, isSuccess = currentState.isSuccess, isError = currentState.isError, error = currentState.error;
const { endpointName, data, status, isLoading, isSuccess, isError, error } = currentState;
(0, import_react3.useDebugValue)({
endpointName: endpointName,
data: data,
status: status,
isLoading: isLoading,
isSuccess: isSuccess,
isError: isError,
error: error
endpointName,
data,
status,
isLoading,
isSuccess,
isError,
error
});
var finalState = (0, import_react3.useMemo)(function () { return __spreadProps(__spreadValues({}, currentState), { originalArgs: originalArgs, reset: reset }); }, [currentState, originalArgs, reset]);
return (0, import_react3.useMemo)(function () { return [triggerMutation, finalState]; }, [triggerMutation, finalState]);
const finalState = (0, import_react3.useMemo)(() => ({ ...currentState, originalArgs, reset }), [currentState, originalArgs, reset]);
return (0, import_react3.useMemo)(() => [triggerMutation, finalState], [triggerMutation, finalState]);
};

@@ -396,12 +384,7 @@ }

// src/query/endpointDefinitions.ts
var DefinitionType;
(function (DefinitionType2) {
DefinitionType2["query"] = "query";
DefinitionType2["mutation"] = "mutation";
})(DefinitionType || (DefinitionType = {}));
function isQueryDefinition(e) {
return e.type === DefinitionType.query;
return e.type === "query" /* query */;
}
function isMutationDefinition(e) {
return e.type === DefinitionType.mutation;
return e.type === "mutation" /* mutation */;
}

@@ -413,82 +396,68 @@ // src/query/utils/capitalize.ts

// src/query/tsHelpers.ts
function safeAssign(target) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
Object.assign.apply(Object, __spreadArray([target], args));
function safeAssign(target, ...args) {
Object.assign(target, ...args);
}
// src/query/react/module.ts
var import_react_redux3 = __toModule(require("react-redux"));
var import_react_redux3 = require("react-redux");
var reactHooksModuleName = /* @__PURE__ */ Symbol();
var reactHooksModule = function (_c) {
var _d = _c === void 0 ? {} : _c, _e = _d.batch, batch = _e === void 0 ? import_react_redux3.batch : _e, _f = _d.useDispatch, useDispatch = _f === void 0 ? import_react_redux3.useDispatch : _f, _g = _d.useSelector, useSelector = _g === void 0 ? import_react_redux3.useSelector : _g, _h = _d.useStore, useStore = _h === void 0 ? import_react_redux3.useStore : _h, _j = _d.unstable__sideEffectsInRender, unstable__sideEffectsInRender = _j === void 0 ? false : _j;
return ({
name: reactHooksModuleName,
init: function (api, _c, context) {
var serializeQueryArgs = _c.serializeQueryArgs;
var anyApi = api;
var _d = buildHooks({
api: api,
moduleOptions: {
batch: batch,
useDispatch: useDispatch,
useSelector: useSelector,
useStore: useStore,
unstable__sideEffectsInRender: unstable__sideEffectsInRender
},
serializeQueryArgs: serializeQueryArgs,
context: context
}), buildQueryHooks = _d.buildQueryHooks, buildMutationHook = _d.buildMutationHook, usePrefetch = _d.usePrefetch;
safeAssign(anyApi, { usePrefetch: usePrefetch });
safeAssign(context, { batch: batch });
return {
injectEndpoint: function (endpointName, definition) {
if (isQueryDefinition(definition)) {
var _c = buildQueryHooks(endpointName), useQuery = _c.useQuery, useLazyQuery = _c.useLazyQuery, useLazyQuerySubscription = _c.useLazyQuerySubscription, useQueryState = _c.useQueryState, useQuerySubscription = _c.useQuerySubscription;
safeAssign(anyApi.endpoints[endpointName], {
useQuery: useQuery,
useLazyQuery: useLazyQuery,
useLazyQuerySubscription: useLazyQuerySubscription,
useQueryState: useQueryState,
useQuerySubscription: useQuerySubscription
});
api["use" + capitalize(endpointName) + "Query"] = useQuery;
api["useLazy" + capitalize(endpointName) + "Query"] = useLazyQuery;
}
else if (isMutationDefinition(definition)) {
var useMutation = buildMutationHook(endpointName);
safeAssign(anyApi.endpoints[endpointName], {
useMutation: useMutation
});
api["use" + capitalize(endpointName) + "Mutation"] = useMutation;
}
var reactHooksModule = ({ batch = import_react_redux3.batch, useDispatch = import_react_redux3.useDispatch, useSelector = import_react_redux3.useSelector, useStore = import_react_redux3.useStore, unstable__sideEffectsInRender = false } = {}) => ({
name: reactHooksModuleName,
init(api, { serializeQueryArgs }, context) {
const anyApi = api;
const { buildQueryHooks, buildMutationHook, usePrefetch } = buildHooks({
api,
moduleOptions: {
batch,
useDispatch,
useSelector,
useStore,
unstable__sideEffectsInRender
},
serializeQueryArgs,
context
});
safeAssign(anyApi, { usePrefetch });
safeAssign(context, { batch });
return {
injectEndpoint(endpointName, definition) {
if (isQueryDefinition(definition)) {
const { useQuery, useLazyQuery, useLazyQuerySubscription, useQueryState, useQuerySubscription } = buildQueryHooks(endpointName);
safeAssign(anyApi.endpoints[endpointName], {
useQuery,
useLazyQuery,
useLazyQuerySubscription,
useQueryState,
useQuerySubscription
});
api[`use${capitalize(endpointName)}Query`] = useQuery;
api[`useLazy${capitalize(endpointName)}Query`] = useLazyQuery;
}
};
}
});
};
else if (isMutationDefinition(definition)) {
const useMutation = buildMutationHook(endpointName);
safeAssign(anyApi.endpoints[endpointName], {
useMutation
});
api[`use${capitalize(endpointName)}Mutation`] = useMutation;
}
}
};
}
});
// src/query/react/index.ts
__reExport(exports, __toModule(require("@reduxjs/toolkit/query")));
__reExport(react_exports, require("@reduxjs/toolkit/query"), module.exports);
// src/query/react/ApiProvider.tsx
var import_toolkit3 = __toModule(require("@reduxjs/toolkit"));
var import_react4 = __toModule(require("react"));
var import_react5 = __toModule(require("react"));
var import_react_redux4 = __toModule(require("react-redux"));
var import_query2 = __toModule(require("@reduxjs/toolkit/query"));
var import_toolkit3 = require("@reduxjs/toolkit");
var import_react4 = require("react");
var import_react5 = __toESM(require("react"));
var import_react_redux4 = require("react-redux");
var import_query2 = require("@reduxjs/toolkit/query");
function ApiProvider(props) {
var store = import_react5.default.useState(function () {
var _c;
return (0, import_toolkit3.configureStore)({
reducer: (_c = {},
_c[props.api.reducerPath] = props.api.reducer,
_c),
middleware: function (gDM) { return gDM().concat(props.api.middleware); }
});
})[0];
(0, import_react4.useEffect)(function () { return props.setupListeners === false ? void 0 : (0, import_query2.setupListeners)(store.dispatch, props.setupListeners); }, [props.setupListeners]);
return /* @__PURE__ */ import_react5.default.createElement(import_react_redux4.Provider, {
store: store,
context: props.context
}, props.children);
const [store] = import_react5.default.useState(() => (0, import_toolkit3.configureStore)({
reducer: {
[props.api.reducerPath]: props.api.reducer
},
middleware: (gDM) => gDM().concat(props.api.middleware)
}));
(0, import_react4.useEffect)(() => props.setupListeners === false ? void 0 : (0, import_query2.setupListeners)(store.dispatch, props.setupListeners), [props.setupListeners]);
return /* @__PURE__ */ import_react5.default.createElement(import_react_redux4.Provider, { store, context: props.context }, props.children);
}

@@ -495,0 +464,0 @@ // src/query/react/index.ts

@@ -1,2 +0,2 @@

var e=this&&this.__spreadArray||function(e,r){for(var t=0,n=r.length,u=e.length;t<n;t++,u++)e[u]=r[t];return e},r=Object.create,t=Object.defineProperty,n=Object.defineProperties,u=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,c=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,l=function(e,r,n){return r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n},d=function(e,r){for(var t in r||(r={}))a.call(r,t)&&l(e,t,r[t]);if(s)for(var n=0,u=s(r);n<u.length;n++)f.call(r,t=u[n])&&l(e,t,r[t]);return e},p=function(e,r){return n(e,i(r))},v=function(e){return t(e,"__esModule",{value:!0})},y=function(e,r,n){if(r&&"object"==typeof r||"function"==typeof r)for(var i=function(i){a.call(e,i)||"default"===i||t(e,i,{get:function(){return r[i]},enumerable:!(n=u(r,i))||n.enumerable})},s=0,c=o(r);s<c.length;s++)i(c[s]);return e},b=function(e){return y(v(t(null!=e?r(c(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};v(exports),function(e,r){for(var n in r)t(e,n,{get:r[n],enumerable:!0})}(exports,{ApiProvider:function(){return V},createApi:function(){return J},reactHooksModule:function(){return N}});var g=b(require("@reduxjs/toolkit/query")),h=b(require("@reduxjs/toolkit")),m=b(require("react")),q=b(require("@reduxjs/toolkit/query")),S=b(require("react-redux")),O=b(require("react"));function k(e,r,t,n){var u=(0,O.useMemo)((function(){return{queryArgs:e,serialized:"object"==typeof e?r({queryArgs:e,endpointDefinition:t,endpointName:n}):e}}),[e,r,t,n]),i=(0,O.useRef)(u);return(0,O.useEffect)((function(){i.current.serialized!==u.serialized&&(i.current=u)}),[u]),i.current.serialized===u.serialized?i.current.queryArgs:e}var E=Symbol(),j=b(require("react")),x=b(require("react-redux"));function Q(e){var r=(0,j.useRef)(e);return(0,j.useEffect)((function(){(0,x.shallowEqual)(r.current,e)||(r.current=e)}),[e]),(0,x.shallowEqual)(r.current,e)?r.current:e}var M,w,A=b(require("@reduxjs/toolkit")),R=function(e){return e.endpointName+"("+JSON.stringify(e.queryArgs,(function(e,r){return(0,A.isPlainObject)(r)?Object.keys(r).sort().reduce((function(e,t){return e[t]=r[t],e}),{}):r}))+")"},L="undefined"!=typeof window&&window.document&&window.document.createElement?m.useLayoutEffect:m.useEffect,z=function(e){return e},C=function(e){return e.isUninitialized?p(d({},e),{isUninitialized:!1,isFetching:!0,isLoading:void 0===e.data,status:q.QueryStatus.pending}):e};function D(e){return e.replace(e[0],e[0].toUpperCase())}function P(r){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Object.assign.apply(Object,e([r],t))}(w=M||(M={})).query="query",w.mutation="mutation";var I=b(require("react-redux")),_=Symbol(),N=function(e){var r=void 0===e?{}:e,t=r.batch,n=void 0===t?I.batch:t,u=r.useDispatch,i=void 0===u?I.useDispatch:u,o=r.useSelector,s=void 0===o?I.useSelector:o,c=r.useStore,a=void 0===c?I.useStore:c,f=r.unstable__sideEffectsInRender,l=void 0!==f&&f;return{name:_,init:function(e,r,t){var u=e,o=function(e){var r=e.api,t=e.moduleOptions,n=t.batch,u=t.useDispatch,i=t.useSelector,o=t.useStore,s=e.serializeQueryArgs,c=e.context,a=t.unstable__sideEffectsInRender?function(e){return e()}:m.useEffect;return{buildQueryHooks:function(e){var t=function(t,n){var i=void 0===n?{}:n,o=i.refetchOnReconnect,s=i.refetchOnFocus,f=i.refetchOnMountOrArgChange,l=i.skip,d=void 0!==l&&l,p=i.pollingInterval,v=void 0===p?0:p,y=r.endpoints[e].initiate,b=u(),g=k(d?q.skipToken:t,R,c.endpointDefinitions[e],e),h=Q({refetchOnReconnect:o,refetchOnFocus:s,pollingInterval:v}),S=(0,m.useRef)(!1),O=(0,m.useRef)(),E=O.current||{},j=E.queryCacheKey,x=E.requestId,M=!1;if(j&&x){var w=b(r.internalActions.internal_probeSubscription({queryCacheKey:j,requestId:x}));M=!!w}var A=!M&&S.current;return a((function(){S.current=M})),a((function(){O.current=void 0}),[A]),a((function(){var e,r=O.current;if(g===q.skipToken)return null==r||r.unsubscribe(),void(O.current=void 0);var t=null==(e=O.current)?void 0:e.subscriptionOptions;if(r&&r.arg===g)h!==t&&r.updateSubscriptionOptions(h);else{null==r||r.unsubscribe();var n=b(y(g,{subscriptionOptions:h,forceRefetch:f}));O.current=n}}),[b,y,f,g,h,A]),(0,m.useEffect)((function(){return function(){var e;null==(e=O.current)||e.unsubscribe(),O.current=void 0}}),[]),(0,m.useMemo)((function(){return{refetch:function(){var e;if(!O.current)throw new Error("Cannot refetch a query that has not been started yet.");return null==(e=O.current)?void 0:e.refetch()}}}),[])},l=function(t){var i=void 0===t?{}:t,o=i.refetchOnReconnect,s=i.refetchOnFocus,c=i.pollingInterval,f=void 0===c?0:c,l=r.endpoints[e].initiate,d=u(),p=(0,m.useState)(E),v=p[0],y=p[1],b=(0,m.useRef)(),g=Q({refetchOnReconnect:o,refetchOnFocus:s,pollingInterval:f});a((function(){var e,r,t=null==(e=b.current)?void 0:e.subscriptionOptions;g!==t&&(null==(r=b.current)||r.updateSubscriptionOptions(g))}),[g]);var h=(0,m.useRef)(g);a((function(){h.current=g}),[g]);var q=(0,m.useCallback)((function(e,r){var t;return void 0===r&&(r=!1),n((function(){var n;null==(n=b.current)||n.unsubscribe(),b.current=t=d(l(e,{subscriptionOptions:h.current,forceRefetch:!r})),y(e)})),t}),[d,l]);return(0,m.useEffect)((function(){return function(){var e;null==(e=null==b?void 0:b.current)||e.unsubscribe()}}),[]),(0,m.useEffect)((function(){v===E||b.current||q(v,!0)}),[v,q]),(0,m.useMemo)((function(){return[q,v]}),[q,v])},v=function(t,n){var u=void 0===n?{}:n,a=u.skip,l=u.selectFromResult,d=r.endpoints[e].select,p=k(void 0!==a&&a?q.skipToken:t,s,c.endpointDefinitions[e],e),v=(0,m.useRef)(),y=(0,m.useMemo)((function(){return(0,h.createSelector)([d(p),function(e,r){return r},function(e){return p}],f)}),[d,p]),b=(0,m.useMemo)((function(){return l?(0,h.createSelector)([y],l):y}),[y,l]),g=i((function(e){return b(e,v.current)}),S.shallowEqual),O=o(),E=y(O.getState(),v.current);return L((function(){v.current=E}),[E]),g};return{useQueryState:v,useQuerySubscription:t,useLazyQuerySubscription:l,useLazyQuery:function(e){var r=l(e),t=r[0],n=r[1],u=v(n,p(d({},e),{skip:n===E})),i=(0,m.useMemo)((function(){return{lastArg:n}}),[n]);return(0,m.useMemo)((function(){return[t,u,i]}),[t,u,i])},useQuery:function(e,r){var n=t(e,r),u=v(e,d({selectFromResult:e===q.skipToken||(null==r?void 0:r.skip)?void 0:C},r));return(0,m.useDebugValue)({data:u.data,status:u.status,isLoading:u.isLoading,isSuccess:u.isSuccess,isError:u.isError,error:u.error}),(0,m.useMemo)((function(){return d(d({},u),n)}),[u,n])}}},buildMutationHook:function(e){return function(t){var o=void 0===t?{}:t,s=o.selectFromResult,c=void 0===s?z:s,a=o.fixedCacheKey,f=r.endpoints[e],l=f.select,v=f.initiate,y=u(),b=(0,m.useState)(),g=b[0],q=b[1];(0,m.useEffect)((function(){return function(){(null==g?void 0:g.arg.fixedCacheKey)||null==g||g.reset()}}),[g]);var O=(0,m.useCallback)((function(e){var r=y(v(e,{fixedCacheKey:a}));return q(r),r}),[y,v,a]),k=(g||{}).requestId,E=(0,m.useMemo)((function(){return(0,h.createSelector)([l({fixedCacheKey:a,requestId:null==g?void 0:g.requestId})],c)}),[l,g,c,a]),j=i(E,S.shallowEqual),x=null==a?null==g?void 0:g.arg.originalArgs:void 0,Q=(0,m.useCallback)((function(){n((function(){g&&q(void 0),a&&y(r.internalActions.removeMutationResult({requestId:k,fixedCacheKey:a}))}))}),[y,a,g,k]);(0,m.useDebugValue)({endpointName:j.endpointName,data:j.data,status:j.status,isLoading:j.isLoading,isSuccess:j.isSuccess,isError:j.isError,error:j.error});var M=(0,m.useMemo)((function(){return p(d({},j),{originalArgs:x,reset:Q})}),[j,x,Q]);return(0,m.useMemo)((function(){return[O,M]}),[O,M])}},usePrefetch:function(e,t){var n=u(),i=Q(t);return(0,m.useCallback)((function(t,u){return n(r.util.prefetch(e,t,d(d({},i),u)))}),[e,n,i])}};function f(e,r,t){if((null==r?void 0:r.endpointName)&&e.isUninitialized){var n=r.endpointName,u=c.endpointDefinitions[n];s({queryArgs:r.originalArgs,endpointDefinition:u,endpointName:n})===s({queryArgs:t,endpointDefinition:u,endpointName:n})&&(r=void 0)}t===q.skipToken&&(r=void 0);var i=e.isSuccess?e.data:null==r?void 0:r.data;void 0===i&&(i=e.data);var o=void 0!==i,a=e.isLoading,f=!o&&a,l=e.isSuccess||a&&o;return p(d({},e),{data:i,currentData:e.data,isFetching:a,isLoading:f,isSuccess:l})}}({api:e,moduleOptions:{batch:n,useDispatch:i,useSelector:s,useStore:a,unstable__sideEffectsInRender:l},serializeQueryArgs:r.serializeQueryArgs,context:t}),c=o.buildQueryHooks,f=o.buildMutationHook;return P(u,{usePrefetch:o.usePrefetch}),P(t,{batch:n}),{injectEndpoint:function(r,t){if(t.type===M.query){var n=c(r),i=n.useQuery,o=n.useLazyQuery;P(u.endpoints[r],{useQuery:i,useLazyQuery:o,useLazyQuerySubscription:n.useLazyQuerySubscription,useQueryState:n.useQueryState,useQuerySubscription:n.useQuerySubscription}),e["use"+D(r)+"Query"]=i,e["useLazy"+D(r)+"Query"]=o}else if(t.type===M.mutation){var s=f(r);P(u.endpoints[r],{useMutation:s}),e["use"+D(r)+"Mutation"]=s}}}}}};y(exports,b(require("@reduxjs/toolkit/query")));var F=b(require("@reduxjs/toolkit")),K=b(require("react")),H=b(require("react")),T=b(require("react-redux")),U=b(require("@reduxjs/toolkit/query"));function V(e){var r=H.default.useState((function(){var r;return(0,F.configureStore)({reducer:(r={},r[e.api.reducerPath]=e.api.reducer,r),middleware:function(r){return r().concat(e.api.middleware)}})}))[0];return(0,K.useEffect)((function(){return!1===e.setupListeners?void 0:(0,U.setupListeners)(r.dispatch,e.setupListeners)}),[e.setupListeners]),H.default.createElement(T.Provider,{store:r,context:e.context},e.children)}var J=(0,g.buildCreateApi)((0,g.coreModule)(),N());
"use strict";var e,t=Object.create,r=Object.defineProperty,u=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,s=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,o=(e,t,s,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let c of n(t))i.call(e,c)||c===s||r(e,c,{get:()=>t[c],enumerable:!(o=u(t,c))||o.enumerable});return e},c={};((e,t)=>{for(var u in t)r(e,u,{get:t[u],enumerable:!0})})(c,{ApiProvider:()=>D,createApi:()=>I,reactHooksModule:()=>j}),module.exports=(e=c,o(r({},"__esModule",{value:!0}),e));var a=require("@reduxjs/toolkit/query"),l=require("@reduxjs/toolkit"),d=require("react"),f=require("@reduxjs/toolkit/query"),p=require("react-redux"),y=require("react");function b(e,t,r,u){const n=(0,y.useMemo)((()=>({queryArgs:e,serialized:"object"==typeof e?t({queryArgs:e,endpointDefinition:r,endpointName:u}):e})),[e,t,r,u]),s=(0,y.useRef)(n);return(0,y.useEffect)((()=>{s.current.serialized!==n.serialized&&(s.current=n)}),[n]),s.current.serialized===n.serialized?s.current.queryArgs:e}var h=Symbol(),g=require("react"),v=require("react-redux");function m(e){const t=(0,g.useRef)(e);return(0,g.useEffect)((()=>{(0,v.shallowEqual)(t.current,e)||(t.current=e)}),[e]),(0,v.shallowEqual)(t.current,e)?t.current:e}var q=require("@reduxjs/toolkit"),S=({endpointName:e,queryArgs:t})=>`${e}(${JSON.stringify(t,((e,t)=>(0,q.isPlainObject)(t)?Object.keys(t).sort().reduce(((e,r)=>(e[r]=t[r],e)),{}):t))})`,O="undefined"!=typeof window&&window.document&&window.document.createElement?d.useLayoutEffect:d.useEffect,k=e=>e,E=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:void 0===e.data,status:f.QueryStatus.pending}:e;function Q(e){return e.replace(e[0],e[0].toUpperCase())}function x(e,...t){Object.assign(e,...t)}var M=require("react-redux"),R=Symbol(),j=({batch:e=M.batch,useDispatch:t=M.useDispatch,useSelector:r=M.useSelector,useStore:u=M.useStore,unstable__sideEffectsInRender:n=!1}={})=>({name:R,init(s,{serializeQueryArgs:i},o){const c=s,{buildQueryHooks:a,buildMutationHook:y,usePrefetch:g}=function({api:e,moduleOptions:{batch:t,useDispatch:r,useSelector:u,useStore:n,unstable__sideEffectsInRender:s},serializeQueryArgs:i,context:o}){const c=s?e=>e():d.useEffect;return{buildQueryHooks:function(s){const y=(t,{refetchOnReconnect:u,refetchOnFocus:n,refetchOnMountOrArgChange:i,skip:a=!1,pollingInterval:l=0}={})=>{const{initiate:p}=e.endpoints[s],y=r(),h=b(a?f.skipToken:t,S,o.endpointDefinitions[s],s),g=m({refetchOnReconnect:u,refetchOnFocus:n,pollingInterval:l}),v=(0,d.useRef)(!1),q=(0,d.useRef)();let{queryCacheKey:O,requestId:k}=q.current||{},E=!1;if(O&&k){const t=y(e.internalActions.internal_probeSubscription({queryCacheKey:O,requestId:k}));E=!!t}const Q=!E&&v.current;return c((()=>{v.current=E})),c((()=>{q.current=void 0}),[Q]),c((()=>{var e;const t=q.current;if(h===f.skipToken)return null==t||t.unsubscribe(),void(q.current=void 0);const r=null==(e=q.current)?void 0:e.subscriptionOptions;if(t&&t.arg===h)g!==r&&t.updateSubscriptionOptions(g);else{null==t||t.unsubscribe();const e=y(p(h,{subscriptionOptions:g,forceRefetch:i}));q.current=e}}),[y,p,i,h,g,Q]),(0,d.useEffect)((()=>()=>{var e;null==(e=q.current)||e.unsubscribe(),q.current=void 0}),[]),(0,d.useMemo)((()=>({refetch:()=>{var e;if(!q.current)throw new Error("Cannot refetch a query that has not been started yet.");return null==(e=q.current)?void 0:e.refetch()}})),[])},g=({refetchOnReconnect:u,refetchOnFocus:n,pollingInterval:i=0}={})=>{const{initiate:o}=e.endpoints[s],a=r(),[l,f]=(0,d.useState)(h),p=(0,d.useRef)(),y=m({refetchOnReconnect:u,refetchOnFocus:n,pollingInterval:i});c((()=>{var e,t;const r=null==(e=p.current)?void 0:e.subscriptionOptions;y!==r&&(null==(t=p.current)||t.updateSubscriptionOptions(y))}),[y]);const b=(0,d.useRef)(y);c((()=>{b.current=y}),[y]);const g=(0,d.useCallback)((function(e,r=!1){let u;return t((()=>{var t;null==(t=p.current)||t.unsubscribe(),p.current=u=a(o(e,{subscriptionOptions:b.current,forceRefetch:!r})),f(e)})),u}),[a,o]);return(0,d.useEffect)((()=>()=>{var e;null==(e=null==p?void 0:p.current)||e.unsubscribe()}),[]),(0,d.useEffect)((()=>{l===h||p.current||g(l,!0)}),[l,g]),(0,d.useMemo)((()=>[g,l]),[g,l])},v=(t,{skip:r=!1,selectFromResult:c}={})=>{const{select:y}=e.endpoints[s],h=b(r?f.skipToken:t,i,o.endpointDefinitions[s],s),g=(0,d.useRef)(),v=(0,d.useMemo)((()=>(0,l.createSelector)([y(h),(e,t)=>t,e=>h],a)),[y,h]),m=(0,d.useMemo)((()=>c?(0,l.createSelector)([v],c):v),[v,c]),q=u((e=>m(e,g.current)),p.shallowEqual),S=n(),k=v(S.getState(),g.current);return O((()=>{g.current=k}),[k]),q};return{useQueryState:v,useQuerySubscription:y,useLazyQuerySubscription:g,useLazyQuery(e){const[t,r]=g(e),u=v(r,{...e,skip:r===h}),n=(0,d.useMemo)((()=>({lastArg:r})),[r]);return(0,d.useMemo)((()=>[t,u,n]),[t,u,n])},useQuery(e,t){const r=y(e,t),u=v(e,{selectFromResult:e===f.skipToken||(null==t?void 0:t.skip)?void 0:E,...t}),{data:n,status:s,isLoading:i,isSuccess:o,isError:c,error:a}=u;return(0,d.useDebugValue)({data:n,status:s,isLoading:i,isSuccess:o,isError:c,error:a}),(0,d.useMemo)((()=>({...u,...r})),[u,r])}}},buildMutationHook:function(n){return({selectFromResult:s=k,fixedCacheKey:i}={})=>{const{select:o,initiate:c}=e.endpoints[n],a=r(),[f,y]=(0,d.useState)();(0,d.useEffect)((()=>()=>{(null==f?void 0:f.arg.fixedCacheKey)||null==f||f.reset()}),[f]);const b=(0,d.useCallback)((function(e){const t=a(c(e,{fixedCacheKey:i}));return y(t),t}),[a,c,i]),{requestId:h}=f||{},g=(0,d.useMemo)((()=>(0,l.createSelector)([o({fixedCacheKey:i,requestId:null==f?void 0:f.requestId})],s)),[o,f,s,i]),v=u(g,p.shallowEqual),m=null==i?null==f?void 0:f.arg.originalArgs:void 0,q=(0,d.useCallback)((()=>{t((()=>{f&&y(void 0),i&&a(e.internalActions.removeMutationResult({requestId:h,fixedCacheKey:i}))}))}),[a,i,f,h]),{endpointName:S,data:O,status:E,isLoading:Q,isSuccess:x,isError:M,error:R}=v;(0,d.useDebugValue)({endpointName:S,data:O,status:E,isLoading:Q,isSuccess:x,isError:M,error:R});const j=(0,d.useMemo)((()=>({...v,originalArgs:m,reset:q})),[v,m,q]);return(0,d.useMemo)((()=>[b,j]),[b,j])}},usePrefetch:function(t,u){const n=r(),s=m(u);return(0,d.useCallback)(((r,u)=>n(e.util.prefetch(t,r,{...s,...u}))),[t,n,s])}};function a(e,t,r){if((null==t?void 0:t.endpointName)&&e.isUninitialized){const{endpointName:e}=t,u=o.endpointDefinitions[e];i({queryArgs:t.originalArgs,endpointDefinition:u,endpointName:e})===i({queryArgs:r,endpointDefinition:u,endpointName:e})&&(t=void 0)}r===f.skipToken&&(t=void 0);let u=e.isSuccess?e.data:null==t?void 0:t.data;void 0===u&&(u=e.data);const n=void 0!==u,s=e.isLoading,c=!n&&s,a=e.isSuccess||s&&n;return{...e,data:u,currentData:e.data,isFetching:s,isLoading:c,isSuccess:a}}}({api:s,moduleOptions:{batch:e,useDispatch:t,useSelector:r,useStore:u,unstable__sideEffectsInRender:n},serializeQueryArgs:i,context:o});return x(c,{usePrefetch:g}),x(o,{batch:e}),{injectEndpoint(e,t){if("query"===t.type){const{useQuery:t,useLazyQuery:r,useLazyQuerySubscription:u,useQueryState:n,useQuerySubscription:i}=a(e);x(c.endpoints[e],{useQuery:t,useLazyQuery:r,useLazyQuerySubscription:u,useQueryState:n,useQuerySubscription:i}),s[`use${Q(e)}Query`]=t,s[`useLazy${Q(e)}Query`]=r}else if("mutation"===t.type){const t=y(e);x(c.endpoints[e],{useMutation:t}),s[`use${Q(e)}Mutation`]=t}}}}});((e,t,r)=>{o(e,t,"default"),r&&o(r,t,"default")})(c,require("@reduxjs/toolkit/query"),module.exports);var A=require("@reduxjs/toolkit"),L=require("react"),z=((e,u,n)=>(n=null!=e?t(s(e)):{},o(e&&e.__esModule?n:r(n,"default",{value:e,enumerable:!0}),e)))(require("react")),w=require("react-redux"),C=require("@reduxjs/toolkit/query");function D(e){const[t]=z.default.useState((()=>(0,A.configureStore)({reducer:{[e.api.reducerPath]:e.api.reducer},middleware:t=>t().concat(e.api.middleware)})));return(0,L.useEffect)((()=>!1===e.setupListeners?void 0:(0,C.setupListeners)(t.dispatch,e.setupListeners)),[e.setupListeners]),z.default.createElement(w.Provider,{store:t,context:e.context},e.children)}var I=(0,a.buildCreateApi)((0,a.coreModule)(),j());
//# sourceMappingURL=rtk-query-react.cjs.production.min.js.map

@@ -1,20 +0,1 @@

var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
// src/query/react/index.ts

@@ -69,3 +50,4 @@ import { coreModule, buildCreateApi } from "@reduxjs/toolkit/query";

if (selected.isUninitialized) {
return __spreadProps(__spreadValues({}, selected), {
return {
...selected,
isUninitialized: false,

@@ -75,3 +57,3 @@ isFetching: true,

status: QueryStatus.pending
});
};
}

@@ -108,3 +90,4 @@ return selected;

const isSuccess = currentState.isSuccess || isFetching && hasData;
return __spreadProps(__spreadValues({}, currentState), {
return {
...currentState,
data,

@@ -115,3 +98,3 @@ currentData: currentState.data,

isSuccess
});
};
}

@@ -121,3 +104,6 @@ function usePrefetch(endpointName, defaultOptions) {

const stableDefaultOptions = useShallowStableValue(defaultOptions);
return useCallback((arg, options) => dispatch(api.util.prefetch(endpointName, arg, __spreadValues(__spreadValues({}, stableDefaultOptions), options))), [endpointName, dispatch, stableDefaultOptions]);
return useCallback((arg, options) => dispatch(api.util.prefetch(endpointName, arg, {
...stableDefaultOptions,
...options
})), [endpointName, dispatch, stableDefaultOptions]);
}

@@ -128,3 +114,9 @@ function buildQueryHooks(name) {

const dispatch = useDispatch();
const stableArg = useStableQueryArgs(skip ? skipToken : arg, defaultSerializeQueryArgs, context.endpointDefinitions[name], name);
const stableArg = useStableQueryArgs(skip ? skipToken : arg,
// Even if the user provided a per-endpoint `serializeQueryArgs` with
// a consistent return value, _here_ we want to use the default behavior
// so we can tell if _anything_ actually changed. Otherwise, we can end up
// with a case where the query args did change but the serialization doesn't,
// and then we never try to initiate a refetch.
defaultSerializeQueryArgs, context.endpointDefinitions[name], name);
const stableSubscriptionOptions = useShallowStableValue({

@@ -198,2 +190,5 @@ refetchOnReconnect,

return useMemo2(() => ({
/**
* A method to manually refetch data for the query
*/
refetch: () => {

@@ -278,5 +273,6 @@ var _a;

const [trigger, arg] = useLazyQuerySubscription(options);
const queryStateResults = useQueryState(arg, __spreadProps(__spreadValues({}, options), {
const queryStateResults = useQueryState(arg, {
...options,
skip: arg === UNINITIALIZED_VALUE
}));
});
const info = useMemo2(() => ({ lastArg: arg }), [arg]);

@@ -287,8 +283,9 @@ return useMemo2(() => [trigger, queryStateResults, info], [trigger, queryStateResults, info]);

const querySubscriptionResults = useQuerySubscription(arg, options);
const queryStateResults = useQueryState(arg, __spreadValues({
selectFromResult: arg === skipToken || (options == null ? void 0 : options.skip) ? void 0 : noPendingQueryStateSelector
}, options));
const queryStateResults = useQueryState(arg, {
selectFromResult: arg === skipToken || (options == null ? void 0 : options.skip) ? void 0 : noPendingQueryStateSelector,
...options
});
const { data, status, isLoading, isSuccess, isError, error } = queryStateResults;
useDebugValue({ data, status, isLoading, isSuccess, isError, error });
return useMemo2(() => __spreadValues(__spreadValues({}, queryStateResults), querySubscriptionResults), [queryStateResults, querySubscriptionResults]);
return useMemo2(() => ({ ...queryStateResults, ...querySubscriptionResults }), [queryStateResults, querySubscriptionResults]);
}

@@ -339,3 +336,3 @@ };

});
const finalState = useMemo2(() => __spreadProps(__spreadValues({}, currentState), { originalArgs, reset }), [currentState, originalArgs, reset]);
const finalState = useMemo2(() => ({ ...currentState, originalArgs, reset }), [currentState, originalArgs, reset]);
return useMemo2(() => [triggerMutation, finalState], [triggerMutation, finalState]);

@@ -346,12 +343,7 @@ };

// src/query/endpointDefinitions.ts
var DefinitionType;
(function (DefinitionType2) {
DefinitionType2["query"] = "query";
DefinitionType2["mutation"] = "mutation";
})(DefinitionType || (DefinitionType = {}));
function isQueryDefinition(e) {
return e.type === DefinitionType.query;
return e.type === "query" /* query */;
}
function isMutationDefinition(e) {
return e.type === DefinitionType.mutation;
return e.type === "mutation" /* mutation */;
}

@@ -428,6 +420,3 @@ // src/query/utils/capitalize.ts

useEffect4(() => props.setupListeners === false ? void 0 : setupListeners(store.dispatch, props.setupListeners), [props.setupListeners]);
return /* @__PURE__ */ React.createElement(Provider, {
store,
context: props.context
}, props.children);
return /* @__PURE__ */ React.createElement(Provider, { store, context: props.context }, props.children);
}

@@ -434,0 +423,0 @@ // src/query/react/index.ts

@@ -1,20 +0,1 @@

var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
// src/query/react/index.ts

@@ -69,3 +50,4 @@ import { coreModule, buildCreateApi } from "@reduxjs/toolkit/query";

if (selected.isUninitialized) {
return __spreadProps(__spreadValues({}, selected), {
return {
...selected,
isUninitialized: false,

@@ -75,3 +57,3 @@ isFetching: true,

status: QueryStatus.pending
});
};
}

@@ -108,3 +90,4 @@ return selected;

const isSuccess = currentState.isSuccess || isFetching && hasData;
return __spreadProps(__spreadValues({}, currentState), {
return {
...currentState,
data,

@@ -115,3 +98,3 @@ currentData: currentState.data,

isSuccess
});
};
}

@@ -121,3 +104,6 @@ function usePrefetch(endpointName, defaultOptions) {

const stableDefaultOptions = useShallowStableValue(defaultOptions);
return useCallback((arg, options) => dispatch(api.util.prefetch(endpointName, arg, __spreadValues(__spreadValues({}, stableDefaultOptions), options))), [endpointName, dispatch, stableDefaultOptions]);
return useCallback((arg, options) => dispatch(api.util.prefetch(endpointName, arg, {
...stableDefaultOptions,
...options
})), [endpointName, dispatch, stableDefaultOptions]);
}

@@ -128,3 +114,9 @@ function buildQueryHooks(name) {

const dispatch = useDispatch();
const stableArg = useStableQueryArgs(skip ? skipToken : arg, defaultSerializeQueryArgs, context.endpointDefinitions[name], name);
const stableArg = useStableQueryArgs(skip ? skipToken : arg,
// Even if the user provided a per-endpoint `serializeQueryArgs` with
// a consistent return value, _here_ we want to use the default behavior
// so we can tell if _anything_ actually changed. Otherwise, we can end up
// with a case where the query args did change but the serialization doesn't,
// and then we never try to initiate a refetch.
defaultSerializeQueryArgs, context.endpointDefinitions[name], name);
const stableSubscriptionOptions = useShallowStableValue({

@@ -198,2 +190,5 @@ refetchOnReconnect,

return useMemo2(() => ({
/**
* A method to manually refetch data for the query
*/
refetch: () => {

@@ -278,5 +273,6 @@ var _a;

const [trigger, arg] = useLazyQuerySubscription(options);
const queryStateResults = useQueryState(arg, __spreadProps(__spreadValues({}, options), {
const queryStateResults = useQueryState(arg, {
...options,
skip: arg === UNINITIALIZED_VALUE
}));
});
const info = useMemo2(() => ({ lastArg: arg }), [arg]);

@@ -287,8 +283,9 @@ return useMemo2(() => [trigger, queryStateResults, info], [trigger, queryStateResults, info]);

const querySubscriptionResults = useQuerySubscription(arg, options);
const queryStateResults = useQueryState(arg, __spreadValues({
selectFromResult: arg === skipToken || (options == null ? void 0 : options.skip) ? void 0 : noPendingQueryStateSelector
}, options));
const queryStateResults = useQueryState(arg, {
selectFromResult: arg === skipToken || (options == null ? void 0 : options.skip) ? void 0 : noPendingQueryStateSelector,
...options
});
const { data, status, isLoading, isSuccess, isError, error } = queryStateResults;
useDebugValue({ data, status, isLoading, isSuccess, isError, error });
return useMemo2(() => __spreadValues(__spreadValues({}, queryStateResults), querySubscriptionResults), [queryStateResults, querySubscriptionResults]);
return useMemo2(() => ({ ...queryStateResults, ...querySubscriptionResults }), [queryStateResults, querySubscriptionResults]);
}

@@ -339,3 +336,3 @@ };

});
const finalState = useMemo2(() => __spreadProps(__spreadValues({}, currentState), { originalArgs, reset }), [currentState, originalArgs, reset]);
const finalState = useMemo2(() => ({ ...currentState, originalArgs, reset }), [currentState, originalArgs, reset]);
return useMemo2(() => [triggerMutation, finalState], [triggerMutation, finalState]);

@@ -346,12 +343,7 @@ };

// src/query/endpointDefinitions.ts
var DefinitionType;
(function (DefinitionType2) {
DefinitionType2["query"] = "query";
DefinitionType2["mutation"] = "mutation";
})(DefinitionType || (DefinitionType = {}));
function isQueryDefinition(e) {
return e.type === DefinitionType.query;
return e.type === "query" /* query */;
}
function isMutationDefinition(e) {
return e.type === DefinitionType.mutation;
return e.type === "mutation" /* mutation */;
}

@@ -428,6 +420,3 @@ // src/query/utils/capitalize.ts

useEffect4(() => props.setupListeners === false ? void 0 : setupListeners(store.dispatch, props.setupListeners), [props.setupListeners]);
return /* @__PURE__ */ React.createElement(Provider, {
store,
context: props.context
}, props.children);
return /* @__PURE__ */ React.createElement(Provider, { store, context: props.context }, props.children);
}

@@ -434,0 +423,0 @@ // src/query/react/index.ts

@@ -1,2 +0,2 @@

var e=Object.defineProperty,t=Object.defineProperties,r=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,o=(t,r,n)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n,u=(e,t)=>{for(var r in t||(t={}))i.call(t,r)&&o(e,r,t[r]);if(n)for(var r of n(t))s.call(t,r)&&o(e,r,t[r]);return e},c=(e,n)=>t(e,r(n));import{coreModule as a,buildCreateApi as d}from"@reduxjs/toolkit/query";import{createSelector as l}from"@reduxjs/toolkit";import{useCallback as p,useDebugValue as f,useEffect as y,useLayoutEffect as m,useMemo as b,useRef as h,useState as v}from"react";import{QueryStatus as g,skipToken as S}from"@reduxjs/toolkit/query";import{shallowEqual as O}from"react-redux";import{useEffect as q,useRef as x,useMemo as Q}from"react";function z(e,t,r,n){const i=Q((()=>({queryArgs:e,serialized:"object"==typeof e?t({queryArgs:e,endpointDefinition:r,endpointName:n}):e})),[e,t,r,n]),s=x(i);return q((()=>{s.current.serialized!==i.serialized&&(s.current=i)}),[i]),s.current.serialized===i.serialized?s.current.queryArgs:e}var j=Symbol();import{useEffect as L,useRef as k}from"react";import{shallowEqual as A}from"react-redux";function E(e){const t=k(e);return L((()=>{A(t.current,e)||(t.current=e)}),[e]),A(t.current,e)?t.current:e}import{isPlainObject as w}from"@reduxjs/toolkit";var R,I,D=({endpointName:e,queryArgs:t})=>`${e}(${JSON.stringify(t,((e,t)=>w(t)?Object.keys(t).sort().reduce(((e,r)=>(e[r]=t[r],e)),{}):t))})`,C="undefined"!=typeof window&&window.document&&window.document.createElement?m:y,F=e=>e,N=e=>e.isUninitialized?c(u({},e),{isUninitialized:!1,isFetching:!0,isLoading:void 0===e.data,status:g.pending}):e;function P(e){return e.replace(e[0],e[0].toUpperCase())}function K(e,...t){Object.assign(e,...t)}(I=R||(R={})).query="query",I.mutation="mutation";import{useDispatch as M,useSelector as _,useStore as $,batch as H}from"react-redux";var U=Symbol(),J=({batch:e=H,useDispatch:t=M,useSelector:r=_,useStore:n=$,unstable__sideEffectsInRender:i=!1}={})=>({name:U,init(s,{serializeQueryArgs:o},a){const d=s,{buildQueryHooks:m,buildMutationHook:g,usePrefetch:q}=function({api:e,moduleOptions:{batch:t,useDispatch:r,useSelector:n,useStore:i,unstable__sideEffectsInRender:s},serializeQueryArgs:o,context:a}){const d=s?e=>e():y;return{buildQueryHooks:function(s){const g=(t,{refetchOnReconnect:n,refetchOnFocus:i,refetchOnMountOrArgChange:o,skip:u=!1,pollingInterval:c=0}={})=>{const{initiate:l}=e.endpoints[s],p=r(),f=z(u?S:t,D,a.endpointDefinitions[s],s),m=E({refetchOnReconnect:n,refetchOnFocus:i,pollingInterval:c}),v=h(!1),g=h();let{queryCacheKey:O,requestId:q}=g.current||{},x=!1;if(O&&q){const t=p(e.internalActions.internal_probeSubscription({queryCacheKey:O,requestId:q}));x=!!t}const Q=!x&&v.current;return d((()=>{v.current=x})),d((()=>{g.current=void 0}),[Q]),d((()=>{var e;const t=g.current;if(f===S)return null==t||t.unsubscribe(),void(g.current=void 0);const r=null==(e=g.current)?void 0:e.subscriptionOptions;if(t&&t.arg===f)m!==r&&t.updateSubscriptionOptions(m);else{null==t||t.unsubscribe();const e=p(l(f,{subscriptionOptions:m,forceRefetch:o}));g.current=e}}),[p,l,o,f,m,Q]),y((()=>()=>{var e;null==(e=g.current)||e.unsubscribe(),g.current=void 0}),[]),b((()=>({refetch:()=>{var e;if(!g.current)throw new Error("Cannot refetch a query that has not been started yet.");return null==(e=g.current)?void 0:e.refetch()}})),[])},q=({refetchOnReconnect:n,refetchOnFocus:i,pollingInterval:o=0}={})=>{const{initiate:u}=e.endpoints[s],c=r(),[a,l]=v(j),f=h(),m=E({refetchOnReconnect:n,refetchOnFocus:i,pollingInterval:o});d((()=>{var e,t;const r=null==(e=f.current)?void 0:e.subscriptionOptions;m!==r&&(null==(t=f.current)||t.updateSubscriptionOptions(m))}),[m]);const g=h(m);d((()=>{g.current=m}),[m]);const S=p((function(e,r=!1){let n;return t((()=>{var t;null==(t=f.current)||t.unsubscribe(),f.current=n=c(u(e,{subscriptionOptions:g.current,forceRefetch:!r})),l(e)})),n}),[c,u]);return y((()=>()=>{var e;null==(e=null==f?void 0:f.current)||e.unsubscribe()}),[]),y((()=>{a===j||f.current||S(a,!0)}),[a,S]),b((()=>[S,a]),[S,a])},x=(t,{skip:r=!1,selectFromResult:u}={})=>{const{select:c}=e.endpoints[s],d=z(r?S:t,o,a.endpointDefinitions[s],s),p=h(),f=b((()=>l([c(d),(e,t)=>t,e=>d],m)),[c,d]),y=b((()=>u?l([f],u):f),[f,u]),v=n((e=>y(e,p.current)),O),g=i(),q=f(g.getState(),p.current);return C((()=>{p.current=q}),[q]),v};return{useQueryState:x,useQuerySubscription:g,useLazyQuerySubscription:q,useLazyQuery(e){const[t,r]=q(e),n=x(r,c(u({},e),{skip:r===j})),i=b((()=>({lastArg:r})),[r]);return b((()=>[t,n,i]),[t,n,i])},useQuery(e,t){const r=g(e,t),n=x(e,u({selectFromResult:e===S||(null==t?void 0:t.skip)?void 0:N},t)),{data:i,status:s,isLoading:o,isSuccess:c,isError:a,error:d}=n;return f({data:i,status:s,isLoading:o,isSuccess:c,isError:a,error:d}),b((()=>u(u({},n),r)),[n,r])}}},buildMutationHook:function(i){return({selectFromResult:s=F,fixedCacheKey:o}={})=>{const{select:a,initiate:d}=e.endpoints[i],m=r(),[h,g]=v();y((()=>()=>{(null==h?void 0:h.arg.fixedCacheKey)||null==h||h.reset()}),[h]);const S=p((function(e){const t=m(d(e,{fixedCacheKey:o}));return g(t),t}),[m,d,o]),{requestId:q}=h||{},x=b((()=>l([a({fixedCacheKey:o,requestId:null==h?void 0:h.requestId})],s)),[a,h,s,o]),Q=n(x,O),z=null==o?null==h?void 0:h.arg.originalArgs:void 0,j=p((()=>{t((()=>{h&&g(void 0),o&&m(e.internalActions.removeMutationResult({requestId:q,fixedCacheKey:o}))}))}),[m,o,h,q]),{endpointName:L,data:k,status:A,isLoading:E,isSuccess:w,isError:R,error:I}=Q;f({endpointName:L,data:k,status:A,isLoading:E,isSuccess:w,isError:R,error:I});const D=b((()=>c(u({},Q),{originalArgs:z,reset:j})),[Q,z,j]);return b((()=>[S,D]),[S,D])}},usePrefetch:function(t,n){const i=r(),s=E(n);return p(((r,n)=>i(e.util.prefetch(t,r,u(u({},s),n)))),[t,i,s])}};function m(e,t,r){if((null==t?void 0:t.endpointName)&&e.isUninitialized){const{endpointName:e}=t,n=a.endpointDefinitions[e];o({queryArgs:t.originalArgs,endpointDefinition:n,endpointName:e})===o({queryArgs:r,endpointDefinition:n,endpointName:e})&&(t=void 0)}r===S&&(t=void 0);let n=e.isSuccess?e.data:null==t?void 0:t.data;void 0===n&&(n=e.data);const i=void 0!==n,s=e.isLoading,d=!i&&s,l=e.isSuccess||s&&i;return c(u({},e),{data:n,currentData:e.data,isFetching:s,isLoading:d,isSuccess:l})}}({api:s,moduleOptions:{batch:e,useDispatch:t,useSelector:r,useStore:n,unstable__sideEffectsInRender:i},serializeQueryArgs:o,context:a});return K(d,{usePrefetch:q}),K(a,{batch:e}),{injectEndpoint(e,t){if(t.type===R.query){const{useQuery:t,useLazyQuery:r,useLazyQuerySubscription:n,useQueryState:i,useQuerySubscription:o}=m(e);K(d.endpoints[e],{useQuery:t,useLazyQuery:r,useLazyQuerySubscription:n,useQueryState:i,useQuerySubscription:o}),s[`use${P(e)}Query`]=t,s[`useLazy${P(e)}Query`]=r}else if(t.type===R.mutation){const t=g(e);K(d.endpoints[e],{useMutation:t}),s[`use${P(e)}Mutation`]=t}}}}});export*from"@reduxjs/toolkit/query";import{configureStore as B}from"@reduxjs/toolkit";import{useEffect as G}from"react";import T from"react";import{Provider as V}from"react-redux";import{setupListeners as W}from"@reduxjs/toolkit/query";function X(e){const[t]=T.useState((()=>B({reducer:{[e.api.reducerPath]:e.api.reducer},middleware:t=>t().concat(e.api.middleware)})));return G((()=>!1===e.setupListeners?void 0:W(t.dispatch,e.setupListeners)),[e.setupListeners]),T.createElement(V,{store:t,context:e.context},e.children)}var Y=d(a(),J());export{X as ApiProvider,Y as createApi,J as reactHooksModule};
import{coreModule as e,buildCreateApi as t}from"@reduxjs/toolkit/query";import{createSelector as r}from"@reduxjs/toolkit";import{useCallback as n,useDebugValue as i,useEffect as s,useLayoutEffect as u,useMemo as o,useRef as c,useState as a}from"react";import{QueryStatus as d,skipToken as l}from"@reduxjs/toolkit/query";import{shallowEqual as p}from"react-redux";import{useEffect as f,useRef as y,useMemo as m}from"react";function h(e,t,r,n){const i=m((()=>({queryArgs:e,serialized:"object"==typeof e?t({queryArgs:e,endpointDefinition:r,endpointName:n}):e})),[e,t,r,n]),s=y(i);return f((()=>{s.current.serialized!==i.serialized&&(s.current=i)}),[i]),s.current.serialized===i.serialized?s.current.queryArgs:e}var b=Symbol();import{useEffect as g,useRef as v}from"react";import{shallowEqual as S}from"react-redux";function x(e){const t=v(e);return g((()=>{S(t.current,e)||(t.current=e)}),[e]),S(t.current,e)?t.current:e}import{isPlainObject as Q}from"@reduxjs/toolkit";var q=({endpointName:e,queryArgs:t})=>`${e}(${JSON.stringify(t,((e,t)=>Q(t)?Object.keys(t).sort().reduce(((e,r)=>(e[r]=t[r],e)),{}):t))})`,O="undefined"!=typeof window&&window.document&&window.document.createElement?u:s,z=e=>e,L=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:void 0===e.data,status:d.pending}:e;function k(e){return e.replace(e[0],e[0].toUpperCase())}function A(e,...t){Object.assign(e,...t)}import{useDispatch as E,useSelector as R,useStore as I,batch as j}from"react-redux";var w=Symbol(),D=({batch:e=j,useDispatch:t=E,useSelector:u=R,useStore:d=I,unstable__sideEffectsInRender:f=!1}={})=>({name:w,init(y,{serializeQueryArgs:m},g){const v=y,{buildQueryHooks:S,buildMutationHook:Q,usePrefetch:E}=function({api:e,moduleOptions:{batch:t,useDispatch:u,useSelector:d,useStore:f,unstable__sideEffectsInRender:y},serializeQueryArgs:m,context:g}){const v=y?e=>e():s;return{buildQueryHooks:function(y){const Q=(t,{refetchOnReconnect:r,refetchOnFocus:n,refetchOnMountOrArgChange:i,skip:a=!1,pollingInterval:d=0}={})=>{const{initiate:p}=e.endpoints[y],f=u(),m=h(a?l:t,q,g.endpointDefinitions[y],y),b=x({refetchOnReconnect:r,refetchOnFocus:n,pollingInterval:d}),S=c(!1),Q=c();let{queryCacheKey:O,requestId:z}=Q.current||{},L=!1;if(O&&z){const t=f(e.internalActions.internal_probeSubscription({queryCacheKey:O,requestId:z}));L=!!t}const k=!L&&S.current;return v((()=>{S.current=L})),v((()=>{Q.current=void 0}),[k]),v((()=>{var e;const t=Q.current;if(m===l)return null==t||t.unsubscribe(),void(Q.current=void 0);const r=null==(e=Q.current)?void 0:e.subscriptionOptions;if(t&&t.arg===m)b!==r&&t.updateSubscriptionOptions(b);else{null==t||t.unsubscribe();const e=f(p(m,{subscriptionOptions:b,forceRefetch:i}));Q.current=e}}),[f,p,i,m,b,k]),s((()=>()=>{var e;null==(e=Q.current)||e.unsubscribe(),Q.current=void 0}),[]),o((()=>({refetch:()=>{var e;if(!Q.current)throw new Error("Cannot refetch a query that has not been started yet.");return null==(e=Q.current)?void 0:e.refetch()}})),[])},z=({refetchOnReconnect:r,refetchOnFocus:i,pollingInterval:d=0}={})=>{const{initiate:l}=e.endpoints[y],p=u(),[f,m]=a(b),h=c(),g=x({refetchOnReconnect:r,refetchOnFocus:i,pollingInterval:d});v((()=>{var e,t;const r=null==(e=h.current)?void 0:e.subscriptionOptions;g!==r&&(null==(t=h.current)||t.updateSubscriptionOptions(g))}),[g]);const S=c(g);v((()=>{S.current=g}),[g]);const Q=n((function(e,r=!1){let n;return t((()=>{var t;null==(t=h.current)||t.unsubscribe(),h.current=n=p(l(e,{subscriptionOptions:S.current,forceRefetch:!r})),m(e)})),n}),[p,l]);return s((()=>()=>{var e;null==(e=null==h?void 0:h.current)||e.unsubscribe()}),[]),s((()=>{f===b||h.current||Q(f,!0)}),[f,Q]),o((()=>[Q,f]),[Q,f])},k=(t,{skip:n=!1,selectFromResult:i}={})=>{const{select:s}=e.endpoints[y],u=h(n?l:t,m,g.endpointDefinitions[y],y),a=c(),b=o((()=>r([s(u),(e,t)=>t,e=>u],S)),[s,u]),v=o((()=>i?r([b],i):b),[b,i]),x=d((e=>v(e,a.current)),p),Q=f(),q=b(Q.getState(),a.current);return O((()=>{a.current=q}),[q]),x};return{useQueryState:k,useQuerySubscription:Q,useLazyQuerySubscription:z,useLazyQuery(e){const[t,r]=z(e),n=k(r,{...e,skip:r===b}),i=o((()=>({lastArg:r})),[r]);return o((()=>[t,n,i]),[t,n,i])},useQuery(e,t){const r=Q(e,t),n=k(e,{selectFromResult:e===l||(null==t?void 0:t.skip)?void 0:L,...t}),{data:s,status:u,isLoading:c,isSuccess:a,isError:d,error:p}=n;return i({data:s,status:u,isLoading:c,isSuccess:a,isError:d,error:p}),o((()=>({...n,...r})),[n,r])}}},buildMutationHook:function(c){return({selectFromResult:l=z,fixedCacheKey:f}={})=>{const{select:y,initiate:m}=e.endpoints[c],h=u(),[b,g]=a();s((()=>()=>{(null==b?void 0:b.arg.fixedCacheKey)||null==b||b.reset()}),[b]);const v=n((function(e){const t=h(m(e,{fixedCacheKey:f}));return g(t),t}),[h,m,f]),{requestId:S}=b||{},x=o((()=>r([y({fixedCacheKey:f,requestId:null==b?void 0:b.requestId})],l)),[y,b,l,f]),Q=d(x,p),q=null==f?null==b?void 0:b.arg.originalArgs:void 0,O=n((()=>{t((()=>{b&&g(void 0),f&&h(e.internalActions.removeMutationResult({requestId:S,fixedCacheKey:f}))}))}),[h,f,b,S]),{endpointName:L,data:k,status:A,isLoading:E,isSuccess:R,isError:I,error:j}=Q;i({endpointName:L,data:k,status:A,isLoading:E,isSuccess:R,isError:I,error:j});const w=o((()=>({...Q,originalArgs:q,reset:O})),[Q,q,O]);return o((()=>[v,w]),[v,w])}},usePrefetch:function(t,r){const i=u(),s=x(r);return n(((r,n)=>i(e.util.prefetch(t,r,{...s,...n}))),[t,i,s])}};function S(e,t,r){if((null==t?void 0:t.endpointName)&&e.isUninitialized){const{endpointName:e}=t,n=g.endpointDefinitions[e];m({queryArgs:t.originalArgs,endpointDefinition:n,endpointName:e})===m({queryArgs:r,endpointDefinition:n,endpointName:e})&&(t=void 0)}r===l&&(t=void 0);let n=e.isSuccess?e.data:null==t?void 0:t.data;void 0===n&&(n=e.data);const i=void 0!==n,s=e.isLoading,u=!i&&s,o=e.isSuccess||s&&i;return{...e,data:n,currentData:e.data,isFetching:s,isLoading:u,isSuccess:o}}}({api:y,moduleOptions:{batch:e,useDispatch:t,useSelector:u,useStore:d,unstable__sideEffectsInRender:f},serializeQueryArgs:m,context:g});return A(v,{usePrefetch:E}),A(g,{batch:e}),{injectEndpoint(e,t){if("query"===t.type){const{useQuery:t,useLazyQuery:r,useLazyQuerySubscription:n,useQueryState:i,useQuerySubscription:s}=S(e);A(v.endpoints[e],{useQuery:t,useLazyQuery:r,useLazyQuerySubscription:n,useQueryState:i,useQuerySubscription:s}),y[`use${k(e)}Query`]=t,y[`useLazy${k(e)}Query`]=r}else if("mutation"===t.type){const t=Q(e);A(v.endpoints[e],{useMutation:t}),y[`use${k(e)}Mutation`]=t}}}}});export*from"@reduxjs/toolkit/query";import{configureStore as C}from"@reduxjs/toolkit";import{useEffect as F}from"react";import N from"react";import{Provider as K}from"react-redux";import{setupListeners as M}from"@reduxjs/toolkit/query";function _(e){const[t]=N.useState((()=>C({reducer:{[e.api.reducerPath]:e.api.reducer},middleware:t=>t().concat(e.api.middleware)})));return F((()=>!1===e.setupListeners?void 0:M(t.dispatch,e.setupListeners)),[e.setupListeners]),N.createElement(K,{store:t,context:e.context},e.children)}var $=t(e(),D());export{_ as ApiProvider,$ as createApi,D as reactHooksModule};
//# sourceMappingURL=rtk-query-react.modern.production.min.js.map
import type { BaseQueryApi, BaseQueryArg, BaseQueryEnhancer, BaseQueryExtraOptions, BaseQueryFn } from './baseQueryTypes';
import { FetchBaseQueryError } from './fetchBaseQuery';
declare type RetryConditionFunction = (error: FetchBaseQueryError, args: BaseQueryArg<BaseQueryFn>, extraArgs: {
type RetryConditionFunction = (error: FetchBaseQueryError, args: BaseQueryArg<BaseQueryFn>, extraArgs: {
attempt: number;

@@ -8,3 +8,3 @@ baseQueryApi: BaseQueryApi;

}) => boolean;
export declare type RetryOptions = {
export type RetryOptions = {
/**

@@ -11,0 +11,0 @@ * Function used to determine delay between retries

@@ -1,2 +0,2 @@

var e,t,n=this&&this.__generator||function(e,t){var n,r,i,a,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,r=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!((i=(i=u.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){u=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){u.label=a[1];break}if(6===a[0]&&u.label<i[1]){u.label=i[1],i=a;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(a);break}i[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(e,u)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}},r=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},i=Object.create,a=Object.defineProperty,u=Object.defineProperties,o=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,d=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,h=function(e,t,n){return t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},v=function(e,t){for(var n in t||(t={}))f.call(t,n)&&h(e,n,t[n]);if(l)for(var r=0,i=l(t);r<i.length;r++)p.call(t,n=i[r])&&h(e,n,t[n]);return e},y=function(e,t){return u(e,c(t))},m=function(e){return a(e,"__esModule",{value:!0})},g=function(e,t){var n={};for(var r in e)f.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&l)for(var i=0,a=l(e);i<a.length;i++)t.indexOf(r=a[i])<0&&p.call(e,r)&&(n[r]=e[r]);return n},b=function(e){return function(e,t,n){if(t&&"object"==typeof t||"function"==typeof t)for(var r=function(r){f.call(e,r)||"default"===r||a(e,r,{get:function(){return t[r]},enumerable:!(n=o(t,r))||n.enumerable})},i=0,u=s(t);i<u.length;i++)r(u[i]);return e}(m(a(null!=e?i(d(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)},q=function(e,t,n){return new Promise((function(r,i){var a=function(e){try{o(n.next(e))}catch(e){i(e)}},u=function(e){try{o(n.throw(e))}catch(e){i(e)}},o=function(e){return e.done?r(e.value):Promise.resolve(e.value).then(a,u)};o((n=n.apply(e,t)).next())}))};m(exports),function(e,t){for(var n in t)a(e,n,{get:t[n],enumerable:!0})}(exports,{QueryStatus:function(){return e},buildCreateApi:function(){return ye},copyWithStructuralSharing:function(){return A},coreModule:function(){return De},createApi:function(){return Ne},defaultSerializeQueryArgs:function(){return pe},fakeBaseQuery:function(){return me},fetchBaseQuery:function(){return x},retry:function(){return I},setupListeners:function(){return F},skipSelector:function(){return ce},skipToken:function(){return oe}}),(t=e||(e={})).uninitialized="uninitialized",t.pending="pending",t.fulfilled="fulfilled",t.rejected="rejected";var S=function(e){return[].concat.apply([],e)},O=b(require("@reduxjs/toolkit")).isPlainObject;function A(e,t){if(e===t||!(O(e)&&O(t)||Array.isArray(e)&&Array.isArray(t)))return t;for(var n=Object.keys(t),r=Object.keys(e),i=n.length===r.length,a=Array.isArray(t)?[]:{},u=0,o=n;u<o.length;u++){var c=o[u];a[c]=A(e[c],t[c]),i&&(i=e[c]===a[c])}return i?e:a}var T=b(require("@reduxjs/toolkit")),R=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return fetch.apply(void 0,e)},j=function(e){return e.status>=200&&e.status<=299},w=function(e){return/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"")};function k(e){if(!(0,T.isPlainObject)(e))return e;for(var t=v({},e),n=0,r=Object.entries(t);n<r.length;n++){var i=r[n];void 0===i[1]&&delete t[i[0]]}return t}function x(e){var t=this;void 0===e&&(e={});var r=e.baseUrl,i=e.prepareHeaders,a=void 0===i?function(e){return e}:i,u=e.fetchFn,o=void 0===u?R:u,c=e.paramsSerializer,s=e.isJsonContentType,l=void 0===s?w:s,d=e.jsonContentType,f=void 0===d?"application/json":d,p=e.timeout,h=e.validateStatus,m=g(e,["baseUrl","prepareHeaders","fetchFn","paramsSerializer","isJsonContentType","jsonContentType","timeout","validateStatus"]);return"undefined"==typeof fetch&&o===R&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),function(e,i){return q(t,null,(function(){var t,u,s,d,q,S,O,A,R,w,x,Q,P,C,I,M,D,N,E,K,_,F,z,U,L,W,H,B,J,V,G,Y,$,X,Z,ee,te,ne,re,ie;return n(this,(function(n){switch(n.label){case 0:return t=i.signal,u=i.getState,s=i.extra,d=i.endpoint,q=i.forced,S=i.type,R=(A="string"==typeof e?{url:e}:e).url,x=void 0===(w=A.method)?"GET":w,P=void 0===(Q=A.headers)?new Headers(m.headers):Q,I=void 0===(C=A.body)?void 0:C,D=void 0===(M=A.params)?void 0:M,E=void 0===(N=A.responseHandler)?"json":N,_=void 0===(K=A.validateStatus)?null!=h?h:j:K,z=void 0===(F=A.timeout)?p:F,U=g(A,["url","method","headers","body","params","responseHandler","validateStatus","timeout"]),L=v(y(v({},m),{method:x,signal:t,body:I}),U),P=new Headers(k(P)),W=L,[4,a(P,{getState:u,extra:s,endpoint:d,forced:q,type:S})];case 1:W.headers=n.sent()||P,H=function(e){return"object"==typeof e&&((0,T.isPlainObject)(e)||Array.isArray(e)||"function"==typeof e.toJSON)},!L.headers.has("content-type")&&H(I)&&L.headers.set("content-type",f),H(I)&&l(L.headers)&&(L.body=JSON.stringify(I)),D&&(B=~R.indexOf("?")?"&":"?",J=c?c(D):new URLSearchParams(k(D)),R+=B+J),R=function(e,t){if(!e)return t;if(!t)return e;if(function(e){return new RegExp("(^|:)//").test(e)}(t))return t;var n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=function(e){return e.replace(/\/$/,"")}(e),""+e+n+function(e){return e.replace(/^\//,"")}(t)}(r,R),V=new Request(R,L),G=V.clone(),O={request:G},$=!1,X=z&&setTimeout((function(){$=!0,i.abort()}),z),n.label=2;case 2:return n.trys.push([2,4,5,6]),[4,o(V)];case 3:return Y=n.sent(),[3,6];case 4:return Z=n.sent(),[2,{error:{status:$?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(Z)},meta:O}];case 5:return X&&clearTimeout(X),[7];case 6:ee=Y.clone(),O.response=ee,ne="",n.label=7;case 7:return n.trys.push([7,9,,10]),[4,Promise.all([b(Y,E).then((function(e){return te=e}),(function(e){return re=e})),ee.text().then((function(e){return ne=e}),(function(){}))])];case 8:if(n.sent(),re)throw re;return[3,10];case 9:return ie=n.sent(),[2,{error:{status:"PARSING_ERROR",originalStatus:Y.status,data:ne,error:String(ie)},meta:O}];case 10:return[2,_(Y,te)?{data:te,meta:O}:{error:{status:Y.status,data:te},meta:O}]}}))}))};function b(e,t){return q(this,null,(function(){var r;return n(this,(function(n){switch(n.label){case 0:return"function"==typeof t?[2,t(e)]:("content-type"===t&&(t=l(e.headers)?"json":"text"),"json"!==t?[3,2]:[4,e.text()]);case 1:return[2,(r=n.sent()).length?JSON.parse(r):null];case 2:return[2,e.text()]}}))}))}}var Q=function(e,t){void 0===t&&(t=void 0),this.value=e,this.meta=t};function P(e,t){return void 0===e&&(e=0),void 0===t&&(t=5),q(this,null,(function(){var r,i;return n(this,(function(n){switch(n.label){case 0:return r=Math.min(e,t),i=~~((Math.random()+.4)*(300<<r)),[4,new Promise((function(e){return setTimeout((function(t){return e(t)}),i)}))];case 1:return n.sent(),[2]}}))}))}var C={},I=Object.assign((function(e,t){return function(r,i,a){return q(void 0,null,(function(){var u,o,c,s,l,d,f;return n(this,(function(n){switch(n.label){case 0:u=[5,(t||C).maxRetries,(a||C).maxRetries].filter((function(e){return void 0!==e})),o=u.slice(-1)[0],c=function(e,t,n){return n.attempt<=o},s=v(v({maxRetries:o,backoff:P,retryCondition:c},t),a),l=0,n.label=1;case 1:n.label=2;case 2:return n.trys.push([2,4,,6]),[4,e(r,i,a)];case 3:if((d=n.sent()).error)throw new Q(d);return[2,d];case 4:if(f=n.sent(),l++,f.throwImmediately){if(f instanceof Q)return[2,f.value];throw f}return f instanceof Q&&!s.retryCondition(f.value.error,r,{attempt:l,baseQueryApi:i,extraOptions:a})?[2,f.value]:[4,s.backoff(l,s.maxRetries)];case 5:return n.sent(),[3,6];case 6:return[3,1];case 7:return[2]}}))}))}}),{fail:function(e){throw Object.assign(new Q({error:e}),{throwImmediately:!0})}}),M=b(require("@reduxjs/toolkit")),D=(0,M.createAction)("__rtkq/focused"),N=(0,M.createAction)("__rtkq/unfocused"),E=(0,M.createAction)("__rtkq/online"),K=(0,M.createAction)("__rtkq/offline"),_=!1;function F(e,t){return t?t(e,{onFocus:D,onFocusLost:N,onOffline:K,onOnline:E}):(n=function(){return e(D())},r=function(){return e(E())},i=function(){return e(K())},a=function(){"visible"===window.document.visibilityState?n():e(N())},_||"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("visibilitychange",a,!1),window.addEventListener("focus",n,!1),window.addEventListener("online",r,!1),window.addEventListener("offline",i,!1),_=!0),function(){window.removeEventListener("focus",n),window.removeEventListener("visibilitychange",a),window.removeEventListener("online",r),window.removeEventListener("offline",i),_=!1});var n,r,i,a}var z,U,L=b(require("@reduxjs/toolkit"));function W(e){return e.type===z.query}function H(e,t,n,r,i,a){return"function"==typeof e?e(t,n,r,i).map(B).map(a):Array.isArray(e)?e.map(B).map(a):[]}function B(e){return"string"==typeof e?{type:e}:e}(U=z||(z={})).query="query",U.mutation="mutation";var J=b(require("@reduxjs/toolkit"));function V(e){return null!=e}var G=Symbol("forceQueryFn"),Y=function(e){return"function"==typeof e[G]},$=b(require("@reduxjs/toolkit")),X=b(require("immer")),Z=b(require("@reduxjs/toolkit"));function ee(e){return e}function te(e,t,n,r){return H(n[e.meta.arg.endpointName][t],(0,$.isFulfilled)(e)?e.payload:void 0,(0,$.isRejectedWithValue)(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}var ne=b(require("immer"));function re(e,t,n){var r=e[t];r&&n(r)}function ie(e){var t;return null!=(t="arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)?t:e.requestId}function ae(e,t,n){var r=e[ie(t)];r&&n(r)}var ue={},oe=Symbol.for("RTKQ/skipToken"),ce=oe,se={status:e.uninitialized},le=(0,L.createNextState)(se,(function(){})),de=(0,L.createNextState)(se,(function(){})),fe=b(require("@reduxjs/toolkit")),pe=function(e){return e.endpointName+"("+JSON.stringify(e.queryArgs,(function(e,t){return(0,fe.isPlainObject)(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}))+")"},he=b(require("@reduxjs/toolkit")),ve=b(require("reselect"));function ye(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var n=(0,ve.defaultMemoize)((function(e){var n,r;return null==(r=t.extractRehydrationInfo)?void 0:r.call(t,e,{reducerPath:null!=(n=t.reducerPath)?n:"api"})})),i=y(v({reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1},t),{extractRehydrationInfo:n,serializeQueryArgs:function(e){var n=pe;if("serializeQueryArgs"in e.endpointDefinition){var r=e.endpointDefinition.serializeQueryArgs;n=function(e){var t=r(e);return"string"==typeof t?t:pe(y(v({},e),{queryArgs:t}))}}else t.serializeQueryArgs&&(n=t.serializeQueryArgs);return n(e)},tagTypes:r([],t.tagTypes||[])}),a={endpointDefinitions:{},batch:function(e){e()},apiUid:(0,he.nanoid)(),extractRehydrationInfo:n,hasRehydrationInfo:(0,ve.defaultMemoize)((function(e){return null!=n(e)}))},u={injectEndpoints:function(e){for(var t=e.endpoints({query:function(e){return y(v({},e),{type:z.query})},mutation:function(e){return y(v({},e),{type:z.mutation})}}),n=0,r=Object.entries(t);n<r.length;n++){var i=r[n],c=i[0],s=i[1];if(e.overrideExisting||!(c in a.endpointDefinitions)){a.endpointDefinitions[c]=s;for(var l=0,d=o;l<d.length;l++)d[l].injectEndpoint(c,s)}}return u},enhanceEndpoints:function(e){var t=e.addTagTypes,n=e.endpoints;if(t)for(var r=0,o=t;r<o.length;r++){var c=o[r];i.tagTypes.includes(c)||i.tagTypes.push(c)}if(n)for(var s=0,l=Object.entries(n);s<l.length;s++){var d=l[s],f=d[0],p=d[1];"function"==typeof p?p(a.endpointDefinitions[f]):Object.assign(a.endpointDefinitions[f]||{},p)}return u}},o=e.map((function(e){return e.init(u,i,a)}));return u.injectEndpoints({endpoints:t.endpoints})}}function me(){return function(){throw new Error("When using `fakeBaseQuery`, all queries & mutations must use the `queryFn` definition syntax.")}}var ge,be=b(require("@reduxjs/toolkit")),qe=function(e){var t=e.reducerPath,n=e.api,r=e.context,i=e.internalState,a=n.internalActions,u=a.removeQueryResult,o=a.unsubscribeQueryResult;function c(e){var t=i.currentSubscriptions[e];return!!t&&!function(e){for(var t in e)return!1;return!0}(t)}var s={};function l(e,t,n,i){var a,o=r.endpointDefinitions[t],l=null!=(a=null==o?void 0:o.keepUnusedDataFor)?a:i.keepUnusedDataFor;if(Infinity!==l){var d=Math.max(0,Math.min(l,2147482.647));if(!c(e)){var f=s[e];f&&clearTimeout(f),s[e]=setTimeout((function(){c(e)||n.dispatch(u({queryCacheKey:e})),delete s[e]}),1e3*d)}}}return function(e,i,a){var u;if(o.match(e)){var c=i.getState()[t];l(b=e.payload.queryCacheKey,null==(u=c.queries[b])?void 0:u.endpointName,i,c.config)}if(n.util.resetApiState.match(e))for(var d=0,f=Object.entries(s);d<f.length;d++){var p=f[d],h=p[0],v=p[1];v&&clearTimeout(v),delete s[h]}if(r.hasRehydrationInfo(e)){c=i.getState()[t];for(var y=r.extractRehydrationInfo(e).queries,m=0,g=Object.entries(y);m<g.length;m++){var b,q=g[m],S=q[1];l(b=q[0],null==S?void 0:S.endpointName,i,c.config)}}}},Se=b(require("@reduxjs/toolkit")),Oe=function(t){var n=t.reducerPath,r=t.context,i=t.context.endpointDefinitions,a=t.mutationThunk,u=t.api,o=t.assertTagType,c=t.refetchQuery,s=u.internalActions.removeQueryResult,l=(0,Se.isAnyOf)((0,Se.isFulfilled)(a),(0,Se.isRejectedWithValue)(a));function d(t,i){var a=i.getState(),o=a[n],l=u.util.selectInvalidatedBy(a,t);r.batch((function(){for(var t,n=0,r=Array.from(l.values());n<r.length;n++){var a=r[n].queryCacheKey,u=o.queries[a],d=null!=(t=o.subscriptions[a])?t:{};u&&(0===Object.keys(d).length?i.dispatch(s({queryCacheKey:a})):u.status!==e.uninitialized&&i.dispatch(c(u,a)))}}))}return function(e,t){l(e)&&d(te(e,"invalidatesTags",i,o),t),u.util.invalidateTags.match(e)&&d(H(e.payload,void 0,void 0,void 0,void 0,o),t)}},Ae=function(t){var n=t.reducerPath,r=t.queryThunk,i=t.api,a=t.refetchQuery,u=t.internalState,o={};function c(t,r){var i=t.queryCacheKey,c=r.getState()[n].queries[i];if(c&&c.status!==e.uninitialized){var s=d(u.currentSubscriptions[i]);if(Number.isFinite(s)){var l=o[i];(null==l?void 0:l.timeout)&&(clearTimeout(l.timeout),l.timeout=void 0);var f=Date.now()+s,p=o[i]={nextPollTimestamp:f,pollingInterval:s,timeout:setTimeout((function(){p.timeout=void 0,r.dispatch(a(c,i))}),s)}}}}function s(t,r){var i=t.queryCacheKey,a=r.getState()[n].queries[i];if(a&&a.status!==e.uninitialized){var s=d(u.currentSubscriptions[i]);if(Number.isFinite(s)){var f=o[i],p=Date.now()+s;(!f||p<f.nextPollTimestamp)&&c({queryCacheKey:i},r)}else l(i)}}function l(e){var t=o[e];(null==t?void 0:t.timeout)&&clearTimeout(t.timeout),delete o[e]}function d(e){void 0===e&&(e={});var t=Number.POSITIVE_INFINITY;for(var n in e)e[n].pollingInterval&&(t=Math.min(e[n].pollingInterval,t));return t}return function(e,t){(i.internalActions.updateSubscriptionOptions.match(e)||i.internalActions.unsubscribeQueryResult.match(e))&&s(e.payload,t),(r.pending.match(e)||r.rejected.match(e)&&e.meta.condition)&&s(e.meta.arg,t),(r.fulfilled.match(e)||r.rejected.match(e)&&!e.meta.condition)&&c(e.meta.arg,t),i.util.resetApiState.match(e)&&function(){for(var e=0,t=Object.keys(o);e<t.length;e++)l(t[e])}()}},Te=b(require("@reduxjs/toolkit")),Re=new Error("Promise never resolved before cacheEntryRemoved."),je=function(e){var t=e.api,n=e.reducerPath,r=e.context,i=e.queryThunk,a=e.mutationThunk,u=(0,Te.isAsyncThunkAction)(i),o=(0,Te.isAsyncThunkAction)(a),c=(0,Te.isFulfilled)(i,a),s={};function l(e,n,i,a,u){var o=r.endpointDefinitions[e],c=null==o?void 0:o.onCacheEntryAdded;if(c){var l={},d=new Promise((function(e){l.cacheEntryRemoved=e})),f=Promise.race([new Promise((function(e){l.valueResolved=e})),d.then((function(){throw Re}))]);f.catch((function(){})),s[i]=l;var p=t.endpoints[e].select(o.type===z.query?n:i),h=a.dispatch((function(e,t,n){return n})),m=y(v({},a),{getCacheEntry:function(){return p(a.getState())},requestId:u,extra:h,updateCachedData:o.type===z.query?function(r){return a.dispatch(t.util.updateQueryData(e,n,r))}:void 0,cacheDataLoaded:f,cacheEntryRemoved:d}),g=c(n,m);Promise.resolve(g).catch((function(e){if(e!==Re)throw e}))}}return function(e,r,d){var f=function(e){return u(e)?e.meta.arg.queryCacheKey:o(e)?e.meta.requestId:t.internalActions.removeQueryResult.match(e)?e.payload.queryCacheKey:t.internalActions.removeMutationResult.match(e)?ie(e.payload):""}(e);if(i.pending.match(e)){var p=d[n].queries[f],h=r.getState()[n].queries[f];!p&&h&&l(e.meta.arg.endpointName,e.meta.arg.originalArgs,f,r,e.meta.requestId)}else if(a.pending.match(e))(h=r.getState()[n].mutations[f])&&l(e.meta.arg.endpointName,e.meta.arg.originalArgs,f,r,e.meta.requestId);else if(c(e))(null==(g=s[f])?void 0:g.valueResolved)&&(g.valueResolved({data:e.payload,meta:e.meta.baseQueryMeta}),delete g.valueResolved);else if(t.internalActions.removeQueryResult.match(e)||t.internalActions.removeMutationResult.match(e))(g=s[f])&&(delete s[f],g.cacheEntryRemoved());else if(t.util.resetApiState.match(e))for(var v=0,y=Object.entries(s);v<y.length;v++){var m=y[v],g=m[1];delete s[m[0]],g.cacheEntryRemoved()}}},we=b(require("@reduxjs/toolkit")),ke=function(e){var t=e.api,n=e.context,r=e.queryThunk,i=e.mutationThunk,a=(0,we.isPending)(r,i),u=(0,we.isRejected)(r,i),o=(0,we.isFulfilled)(r,i),c={};return function(e,r){var i,s,l;if(a(e)){var d=e.meta,f=d.requestId,p=d.arg,h=p.endpointName,m=p.originalArgs,g=n.endpointDefinitions[h],b=null==g?void 0:g.onQueryStarted;if(b){var q={},S=new Promise((function(e,t){q.resolve=e,q.reject=t}));S.catch((function(){})),c[f]=q;var O=t.endpoints[h].select(g.type===z.query?m:f),A=r.dispatch((function(e,t,n){return n})),T=y(v({},r),{getCacheEntry:function(){return O(r.getState())},requestId:f,extra:A,updateCachedData:g.type===z.query?function(e){return r.dispatch(t.util.updateQueryData(h,m,e))}:void 0,queryFulfilled:S});b(m,T)}}else if(o(e)){var R=e.meta,j=R.baseQueryMeta;null==(i=c[f=R.requestId])||i.resolve({data:e.payload,meta:j}),delete c[f]}else if(u(e)){var w=e.meta;j=w.baseQueryMeta,null==(l=c[f=w.requestId])||l.reject({error:null!=(s=e.payload)?s:e.error,isUnhandledError:!w.rejectedWithValue,meta:j}),delete c[f]}}},xe=function(e){var t=e.api,n=e.context.apiUid;return function(e,r){t.util.resetApiState.match(e)&&r.dispatch(t.internalActions.middlewareRegistered(n))}},Qe=b(require("immer")),Pe="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis):function(e){return(ge||(ge=Promise.resolve())).then(e).catch((function(e){return setTimeout((function(){throw e}),0)}))};function Ce(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Object.assign.apply(Object,r([e],t))}var Ie=b(require("immer")),Me=Symbol(),De=function(){return{name:Me,init:function(t,i,a){var u=i.baseQuery,o=i.reducerPath,c=i.serializeQueryArgs,s=i.keepUnusedDataFor,l=i.refetchOnMountOrArgChange,d=i.refetchOnFocus,f=i.refetchOnReconnect;(0,Ie.enablePatches)();var p=function(e){return e};Object.assign(t,{reducerPath:o,endpoints:{},internalActions:{onOnline:E,onOffline:K,onFocus:D,onFocusLost:N},util:{}});var h=function(t){var r=this,i=t.reducerPath,a=t.baseQuery,u=t.context.endpointDefinitions,o=t.serializeQueryArgs,c=t.api,s=function(e,t){return q(r,[e,t],(function(e,t){var r,i,o,c,s,d,f,p,h,v,y,m,g,b=t.signal,q=t.abort,S=t.rejectWithValue,O=t.fulfillWithValue,A=t.dispatch,T=t.getState,R=t.extra;return n(this,(function(t){switch(t.label){case 0:r=u[e.endpointName],t.label=1;case 1:return t.trys.push([1,8,,13]),i=ee,o=void 0,c={signal:b,abort:q,dispatch:A,getState:T,extra:R,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?l(e,T()):void 0},(s="query"===e.type?e[G]:void 0)?(o=s(),[3,6]):[3,2];case 2:return r.query?[4,a(r.query(e.originalArgs),c,r.extraOptions)]:[3,4];case 3:return o=t.sent(),r.transformResponse&&(i=r.transformResponse),[3,6];case 4:return[4,r.queryFn(e.originalArgs,c,r.extraOptions,(function(e){return a(e,c,r.extraOptions)}))];case 5:o=t.sent(),t.label=6;case 6:if(o.error)throw new Q(o.error,o.meta);return d=O,[4,i(o.data,o.meta,e.originalArgs)];case 7:return[2,d.apply(void 0,[t.sent(),(m={fulfilledTimeStamp:Date.now(),baseQueryMeta:o.meta},m[Z.SHOULD_AUTOBATCH]=!0,m)])];case 8:if(f=t.sent(),!((p=f)instanceof Q))return[3,12];h=ee,r.query&&r.transformErrorResponse&&(h=r.transformErrorResponse),t.label=9;case 9:return t.trys.push([9,11,,12]),v=S,[4,h(p.value,p.meta,e.originalArgs)];case 10:return[2,v.apply(void 0,[t.sent(),(g={baseQueryMeta:p.meta},g[Z.SHOULD_AUTOBATCH]=!0,g)])];case 11:return y=t.sent(),p=y,[3,12];case 12:throw console.error(p),p;case 13:return[2]}}))}))};function l(e,t){var n,r,a,u,o=null==(r=null==(n=t[i])?void 0:n.queries)?void 0:r[e.queryCacheKey],c=null==(a=t[i])?void 0:a.config.refetchOnMountOrArgChange,s=null==o?void 0:o.fulfilledTimeStamp,l=null!=(u=e.forceRefetch)?u:e.subscribe&&c;return!!l&&(!0===l||(Number(new Date)-Number(s))/1e3>=l)}var d=(0,Z.createAsyncThunk)(i+"/executeQuery",s,{getPendingMeta:function(){var e;return(e={startedTimeStamp:Date.now()})[Z.SHOULD_AUTOBATCH]=!0,e},condition:function(e,t){var n,r,a,o=(0,t.getState)(),c=null==(r=null==(n=o[i])?void 0:n.queries)?void 0:r[e.queryCacheKey],s=null==c?void 0:c.fulfilledTimeStamp,d=e.originalArgs,f=null==c?void 0:c.originalArgs,p=u[e.endpointName];return!(!Y(e)&&("pending"===(null==c?void 0:c.status)||!l(e,o)&&(!W(p)||!(null==(a=null==p?void 0:p.forceRefetch)?void 0:a.call(p,{currentArg:d,previousArg:f,endpointState:c,state:o})))&&s))},dispatchConditionRejection:!0}),f=(0,Z.createAsyncThunk)(i+"/executeMutation",s,{getPendingMeta:function(){var e;return(e={startedTimeStamp:Date.now()})[Z.SHOULD_AUTOBATCH]=!0,e}});function p(e){return function(t){var n,r;return(null==(r=null==(n=null==t?void 0:t.meta)?void 0:n.arg)?void 0:r.endpointName)===e}}return{queryThunk:d,mutationThunk:f,prefetch:function(e,t,n){return function(r,i){var a=function(e){return"force"in e}(n)&&n.force,u=function(e){return"ifOlderThan"in e}(n)&&n.ifOlderThan,o=function(n){return void 0===n&&(n=!0),c.endpoints[e].initiate(t,{forceRefetch:n})},s=c.endpoints[e].select(t)(i());if(a)r(o());else if(u){var l=null==s?void 0:s.fulfilledTimeStamp;if(!l)return void r(o());(Number(new Date)-Number(new Date(l)))/1e3>=u&&r(o())}else r(o(!1))}},updateQueryData:function(t,n,r){return function(i,a){var u,o,s=c.endpoints[t].select(n)(a()),l={patches:[],inversePatches:[],undo:function(){return i(c.util.patchQueryData(t,n,l.inversePatches))}};if(s.status===e.uninitialized)return l;if("data"in s)if((0,X.isDraftable)(s.data)){var d=(0,X.produceWithPatches)(s.data,r),f=d[2];(u=l.patches).push.apply(u,d[1]),(o=l.inversePatches).push.apply(o,f)}else{var p=r(s.data);l.patches.push({op:"replace",path:[],value:p}),l.inversePatches.push({op:"replace",path:[],value:s.data})}return i(c.util.patchQueryData(t,n,l.patches)),l}},upsertQueryData:function(e,t,n){return function(r){var i;return r(c.endpoints[e].initiate(t,((i={subscribe:!1,forceRefetch:!0})[G]=function(){return{data:n}},i)))}},patchQueryData:function(e,t,n){return function(r){r(c.internalActions.queryResultPatched({queryCacheKey:o({queryArgs:t,endpointDefinition:u[e],endpointName:e}),patches:n}))}},buildMatchThunkActions:function(e,t){return{matchPending:(0,$.isAllOf)((0,$.isPending)(e),p(t)),matchFulfilled:(0,$.isAllOf)((0,$.isFulfilled)(e),p(t)),matchRejected:(0,$.isAllOf)((0,$.isRejected)(e),p(t))}}}}({baseQuery:u,reducerPath:o,context:a,api:t,serializeQueryArgs:c}),m=h.queryThunk,g=h.mutationThunk,b=h.patchQueryData,O=h.updateQueryData,T=h.upsertQueryData,R=h.prefetch,j=h.buildMatchThunkActions,w=function(t){var n=t.reducerPath,r=t.queryThunk,i=t.mutationThunk,a=t.context,u=a.endpointDefinitions,o=a.apiUid,c=a.extractRehydrationInfo,s=a.hasRehydrationInfo,l=t.assertTagType,d=t.config,f=(0,J.createAction)(n+"/resetApiState"),p=(0,J.createSlice)({name:n+"/queries",initialState:ue,reducers:{removeQueryResult:{reducer:function(e,t){delete e[t.payload.queryCacheKey]},prepare:(0,J.prepareAutoBatched)()},queryResultPatched:function(e,t){var n=t.payload,r=n.patches;re(e,n.queryCacheKey,(function(e){e.data=(0,ne.applyPatches)(e.data,r.concat())}))}},extraReducers:function(t){t.addCase(r.pending,(function(t,n){var r,i=n.meta,a=n.meta.arg,u=Y(a);(a.subscribe||u)&&(null!=t[r=a.queryCacheKey]||(t[r]={status:e.uninitialized,endpointName:a.endpointName})),re(t,a.queryCacheKey,(function(t){t.status=e.pending,t.requestId=u&&t.requestId?t.requestId:i.requestId,void 0!==a.originalArgs&&(t.originalArgs=a.originalArgs),t.startedTimeStamp=i.startedTimeStamp}))})).addCase(r.fulfilled,(function(t,n){var r=n.meta,i=n.payload;re(t,r.arg.queryCacheKey,(function(t){var n;if(t.requestId===r.requestId||Y(r.arg)){var a=u[r.arg.endpointName].merge;if(t.status=e.fulfilled,a)if(void 0!==t.data){var o=r.fulfilledTimeStamp,c=r.arg,s=r.baseQueryMeta,l=r.requestId,d=(0,J.createNextState)(t.data,(function(e){return a(e,i,{arg:c.originalArgs,baseQueryMeta:s,fulfilledTimeStamp:o,requestId:l})}));t.data=d}else t.data=i;else t.data=null==(n=u[r.arg.endpointName].structuralSharing)||n?A(t.data,i):i;delete t.error,t.fulfilledTimeStamp=r.fulfilledTimeStamp}}))})).addCase(r.rejected,(function(t,n){var r=n.meta,i=r.condition,a=r.requestId,u=n.error,o=n.payload;re(t,r.arg.queryCacheKey,(function(t){if(i);else{if(t.requestId!==a)return;t.status=e.rejected,t.error=null!=o?o:u}}))})).addMatcher(s,(function(t,n){for(var r=c(n).queries,i=0,a=Object.entries(r);i<a.length;i++){var u=a[i],o=u[1];(null==o?void 0:o.status)!==e.fulfilled&&(null==o?void 0:o.status)!==e.rejected||(t[u[0]]=o)}}))}}),h=(0,J.createSlice)({name:n+"/mutations",initialState:ue,reducers:{removeMutationResult:{reducer:function(e,t){var n=ie(t.payload);n in e&&delete e[n]},prepare:(0,J.prepareAutoBatched)()}},extraReducers:function(t){t.addCase(i.pending,(function(t,n){var r=n.meta,i=r.requestId,a=r.arg,u=r.startedTimeStamp;a.track&&(t[ie(n.meta)]={requestId:i,status:e.pending,endpointName:a.endpointName,startedTimeStamp:u})})).addCase(i.fulfilled,(function(t,n){var r=n.payload,i=n.meta;i.arg.track&&ae(t,i,(function(t){t.requestId===i.requestId&&(t.status=e.fulfilled,t.data=r,t.fulfilledTimeStamp=i.fulfilledTimeStamp)}))})).addCase(i.rejected,(function(t,n){var r=n.payload,i=n.error,a=n.meta;a.arg.track&&ae(t,a,(function(t){t.requestId===a.requestId&&(t.status=e.rejected,t.error=null!=r?r:i)}))})).addMatcher(s,(function(t,n){for(var r=c(n).mutations,i=0,a=Object.entries(r);i<a.length;i++){var u=a[i],o=u[0],s=u[1];(null==s?void 0:s.status)!==e.fulfilled&&(null==s?void 0:s.status)!==e.rejected||o===(null==s?void 0:s.requestId)||(t[o]=s)}}))}}),m=(0,J.createSlice)({name:n+"/invalidation",initialState:ue,reducers:{},extraReducers:function(e){e.addCase(p.actions.removeQueryResult,(function(e,t){for(var n=t.payload.queryCacheKey,r=0,i=Object.values(e);r<i.length;r++)for(var a=0,u=Object.values(i[r]);a<u.length;a++){var o=u[a],c=o.indexOf(n);-1!==c&&o.splice(c,1)}})).addMatcher(s,(function(e,t){for(var n,r,i,a,u=c(t).provided,o=0,s=Object.entries(u);o<s.length;o++)for(var l=s[o],d=l[0],f=0,p=Object.entries(l[1]);f<p.length;f++)for(var h=p[f],v=h[0],y=h[1],m=null!=(a=(r=null!=(n=e[d])?n:e[d]={})[i=v||"__internal_without_id"])?a:r[i]=[],g=0,b=y;g<b.length;g++){var q=b[g];m.includes(q)||m.push(q)}})).addMatcher((0,J.isAnyOf)((0,J.isFulfilled)(r),(0,J.isRejectedWithValue)(r)),(function(e,t){for(var n,r,i,a,o=te(t,"providesTags",u,l),c=t.meta.arg.queryCacheKey,s=0,d=Object.values(e);s<d.length;s++)for(var f=0,p=Object.values(d[s]);f<p.length;f++){var h=p[f],v=h.indexOf(c);-1!==v&&h.splice(v,1)}for(var y=0,m=o;y<m.length;y++){var g=m[y],b=g.type,q=g.id,S=null!=(a=(r=null!=(n=e[b])?n:e[b]={})[i=q||"__internal_without_id"])?a:r[i]=[];S.includes(c)||S.push(c)}}))}}),g=(0,J.createSlice)({name:n+"/subscriptions",initialState:ue,reducers:{updateSubscriptionOptions:function(e,t){},unsubscribeQueryResult:function(e,t){},internal_probeSubscription:function(e,t){}}}),b=(0,J.createSlice)({name:n+"/internalSubscriptions",initialState:ue,reducers:{subscriptionsUpdated:function(e,t){return(0,ne.applyPatches)(e,t.payload)}}}),q=(0,J.createSlice)({name:n+"/config",initialState:v({online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine,focused:"undefined"==typeof document||"hidden"!==document.visibilityState,middlewareRegistered:!1},d),reducers:{middlewareRegistered:function(e,t){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&o===t.payload||"conflict"}},extraReducers:function(e){e.addCase(E,(function(e){e.online=!0})).addCase(K,(function(e){e.online=!1})).addCase(D,(function(e){e.focused=!0})).addCase(N,(function(e){e.focused=!1})).addMatcher(s,(function(e){return v({},e)}))}}),S=(0,J.combineReducers)({queries:p.reducer,mutations:h.reducer,provided:m.reducer,subscriptions:b.reducer,config:q.reducer});return{reducer:function(e,t){return S(f.match(t)?void 0:e,t)},actions:y(v(v(v(v(v({},q.actions),p.actions),g.actions),b.actions),h.actions),{unsubscribeMutationResult:h.actions.removeMutationResult,resetApiState:f})}}({context:a,queryThunk:m,mutationThunk:g,reducerPath:o,assertTagType:p,config:{refetchOnFocus:d,refetchOnReconnect:f,refetchOnMountOrArgChange:l,keepUnusedDataFor:s,reducerPath:o}}),k=w.reducer,x=w.actions;Ce(t.util,{patchQueryData:b,updateQueryData:O,upsertQueryData:T,prefetch:R,resetApiState:x.resetApiState}),Ce(t.internalActions,x);var P=function(t){var n=t.reducerPath,r=t.queryThunk,i=t.api,a=t.context,u=a.apiUid,o={invalidateTags:(0,be.createAction)(n+"/invalidateTags")},c=[xe,qe,Oe,Ae,je,ke];return{middleware:function(r){var o=!1,l=y(v({},t),{internalState:{currentSubscriptions:{}},refetchQuery:s}),d=c.map((function(e){return e(l)})),f=function(e){var t=e.api,n=e.queryThunk,r=e.internalState,i=t.reducerPath+"/subscriptions",a=null,u=!1,o=t.internalActions,c=o.updateSubscriptionOptions,s=o.unsubscribeQueryResult;return function(e,o){var l,d;if(a||(a=JSON.parse(JSON.stringify(r.currentSubscriptions))),t.internalActions.internal_probeSubscription.match(e)){var f=e.payload;return[!1,!!(null==(l=r.currentSubscriptions[f.queryCacheKey])?void 0:l[f.requestId])]}var p=function(e,r){var i,a,u,o,l,d,f,p,h;if(c.match(r)){var v=r.payload,y=v.queryCacheKey,m=v.requestId;return(null==(i=null==e?void 0:e[y])?void 0:i[m])&&(e[y][m]=v.options),!0}if(s.match(r)){var g=r.payload;return m=g.requestId,e[y=g.queryCacheKey]&&delete e[y][m],!0}if(t.internalActions.removeQueryResult.match(r))return delete e[r.payload.queryCacheKey],!0;if(n.pending.match(r)){var b=r.meta;if(m=b.requestId,(O=b.arg).subscribe)return(q=null!=(u=e[a=O.queryCacheKey])?u:e[a]={})[m]=null!=(l=null!=(o=O.subscriptionOptions)?o:q[m])?l:{},!0}if(n.rejected.match(r)){var q,S=r.meta,O=S.arg;if(m=S.requestId,S.condition&&O.subscribe)return(q=null!=(f=e[d=O.queryCacheKey])?f:e[d]={})[m]=null!=(h=null!=(p=O.subscriptionOptions)?p:q[m])?h:{},!0}return!1}(r.currentSubscriptions,e);if(p){u||(Pe((function(){var e=JSON.parse(JSON.stringify(r.currentSubscriptions)),n=(0,Qe.produceWithPatches)(a,(function(){return e}));o.next(t.internalActions.subscriptionsUpdated(n[1])),a=e,u=!1})),u=!0);var h=!!(null==(d=e.type)?void 0:d.startsWith(i)),v=n.rejected.match(e)&&e.meta.condition&&!!e.meta.arg.subscribe;return[!h&&!v,!1]}return[!0,!1]}}(l),p=function(t){var n=t.reducerPath,r=t.context,i=t.refetchQuery,a=t.internalState,u=t.api.internalActions.removeQueryResult;function o(t,o){var c=t.getState()[n],s=c.queries,l=a.currentSubscriptions;r.batch((function(){for(var n=0,r=Object.keys(l);n<r.length;n++){var a=r[n],d=s[a],f=l[a];f&&d&&(Object.values(f).some((function(e){return!0===e[o]}))||Object.values(f).every((function(e){return void 0===e[o]}))&&c.config[o])&&(0===Object.keys(f).length?t.dispatch(u({queryCacheKey:a})):d.status!==e.uninitialized&&t.dispatch(i(d,a)))}}))}return function(e,t){D.match(e)&&o(t,"refetchOnFocus"),E.match(e)&&o(t,"refetchOnReconnect")}}(l);return function(e){return function(t){o||(o=!0,r.dispatch(i.internalActions.middlewareRegistered(u)));var c,s=y(v({},r),{next:e}),l=r.getState(),h=f(t,s,l),m=h[1];if(c=h[0]?e(t):m,r.getState()[n]&&(p(t,s,l),function(e){return!!e&&"string"==typeof e.type&&e.type.startsWith(n+"/")}(t)||a.hasRehydrationInfo(t)))for(var g=0,b=d;g<b.length;g++)(0,b[g])(t,s,l);return c}}},actions:o};function s(e,t,n){return void 0===n&&(n={}),r(v({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t},n))}}({reducerPath:o,context:a,queryThunk:m,mutationThunk:g,api:t,assertTagType:p}),C=P.middleware;Ce(t.util,P.actions),Ce(t,{reducer:k,middleware:C});var I=function(t){var n=t.serializeQueryArgs,r=t.reducerPath,i=function(e){return le},a=function(e){return de};return{buildQuerySelector:function(e,t){return function(r){var a=n({queryArgs:r,endpointDefinition:t,endpointName:e});return(0,L.createSelector)(r===oe?i:function(e){var t,n,r;return null!=(r=null==(n=null==(t=o(e))?void 0:t.queries)?void 0:n[a])?r:le},u)}},buildMutationSelector:function(){return function(e){var t,n;return n="object"==typeof e?null!=(t=ie(e))?t:oe:e,(0,L.createSelector)(n===oe?a:function(e){var t,r,i;return null!=(i=null==(r=null==(t=o(e))?void 0:t.mutations)?void 0:r[n])?i:de},u)}},selectInvalidatedBy:function(e,t){for(var n,i=e[r],a=new Set,u=0,o=t.map(B);u<o.length;u++){var c=o[u],s=i.provided[c.type];if(s)for(var l=0,d=null!=(n=void 0!==c.id?s[c.id]:S(Object.values(s)))?n:[];l<d.length;l++)a.add(d[l])}return S(Array.from(a.values()).map((function(e){var t=i.queries[e];return t?[{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}]:[]})))}};function u(t){return v(v({},t),{status:n=t.status,isUninitialized:n===e.uninitialized,isLoading:n===e.pending,isSuccess:n===e.fulfilled,isError:n===e.rejected});var n}function o(e){return e[r]}}({serializeQueryArgs:c,reducerPath:o}),M=I.buildQuerySelector,_=I.buildMutationSelector;Ce(t.util,{selectInvalidatedBy:I.selectInvalidatedBy});var F=function(e){var t=e.serializeQueryArgs,i=e.queryThunk,a=e.mutationThunk,u=e.api,o=e.context,c=new Map,s=new Map,l=u.internalActions,d=l.unsubscribeQueryResult,f=l.removeMutationResult,p=l.updateSubscriptionOptions;return{buildInitiateQuery:function(e,r){var a=function(o,s){var l=void 0===s?{}:s,f=l.subscribe,h=void 0===f||f,v=l.forceRefetch,y=l.subscriptionOptions,m=l[G];return function(s,l){var f,g,b=t({queryArgs:o,endpointDefinition:r,endpointName:e}),S=i(((f={type:"query",subscribe:h,forceRefetch:v,subscriptionOptions:y,endpointName:e,originalArgs:o,queryCacheKey:b})[G]=m,f)),O=u.endpoints[e].select(o),A=s(S),T=O(l()),R=A.requestId,j=A.abort,w=T.requestId!==R,k=null==(g=c.get(s))?void 0:g[b],x=function(){return O(l())},Q=Object.assign(m?A.then(x):w&&!k?Promise.resolve(T):Promise.all([k,A]).then(x),{arg:o,requestId:R,subscriptionOptions:y,queryCacheKey:b,abort:j,unwrap:function(){return q(this,null,(function(){var e;return n(this,(function(t){switch(t.label){case 0:return[4,Q];case 1:if((e=t.sent()).isError)throw e.error;return[2,e.data]}}))}))},refetch:function(){return s(a(o,{subscribe:!1,forceRefetch:!0}))},unsubscribe:function(){h&&s(d({queryCacheKey:b,requestId:R}))},updateSubscriptionOptions:function(t){Q.subscriptionOptions=t,s(p({endpointName:e,requestId:R,queryCacheKey:b,options:t}))}});if(!k&&!w&&!m){var P=c.get(s)||{};P[b]=Q,c.set(s,P),Q.then((function(){delete P[b],Object.keys(P).length||c.delete(s)}))}return Q}};return a},buildInitiateMutation:function(e){return function(t,n){var r=void 0===n?{}:n,i=r.track,u=void 0===i||i,o=r.fixedCacheKey;return function(n,r){var i=a({type:"mutation",endpointName:e,originalArgs:t,track:u,fixedCacheKey:o}),c=n(i),l=c.requestId,d=c.abort,p=c.unwrap,h=c.unwrap().then((function(e){return{data:e}})).catch((function(e){return{error:e}})),v=function(){n(f({requestId:l,fixedCacheKey:o}))},y=Object.assign(h,{arg:c.arg,requestId:l,abort:d,unwrap:p,unsubscribe:v,reset:v}),m=s.get(n)||{};return s.set(n,m),m[l]=y,y.then((function(){delete m[l],Object.keys(m).length||s.delete(n)})),o&&(m[o]=y,y.then((function(){m[o]===y&&(delete m[o],Object.keys(m).length||s.delete(n))}))),y}}},getRunningQueryThunk:function(e,n){return function(r){var i,a=t({queryArgs:n,endpointDefinition:o.endpointDefinitions[e],endpointName:e});return null==(i=c.get(r))?void 0:i[a]}},getRunningMutationThunk:function(e,t){return function(e){var n;return null==(n=s.get(e))?void 0:n[t]}},getRunningQueriesThunk:function(){return function(e){return Object.values(c.get(e)||{}).filter(V)}},getRunningMutationsThunk:function(){return function(e){return Object.values(s.get(e)||{}).filter(V)}},getRunningOperationPromises:function(){var e=function(e){return Array.from(e.values()).flatMap((function(e){return e?Object.values(e):[]}))};return r(r([],e(c)),e(s)).filter(V)},removalWarning:function(){throw new Error("This method had to be removed due to a conceptual bug in RTK.\n Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details.\n See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR.")}}}({queryThunk:m,mutationThunk:g,api:t,serializeQueryArgs:c,context:a}),U=F.buildInitiateQuery,H=F.buildInitiateMutation;return Ce(t.util,{getRunningOperationPromises:F.getRunningOperationPromises,getRunningOperationPromise:F.removalWarning,getRunningMutationThunk:F.getRunningMutationThunk,getRunningMutationsThunk:F.getRunningMutationsThunk,getRunningQueryThunk:F.getRunningQueryThunk,getRunningQueriesThunk:F.getRunningQueriesThunk}),{name:Me,injectEndpoint:function(e,n){var r,i=t;null!=(r=i.endpoints)[e]||(r[e]={}),W(n)?Ce(i.endpoints[e],{name:e,select:M(e,n),initiate:U(e,n)},j(m,e)):n.type===z.mutation&&Ce(i.endpoints[e],{name:e,select:_(),initiate:H(e)},j(g,e))}}}}},Ne=ye(De());
"use strict";var e,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a={};((e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})})(a,{QueryStatus:()=>o,buildCreateApi:()=>ee,copyWithStructuralSharing:()=>c,coreModule:()=>be,createApi:()=>qe,defaultSerializeQueryArgs:()=>Y,fakeBaseQuery:()=>te,fetchBaseQuery:()=>h,retry:()=>b,setupListeners:()=>w,skipSelector:()=>B,skipToken:()=>W}),module.exports=(e=a,((e,a,o,s)=>{if(a&&"object"==typeof a||"function"==typeof a)for(let o of r(a))i.call(e,o)||void 0===o||t(e,o,{get:()=>a[o],enumerable:!(s=n(a,o))||s.enumerable});return e})(t({},"__esModule",{value:!0}),e));var o=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(o||{}),s=e=>[].concat(...e),u=require("@reduxjs/toolkit").isPlainObject;function c(e,t){if(e===t||!(u(e)&&u(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),r=Object.keys(e);let i=n.length===r.length;const a=Array.isArray(t)?[]:{};for(const r of n)a[r]=c(e[r],t[r]),i&&(i=e[r]===a[r]);return i?e:a}var l=require("@reduxjs/toolkit"),d=(...e)=>fetch(...e),f=e=>e.status>=200&&e.status<=299,p=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function y(e){if(!(0,l.isPlainObject)(e))return e;const t={...e};for(const[e,n]of Object.entries(t))void 0===n&&delete t[e];return t}function h({baseUrl:e,prepareHeaders:t=(e=>e),fetchFn:n=d,paramsSerializer:r,isJsonContentType:i=p,jsonContentType:a="application/json",timeout:o,validateStatus:s,...u}={}){return"undefined"==typeof fetch&&n===d&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(d,p)=>{const{signal:h,getState:m,extra:g,endpoint:v,forced:b,type:q}=p;let S,{url:A,method:O="GET",headers:T=new Headers(u.headers),body:R,params:w,responseHandler:j="json",validateStatus:k=(null!=s?s:f),timeout:x=o,...Q}="string"==typeof d?{url:d}:d,C={...u,method:O,signal:h,body:R,...Q};T=new Headers(y(T)),C.headers=await t(T,{getState:m,extra:g,endpoint:v,forced:b,type:q})||T;const I=e=>"object"==typeof e&&((0,l.isPlainObject)(e)||Array.isArray(e)||"function"==typeof e.toJSON);if(!C.headers.has("content-type")&&I(R)&&C.headers.set("content-type",a),I(R)&&i(C.headers)&&(C.body=JSON.stringify(R)),w){const e=~A.indexOf("?")?"&":"?";A+=e+(r?r(w):new URLSearchParams(y(w)))}A=function(e,t){if(!e)return t;if(!t)return e;if(function(e){return new RegExp("(^|:)//").test(e)}(t))return t;const n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=(e=>e.replace(/\/$/,""))(e),`${e}${n}${t=(e=>e.replace(/^\//,""))(t)}`}(e,A);const P=new Request(A,C);S={request:P.clone()};let M,D=!1,N=x&&setTimeout((()=>{D=!0,p.abort()}),x);try{M=await n(P)}catch(e){return{error:{status:D?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(e)},meta:S}}finally{N&&clearTimeout(N)}const K=M.clone();let E;S.response=K;let F="";try{let e;if(await Promise.all([c(M,j).then((e=>E=e),(t=>e=t)),K.text().then((e=>F=e),(()=>{}))]),e)throw e}catch(e){return{error:{status:"PARSING_ERROR",originalStatus:M.status,data:F,error:String(e)},meta:S}}return k(M,E)?{data:E,meta:S}:{error:{status:M.status,data:E},meta:S}};async function c(e,t){if("function"==typeof t)return t(e);if("content-type"===t&&(t=i(e.headers)?"json":"text"),"json"===t){const t=await e.text();return t.length?JSON.parse(t):null}return e.text()}}var m=class{constructor(e,t){this.value=e,this.meta=t}};async function g(e=0,t=5){const n=Math.min(e,t),r=~~((Math.random()+.4)*(300<<n));await new Promise((e=>setTimeout((t=>e(t)),r)))}var v={},b=Object.assign(((e,t)=>async(n,r,i)=>{const a=[5,(t||v).maxRetries,(i||v).maxRetries].filter((e=>void 0!==e)),[o]=a.slice(-1),s={maxRetries:o,backoff:g,retryCondition:(e,t,{attempt:n})=>n<=o,...t,...i};let u=0;for(;;)try{const t=await e(n,r,i);if(t.error)throw new m(t);return t}catch(e){if(u++,e.throwImmediately){if(e instanceof m)return e.value;throw e}if(e instanceof m&&!s.retryCondition(e.value.error,n,{attempt:u,baseQueryApi:r,extraOptions:i}))return e.value;await s.backoff(u,s.maxRetries)}}),{fail:function(e){throw Object.assign(new m({error:e}),{throwImmediately:!0})}}),q=require("@reduxjs/toolkit"),S=(0,q.createAction)("__rtkq/focused"),A=(0,q.createAction)("__rtkq/unfocused"),O=(0,q.createAction)("__rtkq/online"),T=(0,q.createAction)("__rtkq/offline"),R=!1;function w(e,t){return t?t(e,{onFocus:S,onFocusLost:A,onOffline:T,onOnline:O}):function(){const t=()=>e(S()),n=()=>e(O()),r=()=>e(T()),i=()=>{"visible"===window.document.visibilityState?t():e(A())};return R||"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("visibilitychange",i,!1),window.addEventListener("focus",t,!1),window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),R=!0),()=>{window.removeEventListener("focus",t),window.removeEventListener("visibilitychange",i),window.removeEventListener("online",n),window.removeEventListener("offline",r),R=!1}}()}var j=require("@reduxjs/toolkit");function k(e){return"query"===e.type}function x(e,t,n,r,i,a){return"function"==typeof e?e(t,n,r,i).map(Q).map(a):Array.isArray(e)?e.map(Q).map(a):[]}function Q(e){return"string"==typeof e?{type:e}:e}var C=require("@reduxjs/toolkit");function I(e){return null!=e}var P=Symbol("forceQueryFn"),M=e=>"function"==typeof e[P],D=require("@reduxjs/toolkit"),N=require("immer"),K=require("@reduxjs/toolkit");function E(e){return e}function F(e,t,n,r){return x(n[e.meta.arg.endpointName][t],(0,D.isFulfilled)(e)?e.payload:void 0,(0,D.isRejectedWithValue)(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}var _=require("immer");function z(e,t,n){const r=e[t];r&&n(r)}function U(e){var t;return null!=(t="arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)?t:e.requestId}function L(e,t,n){const r=e[U(t)];r&&n(r)}var $={},W=Symbol.for("RTKQ/skipToken"),B=W,H={status:"uninitialized"},J=(0,j.createNextState)(H,(()=>{})),V=(0,j.createNextState)(H,(()=>{})),G=require("@reduxjs/toolkit"),Y=({endpointName:e,queryArgs:t})=>`${e}(${JSON.stringify(t,((e,t)=>(0,G.isPlainObject)(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))})`,X=require("@reduxjs/toolkit"),Z=require("reselect");function ee(...e){return function(t){const n=(0,Z.defaultMemoize)((e=>{var n,r;return null==(r=t.extractRehydrationInfo)?void 0:r.call(t,e,{reducerPath:null!=(n=t.reducerPath)?n:"api"})})),r={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,...t,extractRehydrationInfo:n,serializeQueryArgs(e){let n=Y;if("serializeQueryArgs"in e.endpointDefinition){const t=e.endpointDefinition.serializeQueryArgs;n=e=>{const n=t(e);return"string"==typeof n?n:Y({...e,queryArgs:n})}}else t.serializeQueryArgs&&(n=t.serializeQueryArgs);return n(e)},tagTypes:[...t.tagTypes||[]]},i={endpointDefinitions:{},batch(e){e()},apiUid:(0,X.nanoid)(),extractRehydrationInfo:n,hasRehydrationInfo:(0,Z.defaultMemoize)((e=>null!=n(e)))},a={injectEndpoints:function(e){const t=e.endpoints({query:e=>({...e,type:"query"}),mutation:e=>({...e,type:"mutation"})});for(const[n,r]of Object.entries(t))if(e.overrideExisting||!(n in i.endpointDefinitions)){i.endpointDefinitions[n]=r;for(const e of o)e.injectEndpoint(n,r)}return a},enhanceEndpoints({addTagTypes:e,endpoints:t}){if(e)for(const t of e)r.tagTypes.includes(t)||r.tagTypes.push(t);if(t)for(const[e,n]of Object.entries(t))"function"==typeof n?n(i.endpointDefinitions[e]):Object.assign(i.endpointDefinitions[e]||{},n);return a}},o=e.map((e=>e.init(a,r,i)));return a.injectEndpoints({endpoints:t.endpoints})}}function te(){return function(){throw new Error("When using `fakeBaseQuery`, all queries & mutations must use the `queryFn` definition syntax.")}}var ne,re=require("@reduxjs/toolkit"),ie=({reducerPath:e,api:t,context:n,internalState:r})=>{const{removeQueryResult:i,unsubscribeQueryResult:a}=t.internalActions;function o(e){const t=r.currentSubscriptions[e];return!!t&&!function(e){for(let t in e)return!1;return!0}(t)}const s={};function u(e,t,r,a){var u;const c=n.endpointDefinitions[t],l=null!=(u=null==c?void 0:c.keepUnusedDataFor)?u:a.keepUnusedDataFor;if(Infinity===l)return;const d=Math.max(0,Math.min(l,2147482.647));if(!o(e)){const t=s[e];t&&clearTimeout(t),s[e]=setTimeout((()=>{o(e)||r.dispatch(i({queryCacheKey:e})),delete s[e]}),1e3*d)}}return(r,i,o)=>{var c;if(a.match(r)){const t=i.getState()[e],{queryCacheKey:n}=r.payload;u(n,null==(c=t.queries[n])?void 0:c.endpointName,i,t.config)}if(t.util.resetApiState.match(r))for(const[e,t]of Object.entries(s))t&&clearTimeout(t),delete s[e];if(n.hasRehydrationInfo(r)){const t=i.getState()[e],{queries:a}=n.extractRehydrationInfo(r);for(const[e,n]of Object.entries(a))u(e,null==n?void 0:n.endpointName,i,t.config)}}},ae=require("@reduxjs/toolkit"),oe=({reducerPath:e,context:t,context:{endpointDefinitions:n},mutationThunk:r,api:i,assertTagType:a,refetchQuery:o})=>{const{removeQueryResult:s}=i.internalActions,u=(0,ae.isAnyOf)((0,ae.isFulfilled)(r),(0,ae.isRejectedWithValue)(r));function c(n,r){const a=r.getState(),u=a[e],c=i.util.selectInvalidatedBy(a,n);t.batch((()=>{var e;const t=Array.from(c.values());for(const{queryCacheKey:n}of t){const t=u.queries[n],i=null!=(e=u.subscriptions[n])?e:{};t&&(0===Object.keys(i).length?r.dispatch(s({queryCacheKey:n})):"uninitialized"!==t.status&&r.dispatch(o(t,n)))}}))}return(e,t)=>{u(e)&&c(F(e,"invalidatesTags",n,a),t),i.util.invalidateTags.match(e)&&c(x(e.payload,void 0,void 0,void 0,void 0,a),t)}},se=({reducerPath:e,queryThunk:t,api:n,refetchQuery:r,internalState:i})=>{const a={};function o({queryCacheKey:t},n){const o=n.getState()[e].queries[t];if(!o||"uninitialized"===o.status)return;const s=c(i.currentSubscriptions[t]);if(!Number.isFinite(s))return;const u=a[t];(null==u?void 0:u.timeout)&&(clearTimeout(u.timeout),u.timeout=void 0);const l=Date.now()+s,d=a[t]={nextPollTimestamp:l,pollingInterval:s,timeout:setTimeout((()=>{d.timeout=void 0,n.dispatch(r(o,t))}),s)}}function s({queryCacheKey:t},n){const r=n.getState()[e].queries[t];if(!r||"uninitialized"===r.status)return;const s=c(i.currentSubscriptions[t]);if(!Number.isFinite(s))return void u(t);const l=a[t],d=Date.now()+s;(!l||d<l.nextPollTimestamp)&&o({queryCacheKey:t},n)}function u(e){const t=a[e];(null==t?void 0:t.timeout)&&clearTimeout(t.timeout),delete a[e]}function c(e={}){let t=Number.POSITIVE_INFINITY;for(let n in e)e[n].pollingInterval&&(t=Math.min(e[n].pollingInterval,t));return t}return(e,r)=>{(n.internalActions.updateSubscriptionOptions.match(e)||n.internalActions.unsubscribeQueryResult.match(e))&&s(e.payload,r),(t.pending.match(e)||t.rejected.match(e)&&e.meta.condition)&&s(e.meta.arg,r),(t.fulfilled.match(e)||t.rejected.match(e)&&!e.meta.condition)&&o(e.meta.arg,r),n.util.resetApiState.match(e)&&function(){for(const e of Object.keys(a))u(e)}()}},ue=require("@reduxjs/toolkit"),ce=new Error("Promise never resolved before cacheEntryRemoved."),le=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:i})=>{const a=(0,ue.isAsyncThunkAction)(r),o=(0,ue.isAsyncThunkAction)(i),s=(0,ue.isFulfilled)(r,i),u={};function c(t,r,i,a,o){const s=n.endpointDefinitions[t],c=null==s?void 0:s.onCacheEntryAdded;if(!c)return;let l={};const d=new Promise((e=>{l.cacheEntryRemoved=e})),f=Promise.race([new Promise((e=>{l.valueResolved=e})),d.then((()=>{throw ce}))]);f.catch((()=>{})),u[i]=l;const p=e.endpoints[t].select("query"===s.type?r:i),y=a.dispatch(((e,t,n)=>n)),h={...a,getCacheEntry:()=>p(a.getState()),requestId:o,extra:y,updateCachedData:"query"===s.type?n=>a.dispatch(e.util.updateQueryData(t,r,n)):void 0,cacheDataLoaded:f,cacheEntryRemoved:d},m=c(r,h);Promise.resolve(m).catch((e=>{if(e!==ce)throw e}))}return(n,l,d)=>{const f=function(t){return a(t)?t.meta.arg.queryCacheKey:o(t)?t.meta.requestId:e.internalActions.removeQueryResult.match(t)?t.payload.queryCacheKey:e.internalActions.removeMutationResult.match(t)?U(t.payload):""}(n);if(r.pending.match(n)){const e=d[t].queries[f],r=l.getState()[t].queries[f];!e&&r&&c(n.meta.arg.endpointName,n.meta.arg.originalArgs,f,l,n.meta.requestId)}else if(i.pending.match(n))l.getState()[t].mutations[f]&&c(n.meta.arg.endpointName,n.meta.arg.originalArgs,f,l,n.meta.requestId);else if(s(n)){const e=u[f];(null==e?void 0:e.valueResolved)&&(e.valueResolved({data:n.payload,meta:n.meta.baseQueryMeta}),delete e.valueResolved)}else if(e.internalActions.removeQueryResult.match(n)||e.internalActions.removeMutationResult.match(n)){const e=u[f];e&&(delete u[f],e.cacheEntryRemoved())}else if(e.util.resetApiState.match(n))for(const[e,t]of Object.entries(u))delete u[e],t.cacheEntryRemoved()}},de=require("@reduxjs/toolkit"),fe=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const i=(0,de.isPending)(n,r),a=(0,de.isRejected)(n,r),o=(0,de.isFulfilled)(n,r),s={};return(n,r)=>{var u,c,l;if(i(n)){const{requestId:i,arg:{endpointName:a,originalArgs:o}}=n.meta,u=t.endpointDefinitions[a],c=null==u?void 0:u.onQueryStarted;if(c){const t={},n=new Promise(((e,n)=>{t.resolve=e,t.reject=n}));n.catch((()=>{})),s[i]=t;const l=e.endpoints[a].select("query"===u.type?o:i),d=r.dispatch(((e,t,n)=>n)),f={...r,getCacheEntry:()=>l(r.getState()),requestId:i,extra:d,updateCachedData:"query"===u.type?t=>r.dispatch(e.util.updateQueryData(a,o,t)):void 0,queryFulfilled:n};c(o,f)}}else if(o(n)){const{requestId:e,baseQueryMeta:t}=n.meta;null==(u=s[e])||u.resolve({data:n.payload,meta:t}),delete s[e]}else if(a(n)){const{requestId:e,rejectedWithValue:t,baseQueryMeta:r}=n.meta;null==(l=s[e])||l.reject({error:null!=(c=n.payload)?c:n.error,isUnhandledError:!t,meta:r}),delete s[e]}}},pe=({api:e,context:{apiUid:t}})=>(n,r)=>{e.util.resetApiState.match(n)&&r.dispatch(e.internalActions.middlewareRegistered(t))},ye=require("immer"),he="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis):e=>(ne||(ne=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0)));function me(e,...t){Object.assign(e,...t)}var ge=require("immer"),ve=Symbol(),be=()=>({name:ve,init(e,{baseQuery:t,reducerPath:n,serializeQueryArgs:r,keepUnusedDataFor:i,refetchOnMountOrArgChange:a,refetchOnFocus:o,refetchOnReconnect:u},l){(0,ge.enablePatches)();const d=e=>e;Object.assign(e,{reducerPath:n,endpoints:{},internalActions:{onOnline:O,onOffline:T,onFocus:S,onFocusLost:A},util:{}});const{queryThunk:f,mutationThunk:p,patchQueryData:y,updateQueryData:h,upsertQueryData:g,prefetch:v,buildMatchThunkActions:b}=function({reducerPath:e,baseQuery:t,context:{endpointDefinitions:n},serializeQueryArgs:r,api:i}){const a=async(e,{signal:r,abort:i,rejectWithValue:a,fulfillWithValue:s,dispatch:u,getState:c,extra:l})=>{const d=n[e.endpointName];try{let n,a=E;const f={signal:r,abort:i,dispatch:u,getState:c,extra:l,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?o(e,c()):void 0},p="query"===e.type?e[P]:void 0;if(p?n=p():d.query?(n=await t(d.query(e.originalArgs),f,d.extraOptions),d.transformResponse&&(a=d.transformResponse)):n=await d.queryFn(e.originalArgs,f,d.extraOptions,(e=>t(e,f,d.extraOptions))),n.error)throw new m(n.error,n.meta);return s(await a(n.data,n.meta,e.originalArgs),{fulfilledTimeStamp:Date.now(),baseQueryMeta:n.meta,[K.SHOULD_AUTOBATCH]:!0})}catch(t){let n=t;if(n instanceof m){let t=E;d.query&&d.transformErrorResponse&&(t=d.transformErrorResponse);try{return a(await t(n.value,n.meta,e.originalArgs),{baseQueryMeta:n.meta,[K.SHOULD_AUTOBATCH]:!0})}catch(e){n=e}}throw console.error(n),n}};function o(t,n){var r,i,a,o;const s=null==(i=null==(r=n[e])?void 0:r.queries)?void 0:i[t.queryCacheKey],u=null==(a=n[e])?void 0:a.config.refetchOnMountOrArgChange,c=null==s?void 0:s.fulfilledTimeStamp,l=null!=(o=t.forceRefetch)?o:t.subscribe&&u;return!!l&&(!0===l||(Number(new Date)-Number(c))/1e3>=l)}function s(e){return t=>{var n,r;return(null==(r=null==(n=null==t?void 0:t.meta)?void 0:n.arg)?void 0:r.endpointName)===e}}return{queryThunk:(0,K.createAsyncThunk)(`${e}/executeQuery`,a,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[K.SHOULD_AUTOBATCH]:!0}),condition(t,{getState:r}){var i,a,s;const u=r(),c=null==(a=null==(i=u[e])?void 0:i.queries)?void 0:a[t.queryCacheKey],l=null==c?void 0:c.fulfilledTimeStamp,d=t.originalArgs,f=null==c?void 0:c.originalArgs,p=n[t.endpointName];return!(!M(t)&&("pending"===(null==c?void 0:c.status)||!o(t,u)&&(!k(p)||!(null==(s=null==p?void 0:p.forceRefetch)?void 0:s.call(p,{currentArg:d,previousArg:f,endpointState:c,state:u})))&&l))},dispatchConditionRejection:!0}),mutationThunk:(0,K.createAsyncThunk)(`${e}/executeMutation`,a,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[K.SHOULD_AUTOBATCH]:!0})}),prefetch:(e,t,n)=>(r,a)=>{const o=(e=>"force"in e)(n)&&n.force,s=(e=>"ifOlderThan"in e)(n)&&n.ifOlderThan,u=(n=!0)=>i.endpoints[e].initiate(t,{forceRefetch:n}),c=i.endpoints[e].select(t)(a());if(o)r(u());else if(s){const e=null==c?void 0:c.fulfilledTimeStamp;if(!e)return void r(u());(Number(new Date)-Number(new Date(e)))/1e3>=s&&r(u())}else r(u(!1))},updateQueryData:(e,t,n)=>(r,a)=>{const o=i.endpoints[e].select(t)(a());let s={patches:[],inversePatches:[],undo:()=>r(i.util.patchQueryData(e,t,s.inversePatches))};if("uninitialized"===o.status)return s;if("data"in o)if((0,N.isDraftable)(o.data)){const[,e,t]=(0,N.produceWithPatches)(o.data,n);s.patches.push(...e),s.inversePatches.push(...t)}else{const e=n(o.data);s.patches.push({op:"replace",path:[],value:e}),s.inversePatches.push({op:"replace",path:[],value:o.data})}return r(i.util.patchQueryData(e,t,s.patches)),s},upsertQueryData:(e,t,n)=>r=>r(i.endpoints[e].initiate(t,{subscribe:!1,forceRefetch:!0,[P]:()=>({data:n})})),patchQueryData:(e,t,a)=>o=>{o(i.internalActions.queryResultPatched({queryCacheKey:r({queryArgs:t,endpointDefinition:n[e],endpointName:e}),patches:a}))},buildMatchThunkActions:function(e,t){return{matchPending:(0,D.isAllOf)((0,D.isPending)(e),s(t)),matchFulfilled:(0,D.isAllOf)((0,D.isFulfilled)(e),s(t)),matchRejected:(0,D.isAllOf)((0,D.isRejected)(e),s(t))}}}}({baseQuery:t,reducerPath:n,context:l,api:e,serializeQueryArgs:r}),{reducer:q,actions:R}=function({reducerPath:e,queryThunk:t,mutationThunk:n,context:{endpointDefinitions:r,apiUid:i,extractRehydrationInfo:a,hasRehydrationInfo:o},assertTagType:s,config:u}){const l=(0,C.createAction)(`${e}/resetApiState`),d=(0,C.createSlice)({name:`${e}/queries`,initialState:$,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t]},prepare:(0,C.prepareAutoBatched)()},queryResultPatched(e,{payload:{queryCacheKey:t,patches:n}}){z(e,t,(e=>{e.data=(0,_.applyPatches)(e.data,n.concat())}))}},extraReducers(e){e.addCase(t.pending,((e,{meta:t,meta:{arg:n}})=>{var r;const i=M(n);(n.subscribe||i)&&(null!=e[r=n.queryCacheKey]||(e[r]={status:"uninitialized",endpointName:n.endpointName})),z(e,n.queryCacheKey,(e=>{e.status="pending",e.requestId=i&&e.requestId?e.requestId:t.requestId,void 0!==n.originalArgs&&(e.originalArgs=n.originalArgs),e.startedTimeStamp=t.startedTimeStamp}))})).addCase(t.fulfilled,((e,{meta:t,payload:n})=>{z(e,t.arg.queryCacheKey,(e=>{var i;if(e.requestId!==t.requestId&&!M(t.arg))return;const{merge:a}=r[t.arg.endpointName];if(e.status="fulfilled",a)if(void 0!==e.data){const{fulfilledTimeStamp:r,arg:i,baseQueryMeta:o,requestId:s}=t;let u=(0,C.createNextState)(e.data,(e=>a(e,n,{arg:i.originalArgs,baseQueryMeta:o,fulfilledTimeStamp:r,requestId:s})));e.data=u}else e.data=n;else e.data=null==(i=r[t.arg.endpointName].structuralSharing)||i?c(e.data,n):n;delete e.error,e.fulfilledTimeStamp=t.fulfilledTimeStamp}))})).addCase(t.rejected,((e,{meta:{condition:t,arg:n,requestId:r},error:i,payload:a})=>{z(e,n.queryCacheKey,(e=>{if(t);else{if(e.requestId!==r)return;e.status="rejected",e.error=null!=a?a:i}}))})).addMatcher(o,((e,t)=>{const{queries:n}=a(t);for(const[t,r]of Object.entries(n))"fulfilled"!==(null==r?void 0:r.status)&&"rejected"!==(null==r?void 0:r.status)||(e[t]=r)}))}}),f=(0,C.createSlice)({name:`${e}/mutations`,initialState:$,reducers:{removeMutationResult:{reducer(e,{payload:t}){const n=U(t);n in e&&delete e[n]},prepare:(0,C.prepareAutoBatched)()}},extraReducers(e){e.addCase(n.pending,((e,{meta:t,meta:{requestId:n,arg:r,startedTimeStamp:i}})=>{r.track&&(e[U(t)]={requestId:n,status:"pending",endpointName:r.endpointName,startedTimeStamp:i})})).addCase(n.fulfilled,((e,{payload:t,meta:n})=>{n.arg.track&&L(e,n,(e=>{e.requestId===n.requestId&&(e.status="fulfilled",e.data=t,e.fulfilledTimeStamp=n.fulfilledTimeStamp)}))})).addCase(n.rejected,((e,{payload:t,error:n,meta:r})=>{r.arg.track&&L(e,r,(e=>{e.requestId===r.requestId&&(e.status="rejected",e.error=null!=t?t:n)}))})).addMatcher(o,((e,t)=>{const{mutations:n}=a(t);for(const[t,r]of Object.entries(n))"fulfilled"!==(null==r?void 0:r.status)&&"rejected"!==(null==r?void 0:r.status)||t===(null==r?void 0:r.requestId)||(e[t]=r)}))}}),p=(0,C.createSlice)({name:`${e}/invalidation`,initialState:$,reducers:{},extraReducers(e){e.addCase(d.actions.removeQueryResult,((e,{payload:{queryCacheKey:t}})=>{for(const n of Object.values(e))for(const e of Object.values(n)){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}})).addMatcher(o,((e,t)=>{var n,r,i,o;const{provided:s}=a(t);for(const[t,a]of Object.entries(s))for(const[s,u]of Object.entries(a)){const a=null!=(o=(r=null!=(n=e[t])?n:e[t]={})[i=s||"__internal_without_id"])?o:r[i]=[];for(const e of u)a.includes(e)||a.push(e)}})).addMatcher((0,C.isAnyOf)((0,C.isFulfilled)(t),(0,C.isRejectedWithValue)(t)),((e,t)=>{var n,i,a,o;const u=F(t,"providesTags",r,s),{queryCacheKey:c}=t.meta.arg;for(const t of Object.values(e))for(const e of Object.values(t)){const t=e.indexOf(c);-1!==t&&e.splice(t,1)}for(const{type:t,id:r}of u){const s=null!=(o=(i=null!=(n=e[t])?n:e[t]={})[a=r||"__internal_without_id"])?o:i[a]=[];s.includes(c)||s.push(c)}}))}}),y=(0,C.createSlice)({name:`${e}/subscriptions`,initialState:$,reducers:{updateSubscriptionOptions(e,t){},unsubscribeQueryResult(e,t){},internal_probeSubscription(e,t){}}}),h=(0,C.createSlice)({name:`${e}/internalSubscriptions`,initialState:$,reducers:{subscriptionsUpdated:(e,t)=>(0,_.applyPatches)(e,t.payload)}}),m=(0,C.createSlice)({name:`${e}/config`,initialState:{online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine,focused:"undefined"==typeof document||"hidden"!==document.visibilityState,middlewareRegistered:!1,...u},reducers:{middlewareRegistered(e,{payload:t}){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&i===t||"conflict"}},extraReducers:e=>{e.addCase(O,(e=>{e.online=!0})).addCase(T,(e=>{e.online=!1})).addCase(S,(e=>{e.focused=!0})).addCase(A,(e=>{e.focused=!1})).addMatcher(o,(e=>({...e})))}}),g=(0,C.combineReducers)({queries:d.reducer,mutations:f.reducer,provided:p.reducer,subscriptions:h.reducer,config:m.reducer});return{reducer:(e,t)=>g(l.match(t)?void 0:e,t),actions:{...m.actions,...d.actions,...y.actions,...h.actions,...f.actions,unsubscribeMutationResult:f.actions.removeMutationResult,resetApiState:l}}}({context:l,queryThunk:f,mutationThunk:p,reducerPath:n,assertTagType:d,config:{refetchOnFocus:o,refetchOnReconnect:u,refetchOnMountOrArgChange:a,keepUnusedDataFor:i,reducerPath:n}});me(e.util,{patchQueryData:y,updateQueryData:h,upsertQueryData:g,prefetch:v,resetApiState:R.resetApiState}),me(e.internalActions,R);const{middleware:w,actions:x}=function(e){const{reducerPath:t,queryThunk:n,api:r,context:i}=e,{apiUid:a}=i,o={invalidateTags:(0,re.createAction)(`${t}/invalidateTags`)},s=[pe,ie,oe,se,le,fe];return{middleware:n=>{let o=!1;const c={...e,internalState:{currentSubscriptions:{}},refetchQuery:u},l=s.map((e=>e(c))),d=(({api:e,queryThunk:t,internalState:n})=>{const r=`${e.reducerPath}/subscriptions`;let i=null,a=!1;const{updateSubscriptionOptions:o,unsubscribeQueryResult:s}=e.internalActions;return(u,c)=>{var l,d;if(i||(i=JSON.parse(JSON.stringify(n.currentSubscriptions))),e.internalActions.internal_probeSubscription.match(u)){const{queryCacheKey:e,requestId:t}=u.payload;return[!1,!!(null==(l=n.currentSubscriptions[e])?void 0:l[t])]}const f=((n,r)=>{var i,a,u,c,l,d,f,p,y;if(o.match(r)){const{queryCacheKey:e,requestId:t,options:a}=r.payload;return(null==(i=null==n?void 0:n[e])?void 0:i[t])&&(n[e][t]=a),!0}if(s.match(r)){const{queryCacheKey:e,requestId:t}=r.payload;return n[e]&&delete n[e][t],!0}if(e.internalActions.removeQueryResult.match(r))return delete n[r.payload.queryCacheKey],!0;if(t.pending.match(r)){const{meta:{arg:e,requestId:t}}=r;if(e.subscribe){const r=null!=(u=n[a=e.queryCacheKey])?u:n[a]={};return r[t]=null!=(l=null!=(c=e.subscriptionOptions)?c:r[t])?l:{},!0}}if(t.rejected.match(r)){const{meta:{condition:e,arg:t,requestId:i}}=r;if(e&&t.subscribe){const e=null!=(f=n[d=t.queryCacheKey])?f:n[d]={};return e[i]=null!=(y=null!=(p=t.subscriptionOptions)?p:e[i])?y:{},!0}}return!1})(n.currentSubscriptions,u);if(f){a||(he((()=>{const t=JSON.parse(JSON.stringify(n.currentSubscriptions)),[,r]=(0,ye.produceWithPatches)(i,(()=>t));c.next(e.internalActions.subscriptionsUpdated(r)),i=t,a=!1})),a=!0);const o=!!(null==(d=u.type)?void 0:d.startsWith(r)),s=t.rejected.match(u)&&u.meta.condition&&!!u.meta.arg.subscribe;return[!o&&!s,!1]}return[!0,!1]}})(c),f=(({reducerPath:e,context:t,api:n,refetchQuery:r,internalState:i})=>{const{removeQueryResult:a}=n.internalActions;function o(n,o){const s=n.getState()[e],u=s.queries,c=i.currentSubscriptions;t.batch((()=>{for(const e of Object.keys(c)){const t=u[e],i=c[e];i&&t&&(Object.values(i).some((e=>!0===e[o]))||Object.values(i).every((e=>void 0===e[o]))&&s.config[o])&&(0===Object.keys(i).length?n.dispatch(a({queryCacheKey:e})):"uninitialized"!==t.status&&n.dispatch(r(t,e)))}}))}return(e,t)=>{S.match(e)&&o(t,"refetchOnFocus"),O.match(e)&&o(t,"refetchOnReconnect")}})(c);return e=>s=>{o||(o=!0,n.dispatch(r.internalActions.middlewareRegistered(a)));const u={...n,next:e},c=n.getState(),[p,y]=d(s,u,c);let h;if(h=p?e(s):y,n.getState()[t]&&(f(s,u,c),(e=>!!e&&"string"==typeof e.type&&e.type.startsWith(`${t}/`))(s)||i.hasRehydrationInfo(s)))for(let e of l)e(s,u,c);return h}},actions:o};function u(e,t,r={}){return n({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t,...r})}}({reducerPath:n,context:l,queryThunk:f,mutationThunk:p,api:e,assertTagType:d});me(e.util,x),me(e,{reducer:q,middleware:w});const{buildQuerySelector:B,buildMutationSelector:H,selectInvalidatedBy:G}=function({serializeQueryArgs:e,reducerPath:t}){const n=e=>J,r=e=>V;return{buildQuerySelector:function(t,r){return o=>{const s=e({queryArgs:o,endpointDefinition:r,endpointName:t});return(0,j.createSelector)(o===W?n:e=>{var t,n,r;return null!=(r=null==(n=null==(t=a(e))?void 0:t.queries)?void 0:n[s])?r:J},i)}},buildMutationSelector:function(){return e=>{var t;let n;return n="object"==typeof e?null!=(t=U(e))?t:W:e,(0,j.createSelector)(n===W?r:e=>{var t,r,i;return null!=(i=null==(r=null==(t=a(e))?void 0:t.mutations)?void 0:r[n])?i:V},i)}},selectInvalidatedBy:function(e,n){var r;const i=e[t],a=new Set;for(const e of n.map(Q)){const t=i.provided[e.type];if(!t)continue;let n=null!=(r=void 0!==e.id?t[e.id]:s(Object.values(t)))?r:[];for(const e of n)a.add(e)}return s(Array.from(a.values()).map((e=>{const t=i.queries[e];return t?[{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}]:[]})))}};function i(e){return{...e,...(t=e.status,{status:t,isUninitialized:"uninitialized"===t,isLoading:"pending"===t,isSuccess:"fulfilled"===t,isError:"rejected"===t})};var t}function a(e){return e[t]}}({serializeQueryArgs:r,reducerPath:n});me(e.util,{selectInvalidatedBy:G});const{buildInitiateQuery:Y,buildInitiateMutation:X,getRunningMutationThunk:Z,getRunningMutationsThunk:ee,getRunningQueriesThunk:te,getRunningQueryThunk:ne,getRunningOperationPromises:ae,removalWarning:ue}=function({serializeQueryArgs:e,queryThunk:t,mutationThunk:n,api:r,context:i}){const a=new Map,o=new Map,{unsubscribeQueryResult:s,removeMutationResult:u,updateSubscriptionOptions:c}=r.internalActions;return{buildInitiateQuery:function(n,i){const o=(u,{subscribe:l=!0,forceRefetch:d,subscriptionOptions:f,[P]:p}={})=>(y,h)=>{var m;const g=e({queryArgs:u,endpointDefinition:i,endpointName:n}),v=t({type:"query",subscribe:l,forceRefetch:d,subscriptionOptions:f,endpointName:n,originalArgs:u,queryCacheKey:g,[P]:p}),b=r.endpoints[n].select(u),q=y(v),S=b(h()),{requestId:A,abort:O}=q,T=S.requestId!==A,R=null==(m=a.get(y))?void 0:m[g],w=()=>b(h()),j=Object.assign(p?q.then(w):T&&!R?Promise.resolve(S):Promise.all([R,q]).then(w),{arg:u,requestId:A,subscriptionOptions:f,queryCacheKey:g,abort:O,async unwrap(){const e=await j;if(e.isError)throw e.error;return e.data},refetch:()=>y(o(u,{subscribe:!1,forceRefetch:!0})),unsubscribe(){l&&y(s({queryCacheKey:g,requestId:A}))},updateSubscriptionOptions(e){j.subscriptionOptions=e,y(c({endpointName:n,requestId:A,queryCacheKey:g,options:e}))}});if(!R&&!T&&!p){const e=a.get(y)||{};e[g]=j,a.set(y,e),j.then((()=>{delete e[g],Object.keys(e).length||a.delete(y)}))}return j};return o},buildInitiateMutation:function(e){return(t,{track:r=!0,fixedCacheKey:i}={})=>(a,s)=>{const c=n({type:"mutation",endpointName:e,originalArgs:t,track:r,fixedCacheKey:i}),l=a(c),{requestId:d,abort:f,unwrap:p}=l,y=l.unwrap().then((e=>({data:e}))).catch((e=>({error:e}))),h=()=>{a(u({requestId:d,fixedCacheKey:i}))},m=Object.assign(y,{arg:l.arg,requestId:d,abort:f,unwrap:p,unsubscribe:h,reset:h}),g=o.get(a)||{};return o.set(a,g),g[d]=m,m.then((()=>{delete g[d],Object.keys(g).length||o.delete(a)})),i&&(g[i]=m,m.then((()=>{g[i]===m&&(delete g[i],Object.keys(g).length||o.delete(a))}))),m}},getRunningQueryThunk:function(t,n){return r=>{var o;const s=e({queryArgs:n,endpointDefinition:i.endpointDefinitions[t],endpointName:t});return null==(o=a.get(r))?void 0:o[s]}},getRunningMutationThunk:function(e,t){return e=>{var n;return null==(n=o.get(e))?void 0:n[t]}},getRunningQueriesThunk:function(){return e=>Object.values(a.get(e)||{}).filter(I)},getRunningMutationsThunk:function(){return e=>Object.values(o.get(e)||{}).filter(I)},getRunningOperationPromises:function(){{const e=e=>Array.from(e.values()).flatMap((e=>e?Object.values(e):[]));return[...e(a),...e(o)].filter(I)}},removalWarning:function(){throw new Error("This method had to be removed due to a conceptual bug in RTK.\n Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details.\n See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR.")}}}({queryThunk:f,mutationThunk:p,api:e,serializeQueryArgs:r,context:l});return me(e.util,{getRunningOperationPromises:ae,getRunningOperationPromise:ue,getRunningMutationThunk:Z,getRunningMutationsThunk:ee,getRunningQueryThunk:ne,getRunningQueriesThunk:te}),{name:ve,injectEndpoint(t,n){var r;const i=e;null!=(r=i.endpoints)[t]||(r[t]={}),k(n)?me(i.endpoints[t],{name:t,select:B(t,n),initiate:Y(t,n)},b(f,t)):"mutation"===n.type&&me(i.endpoints[t],{name:t,select:H(),initiate:X(t)},b(p,t))}}}}),qe=ee(be());
//# sourceMappingURL=rtk-query.cjs.production.min.js.map

@@ -1,2 +0,2 @@

var e,t,n=Object.defineProperty,r=Object.defineProperties,i=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,u=(e,t,r)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,c=(e,t)=>{for(var n in t||(t={}))o.call(t,n)&&u(e,n,t[n]);if(a)for(var n of a(t))s.call(t,n)&&u(e,n,t[n]);return e},l=(e,t)=>r(e,i(t)),d=(e,t)=>{var n={};for(var r in e)o.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&a)for(var r of a(e))t.indexOf(r)<0&&s.call(e,r)&&(n[r]=e[r]);return n};(t=e||(e={})).uninitialized="uninitialized",t.pending="pending",t.fulfilled="fulfilled",t.rejected="rejected";var f=e=>[].concat(...e);import{isPlainObject as p}from"@reduxjs/toolkit";var m=p;function y(e,t){if(e===t||!(m(e)&&m(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),r=Object.keys(e);let i=n.length===r.length;const a=Array.isArray(t)?[]:{};for(const r of n)a[r]=y(e[r],t[r]),i&&(i=e[r]===a[r]);return i?e:a}import{isPlainObject as h}from"@reduxjs/toolkit";var g=(...e)=>fetch(...e),v=e=>e.status>=200&&e.status<=299,b=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function q(e){if(!h(e))return e;const t=c({},e);for(const[e,n]of Object.entries(t))void 0===n&&delete t[e];return t}function S(e={}){var t=e,{baseUrl:n,prepareHeaders:r=(e=>e),fetchFn:i=g,paramsSerializer:a,isJsonContentType:o=b,jsonContentType:s="application/json",timeout:u,validateStatus:f}=t,p=d(t,["baseUrl","prepareHeaders","fetchFn","paramsSerializer","isJsonContentType","jsonContentType","timeout","validateStatus"]);return"undefined"==typeof fetch&&i===g&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(e,t)=>{const{signal:y,getState:g,extra:b,endpoint:S,forced:O,type:R}=t;let T,w="string"==typeof e?{url:e}:e,{url:j,method:A="GET",headers:k=new Headers(p.headers),body:x,params:Q,responseHandler:I="json",validateStatus:C=(null!=f?f:v),timeout:P=u}=w,M=d(w,["url","method","headers","body","params","responseHandler","validateStatus","timeout"]),D=c(l(c({},p),{method:A,signal:y,body:x}),M);k=new Headers(q(k)),D.headers=await r(k,{getState:g,extra:b,endpoint:S,forced:O,type:R})||k;const N=e=>"object"==typeof e&&(h(e)||Array.isArray(e)||"function"==typeof e.toJSON);if(!D.headers.has("content-type")&&N(x)&&D.headers.set("content-type",s),N(x)&&o(D.headers)&&(D.body=JSON.stringify(x)),Q){const e=~j.indexOf("?")?"&":"?";j+=e+(a?a(Q):new URLSearchParams(q(Q)))}j=function(e,t){if(!e)return t;if(!t)return e;if(function(e){return new RegExp("(^|:)//").test(e)}(t))return t;const n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=(e=>e.replace(/\/$/,""))(e),`${e}${n}${t=(e=>e.replace(/^\//,""))(t)}`}(n,j);const E=new Request(j,D);T={request:E.clone()};let K,F=!1,z=P&&setTimeout((()=>{F=!0,t.abort()}),P);try{K=await i(E)}catch(e){return{error:{status:F?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(e)},meta:T}}finally{z&&clearTimeout(z)}const _=K.clone();let $;T.response=_;let U="";try{let e;if(await Promise.all([m(K,I).then((e=>$=e),(t=>e=t)),_.text().then((e=>U=e),(()=>{}))]),e)throw e}catch(e){return{error:{status:"PARSING_ERROR",originalStatus:K.status,data:U,error:String(e)},meta:T}}return C(K,$)?{data:$,meta:T}:{error:{status:K.status,data:$},meta:T}};async function m(e,t){if("function"==typeof t)return t(e);if("content-type"===t&&(t=o(e.headers)?"json":"text"),"json"===t){const t=await e.text();return t.length?JSON.parse(t):null}return e.text()}}var O=class{constructor(e,t){this.value=e,this.meta=t}};async function R(e=0,t=5){const n=Math.min(e,t),r=~~((Math.random()+.4)*(300<<n));await new Promise((e=>setTimeout((t=>e(t)),r)))}var T={},w=Object.assign(((e,t)=>async(n,r,i)=>{const a=[5,(t||T).maxRetries,(i||T).maxRetries].filter((e=>void 0!==e)),[o]=a.slice(-1),s=c(c({maxRetries:o,backoff:R,retryCondition:(e,t,{attempt:n})=>n<=o},t),i);let u=0;for(;;)try{const t=await e(n,r,i);if(t.error)throw new O(t);return t}catch(e){if(u++,e.throwImmediately){if(e instanceof O)return e.value;throw e}if(e instanceof O&&!s.retryCondition(e.value.error,n,{attempt:u,baseQueryApi:r,extraOptions:i}))return e.value;await s.backoff(u,s.maxRetries)}}),{fail:function(e){throw Object.assign(new O({error:e}),{throwImmediately:!0})}});import{createAction as j}from"@reduxjs/toolkit";var A,k,x=j("__rtkq/focused"),Q=j("__rtkq/unfocused"),I=j("__rtkq/online"),C=j("__rtkq/offline"),P=!1;function M(e,t){return t?t(e,{onFocus:x,onFocusLost:Q,onOffline:C,onOnline:I}):function(){const t=()=>e(x()),n=()=>e(I()),r=()=>e(C()),i=()=>{"visible"===window.document.visibilityState?t():e(Q())};return P||"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("visibilitychange",i,!1),window.addEventListener("focus",t,!1),window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),P=!0),()=>{window.removeEventListener("focus",t),window.removeEventListener("visibilitychange",i),window.removeEventListener("online",n),window.removeEventListener("offline",r),P=!1}}()}import{createNextState as D,createSelector as N}from"@reduxjs/toolkit";function E(e){return e.type===A.query}function K(e,t,n,r,i,a){return"function"==typeof e?e(t,n,r,i).map(F).map(a):Array.isArray(e)?e.map(F).map(a):[]}function F(e){return"string"==typeof e?{type:e}:e}(k=A||(A={})).query="query",k.mutation="mutation";import{combineReducers as z,createAction as _,createSlice as $,isAnyOf as U,isFulfilled as L,isRejectedWithValue as W,createNextState as J,prepareAutoBatched as H}from"@reduxjs/toolkit";function B(e){return null!=e}var V=Symbol("forceQueryFn"),G=e=>"function"==typeof e[V];import{isAllOf as Y,isFulfilled as X,isPending as Z,isRejected as ee,isRejectedWithValue as te}from"@reduxjs/toolkit";import{isDraftable as ne,produceWithPatches as re}from"immer";import{createAsyncThunk as ie,SHOULD_AUTOBATCH as ae}from"@reduxjs/toolkit";function oe(e){return e}function se(e,t,n,r){return K(n[e.meta.arg.endpointName][t],X(e)?e.payload:void 0,te(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}import{applyPatches as ue}from"immer";function ce(e,t,n){const r=e[t];r&&n(r)}function le(e){var t;return null!=(t="arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)?t:e.requestId}function de(e,t,n){const r=e[le(t)];r&&n(r)}var fe={},pe=Symbol.for("RTKQ/skipToken"),me=pe,ye={status:e.uninitialized},he=D(ye,(()=>{})),ge=D(ye,(()=>{}));import{isPlainObject as ve}from"@reduxjs/toolkit";var be=({endpointName:e,queryArgs:t})=>`${e}(${JSON.stringify(t,((e,t)=>ve(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))})`;import{nanoid as qe}from"@reduxjs/toolkit";import{defaultMemoize as Se}from"reselect";function Oe(...e){return function(t){const n=Se((e=>{var n,r;return null==(r=t.extractRehydrationInfo)?void 0:r.call(t,e,{reducerPath:null!=(n=t.reducerPath)?n:"api"})})),r=l(c({reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1},t),{extractRehydrationInfo:n,serializeQueryArgs(e){let n=be;if("serializeQueryArgs"in e.endpointDefinition){const t=e.endpointDefinition.serializeQueryArgs;n=e=>{const n=t(e);return"string"==typeof n?n:be(l(c({},e),{queryArgs:n}))}}else t.serializeQueryArgs&&(n=t.serializeQueryArgs);return n(e)},tagTypes:[...t.tagTypes||[]]}),i={endpointDefinitions:{},batch(e){e()},apiUid:qe(),extractRehydrationInfo:n,hasRehydrationInfo:Se((e=>null!=n(e)))},a={injectEndpoints:function(e){const t=e.endpoints({query:e=>l(c({},e),{type:A.query}),mutation:e=>l(c({},e),{type:A.mutation})});for(const[n,r]of Object.entries(t))if(e.overrideExisting||!(n in i.endpointDefinitions)){i.endpointDefinitions[n]=r;for(const e of o)e.injectEndpoint(n,r)}return a},enhanceEndpoints({addTagTypes:e,endpoints:t}){if(e)for(const t of e)r.tagTypes.includes(t)||r.tagTypes.push(t);if(t)for(const[e,n]of Object.entries(t))"function"==typeof n?n(i.endpointDefinitions[e]):Object.assign(i.endpointDefinitions[e]||{},n);return a}},o=e.map((e=>e.init(a,r,i)));return a.injectEndpoints({endpoints:t.endpoints})}}function Re(){return function(){throw new Error("When using `fakeBaseQuery`, all queries & mutations must use the `queryFn` definition syntax.")}}import{createAction as Te}from"@reduxjs/toolkit";var we=({reducerPath:e,api:t,context:n,internalState:r})=>{const{removeQueryResult:i,unsubscribeQueryResult:a}=t.internalActions;function o(e){const t=r.currentSubscriptions[e];return!!t&&!function(e){for(let t in e)return!1;return!0}(t)}const s={};function u(e,t,r,a){var u;const c=n.endpointDefinitions[t],l=null!=(u=null==c?void 0:c.keepUnusedDataFor)?u:a.keepUnusedDataFor;if(Infinity===l)return;const d=Math.max(0,Math.min(l,2147482.647));if(!o(e)){const t=s[e];t&&clearTimeout(t),s[e]=setTimeout((()=>{o(e)||r.dispatch(i({queryCacheKey:e})),delete s[e]}),1e3*d)}}return(r,i,o)=>{var c;if(a.match(r)){const t=i.getState()[e],{queryCacheKey:n}=r.payload;u(n,null==(c=t.queries[n])?void 0:c.endpointName,i,t.config)}if(t.util.resetApiState.match(r))for(const[e,t]of Object.entries(s))t&&clearTimeout(t),delete s[e];if(n.hasRehydrationInfo(r)){const t=i.getState()[e],{queries:a}=n.extractRehydrationInfo(r);for(const[e,n]of Object.entries(a))u(e,null==n?void 0:n.endpointName,i,t.config)}}};import{isAnyOf as je,isFulfilled as Ae,isRejectedWithValue as ke}from"@reduxjs/toolkit";var xe=({reducerPath:t,context:n,context:{endpointDefinitions:r},mutationThunk:i,api:a,assertTagType:o,refetchQuery:s})=>{const{removeQueryResult:u}=a.internalActions,c=je(Ae(i),ke(i));function l(r,i){const o=i.getState(),c=o[t],l=a.util.selectInvalidatedBy(o,r);n.batch((()=>{var t;const n=Array.from(l.values());for(const{queryCacheKey:r}of n){const n=c.queries[r],a=null!=(t=c.subscriptions[r])?t:{};n&&(0===Object.keys(a).length?i.dispatch(u({queryCacheKey:r})):n.status!==e.uninitialized&&i.dispatch(s(n,r)))}}))}return(e,t)=>{c(e)&&l(se(e,"invalidatesTags",r,o),t),a.util.invalidateTags.match(e)&&l(K(e.payload,void 0,void 0,void 0,void 0,o),t)}},Qe=({reducerPath:t,queryThunk:n,api:r,refetchQuery:i,internalState:a})=>{const o={};function s({queryCacheKey:n},r){const s=r.getState()[t].queries[n];if(!s||s.status===e.uninitialized)return;const u=l(a.currentSubscriptions[n]);if(!Number.isFinite(u))return;const c=o[n];(null==c?void 0:c.timeout)&&(clearTimeout(c.timeout),c.timeout=void 0);const d=Date.now()+u,f=o[n]={nextPollTimestamp:d,pollingInterval:u,timeout:setTimeout((()=>{f.timeout=void 0,r.dispatch(i(s,n))}),u)}}function u({queryCacheKey:n},r){const i=r.getState()[t].queries[n];if(!i||i.status===e.uninitialized)return;const u=l(a.currentSubscriptions[n]);if(!Number.isFinite(u))return void c(n);const d=o[n],f=Date.now()+u;(!d||f<d.nextPollTimestamp)&&s({queryCacheKey:n},r)}function c(e){const t=o[e];(null==t?void 0:t.timeout)&&clearTimeout(t.timeout),delete o[e]}function l(e={}){let t=Number.POSITIVE_INFINITY;for(let n in e)e[n].pollingInterval&&(t=Math.min(e[n].pollingInterval,t));return t}return(e,t)=>{(r.internalActions.updateSubscriptionOptions.match(e)||r.internalActions.unsubscribeQueryResult.match(e))&&u(e.payload,t),(n.pending.match(e)||n.rejected.match(e)&&e.meta.condition)&&u(e.meta.arg,t),(n.fulfilled.match(e)||n.rejected.match(e)&&!e.meta.condition)&&s(e.meta.arg,t),r.util.resetApiState.match(e)&&function(){for(const e of Object.keys(o))c(e)}()}};import{isAsyncThunkAction as Ie,isFulfilled as Ce}from"@reduxjs/toolkit";var Pe=new Error("Promise never resolved before cacheEntryRemoved."),Me=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:i})=>{const a=Ie(r),o=Ie(i),s=Ce(r,i),u={};function d(t,r,i,a,o){const s=n.endpointDefinitions[t],d=null==s?void 0:s.onCacheEntryAdded;if(!d)return;let f={};const p=new Promise((e=>{f.cacheEntryRemoved=e})),m=Promise.race([new Promise((e=>{f.valueResolved=e})),p.then((()=>{throw Pe}))]);m.catch((()=>{})),u[i]=f;const y=e.endpoints[t].select(s.type===A.query?r:i),h=a.dispatch(((e,t,n)=>n)),g=l(c({},a),{getCacheEntry:()=>y(a.getState()),requestId:o,extra:h,updateCachedData:s.type===A.query?n=>a.dispatch(e.util.updateQueryData(t,r,n)):void 0,cacheDataLoaded:m,cacheEntryRemoved:p}),v=d(r,g);Promise.resolve(v).catch((e=>{if(e!==Pe)throw e}))}return(n,c,l)=>{const f=function(t){return a(t)?t.meta.arg.queryCacheKey:o(t)?t.meta.requestId:e.internalActions.removeQueryResult.match(t)?t.payload.queryCacheKey:e.internalActions.removeMutationResult.match(t)?le(t.payload):""}(n);if(r.pending.match(n)){const e=l[t].queries[f],r=c.getState()[t].queries[f];!e&&r&&d(n.meta.arg.endpointName,n.meta.arg.originalArgs,f,c,n.meta.requestId)}else if(i.pending.match(n))c.getState()[t].mutations[f]&&d(n.meta.arg.endpointName,n.meta.arg.originalArgs,f,c,n.meta.requestId);else if(s(n)){const e=u[f];(null==e?void 0:e.valueResolved)&&(e.valueResolved({data:n.payload,meta:n.meta.baseQueryMeta}),delete e.valueResolved)}else if(e.internalActions.removeQueryResult.match(n)||e.internalActions.removeMutationResult.match(n)){const e=u[f];e&&(delete u[f],e.cacheEntryRemoved())}else if(e.util.resetApiState.match(n))for(const[e,t]of Object.entries(u))delete u[e],t.cacheEntryRemoved()}};import{isPending as De,isRejected as Ne,isFulfilled as Ee}from"@reduxjs/toolkit";var Ke,Fe=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const i=De(n,r),a=Ne(n,r),o=Ee(n,r),s={};return(n,r)=>{var u,d,f;if(i(n)){const{requestId:i,arg:{endpointName:a,originalArgs:o}}=n.meta,u=t.endpointDefinitions[a],d=null==u?void 0:u.onQueryStarted;if(d){const t={},n=new Promise(((e,n)=>{t.resolve=e,t.reject=n}));n.catch((()=>{})),s[i]=t;const f=e.endpoints[a].select(u.type===A.query?o:i),p=r.dispatch(((e,t,n)=>n)),m=l(c({},r),{getCacheEntry:()=>f(r.getState()),requestId:i,extra:p,updateCachedData:u.type===A.query?t=>r.dispatch(e.util.updateQueryData(a,o,t)):void 0,queryFulfilled:n});d(o,m)}}else if(o(n)){const{requestId:e,baseQueryMeta:t}=n.meta;null==(u=s[e])||u.resolve({data:n.payload,meta:t}),delete s[e]}else if(a(n)){const{requestId:e,rejectedWithValue:t,baseQueryMeta:r}=n.meta;null==(f=s[e])||f.reject({error:null!=(d=n.payload)?d:n.error,isUnhandledError:!t,meta:r}),delete s[e]}}},ze=({api:e,context:{apiUid:t}})=>(n,r)=>{e.util.resetApiState.match(n)&&r.dispatch(e.internalActions.middlewareRegistered(t))};import{produceWithPatches as _e}from"immer";var $e="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis):e=>(Ke||(Ke=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0)));function Ue(e,...t){Object.assign(e,...t)}import{enablePatches as Le}from"immer";var We=Symbol(),Je=()=>({name:We,init(t,{baseQuery:n,reducerPath:r,serializeQueryArgs:i,keepUnusedDataFor:a,refetchOnMountOrArgChange:o,refetchOnFocus:s,refetchOnReconnect:u},d){Le();const p=e=>e;Object.assign(t,{reducerPath:r,endpoints:{},internalActions:{onOnline:I,onOffline:C,onFocus:x,onFocusLost:Q},util:{}});const{queryThunk:m,mutationThunk:h,patchQueryData:g,updateQueryData:v,upsertQueryData:b,prefetch:q,buildMatchThunkActions:S}=function({reducerPath:t,baseQuery:n,context:{endpointDefinitions:r},serializeQueryArgs:i,api:a}){const o=async(e,{signal:t,abort:i,rejectWithValue:a,fulfillWithValue:o,dispatch:u,getState:c,extra:l})=>{const d=r[e.endpointName];try{let r,a=oe;const f={signal:t,abort:i,dispatch:u,getState:c,extra:l,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?s(e,c()):void 0},p="query"===e.type?e[V]:void 0;if(p?r=p():d.query?(r=await n(d.query(e.originalArgs),f,d.extraOptions),d.transformResponse&&(a=d.transformResponse)):r=await d.queryFn(e.originalArgs,f,d.extraOptions,(e=>n(e,f,d.extraOptions))),r.error)throw new O(r.error,r.meta);return o(await a(r.data,r.meta,e.originalArgs),{fulfilledTimeStamp:Date.now(),baseQueryMeta:r.meta,[ae]:!0})}catch(t){let n=t;if(n instanceof O){let t=oe;d.query&&d.transformErrorResponse&&(t=d.transformErrorResponse);try{return a(await t(n.value,n.meta,e.originalArgs),{baseQueryMeta:n.meta,[ae]:!0})}catch(e){n=e}}throw console.error(n),n}};function s(e,n){var r,i,a,o;const s=null==(i=null==(r=n[t])?void 0:r.queries)?void 0:i[e.queryCacheKey],u=null==(a=n[t])?void 0:a.config.refetchOnMountOrArgChange,c=null==s?void 0:s.fulfilledTimeStamp,l=null!=(o=e.forceRefetch)?o:e.subscribe&&u;return!!l&&(!0===l||(Number(new Date)-Number(c))/1e3>=l)}function u(e){return t=>{var n,r;return(null==(r=null==(n=null==t?void 0:t.meta)?void 0:n.arg)?void 0:r.endpointName)===e}}return{queryThunk:ie(`${t}/executeQuery`,o,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[ae]:!0}),condition(e,{getState:n}){var i,a,o;const u=n(),c=null==(a=null==(i=u[t])?void 0:i.queries)?void 0:a[e.queryCacheKey],l=null==c?void 0:c.fulfilledTimeStamp,d=e.originalArgs,f=null==c?void 0:c.originalArgs,p=r[e.endpointName];return!(!G(e)&&("pending"===(null==c?void 0:c.status)||!s(e,u)&&(!E(p)||!(null==(o=null==p?void 0:p.forceRefetch)?void 0:o.call(p,{currentArg:d,previousArg:f,endpointState:c,state:u})))&&l))},dispatchConditionRejection:!0}),mutationThunk:ie(`${t}/executeMutation`,o,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[ae]:!0})}),prefetch:(e,t,n)=>(r,i)=>{const o=(e=>"force"in e)(n)&&n.force,s=(e=>"ifOlderThan"in e)(n)&&n.ifOlderThan,u=(n=!0)=>a.endpoints[e].initiate(t,{forceRefetch:n}),c=a.endpoints[e].select(t)(i());if(o)r(u());else if(s){const e=null==c?void 0:c.fulfilledTimeStamp;if(!e)return void r(u());(Number(new Date)-Number(new Date(e)))/1e3>=s&&r(u())}else r(u(!1))},updateQueryData:(t,n,r)=>(i,o)=>{const s=a.endpoints[t].select(n)(o());let u={patches:[],inversePatches:[],undo:()=>i(a.util.patchQueryData(t,n,u.inversePatches))};if(s.status===e.uninitialized)return u;if("data"in s)if(ne(s.data)){const[,e,t]=re(s.data,r);u.patches.push(...e),u.inversePatches.push(...t)}else{const e=r(s.data);u.patches.push({op:"replace",path:[],value:e}),u.inversePatches.push({op:"replace",path:[],value:s.data})}return i(a.util.patchQueryData(t,n,u.patches)),u},upsertQueryData:(e,t,n)=>r=>r(a.endpoints[e].initiate(t,{subscribe:!1,forceRefetch:!0,[V]:()=>({data:n})})),patchQueryData:(e,t,n)=>o=>{o(a.internalActions.queryResultPatched({queryCacheKey:i({queryArgs:t,endpointDefinition:r[e],endpointName:e}),patches:n}))},buildMatchThunkActions:function(e,t){return{matchPending:Y(Z(e),u(t)),matchFulfilled:Y(X(e),u(t)),matchRejected:Y(ee(e),u(t))}}}}({baseQuery:n,reducerPath:r,context:d,api:t,serializeQueryArgs:i}),{reducer:R,actions:T}=function({reducerPath:t,queryThunk:n,mutationThunk:r,context:{endpointDefinitions:i,apiUid:a,extractRehydrationInfo:o,hasRehydrationInfo:s},assertTagType:u,config:d}){const f=_(`${t}/resetApiState`),p=$({name:`${t}/queries`,initialState:fe,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t]},prepare:H()},queryResultPatched(e,{payload:{queryCacheKey:t,patches:n}}){ce(e,t,(e=>{e.data=ue(e.data,n.concat())}))}},extraReducers(t){t.addCase(n.pending,((t,{meta:n,meta:{arg:r}})=>{var i;const a=G(r);(r.subscribe||a)&&(null!=t[i=r.queryCacheKey]||(t[i]={status:e.uninitialized,endpointName:r.endpointName})),ce(t,r.queryCacheKey,(t=>{t.status=e.pending,t.requestId=a&&t.requestId?t.requestId:n.requestId,void 0!==r.originalArgs&&(t.originalArgs=r.originalArgs),t.startedTimeStamp=n.startedTimeStamp}))})).addCase(n.fulfilled,((t,{meta:n,payload:r})=>{ce(t,n.arg.queryCacheKey,(t=>{var a;if(t.requestId!==n.requestId&&!G(n.arg))return;const{merge:o}=i[n.arg.endpointName];if(t.status=e.fulfilled,o)if(void 0!==t.data){const{fulfilledTimeStamp:e,arg:i,baseQueryMeta:a,requestId:s}=n;let u=J(t.data,(t=>o(t,r,{arg:i.originalArgs,baseQueryMeta:a,fulfilledTimeStamp:e,requestId:s})));t.data=u}else t.data=r;else t.data=null==(a=i[n.arg.endpointName].structuralSharing)||a?y(t.data,r):r;delete t.error,t.fulfilledTimeStamp=n.fulfilledTimeStamp}))})).addCase(n.rejected,((t,{meta:{condition:n,arg:r,requestId:i},error:a,payload:o})=>{ce(t,r.queryCacheKey,(t=>{if(n);else{if(t.requestId!==i)return;t.status=e.rejected,t.error=null!=o?o:a}}))})).addMatcher(s,((t,n)=>{const{queries:r}=o(n);for(const[n,i]of Object.entries(r))(null==i?void 0:i.status)!==e.fulfilled&&(null==i?void 0:i.status)!==e.rejected||(t[n]=i)}))}}),m=$({name:`${t}/mutations`,initialState:fe,reducers:{removeMutationResult:{reducer(e,{payload:t}){const n=le(t);n in e&&delete e[n]},prepare:H()}},extraReducers(t){t.addCase(r.pending,((t,{meta:n,meta:{requestId:r,arg:i,startedTimeStamp:a}})=>{i.track&&(t[le(n)]={requestId:r,status:e.pending,endpointName:i.endpointName,startedTimeStamp:a})})).addCase(r.fulfilled,((t,{payload:n,meta:r})=>{r.arg.track&&de(t,r,(t=>{t.requestId===r.requestId&&(t.status=e.fulfilled,t.data=n,t.fulfilledTimeStamp=r.fulfilledTimeStamp)}))})).addCase(r.rejected,((t,{payload:n,error:r,meta:i})=>{i.arg.track&&de(t,i,(t=>{t.requestId===i.requestId&&(t.status=e.rejected,t.error=null!=n?n:r)}))})).addMatcher(s,((t,n)=>{const{mutations:r}=o(n);for(const[n,i]of Object.entries(r))(null==i?void 0:i.status)!==e.fulfilled&&(null==i?void 0:i.status)!==e.rejected||n===(null==i?void 0:i.requestId)||(t[n]=i)}))}}),h=$({name:`${t}/invalidation`,initialState:fe,reducers:{},extraReducers(e){e.addCase(p.actions.removeQueryResult,((e,{payload:{queryCacheKey:t}})=>{for(const n of Object.values(e))for(const e of Object.values(n)){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}})).addMatcher(s,((e,t)=>{var n,r,i,a;const{provided:s}=o(t);for(const[t,o]of Object.entries(s))for(const[s,u]of Object.entries(o)){const o=null!=(a=(r=null!=(n=e[t])?n:e[t]={})[i=s||"__internal_without_id"])?a:r[i]=[];for(const e of u)o.includes(e)||o.push(e)}})).addMatcher(U(L(n),W(n)),((e,t)=>{var n,r,a,o;const s=se(t,"providesTags",i,u),{queryCacheKey:c}=t.meta.arg;for(const t of Object.values(e))for(const e of Object.values(t)){const t=e.indexOf(c);-1!==t&&e.splice(t,1)}for(const{type:t,id:i}of s){const s=null!=(o=(r=null!=(n=e[t])?n:e[t]={})[a=i||"__internal_without_id"])?o:r[a]=[];s.includes(c)||s.push(c)}}))}}),g=$({name:`${t}/subscriptions`,initialState:fe,reducers:{updateSubscriptionOptions(e,t){},unsubscribeQueryResult(e,t){},internal_probeSubscription(e,t){}}}),v=$({name:`${t}/internalSubscriptions`,initialState:fe,reducers:{subscriptionsUpdated:(e,t)=>ue(e,t.payload)}}),b=$({name:`${t}/config`,initialState:c({online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine,focused:"undefined"==typeof document||"hidden"!==document.visibilityState,middlewareRegistered:!1},d),reducers:{middlewareRegistered(e,{payload:t}){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&a===t||"conflict"}},extraReducers:e=>{e.addCase(I,(e=>{e.online=!0})).addCase(C,(e=>{e.online=!1})).addCase(x,(e=>{e.focused=!0})).addCase(Q,(e=>{e.focused=!1})).addMatcher(s,(e=>c({},e)))}}),q=z({queries:p.reducer,mutations:m.reducer,provided:h.reducer,subscriptions:v.reducer,config:b.reducer});return{reducer:(e,t)=>q(f.match(t)?void 0:e,t),actions:l(c(c(c(c(c({},b.actions),p.actions),g.actions),v.actions),m.actions),{unsubscribeMutationResult:m.actions.removeMutationResult,resetApiState:f})}}({context:d,queryThunk:m,mutationThunk:h,reducerPath:r,assertTagType:p,config:{refetchOnFocus:s,refetchOnReconnect:u,refetchOnMountOrArgChange:o,keepUnusedDataFor:a,reducerPath:r}});Ue(t.util,{patchQueryData:g,updateQueryData:v,upsertQueryData:b,prefetch:q,resetApiState:T.resetApiState}),Ue(t.internalActions,T);const{middleware:w,actions:j}=function(t){const{reducerPath:n,queryThunk:r,api:i,context:a}=t,{apiUid:o}=a,s={invalidateTags:Te(`${n}/invalidateTags`)},u=[ze,we,xe,Qe,Me,Fe];return{middleware:r=>{let s=!1;const f=l(c({},t),{internalState:{currentSubscriptions:{}},refetchQuery:d}),p=u.map((e=>e(f))),m=(({api:e,queryThunk:t,internalState:n})=>{const r=`${e.reducerPath}/subscriptions`;let i=null,a=!1;const{updateSubscriptionOptions:o,unsubscribeQueryResult:s}=e.internalActions;return(u,c)=>{var l,d;if(i||(i=JSON.parse(JSON.stringify(n.currentSubscriptions))),e.internalActions.internal_probeSubscription.match(u)){const{queryCacheKey:e,requestId:t}=u.payload;return[!1,!!(null==(l=n.currentSubscriptions[e])?void 0:l[t])]}const f=((n,r)=>{var i,a,u,c,l,d,f,p,m;if(o.match(r)){const{queryCacheKey:e,requestId:t,options:a}=r.payload;return(null==(i=null==n?void 0:n[e])?void 0:i[t])&&(n[e][t]=a),!0}if(s.match(r)){const{queryCacheKey:e,requestId:t}=r.payload;return n[e]&&delete n[e][t],!0}if(e.internalActions.removeQueryResult.match(r))return delete n[r.payload.queryCacheKey],!0;if(t.pending.match(r)){const{meta:{arg:e,requestId:t}}=r;if(e.subscribe){const r=null!=(u=n[a=e.queryCacheKey])?u:n[a]={};return r[t]=null!=(l=null!=(c=e.subscriptionOptions)?c:r[t])?l:{},!0}}if(t.rejected.match(r)){const{meta:{condition:e,arg:t,requestId:i}}=r;if(e&&t.subscribe){const e=null!=(f=n[d=t.queryCacheKey])?f:n[d]={};return e[i]=null!=(m=null!=(p=t.subscriptionOptions)?p:e[i])?m:{},!0}}return!1})(n.currentSubscriptions,u);if(f){a||($e((()=>{const t=JSON.parse(JSON.stringify(n.currentSubscriptions)),[,r]=_e(i,(()=>t));c.next(e.internalActions.subscriptionsUpdated(r)),i=t,a=!1})),a=!0);const o=!!(null==(d=u.type)?void 0:d.startsWith(r)),s=t.rejected.match(u)&&u.meta.condition&&!!u.meta.arg.subscribe;return[!o&&!s,!1]}return[!0,!1]}})(f),y=(({reducerPath:t,context:n,api:r,refetchQuery:i,internalState:a})=>{const{removeQueryResult:o}=r.internalActions;function s(r,s){const u=r.getState()[t],c=u.queries,l=a.currentSubscriptions;n.batch((()=>{for(const t of Object.keys(l)){const n=c[t],a=l[t];a&&n&&(Object.values(a).some((e=>!0===e[s]))||Object.values(a).every((e=>void 0===e[s]))&&u.config[s])&&(0===Object.keys(a).length?r.dispatch(o({queryCacheKey:t})):n.status!==e.uninitialized&&r.dispatch(i(n,t)))}}))}return(e,t)=>{x.match(e)&&s(t,"refetchOnFocus"),I.match(e)&&s(t,"refetchOnReconnect")}})(f);return e=>t=>{s||(s=!0,r.dispatch(i.internalActions.middlewareRegistered(o)));const u=l(c({},r),{next:e}),d=r.getState(),[f,h]=m(t,u,d);let g;if(g=f?e(t):h,r.getState()[n]&&(y(t,u,d),(e=>!!e&&"string"==typeof e.type&&e.type.startsWith(`${n}/`))(t)||a.hasRehydrationInfo(t)))for(let e of p)e(t,u,d);return g}},actions:s};function d(e,t,n={}){return r(c({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t},n))}}({reducerPath:r,context:d,queryThunk:m,mutationThunk:h,api:t,assertTagType:p});Ue(t.util,j),Ue(t,{reducer:R,middleware:w});const{buildQuerySelector:k,buildMutationSelector:P,selectInvalidatedBy:M}=function({serializeQueryArgs:t,reducerPath:n}){const r=e=>he,i=e=>ge;return{buildQuerySelector:function(e,n){return i=>{const s=t({queryArgs:i,endpointDefinition:n,endpointName:e});return N(i===pe?r:e=>{var t,n,r;return null!=(r=null==(n=null==(t=o(e))?void 0:t.queries)?void 0:n[s])?r:he},a)}},buildMutationSelector:function(){return e=>{var t;let n;return n="object"==typeof e?null!=(t=le(e))?t:pe:e,N(n===pe?i:e=>{var t,r,i;return null!=(i=null==(r=null==(t=o(e))?void 0:t.mutations)?void 0:r[n])?i:ge},a)}},selectInvalidatedBy:function(e,t){var r;const i=e[n],a=new Set;for(const e of t.map(F)){const t=i.provided[e.type];if(!t)continue;let n=null!=(r=void 0!==e.id?t[e.id]:f(Object.values(t)))?r:[];for(const e of n)a.add(e)}return f(Array.from(a.values()).map((e=>{const t=i.queries[e];return t?[{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}]:[]})))}};function a(t){return c(c({},t),{status:n=t.status,isUninitialized:n===e.uninitialized,isLoading:n===e.pending,isSuccess:n===e.fulfilled,isError:n===e.rejected});var n}function o(e){return e[n]}}({serializeQueryArgs:i,reducerPath:r});Ue(t.util,{selectInvalidatedBy:M});const{buildInitiateQuery:D,buildInitiateMutation:K,getRunningMutationThunk:te,getRunningMutationsThunk:me,getRunningQueriesThunk:ye,getRunningQueryThunk:ve,getRunningOperationPromises:be,removalWarning:qe}=function({serializeQueryArgs:e,queryThunk:t,mutationThunk:n,api:r,context:i}){const a=new Map,o=new Map,{unsubscribeQueryResult:s,removeMutationResult:u,updateSubscriptionOptions:c}=r.internalActions;return{buildInitiateQuery:function(n,i){const o=(u,{subscribe:l=!0,forceRefetch:d,subscriptionOptions:f,[V]:p}={})=>(m,y)=>{var h;const g=e({queryArgs:u,endpointDefinition:i,endpointName:n}),v=t({type:"query",subscribe:l,forceRefetch:d,subscriptionOptions:f,endpointName:n,originalArgs:u,queryCacheKey:g,[V]:p}),b=r.endpoints[n].select(u),q=m(v),S=b(y()),{requestId:O,abort:R}=q,T=S.requestId!==O,w=null==(h=a.get(m))?void 0:h[g],j=()=>b(y()),A=Object.assign(p?q.then(j):T&&!w?Promise.resolve(S):Promise.all([w,q]).then(j),{arg:u,requestId:O,subscriptionOptions:f,queryCacheKey:g,abort:R,async unwrap(){const e=await A;if(e.isError)throw e.error;return e.data},refetch:()=>m(o(u,{subscribe:!1,forceRefetch:!0})),unsubscribe(){l&&m(s({queryCacheKey:g,requestId:O}))},updateSubscriptionOptions(e){A.subscriptionOptions=e,m(c({endpointName:n,requestId:O,queryCacheKey:g,options:e}))}});if(!w&&!T&&!p){const e=a.get(m)||{};e[g]=A,a.set(m,e),A.then((()=>{delete e[g],Object.keys(e).length||a.delete(m)}))}return A};return o},buildInitiateMutation:function(e){return(t,{track:r=!0,fixedCacheKey:i}={})=>(a,s)=>{const c=n({type:"mutation",endpointName:e,originalArgs:t,track:r,fixedCacheKey:i}),l=a(c),{requestId:d,abort:f,unwrap:p}=l,m=l.unwrap().then((e=>({data:e}))).catch((e=>({error:e}))),y=()=>{a(u({requestId:d,fixedCacheKey:i}))},h=Object.assign(m,{arg:l.arg,requestId:d,abort:f,unwrap:p,unsubscribe:y,reset:y}),g=o.get(a)||{};return o.set(a,g),g[d]=h,h.then((()=>{delete g[d],Object.keys(g).length||o.delete(a)})),i&&(g[i]=h,h.then((()=>{g[i]===h&&(delete g[i],Object.keys(g).length||o.delete(a))}))),h}},getRunningQueryThunk:function(t,n){return r=>{var o;const s=e({queryArgs:n,endpointDefinition:i.endpointDefinitions[t],endpointName:t});return null==(o=a.get(r))?void 0:o[s]}},getRunningMutationThunk:function(e,t){return e=>{var n;return null==(n=o.get(e))?void 0:n[t]}},getRunningQueriesThunk:function(){return e=>Object.values(a.get(e)||{}).filter(B)},getRunningMutationsThunk:function(){return e=>Object.values(o.get(e)||{}).filter(B)},getRunningOperationPromises:function(){{const e=e=>Array.from(e.values()).flatMap((e=>e?Object.values(e):[]));return[...e(a),...e(o)].filter(B)}},removalWarning:function(){throw new Error("This method had to be removed due to a conceptual bug in RTK.\n Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details.\n See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR.")}}}({queryThunk:m,mutationThunk:h,api:t,serializeQueryArgs:i,context:d});return Ue(t.util,{getRunningOperationPromises:be,getRunningOperationPromise:qe,getRunningMutationThunk:te,getRunningMutationsThunk:me,getRunningQueryThunk:ve,getRunningQueriesThunk:ye}),{name:We,injectEndpoint(e,n){var r;const i=t;null!=(r=i.endpoints)[e]||(r[e]={}),E(n)?Ue(i.endpoints[e],{name:e,select:k(e,n),initiate:D(e,n)},S(m,e)):n.type===A.mutation&&Ue(i.endpoints[e],{name:e,select:P(),initiate:K(e)},S(h,e))}}}}),He=Oe(Je());export{e as QueryStatus,Oe as buildCreateApi,y as copyWithStructuralSharing,Je as coreModule,He as createApi,be as defaultSerializeQueryArgs,Re as fakeBaseQuery,S as fetchBaseQuery,w as retry,M as setupListeners,me as skipSelector,pe as skipToken};
var e=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(e||{}),t=e=>[].concat(...e);import{isPlainObject as n}from"@reduxjs/toolkit";var r=n;function i(e,t){if(e===t||!(r(e)&&r(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),a=Object.keys(e);let o=n.length===a.length;const s=Array.isArray(t)?[]:{};for(const r of n)s[r]=i(e[r],t[r]),o&&(o=e[r]===s[r]);return o?e:s}import{isPlainObject as a}from"@reduxjs/toolkit";var o=(...e)=>fetch(...e),s=e=>e.status>=200&&e.status<=299,u=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function c(e){if(!a(e))return e;const t={...e};for(const[e,n]of Object.entries(t))void 0===n&&delete t[e];return t}function d({baseUrl:e,prepareHeaders:t=(e=>e),fetchFn:n=o,paramsSerializer:r,isJsonContentType:i=u,jsonContentType:d="application/json",timeout:l,validateStatus:f,...p}={}){return"undefined"==typeof fetch&&n===o&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(o,u)=>{const{signal:y,getState:h,extra:g,endpoint:v,forced:b,type:q}=u;let R,{url:S,method:O="GET",headers:T=new Headers(p.headers),body:w,params:A,responseHandler:j="json",validateStatus:k=(null!=f?f:s),timeout:x=l,...Q}="string"==typeof o?{url:o}:o,I={...p,method:O,signal:y,body:w,...Q};T=new Headers(c(T)),I.headers=await t(T,{getState:h,extra:g,endpoint:v,forced:b,type:q})||T;const C=e=>"object"==typeof e&&(a(e)||Array.isArray(e)||"function"==typeof e.toJSON);if(!I.headers.has("content-type")&&C(w)&&I.headers.set("content-type",d),C(w)&&i(I.headers)&&(I.body=JSON.stringify(w)),A){const e=~S.indexOf("?")?"&":"?";S+=e+(r?r(A):new URLSearchParams(c(A)))}S=function(e,t){if(!e)return t;if(!t)return e;if(function(e){return new RegExp("(^|:)//").test(e)}(t))return t;const n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=(e=>e.replace(/\/$/,""))(e),`${e}${n}${t=(e=>e.replace(/^\//,""))(t)}`}(e,S);const P=new Request(S,I);R={request:P.clone()};let M,D=!1,N=x&&setTimeout((()=>{D=!0,u.abort()}),x);try{M=await n(P)}catch(e){return{error:{status:D?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(e)},meta:R}}finally{N&&clearTimeout(N)}const K=M.clone();let E;R.response=K;let F="";try{let e;if(await Promise.all([m(M,j).then((e=>E=e),(t=>e=t)),K.text().then((e=>F=e),(()=>{}))]),e)throw e}catch(e){return{error:{status:"PARSING_ERROR",originalStatus:M.status,data:F,error:String(e)},meta:R}}return k(M,E)?{data:E,meta:R}:{error:{status:M.status,data:E},meta:R}};async function m(e,t){if("function"==typeof t)return t(e);if("content-type"===t&&(t=i(e.headers)?"json":"text"),"json"===t){const t=await e.text();return t.length?JSON.parse(t):null}return e.text()}}var l=class{constructor(e,t){this.value=e,this.meta=t}};async function f(e=0,t=5){const n=Math.min(e,t),r=~~((Math.random()+.4)*(300<<n));await new Promise((e=>setTimeout((t=>e(t)),r)))}var p={},m=Object.assign(((e,t)=>async(n,r,i)=>{const a=[5,(t||p).maxRetries,(i||p).maxRetries].filter((e=>void 0!==e)),[o]=a.slice(-1),s={maxRetries:o,backoff:f,retryCondition:(e,t,{attempt:n})=>n<=o,...t,...i};let u=0;for(;;)try{const t=await e(n,r,i);if(t.error)throw new l(t);return t}catch(e){if(u++,e.throwImmediately){if(e instanceof l)return e.value;throw e}if(e instanceof l&&!s.retryCondition(e.value.error,n,{attempt:u,baseQueryApi:r,extraOptions:i}))return e.value;await s.backoff(u,s.maxRetries)}}),{fail:function(e){throw Object.assign(new l({error:e}),{throwImmediately:!0})}});import{createAction as y}from"@reduxjs/toolkit";var h=y("__rtkq/focused"),g=y("__rtkq/unfocused"),v=y("__rtkq/online"),b=y("__rtkq/offline"),q=!1;function R(e,t){return t?t(e,{onFocus:h,onFocusLost:g,onOffline:b,onOnline:v}):function(){const t=()=>e(h()),n=()=>e(v()),r=()=>e(b()),i=()=>{"visible"===window.document.visibilityState?t():e(g())};return q||"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("visibilitychange",i,!1),window.addEventListener("focus",t,!1),window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),q=!0),()=>{window.removeEventListener("focus",t),window.removeEventListener("visibilitychange",i),window.removeEventListener("online",n),window.removeEventListener("offline",r),q=!1}}()}import{createNextState as S,createSelector as O}from"@reduxjs/toolkit";function T(e){return"query"===e.type}function w(e,t,n,r,i,a){return"function"==typeof e?e(t,n,r,i).map(A).map(a):Array.isArray(e)?e.map(A).map(a):[]}function A(e){return"string"==typeof e?{type:e}:e}import{combineReducers as j,createAction as k,createSlice as x,isAnyOf as Q,isFulfilled as I,isRejectedWithValue as C,createNextState as P,prepareAutoBatched as M}from"@reduxjs/toolkit";function D(e){return null!=e}var N=Symbol("forceQueryFn"),K=e=>"function"==typeof e[N];import{isAllOf as E,isFulfilled as F,isPending as z,isRejected as _,isRejectedWithValue as $}from"@reduxjs/toolkit";import{isDraftable as L,produceWithPatches as U}from"immer";import{createAsyncThunk as W,SHOULD_AUTOBATCH as J}from"@reduxjs/toolkit";function B(e){return e}function V(e,t,n,r){return w(n[e.meta.arg.endpointName][t],F(e)?e.payload:void 0,$(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}import{applyPatches as H}from"immer";function G(e,t,n){const r=e[t];r&&n(r)}function Y(e){var t;return null!=(t="arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)?t:e.requestId}function X(e,t,n){const r=e[Y(t)];r&&n(r)}var Z={},ee=Symbol.for("RTKQ/skipToken"),te=ee,ne={status:"uninitialized"},re=S(ne,(()=>{})),ie=S(ne,(()=>{}));import{isPlainObject as ae}from"@reduxjs/toolkit";var oe=({endpointName:e,queryArgs:t})=>`${e}(${JSON.stringify(t,((e,t)=>ae(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))})`;import{nanoid as se}from"@reduxjs/toolkit";import{defaultMemoize as ue}from"reselect";function ce(...e){return function(t){const n=ue((e=>{var n,r;return null==(r=t.extractRehydrationInfo)?void 0:r.call(t,e,{reducerPath:null!=(n=t.reducerPath)?n:"api"})})),r={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,...t,extractRehydrationInfo:n,serializeQueryArgs(e){let n=oe;if("serializeQueryArgs"in e.endpointDefinition){const t=e.endpointDefinition.serializeQueryArgs;n=e=>{const n=t(e);return"string"==typeof n?n:oe({...e,queryArgs:n})}}else t.serializeQueryArgs&&(n=t.serializeQueryArgs);return n(e)},tagTypes:[...t.tagTypes||[]]},i={endpointDefinitions:{},batch(e){e()},apiUid:se(),extractRehydrationInfo:n,hasRehydrationInfo:ue((e=>null!=n(e)))},a={injectEndpoints:function(e){const t=e.endpoints({query:e=>({...e,type:"query"}),mutation:e=>({...e,type:"mutation"})});for(const[n,r]of Object.entries(t))if(e.overrideExisting||!(n in i.endpointDefinitions)){i.endpointDefinitions[n]=r;for(const e of o)e.injectEndpoint(n,r)}return a},enhanceEndpoints({addTagTypes:e,endpoints:t}){if(e)for(const t of e)r.tagTypes.includes(t)||r.tagTypes.push(t);if(t)for(const[e,n]of Object.entries(t))"function"==typeof n?n(i.endpointDefinitions[e]):Object.assign(i.endpointDefinitions[e]||{},n);return a}},o=e.map((e=>e.init(a,r,i)));return a.injectEndpoints({endpoints:t.endpoints})}}function de(){return function(){throw new Error("When using `fakeBaseQuery`, all queries & mutations must use the `queryFn` definition syntax.")}}import{createAction as le}from"@reduxjs/toolkit";var fe=({reducerPath:e,api:t,context:n,internalState:r})=>{const{removeQueryResult:i,unsubscribeQueryResult:a}=t.internalActions;function o(e){const t=r.currentSubscriptions[e];return!!t&&!function(e){for(let t in e)return!1;return!0}(t)}const s={};function u(e,t,r,a){var u;const c=n.endpointDefinitions[t],d=null!=(u=null==c?void 0:c.keepUnusedDataFor)?u:a.keepUnusedDataFor;if(Infinity===d)return;const l=Math.max(0,Math.min(d,2147482.647));if(!o(e)){const t=s[e];t&&clearTimeout(t),s[e]=setTimeout((()=>{o(e)||r.dispatch(i({queryCacheKey:e})),delete s[e]}),1e3*l)}}return(r,i,o)=>{var c;if(a.match(r)){const t=i.getState()[e],{queryCacheKey:n}=r.payload;u(n,null==(c=t.queries[n])?void 0:c.endpointName,i,t.config)}if(t.util.resetApiState.match(r))for(const[e,t]of Object.entries(s))t&&clearTimeout(t),delete s[e];if(n.hasRehydrationInfo(r)){const t=i.getState()[e],{queries:a}=n.extractRehydrationInfo(r);for(const[e,n]of Object.entries(a))u(e,null==n?void 0:n.endpointName,i,t.config)}}};import{isAnyOf as pe,isFulfilled as me,isRejectedWithValue as ye}from"@reduxjs/toolkit";var he=({reducerPath:e,context:t,context:{endpointDefinitions:n},mutationThunk:r,api:i,assertTagType:a,refetchQuery:o})=>{const{removeQueryResult:s}=i.internalActions,u=pe(me(r),ye(r));function c(n,r){const a=r.getState(),u=a[e],c=i.util.selectInvalidatedBy(a,n);t.batch((()=>{var e;const t=Array.from(c.values());for(const{queryCacheKey:n}of t){const t=u.queries[n],i=null!=(e=u.subscriptions[n])?e:{};t&&(0===Object.keys(i).length?r.dispatch(s({queryCacheKey:n})):"uninitialized"!==t.status&&r.dispatch(o(t,n)))}}))}return(e,t)=>{u(e)&&c(V(e,"invalidatesTags",n,a),t),i.util.invalidateTags.match(e)&&c(w(e.payload,void 0,void 0,void 0,void 0,a),t)}},ge=({reducerPath:e,queryThunk:t,api:n,refetchQuery:r,internalState:i})=>{const a={};function o({queryCacheKey:t},n){const o=n.getState()[e].queries[t];if(!o||"uninitialized"===o.status)return;const s=c(i.currentSubscriptions[t]);if(!Number.isFinite(s))return;const u=a[t];(null==u?void 0:u.timeout)&&(clearTimeout(u.timeout),u.timeout=void 0);const d=Date.now()+s,l=a[t]={nextPollTimestamp:d,pollingInterval:s,timeout:setTimeout((()=>{l.timeout=void 0,n.dispatch(r(o,t))}),s)}}function s({queryCacheKey:t},n){const r=n.getState()[e].queries[t];if(!r||"uninitialized"===r.status)return;const s=c(i.currentSubscriptions[t]);if(!Number.isFinite(s))return void u(t);const d=a[t],l=Date.now()+s;(!d||l<d.nextPollTimestamp)&&o({queryCacheKey:t},n)}function u(e){const t=a[e];(null==t?void 0:t.timeout)&&clearTimeout(t.timeout),delete a[e]}function c(e={}){let t=Number.POSITIVE_INFINITY;for(let n in e)e[n].pollingInterval&&(t=Math.min(e[n].pollingInterval,t));return t}return(e,r)=>{(n.internalActions.updateSubscriptionOptions.match(e)||n.internalActions.unsubscribeQueryResult.match(e))&&s(e.payload,r),(t.pending.match(e)||t.rejected.match(e)&&e.meta.condition)&&s(e.meta.arg,r),(t.fulfilled.match(e)||t.rejected.match(e)&&!e.meta.condition)&&o(e.meta.arg,r),n.util.resetApiState.match(e)&&function(){for(const e of Object.keys(a))u(e)}()}};import{isAsyncThunkAction as ve,isFulfilled as be}from"@reduxjs/toolkit";var qe=new Error("Promise never resolved before cacheEntryRemoved."),Re=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:i})=>{const a=ve(r),o=ve(i),s=be(r,i),u={};function c(t,r,i,a,o){const s=n.endpointDefinitions[t],c=null==s?void 0:s.onCacheEntryAdded;if(!c)return;let d={};const l=new Promise((e=>{d.cacheEntryRemoved=e})),f=Promise.race([new Promise((e=>{d.valueResolved=e})),l.then((()=>{throw qe}))]);f.catch((()=>{})),u[i]=d;const p=e.endpoints[t].select("query"===s.type?r:i),m=a.dispatch(((e,t,n)=>n)),y={...a,getCacheEntry:()=>p(a.getState()),requestId:o,extra:m,updateCachedData:"query"===s.type?n=>a.dispatch(e.util.updateQueryData(t,r,n)):void 0,cacheDataLoaded:f,cacheEntryRemoved:l},h=c(r,y);Promise.resolve(h).catch((e=>{if(e!==qe)throw e}))}return(n,d,l)=>{const f=function(t){return a(t)?t.meta.arg.queryCacheKey:o(t)?t.meta.requestId:e.internalActions.removeQueryResult.match(t)?t.payload.queryCacheKey:e.internalActions.removeMutationResult.match(t)?Y(t.payload):""}(n);if(r.pending.match(n)){const e=l[t].queries[f],r=d.getState()[t].queries[f];!e&&r&&c(n.meta.arg.endpointName,n.meta.arg.originalArgs,f,d,n.meta.requestId)}else if(i.pending.match(n))d.getState()[t].mutations[f]&&c(n.meta.arg.endpointName,n.meta.arg.originalArgs,f,d,n.meta.requestId);else if(s(n)){const e=u[f];(null==e?void 0:e.valueResolved)&&(e.valueResolved({data:n.payload,meta:n.meta.baseQueryMeta}),delete e.valueResolved)}else if(e.internalActions.removeQueryResult.match(n)||e.internalActions.removeMutationResult.match(n)){const e=u[f];e&&(delete u[f],e.cacheEntryRemoved())}else if(e.util.resetApiState.match(n))for(const[e,t]of Object.entries(u))delete u[e],t.cacheEntryRemoved()}};import{isPending as Se,isRejected as Oe,isFulfilled as Te}from"@reduxjs/toolkit";var we,Ae=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const i=Se(n,r),a=Oe(n,r),o=Te(n,r),s={};return(n,r)=>{var u,c,d;if(i(n)){const{requestId:i,arg:{endpointName:a,originalArgs:o}}=n.meta,u=t.endpointDefinitions[a],c=null==u?void 0:u.onQueryStarted;if(c){const t={},n=new Promise(((e,n)=>{t.resolve=e,t.reject=n}));n.catch((()=>{})),s[i]=t;const d=e.endpoints[a].select("query"===u.type?o:i),l=r.dispatch(((e,t,n)=>n)),f={...r,getCacheEntry:()=>d(r.getState()),requestId:i,extra:l,updateCachedData:"query"===u.type?t=>r.dispatch(e.util.updateQueryData(a,o,t)):void 0,queryFulfilled:n};c(o,f)}}else if(o(n)){const{requestId:e,baseQueryMeta:t}=n.meta;null==(u=s[e])||u.resolve({data:n.payload,meta:t}),delete s[e]}else if(a(n)){const{requestId:e,rejectedWithValue:t,baseQueryMeta:r}=n.meta;null==(d=s[e])||d.reject({error:null!=(c=n.payload)?c:n.error,isUnhandledError:!t,meta:r}),delete s[e]}}},je=({api:e,context:{apiUid:t}})=>(n,r)=>{e.util.resetApiState.match(n)&&r.dispatch(e.internalActions.middlewareRegistered(t))};import{produceWithPatches as ke}from"immer";var xe="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis):e=>(we||(we=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0)));function Qe(e,...t){Object.assign(e,...t)}import{enablePatches as Ie}from"immer";var Ce=Symbol(),Pe=()=>({name:Ce,init(e,{baseQuery:n,reducerPath:r,serializeQueryArgs:a,keepUnusedDataFor:o,refetchOnMountOrArgChange:s,refetchOnFocus:u,refetchOnReconnect:c},d){Ie();const f=e=>e;Object.assign(e,{reducerPath:r,endpoints:{},internalActions:{onOnline:v,onOffline:b,onFocus:h,onFocusLost:g},util:{}});const{queryThunk:p,mutationThunk:m,patchQueryData:y,updateQueryData:q,upsertQueryData:R,prefetch:S,buildMatchThunkActions:w}=function({reducerPath:e,baseQuery:t,context:{endpointDefinitions:n},serializeQueryArgs:r,api:i}){const a=async(e,{signal:r,abort:i,rejectWithValue:a,fulfillWithValue:s,dispatch:u,getState:c,extra:d})=>{const f=n[e.endpointName];try{let n,a=B;const p={signal:r,abort:i,dispatch:u,getState:c,extra:d,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?o(e,c()):void 0},m="query"===e.type?e[N]:void 0;if(m?n=m():f.query?(n=await t(f.query(e.originalArgs),p,f.extraOptions),f.transformResponse&&(a=f.transformResponse)):n=await f.queryFn(e.originalArgs,p,f.extraOptions,(e=>t(e,p,f.extraOptions))),n.error)throw new l(n.error,n.meta);return s(await a(n.data,n.meta,e.originalArgs),{fulfilledTimeStamp:Date.now(),baseQueryMeta:n.meta,[J]:!0})}catch(t){let n=t;if(n instanceof l){let t=B;f.query&&f.transformErrorResponse&&(t=f.transformErrorResponse);try{return a(await t(n.value,n.meta,e.originalArgs),{baseQueryMeta:n.meta,[J]:!0})}catch(e){n=e}}throw console.error(n),n}};function o(t,n){var r,i,a,o;const s=null==(i=null==(r=n[e])?void 0:r.queries)?void 0:i[t.queryCacheKey],u=null==(a=n[e])?void 0:a.config.refetchOnMountOrArgChange,c=null==s?void 0:s.fulfilledTimeStamp,d=null!=(o=t.forceRefetch)?o:t.subscribe&&u;return!!d&&(!0===d||(Number(new Date)-Number(c))/1e3>=d)}function s(e){return t=>{var n,r;return(null==(r=null==(n=null==t?void 0:t.meta)?void 0:n.arg)?void 0:r.endpointName)===e}}return{queryThunk:W(`${e}/executeQuery`,a,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[J]:!0}),condition(t,{getState:r}){var i,a,s;const u=r(),c=null==(a=null==(i=u[e])?void 0:i.queries)?void 0:a[t.queryCacheKey],d=null==c?void 0:c.fulfilledTimeStamp,l=t.originalArgs,f=null==c?void 0:c.originalArgs,p=n[t.endpointName];return!(!K(t)&&("pending"===(null==c?void 0:c.status)||!o(t,u)&&(!T(p)||!(null==(s=null==p?void 0:p.forceRefetch)?void 0:s.call(p,{currentArg:l,previousArg:f,endpointState:c,state:u})))&&d))},dispatchConditionRejection:!0}),mutationThunk:W(`${e}/executeMutation`,a,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[J]:!0})}),prefetch:(e,t,n)=>(r,a)=>{const o=(e=>"force"in e)(n)&&n.force,s=(e=>"ifOlderThan"in e)(n)&&n.ifOlderThan,u=(n=!0)=>i.endpoints[e].initiate(t,{forceRefetch:n}),c=i.endpoints[e].select(t)(a());if(o)r(u());else if(s){const e=null==c?void 0:c.fulfilledTimeStamp;if(!e)return void r(u());(Number(new Date)-Number(new Date(e)))/1e3>=s&&r(u())}else r(u(!1))},updateQueryData:(e,t,n)=>(r,a)=>{const o=i.endpoints[e].select(t)(a());let s={patches:[],inversePatches:[],undo:()=>r(i.util.patchQueryData(e,t,s.inversePatches))};if("uninitialized"===o.status)return s;if("data"in o)if(L(o.data)){const[,e,t]=U(o.data,n);s.patches.push(...e),s.inversePatches.push(...t)}else{const e=n(o.data);s.patches.push({op:"replace",path:[],value:e}),s.inversePatches.push({op:"replace",path:[],value:o.data})}return r(i.util.patchQueryData(e,t,s.patches)),s},upsertQueryData:(e,t,n)=>r=>r(i.endpoints[e].initiate(t,{subscribe:!1,forceRefetch:!0,[N]:()=>({data:n})})),patchQueryData:(e,t,a)=>o=>{o(i.internalActions.queryResultPatched({queryCacheKey:r({queryArgs:t,endpointDefinition:n[e],endpointName:e}),patches:a}))},buildMatchThunkActions:function(e,t){return{matchPending:E(z(e),s(t)),matchFulfilled:E(F(e),s(t)),matchRejected:E(_(e),s(t))}}}}({baseQuery:n,reducerPath:r,context:d,api:e,serializeQueryArgs:a}),{reducer:$,actions:te}=function({reducerPath:e,queryThunk:t,mutationThunk:n,context:{endpointDefinitions:r,apiUid:a,extractRehydrationInfo:o,hasRehydrationInfo:s},assertTagType:u,config:c}){const d=k(`${e}/resetApiState`),l=x({name:`${e}/queries`,initialState:Z,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t]},prepare:M()},queryResultPatched(e,{payload:{queryCacheKey:t,patches:n}}){G(e,t,(e=>{e.data=H(e.data,n.concat())}))}},extraReducers(e){e.addCase(t.pending,((e,{meta:t,meta:{arg:n}})=>{var r;const i=K(n);(n.subscribe||i)&&(null!=e[r=n.queryCacheKey]||(e[r]={status:"uninitialized",endpointName:n.endpointName})),G(e,n.queryCacheKey,(e=>{e.status="pending",e.requestId=i&&e.requestId?e.requestId:t.requestId,void 0!==n.originalArgs&&(e.originalArgs=n.originalArgs),e.startedTimeStamp=t.startedTimeStamp}))})).addCase(t.fulfilled,((e,{meta:t,payload:n})=>{G(e,t.arg.queryCacheKey,(e=>{var a;if(e.requestId!==t.requestId&&!K(t.arg))return;const{merge:o}=r[t.arg.endpointName];if(e.status="fulfilled",o)if(void 0!==e.data){const{fulfilledTimeStamp:r,arg:i,baseQueryMeta:a,requestId:s}=t;let u=P(e.data,(e=>o(e,n,{arg:i.originalArgs,baseQueryMeta:a,fulfilledTimeStamp:r,requestId:s})));e.data=u}else e.data=n;else e.data=null==(a=r[t.arg.endpointName].structuralSharing)||a?i(e.data,n):n;delete e.error,e.fulfilledTimeStamp=t.fulfilledTimeStamp}))})).addCase(t.rejected,((e,{meta:{condition:t,arg:n,requestId:r},error:i,payload:a})=>{G(e,n.queryCacheKey,(e=>{if(t);else{if(e.requestId!==r)return;e.status="rejected",e.error=null!=a?a:i}}))})).addMatcher(s,((e,t)=>{const{queries:n}=o(t);for(const[t,r]of Object.entries(n))"fulfilled"!==(null==r?void 0:r.status)&&"rejected"!==(null==r?void 0:r.status)||(e[t]=r)}))}}),f=x({name:`${e}/mutations`,initialState:Z,reducers:{removeMutationResult:{reducer(e,{payload:t}){const n=Y(t);n in e&&delete e[n]},prepare:M()}},extraReducers(e){e.addCase(n.pending,((e,{meta:t,meta:{requestId:n,arg:r,startedTimeStamp:i}})=>{r.track&&(e[Y(t)]={requestId:n,status:"pending",endpointName:r.endpointName,startedTimeStamp:i})})).addCase(n.fulfilled,((e,{payload:t,meta:n})=>{n.arg.track&&X(e,n,(e=>{e.requestId===n.requestId&&(e.status="fulfilled",e.data=t,e.fulfilledTimeStamp=n.fulfilledTimeStamp)}))})).addCase(n.rejected,((e,{payload:t,error:n,meta:r})=>{r.arg.track&&X(e,r,(e=>{e.requestId===r.requestId&&(e.status="rejected",e.error=null!=t?t:n)}))})).addMatcher(s,((e,t)=>{const{mutations:n}=o(t);for(const[t,r]of Object.entries(n))"fulfilled"!==(null==r?void 0:r.status)&&"rejected"!==(null==r?void 0:r.status)||t===(null==r?void 0:r.requestId)||(e[t]=r)}))}}),p=x({name:`${e}/invalidation`,initialState:Z,reducers:{},extraReducers(e){e.addCase(l.actions.removeQueryResult,((e,{payload:{queryCacheKey:t}})=>{for(const n of Object.values(e))for(const e of Object.values(n)){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}})).addMatcher(s,((e,t)=>{var n,r,i,a;const{provided:s}=o(t);for(const[t,o]of Object.entries(s))for(const[s,u]of Object.entries(o)){const o=null!=(a=(r=null!=(n=e[t])?n:e[t]={})[i=s||"__internal_without_id"])?a:r[i]=[];for(const e of u)o.includes(e)||o.push(e)}})).addMatcher(Q(I(t),C(t)),((e,t)=>{var n,i,a,o;const s=V(t,"providesTags",r,u),{queryCacheKey:c}=t.meta.arg;for(const t of Object.values(e))for(const e of Object.values(t)){const t=e.indexOf(c);-1!==t&&e.splice(t,1)}for(const{type:t,id:r}of s){const s=null!=(o=(i=null!=(n=e[t])?n:e[t]={})[a=r||"__internal_without_id"])?o:i[a]=[];s.includes(c)||s.push(c)}}))}}),m=x({name:`${e}/subscriptions`,initialState:Z,reducers:{updateSubscriptionOptions(e,t){},unsubscribeQueryResult(e,t){},internal_probeSubscription(e,t){}}}),y=x({name:`${e}/internalSubscriptions`,initialState:Z,reducers:{subscriptionsUpdated:(e,t)=>H(e,t.payload)}}),q=x({name:`${e}/config`,initialState:{online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine,focused:"undefined"==typeof document||"hidden"!==document.visibilityState,middlewareRegistered:!1,...c},reducers:{middlewareRegistered(e,{payload:t}){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&a===t||"conflict"}},extraReducers:e=>{e.addCase(v,(e=>{e.online=!0})).addCase(b,(e=>{e.online=!1})).addCase(h,(e=>{e.focused=!0})).addCase(g,(e=>{e.focused=!1})).addMatcher(s,(e=>({...e})))}}),R=j({queries:l.reducer,mutations:f.reducer,provided:p.reducer,subscriptions:y.reducer,config:q.reducer});return{reducer:(e,t)=>R(d.match(t)?void 0:e,t),actions:{...q.actions,...l.actions,...m.actions,...y.actions,...f.actions,unsubscribeMutationResult:f.actions.removeMutationResult,resetApiState:d}}}({context:d,queryThunk:p,mutationThunk:m,reducerPath:r,assertTagType:f,config:{refetchOnFocus:u,refetchOnReconnect:c,refetchOnMountOrArgChange:s,keepUnusedDataFor:o,reducerPath:r}});Qe(e.util,{patchQueryData:y,updateQueryData:q,upsertQueryData:R,prefetch:S,resetApiState:te.resetApiState}),Qe(e.internalActions,te);const{middleware:ne,actions:ae}=function(e){const{reducerPath:t,queryThunk:n,api:r,context:i}=e,{apiUid:a}=i,o={invalidateTags:le(`${t}/invalidateTags`)},s=[je,fe,he,ge,Re,Ae];return{middleware:n=>{let o=!1;const c={...e,internalState:{currentSubscriptions:{}},refetchQuery:u},d=s.map((e=>e(c))),l=(({api:e,queryThunk:t,internalState:n})=>{const r=`${e.reducerPath}/subscriptions`;let i=null,a=!1;const{updateSubscriptionOptions:o,unsubscribeQueryResult:s}=e.internalActions;return(u,c)=>{var d,l;if(i||(i=JSON.parse(JSON.stringify(n.currentSubscriptions))),e.internalActions.internal_probeSubscription.match(u)){const{queryCacheKey:e,requestId:t}=u.payload;return[!1,!!(null==(d=n.currentSubscriptions[e])?void 0:d[t])]}const f=((n,r)=>{var i,a,u,c,d,l,f,p,m;if(o.match(r)){const{queryCacheKey:e,requestId:t,options:a}=r.payload;return(null==(i=null==n?void 0:n[e])?void 0:i[t])&&(n[e][t]=a),!0}if(s.match(r)){const{queryCacheKey:e,requestId:t}=r.payload;return n[e]&&delete n[e][t],!0}if(e.internalActions.removeQueryResult.match(r))return delete n[r.payload.queryCacheKey],!0;if(t.pending.match(r)){const{meta:{arg:e,requestId:t}}=r;if(e.subscribe){const r=null!=(u=n[a=e.queryCacheKey])?u:n[a]={};return r[t]=null!=(d=null!=(c=e.subscriptionOptions)?c:r[t])?d:{},!0}}if(t.rejected.match(r)){const{meta:{condition:e,arg:t,requestId:i}}=r;if(e&&t.subscribe){const e=null!=(f=n[l=t.queryCacheKey])?f:n[l]={};return e[i]=null!=(m=null!=(p=t.subscriptionOptions)?p:e[i])?m:{},!0}}return!1})(n.currentSubscriptions,u);if(f){a||(xe((()=>{const t=JSON.parse(JSON.stringify(n.currentSubscriptions)),[,r]=ke(i,(()=>t));c.next(e.internalActions.subscriptionsUpdated(r)),i=t,a=!1})),a=!0);const o=!!(null==(l=u.type)?void 0:l.startsWith(r)),s=t.rejected.match(u)&&u.meta.condition&&!!u.meta.arg.subscribe;return[!o&&!s,!1]}return[!0,!1]}})(c),f=(({reducerPath:e,context:t,api:n,refetchQuery:r,internalState:i})=>{const{removeQueryResult:a}=n.internalActions;function o(n,o){const s=n.getState()[e],u=s.queries,c=i.currentSubscriptions;t.batch((()=>{for(const e of Object.keys(c)){const t=u[e],i=c[e];i&&t&&(Object.values(i).some((e=>!0===e[o]))||Object.values(i).every((e=>void 0===e[o]))&&s.config[o])&&(0===Object.keys(i).length?n.dispatch(a({queryCacheKey:e})):"uninitialized"!==t.status&&n.dispatch(r(t,e)))}}))}return(e,t)=>{h.match(e)&&o(t,"refetchOnFocus"),v.match(e)&&o(t,"refetchOnReconnect")}})(c);return e=>s=>{o||(o=!0,n.dispatch(r.internalActions.middlewareRegistered(a)));const u={...n,next:e},c=n.getState(),[p,m]=l(s,u,c);let y;if(y=p?e(s):m,n.getState()[t]&&(f(s,u,c),(e=>!!e&&"string"==typeof e.type&&e.type.startsWith(`${t}/`))(s)||i.hasRehydrationInfo(s)))for(let e of d)e(s,u,c);return y}},actions:o};function u(e,t,r={}){return n({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t,...r})}}({reducerPath:r,context:d,queryThunk:p,mutationThunk:m,api:e,assertTagType:f});Qe(e.util,ae),Qe(e,{reducer:$,middleware:ne});const{buildQuerySelector:oe,buildMutationSelector:se,selectInvalidatedBy:ue}=function({serializeQueryArgs:e,reducerPath:n}){const r=e=>re,i=e=>ie;return{buildQuerySelector:function(t,n){return i=>{const s=e({queryArgs:i,endpointDefinition:n,endpointName:t});return O(i===ee?r:e=>{var t,n,r;return null!=(r=null==(n=null==(t=o(e))?void 0:t.queries)?void 0:n[s])?r:re},a)}},buildMutationSelector:function(){return e=>{var t;let n;return n="object"==typeof e?null!=(t=Y(e))?t:ee:e,O(n===ee?i:e=>{var t,r,i;return null!=(i=null==(r=null==(t=o(e))?void 0:t.mutations)?void 0:r[n])?i:ie},a)}},selectInvalidatedBy:function(e,r){var i;const a=e[n],o=new Set;for(const e of r.map(A)){const n=a.provided[e.type];if(!n)continue;let r=null!=(i=void 0!==e.id?n[e.id]:t(Object.values(n)))?i:[];for(const e of r)o.add(e)}return t(Array.from(o.values()).map((e=>{const t=a.queries[e];return t?[{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}]:[]})))}};function a(e){return{...e,...(t=e.status,{status:t,isUninitialized:"uninitialized"===t,isLoading:"pending"===t,isSuccess:"fulfilled"===t,isError:"rejected"===t})};var t}function o(e){return e[n]}}({serializeQueryArgs:a,reducerPath:r});Qe(e.util,{selectInvalidatedBy:ue});const{buildInitiateQuery:ce,buildInitiateMutation:de,getRunningMutationThunk:pe,getRunningMutationsThunk:me,getRunningQueriesThunk:ye,getRunningQueryThunk:ve,getRunningOperationPromises:be,removalWarning:qe}=function({serializeQueryArgs:e,queryThunk:t,mutationThunk:n,api:r,context:i}){const a=new Map,o=new Map,{unsubscribeQueryResult:s,removeMutationResult:u,updateSubscriptionOptions:c}=r.internalActions;return{buildInitiateQuery:function(n,i){const o=(u,{subscribe:d=!0,forceRefetch:l,subscriptionOptions:f,[N]:p}={})=>(m,y)=>{var h;const g=e({queryArgs:u,endpointDefinition:i,endpointName:n}),v=t({type:"query",subscribe:d,forceRefetch:l,subscriptionOptions:f,endpointName:n,originalArgs:u,queryCacheKey:g,[N]:p}),b=r.endpoints[n].select(u),q=m(v),R=b(y()),{requestId:S,abort:O}=q,T=R.requestId!==S,w=null==(h=a.get(m))?void 0:h[g],A=()=>b(y()),j=Object.assign(p?q.then(A):T&&!w?Promise.resolve(R):Promise.all([w,q]).then(A),{arg:u,requestId:S,subscriptionOptions:f,queryCacheKey:g,abort:O,async unwrap(){const e=await j;if(e.isError)throw e.error;return e.data},refetch:()=>m(o(u,{subscribe:!1,forceRefetch:!0})),unsubscribe(){d&&m(s({queryCacheKey:g,requestId:S}))},updateSubscriptionOptions(e){j.subscriptionOptions=e,m(c({endpointName:n,requestId:S,queryCacheKey:g,options:e}))}});if(!w&&!T&&!p){const e=a.get(m)||{};e[g]=j,a.set(m,e),j.then((()=>{delete e[g],Object.keys(e).length||a.delete(m)}))}return j};return o},buildInitiateMutation:function(e){return(t,{track:r=!0,fixedCacheKey:i}={})=>(a,s)=>{const c=n({type:"mutation",endpointName:e,originalArgs:t,track:r,fixedCacheKey:i}),d=a(c),{requestId:l,abort:f,unwrap:p}=d,m=d.unwrap().then((e=>({data:e}))).catch((e=>({error:e}))),y=()=>{a(u({requestId:l,fixedCacheKey:i}))},h=Object.assign(m,{arg:d.arg,requestId:l,abort:f,unwrap:p,unsubscribe:y,reset:y}),g=o.get(a)||{};return o.set(a,g),g[l]=h,h.then((()=>{delete g[l],Object.keys(g).length||o.delete(a)})),i&&(g[i]=h,h.then((()=>{g[i]===h&&(delete g[i],Object.keys(g).length||o.delete(a))}))),h}},getRunningQueryThunk:function(t,n){return r=>{var o;const s=e({queryArgs:n,endpointDefinition:i.endpointDefinitions[t],endpointName:t});return null==(o=a.get(r))?void 0:o[s]}},getRunningMutationThunk:function(e,t){return e=>{var n;return null==(n=o.get(e))?void 0:n[t]}},getRunningQueriesThunk:function(){return e=>Object.values(a.get(e)||{}).filter(D)},getRunningMutationsThunk:function(){return e=>Object.values(o.get(e)||{}).filter(D)},getRunningOperationPromises:function(){{const e=e=>Array.from(e.values()).flatMap((e=>e?Object.values(e):[]));return[...e(a),...e(o)].filter(D)}},removalWarning:function(){throw new Error("This method had to be removed due to a conceptual bug in RTK.\n Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details.\n See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR.")}}}({queryThunk:p,mutationThunk:m,api:e,serializeQueryArgs:a,context:d});return Qe(e.util,{getRunningOperationPromises:be,getRunningOperationPromise:qe,getRunningMutationThunk:pe,getRunningMutationsThunk:me,getRunningQueryThunk:ve,getRunningQueriesThunk:ye}),{name:Ce,injectEndpoint(t,n){var r;const i=e;null!=(r=i.endpoints)[t]||(r[t]={}),T(n)?Qe(i.endpoints[t],{name:t,select:oe(t,n),initiate:ce(t,n)},w(p,t)):"mutation"===n.type&&Qe(i.endpoints[t],{name:t,select:se(),initiate:de(t)},w(m,t))}}}}),Me=ce(Pe());export{e as QueryStatus,ce as buildCreateApi,i as copyWithStructuralSharing,Pe as coreModule,Me as createApi,oe as defaultSerializeQueryArgs,de as fakeBaseQuery,d as fetchBaseQuery,m as retry,R as setupListeners,te as skipSelector,ee as skipToken};
//# sourceMappingURL=rtk-query.modern.production.min.js.map

@@ -7,15 +7,16 @@ (function (global, factory) {

var e;exports.QueryStatus = void 0;var n,r=undefined&&undefined.__extends||(e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);},e(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r);}),i=undefined&&undefined.__generator||function(e,t){var n,r,i,u,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return u={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function o(u){return function(o){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a);}catch(e){u=[6,e],r=0;}finally{n=i=0;}if(5&u[0])throw u[1];return {value:u[0]?u[1]:void 0,done:!0}}([u,o])}}},u=undefined&&undefined.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},a=Object.defineProperty,o=Object.defineProperties,c=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,d=function(e,t,n){return t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},p=function(e,t){for(var n in t||(t={}))f.call(t,n)&&d(e,n,t[n]);if(s)for(var r=0,i=s(t);r<i.length;r++)l.call(t,n=i[r])&&d(e,n,t[n]);return e},v=function(e,t){return o(e,c(t))},h=function(e,t){var n={};for(var r in e)f.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&s)for(var i=0,u=s(e);i<u.length;i++)t.indexOf(r=u[i])<0&&l.call(e,r)&&(n[r]=e[r]);return n},y=function(e,t,n){return new Promise((function(r,i){var u=function(e){try{o(n.next(e));}catch(e){i(e);}},a=function(e){try{o(n.throw(e));}catch(e){i(e);}},o=function(e){return e.done?r(e.value):Promise.resolve(e.value).then(u,a)};o((n=n.apply(e,t)).next());}))};(n=exports.QueryStatus||(exports.QueryStatus={})).uninitialized="uninitialized",n.pending="pending",n.fulfilled="fulfilled",n.rejected="rejected";var g,m,b=function(e){return [].concat.apply([],e)};function O(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return "'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function w(e){return !!e&&!!e[ae]}function S(e){var t;return !!e&&(function(e){if(!e||"object"!=typeof e)return !1;var t=Object.getPrototypeOf(e);if(null===t)return !0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===oe}(e)||Array.isArray(e)||!!e[ue]||!!(null===(t=e.constructor)||void 0===t?void 0:t[ue])||k(e)||x(e))}function j(e,t,n){void 0===n&&(n=!1),0===q(e)?(n?Object.keys:ce)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e);})):e.forEach((function(n,r){return t(r,n,e)}));}function q(e){var t=e[ae];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:k(e)?2:x(e)?3:0}function A(e,t){return 2===q(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function P(e,t){return 2===q(e)?e.get(t):e[t]}function R(e,t,n){var r=q(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n;}function T(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function k(e){return te&&e instanceof Map}function x(e){return ne&&e instanceof Set}function I(e){return e.o||e.t}function C(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=se(e);delete t[ae];for(var n=ce(t),r=0;r<n.length;r++){var i=n[r],u=t[i];!1===u.writable&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(t[i]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[i]});}return Object.create(Object.getPrototypeOf(e),t)}function E(e,t){return void 0===t&&(t=!1),N(e)||w(e)||!S(e)||(q(e)>1&&(e.set=e.add=e.clear=e.delete=D),Object.freeze(e),t&&j(e,(function(e,t){return E(t,!0)}),!0)),e}function D(){O(2);}function N(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function Q(e){var t=fe[e];return t||O(18,e),t}function M(e,t){fe[e]||(fe[e]=t);}function _(){return m}function K(e,t){t&&(Q("Patches"),e.u=[],e.s=[],e.v=t);}function F(e){z(e),e.p.forEach(W),e.p=null;}function z(e){e===m&&(m=e.l);}function U(e){return m={p:[],l:m,h:e,m:!0,_:0}}function W(e){var t=e[ae];0===t.i||1===t.i?t.j():t.O=!0;}function L(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.g||Q("ES5").S(t,e,r),r?(n[ae].P&&(F(t),O(4)),S(e)&&(e=B(t,e),t.l||V(t,e)),t.u&&Q("Patches").M(n[ae].t,e,t.u,t.s)):e=B(t,n,[]),F(t),t.u&&t.v(t.u,t.s),e!==ie?e:void 0}function B(e,t,n){if(N(t))return t;var r=t[ae];if(!r)return j(t,(function(i,u){return J(e,r,t,i,u,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return V(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=C(r.k):r.o;j(3===r.i?new Set(i):i,(function(t,u){return J(e,r,i,t,u,n)})),V(e,i,!1),n&&e.u&&Q("Patches").R(r,n,e.u,e.s);}return r.o}function J(e,t,n,r,i,u){if(w(i)){var a=B(e,i,u&&t&&3!==t.i&&!A(t.D,r)?u.concat(r):void 0);if(R(n,r,a),!w(a))return;e.m=!1;}if(S(i)&&!N(i)){if(!e.h.F&&e._<1)return;B(e,i),t&&t.A.l||V(e,i);}}function V(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&E(t,n);}function H(e,t){var n=e[ae];return (n?I(n):e)[t]}function G(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n);}}function $(e){e.P||(e.P=!0,e.l&&$(e.l));}function X(e){e.o||(e.o=C(e.t));}function Y(e,t,n){var r=k(t)?Q("MapSet").N(t,n):x(t)?Q("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:_(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,u=le;n&&(i=[r],u=de);var a=Proxy.revocable(i,u),o=a.revoke,c=a.proxy;return r.k=c,r.j=o,c}(t,n):Q("ES5").J(t,n);return (n?n.A:_()).p.push(r),r}function Z(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return C(e)}var ee="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),te="undefined"!=typeof Map,ne="undefined"!=typeof Set,re="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,ie=ee?Symbol.for("immer-nothing"):((g={})["immer-nothing"]=!0,g),ue=ee?Symbol.for("immer-draftable"):"__$immer_draftable",ae=ee?Symbol.for("immer-state"):"__$immer_state",oe=(""+Object.prototype.constructor),ce="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,se=Object.getOwnPropertyDescriptors||function(e){var t={};return ce(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n);})),t},fe={},le={get:function(e,t){if(t===ae)return e;var n,r,i,u=I(e);if(!A(u,t))return n=e,(i=G(u,t))?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(n.k):void 0;var a=u[t];return e.I||!S(a)?a:a===H(e.t,t)?(X(e),e.o[t]=Y(e.A.h,a,e)):a},has:function(e,t){return t in I(e)},ownKeys:function(e){return Reflect.ownKeys(I(e))},set:function(e,t,n){var r=G(I(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=H(I(e),t),u=null==i?void 0:i[ae];if(u&&u.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(T(n,i)&&(void 0!==n||A(e.t,t)))return !0;X(e),$(e);}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==H(e.t,t)||t in e.t?(e.D[t]=!1,X(e),$(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=I(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){O(11);},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){O(12);}},de={};j(le,(function(e,t){de[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)};})),de.deleteProperty=function(e,t){return de.set.call(this,e,t,void 0)},de.set=function(e,t,n){return le.set.call(this,e[0],t,n,e[0])};var pe=new(function(){function e(e){var t=this;this.g=re,this.F=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var i=n;n=e;var u=t;return function(e){var t=this;void 0===e&&(e=i);for(var r=arguments.length,a=Array(r>1?r-1:0),o=1;o<r;o++)a[o-1]=arguments[o];return u.produce(e,(function(e){var r;return (r=n).call.apply(r,[t,e].concat(a))}))}}var a;if("function"!=typeof n&&O(6),void 0!==r&&"function"!=typeof r&&O(7),S(e)){var o=U(t),c=Y(t,e,void 0),s=!0;try{a=n(c),s=!1;}finally{s?F(o):z(o);}return "undefined"!=typeof Promise&&a instanceof Promise?a.then((function(e){return K(o,r),L(e,o)}),(function(e){throw F(o),e})):(K(o,r),L(a,o))}if(!e||"object"!=typeof e){if(void 0===(a=n(e))&&(a=e),a===ie&&(a=void 0),t.F&&E(a,!0),r){var f=[],l=[];Q("Patches").M(e,a,f,l),r(f,l);}return a}O(21,e);},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),u=1;u<r;u++)i[u-1]=arguments[u];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(i))}))};var r,i,u=t.produce(e,n,(function(e,t){r=e,i=t;}));return "undefined"!=typeof Promise&&u instanceof Promise?u.then((function(e){return [e,r,i]})):[u,r,i]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze);}var t=e.prototype;return t.createDraft=function(e){S(e)||O(8),w(e)&&(e=function(e){return w(e)||O(22,e),function e(t){if(!S(t))return t;var n,r=t[ae],i=q(t);if(r){if(!r.P&&(r.i<4||!Q("ES5").K(r)))return r.t;r.I=!0,n=Z(t,i),r.I=!1;}else n=Z(t,i);return j(n,(function(t,i){r&&P(r.t,t)===i||R(n,t,e(i));})),3===i?new Set(n):n}(e)}(e));var t=U(this),n=Y(this,e,void 0);return n[ae].C=!0,z(t),n},t.finishDraft=function(e,t){var n=(e&&e[ae]).A;return K(n,t),L(void 0,n)},t.setAutoFreeze=function(e){this.F=e;},t.setUseProxies=function(e){e&&!re&&O(20),this.g=e;},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var i=Q("Patches").$;return w(e)?i(e,t):this.produce(e,(function(e){return i(e,t)}))},e}()),ve=pe.produce,he=pe.produceWithPatches.bind(pe),ye=(pe.setAutoFreeze.bind(pe),pe.setUseProxies.bind(pe),pe.applyPatches.bind(pe)),ge=(pe.createDraft.bind(pe),pe.finishDraft.bind(pe),ve);function me(e){return "Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var be=function(){return Math.random().toString(36).substring(7).split("").join(".")},Oe={INIT:"@@redux/INIT"+be(),REPLACE:"@@redux/REPLACE"+be(),PROBE_UNKNOWN_ACTION:function(){return "@@redux/PROBE_UNKNOWN_ACTION"+be()}},we=function(e,t){return e===t};function Se(e,t){var n,r,i,u="object"==typeof t?t:{equalityCheck:t},a=u.equalityCheck,o=u.maxSize,c=void 0===o?1:o,s=u.resultEqualityCheck,f=(i=void 0===a?we:a,function(e,t){if(null===e||null===t||e.length!==t.length)return !1;for(var n=e.length,r=0;r<n;r++)if(!i(e[r],t[r]))return !1;return !0}),l=1===c?(n=f,{get:function(e){return r&&n(r.key,e)?r.value:"NOT_FOUND"},put:function(e,t){r={key:e,value:t};},getEntries:function(){return r?[r]:[]},clear:function(){r=void 0;}}):function(e,t){var n=[];function r(e){var r=n.findIndex((function(n){return t(e,n.key)}));if(r>-1){var i=n[r];return r>0&&(n.splice(r,1),n.unshift(i)),i.value}return "NOT_FOUND"}return {get:r,put:function(t,i){"NOT_FOUND"===r(t)&&(n.unshift({key:t,value:i}),n.length>e&&n.pop());},getEntries:function(){return n},clear:function(){n=[];}}}(c,f);function d(){var t=l.get(arguments);if("NOT_FOUND"===t){if(t=e.apply(null,arguments),s){var n=l.getEntries(),r=n.find((function(e){return s(e.value,t)}));r&&(t=r.value);}l.put(arguments,t);}return t}return d.clearCache=function(){return l.clear()},d}function je(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return "function"==typeof e}))){var n=t.map((function(e){return "function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function qe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var u,a=0,o={memoizeOptions:void 0},c=r.pop();if("object"==typeof c&&(o=c,c=r.pop()),"function"!=typeof c)throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof c+"]");var s=o,f=s.memoizeOptions,l=void 0===f?n:f,d=Array.isArray(l)?l:[l],p=je(r),v=e.apply(void 0,[function(){return a++,c.apply(null,arguments)}].concat(d)),h=e((function(){for(var e=[],t=p.length,n=0;n<t;n++)e.push(p[n].apply(null,arguments));return u=v.apply(null,e)}));return Object.assign(h,{resultFunc:c,memoizedResultFunc:v,dependencies:p,lastResult:function(){return u},recomputations:function(){return a},resetRecomputations:function(){return a=0}}),h};return i}var Ae=qe(Se);function Pe(e){if("object"!=typeof e||null===e)return !1;var t=Object.getPrototypeOf(e);if(null===t)return !0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n}function Re(e){return S(e)?ge(e,(function(){})):e}function Te(e,t){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return p(p({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return {type:e,payload:n[0]}}return n.toString=function(){return ""+e},n.type=e,n.match=function(t){return t.type===e},n}function ke(e){var t,n={},r=[],i={addCase:function(e,t){var r="string"==typeof e?e:e.type;if(r in n)throw new Error("addCase cannot be called with two reducers for the same action type");return n[r]=t,i},addMatcher:function(e,t){return r.push({matcher:e,reducer:t}),i},addDefaultCase:function(e){return t=e,i}};return e(i),[n,r,t]}function xe(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");var n,r="function"==typeof e.initialState?e.initialState:Re(e.initialState),i=e.reducers||{},a=Object.keys(i),o={},c={},s={};function f(){var t="function"==typeof e.extraReducers?ke(e.extraReducers):[e.extraReducers],n=t[0],i=t[1],a=void 0===i?[]:i,o=t[2],s=void 0===o?void 0:o,f=p(p({},void 0===n?{}:n),c);return function(e,t,n,r){var i,a=ke(t),o=a[0],c=a[1],s=a[2];if("function"==typeof e)i=function(){return Re(e())};else {var f=Re(e);i=function(){return f};}function l(e,t){void 0===e&&(e=i());var n=u([o[t.type]],c.filter((function(e){return (0, e.matcher)(t)})).map((function(e){return e.reducer})));return 0===n.filter((function(e){return !!e})).length&&(n=[s]),n.reduce((function(e,n){if(n){var r;if(w(e))return void 0===(r=n(e,t))?e:r;if(S(e))return ge(e,(function(e){return n(e,t)}));if(void 0===(r=n(e,t))){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return e}),e)}return l.getInitialState=i,l}(r,(function(e){for(var t in f)e.addCase(t,f[t]);for(var n=0,r=a;n<r.length;n++){var i=r[n];e.addMatcher(i.matcher,i.reducer);}s&&e.addDefaultCase(s);}))}return a.forEach((function(e){var n,r,u=i[e],a=t+"/"+e;"reducer"in u?(n=u.reducer,r=u.prepare):n=u,o[e]=n,c[a]=n,s[e]=r?Te(a,r):Te(a);})),{name:t,reducer:function(e,t){return n||(n=f()),n(e,t)},actions:s,caseReducers:o,getInitialState:function(){return n||(n=f()),n.getInitialState()}}}!function(e){function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e.apply(this,n)||this;return Object.setPrototypeOf(i,t.prototype),i}r(t,e),Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.prototype.concat.apply(this,t)},t.prototype.prepend=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return 1===e.length&&Array.isArray(e[0])?new(t.bind.apply(t,u([void 0],e[0].concat(this)))):new(t.bind.apply(t,u([void 0],e.concat(this))))};}(Array);var Ie=function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},Ce=["name","message","stack","code"],Ee=function(e,t){this.payload=e,this.meta=t;},De=function(e,t){this.payload=e,this.meta=t;},Ne=function(e){if("object"==typeof e&&null!==e){for(var t={},n=0,r=Ce;n<r.length;n++){var i=r[n];"string"==typeof e[i]&&(t[i]=e[i]);}return t}return {message:String(e)}},Qe=function(){function e(e,t,n){var r=Te(e+"/fulfilled",(function(e,t,n,r){return {payload:e,meta:v(p({},r||{}),{arg:n,requestId:t,requestStatus:"fulfilled"})}})),u=Te(e+"/pending",(function(e,t,n){return {payload:void 0,meta:v(p({},n||{}),{arg:t,requestId:e,requestStatus:"pending"})}})),a=Te(e+"/rejected",(function(e,t,r,i,u){return {payload:i,error:(n&&n.serializeError||Ne)(e||"Rejected"),meta:v(p({},u||{}),{arg:r,requestId:t,rejectedWithValue:!!i,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)})}})),o="undefined"!=typeof AbortController?AbortController:function(){function e(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return !1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}};}return e.prototype.abort=function(){},e}();return Object.assign((function(e){return function(c,s,f){var l,d=(null==n?void 0:n.idGenerator)?n.idGenerator(e):Ie(),p=new o;function v(e){l=e,p.abort();}var h=function(){return y(this,null,(function(){var o,h,y,g,m,b;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),null===(O=g=null==(o=null==n?void 0:n.condition)?void 0:o.call(n,e,{getState:s,extra:f}))||"object"!=typeof O||"function"!=typeof O.then?[3,2]:[4,g];case 1:g=i.sent(),i.label=2;case 2:if(!1===g||p.signal.aborted)throw {name:"ConditionError",message:"Aborted due to condition callback returning false."};return m=new Promise((function(e,t){return p.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:l||"Aborted"})}))})),c(u(d,e,null==(h=null==n?void 0:n.getPendingMeta)?void 0:h.call(n,{requestId:d,arg:e},{getState:s,extra:f}))),[4,Promise.race([m,Promise.resolve(t(e,{dispatch:c,getState:s,extra:f,requestId:d,signal:p.signal,abort:v,rejectWithValue:function(e,t){return new Ee(e,t)},fulfillWithValue:function(e,t){return new De(e,t)}})).then((function(t){if(t instanceof Ee)throw t;return t instanceof De?r(t.payload,d,e,t.meta):r(t,d,e)}))])];case 3:return y=i.sent(),[3,5];case 4:return b=i.sent(),y=b instanceof Ee?a(null,d,e,b.payload,b.meta):a(b,d,e),[3,5];case 5:return n&&!n.dispatchConditionRejection&&a.match(y)&&y.meta.condition||c(y),[2,y]}var O;}))}))}();return Object.assign(h,{abort:v,requestId:d,arg:e,unwrap:function(){return h.then(Me)}})}}),{pending:u,rejected:a,fulfilled:r,typePrefix:e})}return e.withTypes=function(){return e},e}();function Me(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var _e=function(e,t){return (n=e)&&"function"==typeof n.match?e.match(t):e(t);var n;};function Ke(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.some((function(e){return _e(e,t)}))}}function Fe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.every((function(e){return _e(e,t)}))}}function ze(e,t){if(!e||!e.meta)return !1;var n="string"==typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function Ue(e){return "function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function We(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return ze(e,["pending"])}:Ue(e)?function(t){var n=e.map((function(e){return e.pending}));return Ke.apply(void 0,n)(t)}:We()(e[0])}function Le(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return ze(e,["rejected"])}:Ue(e)?function(t){var n=e.map((function(e){return e.rejected}));return Ke.apply(void 0,n)(t)}:Le()(e[0])}function Be(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return e&&e.meta&&e.meta.rejectedWithValue};return 0===e.length||Ue(e)?function(t){return Fe(Le.apply(void 0,e),n)(t)}:Be()(e[0])}function Je(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return ze(e,["fulfilled"])}:Ue(e)?function(t){var n=e.map((function(e){return e.fulfilled}));return Ke.apply(void 0,n)(t)}:Je()(e[0])}function Ve(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return ze(e,["pending","fulfilled","rejected"])}:Ue(e)?function(t){for(var n=[],r=0,i=e;r<i.length;r++){var u=i[r];n.push(u.pending,u.rejected,u.fulfilled);}return Ke.apply(void 0,n)(t)}:Ve()(e[0])}"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis),function(){function e(e,t){var n=i[e];return n?n.enumerable=t:i[e]=n={configurable:!0,enumerable:t,get:function(){return le.get(this[ae],e)},set:function(t){le.set(this[ae],e,t);}},n}function t(e){for(var t=e.length-1;t>=0;t--){var i=e[t][ae];if(!i.P)switch(i.i){case 5:r(i)&&$(i);break;case 4:n(i)&&$(i);}}}function n(e){for(var t=e.t,n=e.k,r=ce(n),i=r.length-1;i>=0;i--){var u=r[i];if(u!==ae){var a=t[u];if(void 0===a&&!A(t,u))return !0;var o=n[u],c=o&&o[ae];if(c?c.t!==a:!T(o,a))return !0}}var s=!!t[ae];return r.length!==ce(t).length+(s?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return !0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return !0;for(var r=0;r<t.length;r++)if(!t.hasOwnProperty(r))return !0;return !1}var i={};M("ES5",{J:function(t,n){var r=Array.isArray(t),i=function(t,n){if(t){for(var r=Array(n.length),i=0;i<n.length;i++)Object.defineProperty(r,""+i,e(i,!0));return r}var u=se(n);delete u[ae];for(var a=ce(u),o=0;o<a.length;o++){var c=a[o];u[c]=e(c,t||!!u[c].enumerable);}return Object.create(Object.getPrototypeOf(n),u)}(r,t),u={i:r?5:4,A:n?n.A:_(),P:!1,I:!1,D:{},l:n,t:t,k:i,o:null,O:!1,C:!1};return Object.defineProperty(i,ae,{value:u,writable:!0}),i},S:function(e,n,i){i?w(n)&&n[ae].A===e&&t(e.p):(e.u&&function e(t){if(t&&"object"==typeof t){var n=t[ae];if(n){var i=n.t,u=n.k,a=n.D,o=n.i;if(4===o)j(u,(function(t){t!==ae&&(void 0!==i[t]||A(i,t)?a[t]||e(u[t]):(a[t]=!0,$(n)));})),j(i,(function(e){void 0!==u[e]||A(u,e)||(a[e]=!1,$(n));}));else if(5===o){if(r(n)&&($(n),a.length=!0),u.length<i.length)for(var c=u.length;c<i.length;c++)a[c]=!1;else for(var s=i.length;s<u.length;s++)a[s]=!0;for(var f=Math.min(u.length,i.length),l=0;l<f;l++)u.hasOwnProperty(l)||(a[l]=!0),void 0===a[l]&&e(u[l]);}}}}(e.p[0]),t(e.p));},K:function(e){return 4===e.i?n(e):r(e)}});}();var He=Pe;function Ge(e,t){if(e===t||!(He(e)&&He(t)||Array.isArray(e)&&Array.isArray(t)))return t;for(var n=Object.keys(t),r=Object.keys(e),i=n.length===r.length,u=Array.isArray(t)?[]:{},a=0,o=n;a<o.length;a++){var c=o[a];u[c]=Ge(e[c],t[c]),i&&(i=e[c]===u[c]);}return i?e:u}var $e=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return fetch.apply(void 0,e)},Xe=function(e){return e.status>=200&&e.status<=299},Ye=function(e){return /ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"")};function Ze(e){if(!Pe(e))return e;for(var t=p({},e),n=0,r=Object.entries(t);n<r.length;n++){var i=r[n];void 0===i[1]&&delete t[i[0]];}return t}function et(e){var t=this;void 0===e&&(e={});var n=e.baseUrl,r=e.prepareHeaders,u=void 0===r?function(e){return e}:r,a=e.fetchFn,o=void 0===a?$e:a,c=e.paramsSerializer,s=e.isJsonContentType,f=void 0===s?Ye:s,l=e.jsonContentType,d=void 0===l?"application/json":l,g=e.timeout,m=e.validateStatus,b=h(e,["baseUrl","prepareHeaders","fetchFn","paramsSerializer","isJsonContentType","jsonContentType","timeout","validateStatus"]);return "undefined"==typeof fetch&&o===$e&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),function(e,r){return y(t,null,(function(){var t,a,s,l,y,w,S,j,q,A,P,R,T,k,x,I,C,E,D,N,Q,M,_,K,F,z,U,W,L,B,J,V,H,G,$,X,Y,Z,ee,te;return i(this,(function(i){switch(i.label){case 0:return t=r.signal,a=r.getState,s=r.extra,l=r.endpoint,y=r.forced,w=r.type,q=(j="string"==typeof e?{url:e}:e).url,P=void 0===(A=j.method)?"GET":A,T=void 0===(R=j.headers)?new Headers(b.headers):R,x=void 0===(k=j.body)?void 0:k,C=void 0===(I=j.params)?void 0:I,D=void 0===(E=j.responseHandler)?"json":E,Q=void 0===(N=j.validateStatus)?null!=m?m:Xe:N,_=void 0===(M=j.timeout)?g:M,K=h(j,["url","method","headers","body","params","responseHandler","validateStatus","timeout"]),F=p(v(p({},b),{method:P,signal:t,body:x}),K),T=new Headers(Ze(T)),z=F,[4,u(T,{getState:a,extra:s,endpoint:l,forced:y,type:w})];case 1:z.headers=i.sent()||T,U=function(e){return "object"==typeof e&&(Pe(e)||Array.isArray(e)||"function"==typeof e.toJSON)},!F.headers.has("content-type")&&U(x)&&F.headers.set("content-type",d),U(x)&&f(F.headers)&&(F.body=JSON.stringify(x)),C&&(W=~q.indexOf("?")?"&":"?",L=c?c(C):new URLSearchParams(Ze(C)),q+=W+L),q=function(e,t){if(!e)return t;if(!t)return e;if(function(e){return new RegExp("(^|:)//").test(e)}(t))return t;var n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=function(e){return e.replace(/\/$/,"")}(e),""+e+n+function(e){return e.replace(/^\//,"")}(t)}(n,q),B=new Request(q,F),J=B.clone(),S={request:J},H=!1,G=_&&setTimeout((function(){H=!0,r.abort();}),_),i.label=2;case 2:return i.trys.push([2,4,5,6]),[4,o(B)];case 3:return V=i.sent(),[3,6];case 4:return $=i.sent(),[2,{error:{status:H?"TIMEOUT_ERROR":"FETCH_ERROR",error:String($)},meta:S}];case 5:return G&&clearTimeout(G),[7];case 6:X=V.clone(),S.response=X,Z="",i.label=7;case 7:return i.trys.push([7,9,,10]),[4,Promise.all([O(V,D).then((function(e){return Y=e}),(function(e){return ee=e})),X.text().then((function(e){return Z=e}),(function(){}))])];case 8:if(i.sent(),ee)throw ee;return [3,10];case 9:return te=i.sent(),[2,{error:{status:"PARSING_ERROR",originalStatus:V.status,data:Z,error:String(te)},meta:S}];case 10:return [2,Q(V,Y)?{data:Y,meta:S}:{error:{status:V.status,data:Y},meta:S}]}}))}))};function O(e,t){return y(this,null,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return "function"==typeof t?[2,t(e)]:("content-type"===t&&(t=f(e.headers)?"json":"text"),"json"!==t?[3,2]:[4,e.text()]);case 1:return [2,(n=r.sent()).length?JSON.parse(n):null];case 2:return [2,e.text()]}}))}))}}var tt=function(e,t){void 0===t&&(t=void 0),this.value=e,this.meta=t;};function nt(e,t){return void 0===e&&(e=0),void 0===t&&(t=5),y(this,null,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return n=Math.min(e,t),r=~~((Math.random()+.4)*(300<<n)),[4,new Promise((function(e){return setTimeout((function(t){return e(t)}),r)}))];case 1:return i.sent(),[2]}}))}))}var rt,it,ut={},at=Object.assign((function(e,t){return function(n,r,u){return y(void 0,null,(function(){var a,o,c,s,f,l,d;return i(this,(function(i){switch(i.label){case 0:a=[5,(t||ut).maxRetries,(u||ut).maxRetries].filter((function(e){return void 0!==e})),o=a.slice(-1)[0],c=function(e,t,n){return n.attempt<=o},s=p(p({maxRetries:o,backoff:nt,retryCondition:c},t),u),f=0,i.label=1;case 1:i.label=2;case 2:return i.trys.push([2,4,,6]),[4,e(n,r,u)];case 3:if((l=i.sent()).error)throw new tt(l);return [2,l];case 4:if(d=i.sent(),f++,d.throwImmediately){if(d instanceof tt)return [2,d.value];throw d}return d instanceof tt&&!s.retryCondition(d.value.error,n,{attempt:f,baseQueryApi:r,extraOptions:u})?[2,d.value]:[4,s.backoff(f,s.maxRetries)];case 5:return i.sent(),[3,6];case 6:return [3,1];case 7:return [2]}}))}))}}),{fail:function(e){throw Object.assign(new tt({error:e}),{throwImmediately:!0})}}),ot=Te("__rtkq/focused"),ct=Te("__rtkq/unfocused"),st=Te("__rtkq/online"),ft=Te("__rtkq/offline"),lt=!1;function dt(e,t){return t?t(e,{onFocus:ot,onFocusLost:ct,onOffline:ft,onOnline:st}):(n=function(){return e(ot())},r=function(){return e(st())},i=function(){return e(ft())},u=function(){"visible"===window.document.visibilityState?n():e(ct());},lt||"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("visibilitychange",u,!1),window.addEventListener("focus",n,!1),window.addEventListener("online",r,!1),window.addEventListener("offline",i,!1),lt=!0),function(){window.removeEventListener("focus",n),window.removeEventListener("visibilitychange",u),window.removeEventListener("online",r),window.removeEventListener("offline",i),lt=!1;});var n,r,i,u;}function pt(e){return e.type===rt.query}function vt(e,t,n,r,i,u){return "function"==typeof e?e(t,n,r,i).map(ht).map(u):Array.isArray(e)?e.map(ht).map(u):[]}function ht(e){return "string"==typeof e?{type:e}:e}function yt(e){return null!=e}(it=rt||(rt={})).query="query",it.mutation="mutation";var gt=Symbol("forceQueryFn"),mt=function(e){return "function"==typeof e[gt]};function bt(e){return e}function Ot(e,t,n,r){return vt(n[e.meta.arg.endpointName][t],Je(e)?e.payload:void 0,Be(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function wt(e,t,n){var r=e[t];r&&n(r);}function St(e){var t;return null!=(t="arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)?t:e.requestId}function jt(e,t,n){var r=e[St(t)];r&&n(r);}var qt={},At=Symbol.for("RTKQ/skipToken"),Pt=At,Rt={status:exports.QueryStatus.uninitialized},Tt=ge(Rt,(function(){})),kt=ge(Rt,(function(){})),xt=function(e){return e.endpointName+"("+JSON.stringify(e.queryArgs,(function(e,t){return Pe(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}))+")"};function It(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var n=Se((function(e){var n,r;return null==(r=t.extractRehydrationInfo)?void 0:r.call(t,e,{reducerPath:null!=(n=t.reducerPath)?n:"api"})})),r=v(p({reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1},t),{extractRehydrationInfo:n,serializeQueryArgs:function(e){var n=xt;if("serializeQueryArgs"in e.endpointDefinition){var r=e.endpointDefinition.serializeQueryArgs;n=function(e){var t=r(e);return "string"==typeof t?t:xt(v(p({},e),{queryArgs:t}))};}else t.serializeQueryArgs&&(n=t.serializeQueryArgs);return n(e)},tagTypes:u([],t.tagTypes||[])}),i={endpointDefinitions:{},batch:function(e){e();},apiUid:Ie(),extractRehydrationInfo:n,hasRehydrationInfo:Se((function(e){return null!=n(e)}))},a={injectEndpoints:function(e){for(var t=e.endpoints({query:function(e){return v(p({},e),{type:rt.query})},mutation:function(e){return v(p({},e),{type:rt.mutation})}}),n=0,r=Object.entries(t);n<r.length;n++){var u=r[n],c=u[0],s=u[1];if(e.overrideExisting||!(c in i.endpointDefinitions)){i.endpointDefinitions[c]=s;for(var f=0,l=o;f<l.length;f++)l[f].injectEndpoint(c,s);}}return a},enhanceEndpoints:function(e){var t=e.addTagTypes,n=e.endpoints;if(t)for(var u=0,o=t;u<o.length;u++){var c=o[u];r.tagTypes.includes(c)||r.tagTypes.push(c);}if(n)for(var s=0,f=Object.entries(n);s<f.length;s++){var l=f[s],d=l[0],p=l[1];"function"==typeof p?p(i.endpointDefinitions[d]):Object.assign(i.endpointDefinitions[d]||{},p);}return a}},o=e.map((function(e){return e.init(a,r,i)}));return a.injectEndpoints({endpoints:t.endpoints})}}function Ct(){return function(){throw new Error("When using `fakeBaseQuery`, all queries & mutations must use the `queryFn` definition syntax.")}}var Et,Dt=function(e){var t=e.reducerPath,n=e.api,r=e.context,i=e.internalState,u=n.internalActions,a=u.removeQueryResult,o=u.unsubscribeQueryResult;function c(e){var t=i.currentSubscriptions[e];return !!t&&!function(e){for(var t in e)return !1;return !0}(t)}var s={};function f(e,t,n,i){var u,o=r.endpointDefinitions[t],f=null!=(u=null==o?void 0:o.keepUnusedDataFor)?u:i.keepUnusedDataFor;if(Infinity!==f){var l=Math.max(0,Math.min(f,2147482.647));if(!c(e)){var d=s[e];d&&clearTimeout(d),s[e]=setTimeout((function(){c(e)||n.dispatch(a({queryCacheKey:e})),delete s[e];}),1e3*l);}}}return function(e,i,u){var a;if(o.match(e)){var c=i.getState()[t];f(b=e.payload.queryCacheKey,null==(a=c.queries[b])?void 0:a.endpointName,i,c.config);}if(n.util.resetApiState.match(e))for(var l=0,d=Object.entries(s);l<d.length;l++){var p=d[l],v=p[0],h=p[1];h&&clearTimeout(h),delete s[v];}if(r.hasRehydrationInfo(e)){c=i.getState()[t];for(var y=r.extractRehydrationInfo(e).queries,g=0,m=Object.entries(y);g<m.length;g++){var b,O=m[g],w=O[1];f(b=O[0],null==w?void 0:w.endpointName,i,c.config);}}}},Nt=function(e){var n=e.reducerPath,r=e.context,i=e.context.endpointDefinitions,u=e.mutationThunk,a=e.api,o=e.assertTagType,c=e.refetchQuery,s=a.internalActions.removeQueryResult,f=Ke(Je(u),Be(u));function l(e,i){var u=i.getState(),o=u[n],f=a.util.selectInvalidatedBy(u,e);r.batch((function(){for(var e,n=0,r=Array.from(f.values());n<r.length;n++){var u=r[n].queryCacheKey,a=o.queries[u],l=null!=(e=o.subscriptions[u])?e:{};a&&(0===Object.keys(l).length?i.dispatch(s({queryCacheKey:u})):a.status!==exports.QueryStatus.uninitialized&&i.dispatch(c(a,u)));}}));}return function(e,t){f(e)&&l(Ot(e,"invalidatesTags",i,o),t),a.util.invalidateTags.match(e)&&l(vt(e.payload,void 0,void 0,void 0,void 0,o),t);}},Qt=function(e){var n=e.reducerPath,r=e.queryThunk,i=e.api,u=e.refetchQuery,a=e.internalState,o={};function c(e,r){var i=e.queryCacheKey,c=r.getState()[n].queries[i];if(c&&c.status!==exports.QueryStatus.uninitialized){var s=l(a.currentSubscriptions[i]);if(Number.isFinite(s)){var f=o[i];(null==f?void 0:f.timeout)&&(clearTimeout(f.timeout),f.timeout=void 0);var d=Date.now()+s,p=o[i]={nextPollTimestamp:d,pollingInterval:s,timeout:setTimeout((function(){p.timeout=void 0,r.dispatch(u(c,i));}),s)};}}}function s(e,r){var i=e.queryCacheKey,u=r.getState()[n].queries[i];if(u&&u.status!==exports.QueryStatus.uninitialized){var s=l(a.currentSubscriptions[i]);if(Number.isFinite(s)){var d=o[i],p=Date.now()+s;(!d||p<d.nextPollTimestamp)&&c({queryCacheKey:i},r);}else f(i);}}function f(e){var t=o[e];(null==t?void 0:t.timeout)&&clearTimeout(t.timeout),delete o[e];}function l(e){void 0===e&&(e={});var t=Number.POSITIVE_INFINITY;for(var n in e)e[n].pollingInterval&&(t=Math.min(e[n].pollingInterval,t));return t}return function(e,t){(i.internalActions.updateSubscriptionOptions.match(e)||i.internalActions.unsubscribeQueryResult.match(e))&&s(e.payload,t),(r.pending.match(e)||r.rejected.match(e)&&e.meta.condition)&&s(e.meta.arg,t),(r.fulfilled.match(e)||r.rejected.match(e)&&!e.meta.condition)&&c(e.meta.arg,t),i.util.resetApiState.match(e)&&function(){for(var e=0,t=Object.keys(o);e<t.length;e++)f(t[e]);}();}},Mt=new Error("Promise never resolved before cacheEntryRemoved."),_t=function(e){var t=e.api,n=e.reducerPath,r=e.context,i=e.queryThunk,u=e.mutationThunk,a=Ve(i),o=Ve(u),c=Je(i,u),s={};function f(e,n,i,u,a){var o=r.endpointDefinitions[e],c=null==o?void 0:o.onCacheEntryAdded;if(c){var f={},l=new Promise((function(e){f.cacheEntryRemoved=e;})),d=Promise.race([new Promise((function(e){f.valueResolved=e;})),l.then((function(){throw Mt}))]);d.catch((function(){})),s[i]=f;var h=t.endpoints[e].select(o.type===rt.query?n:i),y=u.dispatch((function(e,t,n){return n})),g=v(p({},u),{getCacheEntry:function(){return h(u.getState())},requestId:a,extra:y,updateCachedData:o.type===rt.query?function(r){return u.dispatch(t.util.updateQueryData(e,n,r))}:void 0,cacheDataLoaded:d,cacheEntryRemoved:l}),m=c(n,g);Promise.resolve(m).catch((function(e){if(e!==Mt)throw e}));}}return function(e,r,l){var d=function(e){return a(e)?e.meta.arg.queryCacheKey:o(e)?e.meta.requestId:t.internalActions.removeQueryResult.match(e)?e.payload.queryCacheKey:t.internalActions.removeMutationResult.match(e)?St(e.payload):""}(e);if(i.pending.match(e)){var p=l[n].queries[d],v=r.getState()[n].queries[d];!p&&v&&f(e.meta.arg.endpointName,e.meta.arg.originalArgs,d,r,e.meta.requestId);}else if(u.pending.match(e))(v=r.getState()[n].mutations[d])&&f(e.meta.arg.endpointName,e.meta.arg.originalArgs,d,r,e.meta.requestId);else if(c(e))(null==(m=s[d])?void 0:m.valueResolved)&&(m.valueResolved({data:e.payload,meta:e.meta.baseQueryMeta}),delete m.valueResolved);else if(t.internalActions.removeQueryResult.match(e)||t.internalActions.removeMutationResult.match(e))(m=s[d])&&(delete s[d],m.cacheEntryRemoved());else if(t.util.resetApiState.match(e))for(var h=0,y=Object.entries(s);h<y.length;h++){var g=y[h],m=g[1];delete s[g[0]],m.cacheEntryRemoved();}}},Kt=function(e){var t=e.api,n=e.context,r=e.queryThunk,i=e.mutationThunk,u=We(r,i),a=Le(r,i),o=Je(r,i),c={};return function(e,r){var i,s,f;if(u(e)){var l=e.meta,d=l.requestId,h=l.arg,y=h.endpointName,g=h.originalArgs,m=n.endpointDefinitions[y],b=null==m?void 0:m.onQueryStarted;if(b){var O={},w=new Promise((function(e,t){O.resolve=e,O.reject=t;}));w.catch((function(){})),c[d]=O;var S=t.endpoints[y].select(m.type===rt.query?g:d),j=r.dispatch((function(e,t,n){return n})),q=v(p({},r),{getCacheEntry:function(){return S(r.getState())},requestId:d,extra:j,updateCachedData:m.type===rt.query?function(e){return r.dispatch(t.util.updateQueryData(y,g,e))}:void 0,queryFulfilled:w});b(g,q);}}else if(o(e)){var A=e.meta,P=A.baseQueryMeta;null==(i=c[d=A.requestId])||i.resolve({data:e.payload,meta:P}),delete c[d];}else if(a(e)){var R=e.meta;P=R.baseQueryMeta,null==(f=c[d=R.requestId])||f.reject({error:null!=(s=e.payload)?s:e.error,isUnhandledError:!R.rejectedWithValue,meta:P}),delete c[d];}}},Ft=function(e){var t=e.api,n=e.context.apiUid;return function(e,r){t.util.resetApiState.match(e)&&r.dispatch(t.internalActions.middlewareRegistered(n));}},zt="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis):function(e){return (Et||(Et=Promise.resolve())).then(e).catch((function(e){return setTimeout((function(){throw e}),0)}))};function Ut(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Object.assign.apply(Object,u([e],t));}var Wt=Symbol(),Lt=function(){return {name:Wt,init:function(e,n,r){var a=n.baseQuery,o=n.reducerPath,c=n.serializeQueryArgs,s=n.keepUnusedDataFor,f=n.refetchOnMountOrArgChange,l=n.refetchOnFocus,d=n.refetchOnReconnect;!function(){function e(t){if(!S(t))return t;if(Array.isArray(t))return t.map(e);if(k(t))return new Map(Array.from(t.entries()).map((function(t){return [t[0],e(t[1])]})));if(x(t))return new Set(Array.from(t).map(e));var n=Object.create(Object.getPrototypeOf(t));for(var r in t)n[r]=e(t[r]);return A(t,ue)&&(n[ue]=t[ue]),n}function t(t){return w(t)?e(t):t}var n="add";M("Patches",{$:function(t,r){return r.forEach((function(r){for(var i=r.path,u=r.op,a=t,o=0;o<i.length-1;o++){var c=q(a),s=""+i[o];0!==c&&1!==c||"__proto__"!==s&&"constructor"!==s||O(24),"function"==typeof a&&"prototype"===s&&O(24),"object"!=typeof(a=P(a,s))&&O(15,i.join("/"));}var f=q(a),l=e(r.value),d=i[i.length-1];switch(u){case"replace":switch(f){case 2:return a.set(d,l);case 3:O(16);default:return a[d]=l}case n:switch(f){case 1:return "-"===d?a.push(l):a.splice(d,0,l);case 2:return a.set(d,l);case 3:return a.add(l);default:return a[d]=l}case"remove":switch(f){case 1:return a.splice(d,1);case 2:return a.delete(d);case 3:return a.delete(r.value);default:return delete a[d]}default:O(17,u);}})),t},R:function(e,r,i,u){switch(e.i){case 0:case 4:case 2:return o=r,c=i,s=u,f=(a=e).t,l=a.o,void j(a.D,(function(e,r){var i=P(f,e),u=P(l,e),a=r?A(f,e)?"replace":n:"remove";if(i!==u||"replace"!==a){var d=o.concat(e);c.push("remove"===a?{op:a,path:d}:{op:a,path:d,value:u}),s.push(a===n?{op:"remove",path:d}:"remove"===a?{op:n,path:d,value:t(i)}:{op:"replace",path:d,value:t(i)});}}));case 5:case 1:return function(e,r,i,u){var a=e.t,o=e.D,c=e.o;if(c.length<a.length){var s=[c,a];a=s[0],c=s[1];var f=[u,i];i=f[0],u=f[1];}for(var l=0;l<a.length;l++)if(o[l]&&c[l]!==a[l]){var d=r.concat([l]);i.push({op:"replace",path:d,value:t(c[l])}),u.push({op:"replace",path:d,value:t(a[l])});}for(var p=a.length;p<c.length;p++){var v=r.concat([p]);i.push({op:n,path:v,value:t(c[p])});}a.length<c.length&&u.push({op:"replace",path:r.concat(["length"]),value:a.length});}(e,r,i,u);case 3:return function(e,t,r,i){var u=e.t,a=e.o,o=0;u.forEach((function(e){if(!a.has(e)){var u=t.concat([o]);r.push({op:"remove",path:u,value:e}),i.unshift({op:n,path:u,value:e});}o++;})),o=0,a.forEach((function(e){if(!u.has(e)){var a=t.concat([o]);r.push({op:n,path:a,value:e}),i.unshift({op:"remove",path:a,value:e});}o++;}));}(e,r,i,u)}var a,o,c,s,f,l;},M:function(e,t,n,r){n.push({op:"replace",path:[],value:t===ie?void 0:t}),r.push({op:"replace",path:[],value:e});}});}();var h=function(e){return e};Object.assign(e,{reducerPath:o,endpoints:{},internalActions:{onOnline:st,onOffline:ft,onFocus:ot,onFocusLost:ct},util:{}});var g=function(e){var n=this,r=e.reducerPath,u=e.baseQuery,a=e.context.endpointDefinitions,o=e.serializeQueryArgs,c=e.api,s=function(e,t){return y(n,[e,t],(function(e,t){var n,r,o,c,s,l,d,p,v,h,y,g,m,b=t.signal,O=t.abort,w=t.rejectWithValue,S=t.fulfillWithValue,j=t.dispatch,q=t.getState,A=t.extra;return i(this,(function(t){switch(t.label){case 0:n=a[e.endpointName],t.label=1;case 1:return t.trys.push([1,8,,13]),r=bt,o=void 0,c={signal:b,abort:O,dispatch:j,getState:q,extra:A,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?f(e,q()):void 0},(s="query"===e.type?e[gt]:void 0)?(o=s(),[3,6]):[3,2];case 2:return n.query?[4,u(n.query(e.originalArgs),c,n.extraOptions)]:[3,4];case 3:return o=t.sent(),n.transformResponse&&(r=n.transformResponse),[3,6];case 4:return [4,n.queryFn(e.originalArgs,c,n.extraOptions,(function(e){return u(e,c,n.extraOptions)}))];case 5:o=t.sent(),t.label=6;case 6:if(o.error)throw new tt(o.error,o.meta);return l=S,[4,r(o.data,o.meta,e.originalArgs)];case 7:return [2,l.apply(void 0,[t.sent(),(g={fulfilledTimeStamp:Date.now(),baseQueryMeta:o.meta},g.RTK_autoBatch=!0,g)])];case 8:if(d=t.sent(),!((p=d)instanceof tt))return [3,12];v=bt,n.query&&n.transformErrorResponse&&(v=n.transformErrorResponse),t.label=9;case 9:return t.trys.push([9,11,,12]),h=w,[4,v(p.value,p.meta,e.originalArgs)];case 10:return [2,h.apply(void 0,[t.sent(),(m={baseQueryMeta:p.meta},m.RTK_autoBatch=!0,m)])];case 11:return y=t.sent(),p=y,[3,12];case 12:throw console.error(p),p;case 13:return [2]}}))}))};function f(e,t){var n,i,u,a,o=null==(i=null==(n=t[r])?void 0:n.queries)?void 0:i[e.queryCacheKey],c=null==(u=t[r])?void 0:u.config.refetchOnMountOrArgChange,s=null==o?void 0:o.fulfilledTimeStamp,f=null!=(a=e.forceRefetch)?a:e.subscribe&&c;return !!f&&(!0===f||(Number(new Date)-Number(s))/1e3>=f)}var l=Qe(r+"/executeQuery",s,{getPendingMeta:function(){var e;return (e={startedTimeStamp:Date.now()}).RTK_autoBatch=!0,e},condition:function(e,t){var n,i,u,o=(0, t.getState)(),c=null==(i=null==(n=o[r])?void 0:n.queries)?void 0:i[e.queryCacheKey],s=null==c?void 0:c.fulfilledTimeStamp,l=e.originalArgs,d=null==c?void 0:c.originalArgs,p=a[e.endpointName];return !(!mt(e)&&("pending"===(null==c?void 0:c.status)||!f(e,o)&&(!pt(p)||!(null==(u=null==p?void 0:p.forceRefetch)?void 0:u.call(p,{currentArg:l,previousArg:d,endpointState:c,state:o})))&&s))},dispatchConditionRejection:!0}),d=Qe(r+"/executeMutation",s,{getPendingMeta:function(){var e;return (e={startedTimeStamp:Date.now()}).RTK_autoBatch=!0,e}});function p(e){return function(t){var n,r;return (null==(r=null==(n=null==t?void 0:t.meta)?void 0:n.arg)?void 0:r.endpointName)===e}}return {queryThunk:l,mutationThunk:d,prefetch:function(e,t,n){return function(r,i){var u=function(e){return "force"in e}(n)&&n.force,a=function(e){return "ifOlderThan"in e}(n)&&n.ifOlderThan,o=function(n){return void 0===n&&(n=!0),c.endpoints[e].initiate(t,{forceRefetch:n})},s=c.endpoints[e].select(t)(i());if(u)r(o());else if(a){var f=null==s?void 0:s.fulfilledTimeStamp;if(!f)return void r(o());(Number(new Date)-Number(new Date(f)))/1e3>=a&&r(o());}else r(o(!1));}},updateQueryData:function(e,n,r){return function(i,u){var a,o,s=c.endpoints[e].select(n)(u()),f={patches:[],inversePatches:[],undo:function(){return i(c.util.patchQueryData(e,n,f.inversePatches))}};if(s.status===exports.QueryStatus.uninitialized)return f;if("data"in s)if(S(s.data)){var l=he(s.data,r),d=l[2];(a=f.patches).push.apply(a,l[1]),(o=f.inversePatches).push.apply(o,d);}else {var p=r(s.data);f.patches.push({op:"replace",path:[],value:p}),f.inversePatches.push({op:"replace",path:[],value:s.data});}return i(c.util.patchQueryData(e,n,f.patches)),f}},upsertQueryData:function(e,t,n){return function(r){var i;return r(c.endpoints[e].initiate(t,((i={subscribe:!1,forceRefetch:!0})[gt]=function(){return {data:n}},i)))}},patchQueryData:function(e,t,n){return function(r){r(c.internalActions.queryResultPatched({queryCacheKey:o({queryArgs:t,endpointDefinition:a[e],endpointName:e}),patches:n}));}},buildMatchThunkActions:function(e,t){return {matchPending:Fe(We(e),p(t)),matchFulfilled:Fe(Je(e),p(t)),matchRejected:Fe(Le(e),p(t))}}}}({baseQuery:a,reducerPath:o,context:r,api:e,serializeQueryArgs:c}),m=g.queryThunk,R=g.mutationThunk,T=g.patchQueryData,I=g.updateQueryData,C=g.upsertQueryData,E=g.prefetch,D=g.buildMatchThunkActions,N=function(e){var n=e.reducerPath,r=e.queryThunk,i=e.mutationThunk,u=e.context,a=u.endpointDefinitions,o=u.apiUid,c=u.extractRehydrationInfo,s=u.hasRehydrationInfo,f=e.assertTagType,l=e.config,d=Te(n+"/resetApiState"),h=xe({name:n+"/queries",initialState:qt,reducers:{removeQueryResult:{reducer:function(e,t){delete e[t.payload.queryCacheKey];},prepare:function(e){var t;return {payload:e,meta:(t={},t.RTK_autoBatch=!0,t)}}},queryResultPatched:function(e,t){var n=t.payload,r=n.patches;wt(e,n.queryCacheKey,(function(e){e.data=ye(e.data,r.concat());}));}},extraReducers:function(e){e.addCase(r.pending,(function(e,n){var r,i=n.meta,u=n.meta.arg,a=mt(u);(u.subscribe||a)&&(null!=e[r=u.queryCacheKey]||(e[r]={status:exports.QueryStatus.uninitialized,endpointName:u.endpointName})),wt(e,u.queryCacheKey,(function(e){e.status=exports.QueryStatus.pending,e.requestId=a&&e.requestId?e.requestId:i.requestId,void 0!==u.originalArgs&&(e.originalArgs=u.originalArgs),e.startedTimeStamp=i.startedTimeStamp;}));})).addCase(r.fulfilled,(function(e,n){var r=n.meta,i=n.payload;wt(e,r.arg.queryCacheKey,(function(e){var n;if(e.requestId===r.requestId||mt(r.arg)){var u=a[r.arg.endpointName].merge;if(e.status=exports.QueryStatus.fulfilled,u)if(void 0!==e.data){var o=r.fulfilledTimeStamp,c=r.arg,s=r.baseQueryMeta,f=r.requestId,l=ge(e.data,(function(e){return u(e,i,{arg:c.originalArgs,baseQueryMeta:s,fulfilledTimeStamp:o,requestId:f})}));e.data=l;}else e.data=i;else e.data=null==(n=a[r.arg.endpointName].structuralSharing)||n?Ge(e.data,i):i;delete e.error,e.fulfilledTimeStamp=r.fulfilledTimeStamp;}}));})).addCase(r.rejected,(function(e,n){var r=n.meta,i=r.condition,u=r.requestId,a=n.error,o=n.payload;wt(e,r.arg.queryCacheKey,(function(e){if(i);else {if(e.requestId!==u)return;e.status=exports.QueryStatus.rejected,e.error=null!=o?o:a;}}));})).addMatcher(s,(function(e,n){for(var r=c(n).queries,i=0,u=Object.entries(r);i<u.length;i++){var a=u[i],o=a[1];(null==o?void 0:o.status)!==exports.QueryStatus.fulfilled&&(null==o?void 0:o.status)!==exports.QueryStatus.rejected||(e[a[0]]=o);}}));}}),y=xe({name:n+"/mutations",initialState:qt,reducers:{removeMutationResult:{reducer:function(e,t){var n=St(t.payload);n in e&&delete e[n];},prepare:function(e){var t;return {payload:e,meta:(t={},t.RTK_autoBatch=!0,t)}}}},extraReducers:function(e){e.addCase(i.pending,(function(e,n){var r=n.meta,i=r.requestId,u=r.arg,a=r.startedTimeStamp;u.track&&(e[St(n.meta)]={requestId:i,status:exports.QueryStatus.pending,endpointName:u.endpointName,startedTimeStamp:a});})).addCase(i.fulfilled,(function(e,n){var r=n.payload,i=n.meta;i.arg.track&&jt(e,i,(function(e){e.requestId===i.requestId&&(e.status=exports.QueryStatus.fulfilled,e.data=r,e.fulfilledTimeStamp=i.fulfilledTimeStamp);}));})).addCase(i.rejected,(function(e,n){var r=n.payload,i=n.error,u=n.meta;u.arg.track&&jt(e,u,(function(e){e.requestId===u.requestId&&(e.status=exports.QueryStatus.rejected,e.error=null!=r?r:i);}));})).addMatcher(s,(function(e,n){for(var r=c(n).mutations,i=0,u=Object.entries(r);i<u.length;i++){var a=u[i],o=a[0],s=a[1];(null==s?void 0:s.status)!==exports.QueryStatus.fulfilled&&(null==s?void 0:s.status)!==exports.QueryStatus.rejected||o===(null==s?void 0:s.requestId)||(e[o]=s);}}));}}),g=xe({name:n+"/invalidation",initialState:qt,reducers:{},extraReducers:function(e){e.addCase(h.actions.removeQueryResult,(function(e,t){for(var n=t.payload.queryCacheKey,r=0,i=Object.values(e);r<i.length;r++)for(var u=0,a=Object.values(i[r]);u<a.length;u++){var o=a[u],c=o.indexOf(n);-1!==c&&o.splice(c,1);}})).addMatcher(s,(function(e,t){for(var n,r,i,u,a=c(t).provided,o=0,s=Object.entries(a);o<s.length;o++)for(var f=s[o],l=f[0],d=0,p=Object.entries(f[1]);d<p.length;d++)for(var v=p[d],h=v[0],y=v[1],g=null!=(u=(r=null!=(n=e[l])?n:e[l]={})[i=h||"__internal_without_id"])?u:r[i]=[],m=0,b=y;m<b.length;m++){var O=b[m];g.includes(O)||g.push(O);}})).addMatcher(Ke(Je(r),Be(r)),(function(e,t){for(var n,r,i,u,o=Ot(t,"providesTags",a,f),c=t.meta.arg.queryCacheKey,s=0,l=Object.values(e);s<l.length;s++)for(var d=0,p=Object.values(l[s]);d<p.length;d++){var v=p[d],h=v.indexOf(c);-1!==h&&v.splice(h,1);}for(var y=0,g=o;y<g.length;y++){var m=g[y],b=m.type,O=m.id,w=null!=(u=(r=null!=(n=e[b])?n:e[b]={})[i=O||"__internal_without_id"])?u:r[i]=[];w.includes(c)||w.push(c);}}));}}),m=xe({name:n+"/subscriptions",initialState:qt,reducers:{updateSubscriptionOptions:function(e,t){},unsubscribeQueryResult:function(e,t){},internal_probeSubscription:function(e,t){}}}),b=xe({name:n+"/internalSubscriptions",initialState:qt,reducers:{subscriptionsUpdated:function(e,t){return ye(e,t.payload)}}}),O=xe({name:n+"/config",initialState:p({online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine,focused:"undefined"==typeof document||"hidden"!==document.visibilityState,middlewareRegistered:!1},l),reducers:{middlewareRegistered:function(e,t){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&o===t.payload||"conflict";}},extraReducers:function(e){e.addCase(st,(function(e){e.online=!0;})).addCase(ft,(function(e){e.online=!1;})).addCase(ot,(function(e){e.focused=!0;})).addCase(ct,(function(e){e.focused=!1;})).addMatcher(s,(function(e){return p({},e)}));}}),w=function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];"function"==typeof e[i]&&(n[i]=e[i]);}var u,a=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:Oe.INIT}))throw new Error(me(12));if(void 0===n(void 0,{type:Oe.PROBE_UNKNOWN_ACTION()}))throw new Error(me(13))}));}(n);}catch(e){u=e;}return function(e,t){if(void 0===e&&(e={}),u)throw u;for(var r=!1,i={},o=0;o<a.length;o++){var c=a[o],s=e[c],f=(0, n[c])(s,t);if(void 0===f)throw new Error(me(14));i[c]=f,r=r||f!==s;}return (r=r||a.length!==Object.keys(e).length)?i:e}}({queries:h.reducer,mutations:y.reducer,provided:g.reducer,subscriptions:b.reducer,config:O.reducer});return {reducer:function(e,t){return w(d.match(t)?void 0:e,t)},actions:v(p(p(p(p(p({},O.actions),h.actions),m.actions),b.actions),y.actions),{unsubscribeMutationResult:y.actions.removeMutationResult,resetApiState:d})}}({context:r,queryThunk:m,mutationThunk:R,reducerPath:o,assertTagType:h,config:{refetchOnFocus:l,refetchOnReconnect:d,refetchOnMountOrArgChange:f,keepUnusedDataFor:s,reducerPath:o}}),Q=N.reducer,_=N.actions;Ut(e.util,{patchQueryData:T,updateQueryData:I,upsertQueryData:C,prefetch:E,resetApiState:_.resetApiState}),Ut(e.internalActions,_);var K=function(e){var n=e.reducerPath,r=e.queryThunk,i=e.api,u=e.context,a=u.apiUid,o={invalidateTags:Te(n+"/invalidateTags")},c=[Ft,Dt,Nt,Qt,_t,Kt];return {middleware:function(r){var o=!1,f=v(p({},e),{internalState:{currentSubscriptions:{}},refetchQuery:s}),l=c.map((function(e){return e(f)})),d=function(e){var t=e.api,n=e.queryThunk,r=e.internalState,i=t.reducerPath+"/subscriptions",u=null,a=!1,o=t.internalActions,c=o.updateSubscriptionOptions,s=o.unsubscribeQueryResult;return function(e,o){var f,l;if(u||(u=JSON.parse(JSON.stringify(r.currentSubscriptions))),t.internalActions.internal_probeSubscription.match(e)){var d=e.payload;return [!1,!!(null==(f=r.currentSubscriptions[d.queryCacheKey])?void 0:f[d.requestId])]}var p=function(e,r){var i,u,a,o,f,l,d,p,v;if(c.match(r)){var h=r.payload,y=h.queryCacheKey,g=h.requestId;return (null==(i=null==e?void 0:e[y])?void 0:i[g])&&(e[y][g]=h.options),!0}if(s.match(r)){var m=r.payload;return g=m.requestId,e[y=m.queryCacheKey]&&delete e[y][g],!0}if(t.internalActions.removeQueryResult.match(r))return delete e[r.payload.queryCacheKey],!0;if(n.pending.match(r)){var b=r.meta;if(g=b.requestId,(S=b.arg).subscribe)return (O=null!=(a=e[u=S.queryCacheKey])?a:e[u]={})[g]=null!=(f=null!=(o=S.subscriptionOptions)?o:O[g])?f:{},!0}if(n.rejected.match(r)){var O,w=r.meta,S=w.arg;if(g=w.requestId,w.condition&&S.subscribe)return (O=null!=(d=e[l=S.queryCacheKey])?d:e[l]={})[g]=null!=(v=null!=(p=S.subscriptionOptions)?p:O[g])?v:{},!0}return !1}(r.currentSubscriptions,e);if(p){a||(zt((function(){var e=JSON.parse(JSON.stringify(r.currentSubscriptions)),n=he(u,(function(){return e}));o.next(t.internalActions.subscriptionsUpdated(n[1])),u=e,a=!1;})),a=!0);var v=!!(null==(l=e.type)?void 0:l.startsWith(i)),h=n.rejected.match(e)&&e.meta.condition&&!!e.meta.arg.subscribe;return [!v&&!h,!1]}return [!0,!1]}}(f),h=function(e){var n=e.reducerPath,r=e.context,i=e.refetchQuery,u=e.internalState,a=e.api.internalActions.removeQueryResult;function o(e,o){var c=e.getState()[n],s=c.queries,f=u.currentSubscriptions;r.batch((function(){for(var n=0,r=Object.keys(f);n<r.length;n++){var u=r[n],l=s[u],d=f[u];d&&l&&(Object.values(d).some((function(e){return !0===e[o]}))||Object.values(d).every((function(e){return void 0===e[o]}))&&c.config[o])&&(0===Object.keys(d).length?e.dispatch(a({queryCacheKey:u})):l.status!==exports.QueryStatus.uninitialized&&e.dispatch(i(l,u)));}}));}return function(e,t){ot.match(e)&&o(t,"refetchOnFocus"),st.match(e)&&o(t,"refetchOnReconnect");}}(f);return function(e){return function(t){o||(o=!0,r.dispatch(i.internalActions.middlewareRegistered(a)));var c,s=v(p({},r),{next:e}),f=r.getState(),y=d(t,s,f),g=y[1];if(c=y[0]?e(t):g,r.getState()[n]&&(h(t,s,f),function(e){return !!e&&"string"==typeof e.type&&e.type.startsWith(n+"/")}(t)||u.hasRehydrationInfo(t)))for(var m=0,b=l;m<b.length;m++)(0, b[m])(t,s,f);return c}}},actions:o};function s(e,t,n){return void 0===n&&(n={}),r(p({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t},n))}}({reducerPath:o,context:r,queryThunk:m,mutationThunk:R,api:e,assertTagType:h}),F=K.middleware;Ut(e.util,K.actions),Ut(e,{reducer:Q,middleware:F});var z=function(e){var n=e.serializeQueryArgs,r=e.reducerPath,i=function(e){return Tt},u=function(e){return kt};return {buildQuerySelector:function(e,t){return function(r){var u=n({queryArgs:r,endpointDefinition:t,endpointName:e});return Ae(r===At?i:function(e){var t,n,r;return null!=(r=null==(n=null==(t=o(e))?void 0:t.queries)?void 0:n[u])?r:Tt},a)}},buildMutationSelector:function(){return function(e){var t,n;return n="object"==typeof e?null!=(t=St(e))?t:At:e,Ae(n===At?u:function(e){var t,r,i;return null!=(i=null==(r=null==(t=o(e))?void 0:t.mutations)?void 0:r[n])?i:kt},a)}},selectInvalidatedBy:function(e,t){for(var n,i=e[r],u=new Set,a=0,o=t.map(ht);a<o.length;a++){var c=o[a],s=i.provided[c.type];if(s)for(var f=0,l=null!=(n=void 0!==c.id?s[c.id]:b(Object.values(s)))?n:[];f<l.length;f++)u.add(l[f]);}return b(Array.from(u.values()).map((function(e){var t=i.queries[e];return t?[{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}]:[]})))}};function a(e){return p(p({},e),{status:n=e.status,isUninitialized:n===exports.QueryStatus.uninitialized,isLoading:n===exports.QueryStatus.pending,isSuccess:n===exports.QueryStatus.fulfilled,isError:n===exports.QueryStatus.rejected});var n;}function o(e){return e[r]}}({serializeQueryArgs:c,reducerPath:o}),U=z.buildQuerySelector,W=z.buildMutationSelector;Ut(e.util,{selectInvalidatedBy:z.selectInvalidatedBy});var L=function(e){var t=e.serializeQueryArgs,n=e.queryThunk,r=e.mutationThunk,a=e.api,o=e.context,c=new Map,s=new Map,f=a.internalActions,l=f.unsubscribeQueryResult,d=f.removeMutationResult,p=f.updateSubscriptionOptions;return {buildInitiateQuery:function(e,r){var u=function(o,s){var f=void 0===s?{}:s,d=f.subscribe,v=void 0===d||d,h=f.forceRefetch,g=f.subscriptionOptions,m=f[gt];return function(s,f){var d,b,O=t({queryArgs:o,endpointDefinition:r,endpointName:e}),w=n(((d={type:"query",subscribe:v,forceRefetch:h,subscriptionOptions:g,endpointName:e,originalArgs:o,queryCacheKey:O})[gt]=m,d)),S=a.endpoints[e].select(o),j=s(w),q=S(f()),A=j.requestId,P=j.abort,R=q.requestId!==A,T=null==(b=c.get(s))?void 0:b[O],k=function(){return S(f())},x=Object.assign(m?j.then(k):R&&!T?Promise.resolve(q):Promise.all([T,j]).then(k),{arg:o,requestId:A,subscriptionOptions:g,queryCacheKey:O,abort:P,unwrap:function(){return y(this,null,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return [4,x];case 1:if((e=t.sent()).isError)throw e.error;return [2,e.data]}}))}))},refetch:function(){return s(u(o,{subscribe:!1,forceRefetch:!0}))},unsubscribe:function(){v&&s(l({queryCacheKey:O,requestId:A}));},updateSubscriptionOptions:function(t){x.subscriptionOptions=t,s(p({endpointName:e,requestId:A,queryCacheKey:O,options:t}));}});if(!T&&!R&&!m){var I=c.get(s)||{};I[O]=x,c.set(s,I),x.then((function(){delete I[O],Object.keys(I).length||c.delete(s);}));}return x}};return u},buildInitiateMutation:function(e){return function(t,n){var i=void 0===n?{}:n,u=i.track,a=void 0===u||u,o=i.fixedCacheKey;return function(n,i){var u=r({type:"mutation",endpointName:e,originalArgs:t,track:a,fixedCacheKey:o}),c=n(u),f=c.requestId,l=c.abort,p=c.unwrap,v=c.unwrap().then((function(e){return {data:e}})).catch((function(e){return {error:e}})),h=function(){n(d({requestId:f,fixedCacheKey:o}));},y=Object.assign(v,{arg:c.arg,requestId:f,abort:l,unwrap:p,unsubscribe:h,reset:h}),g=s.get(n)||{};return s.set(n,g),g[f]=y,y.then((function(){delete g[f],Object.keys(g).length||s.delete(n);})),o&&(g[o]=y,y.then((function(){g[o]===y&&(delete g[o],Object.keys(g).length||s.delete(n));}))),y}}},getRunningQueryThunk:function(e,n){return function(r){var i,u=t({queryArgs:n,endpointDefinition:o.endpointDefinitions[e],endpointName:e});return null==(i=c.get(r))?void 0:i[u]}},getRunningMutationThunk:function(e,t){return function(e){var n;return null==(n=s.get(e))?void 0:n[t]}},getRunningQueriesThunk:function(){return function(e){return Object.values(c.get(e)||{}).filter(yt)}},getRunningMutationsThunk:function(){return function(e){return Object.values(s.get(e)||{}).filter(yt)}},getRunningOperationPromises:function(){var e=function(e){return Array.from(e.values()).flatMap((function(e){return e?Object.values(e):[]}))};return u(u([],e(c)),e(s)).filter(yt)},removalWarning:function(){throw new Error("This method had to be removed due to a conceptual bug in RTK.\n Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details.\n See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR.")}}}({queryThunk:m,mutationThunk:R,api:e,serializeQueryArgs:c,context:r}),B=L.buildInitiateQuery,J=L.buildInitiateMutation;return Ut(e.util,{getRunningOperationPromises:L.getRunningOperationPromises,getRunningOperationPromise:L.removalWarning,getRunningMutationThunk:L.getRunningMutationThunk,getRunningMutationsThunk:L.getRunningMutationsThunk,getRunningQueryThunk:L.getRunningQueryThunk,getRunningQueriesThunk:L.getRunningQueriesThunk}),{name:Wt,injectEndpoint:function(t,n){var r,i=e;null!=(r=i.endpoints)[t]||(r[t]={}),pt(n)?Ut(i.endpoints[t],{name:t,select:U(t,n),initiate:B(t,n)},D(m,t)):n.type===rt.mutation&&Ut(i.endpoints[t],{name:t,select:W(),initiate:J(t)},D(R,t));}}}}},Bt=It(Lt());
var e=Object.defineProperty,t=(t,n,r)=>(((t,n,r)=>{n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r;})(t,"symbol"!=typeof n?n+"":n,r),r),n=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(n||{}),r=e=>[].concat(...e);function i(e){return "Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var o,a,u=function(){return Math.random().toString(36).substring(7).split("").join(".")},s={INIT:"@@redux/INIT"+u(),REPLACE:"@@redux/REPLACE"+u(),PROBE_UNKNOWN_ACTION:function(){return "@@redux/PROBE_UNKNOWN_ACTION"+u()}};function c(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return "'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function l(e){return !!e&&!!e[J]}function d(e){var t;return !!e&&(function(e){if(!e||"object"!=typeof e)return !1;var t=Object.getPrototypeOf(e);if(null===t)return !0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===V}(e)||Array.isArray(e)||!!e[B]||!!(null===(t=e.constructor)||void 0===t?void 0:t[B])||v(e)||g(e))}function f(e,t,n){void 0===n&&(n=!1),0===p(e)?(n?Object.keys:H)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e);})):e.forEach((function(n,r){return t(r,n,e)}));}function p(e){var t=e[J];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:v(e)?2:g(e)?3:0}function h(e,t){return 2===p(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function y(e,t){return 2===p(e)?e.get(t):e[t]}function m(e,t,n){var r=p(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n;}function v(e){return U&&e instanceof Map}function g(e){return $&&e instanceof Set}function b(e){return e.o||e.t}function w(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=G(e);delete t[J];for(var n=H(t),r=0;r<n.length;r++){var i=n[r],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]});}return Object.create(Object.getPrototypeOf(e),t)}function O(e,t){return void 0===t&&(t=!1),S(e)||l(e)||!d(e)||(p(e)>1&&(e.set=e.add=e.clear=e.delete=q),Object.freeze(e),t&&f(e,(function(e,t){return O(t,!0)}),!0)),e}function q(){c(2);}function S(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function A(e){var t=X[e];return t||c(18,e),t}function j(){return a}function R(e,t){t&&(A("Patches"),e.u=[],e.s=[],e.v=t);}function P(e){T(e),e.p.forEach(k),e.p=null;}function T(e){e===a&&(a=e.l);}function I(e){return a={p:[],l:a,h:e,m:!0,_:0}}function k(e){var t=e[J];0===t.i||1===t.i?t.j():t.O=!0;}function x(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.g||A("ES5").S(t,e,r),r?(n[J].P&&(P(t),c(4)),d(e)&&(e=C(t,e),t.l||N(t,e)),t.u&&A("Patches").M(n[J].t,e,t.u,t.s)):e=C(t,n,[]),P(t),t.u&&t.v(t.u,t.s),e!==L?e:void 0}function C(e,t,n){if(S(t))return t;var r=t[J];if(!r)return f(t,(function(i,o){return E(e,r,t,i,o,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return N(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=w(r.k):r.o;f(3===r.i?new Set(i):i,(function(t,o){return E(e,r,i,t,o,n)})),N(e,i,!1),n&&e.u&&A("Patches").R(r,n,e.u,e.s);}return r.o}function E(e,t,n,r,i,o){if(l(i)){var a=C(e,i,o&&t&&3!==t.i&&!h(t.D,r)?o.concat(r):void 0);if(m(n,r,a),!l(a))return;e.m=!1;}if(d(i)&&!S(i)){if(!e.h.F&&e._<1)return;C(e,i),t&&t.A.l||N(e,i);}}function N(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&O(t,n);}function Q(e,t){var n=e[J];return (n?b(n):e)[t]}function D(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n);}}function M(e){e.P||(e.P=!0,e.l&&M(e.l));}function K(e){e.o||(e.o=w(e.t));}function _(e,t,n){var r=v(t)?A("MapSet").N(t,n):g(t)?A("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:j(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,o=Y;n&&(i=[r],o=Z);var a=Proxy.revocable(i,o),u=a.revoke,s=a.proxy;return r.k=s,r.j=u,s}(t,n):A("ES5").J(t,n);return (n?n.A:j()).p.push(r),r}function F(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return w(e)}var z="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),U="undefined"!=typeof Map,$="undefined"!=typeof Set,W="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,L=z?Symbol.for("immer-nothing"):((o={})["immer-nothing"]=!0,o),B=z?Symbol.for("immer-draftable"):"__$immer_draftable",J=z?Symbol.for("immer-state"):"__$immer_state",V=""+Object.prototype.constructor,H="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,G=Object.getOwnPropertyDescriptors||function(e){var t={};return H(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n);})),t},X={},Y={get:function(e,t){if(t===J)return e;var n,r,i,o=b(e);if(!h(o,t))return n=e,(i=D(o,t))?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(n.k):void 0;var a=o[t];return e.I||!d(a)?a:a===Q(e.t,t)?(K(e),e.o[t]=_(e.A.h,a,e)):a},has:function(e,t){return t in b(e)},ownKeys:function(e){return Reflect.ownKeys(b(e))},set:function(e,t,n){var r=D(b(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=Q(b(e),t),o=null==i?void 0:i[J];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,i)&&(void 0!==n||h(e.t,t)))return !0;K(e),M(e);}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==Q(e.t,t)||t in e.t?(e.D[t]=!1,K(e),M(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=b(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){c(11);},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){c(12);}},Z={};f(Y,(function(e,t){Z[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)};})),Z.deleteProperty=function(e,t){return Z.set.call(this,e,t,void 0)},Z.set=function(e,t,n){return Y.set.call(this,e[0],t,n,e[0])};var ee=new(function(){function e(e){var t=this;this.g=W,this.F=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var i=n;n=e;var o=t;return function(e){var t=this;void 0===e&&(e=i);for(var r=arguments.length,a=Array(r>1?r-1:0),u=1;u<r;u++)a[u-1]=arguments[u];return o.produce(e,(function(e){var r;return (r=n).call.apply(r,[t,e].concat(a))}))}}var a;if("function"!=typeof n&&c(6),void 0!==r&&"function"!=typeof r&&c(7),d(e)){var u=I(t),s=_(t,e,void 0),l=!0;try{a=n(s),l=!1;}finally{l?P(u):T(u);}return "undefined"!=typeof Promise&&a instanceof Promise?a.then((function(e){return R(u,r),x(e,u)}),(function(e){throw P(u),e})):(R(u,r),x(a,u))}if(!e||"object"!=typeof e){if(void 0===(a=n(e))&&(a=e),a===L&&(a=void 0),t.F&&O(a,!0),r){var f=[],p=[];A("Patches").M(e,a,f,p),r(f,p);}return a}c(21,e);},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(i))}))};var r,i,o=t.produce(e,n,(function(e,t){r=e,i=t;}));return "undefined"!=typeof Promise&&o instanceof Promise?o.then((function(e){return [e,r,i]})):[o,r,i]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze);}var t=e.prototype;return t.createDraft=function(e){d(e)||c(8),l(e)&&(e=function(e){return l(e)||c(22,e),function e(t){if(!d(t))return t;var n,r=t[J],i=p(t);if(r){if(!r.P&&(r.i<4||!A("ES5").K(r)))return r.t;r.I=!0,n=F(t,i),r.I=!1;}else n=F(t,i);return f(n,(function(t,i){r&&y(r.t,t)===i||m(n,t,e(i));})),3===i?new Set(n):n}(e)}(e));var t=I(this),n=_(this,e,void 0);return n[J].C=!0,T(t),n},t.finishDraft=function(e,t){var n=(e&&e[J]).A;return R(n,t),x(void 0,n)},t.setAutoFreeze=function(e){this.F=e;},t.setUseProxies=function(e){e&&!W&&c(20),this.g=e;},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var i=A("Patches").$;return l(e)?i(e,t):this.produce(e,(function(e){return i(e,t)}))},e}()),te=ee.produce,ne=ee.produceWithPatches.bind(ee),re=(ee.setAutoFreeze.bind(ee),ee.setUseProxies.bind(ee),ee.applyPatches.bind(ee)),ie=(ee.createDraft.bind(ee),ee.finishDraft.bind(ee),te),oe=function(e,t){return e===t};function ae(e,t){var n,r,i,o="object"==typeof t?t:{equalityCheck:t},a=o.equalityCheck,u=o.maxSize,s=void 0===u?1:u,c=o.resultEqualityCheck,l=(i=void 0===a?oe:a,function(e,t){if(null===e||null===t||e.length!==t.length)return !1;for(var n=e.length,r=0;r<n;r++)if(!i(e[r],t[r]))return !1;return !0}),d=1===s?(n=l,{get:function(e){return r&&n(r.key,e)?r.value:"NOT_FOUND"},put:function(e,t){r={key:e,value:t};},getEntries:function(){return r?[r]:[]},clear:function(){r=void 0;}}):function(e,t){var n=[];function r(e){var r=n.findIndex((function(n){return t(e,n.key)}));if(r>-1){var i=n[r];return r>0&&(n.splice(r,1),n.unshift(i)),i.value}return "NOT_FOUND"}return {get:r,put:function(t,i){"NOT_FOUND"===r(t)&&(n.unshift({key:t,value:i}),n.length>e&&n.pop());},getEntries:function(){return n},clear:function(){n=[];}}}(s,l);function f(){var t=d.get(arguments);if("NOT_FOUND"===t){if(t=e.apply(null,arguments),c){var n=d.getEntries(),r=n.find((function(e){return c(e.value,t)}));r&&(t=r.value);}d.put(arguments,t);}return t}return f.clearCache=function(){return d.clear()},f}function ue(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return "function"==typeof e}))){var n=t.map((function(e){return "function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function se(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var o,a=0,u={memoizeOptions:void 0},s=r.pop();if("object"==typeof s&&(u=s,s=r.pop()),"function"!=typeof s)throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof s+"]");var c=u,l=c.memoizeOptions,d=void 0===l?n:l,f=Array.isArray(d)?d:[d],p=ue(r),h=e.apply(void 0,[function(){return a++,s.apply(null,arguments)}].concat(f)),y=e((function(){for(var e=[],t=p.length,n=0;n<t;n++)e.push(p[n].apply(null,arguments));return o=h.apply(null,e)}));return Object.assign(y,{resultFunc:s,memoizedResultFunc:h,dependencies:p,lastResult:function(){return o},recomputations:function(){return a},resetRecomputations:function(){return a=0}}),y};return i}var ce=se(ae);function le(e){if("object"!=typeof e||null===e)return !1;let t=Object.getPrototypeOf(e);if(null===t)return !0;let n=t;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n}function fe(e){return d(e)?ie(e,(()=>{})):e}function pe(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error("prepareAction did not return an object");return {type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return {type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>t.type===e,n}function he(e){const t={},n=[];let r;const i={addCase(e,n){const r="string"==typeof e?e:e.type;if(r in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[r]=n,i},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),i),addDefaultCase:e=>(r=e,i)};return e(i),[t,n,r]}function ye(e){const{name:t}=e;if(!t)throw new Error("`name` is a required option for createSlice");const n="function"==typeof e.initialState?e.initialState:fe(e.initialState),r=e.reducers||{},i=Object.keys(r),o={},a={},u={};function s(){const[t={},r=[],i]="function"==typeof e.extraReducers?he(e.extraReducers):[e.extraReducers],o={...t,...a};return function(e,t){let n,[a,u,s]=he((e=>{for(let t in o)e.addCase(t,o[t]);for(let t of r)e.addMatcher(t.matcher,t.reducer);i&&e.addDefaultCase(i);}));if("function"==typeof e)n=()=>fe(e());else {const t=fe(e);n=()=>t;}function c(e=n(),t){let r=[a[t.type],...u.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===r.filter((e=>!!e)).length&&(r=[s]),r.reduce(((e,n)=>{if(n){if(l(e)){const r=n(e,t);return void 0===r?e:r}if(d(e))return ie(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e}),e)}return c.getInitialState=n,c}(n)}let c;return i.forEach((e=>{const n=r[e],i=`${t}/${e}`;let s,c;"reducer"in n?(s=n.reducer,c=n.prepare):s=n,o[e]=s,a[i]=s,u[e]=c?pe(i,c):pe(i);})),{name:t,reducer:(e,t)=>(c||(c=s()),c(e,t)),actions:u,caseReducers:o,getInitialState:()=>(c||(c=s()),c.getInitialState())}}var me=(e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},ve=["name","message","stack","code"],ge=class{constructor(e,n){this.payload=e,this.meta=n,t(this,"_type");}},be=class{constructor(e,n){this.payload=e,this.meta=n,t(this,"_type");}},we=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of ve)"string"==typeof e[n]&&(t[n]=e[n]);return t}return {message:String(e)}},Oe=(()=>{function e(e,n,r){const i=pe(e+"/fulfilled",((e,t,n,r)=>({payload:e,meta:{...r||{},arg:n,requestId:t,requestStatus:"fulfilled"}}))),o=pe(e+"/pending",((e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}}))),a=pe(e+"/rejected",((e,t,n,i,o)=>({payload:i,error:(r&&r.serializeError||we)(e||"Rejected"),meta:{...o||{},arg:n,requestId:t,rejectedWithValue:!!i,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)}}))),u="undefined"!=typeof AbortController?AbortController:class{constructor(){t(this,"signal",{aborted:!1,addEventListener(){},dispatchEvent:()=>!1,onabort(){},removeEventListener(){},reason:void 0,throwIfAborted(){}});}abort(){}};return Object.assign((function(e){return (t,s,c)=>{const l=(null==r?void 0:r.idGenerator)?r.idGenerator(e):me(),d=new u;let f,p=!1;function h(e){f=e,d.abort();}const y=async function(){var u,y;let m;try{let a=null==(u=null==r?void 0:r.condition)?void 0:u.call(r,e,{getState:s,extra:c});if(null!==(v=a)&&"object"==typeof v&&"function"==typeof v.then&&(a=await a),!1===a||d.signal.aborted)throw {name:"ConditionError",message:"Aborted due to condition callback returning false."};p=!0;const g=new Promise(((e,t)=>d.signal.addEventListener("abort",(()=>t({name:"AbortError",message:f||"Aborted"})))));t(o(l,e,null==(y=null==r?void 0:r.getPendingMeta)?void 0:y.call(r,{requestId:l,arg:e},{getState:s,extra:c}))),m=await Promise.race([g,Promise.resolve(n(e,{dispatch:t,getState:s,extra:c,requestId:l,signal:d.signal,abort:h,rejectWithValue:(e,t)=>new ge(e,t),fulfillWithValue:(e,t)=>new be(e,t)})).then((t=>{if(t instanceof ge)throw t;return t instanceof be?i(t.payload,l,e,t.meta):i(t,l,e)}))]);}catch(t){m=t instanceof ge?a(null,l,e,t.payload,t.meta):a(t,l,e);}var v;return r&&!r.dispatchConditionRejection&&a.match(m)&&m.meta.condition||t(m),m}();return Object.assign(y,{abort:h,requestId:l,arg:e,unwrap:()=>y.then(qe)})}}),{pending:o,rejected:a,fulfilled:i,typePrefix:e})}return e.withTypes=()=>e,e})();function qe(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var Se=(e,t)=>{return (n=e)&&"function"==typeof n.match?e.match(t):e(t);var n;};function Ae(...e){return t=>e.some((e=>Se(e,t)))}function je(...e){return t=>e.every((e=>Se(e,t)))}function Re(e,t){if(!e||!e.meta)return !1;const n="string"==typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function Pe(e){return "function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Te(...e){return 0===e.length?e=>Re(e,["pending"]):Pe(e)?t=>Ae(...e.map((e=>e.pending)))(t):Te()(e[0])}function Ie(...e){return 0===e.length?e=>Re(e,["rejected"]):Pe(e)?t=>Ae(...e.map((e=>e.rejected)))(t):Ie()(e[0])}function ke(...e){const t=e=>e&&e.meta&&e.meta.rejectedWithValue;return 0===e.length||Pe(e)?n=>je(Ie(...e),t)(n):ke()(e[0])}function xe(...e){return 0===e.length?e=>Re(e,["fulfilled"]):Pe(e)?t=>Ae(...e.map((e=>e.fulfilled)))(t):xe()(e[0])}function Ce(...e){return 0===e.length?e=>Re(e,["pending","fulfilled","rejected"]):Pe(e)?t=>{const n=[];for(const t of e)n.push(t.pending,t.rejected,t.fulfilled);return Ae(...n)(t)}:Ce()(e[0])}"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis);var Ee=le;function Ne(e,t){if(e===t||!(Ee(e)&&Ee(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),r=Object.keys(e);let i=n.length===r.length;const o=Array.isArray(t)?[]:{};for(const r of n)o[r]=Ne(e[r],t[r]),i&&(i=e[r]===o[r]);return i?e:o}var Qe=(...e)=>fetch(...e),De=e=>e.status>=200&&e.status<=299,Me=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function Ke(e){if(!le(e))return e;const t={...e};for(const[e,n]of Object.entries(t))void 0===n&&delete t[e];return t}function _e({baseUrl:e,prepareHeaders:t=(e=>e),fetchFn:n=Qe,paramsSerializer:r,isJsonContentType:i=Me,jsonContentType:o="application/json",timeout:a,validateStatus:u,...s}={}){return "undefined"==typeof fetch&&n===Qe&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(l,d)=>{const{signal:f,getState:p,extra:h,endpoint:y,forced:m,type:v}=d;let g,{url:b,method:w="GET",headers:O=new Headers(s.headers),body:q,params:S,responseHandler:A="json",validateStatus:j=(null!=u?u:De),timeout:R=a,...P}="string"==typeof l?{url:l}:l,T={...s,method:w,signal:f,body:q,...P};O=new Headers(Ke(O)),T.headers=await t(O,{getState:p,extra:h,endpoint:y,forced:m,type:v})||O;const I=e=>"object"==typeof e&&(le(e)||Array.isArray(e)||"function"==typeof e.toJSON);if(!T.headers.has("content-type")&&I(q)&&T.headers.set("content-type",o),I(q)&&i(T.headers)&&(T.body=JSON.stringify(q)),S){const e=~b.indexOf("?")?"&":"?";b+=e+(r?r(S):new URLSearchParams(Ke(S)));}b=function(e,t){if(!e)return t;if(!t)return e;if(function(e){return new RegExp("(^|:)//").test(e)}(t))return t;const n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=(e=>e.replace(/\/$/,""))(e),`${e}${n}${t=(e=>e.replace(/^\//,""))(t)}`}(e,b);const k=new Request(b,T);g={request:k.clone()};let x,C=!1,E=R&&setTimeout((()=>{C=!0,d.abort();}),R);try{x=await n(k);}catch(e){return {error:{status:C?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(e)},meta:g}}finally{E&&clearTimeout(E);}const N=x.clone();let Q;g.response=N;let D="";try{let e;if(await Promise.all([c(x,A).then((e=>Q=e),(t=>e=t)),N.text().then((e=>D=e),(()=>{}))]),e)throw e}catch(e){return {error:{status:"PARSING_ERROR",originalStatus:x.status,data:D,error:String(e)},meta:g}}return j(x,Q)?{data:Q,meta:g}:{error:{status:x.status,data:Q},meta:g}};async function c(e,t){if("function"==typeof t)return t(e);if("content-type"===t&&(t=i(e.headers)?"json":"text"),"json"===t){const t=await e.text();return t.length?JSON.parse(t):null}return e.text()}}var Fe=class{constructor(e,t){this.value=e,this.meta=t;}};async function ze(e=0,t=5){const n=Math.min(e,t),r=~~((Math.random()+.4)*(300<<n));await new Promise((e=>setTimeout((t=>e(t)),r)));}var Ue={},$e=Object.assign(((e,t)=>async(n,r,i)=>{const o=[5,(t||Ue).maxRetries,(i||Ue).maxRetries].filter((e=>void 0!==e)),[a]=o.slice(-1),u={maxRetries:a,backoff:ze,retryCondition:(e,t,{attempt:n})=>n<=a,...t,...i};let s=0;for(;;)try{const t=await e(n,r,i);if(t.error)throw new Fe(t);return t}catch(e){if(s++,e.throwImmediately){if(e instanceof Fe)return e.value;throw e}if(e instanceof Fe&&!u.retryCondition(e.value.error,n,{attempt:s,baseQueryApi:r,extraOptions:i}))return e.value;await u.backoff(s,u.maxRetries);}}),{fail:function(e){throw Object.assign(new Fe({error:e}),{throwImmediately:!0})}}),We=pe("__rtkq/focused"),Le=pe("__rtkq/unfocused"),Be=pe("__rtkq/online"),Je=pe("__rtkq/offline"),Ve=!1;function He(e,t){return t?t(e,{onFocus:We,onFocusLost:Le,onOffline:Je,onOnline:Be}):function(){const t=()=>e(We()),n=()=>e(Be()),r=()=>e(Je()),i=()=>{"visible"===window.document.visibilityState?t():e(Le());};return Ve||"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("visibilitychange",i,!1),window.addEventListener("focus",t,!1),window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),Ve=!0),()=>{window.removeEventListener("focus",t),window.removeEventListener("visibilitychange",i),window.removeEventListener("online",n),window.removeEventListener("offline",r),Ve=!1;}}()}function Ge(e){return "query"===e.type}function Xe(e,t,n,r,i,o){return "function"==typeof e?e(t,n,r,i).map(Ye).map(o):Array.isArray(e)?e.map(Ye).map(o):[]}function Ye(e){return "string"==typeof e?{type:e}:e}function Ze(e){return null!=e}var et=Symbol("forceQueryFn"),tt=e=>"function"==typeof e[et];function nt(e){return e}function rt(e,t,n,r){return Xe(n[e.meta.arg.endpointName][t],xe(e)?e.payload:void 0,ke(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function it(e,t,n){const r=e[t];r&&n(r);}function ot(e){var t;return null!=(t="arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)?t:e.requestId}function at(e,t,n){const r=e[ot(t)];r&&n(r);}var ut={},st=Symbol.for("RTKQ/skipToken"),ct=st,lt={status:"uninitialized"},dt=te(lt,(()=>{})),ft=te(lt,(()=>{})),pt=({endpointName:e,queryArgs:t})=>`${e}(${JSON.stringify(t,((e,t)=>le(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))})`;function ht(...e){return function(t){const n=ae((e=>{var n,r;return null==(r=t.extractRehydrationInfo)?void 0:r.call(t,e,{reducerPath:null!=(n=t.reducerPath)?n:"api"})})),r={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,...t,extractRehydrationInfo:n,serializeQueryArgs(e){let n=pt;if("serializeQueryArgs"in e.endpointDefinition){const t=e.endpointDefinition.serializeQueryArgs;n=e=>{const n=t(e);return "string"==typeof n?n:pt({...e,queryArgs:n})};}else t.serializeQueryArgs&&(n=t.serializeQueryArgs);return n(e)},tagTypes:[...t.tagTypes||[]]},i={endpointDefinitions:{},batch(e){e();},apiUid:me(),extractRehydrationInfo:n,hasRehydrationInfo:ae((e=>null!=n(e)))},o={injectEndpoints:function(e){const t=e.endpoints({query:e=>({...e,type:"query"}),mutation:e=>({...e,type:"mutation"})});for(const[n,r]of Object.entries(t))if(e.overrideExisting||!(n in i.endpointDefinitions)){i.endpointDefinitions[n]=r;for(const e of a)e.injectEndpoint(n,r);}return o},enhanceEndpoints({addTagTypes:e,endpoints:t}){if(e)for(const t of e)r.tagTypes.includes(t)||r.tagTypes.push(t);if(t)for(const[e,n]of Object.entries(t))"function"==typeof n?n(i.endpointDefinitions[e]):Object.assign(i.endpointDefinitions[e]||{},n);return o}},a=e.map((e=>e.init(o,r,i)));return o.injectEndpoints({endpoints:t.endpoints})}}function yt(){return function(){throw new Error("When using `fakeBaseQuery`, all queries & mutations must use the `queryFn` definition syntax.")}}var mt,vt=({reducerPath:e,api:t,context:n,internalState:r})=>{const{removeQueryResult:i,unsubscribeQueryResult:o}=t.internalActions;function a(e){const t=r.currentSubscriptions[e];return !!t&&!function(e){for(let t in e)return !1;return !0}(t)}const u={};function s(e,t,r,o){var s;const c=n.endpointDefinitions[t],l=null!=(s=null==c?void 0:c.keepUnusedDataFor)?s:o.keepUnusedDataFor;if(Infinity===l)return;const d=Math.max(0,Math.min(l,2147482.647));if(!a(e)){const t=u[e];t&&clearTimeout(t),u[e]=setTimeout((()=>{a(e)||r.dispatch(i({queryCacheKey:e})),delete u[e];}),1e3*d);}}return (r,i,a)=>{var c;if(o.match(r)){const t=i.getState()[e],{queryCacheKey:n}=r.payload;s(n,null==(c=t.queries[n])?void 0:c.endpointName,i,t.config);}if(t.util.resetApiState.match(r))for(const[e,t]of Object.entries(u))t&&clearTimeout(t),delete u[e];if(n.hasRehydrationInfo(r)){const t=i.getState()[e],{queries:o}=n.extractRehydrationInfo(r);for(const[e,n]of Object.entries(o))s(e,null==n?void 0:n.endpointName,i,t.config);}}},gt=({reducerPath:e,context:t,context:{endpointDefinitions:n},mutationThunk:r,api:i,assertTagType:o,refetchQuery:a})=>{const{removeQueryResult:u}=i.internalActions,s=Ae(xe(r),ke(r));function c(n,r){const o=r.getState(),s=o[e],c=i.util.selectInvalidatedBy(o,n);t.batch((()=>{var e;const t=Array.from(c.values());for(const{queryCacheKey:n}of t){const t=s.queries[n],i=null!=(e=s.subscriptions[n])?e:{};t&&(0===Object.keys(i).length?r.dispatch(u({queryCacheKey:n})):"uninitialized"!==t.status&&r.dispatch(a(t,n)));}}));}return (e,t)=>{s(e)&&c(rt(e,"invalidatesTags",n,o),t),i.util.invalidateTags.match(e)&&c(Xe(e.payload,void 0,void 0,void 0,void 0,o),t);}},bt=({reducerPath:e,queryThunk:t,api:n,refetchQuery:r,internalState:i})=>{const o={};function a({queryCacheKey:t},n){const a=n.getState()[e].queries[t];if(!a||"uninitialized"===a.status)return;const u=c(i.currentSubscriptions[t]);if(!Number.isFinite(u))return;const s=o[t];(null==s?void 0:s.timeout)&&(clearTimeout(s.timeout),s.timeout=void 0);const l=Date.now()+u,d=o[t]={nextPollTimestamp:l,pollingInterval:u,timeout:setTimeout((()=>{d.timeout=void 0,n.dispatch(r(a,t));}),u)};}function u({queryCacheKey:t},n){const r=n.getState()[e].queries[t];if(!r||"uninitialized"===r.status)return;const u=c(i.currentSubscriptions[t]);if(!Number.isFinite(u))return void s(t);const l=o[t],d=Date.now()+u;(!l||d<l.nextPollTimestamp)&&a({queryCacheKey:t},n);}function s(e){const t=o[e];(null==t?void 0:t.timeout)&&clearTimeout(t.timeout),delete o[e];}function c(e={}){let t=Number.POSITIVE_INFINITY;for(let n in e)e[n].pollingInterval&&(t=Math.min(e[n].pollingInterval,t));return t}return (e,r)=>{(n.internalActions.updateSubscriptionOptions.match(e)||n.internalActions.unsubscribeQueryResult.match(e))&&u(e.payload,r),(t.pending.match(e)||t.rejected.match(e)&&e.meta.condition)&&u(e.meta.arg,r),(t.fulfilled.match(e)||t.rejected.match(e)&&!e.meta.condition)&&a(e.meta.arg,r),n.util.resetApiState.match(e)&&function(){for(const e of Object.keys(o))s(e);}();}},wt=new Error("Promise never resolved before cacheEntryRemoved."),Ot=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:i})=>{const o=Ce(r),a=Ce(i),u=xe(r,i),s={};function c(t,r,i,o,a){const u=n.endpointDefinitions[t],c=null==u?void 0:u.onCacheEntryAdded;if(!c)return;let l={};const d=new Promise((e=>{l.cacheEntryRemoved=e;})),f=Promise.race([new Promise((e=>{l.valueResolved=e;})),d.then((()=>{throw wt}))]);f.catch((()=>{})),s[i]=l;const p=e.endpoints[t].select("query"===u.type?r:i),h=o.dispatch(((e,t,n)=>n)),y={...o,getCacheEntry:()=>p(o.getState()),requestId:a,extra:h,updateCachedData:"query"===u.type?n=>o.dispatch(e.util.updateQueryData(t,r,n)):void 0,cacheDataLoaded:f,cacheEntryRemoved:d},m=c(r,y);Promise.resolve(m).catch((e=>{if(e!==wt)throw e}));}return (n,l,d)=>{const f=function(t){return o(t)?t.meta.arg.queryCacheKey:a(t)?t.meta.requestId:e.internalActions.removeQueryResult.match(t)?t.payload.queryCacheKey:e.internalActions.removeMutationResult.match(t)?ot(t.payload):""}(n);if(r.pending.match(n)){const e=d[t].queries[f],r=l.getState()[t].queries[f];!e&&r&&c(n.meta.arg.endpointName,n.meta.arg.originalArgs,f,l,n.meta.requestId);}else if(i.pending.match(n))l.getState()[t].mutations[f]&&c(n.meta.arg.endpointName,n.meta.arg.originalArgs,f,l,n.meta.requestId);else if(u(n)){const e=s[f];(null==e?void 0:e.valueResolved)&&(e.valueResolved({data:n.payload,meta:n.meta.baseQueryMeta}),delete e.valueResolved);}else if(e.internalActions.removeQueryResult.match(n)||e.internalActions.removeMutationResult.match(n)){const e=s[f];e&&(delete s[f],e.cacheEntryRemoved());}else if(e.util.resetApiState.match(n))for(const[e,t]of Object.entries(s))delete s[e],t.cacheEntryRemoved();}},qt=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const i=Te(n,r),o=Ie(n,r),a=xe(n,r),u={};return (n,r)=>{var s,c,l;if(i(n)){const{requestId:i,arg:{endpointName:o,originalArgs:a}}=n.meta,s=t.endpointDefinitions[o],c=null==s?void 0:s.onQueryStarted;if(c){const t={},n=new Promise(((e,n)=>{t.resolve=e,t.reject=n;}));n.catch((()=>{})),u[i]=t;const l=e.endpoints[o].select("query"===s.type?a:i),d=r.dispatch(((e,t,n)=>n)),f={...r,getCacheEntry:()=>l(r.getState()),requestId:i,extra:d,updateCachedData:"query"===s.type?t=>r.dispatch(e.util.updateQueryData(o,a,t)):void 0,queryFulfilled:n};c(a,f);}}else if(a(n)){const{requestId:e,baseQueryMeta:t}=n.meta;null==(s=u[e])||s.resolve({data:n.payload,meta:t}),delete u[e];}else if(o(n)){const{requestId:e,rejectedWithValue:t,baseQueryMeta:r}=n.meta;null==(l=u[e])||l.reject({error:null!=(c=n.payload)?c:n.error,isUnhandledError:!t,meta:r}),delete u[e];}}},St=({api:e,context:{apiUid:t}})=>(n,r)=>{e.util.resetApiState.match(n)&&r.dispatch(e.internalActions.middlewareRegistered(t));},At="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis):e=>(mt||(mt=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0)));function jt(e,...t){Object.assign(e,...t);}var Rt=Symbol(),Pt=()=>({name:Rt,init(e,{baseQuery:t,reducerPath:n,serializeQueryArgs:o,keepUnusedDataFor:a,refetchOnMountOrArgChange:u,refetchOnFocus:m,refetchOnReconnect:b},w){!function(){function e(t){if(!d(t))return t;if(Array.isArray(t))return t.map(e);if(v(t))return new Map(Array.from(t.entries()).map((function(t){return [t[0],e(t[1])]})));if(g(t))return new Set(Array.from(t).map(e));var n=Object.create(Object.getPrototypeOf(t));for(var r in t)n[r]=e(t[r]);return h(t,B)&&(n[B]=t[B]),n}function t(t){return l(t)?e(t):t}var n="add";X.Patches||(X.Patches={$:function(t,r){return r.forEach((function(r){for(var i=r.path,o=r.op,a=t,u=0;u<i.length-1;u++){var s=p(a),l=""+i[u];0!==s&&1!==s||"__proto__"!==l&&"constructor"!==l||c(24),"function"==typeof a&&"prototype"===l&&c(24),"object"!=typeof(a=y(a,l))&&c(15,i.join("/"));}var d=p(a),f=e(r.value),h=i[i.length-1];switch(o){case"replace":switch(d){case 2:return a.set(h,f);case 3:c(16);default:return a[h]=f}case n:switch(d){case 1:return "-"===h?a.push(f):a.splice(h,0,f);case 2:return a.set(h,f);case 3:return a.add(f);default:return a[h]=f}case"remove":switch(d){case 1:return a.splice(h,1);case 2:return a.delete(h);case 3:return a.delete(r.value);default:return delete a[h]}default:c(17,o);}})),t},R:function(e,r,i,o){switch(e.i){case 0:case 4:case 2:return u=r,s=i,c=o,l=(a=e).t,d=a.o,void f(a.D,(function(e,r){var i=y(l,e),o=y(d,e),a=r?h(l,e)?"replace":n:"remove";if(i!==o||"replace"!==a){var f=u.concat(e);s.push("remove"===a?{op:a,path:f}:{op:a,path:f,value:o}),c.push(a===n?{op:"remove",path:f}:"remove"===a?{op:n,path:f,value:t(i)}:{op:"replace",path:f,value:t(i)});}}));case 5:case 1:return function(e,r,i,o){var a=e.t,u=e.D,s=e.o;if(s.length<a.length){var c=[s,a];a=c[0],s=c[1];var l=[o,i];i=l[0],o=l[1];}for(var d=0;d<a.length;d++)if(u[d]&&s[d]!==a[d]){var f=r.concat([d]);i.push({op:"replace",path:f,value:t(s[d])}),o.push({op:"replace",path:f,value:t(a[d])});}for(var p=a.length;p<s.length;p++){var h=r.concat([p]);i.push({op:n,path:h,value:t(s[p])});}a.length<s.length&&o.push({op:"replace",path:r.concat(["length"]),value:a.length});}(e,r,i,o);case 3:return function(e,t,r,i){var o=e.t,a=e.o,u=0;o.forEach((function(e){if(!a.has(e)){var o=t.concat([u]);r.push({op:"remove",path:o,value:e}),i.unshift({op:n,path:o,value:e});}u++;})),u=0,a.forEach((function(e){if(!o.has(e)){var a=t.concat([u]);r.push({op:n,path:a,value:e}),i.unshift({op:"remove",path:a,value:e});}u++;}));}(e,r,i,o)}var a,u,s,c,l,d;},M:function(e,t,n,r){n.push({op:"replace",path:[],value:t===L?void 0:t}),r.push({op:"replace",path:[],value:e});}});}();const O=e=>e;Object.assign(e,{reducerPath:n,endpoints:{},internalActions:{onOnline:Be,onOffline:Je,onFocus:We,onFocusLost:Le},util:{}});const{queryThunk:q,mutationThunk:S,patchQueryData:A,updateQueryData:j,upsertQueryData:R,prefetch:P,buildMatchThunkActions:T}=function({reducerPath:e,baseQuery:t,context:{endpointDefinitions:n},serializeQueryArgs:r,api:i}){const o=async(e,{signal:r,abort:i,rejectWithValue:o,fulfillWithValue:u,dispatch:s,getState:c,extra:l})=>{const d=n[e.endpointName];try{let n,o=nt;const f={signal:r,abort:i,dispatch:s,getState:c,extra:l,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?a(e,c()):void 0},p="query"===e.type?e[et]:void 0;if(p?n=p():d.query?(n=await t(d.query(e.originalArgs),f,d.extraOptions),d.transformResponse&&(o=d.transformResponse)):n=await d.queryFn(e.originalArgs,f,d.extraOptions,(e=>t(e,f,d.extraOptions))),n.error)throw new Fe(n.error,n.meta);return u(await o(n.data,n.meta,e.originalArgs),{fulfilledTimeStamp:Date.now(),baseQueryMeta:n.meta,RTK_autoBatch:!0})}catch(t){let n=t;if(n instanceof Fe){let t=nt;d.query&&d.transformErrorResponse&&(t=d.transformErrorResponse);try{return o(await t(n.value,n.meta,e.originalArgs),{baseQueryMeta:n.meta,RTK_autoBatch:!0})}catch(e){n=e;}}throw console.error(n),n}};function a(t,n){var r,i,o,a;const u=null==(i=null==(r=n[e])?void 0:r.queries)?void 0:i[t.queryCacheKey],s=null==(o=n[e])?void 0:o.config.refetchOnMountOrArgChange,c=null==u?void 0:u.fulfilledTimeStamp,l=null!=(a=t.forceRefetch)?a:t.subscribe&&s;return !!l&&(!0===l||(Number(new Date)-Number(c))/1e3>=l)}function u(e){return t=>{var n,r;return (null==(r=null==(n=null==t?void 0:t.meta)?void 0:n.arg)?void 0:r.endpointName)===e}}return {queryThunk:Oe(`${e}/executeQuery`,o,{getPendingMeta:()=>({startedTimeStamp:Date.now(),RTK_autoBatch:!0}),condition(t,{getState:r}){var i,o,u;const s=r(),c=null==(o=null==(i=s[e])?void 0:i.queries)?void 0:o[t.queryCacheKey],l=null==c?void 0:c.fulfilledTimeStamp,d=t.originalArgs,f=null==c?void 0:c.originalArgs,p=n[t.endpointName];return !(!tt(t)&&("pending"===(null==c?void 0:c.status)||!a(t,s)&&(!Ge(p)||!(null==(u=null==p?void 0:p.forceRefetch)?void 0:u.call(p,{currentArg:d,previousArg:f,endpointState:c,state:s})))&&l))},dispatchConditionRejection:!0}),mutationThunk:Oe(`${e}/executeMutation`,o,{getPendingMeta:()=>({startedTimeStamp:Date.now(),RTK_autoBatch:!0})}),prefetch:(e,t,n)=>(r,o)=>{const a=(e=>"force"in e)(n)&&n.force,u=(e=>"ifOlderThan"in e)(n)&&n.ifOlderThan,s=(n=!0)=>i.endpoints[e].initiate(t,{forceRefetch:n}),c=i.endpoints[e].select(t)(o());if(a)r(s());else if(u){const e=null==c?void 0:c.fulfilledTimeStamp;if(!e)return void r(s());(Number(new Date)-Number(new Date(e)))/1e3>=u&&r(s());}else r(s(!1));},updateQueryData:(e,t,n)=>(r,o)=>{const a=i.endpoints[e].select(t)(o());let u={patches:[],inversePatches:[],undo:()=>r(i.util.patchQueryData(e,t,u.inversePatches))};if("uninitialized"===a.status)return u;if("data"in a)if(d(a.data)){const[,e,t]=ne(a.data,n);u.patches.push(...e),u.inversePatches.push(...t);}else {const e=n(a.data);u.patches.push({op:"replace",path:[],value:e}),u.inversePatches.push({op:"replace",path:[],value:a.data});}return r(i.util.patchQueryData(e,t,u.patches)),u},upsertQueryData:(e,t,n)=>r=>r(i.endpoints[e].initiate(t,{subscribe:!1,forceRefetch:!0,[et]:()=>({data:n})})),patchQueryData:(e,t,o)=>a=>{a(i.internalActions.queryResultPatched({queryCacheKey:r({queryArgs:t,endpointDefinition:n[e],endpointName:e}),patches:o}));},buildMatchThunkActions:function(e,t){return {matchPending:je(Te(e),u(t)),matchFulfilled:je(xe(e),u(t)),matchRejected:je(Ie(e),u(t))}}}}({baseQuery:t,reducerPath:n,context:w,api:e,serializeQueryArgs:o}),{reducer:I,actions:k}=function({reducerPath:e,queryThunk:t,mutationThunk:n,context:{endpointDefinitions:r,apiUid:o,extractRehydrationInfo:a,hasRehydrationInfo:u},assertTagType:c,config:l}){const d=pe(`${e}/resetApiState`),f=ye({name:`${e}/queries`,initialState:ut,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t];},prepare:e=>({payload:e,meta:{RTK_autoBatch:!0}})},queryResultPatched(e,{payload:{queryCacheKey:t,patches:n}}){it(e,t,(e=>{e.data=re(e.data,n.concat());}));}},extraReducers(e){e.addCase(t.pending,((e,{meta:t,meta:{arg:n}})=>{var r;const i=tt(n);(n.subscribe||i)&&(null!=e[r=n.queryCacheKey]||(e[r]={status:"uninitialized",endpointName:n.endpointName})),it(e,n.queryCacheKey,(e=>{e.status="pending",e.requestId=i&&e.requestId?e.requestId:t.requestId,void 0!==n.originalArgs&&(e.originalArgs=n.originalArgs),e.startedTimeStamp=t.startedTimeStamp;}));})).addCase(t.fulfilled,((e,{meta:t,payload:n})=>{it(e,t.arg.queryCacheKey,(e=>{var i;if(e.requestId!==t.requestId&&!tt(t.arg))return;const{merge:o}=r[t.arg.endpointName];if(e.status="fulfilled",o)if(void 0!==e.data){const{fulfilledTimeStamp:r,arg:i,baseQueryMeta:a,requestId:u}=t;let s=te(e.data,(e=>o(e,n,{arg:i.originalArgs,baseQueryMeta:a,fulfilledTimeStamp:r,requestId:u})));e.data=s;}else e.data=n;else e.data=null==(i=r[t.arg.endpointName].structuralSharing)||i?Ne(e.data,n):n;delete e.error,e.fulfilledTimeStamp=t.fulfilledTimeStamp;}));})).addCase(t.rejected,((e,{meta:{condition:t,arg:n,requestId:r},error:i,payload:o})=>{it(e,n.queryCacheKey,(e=>{if(t);else {if(e.requestId!==r)return;e.status="rejected",e.error=null!=o?o:i;}}));})).addMatcher(u,((e,t)=>{const{queries:n}=a(t);for(const[t,r]of Object.entries(n))"fulfilled"!==(null==r?void 0:r.status)&&"rejected"!==(null==r?void 0:r.status)||(e[t]=r);}));}}),p=ye({name:`${e}/mutations`,initialState:ut,reducers:{removeMutationResult:{reducer(e,{payload:t}){const n=ot(t);n in e&&delete e[n];},prepare:e=>({payload:e,meta:{RTK_autoBatch:!0}})}},extraReducers(e){e.addCase(n.pending,((e,{meta:t,meta:{requestId:n,arg:r,startedTimeStamp:i}})=>{r.track&&(e[ot(t)]={requestId:n,status:"pending",endpointName:r.endpointName,startedTimeStamp:i});})).addCase(n.fulfilled,((e,{payload:t,meta:n})=>{n.arg.track&&at(e,n,(e=>{e.requestId===n.requestId&&(e.status="fulfilled",e.data=t,e.fulfilledTimeStamp=n.fulfilledTimeStamp);}));})).addCase(n.rejected,((e,{payload:t,error:n,meta:r})=>{r.arg.track&&at(e,r,(e=>{e.requestId===r.requestId&&(e.status="rejected",e.error=null!=t?t:n);}));})).addMatcher(u,((e,t)=>{const{mutations:n}=a(t);for(const[t,r]of Object.entries(n))"fulfilled"!==(null==r?void 0:r.status)&&"rejected"!==(null==r?void 0:r.status)||t===(null==r?void 0:r.requestId)||(e[t]=r);}));}}),h=ye({name:`${e}/invalidation`,initialState:ut,reducers:{},extraReducers(e){e.addCase(f.actions.removeQueryResult,((e,{payload:{queryCacheKey:t}})=>{for(const n of Object.values(e))for(const e of Object.values(n)){const n=e.indexOf(t);-1!==n&&e.splice(n,1);}})).addMatcher(u,((e,t)=>{var n,r,i,o;const{provided:u}=a(t);for(const[t,a]of Object.entries(u))for(const[u,s]of Object.entries(a)){const a=null!=(o=(r=null!=(n=e[t])?n:e[t]={})[i=u||"__internal_without_id"])?o:r[i]=[];for(const e of s)a.includes(e)||a.push(e);}})).addMatcher(Ae(xe(t),ke(t)),((e,t)=>{var n,i,o,a;const u=rt(t,"providesTags",r,c),{queryCacheKey:s}=t.meta.arg;for(const t of Object.values(e))for(const e of Object.values(t)){const t=e.indexOf(s);-1!==t&&e.splice(t,1);}for(const{type:t,id:r}of u){const u=null!=(a=(i=null!=(n=e[t])?n:e[t]={})[o=r||"__internal_without_id"])?a:i[o]=[];u.includes(s)||u.push(s);}}));}}),y=ye({name:`${e}/subscriptions`,initialState:ut,reducers:{updateSubscriptionOptions(e,t){},unsubscribeQueryResult(e,t){},internal_probeSubscription(e,t){}}}),m=ye({name:`${e}/internalSubscriptions`,initialState:ut,reducers:{subscriptionsUpdated:(e,t)=>re(e,t.payload)}}),v=ye({name:`${e}/config`,initialState:{online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine,focused:"undefined"==typeof document||"hidden"!==document.visibilityState,middlewareRegistered:!1,...l},reducers:{middlewareRegistered(e,{payload:t}){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&o===t||"conflict";}},extraReducers:e=>{e.addCase(Be,(e=>{e.online=!0;})).addCase(Je,(e=>{e.online=!1;})).addCase(We,(e=>{e.focused=!0;})).addCase(Le,(e=>{e.focused=!1;})).addMatcher(u,(e=>({...e})));}}),g=function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];"function"==typeof e[o]&&(n[o]=e[o]);}var a,u=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:s.INIT}))throw new Error(i(12));if(void 0===n(void 0,{type:s.PROBE_UNKNOWN_ACTION()}))throw new Error(i(13))}));}(n);}catch(e){a=e;}return function(e,t){if(void 0===e&&(e={}),a)throw a;for(var r=!1,o={},s=0;s<u.length;s++){var c=u[s],l=e[c],d=(0, n[c])(l,t);if(void 0===d)throw new Error(i(14));o[c]=d,r=r||d!==l;}return (r=r||u.length!==Object.keys(e).length)?o:e}}({queries:f.reducer,mutations:p.reducer,provided:h.reducer,subscriptions:m.reducer,config:v.reducer});return {reducer:(e,t)=>g(d.match(t)?void 0:e,t),actions:{...v.actions,...f.actions,...y.actions,...m.actions,...p.actions,unsubscribeMutationResult:p.actions.removeMutationResult,resetApiState:d}}}({context:w,queryThunk:q,mutationThunk:S,reducerPath:n,assertTagType:O,config:{refetchOnFocus:m,refetchOnReconnect:b,refetchOnMountOrArgChange:u,keepUnusedDataFor:a,reducerPath:n}});jt(e.util,{patchQueryData:A,updateQueryData:j,upsertQueryData:R,prefetch:P,resetApiState:k.resetApiState}),jt(e.internalActions,k);const{middleware:x,actions:C}=function(e){const{reducerPath:t,queryThunk:n,api:r,context:i}=e,{apiUid:o}=i,a={invalidateTags:pe(`${t}/invalidateTags`)},u=[St,vt,gt,bt,Ot,qt];return {middleware:n=>{let a=!1;const c={...e,internalState:{currentSubscriptions:{}},refetchQuery:s},l=u.map((e=>e(c))),d=(({api:e,queryThunk:t,internalState:n})=>{const r=`${e.reducerPath}/subscriptions`;let i=null,o=!1;const{updateSubscriptionOptions:a,unsubscribeQueryResult:u}=e.internalActions;return (s,c)=>{var l,d;if(i||(i=JSON.parse(JSON.stringify(n.currentSubscriptions))),e.internalActions.internal_probeSubscription.match(s)){const{queryCacheKey:e,requestId:t}=s.payload;return [!1,!!(null==(l=n.currentSubscriptions[e])?void 0:l[t])]}const f=((n,r)=>{var i,o,s,c,l,d,f,p,h;if(a.match(r)){const{queryCacheKey:e,requestId:t,options:o}=r.payload;return (null==(i=null==n?void 0:n[e])?void 0:i[t])&&(n[e][t]=o),!0}if(u.match(r)){const{queryCacheKey:e,requestId:t}=r.payload;return n[e]&&delete n[e][t],!0}if(e.internalActions.removeQueryResult.match(r))return delete n[r.payload.queryCacheKey],!0;if(t.pending.match(r)){const{meta:{arg:e,requestId:t}}=r;if(e.subscribe){const r=null!=(s=n[o=e.queryCacheKey])?s:n[o]={};return r[t]=null!=(l=null!=(c=e.subscriptionOptions)?c:r[t])?l:{},!0}}if(t.rejected.match(r)){const{meta:{condition:e,arg:t,requestId:i}}=r;if(e&&t.subscribe){const e=null!=(f=n[d=t.queryCacheKey])?f:n[d]={};return e[i]=null!=(h=null!=(p=t.subscriptionOptions)?p:e[i])?h:{},!0}}return !1})(n.currentSubscriptions,s);if(f){o||(At((()=>{const t=JSON.parse(JSON.stringify(n.currentSubscriptions)),[,r]=ne(i,(()=>t));c.next(e.internalActions.subscriptionsUpdated(r)),i=t,o=!1;})),o=!0);const a=!!(null==(d=s.type)?void 0:d.startsWith(r)),u=t.rejected.match(s)&&s.meta.condition&&!!s.meta.arg.subscribe;return [!a&&!u,!1]}return [!0,!1]}})(c),f=(({reducerPath:e,context:t,api:n,refetchQuery:r,internalState:i})=>{const{removeQueryResult:o}=n.internalActions;function a(n,a){const u=n.getState()[e],s=u.queries,c=i.currentSubscriptions;t.batch((()=>{for(const e of Object.keys(c)){const t=s[e],i=c[e];i&&t&&(Object.values(i).some((e=>!0===e[a]))||Object.values(i).every((e=>void 0===e[a]))&&u.config[a])&&(0===Object.keys(i).length?n.dispatch(o({queryCacheKey:e})):"uninitialized"!==t.status&&n.dispatch(r(t,e)));}}));}return (e,t)=>{We.match(e)&&a(t,"refetchOnFocus"),Be.match(e)&&a(t,"refetchOnReconnect");}})(c);return e=>u=>{a||(a=!0,n.dispatch(r.internalActions.middlewareRegistered(o)));const s={...n,next:e},c=n.getState(),[p,h]=d(u,s,c);let y;if(y=p?e(u):h,n.getState()[t]&&(f(u,s,c),(e=>!!e&&"string"==typeof e.type&&e.type.startsWith(`${t}/`))(u)||i.hasRehydrationInfo(u)))for(let e of l)e(u,s,c);return y}},actions:a};function s(e,t,r={}){return n({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t,...r})}}({reducerPath:n,context:w,queryThunk:q,mutationThunk:S,api:e,assertTagType:O});jt(e.util,C),jt(e,{reducer:I,middleware:x});const{buildQuerySelector:E,buildMutationSelector:N,selectInvalidatedBy:Q}=function({serializeQueryArgs:e,reducerPath:t}){const n=e=>dt,i=e=>ft;return {buildQuerySelector:function(t,r){return i=>{const u=e({queryArgs:i,endpointDefinition:r,endpointName:t});return ce(i===st?n:e=>{var t,n,r;return null!=(r=null==(n=null==(t=a(e))?void 0:t.queries)?void 0:n[u])?r:dt},o)}},buildMutationSelector:function(){return e=>{var t;let n;return n="object"==typeof e?null!=(t=ot(e))?t:st:e,ce(n===st?i:e=>{var t,r,i;return null!=(i=null==(r=null==(t=a(e))?void 0:t.mutations)?void 0:r[n])?i:ft},o)}},selectInvalidatedBy:function(e,n){var i;const o=e[t],a=new Set;for(const e of n.map(Ye)){const t=o.provided[e.type];if(!t)continue;let n=null!=(i=void 0!==e.id?t[e.id]:r(Object.values(t)))?i:[];for(const e of n)a.add(e);}return r(Array.from(a.values()).map((e=>{const t=o.queries[e];return t?[{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}]:[]})))}};function o(e){return {...e,...(t=e.status,{status:t,isUninitialized:"uninitialized"===t,isLoading:"pending"===t,isSuccess:"fulfilled"===t,isError:"rejected"===t})};var t;}function a(e){return e[t]}}({serializeQueryArgs:o,reducerPath:n});jt(e.util,{selectInvalidatedBy:Q});const{buildInitiateQuery:D,buildInitiateMutation:M,getRunningMutationThunk:K,getRunningMutationsThunk:_,getRunningQueriesThunk:F,getRunningQueryThunk:z,getRunningOperationPromises:U,removalWarning:$}=function({serializeQueryArgs:e,queryThunk:t,mutationThunk:n,api:r,context:i}){const o=new Map,a=new Map,{unsubscribeQueryResult:u,removeMutationResult:s,updateSubscriptionOptions:c}=r.internalActions;return {buildInitiateQuery:function(n,i){const a=(s,{subscribe:l=!0,forceRefetch:d,subscriptionOptions:f,[et]:p}={})=>(h,y)=>{var m;const v=e({queryArgs:s,endpointDefinition:i,endpointName:n}),g=t({type:"query",subscribe:l,forceRefetch:d,subscriptionOptions:f,endpointName:n,originalArgs:s,queryCacheKey:v,[et]:p}),b=r.endpoints[n].select(s),w=h(g),O=b(y()),{requestId:q,abort:S}=w,A=O.requestId!==q,j=null==(m=o.get(h))?void 0:m[v],R=()=>b(y()),P=Object.assign(p?w.then(R):A&&!j?Promise.resolve(O):Promise.all([j,w]).then(R),{arg:s,requestId:q,subscriptionOptions:f,queryCacheKey:v,abort:S,async unwrap(){const e=await P;if(e.isError)throw e.error;return e.data},refetch:()=>h(a(s,{subscribe:!1,forceRefetch:!0})),unsubscribe(){l&&h(u({queryCacheKey:v,requestId:q}));},updateSubscriptionOptions(e){P.subscriptionOptions=e,h(c({endpointName:n,requestId:q,queryCacheKey:v,options:e}));}});if(!j&&!A&&!p){const e=o.get(h)||{};e[v]=P,o.set(h,e),P.then((()=>{delete e[v],Object.keys(e).length||o.delete(h);}));}return P};return a},buildInitiateMutation:function(e){return (t,{track:r=!0,fixedCacheKey:i}={})=>(o,u)=>{const c=n({type:"mutation",endpointName:e,originalArgs:t,track:r,fixedCacheKey:i}),l=o(c),{requestId:d,abort:f,unwrap:p}=l,h=l.unwrap().then((e=>({data:e}))).catch((e=>({error:e}))),y=()=>{o(s({requestId:d,fixedCacheKey:i}));},m=Object.assign(h,{arg:l.arg,requestId:d,abort:f,unwrap:p,unsubscribe:y,reset:y}),v=a.get(o)||{};return a.set(o,v),v[d]=m,m.then((()=>{delete v[d],Object.keys(v).length||a.delete(o);})),i&&(v[i]=m,m.then((()=>{v[i]===m&&(delete v[i],Object.keys(v).length||a.delete(o));}))),m}},getRunningQueryThunk:function(t,n){return r=>{var a;const u=e({queryArgs:n,endpointDefinition:i.endpointDefinitions[t],endpointName:t});return null==(a=o.get(r))?void 0:a[u]}},getRunningMutationThunk:function(e,t){return e=>{var n;return null==(n=a.get(e))?void 0:n[t]}},getRunningQueriesThunk:function(){return e=>Object.values(o.get(e)||{}).filter(Ze)},getRunningMutationsThunk:function(){return e=>Object.values(a.get(e)||{}).filter(Ze)},getRunningOperationPromises:function(){{const e=e=>Array.from(e.values()).flatMap((e=>e?Object.values(e):[]));return [...e(o),...e(a)].filter(Ze)}},removalWarning:function(){throw new Error("This method had to be removed due to a conceptual bug in RTK.\n Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details.\n See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR.")}}}({queryThunk:q,mutationThunk:S,api:e,serializeQueryArgs:o,context:w});return jt(e.util,{getRunningOperationPromises:U,getRunningOperationPromise:$,getRunningMutationThunk:K,getRunningMutationsThunk:_,getRunningQueryThunk:z,getRunningQueriesThunk:F}),{name:Rt,injectEndpoint(t,n){var r;const i=e;null!=(r=i.endpoints)[t]||(r[t]={}),Ge(n)?jt(i.endpoints[t],{name:t,select:E(t,n),initiate:D(t,n)},T(q,t)):"mutation"===n.type&&jt(i.endpoints[t],{name:t,select:N(),initiate:M(t)},T(S,t));}}}}),Tt=ht(Pt());
exports.buildCreateApi = It;
exports.copyWithStructuralSharing = Ge;
exports.coreModule = Lt;
exports.createApi = Bt;
exports.defaultSerializeQueryArgs = xt;
exports.fakeBaseQuery = Ct;
exports.fetchBaseQuery = et;
exports.retry = at;
exports.setupListeners = dt;
exports.skipSelector = Pt;
exports.skipToken = At;
exports.QueryStatus = n;
exports.buildCreateApi = ht;
exports.copyWithStructuralSharing = Ne;
exports.coreModule = Pt;
exports.createApi = Tt;
exports.defaultSerializeQueryArgs = pt;
exports.fakeBaseQuery = yt;
exports.fetchBaseQuery = _e;
exports.retry = $e;
exports.setupListeners = He;
exports.skipSelector = ct;
exports.skipToken = st;

@@ -22,0 +23,0 @@ Object.defineProperty(exports, '__esModule', { value: true });

@@ -1,6 +0,6 @@

export declare type Id<T> = {
export type Id<T> = {
[K in keyof T]: T[K];
} & {};
export declare type WithRequiredProp<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
export declare type Override<T1, T2> = T2 extends any ? Omit<T1, keyof T2> & T2 : never;
export type WithRequiredProp<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
export type Override<T1, T2> = T2 extends any ? Omit<T1, keyof T2> & T2 : never;
export declare function assertCast<T>(v: any): asserts v is T;

@@ -11,13 +11,13 @@ export declare function safeAssign<T extends object>(target: T, ...args: Array<Partial<NoInfer<T>>>): void;

*/
export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
export declare type NonOptionalKeys<T> = {
export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
export type NonOptionalKeys<T> = {
[K in keyof T]-?: undefined extends T[K] ? never : K;
}[keyof T];
export declare type HasRequiredProps<T, True, False> = NonOptionalKeys<T> extends never ? False : True;
export declare type OptionalIfAllPropsOptional<T> = HasRequiredProps<T, T, T | never>;
export declare type NoInfer<T> = [T][T extends any ? 0 : never];
export declare type UnwrapPromise<T> = T extends PromiseLike<infer V> ? V : T;
export declare type MaybePromise<T> = T | PromiseLike<T>;
export declare type OmitFromUnion<T, K extends keyof T> = T extends any ? Omit<T, K> : never;
export declare type IsAny<T, True, False = never> = true | false extends (T extends never ? true : false) ? True : False;
export declare type CastAny<T, CastTo> = IsAny<T, CastTo, T>;
export type HasRequiredProps<T, True, False> = NonOptionalKeys<T> extends never ? False : True;
export type OptionalIfAllPropsOptional<T> = HasRequiredProps<T, T, T | never>;
export type NoInfer<T> = [T][T extends any ? 0 : never];
export type UnwrapPromise<T> = T extends PromiseLike<infer V> ? V : T;
export type MaybePromise<T> = T | PromiseLike<T>;
export type OmitFromUnion<T, K extends keyof T> = T extends any ? Omit<T, K> : never;
export type IsAny<T, True, False = never> = true | false extends (T extends never ? true : false) ? True : False;
export type CastAny<T, CastTo> = IsAny<T, CastTo, T>;

@@ -1,2 +0,2 @@

var e,n=this&&this.__extends||(e=function(n,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])},e(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),t=this&&this.__generator||function(e,n){var t,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(t)throw new TypeError("Generator is already executing.");for(;u;)try{if(t=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,r=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!((i=(i=u.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=n.call(e,u)}catch(e){o=[6,e],r=0}finally{t=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},r=this&&this.__spreadArray||function(e,n){for(var t=0,r=n.length,i=e.length;t<r;t++,i++)e[i]=n[t];return e},i=Object.create,o=Object.defineProperty,u=Object.defineProperties,a=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,s=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,v=function(e,n,t){return n in e?o(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t},h=function(e,n){for(var t in n||(n={}))d.call(n,t)&&v(e,t,n[t]);if(l)for(var r=0,i=l(n);r<i.length;r++)p.call(n,t=i[r])&&v(e,t,n[t]);return e},y=function(e,n){return u(e,c(n))},g=function(e){return o(e,"__esModule",{value:!0})},b=function(e,n,t){if(n&&"object"==typeof n||"function"==typeof n)for(var r=function(r){d.call(e,r)||"default"===r||o(e,r,{get:function(){return n[r]},enumerable:!(t=a(n,r))||t.enumerable})},i=0,u=f(n);i<u.length;i++)r(u[i]);return e},m=function(e){return b(g(o(null!=e?i(s(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)},w=function(e,n,t){return new Promise((function(r,i){var o=function(e){try{a(t.next(e))}catch(e){i(e)}},u=function(e){try{a(t.throw(e))}catch(e){i(e)}},a=function(e){return e.done?r(e.value):Promise.resolve(e.value).then(o,u)};a((t=t.apply(e,n)).next())}))};g(exports),function(e,n){for(var t in n)o(e,t,{get:n[t],enumerable:!0})}(exports,{MiddlewareArray:function(){return T},SHOULD_AUTOBATCH:function(){return Be},TaskAbortError:function(){return Se},addListener:function(){return Ce},autoBatchEnhancer:function(){return Ge},clearAllListeners:function(){return De},configureStore:function(){return B},createAction:function(){return U},createAsyncThunk:function(){return ae},createDraftSafeSelector:function(){return _},createEntityAdapter:function(){return ne},createImmutableStateInvariantMiddleware:function(){return L},createListenerMiddleware:function(){return Ve},createNextState:function(){return j.default},createReducer:function(){return H},createSelector:function(){return E.createSelector},createSerializableStateInvariantMiddleware:function(){return V},createSlice:function(){return K},current:function(){return j.current},findNonSerializableValue:function(){return N},freeze:function(){return j.freeze},getDefaultMiddleware:function(){return z},getType:function(){return X},isAllOf:function(){return se},isAnyOf:function(){return le},isAsyncThunkAction:function(){return be},isDraft:function(){return j.isDraft},isFulfilled:function(){return ge},isImmutableDefault:function(){return D},isPending:function(){return ve},isPlain:function(){return R},isPlainObject:function(){return k},isRejected:function(){return he},isRejectedWithValue:function(){return ye},miniSerializeError:function(){return ue},nanoid:function(){return te},original:function(){return j.original},prepareAutoBatched:function(){return Ue},removeListener:function(){return Le},unwrapResult:function(){return ce}});var O=m(require("immer"));b(exports,m(require("redux")));var j=m(require("immer")),E=m(require("reselect")),S=m(require("immer")),A=m(require("reselect")),_=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=A.createSelector.apply(void 0,e),i=function(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return t.apply(void 0,r([(0,S.isDraft)(e)?(0,S.current)(e):e],n))};return i},P=m(require("redux")),q=m(require("redux")),x="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?q.compose:q.compose.apply(null,arguments)};function k(e){if("object"!=typeof e||null===e)return!1;var n=Object.getPrototypeOf(e);if(null===n)return!0;for(var t=n;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return n===t}"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window;var M=m(require("redux-thunk")),I=m(require("immer")),T=function(e){function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e.apply(this,n)||this;return Object.setPrototypeOf(i,t.prototype),i}return n(t,e),Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return 1===e.length&&Array.isArray(e[0])?new(t.bind.apply(t,r([void 0],e[0].concat(this)))):new(t.bind.apply(t,r([void 0],e.concat(this))))},t}(Array);function C(e){return(0,I.isDraftable)(e)?(0,I.default)(e,(function(){})):e}function D(e){return"object"!=typeof e||null==e||Object.isFrozen(e)}function L(e){return void 0===e&&(e={}),function(){return function(e){return function(n){return e(n)}}}}function R(e){var n=typeof e;return null==e||"string"===n||"boolean"===n||"number"===n||Array.isArray(e)||k(e)}function N(e,n,t,r,i){var o;if(void 0===n&&(n=""),void 0===t&&(t=R),void 0===i&&(i=[]),!t(e))return{keyPath:n||"<root>",value:e};if("object"!=typeof e||null===e)return!1;for(var u=null!=r?r(e):Object.entries(e),a=i.length>0,c=0,f=u;c<f.length;c++){var l=f[c],s=l[0],d=l[1],p=n?n+"."+s:s;if(!(a&&i.indexOf(p)>=0)){if(!t(d))return{keyPath:p,value:d};if("object"==typeof d&&(o=N(d,p,t,r,i)))return o}}return!1}function V(e){return void 0===e&&(e={}),function(){return function(e){return function(n){return e(n)}}}}function z(e){void 0===e&&(e={});var n=e.thunk,t=void 0===n||n,r=new T;return t&&r.push("boolean"==typeof t?M.default:M.default.withExtraArgument(t.extraArgument)),r}function B(e){var n,t=function(e){return z(e)},i=e||{},o=i.reducer,u=void 0===o?void 0:o,a=i.middleware,c=void 0===a?t():a,f=i.devTools,l=void 0===f||f,s=i.preloadedState,d=void 0===s?void 0:s,p=i.enhancers,v=void 0===p?void 0:p;if("function"==typeof u)n=u;else{if(!k(u))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');n=(0,P.combineReducers)(u)}var y=c;"function"==typeof y&&(y=y(t));var g=P.applyMiddleware.apply(void 0,y),b=P.compose;l&&(b=x(h({trace:!1},"object"==typeof l&&l)));var m=[g];Array.isArray(v)?m=r([g],v):"function"==typeof v&&(m=v(m));var w=b.apply(void 0,m);return(0,P.createStore)(n,d,w)}function U(e,n){function t(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(n){var i=n.apply(void 0,t);if(!i)throw new Error("prepareAction did not return an object");return h(h({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:t[0]}}return t.toString=function(){return""+e},t.type=e,t.match=function(n){return n.type===e},t}function W(e){return["type","payload","error","meta"].indexOf(e)>-1}function X(e){return""+e}var F=m(require("immer"));function G(e){var n,t={},r=[],i={addCase:function(e,n){var r="string"==typeof e?e:e.type;if(r in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[r]=n,i},addMatcher:function(e,n){return r.push({matcher:e,reducer:n}),i},addDefaultCase:function(e){return n=e,i}};return e(i),[t,r,n]}function H(e,n,t,i){void 0===t&&(t=[]);var o,u="function"==typeof n?G(n):[n,t,i],a=u[0],c=u[1],f=u[2];if("function"==typeof e)o=function(){return C(e())};else{var l=C(e);o=function(){return l}}function s(e,n){void 0===e&&(e=o());var t=r([a[n.type]],c.filter((function(e){return(0,e.matcher)(n)})).map((function(e){return e.reducer})));return 0===t.filter((function(e){return!!e})).length&&(t=[f]),t.reduce((function(e,t){if(t){var r;if((0,F.isDraft)(e))return void 0===(r=t(e,n))?e:r;if((0,F.isDraftable)(e))return(0,F.default)(e,(function(e){return t(e,n)}));if(void 0===(r=t(e,n))){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return e}),e)}return s.getInitialState=o,s}function K(e){var n=e.name;if(!n)throw new Error("`name` is a required option for createSlice");var t,r="function"==typeof e.initialState?e.initialState:C(e.initialState),i=e.reducers||{},o=Object.keys(i),u={},a={},c={};function f(){var n="function"==typeof e.extraReducers?G(e.extraReducers):[e.extraReducers],t=n[0],i=n[1],o=void 0===i?[]:i,u=n[2],c=void 0===u?void 0:u,f=h(h({},void 0===t?{}:t),a);return H(r,(function(e){for(var n in f)e.addCase(n,f[n]);for(var t=0,r=o;t<r.length;t++){var i=r[t];e.addMatcher(i.matcher,i.reducer)}c&&e.addDefaultCase(c)}))}return o.forEach((function(e){var t,r,o=i[e],f=n+"/"+e;"reducer"in o?(t=o.reducer,r=o.prepare):t=o,u[e]=t,a[f]=t,c[e]=r?U(f,r):U(f)})),{name:n,reducer:function(e,n){return t||(t=f()),t(e,n)},actions:c,caseReducers:u,getInitialState:function(){return t||(t=f()),t.getInitialState()}}}var J=m(require("immer"));function Q(e){return function(n,t){var r=function(n){var r;k(r=t)&&"string"==typeof r.type&&Object.keys(r).every(W)?e(t.payload,n):e(t,n)};return(0,J.isDraft)(n)?(r(n),n):(0,J.default)(n,r)}}function Y(e,n){return n(e)}function Z(e){return Array.isArray(e)||(e=Object.values(e)),e}function $(e,n,t){for(var r=[],i=[],o=0,u=e=Z(e);o<u.length;o++){var a=u[o],c=Y(a,n);c in t.entities?i.push({id:c,changes:a}):r.push(a)}return[r,i]}function ee(e){function n(n,t){var r=Y(n,e);r in t.entities||(t.ids.push(r),t.entities[r]=n)}function t(e,t){for(var r=0,i=e=Z(e);r<i.length;r++)n(i[r],t)}function r(n,t){var r=Y(n,e);r in t.entities||t.ids.push(r),t.entities[r]=n}function i(e,n){var t=!1;e.forEach((function(e){e in n.entities&&(delete n.entities[e],t=!0)})),t&&(n.ids=n.ids.filter((function(e){return e in n.entities})))}function o(n,t){var r={},i={};if(n.forEach((function(e){e.id in t.entities&&(i[e.id]={id:e.id,changes:h(h({},i[e.id]?i[e.id].changes:null),e.changes)})})),(n=Object.values(i)).length>0){var o=n.filter((function(n){return function(n,t,r){var i=Object.assign({},r.entities[t.id],t.changes),o=Y(i,e),u=o!==t.id;return u&&(n[t.id]=o,delete r.entities[t.id]),r.entities[o]=i,u}(r,n,t)})).length>0;o&&(t.ids=Object.keys(t.entities))}}function u(n,r){var i=$(n,e,r),u=i[0];o(i[1],r),t(u,r)}return{removeAll:(a=function(e){Object.assign(e,{ids:[],entities:{}})},c=Q((function(e,n){return a(n)})),function(e){return c(e,void 0)}),addOne:Q(n),addMany:Q(t),setOne:Q(r),setMany:Q((function(e,n){for(var t=0,i=e=Z(e);t<i.length;t++)r(i[t],n)})),setAll:Q((function(e,n){e=Z(e),n.ids=[],n.entities={},t(e,n)})),updateOne:Q((function(e,n){return o([e],n)})),updateMany:Q(o),upsertOne:Q((function(e,n){return u([e],n)})),upsertMany:Q(u),removeOne:Q((function(e,n){return i([e],n)})),removeMany:Q(i)};var a,c}function ne(e){void 0===e&&(e={});var n=h({sortComparer:!1,selectId:function(e){return e.id}},e),t=n.selectId,r=n.sortComparer,i={getInitialState:function(e){return void 0===e&&(e={}),Object.assign({ids:[],entities:{}},e)}},o={getSelectors:function(e){var n=function(e){return e.ids},t=function(e){return e.entities},r=_(n,t,(function(e,n){return e.map((function(e){return n[e]}))})),i=function(e,n){return n},o=function(e,n){return e[n]},u=_(n,(function(e){return e.length}));if(!e)return{selectIds:n,selectEntities:t,selectAll:r,selectTotal:u,selectById:_(t,i,o)};var a=_(e,t);return{selectIds:_(e,n),selectEntities:a,selectAll:_(e,r),selectTotal:_(e,u),selectById:_(a,i,o)}}},u=r?function(e,n){var t=ee(e);function r(n,t){var r=(n=Z(n)).filter((function(n){return!(Y(n,e)in t.entities)}));0!==r.length&&a(r,t)}function i(e,n){0!==(e=Z(e)).length&&a(e,n)}function o(n,t){for(var r=!1,i=0,o=n;i<o.length;i++){var u=o[i],a=t.entities[u.id];if(a){r=!0,Object.assign(a,u.changes);var f=e(a);u.id!==f&&(delete t.entities[u.id],t.entities[f]=a)}}r&&c(t)}function u(n,t){var i=$(n,e,t),u=i[0];o(i[1],t),r(u,t)}function a(n,t){n.forEach((function(n){t.entities[e(n)]=n})),c(t)}function c(t){var r=Object.values(t.entities);r.sort(n);var i=r.map(e);(function(e,n){if(e.length!==n.length)return!1;for(var t=0;t<e.length&&t<n.length;t++)if(e[t]!==n[t])return!1;return!0})(t.ids,i)||(t.ids=i)}return{removeOne:t.removeOne,removeMany:t.removeMany,removeAll:t.removeAll,addOne:Q((function(e,n){return r([e],n)})),updateOne:Q((function(e,n){return o([e],n)})),upsertOne:Q((function(e,n){return u([e],n)})),setOne:Q((function(e,n){return i([e],n)})),setMany:Q(i),setAll:Q((function(e,n){e=Z(e),n.entities={},n.ids=[],r(e,n)})),addMany:Q(r),updateMany:Q(o),upsertMany:Q(u)}}(t,r):ee(t);return h(h(h({selectId:t,sortComparer:r},i),o),u)}var te=function(e){void 0===e&&(e=21);for(var n="",t=e;t--;)n+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return n},re=["name","message","stack","code"],ie=function(e,n){this.payload=e,this.meta=n},oe=function(e,n){this.payload=e,this.meta=n},ue=function(e){if("object"==typeof e&&null!==e){for(var n={},t=0,r=re;t<r.length;t++){var i=r[t];"string"==typeof e[i]&&(n[i]=e[i])}return n}return{message:String(e)}},ae=function(){function e(e,n,r){var i=U(e+"/fulfilled",(function(e,n,t,r){return{payload:e,meta:y(h({},r||{}),{arg:t,requestId:n,requestStatus:"fulfilled"})}})),o=U(e+"/pending",(function(e,n,t){return{payload:void 0,meta:y(h({},t||{}),{arg:n,requestId:e,requestStatus:"pending"})}})),u=U(e+"/rejected",(function(e,n,t,i,o){return{payload:i,error:(r&&r.serializeError||ue)(e||"Rejected"),meta:y(h({},o||{}),{arg:t,requestId:n,rejectedWithValue:!!i,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)})}})),a="undefined"!=typeof AbortController?AbortController:function(){function e(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return e.prototype.abort=function(){},e}();return Object.assign((function(e){return function(c,f,l){var s,d=(null==r?void 0:r.idGenerator)?r.idGenerator(e):te(),p=new a;function v(e){s=e,p.abort()}var h=function(){return w(this,null,(function(){var a,h,y,g,b,m;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,4,,5]),null===(w=g=null==(a=null==r?void 0:r.condition)?void 0:a.call(r,e,{getState:f,extra:l}))||"object"!=typeof w||"function"!=typeof w.then?[3,2]:[4,g];case 1:g=t.sent(),t.label=2;case 2:if(!1===g||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return b=new Promise((function(e,n){return p.signal.addEventListener("abort",(function(){return n({name:"AbortError",message:s||"Aborted"})}))})),c(o(d,e,null==(h=null==r?void 0:r.getPendingMeta)?void 0:h.call(r,{requestId:d,arg:e},{getState:f,extra:l}))),[4,Promise.race([b,Promise.resolve(n(e,{dispatch:c,getState:f,extra:l,requestId:d,signal:p.signal,abort:v,rejectWithValue:function(e,n){return new ie(e,n)},fulfillWithValue:function(e,n){return new oe(e,n)}})).then((function(n){if(n instanceof ie)throw n;return n instanceof oe?i(n.payload,d,e,n.meta):i(n,d,e)}))])];case 3:return y=t.sent(),[3,5];case 4:return m=t.sent(),y=m instanceof ie?u(null,d,e,m.payload,m.meta):u(m,d,e),[3,5];case 5:return r&&!r.dispatchConditionRejection&&u.match(y)&&y.meta.condition||c(y),[2,y]}var w}))}))}();return Object.assign(h,{abort:v,requestId:d,arg:e,unwrap:function(){return h.then(ce)}})}}),{pending:o,rejected:u,fulfilled:i,typePrefix:e})}return e.withTypes=function(){return e},e}();function ce(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var fe=function(e,n){return(t=e)&&"function"==typeof t.match?e.match(n):e(n);var t};function le(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return function(n){return e.some((function(e){return fe(e,n)}))}}function se(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return function(n){return e.every((function(e){return fe(e,n)}))}}function de(e,n){if(!e||!e.meta)return!1;var t="string"==typeof e.meta.requestId,r=n.indexOf(e.meta.requestStatus)>-1;return t&&r}function pe(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function ve(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return 0===e.length?function(e){return de(e,["pending"])}:pe(e)?function(n){var t=e.map((function(e){return e.pending}));return le.apply(void 0,t)(n)}:ve()(e[0])}function he(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return 0===e.length?function(e){return de(e,["rejected"])}:pe(e)?function(n){var t=e.map((function(e){return e.rejected}));return le.apply(void 0,t)(n)}:he()(e[0])}function ye(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=function(e){return e&&e.meta&&e.meta.rejectedWithValue};return 0===e.length||pe(e)?function(n){return se(he.apply(void 0,e),t)(n)}:ye()(e[0])}function ge(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return 0===e.length?function(e){return de(e,["fulfilled"])}:pe(e)?function(n){var t=e.map((function(e){return e.fulfilled}));return le.apply(void 0,t)(n)}:ge()(e[0])}function be(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return 0===e.length?function(e){return de(e,["pending","fulfilled","rejected"])}:pe(e)?function(n){for(var t=[],r=0,i=e;r<i.length;r++){var o=i[r];t.push(o.pending,o.rejected,o.fulfilled)}return le.apply(void 0,t)(n)}:be()(e[0])}var me=function(e,n){if("function"!=typeof e)throw new TypeError(n+" is not a function")},we=function(){},Oe=function(e,n){return void 0===n&&(n=we),e.catch(n),e},je=function(e,n){e.addEventListener("abort",n,{once:!0})},Ee=function(e,n){var t=e.signal;t.aborted||("reason"in t||Object.defineProperty(t,"reason",{enumerable:!0,value:n,configurable:!0,writable:!0}),e.abort(n))},Se=function(e){this.code=e,this.name="TaskAbortError",this.message="task cancelled (reason: "+e+")"},Ae=function(e){if(e.aborted)throw new Se(e.reason)},_e=function(e){return Oe(new Promise((function(n,t){var r=function(){return t(new Se(e.reason))};e.aborted?r():je(e,r)})))},Pe=function(e){return function(n){return Oe(Promise.race([_e(e),n]).then((function(n){return Ae(e),n})))}},qe=function(e){var n=Pe(e);return function(e){return n(new Promise((function(n){return setTimeout(n,e)})))}},xe=Object.assign,ke={},Me="listenerMiddleware",Ie=function(e){var n=e.type,t=e.actionCreator,r=e.matcher,i=e.predicate,o=e.effect;if(n)i=U(n).match;else if(t)n=t.type,i=t.match;else if(r)i=r;else if(!i)throw new Error("Creating or removing a listener requires one of the known fields for matching an action");return me(o,"options.listener"),{predicate:i,type:n,effect:o}},Te=function(e,n,t){try{e(n,t)}catch(e){setTimeout((function(){throw e}),0)}},Ce=U(Me+"/add"),De=U(Me+"/removeAll"),Le=U(Me+"/remove"),Re=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];console.error.apply(console,r([Me+"/error"],e))},Ne=function(e){e.pending.forEach((function(e){Ee(e,"listener-cancelled")}))};function Ve(e){var n=this;void 0===e&&(e={});var r=new Map,i=e.extra,o=e.onError,u=void 0===o?Re:o;me(u,"onError");var a=function(e){for(var n=0,t=Array.from(r.values());n<t.length;n++){var i=t[n];if(e(i))return i}},c=function(e){var n=a((function(n){return n.effect===e.effect}));return n||(n=function(e){var n=Ie(e),t=n.type,r=n.predicate,i=n.effect;return{id:te(),effect:i,type:t,predicate:r,pending:new Set,unsubscribe:function(){throw new Error("Unsubscribe not initialized")}}}(e)),function(e){return e.unsubscribe=function(){return r.delete(e.id)},r.set(e.id,e),function(n){e.unsubscribe(),(null==n?void 0:n.cancelActive)&&Ne(e)}}(n)},f=function(e){var n=Ie(e),t=n.type,r=n.effect,i=n.predicate,o=a((function(e){return("string"==typeof t?e.type===t:e.predicate===i)&&e.effect===r}));return o&&(o.unsubscribe(),e.cancelActive&&Ne(o)),!!o},l=function(e,o,a,f){return w(n,null,(function(){var n,l,s;return t(this,(function(d){switch(d.label){case 0:n=new AbortController,l=function(e,n){return function(r,i){return Oe(function(r,i){return w(void 0,null,(function(){var o,u,a,c;return t(this,(function(t){switch(t.label){case 0:Ae(n),o=function(){},u=new Promise((function(n){o=e({predicate:r,effect:function(e,t){t.unsubscribe(),n([e,t.getState(),t.getOriginalState()])}})})),a=[_e(n),u],null!=i&&a.push(new Promise((function(e){return setTimeout(e,i,null)}))),t.label=1;case 1:return t.trys.push([1,,3,4]),[4,Promise.race(a)];case 2:return c=t.sent(),Ae(n),[2,c];case 3:return o(),[7];case 4:return[2]}}))}))}(r,i))}}(c,n.signal),d.label=1;case 1:return d.trys.push([1,3,4,5]),e.pending.add(n),[4,Promise.resolve(e.effect(o,xe({},a,{getOriginalState:f,condition:function(e,n){return l(e,n).then(Boolean)},take:l,delay:qe(n.signal),pause:Pe(n.signal),extra:i,signal:n.signal,fork:(p=n.signal,function(e){me(e,"taskExecutor");var n,r=new AbortController;n=r,je(p,(function(){return Ee(n,p.reason)}));var i,o,u=(i=function(){return w(void 0,null,(function(){var n;return t(this,(function(t){switch(t.label){case 0:return Ae(p),Ae(r.signal),[4,e({pause:Pe(r.signal),delay:qe(r.signal),signal:r.signal})];case 1:return n=t.sent(),Ae(r.signal),[2,n]}}))}))},o=function(){return Ee(r,"task-completed")},w(void 0,null,(function(){var e;return t(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,4,5]),[4,Promise.resolve()];case 1:return n.sent(),[4,i()];case 2:return[2,{status:"ok",value:n.sent()}];case 3:return[2,{status:(e=n.sent())instanceof Se?"cancelled":"rejected",error:e}];case 4:return null==o||o(),[7];case 5:return[2]}}))})));return{result:Pe(p)(u),cancel:function(){Ee(r,"task-cancelled")}}}),unsubscribe:e.unsubscribe,subscribe:function(){r.set(e.id,e)},cancelActiveListeners:function(){e.pending.forEach((function(e,t,r){e!==n&&(Ee(e,"listener-cancelled"),r.delete(e))}))}})))];case 2:return d.sent(),[3,5];case 3:return(s=d.sent())instanceof Se||Te(u,s,{raisedBy:"effect"}),[3,5];case 4:return Ee(n,"listener-completed"),e.pending.delete(n),[7];case 5:return[2]}var p}))}))},s=function(e){return function(){e.forEach(Ne),e.clear()}}(r);return{middleware:function(e){return function(n){return function(t){if(Ce.match(t))return c(t.payload);if(!De.match(t)){if(Le.match(t))return f(t.payload);var i,o=e.getState(),a=function(){if(o===ke)throw new Error(Me+": getOriginalState can only be called synchronously");return o};try{if(i=n(t),r.size>0)for(var d=e.getState(),p=Array.from(r.values()),v=0,h=p;v<h.length;v++){var y=h[v],g=!1;try{g=y.predicate(t,d,o)}catch(e){g=!1,Te(u,e,{raisedBy:"predicate"})}g&&l(y,t,e,a)}}finally{o=ke}return i}s()}}},startListening:c,stopListening:f,clearListeners:s}}var ze,Be="RTK_autoBatch",Ue=function(){return function(e){var n;return{payload:e,meta:(n={},n[Be]=!0,n)}}},We="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis):function(e){return(ze||(ze=Promise.resolve())).then(e).catch((function(e){return setTimeout((function(){throw e}),0)}))},Xe=function(e){return function(n){setTimeout(n,e)}},Fe="undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:Xe(10),Ge=function(e){return void 0===e&&(e={type:"raf"}),function(n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=n.apply(void 0,t),o=!0,u=!1,a=!1,c=new Set,f="tick"===e.type?We:"raf"===e.type?Fe:"callback"===e.type?e.queueNotification:Xe(e.timeout),l=function(){a=!1,u&&(u=!1,c.forEach((function(e){return e()})))};return Object.assign({},i,{subscribe:function(e){var n=i.subscribe((function(){return o&&e()}));return c.add(e),function(){n(),c.delete(e)}},dispatch:function(e){var n;try{return o=!(null==(n=null==e?void 0:e.meta)?void 0:n[Be]),(u=!o)&&(a||(a=!0,f(l))),i.dispatch(e)}finally{o=!0}}})}}};(0,O.enableES5)();
"use strict";var e,t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,c=(e,t,o,c)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of i(t))a.call(e,s)||s===o||n(e,s,{get:()=>t[s],enumerable:!(c=r(t,s))||c.enumerable});return e},s=(e,r,i)=>(i=null!=e?t(o(e)):{},c(!r&&e&&e.__esModule?i:n(i,"default",{value:e,enumerable:!0}),e)),u=(e,t,r)=>(((e,t,r)=>{t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r),l={};((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})(l,{MiddlewareArray:()=>j,SHOULD_AUTOBATCH:()=>Ie,TaskAbortError:()=>ye,addListener:()=>Ae,autoBatchEnhancer:()=>Le,clearAllListeners:()=>Se,configureStore:()=>k,createAction:()=>I,createAsyncThunk:()=>Q,createDraftSafeSelector:()=>m,createEntityAdapter:()=>X,createImmutableStateInvariantMiddleware:()=>S,createListenerMiddleware:()=>_e,createNextState:()=>f.produce,createReducer:()=>L,createSelector:()=>d.createSelector,createSerializableStateInvariantMiddleware:()=>M,createSlice:()=>R,current:()=>f.current,findNonSerializableValue:()=>q,freeze:()=>f.freeze,getDefaultMiddleware:()=>_,getType:()=>x,isAllOf:()=>te,isAnyOf:()=>ee,isAsyncThunkAction:()=>se,isDraft:()=>f.isDraft,isFulfilled:()=>ce,isImmutableDefault:()=>A,isPending:()=>ie,isPlain:()=>P,isPlainObject:()=>w,isRejected:()=>oe,isRejectedWithValue:()=>ae,miniSerializeError:()=>J,nanoid:()=>F,original:()=>f.original,prepareAutoBatched:()=>Te,removeListener:()=>Pe,unwrapResult:()=>Y}),module.exports=(e=l,c(n({},"__esModule",{value:!0}),e)),((e,t,n)=>{c(e,t,"default"),n&&c(n,t,"default")})(l,require("redux"),module.exports);var f=require("immer"),d=require("reselect"),p=require("immer"),y=require("reselect"),m=(...e)=>{const t=(0,y.createSelector)(...e);return(e,...n)=>t((0,p.isDraft)(e)?(0,p.current)(e):e,...n)},h=require("redux"),g=require("redux"),b="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?g.compose:g.compose.apply(null,arguments)};function w(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);if(null===t)return!0;let n=t;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n}"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window;var v=s(require("redux-thunk")),O=s(require("immer")),j=class extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,j.prototype)}static get[Symbol.species](){return j}concat(...e){return super.concat.apply(this,e)}prepend(...e){return 1===e.length&&Array.isArray(e[0])?new j(...e[0].concat(this)):new j(...e.concat(this))}};function E(e){return(0,O.isDraftable)(e)?(0,O.default)(e,(()=>{})):e}function A(e){return"object"!=typeof e||null==e||Object.isFrozen(e)}function S(e={}){return()=>e=>t=>e(t)}function P(e){const t=typeof e;return null==e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||w(e)}function q(e,t="",n=P,r,i=[]){let o;if(!n(e))return{keyPath:t||"<root>",value:e};if("object"!=typeof e||null===e)return!1;const a=null!=r?r(e):Object.entries(e),c=i.length>0;for(const[e,s]of a){const a=t?t+"."+e:e;if(!(c&&i.indexOf(a)>=0)){if(!n(s))return{keyPath:a,value:s};if("object"==typeof s&&(o=q(s,a,n,r,i),o))return o}}return!1}function M(e={}){return()=>e=>t=>e(t)}function _(e={}){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0}=e;let i=new j;return t&&i.push("boolean"==typeof t?v.default:v.default.withExtraArgument(t.extraArgument)),i}function k(e){const t=function(e){return _(e)},{reducer:n,middleware:r=t(),devTools:i=!0,preloadedState:o,enhancers:a}=e||{};let c;if("function"==typeof n)c=n;else{if(!w(n))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');c=(0,h.combineReducers)(n)}let s=r;"function"==typeof s&&(s=s(t));const u=(0,h.applyMiddleware)(...s);let l=h.compose;i&&(l=b({trace:!1,..."object"==typeof i&&i}));let f=[u];Array.isArray(a)?f=[u,...a]:"function"==typeof a&&(f=a(f));const d=l(...f);return(0,h.createStore)(c,o,d)}function I(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error("prepareAction did not return an object");return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>t.type===e,n}function T(e){return["type","payload","error","meta"].indexOf(e)>-1}function x(e){return`${e}`}var C=s(require("immer"));function D(e){const t={},n=[];let r;const i={addCase(e,n){const r="string"==typeof e?e:e.type;if(r in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[r]=n,i},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),i),addDefaultCase:e=>(r=e,i)};return e(i),[t,n,r]}function L(e,t){let n,[r,i,o]=D(t);if("function"==typeof e)n=()=>E(e());else{const t=E(e);n=()=>t}function a(e=n(),t){let a=[r[t.type],...i.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===a.filter((e=>!!e)).length&&(a=[o]),a.reduce(((e,n)=>{if(n){if((0,C.isDraft)(e)){const r=n(e,t);return void 0===r?e:r}if((0,C.isDraftable)(e))return(0,C.default)(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e}),e)}return a.getInitialState=n,a}function R(e){const{name:t}=e;if(!t)throw new Error("`name` is a required option for createSlice");const n="function"==typeof e.initialState?e.initialState:E(e.initialState),r=e.reducers||{},i=Object.keys(r),o={},a={},c={};function s(){const[t={},r=[],i]="function"==typeof e.extraReducers?D(e.extraReducers):[e.extraReducers],o={...t,...a};return L(n,(e=>{for(let t in o)e.addCase(t,o[t]);for(let t of r)e.addMatcher(t.matcher,t.reducer);i&&e.addDefaultCase(i)}))}let u;return i.forEach((e=>{const n=r[e],i=`${t}/${e}`;let s,u;"reducer"in n?(s=n.reducer,u=n.prepare):s=n,o[e]=s,a[i]=s,c[e]=u?I(i,u):I(i)})),{name:t,reducer:(e,t)=>(u||(u=s()),u(e,t)),actions:c,caseReducers:o,getInitialState:()=>(u||(u=s()),u.getInitialState())}}var z=s(require("immer"));function N(e){const t=V(((t,n)=>e(n)));return function(e){return t(e,void 0)}}function V(e){return function(t,n){const r=t=>{var r;w(r=n)&&"string"==typeof r.type&&Object.keys(r).every(T)?e(n.payload,t):e(n,t)};return(0,z.isDraft)(t)?(r(t),t):(0,z.default)(t,r)}}function $(e,t){return t(e)}function B(e){return Array.isArray(e)||(e=Object.values(e)),e}function U(e,t,n){e=B(e);const r=[],i=[];for(const o of e){const e=$(o,t);e in n.entities?i.push({id:e,changes:o}):r.push(o)}return[r,i]}function W(e){function t(t,n){const r=$(t,e);r in n.entities||(n.ids.push(r),n.entities[r]=t)}function n(e,n){e=B(e);for(const r of e)t(r,n)}function r(t,n){const r=$(t,e);r in n.entities||n.ids.push(r),n.entities[r]=t}function i(e,t){let n=!1;e.forEach((e=>{e in t.entities&&(delete t.entities[e],n=!0)})),n&&(t.ids=t.ids.filter((e=>e in t.entities)))}function o(t,n){const r={},i={};if(t.forEach((e=>{e.id in n.entities&&(i[e.id]={id:e.id,changes:{...i[e.id]?i[e.id].changes:null,...e.changes}})})),(t=Object.values(i)).length>0){const i=t.filter((t=>function(t,n,r){const i=Object.assign({},r.entities[n.id],n.changes),o=$(i,e),a=o!==n.id;return a&&(t[n.id]=o,delete r.entities[n.id]),r.entities[o]=i,a}(r,t,n))).length>0;i&&(n.ids=Object.keys(n.entities))}}function a(t,r){const[i,a]=U(t,e,r);o(a,r),n(i,r)}return{removeAll:N((function(e){Object.assign(e,{ids:[],entities:{}})})),addOne:V(t),addMany:V(n),setOne:V(r),setMany:V((function(e,t){e=B(e);for(const n of e)r(n,t)})),setAll:V((function(e,t){e=B(e),t.ids=[],t.entities={},n(e,t)})),updateOne:V((function(e,t){return o([e],t)})),updateMany:V(o),upsertOne:V((function(e,t){return a([e],t)})),upsertMany:V(a),removeOne:V((function(e,t){return i([e],t)})),removeMany:V(i)}}function X(e={}){const{selectId:t,sortComparer:n}={sortComparer:!1,selectId:e=>e.id,...e},r={getInitialState:function(e={}){return Object.assign({ids:[],entities:{}},e)}},i={getSelectors:function(e){const t=e=>e.ids,n=e=>e.entities,r=m(t,n,((e,t)=>e.map((e=>t[e])))),i=(e,t)=>t,o=(e,t)=>e[t],a=m(t,(e=>e.length));if(!e)return{selectIds:t,selectEntities:n,selectAll:r,selectTotal:a,selectById:m(n,i,o)};const c=m(e,n);return{selectIds:m(e,t),selectEntities:c,selectAll:m(e,r),selectTotal:m(e,a),selectById:m(c,i,o)}}},o=n?function(e,t){const{removeOne:n,removeMany:r,removeAll:i}=W(e);function o(t,n){const r=(t=B(t)).filter((t=>!($(t,e)in n.entities)));0!==r.length&&u(r,n)}function a(e,t){0!==(e=B(e)).length&&u(e,t)}function c(t,n){let r=!1;for(let i of t){const t=n.entities[i.id];if(!t)continue;r=!0,Object.assign(t,i.changes);const o=e(t);i.id!==o&&(delete n.entities[i.id],n.entities[o]=t)}r&&l(n)}function s(t,n){const[r,i]=U(t,e,n);c(i,n),o(r,n)}function u(t,n){t.forEach((t=>{n.entities[e(t)]=t})),l(n)}function l(n){const r=Object.values(n.entities);r.sort(t);const i=r.map(e),{ids:o}=n;(function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length&&n<t.length;n++)if(e[n]!==t[n])return!1;return!0})(o,i)||(n.ids=i)}return{removeOne:n,removeMany:r,removeAll:i,addOne:V((function(e,t){return o([e],t)})),updateOne:V((function(e,t){return c([e],t)})),upsertOne:V((function(e,t){return s([e],t)})),setOne:V((function(e,t){return a([e],t)})),setMany:V(a),setAll:V((function(e,t){e=B(e),t.entities={},t.ids=[],o(e,t)})),addMany:V(o),updateMany:V(c),upsertMany:V(s)}}(t,n):W(t);return{selectId:t,sortComparer:n,...r,...i,...o}}var F=(e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},G=["name","message","stack","code"],H=class{constructor(e,t){this.payload=e,this.meta=t,u(this,"_type")}},K=class{constructor(e,t){this.payload=e,this.meta=t,u(this,"_type")}},J=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of G)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}},Q=(()=>{function e(e,t,n){const r=I(e+"/fulfilled",((e,t,n,r)=>({payload:e,meta:{...r||{},arg:n,requestId:t,requestStatus:"fulfilled"}}))),i=I(e+"/pending",((e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}}))),o=I(e+"/rejected",((e,t,r,i,o)=>({payload:i,error:(n&&n.serializeError||J)(e||"Rejected"),meta:{...o||{},arg:r,requestId:t,rejectedWithValue:!!i,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)}}))),a="undefined"!=typeof AbortController?AbortController:class{constructor(){u(this,"signal",{aborted:!1,addEventListener(){},dispatchEvent:()=>!1,onabort(){},removeEventListener(){},reason:void 0,throwIfAborted(){}})}abort(){}};return Object.assign((function(e){return(c,s,u)=>{const l=(null==n?void 0:n.idGenerator)?n.idGenerator(e):F(),f=new a;let d,p=!1;function y(e){d=e,f.abort()}const m=async function(){var a,m;let h;try{let o=null==(a=null==n?void 0:n.condition)?void 0:a.call(n,e,{getState:s,extra:u});if(null!==(g=o)&&"object"==typeof g&&"function"==typeof g.then&&(o=await o),!1===o||f.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};p=!0;const b=new Promise(((e,t)=>f.signal.addEventListener("abort",(()=>t({name:"AbortError",message:d||"Aborted"})))));c(i(l,e,null==(m=null==n?void 0:n.getPendingMeta)?void 0:m.call(n,{requestId:l,arg:e},{getState:s,extra:u}))),h=await Promise.race([b,Promise.resolve(t(e,{dispatch:c,getState:s,extra:u,requestId:l,signal:f.signal,abort:y,rejectWithValue:(e,t)=>new H(e,t),fulfillWithValue:(e,t)=>new K(e,t)})).then((t=>{if(t instanceof H)throw t;return t instanceof K?r(t.payload,l,e,t.meta):r(t,l,e)}))])}catch(t){h=t instanceof H?o(null,l,e,t.payload,t.meta):o(t,l,e)}var g;return n&&!n.dispatchConditionRejection&&o.match(h)&&h.meta.condition||c(h),h}();return Object.assign(m,{abort:y,requestId:l,arg:e,unwrap:()=>m.then(Y)})}}),{pending:i,rejected:o,fulfilled:r,typePrefix:e})}return e.withTypes=()=>e,e})();function Y(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var Z=(e,t)=>{return(n=e)&&"function"==typeof n.match?e.match(t):e(t);var n};function ee(...e){return t=>e.some((e=>Z(e,t)))}function te(...e){return t=>e.every((e=>Z(e,t)))}function ne(e,t){if(!e||!e.meta)return!1;const n="string"==typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function re(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function ie(...e){return 0===e.length?e=>ne(e,["pending"]):re(e)?t=>ee(...e.map((e=>e.pending)))(t):ie()(e[0])}function oe(...e){return 0===e.length?e=>ne(e,["rejected"]):re(e)?t=>ee(...e.map((e=>e.rejected)))(t):oe()(e[0])}function ae(...e){const t=e=>e&&e.meta&&e.meta.rejectedWithValue;return 0===e.length||re(e)?n=>te(oe(...e),t)(n):ae()(e[0])}function ce(...e){return 0===e.length?e=>ne(e,["fulfilled"]):re(e)?t=>ee(...e.map((e=>e.fulfilled)))(t):ce()(e[0])}function se(...e){return 0===e.length?e=>ne(e,["pending","fulfilled","rejected"]):re(e)?t=>{const n=[];for(const t of e)n.push(t.pending,t.rejected,t.fulfilled);return ee(...n)(t)}:se()(e[0])}var ue=(e,t)=>{if("function"!=typeof e)throw new TypeError(`${t} is not a function`)},le=()=>{},fe=(e,t=le)=>(e.catch(t),e),de=(e,t)=>{e.addEventListener("abort",t,{once:!0})},pe=(e,t)=>{const n=e.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},ye=class{constructor(e){this.code=e,u(this,"name","TaskAbortError"),u(this,"message"),this.message=`task cancelled (reason: ${e})`}},me=e=>{if(e.aborted)throw new ye(e.reason)},he=e=>fe(new Promise(((t,n)=>{const r=()=>n(new ye(e.reason));e.aborted?r():de(e,r)}))),ge=e=>t=>fe(Promise.race([he(e),t]).then((t=>(me(e),t)))),be=e=>{const t=ge(e);return e=>t(new Promise((t=>setTimeout(t,e))))},{assign:we}=Object,ve={},Oe="listenerMiddleware",je=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:o}=e;if(t)i=I(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error("Creating or removing a listener requires one of the known fields for matching an action");return ue(o,"options.listener"),{predicate:i,type:t,effect:o}},Ee=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout((()=>{throw e}),0)}},Ae=I(`${Oe}/add`),Se=I(`${Oe}/removeAll`),Pe=I(`${Oe}/remove`),qe=(...e)=>{console.error(`${Oe}/error`,...e)},Me=e=>{e.pending.forEach((e=>{pe(e,"listener-cancelled")}))};function _e(e={}){const t=new Map,{extra:n,onError:r=qe}=e;ue(r,"onError");const i=e=>{for(const n of Array.from(t.values()))if(e(n))return n},o=e=>{let n=i((t=>t.effect===e.effect));return n||(n=(e=>{const{type:t,predicate:n,effect:r}=je(e);return{id:F(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error("Unsubscribe not initialized")}}})(e)),(e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),(null==t?void 0:t.cancelActive)&&Me(e)}))(n)},a=e=>{const{type:t,effect:n,predicate:r}=je(e),o=i((e=>("string"==typeof t?e.type===t:e.predicate===r)&&e.effect===n));return o&&(o.unsubscribe(),e.cancelActive&&Me(o)),!!o},c=async(e,i,a,c)=>{const s=new AbortController,u=((e,t)=>(n,r)=>fe((async(n,r)=>{me(t);let i=()=>{};const o=new Promise((t=>{i=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}})})),a=[he(t),o];null!=r&&a.push(new Promise((e=>setTimeout(e,r,null))));try{const e=await Promise.race(a);return me(t),e}finally{i()}})(n,r)))(o,s.signal);try{e.pending.add(s),await Promise.resolve(e.effect(i,we({},a,{getOriginalState:c,condition:(e,t)=>u(e,t).then(Boolean),take:u,delay:be(s.signal),pause:ge(s.signal),extra:n,signal:s.signal,fork:(l=s.signal,e=>{ue(e,"taskExecutor");const t=new AbortController;var n;n=t,de(l,(()=>pe(n,l.reason)));const r=(async(n,r)=>{try{return await Promise.resolve(),{status:"ok",value:await(async()=>{me(l),me(t.signal);const n=await e({pause:ge(t.signal),delay:be(t.signal),signal:t.signal});return me(t.signal),n})()}}catch(e){return{status:e instanceof ye?"cancelled":"rejected",error:e}}finally{null==r||r()}})(0,(()=>pe(t,"task-completed")));return{result:ge(l)(r),cancel(){pe(t,"task-cancelled")}}}),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach(((e,t,n)=>{e!==s&&(pe(e,"listener-cancelled"),n.delete(e))}))}})))}catch(e){e instanceof ye||Ee(r,e,{raisedBy:"effect"})}finally{pe(s,"listener-completed"),e.pending.delete(s)}var l},s=(e=>()=>{e.forEach(Me),e.clear()})(t);return{middleware:e=>n=>i=>{if(Ae.match(i))return o(i.payload);if(Se.match(i))return void s();if(Pe.match(i))return a(i.payload);let u=e.getState();const l=()=>{if(u===ve)throw new Error(`${Oe}: getOriginalState can only be called synchronously`);return u};let f;try{if(f=n(i),t.size>0){let n=e.getState();const o=Array.from(t.values());for(let t of o){let o=!1;try{o=t.predicate(i,n,u)}catch(e){o=!1,Ee(r,e,{raisedBy:"predicate"})}o&&c(t,i,e,l)}}}finally{u=ve}return f},startListening:o,stopListening:a,clearListeners:s}}var ke,Ie="RTK_autoBatch",Te=()=>e=>({payload:e,meta:{[Ie]:!0}}),xe="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis):e=>(ke||(ke=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0))),Ce=e=>t=>{setTimeout(t,e)},De="undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:Ce(10),Le=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const c=new Set,s="tick"===e.type?xe:"raf"===e.type?De:"callback"===e.type?e.queueNotification:Ce(e.timeout),u=()=>{a=!1,o&&(o=!1,c.forEach((e=>e())))};return Object.assign({},r,{subscribe(e){const t=r.subscribe((()=>i&&e()));return c.add(e),()=>{t(),c.delete(e)}},dispatch(e){var t;try{return i=!(null==(t=null==e?void 0:e.meta)?void 0:t[Ie]),o=!i,o&&(a||(a=!0,s(u))),r.dispatch(e)}finally{i=!0}}})};
//# sourceMappingURL=redux-toolkit.cjs.production.min.js.map

@@ -1,2 +0,2 @@

var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,a=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,c=(e,t)=>{for(var n in t||(t={}))o.call(t,n)&&a(e,n,t[n]);if(r)for(var n of r(t))i.call(t,n)&&a(e,n,t[n]);return e},s=(e,r)=>t(e,n(r));import{enableES5 as u}from"immer";export*from"redux";import{default as l,current as f,freeze as d,original as p,isDraft as m}from"immer";import{createSelector as y}from"reselect";import{current as h,isDraft as g}from"immer";import{createSelector as b}from"reselect";var w=(...e)=>{const t=b(...e);return(e,...n)=>t(g(e)?h(e):e,...n)};import{createStore as v,compose as O,applyMiddleware as j,combineReducers as E}from"redux";import{compose as S}from"redux";var A="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?S:S.apply(null,arguments)};function P(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);if(null===t)return!0;let n=t;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n}"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window;import k from"redux-thunk";import x,{isDraftable as I}from"immer";var _=class extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,_.prototype)}static get[Symbol.species](){return _}concat(...e){return super.concat.apply(this,e)}prepend(...e){return 1===e.length&&Array.isArray(e[0])?new _(...e[0].concat(this)):new _(...e.concat(this))}};function C(e){return I(e)?x(e,(()=>{})):e}function M(e){return"object"!=typeof e||null==e||Object.isFrozen(e)}function T(e={}){return()=>e=>t=>e(t)}function q(e){const t=typeof e;return null==e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||P(e)}function D(e,t="",n=q,r,o=[]){let i;if(!n(e))return{keyPath:t||"<root>",value:e};if("object"!=typeof e||null===e)return!1;const a=null!=r?r(e):Object.entries(e),c=o.length>0;for(const[e,s]of a){const a=t?t+"."+e:e;if(!(c&&o.indexOf(a)>=0)){if(!n(s))return{keyPath:a,value:s};if("object"==typeof s&&(i=D(s,a,n,r,o),i))return i}}return!1}function R(e={}){return()=>e=>t=>e(t)}function L(e={}){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0}=e;let o=new _;return t&&o.push("boolean"==typeof t?k:k.withExtraArgument(t.extraArgument)),o}function $(e){const t=function(e){return L(e)},{reducer:n,middleware:r=t(),devTools:o=!0,preloadedState:i,enhancers:a}=e||{};let s;if("function"==typeof n)s=n;else{if(!P(n))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');s=E(n)}let u=r;"function"==typeof u&&(u=u(t));const l=j(...u);let f=O;o&&(f=A(c({trace:!1},"object"==typeof o&&o)));let d=[l];Array.isArray(a)?d=[l,...a]:"function"==typeof a&&(d=a(d));const p=f(...d);return v(s,i,p)}function B(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error("prepareAction did not return an object");return c(c({type:e,payload:r.payload},"meta"in r&&{meta:r.meta}),"error"in r&&{error:r.error})}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>t.type===e,n}function N(e){return["type","payload","error","meta"].indexOf(e)>-1}function V(e){return`${e}`}import X,{isDraft as z,isDraftable as W}from"immer";function U(e){const t={},n=[];let r;const o={addCase(e,n){const r="string"==typeof e?e:e.type;if(r in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[r]=n,o},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(r=e,o)};return e(o),[t,n,r]}function F(e,t,n=[],r){let o,[i,a,c]="function"==typeof t?U(t):[t,n,r];if("function"==typeof e)o=()=>C(e());else{const t=C(e);o=()=>t}function s(e=o(),t){let n=[i[t.type],...a.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===n.filter((e=>!!e)).length&&(n=[c]),n.reduce(((e,n)=>{if(n){if(z(e)){const r=n(e,t);return void 0===r?e:r}if(W(e))return X(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e}),e)}return s.getInitialState=o,s}function K(e){const{name:t}=e;if(!t)throw new Error("`name` is a required option for createSlice");const n="function"==typeof e.initialState?e.initialState:C(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},a={},s={};function u(){const[t={},r=[],o]="function"==typeof e.extraReducers?U(e.extraReducers):[e.extraReducers],i=c(c({},t),a);return F(n,(e=>{for(let t in i)e.addCase(t,i[t]);for(let t of r)e.addMatcher(t.matcher,t.reducer);o&&e.addDefaultCase(o)}))}let l;return o.forEach((e=>{const n=r[e],o=`${t}/${e}`;let c,u;"reducer"in n?(c=n.reducer,u=n.prepare):c=n,i[e]=c,a[o]=c,s[e]=u?B(o,u):B(o)})),{name:t,reducer:(e,t)=>(l||(l=u()),l(e,t)),actions:s,caseReducers:i,getInitialState:()=>(l||(l=u()),l.getInitialState())}}import G,{isDraft as H}from"immer";function J(e){const t=Q(((t,n)=>e(n)));return function(e){return t(e,void 0)}}function Q(e){return function(t,n){const r=t=>{var r;P(r=n)&&"string"==typeof r.type&&Object.keys(r).every(N)?e(n.payload,t):e(n,t)};return H(t)?(r(t),t):G(t,r)}}function Y(e,t){return t(e)}function Z(e){return Array.isArray(e)||(e=Object.values(e)),e}function ee(e,t,n){e=Z(e);const r=[],o=[];for(const i of e){const e=Y(i,t);e in n.entities?o.push({id:e,changes:i}):r.push(i)}return[r,o]}function te(e){function t(t,n){const r=Y(t,e);r in n.entities||(n.ids.push(r),n.entities[r]=t)}function n(e,n){e=Z(e);for(const r of e)t(r,n)}function r(t,n){const r=Y(t,e);r in n.entities||n.ids.push(r),n.entities[r]=t}function o(e,t){let n=!1;e.forEach((e=>{e in t.entities&&(delete t.entities[e],n=!0)})),n&&(t.ids=t.ids.filter((e=>e in t.entities)))}function i(t,n){const r={},o={};if(t.forEach((e=>{e.id in n.entities&&(o[e.id]={id:e.id,changes:c(c({},o[e.id]?o[e.id].changes:null),e.changes)})})),(t=Object.values(o)).length>0){const o=t.filter((t=>function(t,n,r){const o=Object.assign({},r.entities[n.id],n.changes),i=Y(o,e),a=i!==n.id;return a&&(t[n.id]=i,delete r.entities[n.id]),r.entities[i]=o,a}(r,t,n))).length>0;o&&(n.ids=Object.keys(n.entities))}}function a(t,r){const[o,a]=ee(t,e,r);i(a,r),n(o,r)}return{removeAll:J((function(e){Object.assign(e,{ids:[],entities:{}})})),addOne:Q(t),addMany:Q(n),setOne:Q(r),setMany:Q((function(e,t){e=Z(e);for(const n of e)r(n,t)})),setAll:Q((function(e,t){e=Z(e),t.ids=[],t.entities={},n(e,t)})),updateOne:Q((function(e,t){return i([e],t)})),updateMany:Q(i),upsertOne:Q((function(e,t){return a([e],t)})),upsertMany:Q(a),removeOne:Q((function(e,t){return o([e],t)})),removeMany:Q(o)}}function ne(e={}){const{selectId:t,sortComparer:n}=c({sortComparer:!1,selectId:e=>e.id},e),r={getInitialState:function(e={}){return Object.assign({ids:[],entities:{}},e)}},o={getSelectors:function(e){const t=e=>e.ids,n=e=>e.entities,r=w(t,n,((e,t)=>e.map((e=>t[e])))),o=(e,t)=>t,i=(e,t)=>e[t],a=w(t,(e=>e.length));if(!e)return{selectIds:t,selectEntities:n,selectAll:r,selectTotal:a,selectById:w(n,o,i)};const c=w(e,n);return{selectIds:w(e,t),selectEntities:c,selectAll:w(e,r),selectTotal:w(e,a),selectById:w(c,o,i)}}},i=n?function(e,t){const{removeOne:n,removeMany:r,removeAll:o}=te(e);function i(t,n){const r=(t=Z(t)).filter((t=>!(Y(t,e)in n.entities)));0!==r.length&&u(r,n)}function a(e,t){0!==(e=Z(e)).length&&u(e,t)}function c(t,n){let r=!1;for(let o of t){const t=n.entities[o.id];if(!t)continue;r=!0,Object.assign(t,o.changes);const i=e(t);o.id!==i&&(delete n.entities[o.id],n.entities[i]=t)}r&&l(n)}function s(t,n){const[r,o]=ee(t,e,n);c(o,n),i(r,n)}function u(t,n){t.forEach((t=>{n.entities[e(t)]=t})),l(n)}function l(n){const r=Object.values(n.entities);r.sort(t);const o=r.map(e),{ids:i}=n;(function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length&&n<t.length;n++)if(e[n]!==t[n])return!1;return!0})(i,o)||(n.ids=o)}return{removeOne:n,removeMany:r,removeAll:o,addOne:Q((function(e,t){return i([e],t)})),updateOne:Q((function(e,t){return c([e],t)})),upsertOne:Q((function(e,t){return s([e],t)})),setOne:Q((function(e,t){return a([e],t)})),setMany:Q(a),setAll:Q((function(e,t){e=Z(e),t.entities={},t.ids=[],i(e,t)})),addMany:Q(i),updateMany:Q(c),upsertMany:Q(s)}}(t,n):te(t);return c(c(c({selectId:t,sortComparer:n},r),o),i)}var re=(e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},oe=["name","message","stack","code"],ie=class{constructor(e,t){this.payload=e,this.meta=t}},ae=class{constructor(e,t){this.payload=e,this.meta=t}},ce=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of oe)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}},se=(()=>{function e(e,t,n){const r=B(e+"/fulfilled",((e,t,n,r)=>({payload:e,meta:s(c({},r||{}),{arg:n,requestId:t,requestStatus:"fulfilled"})}))),o=B(e+"/pending",((e,t,n)=>({payload:void 0,meta:s(c({},n||{}),{arg:t,requestId:e,requestStatus:"pending"})}))),i=B(e+"/rejected",((e,t,r,o,i)=>({payload:o,error:(n&&n.serializeError||ce)(e||"Rejected"),meta:s(c({},i||{}),{arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)})}))),a="undefined"!=typeof AbortController?AbortController:class{constructor(){this.signal={aborted:!1,addEventListener(){},dispatchEvent:()=>!1,onabort(){},removeEventListener(){},reason:void 0,throwIfAborted(){}}}abort(){}};return Object.assign((function(e){return(c,s,u)=>{const l=(null==n?void 0:n.idGenerator)?n.idGenerator(e):re(),f=new a;let d,p=!1;function m(e){d=e,f.abort()}const y=async function(){var a,y;let h;try{let i=null==(a=null==n?void 0:n.condition)?void 0:a.call(n,e,{getState:s,extra:u});if(null!==(g=i)&&"object"==typeof g&&"function"==typeof g.then&&(i=await i),!1===i||f.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};p=!0;const b=new Promise(((e,t)=>f.signal.addEventListener("abort",(()=>t({name:"AbortError",message:d||"Aborted"})))));c(o(l,e,null==(y=null==n?void 0:n.getPendingMeta)?void 0:y.call(n,{requestId:l,arg:e},{getState:s,extra:u}))),h=await Promise.race([b,Promise.resolve(t(e,{dispatch:c,getState:s,extra:u,requestId:l,signal:f.signal,abort:m,rejectWithValue:(e,t)=>new ie(e,t),fulfillWithValue:(e,t)=>new ae(e,t)})).then((t=>{if(t instanceof ie)throw t;return t instanceof ae?r(t.payload,l,e,t.meta):r(t,l,e)}))])}catch(t){h=t instanceof ie?i(null,l,e,t.payload,t.meta):i(t,l,e)}var g;return n&&!n.dispatchConditionRejection&&i.match(h)&&h.meta.condition||c(h),h}();return Object.assign(y,{abort:m,requestId:l,arg:e,unwrap:()=>y.then(ue)})}}),{pending:o,rejected:i,fulfilled:r,typePrefix:e})}return e.withTypes=()=>e,e})();function ue(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var le=(e,t)=>{return(n=e)&&"function"==typeof n.match?e.match(t):e(t);var n};function fe(...e){return t=>e.some((e=>le(e,t)))}function de(...e){return t=>e.every((e=>le(e,t)))}function pe(e,t){if(!e||!e.meta)return!1;const n="string"==typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function me(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function ye(...e){return 0===e.length?e=>pe(e,["pending"]):me(e)?t=>fe(...e.map((e=>e.pending)))(t):ye()(e[0])}function he(...e){return 0===e.length?e=>pe(e,["rejected"]):me(e)?t=>fe(...e.map((e=>e.rejected)))(t):he()(e[0])}function ge(...e){const t=e=>e&&e.meta&&e.meta.rejectedWithValue;return 0===e.length||me(e)?n=>de(he(...e),t)(n):ge()(e[0])}function be(...e){return 0===e.length?e=>pe(e,["fulfilled"]):me(e)?t=>fe(...e.map((e=>e.fulfilled)))(t):be()(e[0])}function we(...e){return 0===e.length?e=>pe(e,["pending","fulfilled","rejected"]):me(e)?t=>{const n=[];for(const t of e)n.push(t.pending,t.rejected,t.fulfilled);return fe(...n)(t)}:we()(e[0])}var ve=(e,t)=>{if("function"!=typeof e)throw new TypeError(`${t} is not a function`)},Oe=()=>{},je=(e,t=Oe)=>(e.catch(t),e),Ee=(e,t)=>{e.addEventListener("abort",t,{once:!0})},Se=(e,t)=>{const n=e.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},Ae=class{constructor(e){this.code=e,this.name="TaskAbortError",this.message=`task cancelled (reason: ${e})`}},Pe=e=>{if(e.aborted)throw new Ae(e.reason)},ke=e=>je(new Promise(((t,n)=>{const r=()=>n(new Ae(e.reason));e.aborted?r():Ee(e,r)}))),xe=e=>t=>je(Promise.race([ke(e),t]).then((t=>(Pe(e),t)))),Ie=e=>{const t=xe(e);return e=>t(new Promise((t=>setTimeout(t,e))))},{assign:_e}=Object,Ce={},Me="listenerMiddleware",Te=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:i}=e;if(t)o=B(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error("Creating or removing a listener requires one of the known fields for matching an action");return ve(i,"options.listener"),{predicate:o,type:t,effect:i}},qe=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout((()=>{throw e}),0)}},De=B(`${Me}/add`),Re=B(`${Me}/removeAll`),Le=B(`${Me}/remove`),$e=(...e)=>{console.error(`${Me}/error`,...e)},Be=e=>{e.pending.forEach((e=>{Se(e,"listener-cancelled")}))};function Ne(e={}){const t=new Map,{extra:n,onError:r=$e}=e;ve(r,"onError");const o=e=>{for(const n of Array.from(t.values()))if(e(n))return n},i=e=>{let n=o((t=>t.effect===e.effect));return n||(n=(e=>{const{type:t,predicate:n,effect:r}=Te(e);return{id:re(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error("Unsubscribe not initialized")}}})(e)),(e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),(null==t?void 0:t.cancelActive)&&Be(e)}))(n)},a=e=>{const{type:t,effect:n,predicate:r}=Te(e),i=o((e=>("string"==typeof t?e.type===t:e.predicate===r)&&e.effect===n));return i&&(i.unsubscribe(),e.cancelActive&&Be(i)),!!i},c=async(e,o,a,c)=>{const s=new AbortController,u=((e,t)=>(n,r)=>je((async(n,r)=>{Pe(t);let o=()=>{};const i=new Promise((t=>{o=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}})})),a=[ke(t),i];null!=r&&a.push(new Promise((e=>setTimeout(e,r,null))));try{const e=await Promise.race(a);return Pe(t),e}finally{o()}})(n,r)))(i,s.signal);try{e.pending.add(s),await Promise.resolve(e.effect(o,_e({},a,{getOriginalState:c,condition:(e,t)=>u(e,t).then(Boolean),take:u,delay:Ie(s.signal),pause:xe(s.signal),extra:n,signal:s.signal,fork:(l=s.signal,e=>{ve(e,"taskExecutor");const t=new AbortController;var n;n=t,Ee(l,(()=>Se(n,l.reason)));const r=(async(n,r)=>{try{return await Promise.resolve(),{status:"ok",value:await(async()=>{Pe(l),Pe(t.signal);const n=await e({pause:xe(t.signal),delay:Ie(t.signal),signal:t.signal});return Pe(t.signal),n})()}}catch(e){return{status:e instanceof Ae?"cancelled":"rejected",error:e}}finally{null==r||r()}})(0,(()=>Se(t,"task-completed")));return{result:xe(l)(r),cancel(){Se(t,"task-cancelled")}}}),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach(((e,t,n)=>{e!==s&&(Se(e,"listener-cancelled"),n.delete(e))}))}})))}catch(e){e instanceof Ae||qe(r,e,{raisedBy:"effect"})}finally{Se(s,"listener-completed"),e.pending.delete(s)}var l},s=(e=>()=>{e.forEach(Be),e.clear()})(t);return{middleware:e=>n=>o=>{if(De.match(o))return i(o.payload);if(Re.match(o))return void s();if(Le.match(o))return a(o.payload);let u=e.getState();const l=()=>{if(u===Ce)throw new Error(`${Me}: getOriginalState can only be called synchronously`);return u};let f;try{if(f=n(o),t.size>0){let n=e.getState();const i=Array.from(t.values());for(let t of i){let i=!1;try{i=t.predicate(o,n,u)}catch(e){i=!1,qe(r,e,{raisedBy:"predicate"})}i&&c(t,o,e,l)}}}finally{u=Ce}return f},startListening:i,stopListening:a,clearListeners:s}}var Ve,Xe="RTK_autoBatch",ze=()=>e=>({payload:e,meta:{RTK_autoBatch:!0}}),We="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis):e=>(Ve||(Ve=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0))),Ue=e=>t=>{setTimeout(t,e)},Fe="undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:Ue(10),Ke=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,i=!1,a=!1;const c=new Set,s="tick"===e.type?We:"raf"===e.type?Fe:"callback"===e.type?e.queueNotification:Ue(e.timeout),u=()=>{a=!1,i&&(i=!1,c.forEach((e=>e())))};return Object.assign({},r,{subscribe(e){const t=r.subscribe((()=>o&&e()));return c.add(e),()=>{t(),c.delete(e)}},dispatch(e){var t;try{return o=!(null==(t=null==e?void 0:e.meta)?void 0:t.RTK_autoBatch),i=!o,i&&(a||(a=!0,s(u))),r.dispatch(e)}finally{o=!0}}})};u();export{_ as MiddlewareArray,Xe as SHOULD_AUTOBATCH,Ae as TaskAbortError,De as addListener,Ke as autoBatchEnhancer,Re as clearAllListeners,$ as configureStore,B as createAction,se as createAsyncThunk,w as createDraftSafeSelector,ne as createEntityAdapter,T as createImmutableStateInvariantMiddleware,Ne as createListenerMiddleware,l as createNextState,F as createReducer,y as createSelector,R as createSerializableStateInvariantMiddleware,K as createSlice,f as current,D as findNonSerializableValue,d as freeze,L as getDefaultMiddleware,V as getType,de as isAllOf,fe as isAnyOf,we as isAsyncThunkAction,m as isDraft,be as isFulfilled,M as isImmutableDefault,ye as isPending,q as isPlain,P as isPlainObject,he as isRejected,ge as isRejectedWithValue,ce as miniSerializeError,re as nanoid,p as original,ze as prepareAutoBatched,Le as removeListener,ue as unwrapResult};
var e=Object.defineProperty,t=(t,n,r)=>(((t,n,r)=>{n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r})(t,"symbol"!=typeof n?n+"":n,r),r);export*from"redux";import{produce as n,current as r,freeze as o,original as i,isDraft as a}from"immer";import{createSelector as s}from"reselect";import{current as c,isDraft as u}from"immer";import{createSelector as l}from"reselect";var f=(...e)=>{const t=l(...e);return(e,...n)=>t(u(e)?c(e):e,...n)};import{createStore as d,compose as p,applyMiddleware as m,combineReducers as y}from"redux";import{compose as h}from"redux";var g="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?h:h.apply(null,arguments)};function b(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);if(null===t)return!0;let n=t;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n}"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window;import w from"redux-thunk";import v,{isDraftable as O}from"immer";var E=class extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,E.prototype)}static get[Symbol.species](){return E}concat(...e){return super.concat.apply(this,e)}prepend(...e){return 1===e.length&&Array.isArray(e[0])?new E(...e[0].concat(this)):new E(...e.concat(this))}};function j(e){return O(e)?v(e,(()=>{})):e}function S(e){return"object"!=typeof e||null==e||Object.isFrozen(e)}function A(e={}){return()=>e=>t=>e(t)}function _(e){const t=typeof e;return null==e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||b(e)}function k(e,t="",n=_,r,o=[]){let i;if(!n(e))return{keyPath:t||"<root>",value:e};if("object"!=typeof e||null===e)return!1;const a=null!=r?r(e):Object.entries(e),s=o.length>0;for(const[e,c]of a){const a=t?t+"."+e:e;if(!(s&&o.indexOf(a)>=0)){if(!n(c))return{keyPath:a,value:c};if("object"==typeof c&&(i=k(c,a,n,r,o),i))return i}}return!1}function P(e={}){return()=>e=>t=>e(t)}function x(e={}){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0}=e;let o=new E;return t&&o.push("boolean"==typeof t?w:w.withExtraArgument(t.extraArgument)),o}function I(e){const t=function(e){return x(e)},{reducer:n,middleware:r=t(),devTools:o=!0,preloadedState:i,enhancers:a}=e||{};let s;if("function"==typeof n)s=n;else{if(!b(n))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');s=y(n)}let c=r;"function"==typeof c&&(c=c(t));const u=m(...c);let l=p;o&&(l=g({trace:!1,..."object"==typeof o&&o}));let f=[u];Array.isArray(a)?f=[u,...a]:"function"==typeof a&&(f=a(f));const h=l(...f);return d(s,i,h)}function C(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error("prepareAction did not return an object");return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>t.type===e,n}function M(e){return["type","payload","error","meta"].indexOf(e)>-1}function T(e){return`${e}`}import q,{isDraft as D,isDraftable as R}from"immer";function L(e){const t={},n=[];let r;const o={addCase(e,n){const r="string"==typeof e?e:e.type;if(r in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[r]=n,o},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(r=e,o)};return e(o),[t,n,r]}function $(e,t){let n,[r,o,i]=L(t);if("function"==typeof e)n=()=>j(e());else{const t=j(e);n=()=>t}function a(e=n(),t){let a=[r[t.type],...o.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===a.filter((e=>!!e)).length&&(a=[i]),a.reduce(((e,n)=>{if(n){if(D(e)){const r=n(e,t);return void 0===r?e:r}if(R(e))return q(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e}),e)}return a.getInitialState=n,a}function B(e){const{name:t}=e;if(!t)throw new Error("`name` is a required option for createSlice");const n="function"==typeof e.initialState?e.initialState:j(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},a={},s={};function c(){const[t={},r=[],o]="function"==typeof e.extraReducers?L(e.extraReducers):[e.extraReducers],i={...t,...a};return $(n,(e=>{for(let t in i)e.addCase(t,i[t]);for(let t of r)e.addMatcher(t.matcher,t.reducer);o&&e.addDefaultCase(o)}))}let u;return o.forEach((e=>{const n=r[e],o=`${t}/${e}`;let c,u;"reducer"in n?(c=n.reducer,u=n.prepare):c=n,i[e]=c,a[o]=c,s[e]=u?C(o,u):C(o)})),{name:t,reducer:(e,t)=>(u||(u=c()),u(e,t)),actions:s,caseReducers:i,getInitialState:()=>(u||(u=c()),u.getInitialState())}}import N,{isDraft as V}from"immer";function X(e){const t=z(((t,n)=>e(n)));return function(e){return t(e,void 0)}}function z(e){return function(t,n){const r=t=>{var r;b(r=n)&&"string"==typeof r.type&&Object.keys(r).every(M)?e(n.payload,t):e(n,t)};return V(t)?(r(t),t):N(t,r)}}function W(e,t){return t(e)}function U(e){return Array.isArray(e)||(e=Object.values(e)),e}function F(e,t,n){e=U(e);const r=[],o=[];for(const i of e){const e=W(i,t);e in n.entities?o.push({id:e,changes:i}):r.push(i)}return[r,o]}function K(e){function t(t,n){const r=W(t,e);r in n.entities||(n.ids.push(r),n.entities[r]=t)}function n(e,n){e=U(e);for(const r of e)t(r,n)}function r(t,n){const r=W(t,e);r in n.entities||n.ids.push(r),n.entities[r]=t}function o(e,t){let n=!1;e.forEach((e=>{e in t.entities&&(delete t.entities[e],n=!0)})),n&&(t.ids=t.ids.filter((e=>e in t.entities)))}function i(t,n){const r={},o={};if(t.forEach((e=>{e.id in n.entities&&(o[e.id]={id:e.id,changes:{...o[e.id]?o[e.id].changes:null,...e.changes}})})),(t=Object.values(o)).length>0){const o=t.filter((t=>function(t,n,r){const o=Object.assign({},r.entities[n.id],n.changes),i=W(o,e),a=i!==n.id;return a&&(t[n.id]=i,delete r.entities[n.id]),r.entities[i]=o,a}(r,t,n))).length>0;o&&(n.ids=Object.keys(n.entities))}}function a(t,r){const[o,a]=F(t,e,r);i(a,r),n(o,r)}return{removeAll:X((function(e){Object.assign(e,{ids:[],entities:{}})})),addOne:z(t),addMany:z(n),setOne:z(r),setMany:z((function(e,t){e=U(e);for(const n of e)r(n,t)})),setAll:z((function(e,t){e=U(e),t.ids=[],t.entities={},n(e,t)})),updateOne:z((function(e,t){return i([e],t)})),updateMany:z(i),upsertOne:z((function(e,t){return a([e],t)})),upsertMany:z(a),removeOne:z((function(e,t){return o([e],t)})),removeMany:z(o)}}function G(e={}){const{selectId:t,sortComparer:n}={sortComparer:!1,selectId:e=>e.id,...e},r={getInitialState:function(e={}){return Object.assign({ids:[],entities:{}},e)}},o={getSelectors:function(e){const t=e=>e.ids,n=e=>e.entities,r=f(t,n,((e,t)=>e.map((e=>t[e])))),o=(e,t)=>t,i=(e,t)=>e[t],a=f(t,(e=>e.length));if(!e)return{selectIds:t,selectEntities:n,selectAll:r,selectTotal:a,selectById:f(n,o,i)};const s=f(e,n);return{selectIds:f(e,t),selectEntities:s,selectAll:f(e,r),selectTotal:f(e,a),selectById:f(s,o,i)}}},i=n?function(e,t){const{removeOne:n,removeMany:r,removeAll:o}=K(e);function i(t,n){const r=(t=U(t)).filter((t=>!(W(t,e)in n.entities)));0!==r.length&&u(r,n)}function a(e,t){0!==(e=U(e)).length&&u(e,t)}function s(t,n){let r=!1;for(let o of t){const t=n.entities[o.id];if(!t)continue;r=!0,Object.assign(t,o.changes);const i=e(t);o.id!==i&&(delete n.entities[o.id],n.entities[i]=t)}r&&l(n)}function c(t,n){const[r,o]=F(t,e,n);s(o,n),i(r,n)}function u(t,n){t.forEach((t=>{n.entities[e(t)]=t})),l(n)}function l(n){const r=Object.values(n.entities);r.sort(t);const o=r.map(e),{ids:i}=n;(function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length&&n<t.length;n++)if(e[n]!==t[n])return!1;return!0})(i,o)||(n.ids=o)}return{removeOne:n,removeMany:r,removeAll:o,addOne:z((function(e,t){return i([e],t)})),updateOne:z((function(e,t){return s([e],t)})),upsertOne:z((function(e,t){return c([e],t)})),setOne:z((function(e,t){return a([e],t)})),setMany:z(a),setAll:z((function(e,t){e=U(e),t.entities={},t.ids=[],i(e,t)})),addMany:z(i),updateMany:z(s),upsertMany:z(c)}}(t,n):K(t);return{selectId:t,sortComparer:n,...r,...o,...i}}var H=(e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},J=["name","message","stack","code"],Q=class{constructor(e,n){this.payload=e,this.meta=n,t(this,"_type")}},Y=class{constructor(e,n){this.payload=e,this.meta=n,t(this,"_type")}},Z=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of J)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}},ee=(()=>{function e(e,n,r){const o=C(e+"/fulfilled",((e,t,n,r)=>({payload:e,meta:{...r||{},arg:n,requestId:t,requestStatus:"fulfilled"}}))),i=C(e+"/pending",((e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}}))),a=C(e+"/rejected",((e,t,n,o,i)=>({payload:o,error:(r&&r.serializeError||Z)(e||"Rejected"),meta:{...i||{},arg:n,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)}}))),s="undefined"!=typeof AbortController?AbortController:class{constructor(){t(this,"signal",{aborted:!1,addEventListener(){},dispatchEvent:()=>!1,onabort(){},removeEventListener(){},reason:void 0,throwIfAborted(){}})}abort(){}};return Object.assign((function(e){return(t,c,u)=>{const l=(null==r?void 0:r.idGenerator)?r.idGenerator(e):H(),f=new s;let d,p=!1;function m(e){d=e,f.abort()}const y=async function(){var s,y;let h;try{let a=null==(s=null==r?void 0:r.condition)?void 0:s.call(r,e,{getState:c,extra:u});if(null!==(g=a)&&"object"==typeof g&&"function"==typeof g.then&&(a=await a),!1===a||f.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};p=!0;const b=new Promise(((e,t)=>f.signal.addEventListener("abort",(()=>t({name:"AbortError",message:d||"Aborted"})))));t(i(l,e,null==(y=null==r?void 0:r.getPendingMeta)?void 0:y.call(r,{requestId:l,arg:e},{getState:c,extra:u}))),h=await Promise.race([b,Promise.resolve(n(e,{dispatch:t,getState:c,extra:u,requestId:l,signal:f.signal,abort:m,rejectWithValue:(e,t)=>new Q(e,t),fulfillWithValue:(e,t)=>new Y(e,t)})).then((t=>{if(t instanceof Q)throw t;return t instanceof Y?o(t.payload,l,e,t.meta):o(t,l,e)}))])}catch(t){h=t instanceof Q?a(null,l,e,t.payload,t.meta):a(t,l,e)}var g;return r&&!r.dispatchConditionRejection&&a.match(h)&&h.meta.condition||t(h),h}();return Object.assign(y,{abort:m,requestId:l,arg:e,unwrap:()=>y.then(te)})}}),{pending:i,rejected:a,fulfilled:o,typePrefix:e})}return e.withTypes=()=>e,e})();function te(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var ne=(e,t)=>{return(n=e)&&"function"==typeof n.match?e.match(t):e(t);var n};function re(...e){return t=>e.some((e=>ne(e,t)))}function oe(...e){return t=>e.every((e=>ne(e,t)))}function ie(e,t){if(!e||!e.meta)return!1;const n="string"==typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function ae(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function se(...e){return 0===e.length?e=>ie(e,["pending"]):ae(e)?t=>re(...e.map((e=>e.pending)))(t):se()(e[0])}function ce(...e){return 0===e.length?e=>ie(e,["rejected"]):ae(e)?t=>re(...e.map((e=>e.rejected)))(t):ce()(e[0])}function ue(...e){const t=e=>e&&e.meta&&e.meta.rejectedWithValue;return 0===e.length||ae(e)?n=>oe(ce(...e),t)(n):ue()(e[0])}function le(...e){return 0===e.length?e=>ie(e,["fulfilled"]):ae(e)?t=>re(...e.map((e=>e.fulfilled)))(t):le()(e[0])}function fe(...e){return 0===e.length?e=>ie(e,["pending","fulfilled","rejected"]):ae(e)?t=>{const n=[];for(const t of e)n.push(t.pending,t.rejected,t.fulfilled);return re(...n)(t)}:fe()(e[0])}var de=(e,t)=>{if("function"!=typeof e)throw new TypeError(`${t} is not a function`)},pe=()=>{},me=(e,t=pe)=>(e.catch(t),e),ye=(e,t)=>{e.addEventListener("abort",t,{once:!0})},he=(e,t)=>{const n=e.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},ge=class{constructor(e){this.code=e,t(this,"name","TaskAbortError"),t(this,"message"),this.message=`task cancelled (reason: ${e})`}},be=e=>{if(e.aborted)throw new ge(e.reason)},we=e=>me(new Promise(((t,n)=>{const r=()=>n(new ge(e.reason));e.aborted?r():ye(e,r)}))),ve=e=>t=>me(Promise.race([we(e),t]).then((t=>(be(e),t)))),Oe=e=>{const t=ve(e);return e=>t(new Promise((t=>setTimeout(t,e))))},{assign:Ee}=Object,je={},Se="listenerMiddleware",Ae=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:i}=e;if(t)o=C(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error("Creating or removing a listener requires one of the known fields for matching an action");return de(i,"options.listener"),{predicate:o,type:t,effect:i}},_e=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout((()=>{throw e}),0)}},ke=C(`${Se}/add`),Pe=C(`${Se}/removeAll`),xe=C(`${Se}/remove`),Ie=(...e)=>{console.error(`${Se}/error`,...e)},Ce=e=>{e.pending.forEach((e=>{he(e,"listener-cancelled")}))};function Me(e={}){const t=new Map,{extra:n,onError:r=Ie}=e;de(r,"onError");const o=e=>{for(const n of Array.from(t.values()))if(e(n))return n},i=e=>{let n=o((t=>t.effect===e.effect));return n||(n=(e=>{const{type:t,predicate:n,effect:r}=Ae(e);return{id:H(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error("Unsubscribe not initialized")}}})(e)),(e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),(null==t?void 0:t.cancelActive)&&Ce(e)}))(n)},a=e=>{const{type:t,effect:n,predicate:r}=Ae(e),i=o((e=>("string"==typeof t?e.type===t:e.predicate===r)&&e.effect===n));return i&&(i.unsubscribe(),e.cancelActive&&Ce(i)),!!i},s=async(e,o,a,s)=>{const c=new AbortController,u=((e,t)=>(n,r)=>me((async(n,r)=>{be(t);let o=()=>{};const i=new Promise((t=>{o=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}})})),a=[we(t),i];null!=r&&a.push(new Promise((e=>setTimeout(e,r,null))));try{const e=await Promise.race(a);return be(t),e}finally{o()}})(n,r)))(i,c.signal);try{e.pending.add(c),await Promise.resolve(e.effect(o,Ee({},a,{getOriginalState:s,condition:(e,t)=>u(e,t).then(Boolean),take:u,delay:Oe(c.signal),pause:ve(c.signal),extra:n,signal:c.signal,fork:(l=c.signal,e=>{de(e,"taskExecutor");const t=new AbortController;var n;n=t,ye(l,(()=>he(n,l.reason)));const r=(async(n,r)=>{try{return await Promise.resolve(),{status:"ok",value:await(async()=>{be(l),be(t.signal);const n=await e({pause:ve(t.signal),delay:Oe(t.signal),signal:t.signal});return be(t.signal),n})()}}catch(e){return{status:e instanceof ge?"cancelled":"rejected",error:e}}finally{null==r||r()}})(0,(()=>he(t,"task-completed")));return{result:ve(l)(r),cancel(){he(t,"task-cancelled")}}}),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach(((e,t,n)=>{e!==c&&(he(e,"listener-cancelled"),n.delete(e))}))}})))}catch(e){e instanceof ge||_e(r,e,{raisedBy:"effect"})}finally{he(c,"listener-completed"),e.pending.delete(c)}var l},c=(e=>()=>{e.forEach(Ce),e.clear()})(t);return{middleware:e=>n=>o=>{if(ke.match(o))return i(o.payload);if(Pe.match(o))return void c();if(xe.match(o))return a(o.payload);let u=e.getState();const l=()=>{if(u===je)throw new Error(`${Se}: getOriginalState can only be called synchronously`);return u};let f;try{if(f=n(o),t.size>0){let n=e.getState();const i=Array.from(t.values());for(let t of i){let i=!1;try{i=t.predicate(o,n,u)}catch(e){i=!1,_e(r,e,{raisedBy:"predicate"})}i&&s(t,o,e,l)}}}finally{u=je}return f},startListening:i,stopListening:a,clearListeners:c}}var Te,qe="RTK_autoBatch",De=()=>e=>({payload:e,meta:{RTK_autoBatch:!0}}),Re="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis):e=>(Te||(Te=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0))),Le=e=>t=>{setTimeout(t,e)},$e="undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:Le(10),Be=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,i=!1,a=!1;const s=new Set,c="tick"===e.type?Re:"raf"===e.type?$e:"callback"===e.type?e.queueNotification:Le(e.timeout),u=()=>{a=!1,i&&(i=!1,s.forEach((e=>e())))};return Object.assign({},r,{subscribe(e){const t=r.subscribe((()=>o&&e()));return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){var t;try{return o=!(null==(t=null==e?void 0:e.meta)?void 0:t.RTK_autoBatch),i=!o,i&&(a||(a=!0,c(u))),r.dispatch(e)}finally{o=!0}}})};export{E as MiddlewareArray,qe as SHOULD_AUTOBATCH,ge as TaskAbortError,ke as addListener,Be as autoBatchEnhancer,Pe as clearAllListeners,I as configureStore,C as createAction,ee as createAsyncThunk,f as createDraftSafeSelector,G as createEntityAdapter,A as createImmutableStateInvariantMiddleware,Me as createListenerMiddleware,n as createNextState,$ as createReducer,s as createSelector,P as createSerializableStateInvariantMiddleware,B as createSlice,r as current,k as findNonSerializableValue,o as freeze,x as getDefaultMiddleware,T as getType,oe as isAllOf,re as isAnyOf,fe as isAsyncThunkAction,a as isDraft,le as isFulfilled,S as isImmutableDefault,se as isPending,_ as isPlain,b as isPlainObject,ce as isRejected,ue as isRejectedWithValue,Z as miniSerializeError,H as nanoid,i as original,De as prepareAutoBatched,xe as removeListener,te as unwrapResult};
//# sourceMappingURL=redux-toolkit.modern.production.min.js.map

@@ -7,51 +7,51 @@ (function (global, factory) {

var t,e,n,r=undefined&&undefined.__extends||(t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e;}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);},t(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e;}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r);}),o=undefined&&undefined.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u);}catch(t){i=[6,t],r=0;}finally{n=o=0;}if(5&i[0])throw i[1];return {value:i[0]?i[1]:void 0,done:!0}}([i,c])}}},i=undefined&&undefined.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},u=Object.defineProperty,c=Object.defineProperties,a=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,d=function(t,e,n){return e in t?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},p=function(t,e){for(var n in e||(e={}))l.call(e,n)&&d(t,n,e[n]);if(f)for(var r=0,o=f(e);r<o.length;r++)s.call(e,n=o[r])&&d(t,n,e[n]);return t},v=function(t,e){return c(t,a(e))},y=function(t,e,n){return new Promise((function(r,o){var i=function(t){try{c(n.next(t));}catch(t){o(t);}},u=function(t){try{c(n.throw(t));}catch(t){o(t);}},c=function(t){return t.done?r(t.value):Promise.resolve(t.value).then(i,u)};c((n=n.apply(t,e)).next());}))};function h(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+t+(n.length?" "+n.map((function(t){return "'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function g(t){return !!t&&!!t[nt]}function b(t){var e;return !!t&&(function(t){if(!t||"object"!=typeof t)return !1;var e=Object.getPrototypeOf(t);if(null===e)return !0;var n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===rt}(t)||Array.isArray(t)||!!t[et]||!!(null===(e=t.constructor)||void 0===e?void 0:e[et])||A(t)||S(t))}function m(t){return g(t)||h(23,t),t[nt].t}function w(t,e,n){void 0===n&&(n=!1),0===O(t)?(n?Object.keys:ot)(t).forEach((function(r){n&&"symbol"==typeof r||e(r,t[r],t);})):t.forEach((function(n,r){return e(r,n,t)}));}function O(t){var e=t[nt];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:A(t)?2:S(t)?3:0}function j(t,e){return 2===O(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function P(t,e,n){var r=O(t);2===r?t.set(e,n):3===r?(t.delete(e),t.add(n)):t[e]=n;}function E(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function A(t){return Q&&t instanceof Map}function S(t){return Y&&t instanceof Set}function _(t){return t.o||t.t}function k(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=it(t);delete e[nt];for(var n=ot(e),r=0;r<n.length;r++){var o=n[r],i=e[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[o]});}return Object.create(Object.getPrototypeOf(t),e)}function x(t,e){return void 0===e&&(e=!1),D(t)||g(t)||!b(t)||(O(t)>1&&(t.set=t.add=t.clear=t.delete=I),Object.freeze(t),e&&w(t,(function(t,e){return x(e,!0)}),!0)),t}function I(){h(2);}function D(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function T(t){var e=ut[t];return e||h(18,t),e}function N(){return n}function C(t,e){e&&(T("Patches"),t.u=[],t.s=[],t.v=e);}function M(t){R(t),t.p.forEach(F),t.p=null;}function R(t){t===n&&(n=t.l);}function q(t){return n={p:[],l:n,h:t,m:!0,_:0}}function F(t){var e=t[nt];0===e.i||1===e.i?e.j():e.O=!0;}function z(t,e){e._=e.p.length;var n=e.p[0],r=void 0!==t&&t!==n;return e.h.g||T("ES5").S(e,t,r),r?(n[nt].P&&(M(e),h(4)),b(t)&&(t=U(e,t),e.l||K(e,t)),e.u&&T("Patches").M(n[nt].t,t,e.u,e.s)):t=U(e,n,[]),M(e),e.u&&e.v(e.u,e.s),t!==tt?t:void 0}function U(t,e,n){if(D(e))return e;var r=e[nt];if(!r)return w(e,(function(o,i){return L(t,r,e,o,i,n)}),!0),e;if(r.A!==t)return e;if(!r.P)return K(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=k(r.k):r.o;w(3===r.i?new Set(o):o,(function(e,i){return L(t,r,o,e,i,n)})),K(t,o,!1),n&&t.u&&T("Patches").R(r,n,t.u,t.s);}return r.o}function L(t,e,n,r,o,i){if(g(o)){var u=U(t,o,i&&e&&3!==e.i&&!j(e.D,r)?i.concat(r):void 0);if(P(n,r,u),!g(u))return;t.m=!1;}if(b(o)&&!D(o)){if(!t.h.F&&t._<1)return;U(t,o),e&&e.A.l||K(t,o);}}function K(t,e,n){void 0===n&&(n=!1),t.h.F&&t.m&&x(e,n);}function W(t,e){var n=t[nt];return (n?_(n):t)[e]}function B(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n);}}function V(t){t.P||(t.P=!0,t.l&&V(t.l));}function X(t){t.o||(t.o=k(t.t));}function G(t,e,n){var r=A(e)?T("MapSet").N(e,n):S(e)?T("MapSet").T(e,n):t.g?function(t,e){var n=Array.isArray(t),r={i:n?1:0,A:e?e.A:N(),P:!1,I:!1,D:{},l:e,t:t,k:null,o:null,j:null,C:!1},o=r,i=ct;n&&(o=[r],i=at);var u=Proxy.revocable(o,i),c=u.revoke,a=u.proxy;return r.k=a,r.j=c,a}(e,n):T("ES5").J(e,n);return (n?n.A:N()).p.push(r),r}function J(t){return g(t)||h(22,t),function t(e){if(!b(e))return e;var n,r=e[nt],o=O(e);if(r){if(!r.P&&(r.i<4||!T("ES5").K(r)))return r.t;r.I=!0,n=$(e,o),r.I=!1;}else n=$(e,o);return w(n,(function(e,o){r&&function(t,e){return 2===O(t)?t.get(e):t[e]}(r.t,e)===o||P(n,e,t(o));})),3===o?new Set(n):n}(t)}function $(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return k(t)}var H="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Q="undefined"!=typeof Map,Y="undefined"!=typeof Set,Z="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,tt=H?Symbol.for("immer-nothing"):((e={})["immer-nothing"]=!0,e),et=H?Symbol.for("immer-draftable"):"__$immer_draftable",nt=H?Symbol.for("immer-state"):"__$immer_state",rt=(""+Object.prototype.constructor),ot="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,it=Object.getOwnPropertyDescriptors||function(t){var e={};return ot(t).forEach((function(n){e[n]=Object.getOwnPropertyDescriptor(t,n);})),e},ut={},ct={get:function(t,e){if(e===nt)return t;var n,r,o,i=_(t);if(!j(i,e))return n=t,(o=B(i,e))?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(n.k):void 0;var u=i[e];return t.I||!b(u)?u:u===W(t.t,e)?(X(t),t.o[e]=G(t.A.h,u,t)):u},has:function(t,e){return e in _(t)},ownKeys:function(t){return Reflect.ownKeys(_(t))},set:function(t,e,n){var r=B(_(t),e);if(null==r?void 0:r.set)return r.set.call(t.k,n),!0;if(!t.P){var o=W(_(t),e),i=null==o?void 0:o[nt];if(i&&i.t===n)return t.o[e]=n,t.D[e]=!1,!0;if(E(n,o)&&(void 0!==n||j(t.t,e)))return !0;X(t),V(t);}return t.o[e]===n&&"number"!=typeof n&&(void 0!==n||e in t.o)||(t.o[e]=n,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==W(t.t,e)||e in t.t?(t.D[e]=!1,X(t),V(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=_(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:r.enumerable,value:n[e]}:r},defineProperty:function(){h(11);},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){h(12);}},at={};w(ct,(function(t,e){at[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)};})),at.deleteProperty=function(t,e){return at.set.call(this,t,e,void 0)},at.set=function(t,e,n){return ct.set.call(this,t[0],e,n,t[0])};var ft=new(function(){function t(t){var e=this;this.g=Z,this.F=!0,this.produce=function(t,n,r){if("function"==typeof t&&"function"!=typeof n){var o=n;n=t;var i=e;return function(t){var e=this;void 0===t&&(t=o);for(var r=arguments.length,u=Array(r>1?r-1:0),c=1;c<r;c++)u[c-1]=arguments[c];return i.produce(t,(function(t){var r;return (r=n).call.apply(r,[e,t].concat(u))}))}}var u;if("function"!=typeof n&&h(6),void 0!==r&&"function"!=typeof r&&h(7),b(t)){var c=q(e),a=G(e,t,void 0),f=!0;try{u=n(a),f=!1;}finally{f?M(c):R(c);}return "undefined"!=typeof Promise&&u instanceof Promise?u.then((function(t){return C(c,r),z(t,c)}),(function(t){throw M(c),t})):(C(c,r),z(u,c))}if(!t||"object"!=typeof t){if(void 0===(u=n(t))&&(u=t),u===tt&&(u=void 0),e.F&&x(u,!0),r){var l=[],s=[];T("Patches").M(t,u,l,s),r(l,s);}return u}h(21,t);},this.produceWithPatches=function(t,n){if("function"==typeof t)return function(n){for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return e.produceWithPatches(n,(function(e){return t.apply(void 0,[e].concat(o))}))};var r,o,i=e.produce(t,n,(function(t,e){r=t,o=e;}));return "undefined"!=typeof Promise&&i instanceof Promise?i.then((function(t){return [t,r,o]})):[i,r,o]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze);}var e=t.prototype;return e.createDraft=function(t){b(t)||h(8),g(t)&&(t=J(t));var e=q(this),n=G(this,t,void 0);return n[nt].C=!0,R(e),n},e.finishDraft=function(t,e){var n=(t&&t[nt]).A;return C(n,e),z(void 0,n)},e.setAutoFreeze=function(t){this.F=t;},e.setUseProxies=function(t){t&&!Z&&h(20),this.g=t;},e.applyPatches=function(t,e){var n;for(n=e.length-1;n>=0;n--){var r=e[n];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}n>-1&&(e=e.slice(n+1));var o=T("Patches").$;return g(t)?o(t,e):this.produce(t,(function(t){return o(t,e)}))},t}()),lt=ft.produce,st=(ft.produceWithPatches.bind(ft),ft.setAutoFreeze.bind(ft),ft.setUseProxies.bind(ft),ft.applyPatches.bind(ft),ft.createDraft.bind(ft),ft.finishDraft.bind(ft),lt);function dt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r);}return n}function vt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?pt(Object(n),!0).forEach((function(e){dt(t,e,n[e]);})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e));}));}return t}function yt(t){return "Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var ht="function"==typeof Symbol&&Symbol.observable||"@@observable",gt=function(){return Math.random().toString(36).substring(7).split("").join(".")},bt={INIT:"@@redux/INIT"+gt(),REPLACE:"@@redux/REPLACE"+gt(),PROBE_UNKNOWN_ACTION:function(){return "@@redux/PROBE_UNKNOWN_ACTION"+gt()}};function mt(t){if("object"!=typeof t||null===t)return !1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function wt(t,e,n){var r;if("function"==typeof e&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(yt(0));if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error(yt(1));return n(wt)(t,e)}if("function"!=typeof t)throw new Error(yt(2));var o=t,i=e,u=[],c=u,a=!1;function f(){c===u&&(c=u.slice());}function l(){if(a)throw new Error(yt(3));return i}function s(t){if("function"!=typeof t)throw new Error(yt(4));if(a)throw new Error(yt(5));var e=!0;return f(),c.push(t),function(){if(e){if(a)throw new Error(yt(6));e=!1,f();var n=c.indexOf(t);c.splice(n,1),u=null;}}}function d(t){if(!mt(t))throw new Error(yt(7));if(void 0===t.type)throw new Error(yt(8));if(a)throw new Error(yt(9));try{a=!0,i=o(i,t);}finally{a=!1;}for(var e=u=c,n=0;n<e.length;n++)(0, e[n])();return t}function p(t){if("function"!=typeof t)throw new Error(yt(10));o=t,d({type:bt.REPLACE});}function v(){var t,e=s;return (t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(yt(11));function n(){t.next&&t.next(l());}return n(),{unsubscribe:e(n)}}})[ht]=function(){return this},t}return d({type:bt.INIT}),(r={dispatch:d,subscribe:s,getState:l,replaceReducer:p})[ht]=v,r}var Ot=wt;function jt(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++){var o=e[r];"function"==typeof t[o]&&(n[o]=t[o]);}var i,u=Object.keys(n);try{!function(t){Object.keys(t).forEach((function(e){var n=t[e];if(void 0===n(void 0,{type:bt.INIT}))throw new Error(yt(12));if(void 0===n(void 0,{type:bt.PROBE_UNKNOWN_ACTION()}))throw new Error(yt(13))}));}(n);}catch(t){i=t;}return function(t,e){if(void 0===t&&(t={}),i)throw i;for(var r=!1,o={},c=0;c<u.length;c++){var a=u[c],f=t[a],l=(0, n[a])(f,e);if(void 0===l)throw new Error(yt(14));o[a]=l,r=r||l!==f;}return (r=r||u.length!==Object.keys(t).length)?o:t}}function Pt(t,e){return function(){return e(t.apply(this,arguments))}}function Et(t,e){if("function"==typeof t)return Pt(t,e);if("object"!=typeof t||null===t)throw new Error(yt(16));var n={};for(var r in t){var o=t[r];"function"==typeof o&&(n[r]=Pt(o,e));}return n}function At(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function St(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(){var n=t.apply(void 0,arguments),r=function(){throw new Error(yt(15))},o={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},i=e.map((function(t){return t(o)}));return r=At.apply(void 0,i)(n.dispatch),vt(vt({},n),{},{dispatch:r})}}}var _t=function(t,e){return t===e};function kt(t,e){var n,r,o,i="object"==typeof e?e:{equalityCheck:e},u=i.equalityCheck,c=i.maxSize,a=void 0===c?1:c,f=i.resultEqualityCheck,l=(o=void 0===u?_t:u,function(t,e){if(null===t||null===e||t.length!==e.length)return !1;for(var n=t.length,r=0;r<n;r++)if(!o(t[r],e[r]))return !1;return !0}),s=1===a?(n=l,{get:function(t){return r&&n(r.key,t)?r.value:"NOT_FOUND"},put:function(t,e){r={key:t,value:e};},getEntries:function(){return r?[r]:[]},clear:function(){r=void 0;}}):function(t,e){var n=[];function r(t){var r=n.findIndex((function(n){return e(t,n.key)}));if(r>-1){var o=n[r];return r>0&&(n.splice(r,1),n.unshift(o)),o.value}return "NOT_FOUND"}return {get:r,put:function(e,o){"NOT_FOUND"===r(e)&&(n.unshift({key:e,value:o}),n.length>t&&n.pop());},getEntries:function(){return n},clear:function(){n=[];}}}(a,l);function d(){var e=s.get(arguments);if("NOT_FOUND"===e){if(e=t.apply(null,arguments),f){var n=s.getEntries(),r=n.find((function(t){return f(t.value,e)}));r&&(e=r.value);}s.put(arguments,e);}return e}return d.clearCache=function(){return s.clear()},d}function xt(t){var e=Array.isArray(t[0])?t[0]:t;if(!e.every((function(t){return "function"==typeof t}))){var n=e.map((function(t){return "function"==typeof t?"function "+(t.name||"unnamed")+"()":typeof t})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return e}function It(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var o=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var i,u=0,c={memoizeOptions:void 0},a=r.pop();if("object"==typeof a&&(c=a,a=r.pop()),"function"!=typeof a)throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof a+"]");var f=c,l=f.memoizeOptions,s=void 0===l?n:l,d=Array.isArray(s)?s:[s],p=xt(r),v=t.apply(void 0,[function(){return u++,a.apply(null,arguments)}].concat(d)),y=t((function(){for(var t=[],e=p.length,n=0;n<e;n++)t.push(p[n].apply(null,arguments));return i=v.apply(null,t)}));return Object.assign(y,{resultFunc:a,memoizedResultFunc:v,dependencies:p,lastResult:function(){return i},recomputations:function(){return u},resetRecomputations:function(){return u=0}}),y};return o}var Dt=It(kt),Tt=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Dt.apply(void 0,t),r=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return n.apply(void 0,i([g(t)?J(t):t],e))};return r},Nt="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return "object"==typeof arguments[0]?At:At.apply(null,arguments)};function Ct(t){if("object"!=typeof t||null===t)return !1;var e=Object.getPrototypeOf(t);if(null===e)return !0;for(var n=e;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return e===n}function Mt(t){return function(e){var n=e.dispatch,r=e.getState;return function(e){return function(o){return "function"==typeof o?o(n,r,t):e(o)}}}}var Rt=Mt();Rt.withExtraArgument=Mt;var qt=Rt,Ft=function(t){function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=t.apply(this,n)||this;return Object.setPrototypeOf(o,e.prototype),o}return r(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,i([void 0],t[0].concat(this)))):new(e.bind.apply(e,i([void 0],t.concat(this))))},e}(Array);function zt(t){return b(t)?st(t,(function(){})):t}function Ut(t){var e=typeof t;return null==t||"string"===e||"boolean"===e||"number"===e||Array.isArray(t)||Ct(t)}function Lt(t,e,n,r,o){var i;if(void 0===e&&(e=""),void 0===n&&(n=Ut),void 0===o&&(o=[]),!n(t))return {keyPath:e||"<root>",value:t};if("object"!=typeof t||null===t)return !1;for(var u=null!=r?r(t):Object.entries(t),c=o.length>0,a=0,f=u;a<f.length;a++){var l=f[a],s=l[0],d=l[1],p=e?e+"."+s:s;if(!(c&&o.indexOf(p)>=0)){if(!n(d))return {keyPath:p,value:d};if("object"==typeof d&&(i=Lt(d,p,n,r,o)))return i}}return !1}function Kt(t){return function(){return function(t){return function(e){return t(e)}}}}function Wt(t){void 0===t&&(t={});var e=t.thunk,n=void 0===e||e,r=new Ft;return n&&r.push("boolean"==typeof n?qt:qt.withExtraArgument(n.extraArgument)),r}function Bt(t){var e,n=function(t){return Wt(t)},r=t||{},o=r.reducer,u=void 0===o?void 0:o,c=r.middleware,a=void 0===c?n():c,f=r.devTools,l=void 0===f||f,s=r.preloadedState,d=void 0===s?void 0:s,v=r.enhancers,y=void 0===v?void 0:v;if("function"==typeof u)e=u;else {if(!Ct(u))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=jt(u);}var h=a;"function"==typeof h&&(h=h(n));var g=St.apply(void 0,h),b=At;l&&(b=Nt(p({trace:!1},"object"==typeof l&&l)));var m=[g];return Array.isArray(y)?m=i([g],y):"function"==typeof y&&(m=y(m)),wt(e,d,b.apply(void 0,m))}function Vt(t,e){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(e){var o=e.apply(void 0,n);if(!o)throw new Error("prepareAction did not return an object");return p(p({type:t,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return {type:t,payload:n[0]}}return n.toString=function(){return ""+t},n.type=t,n.match=function(e){return e.type===t},n}function Xt(t){return ["type","payload","error","meta"].indexOf(t)>-1}function Gt(t){return ""+t}function Jt(t){var e,n={},r=[],o={addCase:function(t,e){var r="string"==typeof t?t:t.type;if(r in n)throw new Error("addCase cannot be called with two reducers for the same action type");return n[r]=e,o},addMatcher:function(t,e){return r.push({matcher:t,reducer:e}),o},addDefaultCase:function(t){return e=t,o}};return t(o),[n,r,e]}function $t(t,e,n,r){void 0===n&&(n=[]);var o,u="function"==typeof e?Jt(e):[e,n,r],c=u[0],a=u[1],f=u[2];if("function"==typeof t)o=function(){return zt(t())};else {var l=zt(t);o=function(){return l};}function s(t,e){void 0===t&&(t=o());var n=i([c[e.type]],a.filter((function(t){return (0, t.matcher)(e)})).map((function(t){return t.reducer})));return 0===n.filter((function(t){return !!t})).length&&(n=[f]),n.reduce((function(t,n){if(n){var r;if(g(t))return void 0===(r=n(t,e))?t:r;if(b(t))return st(t,(function(t){return n(t,e)}));if(void 0===(r=n(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return t}),t)}return s.getInitialState=o,s}function Ht(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var n,r="function"==typeof t.initialState?t.initialState:zt(t.initialState),o=t.reducers||{},i=Object.keys(o),u={},c={},a={};function f(){var e="function"==typeof t.extraReducers?Jt(t.extraReducers):[t.extraReducers],n=e[0],o=e[1],i=void 0===o?[]:o,u=e[2],a=void 0===u?void 0:u,f=p(p({},void 0===n?{}:n),c);return $t(r,(function(t){for(var e in f)t.addCase(e,f[e]);for(var n=0,r=i;n<r.length;n++){var o=r[n];t.addMatcher(o.matcher,o.reducer);}a&&t.addDefaultCase(a);}))}return i.forEach((function(t){var n,r,i=o[t],f=e+"/"+t;"reducer"in i?(n=i.reducer,r=i.prepare):n=i,u[t]=n,c[f]=n,a[t]=r?Vt(f,r):Vt(f);})),{name:e,reducer:function(t,e){return n||(n=f()),n(t,e)},actions:a,caseReducers:u,getInitialState:function(){return n||(n=f()),n.getInitialState()}}}function Qt(t){return "object"!=typeof t||null==t||Object.isFrozen(t)}function Yt(t){return function(){return function(t){return function(e){return t(e)}}}}function Zt(t){return function(e,n){var r=function(e){var r;Ct(r=n)&&"string"==typeof r.type&&Object.keys(r).every(Xt)?t(n.payload,e):t(n,e);};return g(e)?(r(e),e):st(e,r)}}function te(t,e){return e(t)}function ee(t){return Array.isArray(t)||(t=Object.values(t)),t}function ne(t,e,n){for(var r=[],o=[],i=0,u=t=ee(t);i<u.length;i++){var c=u[i],a=te(c,e);a in n.entities?o.push({id:a,changes:c}):r.push(c);}return [r,o]}function re(t){function e(e,n){var r=te(e,t);r in n.entities||(n.ids.push(r),n.entities[r]=e);}function n(t,n){for(var r=0,o=t=ee(t);r<o.length;r++)e(o[r],n);}function r(e,n){var r=te(e,t);r in n.entities||n.ids.push(r),n.entities[r]=e;}function o(t,e){var n=!1;t.forEach((function(t){t in e.entities&&(delete e.entities[t],n=!0);})),n&&(e.ids=e.ids.filter((function(t){return t in e.entities})));}function i(e,n){var r={},o={};if(e.forEach((function(t){t.id in n.entities&&(o[t.id]={id:t.id,changes:p(p({},o[t.id]?o[t.id].changes:null),t.changes)});})),(e=Object.values(o)).length>0){var i=e.filter((function(e){return function(e,n,r){var o=Object.assign({},r.entities[n.id],n.changes),i=te(o,t),u=i!==n.id;return u&&(e[n.id]=i,delete r.entities[n.id]),r.entities[i]=o,u}(r,e,n)})).length>0;i&&(n.ids=Object.keys(n.entities));}}function u(e,r){var o=ne(e,t,r),u=o[0];i(o[1],r),n(u,r);}return {removeAll:(c=function(t){Object.assign(t,{ids:[],entities:{}});},a=Zt((function(t,e){return c(e)})),function(t){return a(t,void 0)}),addOne:Zt(e),addMany:Zt(n),setOne:Zt(r),setMany:Zt((function(t,e){for(var n=0,o=t=ee(t);n<o.length;n++)r(o[n],e);})),setAll:Zt((function(t,e){t=ee(t),e.ids=[],e.entities={},n(t,e);})),updateOne:Zt((function(t,e){return i([t],e)})),updateMany:Zt(i),upsertOne:Zt((function(t,e){return u([t],e)})),upsertMany:Zt(u),removeOne:Zt((function(t,e){return o([t],e)})),removeMany:Zt(o)};var c,a;}function oe(t){void 0===t&&(t={});var e=p({sortComparer:!1,selectId:function(t){return t.id}},t),n=e.selectId,r=e.sortComparer,o={getInitialState:function(t){return void 0===t&&(t={}),Object.assign({ids:[],entities:{}},t)}},i={getSelectors:function(t){var e=function(t){return t.ids},n=function(t){return t.entities},r=Tt(e,n,(function(t,e){return t.map((function(t){return e[t]}))})),o=function(t,e){return e},i=function(t,e){return t[e]},u=Tt(e,(function(t){return t.length}));if(!t)return {selectIds:e,selectEntities:n,selectAll:r,selectTotal:u,selectById:Tt(n,o,i)};var c=Tt(t,n);return {selectIds:Tt(t,e),selectEntities:c,selectAll:Tt(t,r),selectTotal:Tt(t,u),selectById:Tt(c,o,i)}}},u=r?function(t,e){var n=re(t);function r(e,n){var r=(e=ee(e)).filter((function(e){return !(te(e,t)in n.entities)}));0!==r.length&&c(r,n);}function o(t,e){0!==(t=ee(t)).length&&c(t,e);}function i(e,n){for(var r=!1,o=0,i=e;o<i.length;o++){var u=i[o],c=n.entities[u.id];if(c){r=!0,Object.assign(c,u.changes);var f=t(c);u.id!==f&&(delete n.entities[u.id],n.entities[f]=c);}}r&&a(n);}function u(e,n){var o=ne(e,t,n),u=o[0];i(o[1],n),r(u,n);}function c(e,n){e.forEach((function(e){n.entities[t(e)]=e;})),a(n);}function a(n){var r=Object.values(n.entities);r.sort(e);var o=r.map(t);(function(t,e){if(t.length!==e.length)return !1;for(var n=0;n<t.length&&n<e.length;n++)if(t[n]!==e[n])return !1;return !0})(n.ids,o)||(n.ids=o);}return {removeOne:n.removeOne,removeMany:n.removeMany,removeAll:n.removeAll,addOne:Zt((function(t,e){return r([t],e)})),updateOne:Zt((function(t,e){return i([t],e)})),upsertOne:Zt((function(t,e){return u([t],e)})),setOne:Zt((function(t,e){return o([t],e)})),setMany:Zt(o),setAll:Zt((function(t,e){t=ee(t),e.entities={},e.ids=[],r(t,e);})),addMany:Zt(r),updateMany:Zt(i),upsertMany:Zt(u)}}(n,r):re(n);return p(p(p({selectId:n,sortComparer:r},o),i),u)}var ie=function(t){void 0===t&&(t=21);for(var e="",n=t;n--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e},ue=["name","message","stack","code"],ce=function(t,e){this.payload=t,this.meta=e;},ae=function(t,e){this.payload=t,this.meta=e;},fe=function(t){if("object"==typeof t&&null!==t){for(var e={},n=0,r=ue;n<r.length;n++){var o=r[n];"string"==typeof t[o]&&(e[o]=t[o]);}return e}return {message:String(t)}},le=function(){function t(t,e,n){var r=Vt(t+"/fulfilled",(function(t,e,n,r){return {payload:t,meta:v(p({},r||{}),{arg:n,requestId:e,requestStatus:"fulfilled"})}})),i=Vt(t+"/pending",(function(t,e,n){return {payload:void 0,meta:v(p({},n||{}),{arg:e,requestId:t,requestStatus:"pending"})}})),u=Vt(t+"/rejected",(function(t,e,r,o,i){return {payload:o,error:(n&&n.serializeError||fe)(t||"Rejected"),meta:v(p({},i||{}),{arg:r,requestId:e,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),c="undefined"!=typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return !1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}};}return t.prototype.abort=function(){},t}();return Object.assign((function(t){return function(a,f,l){var s,d=(null==n?void 0:n.idGenerator)?n.idGenerator(t):ie(),p=new c;function v(t){s=t,p.abort();}var h=function(){return y(this,null,(function(){var c,y,h,g,b,m;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,4,,5]),null===(w=g=null==(c=null==n?void 0:n.condition)?void 0:c.call(n,t,{getState:f,extra:l}))||"object"!=typeof w||"function"!=typeof w.then?[3,2]:[4,g];case 1:g=o.sent(),o.label=2;case 2:if(!1===g||p.signal.aborted)throw {name:"ConditionError",message:"Aborted due to condition callback returning false."};return b=new Promise((function(t,e){return p.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:s||"Aborted"})}))})),a(i(d,t,null==(y=null==n?void 0:n.getPendingMeta)?void 0:y.call(n,{requestId:d,arg:t},{getState:f,extra:l}))),[4,Promise.race([b,Promise.resolve(e(t,{dispatch:a,getState:f,extra:l,requestId:d,signal:p.signal,abort:v,rejectWithValue:function(t,e){return new ce(t,e)},fulfillWithValue:function(t,e){return new ae(t,e)}})).then((function(e){if(e instanceof ce)throw e;return e instanceof ae?r(e.payload,d,t,e.meta):r(e,d,t)}))])];case 3:return h=o.sent(),[3,5];case 4:return m=o.sent(),h=m instanceof ce?u(null,d,t,m.payload,m.meta):u(m,d,t),[3,5];case 5:return n&&!n.dispatchConditionRejection&&u.match(h)&&h.meta.condition||a(h),[2,h]}var w;}))}))}();return Object.assign(h,{abort:v,requestId:d,arg:t,unwrap:function(){return h.then(se)}})}}),{pending:i,rejected:u,fulfilled:r,typePrefix:t})}return t.withTypes=function(){return t},t}();function se(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}var de=function(t,e){return (n=t)&&"function"==typeof n.match?t.match(e):t(e);var n;};function pe(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return t.some((function(t){return de(t,e)}))}}function ve(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return t.every((function(t){return de(t,e)}))}}function ye(t,e){if(!t||!t.meta)return !1;var n="string"==typeof t.meta.requestId,r=e.indexOf(t.meta.requestStatus)>-1;return n&&r}function he(t){return "function"==typeof t[0]&&"pending"in t[0]&&"fulfilled"in t[0]&&"rejected"in t[0]}function ge(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?function(t){return ye(t,["pending"])}:he(t)?function(e){var n=t.map((function(t){return t.pending}));return pe.apply(void 0,n)(e)}:ge()(t[0])}function be(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?function(t){return ye(t,["rejected"])}:he(t)?function(e){var n=t.map((function(t){return t.rejected}));return pe.apply(void 0,n)(e)}:be()(t[0])}function me(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=function(t){return t&&t.meta&&t.meta.rejectedWithValue};return 0===t.length||he(t)?function(e){return ve(be.apply(void 0,t),n)(e)}:me()(t[0])}function we(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?function(t){return ye(t,["fulfilled"])}:he(t)?function(e){var n=t.map((function(t){return t.fulfilled}));return pe.apply(void 0,n)(e)}:we()(t[0])}function Oe(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?function(t){return ye(t,["pending","fulfilled","rejected"])}:he(t)?function(e){for(var n=[],r=0,o=t;r<o.length;r++){var i=o[r];n.push(i.pending,i.rejected,i.fulfilled);}return pe.apply(void 0,n)(e)}:Oe()(t[0])}var je=function(t,e){if("function"!=typeof t)throw new TypeError(e+" is not a function")},Pe=function(){},Ee=function(t,e){return void 0===e&&(e=Pe),t.catch(e),t},Ae=function(t,e){t.addEventListener("abort",e,{once:!0});},Se=function(t,e){var n=t.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:e,configurable:!0,writable:!0}),t.abort(e));},_e=function(t){this.code=t,this.name="TaskAbortError",this.message="task cancelled (reason: "+t+")";},ke=function(t){if(t.aborted)throw new _e(t.reason)},xe=function(t){return Ee(new Promise((function(e,n){var r=function(){return n(new _e(t.reason))};t.aborted?r():Ae(t,r);})))},Ie=function(t){return function(e){return Ee(Promise.race([xe(t),e]).then((function(e){return ke(t),e})))}},De=function(t){var e=Ie(t);return function(t){return e(new Promise((function(e){return setTimeout(e,t)})))}},Te=Object.assign,Ne={},Ce="listenerMiddleware",Me=function(t){var e=t.type,n=t.actionCreator,r=t.matcher,o=t.predicate,i=t.effect;if(e)o=Vt(e).match;else if(n)e=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error("Creating or removing a listener requires one of the known fields for matching an action");return je(i,"options.listener"),{predicate:o,type:e,effect:i}},Re=function(t,e,n){try{t(e,n);}catch(t){setTimeout((function(){throw t}),0);}},qe=Vt(Ce+"/add"),Fe=Vt(Ce+"/removeAll"),ze=Vt(Ce+"/remove"),Ue=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];console.error.apply(console,i([Ce+"/error"],t));},Le=function(t){t.pending.forEach((function(t){Se(t,"listener-cancelled");}));};function Ke(t){var e=this;void 0===t&&(t={});var n=new Map,r=t.extra,i=t.onError,u=void 0===i?Ue:i;je(u,"onError");var c=function(t){for(var e=0,r=Array.from(n.values());e<r.length;e++){var o=r[e];if(t(o))return o}},a=function(t){var e=c((function(e){return e.effect===t.effect}));return e||(e=function(t){var e=Me(t),n=e.type,r=e.predicate,o=e.effect;return {id:ie(),effect:o,type:n,predicate:r,pending:new Set,unsubscribe:function(){throw new Error("Unsubscribe not initialized")}}}(t)),function(t){return t.unsubscribe=function(){return n.delete(t.id)},n.set(t.id,t),function(e){t.unsubscribe(),(null==e?void 0:e.cancelActive)&&Le(t);}}(e)},f=function(t){var e=Me(t),n=e.type,r=e.effect,o=e.predicate,i=c((function(t){return ("string"==typeof n?t.type===n:t.predicate===o)&&t.effect===r}));return i&&(i.unsubscribe(),t.cancelActive&&Le(i)),!!i},l=function(t,i,c,f){return y(e,null,(function(){var e,l,s;return o(this,(function(d){switch(d.label){case 0:e=new AbortController,l=function(t,e){return function(n,r){return Ee(function(n,r){return y(void 0,null,(function(){var i,u,c,a;return o(this,(function(o){switch(o.label){case 0:ke(e),i=function(){},u=new Promise((function(e){i=t({predicate:n,effect:function(t,n){n.unsubscribe(),e([t,n.getState(),n.getOriginalState()]);}});})),c=[xe(e),u],null!=r&&c.push(new Promise((function(t){return setTimeout(t,r,null)}))),o.label=1;case 1:return o.trys.push([1,,3,4]),[4,Promise.race(c)];case 2:return a=o.sent(),ke(e),[2,a];case 3:return i(),[7];case 4:return [2]}}))}))}(n,r))}}(a,e.signal),d.label=1;case 1:return d.trys.push([1,3,4,5]),t.pending.add(e),[4,Promise.resolve(t.effect(i,Te({},c,{getOriginalState:f,condition:function(t,e){return l(t,e).then(Boolean)},take:l,delay:De(e.signal),pause:Ie(e.signal),extra:r,signal:e.signal,fork:(p=e.signal,function(t){je(t,"taskExecutor");var e,n=new AbortController;e=n,Ae(p,(function(){return Se(e,p.reason)}));var r,i,u=(r=function(){return y(void 0,null,(function(){var e;return o(this,(function(r){switch(r.label){case 0:return ke(p),ke(n.signal),[4,t({pause:Ie(n.signal),delay:De(n.signal),signal:n.signal})];case 1:return e=r.sent(),ke(n.signal),[2,e]}}))}))},i=function(){return Se(n,"task-completed")},y(void 0,null,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,4,5]),[4,Promise.resolve()];case 1:return e.sent(),[4,r()];case 2:return [2,{status:"ok",value:e.sent()}];case 3:return [2,{status:(t=e.sent())instanceof _e?"cancelled":"rejected",error:t}];case 4:return null==i||i(),[7];case 5:return [2]}}))})));return {result:Ie(p)(u),cancel:function(){Se(n,"task-cancelled");}}}),unsubscribe:t.unsubscribe,subscribe:function(){n.set(t.id,t);},cancelActiveListeners:function(){t.pending.forEach((function(t,n,r){t!==e&&(Se(t,"listener-cancelled"),r.delete(t));}));}})))];case 2:return d.sent(),[3,5];case 3:return (s=d.sent())instanceof _e||Re(u,s,{raisedBy:"effect"}),[3,5];case 4:return Se(e,"listener-completed"),t.pending.delete(e),[7];case 5:return [2]}var p;}))}))},s=function(t){return function(){t.forEach(Le),t.clear();}}(n);return {middleware:function(t){return function(e){return function(r){if(qe.match(r))return a(r.payload);if(!Fe.match(r)){if(ze.match(r))return f(r.payload);var o,i=t.getState(),c=function(){if(i===Ne)throw new Error(Ce+": getOriginalState can only be called synchronously");return i};try{if(o=e(r),n.size>0)for(var d=t.getState(),p=Array.from(n.values()),v=0,y=p;v<y.length;v++){var h=y[v],g=!1;try{g=h.predicate(r,d,i);}catch(t){g=!1,Re(u,t,{raisedBy:"predicate"});}g&&l(h,r,t,c);}}finally{i=Ne;}return o}s();}}},startListening:a,stopListening:f,clearListeners:s}}var We,Be="RTK_autoBatch",Ve=function(){return function(t){var e;return {payload:t,meta:(e={},e.RTK_autoBatch=!0,e)}}},Xe="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis):function(t){return (We||(We=Promise.resolve())).then(t).catch((function(t){return setTimeout((function(){throw t}),0)}))},Ge=function(t){return function(e){setTimeout(e,t);}},Je="undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:Ge(10),$e=function(t){return void 0===t&&(t={type:"raf"}),function(e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(void 0,n),i=!0,u=!1,c=!1,a=new Set,f="tick"===t.type?Xe:"raf"===t.type?Je:"callback"===t.type?t.queueNotification:Ge(t.timeout),l=function(){c=!1,u&&(u=!1,a.forEach((function(t){return t()})));};return Object.assign({},o,{subscribe:function(t){var e=o.subscribe((function(){return i&&t()}));return a.add(t),function(){e(),a.delete(t);}},dispatch:function(t){var e;try{return i=!(null==(e=null==t?void 0:t.meta)?void 0:e.RTK_autoBatch),(u=!i)&&(c||(c=!0,f(l))),o.dispatch(t)}finally{i=!0;}}})}}};!function(){function t(t,e){var n=o[t];return n?n.enumerable=e:o[t]=n={configurable:!0,enumerable:e,get:function(){return ct.get(this[nt],t)},set:function(e){ct.set(this[nt],t,e);}},n}function e(t){for(var e=t.length-1;e>=0;e--){var o=t[e][nt];if(!o.P)switch(o.i){case 5:r(o)&&V(o);break;case 4:n(o)&&V(o);}}}function n(t){for(var e=t.t,n=t.k,r=ot(n),o=r.length-1;o>=0;o--){var i=r[o];if(i!==nt){var u=e[i];if(void 0===u&&!j(e,i))return !0;var c=n[i],a=c&&c[nt];if(a?a.t!==u:!E(c,u))return !0}}var f=!!e[nt];return r.length!==ot(e).length+(f?0:1)}function r(t){var e=t.k;if(e.length!==t.t.length)return !0;var n=Object.getOwnPropertyDescriptor(e,e.length-1);if(n&&!n.get)return !0;for(var r=0;r<e.length;r++)if(!e.hasOwnProperty(r))return !0;return !1}var o={};ut.ES5||(ut.ES5={J:function(e,n){var r=Array.isArray(e),o=function(e,n){if(e){for(var r=Array(n.length),o=0;o<n.length;o++)Object.defineProperty(r,""+o,t(o,!0));return r}var i=it(n);delete i[nt];for(var u=ot(i),c=0;c<u.length;c++){var a=u[c];i[a]=t(a,e||!!i[a].enumerable);}return Object.create(Object.getPrototypeOf(n),i)}(r,e),i={i:r?5:4,A:n?n.A:N(),P:!1,I:!1,D:{},l:n,t:e,k:o,o:null,O:!1,C:!1};return Object.defineProperty(o,nt,{value:i,writable:!0}),o},S:function(t,n,o){o?g(n)&&n[nt].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var n=e[nt];if(n){var o=n.t,i=n.k,u=n.D,c=n.i;if(4===c)w(i,(function(e){e!==nt&&(void 0!==o[e]||j(o,e)?u[e]||t(i[e]):(u[e]=!0,V(n)));})),w(o,(function(t){void 0!==i[t]||j(i,t)||(u[t]=!1,V(n));}));else if(5===c){if(r(n)&&(V(n),u.length=!0),i.length<o.length)for(var a=i.length;a<o.length;a++)u[a]=!1;else for(var f=o.length;f<i.length;f++)u[f]=!0;for(var l=Math.min(i.length,o.length),s=0;s<l;s++)i.hasOwnProperty(s)||(u[s]=!0),void 0===u[s]&&t(i[s]);}}}}(t.p[0]),e(t.p));},K:function(t){return 4===t.i?n(t):r(t)}});}();
var e=Object.defineProperty,t=(t,n,r)=>(((t,n,r)=>{n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r;})(t,"symbol"!=typeof n?n+"":n,r),r);function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r);}return n}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?r(Object(o),!0).forEach((function(t){n(e,t,o[t]);})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t));}));}return e}function i(e){return "Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var u="function"==typeof Symbol&&Symbol.observable||"@@observable",c=function(){return Math.random().toString(36).substring(7).split("").join(".")},a={INIT:"@@redux/INIT"+c(),REPLACE:"@@redux/REPLACE"+c(),PROBE_UNKNOWN_ACTION:function(){return "@@redux/PROBE_UNKNOWN_ACTION"+c()}};function f(e){if("object"!=typeof e||null===e)return !1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function s(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(i(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(i(1));return n(s)(e,t)}if("function"!=typeof e)throw new Error(i(2));var o=e,c=t,l=[],d=l,p=!1;function y(){d===l&&(d=l.slice());}function h(){if(p)throw new Error(i(3));return c}function v(e){if("function"!=typeof e)throw new Error(i(4));if(p)throw new Error(i(5));var t=!0;return y(),d.push(e),function(){if(t){if(p)throw new Error(i(6));t=!1,y();var n=d.indexOf(e);d.splice(n,1),l=null;}}}function b(e){if(!f(e))throw new Error(i(7));if(void 0===e.type)throw new Error(i(8));if(p)throw new Error(i(9));try{p=!0,c=o(c,e);}finally{p=!1;}for(var t=l=d,n=0;n<t.length;n++)(0, t[n])();return e}function g(e){if("function"!=typeof e)throw new Error(i(10));o=e,b({type:a.REPLACE});}function m(){var e,t=v;return (e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(i(11));function n(){e.next&&e.next(h());}return n(),{unsubscribe:t(n)}}})[u]=function(){return this},e}return b({type:a.INIT}),(r={dispatch:b,subscribe:v,getState:h,replaceReducer:g})[u]=m,r}var l,d,p=s;function y(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];"function"==typeof e[o]&&(n[o]=e[o]);}var u,c=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:a.INIT}))throw new Error(i(12));if(void 0===n(void 0,{type:a.PROBE_UNKNOWN_ACTION()}))throw new Error(i(13))}));}(n);}catch(e){u=e;}return function(e,t){if(void 0===e&&(e={}),u)throw u;for(var r=!1,o={},a=0;a<c.length;a++){var f=c[a],s=e[f],l=(0, n[f])(s,t);if(void 0===l)throw new Error(i(14));o[f]=l,r=r||l!==s;}return (r=r||c.length!==Object.keys(e).length)?o:e}}function h(e,t){return function(){return t(e.apply(this,arguments))}}function v(e,t){if("function"==typeof e)return h(e,t);if("object"!=typeof e||null===e)throw new Error(i(16));var n={};for(var r in e){var o=e[r];"function"==typeof o&&(n[r]=h(o,t));}return n}function b(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function g(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(i(15))},u={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},c=t.map((function(e){return e(u)}));return r=b.apply(void 0,c)(n.dispatch),o(o({},n),{},{dispatch:r})}}}function m(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return "'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function w(e){return !!e&&!!e[oe]}function O(e){var t;return !!e&&(function(e){if(!e||"object"!=typeof e)return !1;var t=Object.getPrototypeOf(e);if(null===t)return !0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===ie}(e)||Array.isArray(e)||!!e[re]||!!(null===(t=e.constructor)||void 0===t?void 0:t[re])||_(e)||k(e))}function j(e){return w(e)||m(23,e),e[oe].t}function E(e,t,n){void 0===n&&(n=!1),0===P(e)?(n?Object.keys:ue)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e);})):e.forEach((function(n,r){return t(r,n,e)}));}function P(e){var t=e[oe];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:_(e)?2:k(e)?3:0}function A(e,t){return 2===P(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function S(e,t,n){var r=P(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n;}function _(e){return Z&&e instanceof Map}function k(e){return ee&&e instanceof Set}function x(e){return e.o||e.t}function I(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=ce(e);delete t[oe];for(var n=ue(t),r=0;r<n.length;r++){var o=n[r],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]});}return Object.create(Object.getPrototypeOf(e),t)}function N(e,t){return void 0===t&&(t=!1),C(e)||w(e)||!O(e)||(P(e)>1&&(e.set=e.add=e.clear=e.delete=T),Object.freeze(e),t&&E(e,(function(e,t){return N(t,!0)}),!0)),e}function T(){m(2);}function C(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function D(e){var t=ae[e];return t||m(18,e),t}function R(){return d}function M(e,t){t&&(D("Patches"),e.u=[],e.s=[],e.v=t);}function q(e){F(e),e.p.forEach(U),e.p=null;}function F(e){e===d&&(d=e.l);}function z(e){return d={p:[],l:d,h:e,m:!0,_:0}}function U(e){var t=e[oe];0===t.i||1===t.i?t.j():t.O=!0;}function L(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.g||D("ES5").S(t,e,r),r?(n[oe].P&&(q(t),m(4)),O(e)&&(e=$(t,e),t.l||W(t,e)),t.u&&D("Patches").M(n[oe].t,e,t.u,t.s)):e=$(t,n,[]),q(t),t.u&&t.v(t.u,t.s),e!==ne?e:void 0}function $(e,t,n){if(C(t))return t;var r=t[oe];if(!r)return E(t,(function(o,i){return K(e,r,t,o,i,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return W(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=I(r.k):r.o;E(3===r.i?new Set(o):o,(function(t,i){return K(e,r,o,t,i,n)})),W(e,o,!1),n&&e.u&&D("Patches").R(r,n,e.u,e.s);}return r.o}function K(e,t,n,r,o,i){if(w(o)){var u=$(e,o,i&&t&&3!==t.i&&!A(t.D,r)?i.concat(r):void 0);if(S(n,r,u),!w(u))return;e.m=!1;}if(O(o)&&!C(o)){if(!e.h.F&&e._<1)return;$(e,o),t&&t.A.l||W(e,o);}}function W(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&N(t,n);}function B(e,t){var n=e[oe];return (n?x(n):e)[t]}function V(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n);}}function X(e){e.P||(e.P=!0,e.l&&X(e.l));}function G(e){e.o||(e.o=I(e.t));}function J(e,t,n){var r=_(t)?D("MapSet").N(t,n):k(t)?D("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:R(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=r,i=fe;n&&(o=[r],i=se);var u=Proxy.revocable(o,i),c=u.revoke,a=u.proxy;return r.k=a,r.j=c,a}(t,n):D("ES5").J(t,n);return (n?n.A:R()).p.push(r),r}function H(e){return w(e)||m(22,e),function e(t){if(!O(t))return t;var n,r=t[oe],o=P(t);if(r){if(!r.P&&(r.i<4||!D("ES5").K(r)))return r.t;r.I=!0,n=Q(t,o),r.I=!1;}else n=Q(t,o);return E(n,(function(t,o){r&&function(e,t){return 2===P(e)?e.get(t):e[t]}(r.t,t)===o||S(n,t,e(o));})),3===o?new Set(n):n}(e)}function Q(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return I(e)}var Y="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Z="undefined"!=typeof Map,ee="undefined"!=typeof Set,te="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,ne=Y?Symbol.for("immer-nothing"):((l={})["immer-nothing"]=!0,l),re=Y?Symbol.for("immer-draftable"):"__$immer_draftable",oe=Y?Symbol.for("immer-state"):"__$immer_state",ie=""+Object.prototype.constructor,ue="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,ce=Object.getOwnPropertyDescriptors||function(e){var t={};return ue(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n);})),t},ae={},fe={get:function(e,t){if(t===oe)return e;var n,r,o,i=x(e);if(!A(i,t))return n=e,(o=V(i,t))?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(n.k):void 0;var u=i[t];return e.I||!O(u)?u:u===B(e.t,t)?(G(e),e.o[t]=J(e.A.h,u,e)):u},has:function(e,t){return t in x(e)},ownKeys:function(e){return Reflect.ownKeys(x(e))},set:function(e,t,n){var r=V(x(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=B(x(e),t),i=null==o?void 0:o[oe];if(i&&i.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,o)&&(void 0!==n||A(e.t,t)))return !0;G(e),X(e);}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==B(e.t,t)||t in e.t?(e.D[t]=!1,G(e),X(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=x(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){m(11);},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){m(12);}},se={};E(fe,(function(e,t){se[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)};})),se.deleteProperty=function(e,t){return se.set.call(this,e,t,void 0)},se.set=function(e,t,n){return fe.set.call(this,e[0],t,n,e[0])};var le=new(function(){function e(e){var t=this;this.g=te,this.F=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var o=n;n=e;var i=t;return function(e){var t=this;void 0===e&&(e=o);for(var r=arguments.length,u=Array(r>1?r-1:0),c=1;c<r;c++)u[c-1]=arguments[c];return i.produce(e,(function(e){var r;return (r=n).call.apply(r,[t,e].concat(u))}))}}var u;if("function"!=typeof n&&m(6),void 0!==r&&"function"!=typeof r&&m(7),O(e)){var c=z(t),a=J(t,e,void 0),f=!0;try{u=n(a),f=!1;}finally{f?q(c):F(c);}return "undefined"!=typeof Promise&&u instanceof Promise?u.then((function(e){return M(c,r),L(e,c)}),(function(e){throw q(c),e})):(M(c,r),L(u,c))}if(!e||"object"!=typeof e){if(void 0===(u=n(e))&&(u=e),u===ne&&(u=void 0),t.F&&N(u,!0),r){var s=[],l=[];D("Patches").M(e,u,s,l),r(s,l);}return u}m(21,e);},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(o))}))};var r,o,i=t.produce(e,n,(function(e,t){r=e,o=t;}));return "undefined"!=typeof Promise&&i instanceof Promise?i.then((function(e){return [e,r,o]})):[i,r,o]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze);}var t=e.prototype;return t.createDraft=function(e){O(e)||m(8),w(e)&&(e=H(e));var t=z(this),n=J(this,e,void 0);return n[oe].C=!0,F(t),n},t.finishDraft=function(e,t){var n=(e&&e[oe]).A;return M(n,t),L(void 0,n)},t.setAutoFreeze=function(e){this.F=e;},t.setUseProxies=function(e){e&&!te&&m(20),this.g=e;},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var o=D("Patches").$;return w(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}()),de=le.produce,pe=(le.produceWithPatches.bind(le),le.setAutoFreeze.bind(le),le.setUseProxies.bind(le),le.applyPatches.bind(le),le.createDraft.bind(le),le.finishDraft.bind(le),de),ye=function(e,t){return e===t};function he(e,t){var n,r,o,i="object"==typeof t?t:{equalityCheck:t},u=i.equalityCheck,c=i.maxSize,a=void 0===c?1:c,f=i.resultEqualityCheck,s=(o=void 0===u?ye:u,function(e,t){if(null===e||null===t||e.length!==t.length)return !1;for(var n=e.length,r=0;r<n;r++)if(!o(e[r],t[r]))return !1;return !0}),l=1===a?(n=s,{get:function(e){return r&&n(r.key,e)?r.value:"NOT_FOUND"},put:function(e,t){r={key:e,value:t};},getEntries:function(){return r?[r]:[]},clear:function(){r=void 0;}}):function(e,t){var n=[];function r(e){var r=n.findIndex((function(n){return t(e,n.key)}));if(r>-1){var o=n[r];return r>0&&(n.splice(r,1),n.unshift(o)),o.value}return "NOT_FOUND"}return {get:r,put:function(t,o){"NOT_FOUND"===r(t)&&(n.unshift({key:t,value:o}),n.length>e&&n.pop());},getEntries:function(){return n},clear:function(){n=[];}}}(a,s);function d(){var t=l.get(arguments);if("NOT_FOUND"===t){if(t=e.apply(null,arguments),f){var n=l.getEntries(),r=n.find((function(e){return f(e.value,t)}));r&&(t=r.value);}l.put(arguments,t);}return t}return d.clearCache=function(){return l.clear()},d}function ve(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return "function"==typeof e}))){var n=t.map((function(e){return "function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function be(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];var i,u=0,c={memoizeOptions:void 0},a=r.pop();if("object"==typeof a&&(c=a,a=r.pop()),"function"!=typeof a)throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof a+"]");var f=c,s=f.memoizeOptions,l=void 0===s?n:s,d=Array.isArray(l)?l:[l],p=ve(r),y=e.apply(void 0,[function(){return u++,a.apply(null,arguments)}].concat(d)),h=e((function(){for(var e=[],t=p.length,n=0;n<t;n++)e.push(p[n].apply(null,arguments));return i=y.apply(null,e)}));return Object.assign(h,{resultFunc:a,memoizedResultFunc:y,dependencies:p,lastResult:function(){return i},recomputations:function(){return u},resetRecomputations:function(){return u=0}}),h};return o}var ge=be(he),me=(...e)=>{const t=ge(...e);return (e,...n)=>t(w(e)?H(e):e,...n)},we="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return "object"==typeof arguments[0]?b:b.apply(null,arguments)};function Oe(e){if("object"!=typeof e||null===e)return !1;let t=Object.getPrototypeOf(e);if(null===t)return !0;let n=t;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n}function je(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return "function"==typeof o?o(n,r,e):t(o)}}}}var Ee=je();Ee.withExtraArgument=je;var Pe=Ee,Ae=class extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Ae.prototype);}static get[Symbol.species](){return Ae}concat(...e){return super.concat.apply(this,e)}prepend(...e){return 1===e.length&&Array.isArray(e[0])?new Ae(...e[0].concat(this)):new Ae(...e.concat(this))}};function Se(e){return O(e)?pe(e,(()=>{})):e}function _e(e){const t=typeof e;return null==e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||Oe(e)}function ke(e,t="",n=_e,r,o=[]){let i;if(!n(e))return {keyPath:t||"<root>",value:e};if("object"!=typeof e||null===e)return !1;const u=null!=r?r(e):Object.entries(e),c=o.length>0;for(const[e,a]of u){const u=t?t+"."+e:e;if(!(c&&o.indexOf(u)>=0)){if(!n(a))return {keyPath:u,value:a};if("object"==typeof a&&(i=ke(a,u,n,r,o),i))return i}}return !1}function xe(e={}){return ()=>e=>t=>e(t)}function Ie(e={}){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0}=e;let o=new Ae;return t&&o.push("boolean"==typeof t?Pe:Pe.withExtraArgument(t.extraArgument)),o}function Ne(e){const t=function(e){return Ie(e)},{reducer:n,middleware:r=t(),devTools:o=!0,preloadedState:i,enhancers:u}=e||{};let c;if("function"==typeof n)c=n;else {if(!Oe(n))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');c=y(n);}let a=r;"function"==typeof a&&(a=a(t));const f=g(...a);let l=b;o&&(l=we({trace:!1,..."object"==typeof o&&o}));let d=[f];return Array.isArray(u)?d=[f,...u]:"function"==typeof u&&(d=u(d)),s(c,i,l(...d))}function Te(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error("prepareAction did not return an object");return {type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return {type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>t.type===e,n}function Ce(e){return ["type","payload","error","meta"].indexOf(e)>-1}function De(e){return `${e}`}function Re(e){const t={},n=[];let r;const o={addCase(e,n){const r="string"==typeof e?e:e.type;if(r in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[r]=n,o},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(r=e,o)};return e(o),[t,n,r]}function Me(e,t){let n,[r,o,i]=Re(t);if("function"==typeof e)n=()=>Se(e());else {const t=Se(e);n=()=>t;}function u(e=n(),t){let u=[r[t.type],...o.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===u.filter((e=>!!e)).length&&(u=[i]),u.reduce(((e,n)=>{if(n){if(w(e)){const r=n(e,t);return void 0===r?e:r}if(O(e))return pe(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e}),e)}return u.getInitialState=n,u}function qe(e){const{name:t}=e;if(!t)throw new Error("`name` is a required option for createSlice");const n="function"==typeof e.initialState?e.initialState:Se(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},u={},c={};function a(){const[t={},r=[],o]="function"==typeof e.extraReducers?Re(e.extraReducers):[e.extraReducers],i={...t,...u};return Me(n,(e=>{for(let t in i)e.addCase(t,i[t]);for(let t of r)e.addMatcher(t.matcher,t.reducer);o&&e.addDefaultCase(o);}))}let f;return o.forEach((e=>{const n=r[e],o=`${t}/${e}`;let a,f;"reducer"in n?(a=n.reducer,f=n.prepare):a=n,i[e]=a,u[o]=a,c[e]=f?Te(o,f):Te(o);})),{name:t,reducer:(e,t)=>(f||(f=a()),f(e,t)),actions:c,caseReducers:i,getInitialState:()=>(f||(f=a()),f.getInitialState())}}function Fe(e){return "object"!=typeof e||null==e||Object.isFrozen(e)}function ze(e={}){return ()=>e=>t=>e(t)}function Ue(e){const t=Le(((t,n)=>e(n)));return function(e){return t(e,void 0)}}function Le(e){return function(t,n){const r=t=>{var r;Oe(r=n)&&"string"==typeof r.type&&Object.keys(r).every(Ce)?e(n.payload,t):e(n,t);};return w(t)?(r(t),t):pe(t,r)}}function $e(e,t){return t(e)}function Ke(e){return Array.isArray(e)||(e=Object.values(e)),e}function We(e,t,n){e=Ke(e);const r=[],o=[];for(const i of e){const e=$e(i,t);e in n.entities?o.push({id:e,changes:i}):r.push(i);}return [r,o]}function Be(e){function t(t,n){const r=$e(t,e);r in n.entities||(n.ids.push(r),n.entities[r]=t);}function n(e,n){e=Ke(e);for(const r of e)t(r,n);}function r(t,n){const r=$e(t,e);r in n.entities||n.ids.push(r),n.entities[r]=t;}function o(e,t){let n=!1;e.forEach((e=>{e in t.entities&&(delete t.entities[e],n=!0);})),n&&(t.ids=t.ids.filter((e=>e in t.entities)));}function i(t,n){const r={},o={};if(t.forEach((e=>{e.id in n.entities&&(o[e.id]={id:e.id,changes:{...o[e.id]?o[e.id].changes:null,...e.changes}});})),(t=Object.values(o)).length>0){const o=t.filter((t=>function(t,n,r){const o=Object.assign({},r.entities[n.id],n.changes),i=$e(o,e),u=i!==n.id;return u&&(t[n.id]=i,delete r.entities[n.id]),r.entities[i]=o,u}(r,t,n))).length>0;o&&(n.ids=Object.keys(n.entities));}}function u(t,r){const[o,u]=We(t,e,r);i(u,r),n(o,r);}return {removeAll:Ue((function(e){Object.assign(e,{ids:[],entities:{}});})),addOne:Le(t),addMany:Le(n),setOne:Le(r),setMany:Le((function(e,t){e=Ke(e);for(const n of e)r(n,t);})),setAll:Le((function(e,t){e=Ke(e),t.ids=[],t.entities={},n(e,t);})),updateOne:Le((function(e,t){return i([e],t)})),updateMany:Le(i),upsertOne:Le((function(e,t){return u([e],t)})),upsertMany:Le(u),removeOne:Le((function(e,t){return o([e],t)})),removeMany:Le(o)}}function Ve(e={}){const{selectId:t,sortComparer:n}={sortComparer:!1,selectId:e=>e.id,...e},r={getInitialState:function(e={}){return Object.assign({ids:[],entities:{}},e)}},o={getSelectors:function(e){const t=e=>e.ids,n=e=>e.entities,r=me(t,n,((e,t)=>e.map((e=>t[e])))),o=(e,t)=>t,i=(e,t)=>e[t],u=me(t,(e=>e.length));if(!e)return {selectIds:t,selectEntities:n,selectAll:r,selectTotal:u,selectById:me(n,o,i)};const c=me(e,n);return {selectIds:me(e,t),selectEntities:c,selectAll:me(e,r),selectTotal:me(e,u),selectById:me(c,o,i)}}},i=n?function(e,t){const{removeOne:n,removeMany:r,removeAll:o}=Be(e);function i(t,n){const r=(t=Ke(t)).filter((t=>!($e(t,e)in n.entities)));0!==r.length&&f(r,n);}function u(e,t){0!==(e=Ke(e)).length&&f(e,t);}function c(t,n){let r=!1;for(let o of t){const t=n.entities[o.id];if(!t)continue;r=!0,Object.assign(t,o.changes);const i=e(t);o.id!==i&&(delete n.entities[o.id],n.entities[i]=t);}r&&s(n);}function a(t,n){const[r,o]=We(t,e,n);c(o,n),i(r,n);}function f(t,n){t.forEach((t=>{n.entities[e(t)]=t;})),s(n);}function s(n){const r=Object.values(n.entities);r.sort(t);const o=r.map(e),{ids:i}=n;(function(e,t){if(e.length!==t.length)return !1;for(let n=0;n<e.length&&n<t.length;n++)if(e[n]!==t[n])return !1;return !0})(i,o)||(n.ids=o);}return {removeOne:n,removeMany:r,removeAll:o,addOne:Le((function(e,t){return i([e],t)})),updateOne:Le((function(e,t){return c([e],t)})),upsertOne:Le((function(e,t){return a([e],t)})),setOne:Le((function(e,t){return u([e],t)})),setMany:Le(u),setAll:Le((function(e,t){e=Ke(e),t.entities={},t.ids=[],i(e,t);})),addMany:Le(i),updateMany:Le(c),upsertMany:Le(a)}}(t,n):Be(t);return {selectId:t,sortComparer:n,...r,...o,...i}}var Xe=(e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},Ge=["name","message","stack","code"],Je=class{constructor(e,n){this.payload=e,this.meta=n,t(this,"_type");}},He=class{constructor(e,n){this.payload=e,this.meta=n,t(this,"_type");}},Qe=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of Ge)"string"==typeof e[n]&&(t[n]=e[n]);return t}return {message:String(e)}},Ye=(()=>{function e(e,n,r){const o=Te(e+"/fulfilled",((e,t,n,r)=>({payload:e,meta:{...r||{},arg:n,requestId:t,requestStatus:"fulfilled"}}))),i=Te(e+"/pending",((e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}}))),u=Te(e+"/rejected",((e,t,n,o,i)=>({payload:o,error:(r&&r.serializeError||Qe)(e||"Rejected"),meta:{...i||{},arg:n,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)}}))),c="undefined"!=typeof AbortController?AbortController:class{constructor(){t(this,"signal",{aborted:!1,addEventListener(){},dispatchEvent:()=>!1,onabort(){},removeEventListener(){},reason:void 0,throwIfAborted(){}});}abort(){}};return Object.assign((function(e){return (t,a,f)=>{const s=(null==r?void 0:r.idGenerator)?r.idGenerator(e):Xe(),l=new c;let d,p=!1;function y(e){d=e,l.abort();}const h=async function(){var c,h;let v;try{let u=null==(c=null==r?void 0:r.condition)?void 0:c.call(r,e,{getState:a,extra:f});if(null!==(b=u)&&"object"==typeof b&&"function"==typeof b.then&&(u=await u),!1===u||l.signal.aborted)throw {name:"ConditionError",message:"Aborted due to condition callback returning false."};p=!0;const g=new Promise(((e,t)=>l.signal.addEventListener("abort",(()=>t({name:"AbortError",message:d||"Aborted"})))));t(i(s,e,null==(h=null==r?void 0:r.getPendingMeta)?void 0:h.call(r,{requestId:s,arg:e},{getState:a,extra:f}))),v=await Promise.race([g,Promise.resolve(n(e,{dispatch:t,getState:a,extra:f,requestId:s,signal:l.signal,abort:y,rejectWithValue:(e,t)=>new Je(e,t),fulfillWithValue:(e,t)=>new He(e,t)})).then((t=>{if(t instanceof Je)throw t;return t instanceof He?o(t.payload,s,e,t.meta):o(t,s,e)}))]);}catch(t){v=t instanceof Je?u(null,s,e,t.payload,t.meta):u(t,s,e);}var b;return r&&!r.dispatchConditionRejection&&u.match(v)&&v.meta.condition||t(v),v}();return Object.assign(h,{abort:y,requestId:s,arg:e,unwrap:()=>h.then(Ze)})}}),{pending:i,rejected:u,fulfilled:o,typePrefix:e})}return e.withTypes=()=>e,e})();function Ze(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var et=(e,t)=>{return (n=e)&&"function"==typeof n.match?e.match(t):e(t);var n;};function tt(...e){return t=>e.some((e=>et(e,t)))}function nt(...e){return t=>e.every((e=>et(e,t)))}function rt(e,t){if(!e||!e.meta)return !1;const n="string"==typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function ot(e){return "function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function it(...e){return 0===e.length?e=>rt(e,["pending"]):ot(e)?t=>tt(...e.map((e=>e.pending)))(t):it()(e[0])}function ut(...e){return 0===e.length?e=>rt(e,["rejected"]):ot(e)?t=>tt(...e.map((e=>e.rejected)))(t):ut()(e[0])}function ct(...e){const t=e=>e&&e.meta&&e.meta.rejectedWithValue;return 0===e.length||ot(e)?n=>nt(ut(...e),t)(n):ct()(e[0])}function at(...e){return 0===e.length?e=>rt(e,["fulfilled"]):ot(e)?t=>tt(...e.map((e=>e.fulfilled)))(t):at()(e[0])}function ft(...e){return 0===e.length?e=>rt(e,["pending","fulfilled","rejected"]):ot(e)?t=>{const n=[];for(const t of e)n.push(t.pending,t.rejected,t.fulfilled);return tt(...n)(t)}:ft()(e[0])}var st=(e,t)=>{if("function"!=typeof e)throw new TypeError(`${t} is not a function`)},lt=()=>{},dt=(e,t=lt)=>(e.catch(t),e),pt=(e,t)=>{e.addEventListener("abort",t,{once:!0});},yt=(e,t)=>{const n=e.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t));},ht=class{constructor(e){this.code=e,t(this,"name","TaskAbortError"),t(this,"message"),this.message=`task cancelled (reason: ${e})`;}},vt=e=>{if(e.aborted)throw new ht(e.reason)},bt=e=>dt(new Promise(((t,n)=>{const r=()=>n(new ht(e.reason));e.aborted?r():pt(e,r);}))),gt=e=>t=>dt(Promise.race([bt(e),t]).then((t=>(vt(e),t)))),mt=e=>{const t=gt(e);return e=>t(new Promise((t=>setTimeout(t,e))))},{assign:wt}=Object,Ot={},jt="listenerMiddleware",Et=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:i}=e;if(t)o=Te(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error("Creating or removing a listener requires one of the known fields for matching an action");return st(i,"options.listener"),{predicate:o,type:t,effect:i}},Pt=(e,t,n)=>{try{e(t,n);}catch(e){setTimeout((()=>{throw e}),0);}},At=Te(`${jt}/add`),St=Te(`${jt}/removeAll`),_t=Te(`${jt}/remove`),kt=(...e)=>{console.error(`${jt}/error`,...e);},xt=e=>{e.pending.forEach((e=>{yt(e,"listener-cancelled");}));};function It(e={}){const t=new Map,{extra:n,onError:r=kt}=e;st(r,"onError");const o=e=>{for(const n of Array.from(t.values()))if(e(n))return n},i=e=>{let n=o((t=>t.effect===e.effect));return n||(n=(e=>{const{type:t,predicate:n,effect:r}=Et(e);return {id:Xe(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error("Unsubscribe not initialized")}}})(e)),(e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),(null==t?void 0:t.cancelActive)&&xt(e);}))(n)},u=e=>{const{type:t,effect:n,predicate:r}=Et(e),i=o((e=>("string"==typeof t?e.type===t:e.predicate===r)&&e.effect===n));return i&&(i.unsubscribe(),e.cancelActive&&xt(i)),!!i},c=async(e,o,u,c)=>{const a=new AbortController,f=((e,t)=>(n,r)=>dt((async(n,r)=>{vt(t);let o=()=>{};const i=new Promise((t=>{o=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()]);}});})),u=[bt(t),i];null!=r&&u.push(new Promise((e=>setTimeout(e,r,null))));try{const e=await Promise.race(u);return vt(t),e}finally{o();}})(n,r)))(i,a.signal);try{e.pending.add(a),await Promise.resolve(e.effect(o,wt({},u,{getOriginalState:c,condition:(e,t)=>f(e,t).then(Boolean),take:f,delay:mt(a.signal),pause:gt(a.signal),extra:n,signal:a.signal,fork:(s=a.signal,e=>{st(e,"taskExecutor");const t=new AbortController;var n;n=t,pt(s,(()=>yt(n,s.reason)));const r=(async(n,r)=>{try{return await Promise.resolve(),{status:"ok",value:await(async()=>{vt(s),vt(t.signal);const n=await e({pause:gt(t.signal),delay:mt(t.signal),signal:t.signal});return vt(t.signal),n})()}}catch(e){return {status:e instanceof ht?"cancelled":"rejected",error:e}}finally{null==r||r();}})(0,(()=>yt(t,"task-completed")));return {result:gt(s)(r),cancel(){yt(t,"task-cancelled");}}}),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e);},cancelActiveListeners:()=>{e.pending.forEach(((e,t,n)=>{e!==a&&(yt(e,"listener-cancelled"),n.delete(e));}));}})));}catch(e){e instanceof ht||Pt(r,e,{raisedBy:"effect"});}finally{yt(a,"listener-completed"),e.pending.delete(a);}var s;},a=(e=>()=>{e.forEach(xt),e.clear();})(t);return {middleware:e=>n=>o=>{if(At.match(o))return i(o.payload);if(St.match(o))return void a();if(_t.match(o))return u(o.payload);let f=e.getState();const s=()=>{if(f===Ot)throw new Error(`${jt}: getOriginalState can only be called synchronously`);return f};let l;try{if(l=n(o),t.size>0){let n=e.getState();const i=Array.from(t.values());for(let t of i){let i=!1;try{i=t.predicate(o,n,f);}catch(e){i=!1,Pt(r,e,{raisedBy:"predicate"});}i&&c(t,o,e,s);}}}finally{f=Ot;}return l},startListening:i,stopListening:u,clearListeners:a}}var Nt,Tt="RTK_autoBatch",Ct=()=>e=>({payload:e,meta:{RTK_autoBatch:!0}}),Dt="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis):e=>(Nt||(Nt=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0))),Rt=e=>t=>{setTimeout(t,e);},Mt="undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:Rt(10),qt=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,i=!1,u=!1;const c=new Set,a="tick"===e.type?Dt:"raf"===e.type?Mt:"callback"===e.type?e.queueNotification:Rt(e.timeout),f=()=>{u=!1,i&&(i=!1,c.forEach((e=>e())));};return Object.assign({},r,{subscribe(e){const t=r.subscribe((()=>o&&e()));return c.add(e),()=>{t(),c.delete(e);}},dispatch(e){var t;try{return o=!(null==(t=null==e?void 0:e.meta)?void 0:t.RTK_autoBatch),i=!o,i&&(u||(u=!0,a(f))),r.dispatch(e)}finally{o=!0;}}})};
exports.MiddlewareArray = Ft;
exports.SHOULD_AUTOBATCH = Be;
exports.TaskAbortError = _e;
exports.__DO_NOT_USE__ActionTypes = bt;
exports.addListener = qe;
exports.applyMiddleware = St;
exports.autoBatchEnhancer = $e;
exports.bindActionCreators = Et;
exports.clearAllListeners = Fe;
exports.combineReducers = jt;
exports.compose = At;
exports.configureStore = Bt;
exports.createAction = Vt;
exports.createAsyncThunk = le;
exports.createDraftSafeSelector = Tt;
exports.createEntityAdapter = oe;
exports.createImmutableStateInvariantMiddleware = Yt;
exports.createListenerMiddleware = Ke;
exports.createNextState = st;
exports.createReducer = $t;
exports.createSelector = Dt;
exports.createSerializableStateInvariantMiddleware = Kt;
exports.createSlice = Ht;
exports.createStore = wt;
exports.current = J;
exports.findNonSerializableValue = Lt;
exports.freeze = x;
exports.getDefaultMiddleware = Wt;
exports.getType = Gt;
exports.isAllOf = ve;
exports.isAnyOf = pe;
exports.isAsyncThunkAction = Oe;
exports.isDraft = g;
exports.isFulfilled = we;
exports.isImmutableDefault = Qt;
exports.isPending = ge;
exports.isPlain = Ut;
exports.isPlainObject = Ct;
exports.isRejected = be;
exports.isRejectedWithValue = me;
exports.legacy_createStore = Ot;
exports.miniSerializeError = fe;
exports.nanoid = ie;
exports.original = m;
exports.prepareAutoBatched = Ve;
exports.removeListener = ze;
exports.unwrapResult = se;
exports.MiddlewareArray = Ae;
exports.SHOULD_AUTOBATCH = Tt;
exports.TaskAbortError = ht;
exports.__DO_NOT_USE__ActionTypes = a;
exports.addListener = At;
exports.applyMiddleware = g;
exports.autoBatchEnhancer = qt;
exports.bindActionCreators = v;
exports.clearAllListeners = St;
exports.combineReducers = y;
exports.compose = b;
exports.configureStore = Ne;
exports.createAction = Te;
exports.createAsyncThunk = Ye;
exports.createDraftSafeSelector = me;
exports.createEntityAdapter = Ve;
exports.createImmutableStateInvariantMiddleware = ze;
exports.createListenerMiddleware = It;
exports.createNextState = de;
exports.createReducer = Me;
exports.createSelector = ge;
exports.createSerializableStateInvariantMiddleware = xe;
exports.createSlice = qe;
exports.createStore = s;
exports.current = H;
exports.findNonSerializableValue = ke;
exports.freeze = N;
exports.getDefaultMiddleware = Ie;
exports.getType = De;
exports.isAllOf = nt;
exports.isAnyOf = tt;
exports.isAsyncThunkAction = ft;
exports.isDraft = w;
exports.isFulfilled = at;
exports.isImmutableDefault = Fe;
exports.isPending = it;
exports.isPlain = _e;
exports.isPlainObject = Oe;
exports.isRejected = ut;
exports.isRejectedWithValue = ct;
exports.legacy_createStore = p;
exports.miniSerializeError = Qe;
exports.nanoid = Xe;
exports.original = j;
exports.prepareAutoBatched = Ct;
exports.removeListener = _t;
exports.unwrapResult = Ze;

@@ -58,0 +58,0 @@ Object.defineProperty(exports, '__esModule', { value: true });

@@ -9,3 +9,3 @@ import type { Middleware, StoreEnhancer } from 'redux';

*/
export declare type IsAny<T, True, False = never> = true | false extends (T extends never ? true : false) ? True : False;
export type IsAny<T, True, False = never> = true | false extends (T extends never ? true : false) ? True : False;
/**

@@ -17,16 +17,16 @@ * return True if T is `unknown`, otherwise return False

*/
export declare type IsUnknown<T, True, False = never> = unknown extends T ? IsAny<T, False, True> : False;
export declare type FallbackIfUnknown<T, Fallback> = IsUnknown<T, Fallback, T>;
export type IsUnknown<T, True, False = never> = unknown extends T ? IsAny<T, False, True> : False;
export type FallbackIfUnknown<T, Fallback> = IsUnknown<T, Fallback, T>;
/**
* @internal
*/
export declare type IfMaybeUndefined<P, True, False> = [undefined] extends [P] ? True : False;
export type IfMaybeUndefined<P, True, False> = [undefined] extends [P] ? True : False;
/**
* @internal
*/
export declare type IfVoid<P, True, False> = [void] extends [P] ? True : False;
export type IfVoid<P, True, False> = [void] extends [P] ? True : False;
/**
* @internal
*/
export declare type IsEmptyObj<T, True, False = never> = T extends any ? keyof T extends never ? IsUnknown<T, False, IfMaybeUndefined<T, False, IfVoid<T, False, True>>> : False : never;
export type IsEmptyObj<T, True, False = never> = T extends any ? keyof T extends never ? IsUnknown<T, False, IfMaybeUndefined<T, False, IfVoid<T, False, True>>> : False : never;
/**

@@ -40,18 +40,18 @@ * returns True if TS version is above 3.5, False if below.

*/
export declare type AtLeastTS35<True, False> = [True, False][IsUnknown<ReturnType<(<T>() => T)>, 0, 1>];
export type AtLeastTS35<True, False> = [True, False][IsUnknown<ReturnType<(<T>() => T)>, 0, 1>];
/**
* @internal
*/
export declare type IsUnknownOrNonInferrable<T, True, False> = AtLeastTS35<IsUnknown<T, True, False>, IsEmptyObj<T, True, IsUnknown<T, True, False>>>;
export type IsUnknownOrNonInferrable<T, True, False> = AtLeastTS35<IsUnknown<T, True, False>, IsEmptyObj<T, True, IsUnknown<T, True, False>>>;
/**
* Convert a Union type `(A|B)` to an intersection type `(A&B)`
*/
export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
export declare type ExcludeFromTuple<T, E, Acc extends unknown[] = []> = T extends [
export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
export type ExcludeFromTuple<T, E, Acc extends unknown[] = []> = T extends [
infer Head,
...infer Tail
] ? ExcludeFromTuple<Tail, E, [...Acc, ...([Head] extends [E] ? [] : [Head])]> : Acc;
declare type ExtractDispatchFromMiddlewareTuple<MiddlewareTuple extends any[], Acc extends {}> = MiddlewareTuple extends [infer Head, ...infer Tail] ? ExtractDispatchFromMiddlewareTuple<Tail, Acc & (Head extends Middleware<infer D> ? IsAny<D, {}, D> : {})> : Acc;
export declare type ExtractDispatchExtensions<M> = M extends MiddlewareArray<infer MiddlewareTuple> ? ExtractDispatchFromMiddlewareTuple<MiddlewareTuple, {}> : M extends ReadonlyArray<Middleware> ? ExtractDispatchFromMiddlewareTuple<[...M], {}> : never;
export declare type ExtractStoreExtensions<E> = E extends any[] ? UnionToIntersection<E[number] extends StoreEnhancer<infer Ext> ? Ext extends {} ? Ext : {} : {}> : {};
type ExtractDispatchFromMiddlewareTuple<MiddlewareTuple extends any[], Acc extends {}> = MiddlewareTuple extends [infer Head, ...infer Tail] ? ExtractDispatchFromMiddlewareTuple<Tail, Acc & (Head extends Middleware<infer D> ? IsAny<D, {}, D> : {})> : Acc;
export type ExtractDispatchExtensions<M> = M extends MiddlewareArray<infer MiddlewareTuple> ? ExtractDispatchFromMiddlewareTuple<MiddlewareTuple, {}> : M extends ReadonlyArray<Middleware> ? ExtractDispatchFromMiddlewareTuple<[...M], {}> : never;
export type ExtractStoreExtensions<E> = E extends any[] ? UnionToIntersection<E[number] extends StoreEnhancer<infer Ext> ? Ext extends {} ? Ext : {} : {}> : {};
/**

@@ -64,4 +64,4 @@ * Helper type. Passes T out again, but boxes it in a way that it cannot

*/
export declare type NoInfer<T> = [T][T extends any ? 0 : never];
export declare type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
export type NoInfer<T> = [T][T extends any ? 0 : never];
export type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
export interface TypeGuard<T> {

@@ -75,8 +75,8 @@ (value: any): value is T;

/** @public */
export declare type Matcher<T> = HasMatchFunction<T> | TypeGuard<T>;
export type Matcher<T> = HasMatchFunction<T> | TypeGuard<T>;
/** @public */
export declare type ActionFromMatcher<M extends Matcher<any>> = M extends Matcher<infer T> ? T : never;
export declare type Id<T> = {
export type ActionFromMatcher<M extends Matcher<any>> = M extends Matcher<infer T> ? T : never;
export type Id<T> = {
[K in keyof T]: T[K];
} & {};
export {};
{
"name": "@reduxjs/toolkit",
"version": "1.9.1",
"version": "2.0.0-alpha.0",
"description": "The official, opinionated, batteries-included toolset for efficient Redux development",

@@ -26,3 +26,3 @@ "author": "Mark Erikson <mark@isquaredsoftware.com>",

"main": "dist/index.js",
"module": "dist/redux-toolkit.esm.js",
"module": "dist/redux-toolkit.modern.js",
"unpkg": "dist/redux-toolkit.umd.min.js",

@@ -49,3 +49,3 @@ "types": "dist/index.d.ts",

"convert-source-map": "^1.7.0",
"esbuild": "^0.11.13",
"esbuild": "~0.17",
"eslint": "^7.25.0",

@@ -78,10 +78,12 @@ "eslint-config-prettier": "^8.3.0",

"tslib": "^1.10.0",
"typescript": "~4.2.4",
"tsx": "^3.12.2",
"typescript": "~4.9",
"yargs": "^15.3.1"
},
"scripts": {
"build-ci": "yarn rimraf dist && yarn tsc && node scripts/cli.js --skipExtraction",
"run-build": "tsx ./scripts/build.ts",
"build-ci": "yarn rimraf dist && yarn tsc && yarn run-build --skipExtraction",
"build-prepare": "npm run build-ci",
"build": "yarn rimraf dist && yarn tsc && node scripts/cli.js --local --skipExtraction",
"build-only": "yarn rimraf dist && yarn tsc && node scripts/cli.js --skipExtraction",
"build": "yarn rimraf dist && yarn tsc && yarn run-build --local --skipExtraction",
"build-only": "yarn rimraf dist && yarn tsc && yarn run-build --skipExtraction",
"format": "prettier --write \"(src|examples)/**/*.{ts,tsx}\" \"**/*.md\"",

@@ -88,0 +90,0 @@ "format:check": "prettier --list-different \"(src|examples)/**/*.{ts,tsx}\" \"docs/*/**.md\"",

@@ -6,3 +6,3 @@ {

"main": "../dist/query/index.js",
"module": "../dist/query/rtk-query.esm.js",
"module": "../dist/query/rtk-query.modern.js",
"unpkg": "../dist/query/rtk-query.umd.min.js",

@@ -9,0 +9,0 @@ "types": "../dist/query/index.d.ts",

@@ -6,3 +6,3 @@ {

"main": "../../dist/query/react/index.js",
"module": "../../dist/query/react/rtk-query-react.esm.js",
"module": "../../dist/query/react/rtk-query-react.modern.js",
"unpkg": "../../dist/query/react/rtk-query-react.umd.min.js",

@@ -9,0 +9,0 @@ "author": "Mark Erikson <mark@isquaredsoftware.com>",

@@ -58,3 +58,3 @@ import type { Draft } from 'immer'

action: A
) => S | void | Draft<S>
) => NoInfer<S> | void | Draft<NoInfer<S>>

@@ -155,80 +155,11 @@ /**

/**
* A utility function that allows defining a reducer as a mapping from action
* type to *case reducer* functions that handle these action types. The
* reducer's initial state is passed as the first argument.
*
* The body of every case reducer is implicitly wrapped with a call to
* `produce()` from the [immer](https://github.com/mweststrate/immer) library.
* This means that rather than returning a new state object, you can also
* mutate the passed-in state object directly; these mutations will then be
* automatically and efficiently translated into copies, giving you both
* convenience and immutability.
*
* @overloadSummary
* This overload accepts an object where the keys are string action types, and the values
* are case reducer functions to handle those action types.
*
* @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`.
* @param actionsMap - An object mapping from action types to _case reducers_, each of which handles one specific action type.
* @param actionMatchers - An array of matcher definitions in the form `{matcher, reducer}`.
* All matching reducers will be executed in order, independently if a case reducer matched or not.
* @param defaultCaseReducer - A "default case" reducer that is executed if no case reducer and no matcher
* reducer was executed for this action.
*
* @example
```js
const counterReducer = createReducer(0, {
increment: (state, action) => state + action.payload,
decrement: (state, action) => state - action.payload
})
// Alternately, use a "lazy initializer" to provide the initial state
// (works with either form of createReducer)
const initialState = () => 0
const counterReducer = createReducer(initialState, {
increment: (state, action) => state + action.payload,
decrement: (state, action) => state - action.payload
})
```
* Action creators that were generated using [`createAction`](./createAction) may be used directly as the keys here, using computed property syntax:
```js
const increment = createAction('increment')
const decrement = createAction('decrement')
const counterReducer = createReducer(0, {
[increment]: (state, action) => state + action.payload,
[decrement.type]: (state, action) => state - action.payload
})
```
* @public
*/
export function createReducer<
S extends NotFunction<any>,
CR extends CaseReducers<S, any> = CaseReducers<S, any>
>(
initialState: S | (() => S),
actionsMap: CR,
actionMatchers?: ActionMatcherDescriptionCollection<S>,
defaultCaseReducer?: CaseReducer<S>
): ReducerWithInitialState<S>
export function createReducer<S extends NotFunction<any>>(
initialState: S | (() => S),
mapOrBuilderCallback:
| CaseReducers<S, any>
| ((builder: ActionReducerMapBuilder<S>) => void),
actionMatchers: ReadonlyActionMatcherDescriptionCollection<S> = [],
defaultCaseReducer?: CaseReducer<S>
mapOrBuilderCallback: (builder: ActionReducerMapBuilder<S>) => void
): ReducerWithInitialState<S> {
if (process.env.NODE_ENV !== 'production') {
if (typeof mapOrBuilderCallback === 'object') {
if (!hasWarnedAboutObjectNotation) {
hasWarnedAboutObjectNotation = true
console.warn(
"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"
)
}
throw new Error(
"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer"
)
}

@@ -238,5 +169,3 @@ }

let [actionsMap, finalActionMatchers, finalDefaultCaseReducer] =
typeof mapOrBuilderCallback === 'function'
? executeReducerBuilderCallback(mapOrBuilderCallback)
: [mapOrBuilderCallback, actionMatchers, defaultCaseReducer]
executeReducerBuilderCallback(mapOrBuilderCallback)

@@ -243,0 +172,0 @@ // Ensure the initial state gets frozen either way (if draftable)

@@ -144,5 +144,3 @@ import type { AnyAction, Reducer } from 'redux'

*/
extraReducers?:
| CaseReducers<NoInfer<State>, any>
| ((builder: ActionReducerMapBuilder<NoInfer<State>>) => void)
extraReducers?: (builder: ActionReducerMapBuilder<NoInfer<State>>) => void
}

@@ -334,8 +332,5 @@

if (typeof options.extraReducers === 'object') {
if (!hasWarnedAboutObjectNotation) {
hasWarnedAboutObjectNotation = true
console.warn(
"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"
)
}
throw new Error(
"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice"
)
}

@@ -342,0 +337,0 @@ }

@@ -1,5 +0,4 @@

import { enableES5 } from 'immer'
export * from 'redux'
export {
default as createNextState,
produce as createNextState,
current,

@@ -21,8 +20,2 @@ freeze,

// We deliberately enable Immer's ES5 support, on the grounds that
// we assume RTK will be used with React Native and other Proxy-less
// environments. In addition, that's how Immer 4 behaved, and since
// we want to ship this in an RTK minor, we should keep the same behavior.
enableES5()
export {

@@ -29,0 +22,0 @@ // js

@@ -187,3 +187,3 @@ import {

let foundExtra: number | null = null
let foundExtra: number | null = null

@@ -1065,8 +1065,9 @@ const typedAddListener =

const typedAddListener =
startListening as TypedStartListening<
CounterState,
typeof store.dispatch
>
let result: [ReturnType<typeof increment>, CounterState, CounterState] | null = null
const typedAddListener = startListening as TypedStartListening<
CounterState,
typeof store.dispatch
>
let result:
| [ReturnType<typeof increment>, CounterState, CounterState]
| null = null

@@ -1131,3 +1132,3 @@ typedAddListener({

test("take resolves to `[A, CurrentState, PreviousState] | null` if a possibly undefined timeout parameter is provided", async () => {
test('take resolves to `[A, CurrentState, PreviousState] | null` if a possibly undefined timeout parameter is provided', async () => {
const store = configureStore({

@@ -1138,3 +1139,5 @@ reducer: counterSlice.reducer,

type ExpectedTakeResultType = readonly [ReturnType<typeof increment>, CounterState, CounterState] | null
type ExpectedTakeResultType =
| readonly [ReturnType<typeof increment>, CounterState, CounterState]
| null

@@ -1144,3 +1147,4 @@ let timeout: number | undefined = undefined

const startAppListening = startListening as TypedStartListening<CounterState>
const startAppListening =
startListening as TypedStartListening<CounterState>
startAppListening({

@@ -1150,11 +1154,11 @@ predicate: incrementByAmount.match,

const stateBefore = listenerApi.getState()
let takeResult = await listenerApi.take(increment.match, timeout)
const stateCurrent = listenerApi.getState()
expect(takeResult).toEqual([increment(), stateCurrent, stateBefore])
timeout = 1
takeResult = await listenerApi.take(increment.match, timeout)
expect(takeResult).toBeNull()
expectType<ExpectedTakeResultType>(takeResult)

@@ -1169,3 +1173,3 @@

await delay(25)
expect(done).toBe(true);
expect(done).toBe(true)
})

@@ -1454,3 +1458,2 @@

effect: (action, listenerApi) => {
// @ts-expect-error
expectExactType<PayloadAction<number>>(action)

@@ -1457,0 +1460,0 @@ },

@@ -30,7 +30,10 @@ import type {

type TodosReducer = Reducer<TodoState, PayloadAction<any>>
type AddTodoReducer = CaseReducer<TodoState, PayloadAction<AddTodoPayload>>
type AddTodoReducer = CaseReducer<
TodoState,
PayloadAction<AddTodoPayload, 'ADD_TODO'>
>
type ToggleTodoReducer = CaseReducer<
TodoState,
PayloadAction<ToggleTodoPayload>
PayloadAction<ToggleTodoPayload, 'TOGGLE_TODO'>
>

@@ -62,5 +65,4 @@

const todosReducer = createReducer([] as TodoState, {
ADD_TODO: addTodo,
TOGGLE_TODO: toggleTodo,
const todosReducer = createReducer([] as TodoState, (builder) => {
builder.addCase('ADD_TODO', addTodo).addCase('TOGGLE_TODO', toggleTodo)
})

@@ -82,21 +84,27 @@

it('Warns about object notation deprecation, once', () => {
it('Throws an error if the legacy object notation is used', () => {
const { createReducer } = require('../createReducer')
let dummyReducer = (createReducer as CreateReducer)([] as TodoState, {})
const wrapper = () => {
// @ts-ignore
let dummyReducer = (createReducer as CreateReducer)([] as TodoState, {})
}
expect(getLog().levels.warn).toMatch(
/The object notation for `createReducer` is deprecated/
expect(wrapper).toThrowError(
/The object notation for `createReducer` has been removed/
)
restore = mockConsole(createConsole())
dummyReducer = (createReducer as CreateReducer)([] as TodoState, {})
expect(getLog().levels.warn).toBe('')
expect(wrapper).toThrowError(
/The object notation for `createReducer` has been removed/
)
})
it('Does not warn in production', () => {
it('Crashes in production', () => {
process.env.NODE_ENV = 'production'
const { createReducer } = require('../createReducer')
let dummyReducer = (createReducer as CreateReducer)([] as TodoState, {})
const wrapper = () => {
// @ts-ignore
let dummyReducer = (createReducer as CreateReducer)([] as TodoState, {})
}
expect(getLog().levels.warn).toBe('')
expect(wrapper).toThrowError()
})

@@ -118,3 +126,4 @@ })

test('Freezes data in production', () => {
const { createReducer } = require('../createReducer')
const createReducer: CreateReducer =
require('../createReducer').createReducer
const addTodo: AddTodoReducer = (state, action) => {

@@ -131,5 +140,4 @@ const { newTodo } = action.payload

const todosReducer = createReducer([] as TodoState, {
ADD_TODO: addTodo,
TOGGLE_TODO: toggleTodo,
const todosReducer = createReducer([] as TodoState, (builder) => {
builder.addCase('ADD_TODO', addTodo).addCase('TOGGLE_TODO', toggleTodo)
})

@@ -150,3 +158,3 @@

const initialState = [{ text: 'Buy milk' }]
const todosReducer = createReducer(initialState, {})
const todosReducer = createReducer(initialState, () => {})
const frozenInitialState = todosReducer(undefined, { type: 'dummy' })

@@ -161,3 +169,5 @@

test('does not throw error if initial state is not draftable', () => {
expect(() => createReducer(new URLSearchParams(), {})).not.toThrowError()
expect(() =>
createReducer(new URLSearchParams(), () => {})
).not.toThrowError()
})

@@ -184,5 +194,4 @@ })

const todosReducer = createReducer([] as TodoState, {
ADD_TODO: addTodo,
TOGGLE_TODO: toggleTodo,
const todosReducer = createReducer([] as TodoState, (builder) => {
builder.addCase('ADD_TODO', addTodo).addCase('TOGGLE_TODO', toggleTodo)
})

@@ -207,5 +216,4 @@

const todosReducer = createReducer(lazyStateInit, {
ADD_TODO: addTodo,
TOGGLE_TODO: toggleTodo,
const todosReducer = createReducer([] as TodoState, (builder) => {
builder.addCase('ADD_TODO', addTodo).addCase('TOGGLE_TODO', toggleTodo)
})

@@ -218,3 +226,3 @@

const dummyReducer = createReducer(spy, {})
const dummyReducer = createReducer(spy, () => {})
expect(spy).not.toHaveBeenCalled()

@@ -246,5 +254,4 @@

const todosReducer = createReducer([] as TodoState, {
ADD_TODO: addTodo,
TOGGLE_TODO: toggleTodo,
const todosReducer = createReducer([] as TodoState, (builder) => {
builder.addCase('ADD_TODO', addTodo).addCase('TOGGLE_TODO', toggleTodo)
})

@@ -261,116 +268,2 @@

describe('actionMatchers argument', () => {
const prepareNumberAction = (payload: number) => ({
payload,
meta: { type: 'number_action' },
})
const prepareStringAction = (payload: string) => ({
payload,
meta: { type: 'string_action' },
})
const numberActionMatcher = (a: AnyAction): a is PayloadAction<number> =>
a.meta && a.meta.type === 'number_action'
const stringActionMatcher = (a: AnyAction): a is PayloadAction<string> =>
a.meta && a.meta.type === 'string_action'
const incrementBy = createAction('increment', prepareNumberAction)
const decrementBy = createAction('decrement', prepareNumberAction)
const concatWith = createAction('concat', prepareStringAction)
const initialState = { numberActions: 0, stringActions: 0 }
const numberActionsCounter = {
matcher: numberActionMatcher,
reducer(state: typeof initialState) {
state.numberActions = state.numberActions * 10 + 1
},
}
const stringActionsCounter = {
matcher: stringActionMatcher,
reducer(state: typeof initialState) {
state.stringActions = state.stringActions * 10 + 1
},
}
test('uses the reducer of matching actionMatchers', () => {
const reducer = createReducer(initialState, {}, [
numberActionsCounter,
stringActionsCounter,
])
expect(reducer(undefined, incrementBy(1))).toEqual({
numberActions: 1,
stringActions: 0,
})
expect(reducer(undefined, decrementBy(1))).toEqual({
numberActions: 1,
stringActions: 0,
})
expect(reducer(undefined, concatWith('foo'))).toEqual({
numberActions: 0,
stringActions: 1,
})
})
test('fallback to default case', () => {
const reducer = createReducer(
initialState,
{},
[numberActionsCounter, stringActionsCounter],
(state) => {
state.numberActions = -1
state.stringActions = -1
}
)
expect(reducer(undefined, { type: 'somethingElse' })).toEqual({
numberActions: -1,
stringActions: -1,
})
})
test('runs reducer cases followed by all matching actionMatchers', () => {
const reducer = createReducer(
initialState,
{
[incrementBy.type](state) {
state.numberActions = state.numberActions * 10 + 2
},
},
[
{
matcher: numberActionMatcher,
reducer(state) {
state.numberActions = state.numberActions * 10 + 3
},
},
numberActionsCounter,
stringActionsCounter,
]
)
expect(reducer(undefined, incrementBy(1))).toEqual({
numberActions: 231,
stringActions: 0,
})
expect(reducer(undefined, decrementBy(1))).toEqual({
numberActions: 31,
stringActions: 0,
})
expect(reducer(undefined, concatWith('foo'))).toEqual({
numberActions: 0,
stringActions: 1,
})
})
test('works with `actionCreator.match`', () => {
const reducer = createReducer(initialState, {}, [
{
matcher: incrementBy.match,
reducer(state) {
state.numberActions += 100
},
},
])
expect(reducer(undefined, incrementBy(1))).toEqual({
numberActions: 100,
stringActions: 0,
})
})
})
describe('alternative builder callback for actionMap', () => {

@@ -377,0 +270,0 @@ const increment = createAction<number, 'increment'>('increment')

@@ -10,12 +10,15 @@ import type { Reducer } from 'redux'

{
type CounterAction =
| { type: 'increment'; payload: number }
| { type: 'decrement'; payload: number }
const incrementHandler = (
state: number,
action: { type: 'increment'; payload: number }
) => state + 1
const decrementHandler = (
state: number,
action: { type: 'decrement'; payload: number }
) => state - 1
const incrementHandler = (state: number, action: CounterAction) => state + 1
const decrementHandler = (state: number, action: CounterAction) => state - 1
const reducer = createReducer(0 as number, {
increment: incrementHandler,
decrement: decrementHandler,
const reducer = createReducer(0 as number, (builder) => {
builder
.addCase('increment', incrementHandler)
.addCase('decrement', decrementHandler)
})

@@ -33,21 +36,24 @@

{
type CounterAction =
| { type: 'increment'; payload: number }
| { type: 'decrement'; payload: number }
const incrementHandler = (
state: number,
action: { type: 'increment'; payload: number }
) => state + action.payload
const incrementHandler = (state: number, action: CounterAction) =>
state + action.payload
const decrementHandler = (
state: number,
action: { type: 'decrement'; payload: number }
) => state - action.payload
const decrementHandler = (state: number, action: CounterAction) =>
state - action.payload
createReducer<number>(0, {
increment: incrementHandler,
decrement: decrementHandler,
createReducer(0 as number, (builder) => {
builder
.addCase('increment', incrementHandler)
.addCase('decrement', decrementHandler)
})
// @ts-expect-error
createReducer<string>(0, {
increment: incrementHandler,
decrement: decrementHandler,
createReducer<string>(0 as number, (builder) => {
// @ts-expect-error
builder
.addCase('increment', incrementHandler)
.addCase('decrement', decrementHandler)
})

@@ -62,6 +68,6 @@ }

createReducer(initialState, {
increment: (state) => {
createReducer(initialState, (builder) => {
builder.addCase('increment', (state) => {
state.counter += 1
},
})
})

@@ -68,0 +74,0 @@ }

@@ -186,5 +186,9 @@ import type { PayloadAction } from '@reduxjs/toolkit'

},
extraReducers: {
[addMore.type]: (state, action) => state + action.payload.amount,
extraReducers: (builder) => {
builder.addCase(
addMore,
(state, action) => state + action.payload.amount
)
},
initialState: 0,

@@ -376,3 +380,3 @@ })

describe.only('Deprecation warnings', () => {
describe('Deprecation warnings', () => {
let originalNodeEnv = process.env.NODE_ENV

@@ -390,3 +394,3 @@

// NOTE: This needs to be in front of the later `createReducer` call to check the one-time warning
it('Warns about object notation deprecation, once', () => {
it('Throws an error if the legacy object notation is used', () => {
const { createSlice } = require('../createSlice')

@@ -399,13 +403,16 @@

extraReducers: {
// @ts-ignore
a: () => [],
},
})
let reducer: any
// Have to trigger the lazy creation
let { reducer } = dummySlice
reducer(undefined, { type: 'dummy' })
const wrapper = () => {
reducer = dummySlice.reducer
reducer(undefined, { type: 'dummy' })
}
expect(getLog().levels.warn).toMatch(
/The object notation for `createSlice.extraReducers` is deprecated/
expect(wrapper).toThrowError(
/The object notation for `createSlice.extraReducers` has been removed/
)
restore = mockConsole(createConsole())

@@ -417,11 +424,13 @@ dummySlice = (createSlice as CreateSlice)({

extraReducers: {
// @ts-ignore
a: () => [],
},
})
reducer = dummySlice.reducer
reducer(undefined, { type: 'dummy' })
expect(getLog().levels.warn).toBe('')
expect(wrapper).toThrowError(
/The object notation for `createSlice.extraReducers` has been removed/
)
})
it('Does not warn in production', () => {
// TODO Determine final production behavior here
it.skip('Crashes in production', () => {
process.env.NODE_ENV = 'production'

@@ -434,7 +443,15 @@ const { createSlice } = require('../createSlice')

reducers: {},
// @ts-ignore
extraReducers: {},
})
expect(getLog().levels.warn).toBe('')
const wrapper = () => {
let reducer = dummySlice.reducer
reducer(undefined, { type: 'dummy' })
}
expect(wrapper).toThrowError(
/The object notation for `createSlice.extraReducers` has been removed/
)
})
})
})

@@ -62,5 +62,7 @@ import type { Action, AnyAction, Reducer } from 'redux'

},
extraReducers: {
[firstAction.type]: (state: number, action) =>
state + action.payload.count,
extraReducers: (builder) => {
builder.addCase(
firstAction,
(state, action) => state + action.payload.count
)
},

@@ -71,9 +73,8 @@ })

const reducer: Reducer<number, PayloadAction> = slice.reducer
expectType<Reducer<number, PayloadAction>>(slice.reducer)
// @ts-expect-error
const stringReducer: Reducer<string, PayloadAction> = slice.reducer
expectType<Reducer<string, PayloadAction>>(slice.reducer)
// @ts-expect-error
const anyActionReducer: Reducer<string, AnyAction> = slice.reducer
expectType<Reducer<string, AnyAction>>(slice.reducer)
/* Actions */

@@ -80,0 +81,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc