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.0 to 1.9.1

src/tests/createAction.typetest.tsx

2

dist/createAction.d.ts

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

*/
(): PayloadAction<undefined, T>;
(noArgument: void): PayloadAction<undefined, T>;
}

@@ -112,0 +112,0 @@ /**

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

rejectWithValue: IsUnknown<RejectedMeta, (value: RejectedValue) => RejectWithValue<RejectedValue, RejectedMeta>, (value: RejectedValue, meta: RejectedMeta) => RejectWithValue<RejectedValue, RejectedMeta>>;
fulfillWithValue: IsUnknown<FulfilledMeta, <FulfilledValue>(value: FulfilledValue) => FulfillWithMeta<FulfilledValue, FulfilledMeta>, <FulfilledValue>(value: FulfilledValue, meta: FulfilledMeta) => FulfillWithMeta<FulfilledValue, FulfilledMeta>>;
fulfillWithValue: IsUnknown<FulfilledMeta, <FulfilledValue>(value: FulfilledValue) => FulfilledValue, <FulfilledValue>(value: FulfilledValue, meta: FulfilledMeta) => FulfillWithMeta<FulfilledValue, FulfilledMeta>>;
};

@@ -16,0 +16,0 @@ /**

@@ -298,2 +298,3 @@ /**

export interface ApiEndpointQuery<Definition extends QueryDefinition<any, any, any, any, any>, Definitions extends EndpointDefinitions> {
name: string;
/**

@@ -305,2 +306,3 @@ * All of these are `undefined` at runtime, purely to be used in TypeScript declarations!

export interface ApiEndpointMutation<Definition extends MutationDefinition<any, any, any, any, any>, Definitions extends EndpointDefinitions> {
name: string;
/**

@@ -307,0 +309,0 @@ * All of these are `undefined` at runtime, purely to be used in TypeScript declarations!

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

*/
merge?(currentCacheData: ResultType, responseData: ResultType): ResultType | void;
merge?(currentCacheData: ResultType, responseData: ResultType, otherArgs: {
arg: QueryArg;
baseQueryMeta: BaseQueryMeta<BaseQuery>;
requestId: string;
fulfilledTimeStamp: number;
}): ResultType | void;
/**

@@ -340,0 +345,0 @@ * Check to see if the endpoint should force a refetch in cases where it normally wouldn't.

export { QueryStatus } from './core/apiState';
export type { Api, Module, ApiModules } from './apiTypes';
export type { BaseQueryApi, BaseQueryEnhancer, BaseQueryFn, } from './baseQueryTypes';
export type { EndpointDefinitions, EndpointDefinition, QueryDefinition, MutationDefinition, } from './endpointDefinitions';
export type { EndpointDefinitions, EndpointDefinition, QueryDefinition, MutationDefinition, TagDescription, } from './endpointDefinitions';
export { fetchBaseQuery } from './fetchBaseQuery';

@@ -6,0 +6,0 @@ export type { FetchBaseQueryError, FetchBaseQueryMeta, FetchArgs, } from './fetchBaseQuery';

@@ -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 Me},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 O=function(e){return[].concat.apply([],e)},S=b(require("@reduxjs/toolkit")).isPlainObject;function A(e,t){if(e===t||!(S(e)&&S(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,O,S,A,R,w,x,Q,P,C,I,D,M,N,E,K,_,F,z,U,L,W,B,H,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,O=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,M=void 0===(D=A.params)?void 0:D,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:O})];case 1:W.headers=n.sent()||P,B=function(e){return"object"==typeof e&&((0,T.isPlainObject)(e)||Array.isArray(e)||"function"==typeof e.toJSON)},!L.headers.has("content-type")&&B(I)&&L.headers.set("content-type",f),B(I)&&l(L.headers)&&(L.body=JSON.stringify(I)),M&&(H=~R.indexOf("?")?"&":"?",J=c?c(M):new URLSearchParams(k(M)),R+=H+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(),S={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:S}];case 5:return X&&clearTimeout(X),[7];case 6:ee=Y.clone(),S.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:S}];case 10:return[2,_(Y,te)?{data:te,meta:S}:{error:{status:Y.status,data:te},meta:S}]}}))}))};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(Boolean),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})}}),D=b(require("@reduxjs/toolkit")),M=(0,D.createAction)("__rtkq/focused"),N=(0,D.createAction)("__rtkq/unfocused"),E=(0,D.createAction)("__rtkq/online"),K=(0,D.createAction)("__rtkq/offline"),_=!1;function F(e,t){return t?t(e,{onFocus:M,onFocusLost:N,onOffline:K,onOnline:E}):(n=function(){return e(M())},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 B(e,t,n,r,i,a){return"function"==typeof e?e(t,n,r,i).map(H).map(a):Array.isArray(e)?e.map(H).map(a):[]}function H(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 B(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],O=q[1];l(b=q[0],null==O?void 0:O.endpointName,i,c.config)}}}},Oe=b(require("@reduxjs/toolkit")),Se=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,Oe.isAnyOf)((0,Oe.isFulfilled)(a),(0,Oe.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(B(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={},O=new Promise((function(e,t){q.resolve=e,q.reject=t}));O.catch((function(){})),c[f]=q;var S=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 S(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:O});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:global):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")),De=Symbol(),Me=function(){return{name:De,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:M,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,O=t.rejectWithValue,S=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=S,[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=O,[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,S=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=(0,J.createNextState)(t.data,(function(e){return a(e,i)}));t.data=o}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,O=null!=(a=(r=null!=(n=e[b])?n:e[b]={})[i=q||"__internal_without_id"])?a:r[i]=[];O.includes(c)||O.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(M,(function(e){e.focused=!0})).addCase(N,(function(e){e.focused=!1})).addMatcher(s,(function(e){return v({},e)}))}}),O=(0,J.combineReducers)({queries:p.reducer,mutations:h.reducer,provided:m.reducer,subscriptions:b.reducer,config:q.reducer});return{reducer:function(e,t){return O(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:S,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,Se,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,(S=b.arg).subscribe)return(q=null!=(u=e[a=S.queryCacheKey])?u:e[a]={})[m]=null!=(l=null!=(o=S.subscriptionOptions)?o:q[m])?l:{},!0}if(n.rejected.match(r)){var q,O=r.meta,S=O.arg;if(m=O.requestId,O.condition&&S.subscribe)return(q=null!=(f=e[d=S.queryCacheKey])?f:e[d]={})[m]=null!=(h=null!=(p=S.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){M.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(H);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]:O(Object.values(s)))?n:[];l<d.length;l++)a.add(d[l])}return O(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}),D=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}),O=i(((f={type:"query",subscribe:h,forceRefetch:v,subscriptionOptions:y,endpointName:e,originalArgs:o,queryCacheKey:b})[G]=m,f)),S=u.endpoints[e].select(o),A=s(O),T=S(l()),R=A.requestId,j=A.abort,w=T.requestId!==R,k=null==(g=c.get(s))?void 0:g[b],x=function(){return S(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,B=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:De,injectEndpoint:function(e,n){var r,i=t;null!=(r=i.endpoints)[e]||(r[e]={}),W(n)?Ce(i.endpoints[e],{select:D(e,n),initiate:U(e,n)},j(m,e)):n.type===z.mutation&&Ce(i.endpoints[e],{select:_(),initiate:B(e)},j(g,e))}}}}},Ne=ye(Me());
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());
//# 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},d=(e,t)=>r(e,i(t)),l=(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 y=p;function m(e,t){if(e===t||!(y(e)&&y(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]=m(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 O(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=l(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:m,getState:g,extra:b,endpoint:O,forced:S,type:R}=t;let w,T="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}=T,D=l(T,["url","method","headers","body","params","responseHandler","validateStatus","timeout"]),M=c(d(c({},p),{method:A,signal:m,body:x}),D);k=new Headers(q(k)),M.headers=await r(k,{getState:g,extra:b,endpoint:O,forced:S,type:R})||k;const N=e=>"object"==typeof e&&(h(e)||Array.isArray(e)||"function"==typeof e.toJSON);if(!M.headers.has("content-type")&&N(x)&&M.headers.set("content-type",s),N(x)&&o(M.headers)&&(M.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,M);w={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:w}}finally{z&&clearTimeout(z)}const _=K.clone();let $;w.response=_;let U="";try{let e;if(await Promise.all([y(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:w}}return C(K,$)?{data:$,meta:w}:{error:{status:K.status,data:$},meta:w}};async function y(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 S=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 w={},T=Object.assign(((e,t)=>async(n,r,i)=>{const a=[5,(t||w).maxRetries,(i||w).maxRetries].filter(Boolean),[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 S(t);return t}catch(e){if(u++,e.throwImmediately){if(e instanceof S)return e.value;throw e}if(e instanceof S&&!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 S({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 D(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 M,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 B}from"@reduxjs/toolkit";function H(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 de(e){var t;return null!=(t="arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)?t:e.requestId}function le(e,t,n){const r=e[de(t)];r&&n(r)}var fe={},pe=Symbol.for("RTKQ/skipToken"),ye=pe,me={status:e.uninitialized},he=M(me,(()=>{})),ge=M(me,(()=>{}));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 Oe}from"reselect";function Se(...e){return function(t){const n=Oe((e=>{var n,r;return null==(r=t.extractRehydrationInfo)?void 0:r.call(t,e,{reducerPath:null!=(n=t.reducerPath)?n:"api"})})),r=d(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(d(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:Oe((e=>null!=n(e)))},a={injectEndpoints:function(e){const t=e.endpoints({query:e=>d(c({},e),{type:A.query}),mutation:e=>d(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 we}from"@reduxjs/toolkit";var Te=({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 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 d(r,i){const o=i.getState(),c=o[t],d=a.util.selectInvalidatedBy(o,r);n.batch((()=>{var t;const n=Array.from(d.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)&&d(se(e,"invalidatesTags",r,o),t),a.util.invalidateTags.match(e)&&d(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=d(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 l=Date.now()+u,f=o[n]={nextPollTimestamp:l,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=d(a.currentSubscriptions[n]);if(!Number.isFinite(u))return void c(n);const l=o[n],f=Date.now()+u;(!l||f<l.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 d(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."),De=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:i})=>{const a=Ie(r),o=Ie(i),s=Ce(r,i),u={};function l(t,r,i,a,o){const s=n.endpointDefinitions[t],l=null==s?void 0:s.onCacheEntryAdded;if(!l)return;let f={};const p=new Promise((e=>{f.cacheEntryRemoved=e})),y=Promise.race([new Promise((e=>{f.valueResolved=e})),p.then((()=>{throw Pe}))]);y.catch((()=>{})),u[i]=f;const m=e.endpoints[t].select(s.type===A.query?r:i),h=a.dispatch(((e,t,n)=>n)),g=d(c({},a),{getCacheEntry:()=>m(a.getState()),requestId:o,extra:h,updateCachedData:s.type===A.query?n=>a.dispatch(e.util.updateQueryData(t,r,n)):void 0,cacheDataLoaded:y,cacheEntryRemoved:p}),v=l(r,g);Promise.resolve(v).catch((e=>{if(e!==Pe)throw e}))}return(n,c,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)?de(t.payload):""}(n);if(r.pending.match(n)){const e=d[t].queries[f],r=c.getState()[t].queries[f];!e&&r&&l(n.meta.arg.endpointName,n.meta.arg.originalArgs,f,c,n.meta.requestId)}else if(i.pending.match(n))c.getState()[t].mutations[f]&&l(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 Me,isRejected as Ne,isFulfilled as Ee}from"@reduxjs/toolkit";var Ke,Fe=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const i=Me(n,r),a=Ne(n,r),o=Ee(n,r),s={};return(n,r)=>{var u,l,f;if(i(n)){const{requestId:i,arg:{endpointName:a,originalArgs:o}}=n.meta,u=t.endpointDefinitions[a],l=null==u?void 0:u.onQueryStarted;if(l){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)),y=d(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});l(o,y)}}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!=(l=n.payload)?l: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:global):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},l){Le();const p=e=>e;Object.assign(t,{reducerPath:r,endpoints:{},internalActions:{onOnline:I,onOffline:C,onFocus:x,onFocusLost:Q},util:{}});const{queryThunk:y,mutationThunk:h,patchQueryData:g,updateQueryData:v,upsertQueryData:b,prefetch:q,buildMatchThunkActions:O}=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:d})=>{const l=r[e.endpointName];try{let r,a=oe;const f={signal:t,abort:i,dispatch:u,getState:c,extra:d,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():l.query?(r=await n(l.query(e.originalArgs),f,l.extraOptions),l.transformResponse&&(a=l.transformResponse)):r=await l.queryFn(e.originalArgs,f,l.extraOptions,(e=>n(e,f,l.extraOptions))),r.error)throw new S(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 S){let t=oe;l.query&&l.transformErrorResponse&&(t=l.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,d=null!=(o=e.forceRefetch)?o:e.subscribe&&u;return!!d&&(!0===d||(Number(new Date)-Number(c))/1e3>=d)}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],d=null==c?void 0:c.fulfilledTimeStamp,l=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:l,previousArg:f,endpointState:c,state:u})))&&d))},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:l,api:t,serializeQueryArgs:i}),{reducer:R,actions:w}=function({reducerPath:t,queryThunk:n,mutationThunk:r,context:{endpointDefinitions:i,apiUid:a,extractRehydrationInfo:o,hasRehydrationInfo:s},assertTagType:u,config:l}){const f=_(`${t}/resetApiState`),p=$({name:`${t}/queries`,initialState:fe,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t]},prepare:B()},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){let e=J(t.data,(e=>o(e,r)));t.data=e}else t.data=r;else t.data=null==(a=i[n.arg.endpointName].structuralSharing)||a?m(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)}))}}),y=$({name:`${t}/mutations`,initialState:fe,reducers:{removeMutationResult:{reducer(e,{payload:t}){const n=de(t);n in e&&delete e[n]},prepare:B()}},extraReducers(t){t.addCase(r.pending,((t,{meta:n,meta:{requestId:r,arg:i,startedTimeStamp:a}})=>{i.track&&(t[de(n)]={requestId:r,status:e.pending,endpointName:i.endpointName,startedTimeStamp:a})})).addCase(r.fulfilled,((t,{payload:n,meta:r})=>{r.arg.track&&le(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&&le(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},l),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:y.reducer,provided:h.reducer,subscriptions:v.reducer,config:b.reducer});return{reducer:(e,t)=>q(f.match(t)?void 0:e,t),actions:d(c(c(c(c(c({},b.actions),p.actions),g.actions),v.actions),y.actions),{unsubscribeMutationResult:y.actions.removeMutationResult,resetApiState:f})}}({context:l,queryThunk:y,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:w.resetApiState}),Ue(t.internalActions,w);const{middleware:T,actions:j}=function(t){const{reducerPath:n,queryThunk:r,api:i,context:a}=t,{apiUid:o}=a,s={invalidateTags:we(`${n}/invalidateTags`)},u=[ze,Te,xe,Qe,De,Fe];return{middleware:r=>{let s=!1;const f=d(c({},t),{internalState:{currentSubscriptions:{}},refetchQuery:l}),p=u.map((e=>e(f))),y=(({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,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!=(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!=(y=null!=(p=t.subscriptionOptions)?p:e[i])?y:{},!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==(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]}})(f),m=(({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,d=a.currentSubscriptions;n.batch((()=>{for(const t of Object.keys(d)){const n=c[t],a=d[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=d(c({},r),{next:e}),l=r.getState(),[f,h]=y(t,u,l);let g;if(g=f?e(t):h,r.getState()[n]&&(m(t,u,l),(e=>!!e&&"string"==typeof e.type&&e.type.startsWith(`${n}/`))(t)||a.hasRehydrationInfo(t)))for(let e of p)e(t,u,l);return g}},actions:s};function l(e,t,n={}){return r(c({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t},n))}}({reducerPath:r,context:l,queryThunk:y,mutationThunk:h,api:t,assertTagType:p});Ue(t.util,j),Ue(t,{reducer:R,middleware:T});const{buildQuerySelector:k,buildMutationSelector:P,selectInvalidatedBy:D}=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=de(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:D});const{buildInitiateQuery:M,buildInitiateMutation:K,getRunningMutationThunk:te,getRunningMutationsThunk:ye,getRunningQueriesThunk:me,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,[V]:p}={})=>(y,m)=>{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,[V]:p}),b=r.endpoints[n].select(u),q=y(v),O=b(m()),{requestId:S,abort:R}=q,w=O.requestId!==S,T=null==(h=a.get(y))?void 0:h[g],j=()=>b(m()),A=Object.assign(p?q.then(j):w&&!T?Promise.resolve(O):Promise.all([T,q]).then(j),{arg:u,requestId:S,subscriptionOptions:f,queryCacheKey:g,abort:R,async unwrap(){const e=await A;if(e.isError)throw e.error;return e.data},refetch:()=>y(o(u,{subscribe:!1,forceRefetch:!0})),unsubscribe(){d&&y(s({queryCacheKey:g,requestId:S}))},updateSubscriptionOptions(e){A.subscriptionOptions=e,y(c({endpointName:n,requestId:S,queryCacheKey:g,options:e}))}});if(!T&&!w&&!p){const e=a.get(y)||{};e[g]=A,a.set(y,e),A.then((()=>{delete e[g],Object.keys(e).length||a.delete(y)}))}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}),d=a(c),{requestId:l,abort:f,unwrap:p}=d,y=d.unwrap().then((e=>({data:e}))).catch((e=>({error:e}))),m=()=>{a(u({requestId:l,fixedCacheKey:i}))},h=Object.assign(y,{arg:d.arg,requestId:l,abort:f,unwrap:p,unsubscribe:m,reset:m}),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(H)},getRunningMutationsThunk:function(){return e=>Object.values(o.get(e)||{}).filter(H)},getRunningOperationPromises:function(){{const e=e=>Array.from(e.values()).flatMap((e=>e?Object.values(e):[]));return[...e(a),...e(o)].filter(H)}},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:y,mutationThunk:h,api:t,serializeQueryArgs:i,context:l});return Ue(t.util,{getRunningOperationPromises:be,getRunningOperationPromise:qe,getRunningMutationThunk:te,getRunningMutationsThunk:ye,getRunningQueryThunk:ve,getRunningQueriesThunk:me}),{name:We,injectEndpoint(e,n){var r;const i=t;null!=(r=i.endpoints)[e]||(r[e]={}),E(n)?Ue(i.endpoints[e],{select:k(e,n),initiate:M(e,n)},O(y,e)):n.type===A.mutation&&Ue(i.endpoints[e],{select:P(),initiate:K(e)},O(h,e))}}}}),Be=Se(Je());export{e as QueryStatus,Se as buildCreateApi,m as copyWithStructuralSharing,Je as coreModule,Be as createApi,be as defaultSerializeQueryArgs,Re as fakeBaseQuery,O as fetchBaseQuery,T as retry,D as setupListeners,ye as skipSelector,pe as skipToken};
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};
//# sourceMappingURL=rtk-query.modern.production.min.js.map

@@ -7,3 +7,3 @@ (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,v=new Promise((function(e,t){return p.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:l||"Aborted"})}))})),h=!1;function g(e){h&&(l=e,p.abort());}var m=function(){return y(this,null,(function(){var o,l,y,m,b;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),null===(O=m=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,m];case 1:m=i.sent(),i.label=2;case 2:if(!1===m)throw {name:"ConditionError",message:"Aborted due to condition callback returning false."};return h=!0,c(u(d,e,null==(l=null==n?void 0:n.getPendingMeta)?void 0:l.call(n,{requestId:d,arg:e},{getState:s,extra:f}))),[4,Promise.race([v,Promise.resolve(t(e,{dispatch:c,getState:s,extra:f,requestId:d,signal:p.signal,abort:g,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(m,{abort:g,requestId:d,arg:e,unwrap:function(){return m.then(Me)}})}}),{pending:u,rejected:a,fulfilled:r,typePrefix:e})}return e.withTypes=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:global),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(Boolean),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:global):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=ge(e.data,(function(e){return u(e,i)}));e.data=o;}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],{select:U(t,n),initiate:B(t,n)},D(m,t)):n.type===rt.mutation&&Ut(i.endpoints[t],{select:W(),initiate:J(t)},D(R,t));}}}}},Bt=It(Lt());
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());

@@ -10,0 +10,0 @@ exports.buildCreateApi = It;

@@ -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 Fe},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,v=new Promise((function(e,n){return p.signal.addEventListener("abort",(function(){return n({name:"AbortError",message:s||"Aborted"})}))})),h=!1;function y(e){h&&(s=e,p.abort())}var g=function(){return w(this,null,(function(){var a,s,g,b,m;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,4,,5]),null===(w=b=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,b];case 1:b=t.sent(),t.label=2;case 2:if(!1===b)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return h=!0,c(o(d,e,null==(s=null==r?void 0:r.getPendingMeta)?void 0:s.call(r,{requestId:d,arg:e},{getState:f,extra:l}))),[4,Promise.race([v,Promise.resolve(n(e,{dispatch:c,getState:f,extra:l,requestId:d,signal:p.signal,abort:y,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 g=t.sent(),[3,5];case 4:return m=t.sent(),g=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(g)&&g.meta.condition||c(g),[2,g]}var w}))}))}();return Object.assign(g,{abort:y,requestId:d,arg:e,unwrap:function(){return g.then(ce)}})}}),{pending:o,rejected:u,fulfilled:i,typePrefix:e})}return e.withTypes=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:global):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=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?requestAnimationFrame:"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)();
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)();
//# 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 K(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 F(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 K(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;const p=new Promise(((e,t)=>f.signal.addEventListener("abort",(()=>t({name:"AbortError",message:d||"Aborted"})))));let m=!1;function y(e){m&&(d=e,f.abort())}const h=async function(){var a,d;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)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};m=!0,c(o(l,e,null==(d=null==n?void 0:n.getPendingMeta)?void 0:d.call(n,{requestId:l,arg:e},{getState:s,extra:u}))),h=await Promise.race([p,Promise.resolve(t(e,{dispatch:c,getState:s,extra:u,requestId:l,signal:f.signal,abort:y,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(h,{abort:y,requestId:l,arg:e,unwrap:()=>h.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:global):e=>(Ve||(Ve=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0))),Ue=(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?requestAnimationFrame:"callback"===e.type?e.queueNotification:(u=e.timeout,e=>{setTimeout(e,u)});var u;const l=()=>{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(l))),r.dispatch(e)}finally{o=!0}}})};u();export{_ as MiddlewareArray,Xe as SHOULD_AUTOBATCH,Ae as TaskAbortError,De as addListener,Ue 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,K as createReducer,y as createSelector,R as createSerializableStateInvariantMiddleware,F 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=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};
//# sourceMappingURL=redux-toolkit.modern.production.min.js.map

@@ -7,3 +7,3 @@ (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 N(t){var e=ut[t];return e||h(18,t),e}function T(){return n}function C(t,e){e&&(N("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||N("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&&N("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&&N("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)?N("MapSet").N(e,n):S(e)?N("MapSet").T(e,n):t.g?function(t,e){var n=Array.isArray(t),r={i:n?1:0,A:e?e.A:T(),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):N("ES5").J(e,n);return (n?n.A:T()).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||!N("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=[];N("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=N("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),Nt=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},Tt="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=Tt(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=Nt(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=Nt(e,(function(t){return t.length}));if(!t)return {selectIds:e,selectEntities:n,selectAll:r,selectTotal:u,selectById:Nt(n,o,i)};var c=Nt(t,n);return {selectIds:Nt(t,e),selectEntities:c,selectAll:Nt(t,r),selectTotal:Nt(t,u),selectById:Nt(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,v=new Promise((function(t,e){return p.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:s||"Aborted"})}))})),h=!1;function g(t){h&&(s=t,p.abort());}var b=function(){return y(this,null,(function(){var c,s,y,b,m;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,4,,5]),null===(w=b=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,b];case 1:b=o.sent(),o.label=2;case 2:if(!1===b)throw {name:"ConditionError",message:"Aborted due to condition callback returning false."};return h=!0,a(i(d,t,null==(s=null==n?void 0:n.getPendingMeta)?void 0:s.call(n,{requestId:d,arg:t},{getState:f,extra:l}))),[4,Promise.race([v,Promise.resolve(e(t,{dispatch:a,getState:f,extra:l,requestId:d,signal:p.signal,abort:g,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 y=o.sent(),[3,5];case 4:return m=o.sent(),y=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(y)&&y.meta.condition||a(y),[2,y]}var w;}))}))}();return Object.assign(b,{abort:g,requestId:d,arg:t,unwrap:function(){return b.then(se)}})}}),{pending:i,rejected:u,fulfilled:r,typePrefix:t})}return t.withTypes=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)})))}},Ne=Object.assign,Te={},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,Ne({},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===Te)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=Te;}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:global):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=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?requestAnimationFrame:"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:T(),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 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)}});}();

@@ -16,3 +16,3 @@ exports.MiddlewareArray = Ft;

exports.applyMiddleware = St;
exports.autoBatchEnhancer = Je;
exports.autoBatchEnhancer = $e;
exports.bindActionCreators = Et;

@@ -25,3 +25,3 @@ exports.clearAllListeners = Fe;

exports.createAsyncThunk = le;
exports.createDraftSafeSelector = Nt;
exports.createDraftSafeSelector = Tt;
exports.createEntityAdapter = oe;

@@ -28,0 +28,0 @@ exports.createImmutableStateInvariantMiddleware = Yt;

{
"name": "@reduxjs/toolkit",
"version": "1.9.0",
"version": "1.9.1",
"description": "The official, opinionated, batteries-included toolset for efficient Redux development",

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

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

typeof queueMicrotask === 'function'
? queueMicrotask.bind(typeof window !== 'undefined' ? window : global)
? queueMicrotask.bind(
typeof window !== 'undefined'
? window
: typeof global !== 'undefined'
? global
: globalThis
)
: // reuse resolved promise, and allocate it lazily

@@ -27,2 +33,15 @@ (cb: () => void) =>

const createQueueWithTimer = (timeout: number) => {
return (notify: () => void) => {
setTimeout(notify, timeout)
}
}
// requestAnimationFrame won't exist in SSR environments.
// Fall back to a vague approximation just to keep from erroring.
const rAF =
typeof window !== 'undefined' && window.requestAnimationFrame
? window.requestAnimationFrame
: createQueueWithTimer(10)
export type AutoBatchOptions =

@@ -34,8 +53,2 @@ | { type: 'tick' }

const createQueueWithTimer = (timeout: number) => {
return (notify: () => void) => {
setTimeout(notify, timeout)
}
}
/**

@@ -79,3 +92,3 @@ * A Redux store enhancer that watches for "low-priority" actions, and delays

: options.type === 'raf'
? requestAnimationFrame
? rAF
: options.type === 'callback'

@@ -82,0 +95,0 @@ ? options.queueNotification

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

*/
(): PayloadAction<undefined, T>
(noArgument: void): PayloadAction<undefined, T>
}

@@ -150,0 +150,0 @@

@@ -38,6 +38,4 @@ import type { Dispatch, AnyAction } from 'redux'

FulfilledMeta,
<FulfilledValue>(value: FulfilledValue) => FulfilledValue,
<FulfilledValue>(
value: FulfilledValue
) => FulfillWithMeta<FulfilledValue, FulfilledMeta>,
<FulfilledValue>(
value: FulfilledValue,

@@ -596,14 +594,6 @@ meta: FulfilledMeta

const abortedPromise = new Promise<never>((_, reject) =>
abortController.signal.addEventListener('abort', () =>
reject({ name: 'AbortError', message: abortReason || 'Aborted' })
)
)
let started = false
function abort(reason?: string) {
if (started) {
abortReason = reason
abortController.abort()
}
abortReason = reason
abortController.abort()
}

@@ -618,3 +608,4 @@

}
if (conditionResult === false) {
if (conditionResult === false || abortController.signal.aborted) {
// eslint-disable-next-line no-throw-literal

@@ -627,2 +618,11 @@ throw {

started = true
const abortedPromise = new Promise<never>((_, reject) =>
abortController.signal.addEventListener('abort', () =>
reject({
name: 'AbortError',
message: abortReason || 'Aborted',
})
)
)
dispatch(

@@ -715,3 +715,3 @@ pending(

}
createAsyncThunk.withTypes = createAsyncThunk as unknown
createAsyncThunk.withTypes = () => createAsyncThunk

@@ -718,0 +718,0 @@ return createAsyncThunk as CreateAsyncThunk<AsyncThunkConfig>

@@ -15,3 +15,9 @@ import type { QueryThunk, RejectedAction } from '../buildThunks'

typeof queueMicrotask === 'function'
? queueMicrotask.bind(typeof window !== 'undefined' ? window : global)
? queueMicrotask.bind(
typeof window !== 'undefined'
? window
: typeof global !== 'undefined'
? global
: globalThis
)
: // reuse resolved promise, and allocate it lazily

@@ -18,0 +24,0 @@ (cb: () => void) =>

@@ -184,2 +184,4 @@ import type { AnyAction, PayloadAction } from '@reduxjs/toolkit'

if (substate.data !== undefined) {
const { fulfilledTimeStamp, arg, baseQueryMeta, requestId } =
meta
// There's existing cache data. Let the user merge it in themselves.

@@ -193,3 +195,8 @@ // We're already inside an Immer-powered reducer, and the user could just mutate `substate.data`

// As usual with Immer, you can mutate _or_ return inside here, but not both
return merge(draftSubstateData, payload)
return merge(draftSubstateData, payload, {
arg: arg.originalArgs,
baseQueryMeta,
fulfilledTimeStamp,
requestId,
})
}

@@ -196,0 +203,0 @@ )

@@ -415,2 +415,3 @@ /**

> {
name: string
/**

@@ -429,2 +430,3 @@ * All of these are `undefined` at runtime, purely to be used in TypeScript declarations!

> {
name: string
/**

@@ -608,2 +610,3 @@ * All of these are `undefined` at runtime, purely to be used in TypeScript declarations!

{
name: endpointName,
select: buildQuerySelector(endpointName, definition),

@@ -618,2 +621,3 @@ initiate: buildInitiateQuery(endpointName, definition),

{
name: endpointName,
select: buildMutationSelector(),

@@ -620,0 +624,0 @@ initiate: buildInitiateMutation(endpointName),

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

currentCacheData: ResultType,
responseData: ResultType
responseData: ResultType,
otherArgs: {
arg: QueryArg
baseQueryMeta: BaseQueryMeta<BaseQuery>
requestId: string
fulfilledTimeStamp: number
}
): ResultType | void

@@ -451,0 +457,0 @@

@@ -13,2 +13,3 @@ export { QueryStatus } from './core/apiState'

MutationDefinition,
TagDescription,
} from './endpointDefinitions'

@@ -15,0 +16,0 @@ export { fetchBaseQuery } from './fetchBaseQuery'

@@ -86,3 +86,3 @@ import type {

((extraOptions as any) || EMPTY_OPTIONS).maxRetries,
].filter(Boolean)
].filter(x => x !== undefined)
const [maxRetries] = possibleMaxRetries.slice(-1)

@@ -89,0 +89,0 @@

@@ -21,2 +21,3 @@ import { configureStore, createAction, createReducer } from '@reduxjs/toolkit'

import { SerializeQueryArgs } from '../defaultSerializeQueryArgs'
import { string } from 'yargs'

@@ -38,2 +39,7 @@ const originalEnv = process.env.NODE_ENV

function paginate<T>(array: T[], page_size: number, page_number: number) {
// human-readable page numbers usually start with 1, so we reduce 1 in the first argument
return array.slice((page_number - 1) * page_size, page_number * page_size)
}
test('sensible defaults', () => {

@@ -48,2 +54,5 @@ const api = createApi({

}),
updateUser: build.mutation<unknown, void>({
query: () => '',
}),
}),

@@ -66,2 +75,5 @@ })

expectType<TagTypes>(0)
expect(api.endpoints.getUser.name).toBe('getUser')
expect(api.endpoints.updateUser.name).toBe('updateUser')
})

@@ -923,2 +935,18 @@

}),
listItems2: build.query<{ items: string[]; meta?: any }, number>({
query: (pageNumber) => `/listItems2?page=${pageNumber}`,
serializeQueryArgs: ({ endpointName }) => {
return endpointName
},
transformResponse(items: string[]) {
return { items }
},
merge: (currentCache, newData, meta) => {
currentCache.items.push(...newData.items)
currentCache.meta = meta
},
forceRefetch({ currentArg, previousArg }) {
return currentArg !== previousArg
},
}),
}),

@@ -1011,7 +1039,2 @@ })

function paginate<T>(array: T[], page_size: number, page_number: number) {
// human-readable page numbers usually start with 1, so we reduce 1 in the first argument
return array.slice((page_number - 1) * page_size, page_number * page_size)
}
server.use(

@@ -1040,2 +1063,31 @@ rest.get('https://example.com/listItems', (req, res, ctx) => {

})
test('merge receives a meta object as an argument', async () => {
const allItems = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'i']
const PAGE_SIZE = 3
server.use(
rest.get('https://example.com/listItems2', (req, res, ctx) => {
const pageString = req.url.searchParams.get('page')
const pageNum = parseInt(pageString || '0')
const results = paginate(allItems, PAGE_SIZE, pageNum)
return res(ctx.json(results))
})
)
const selectListItems = api.endpoints.listItems2.select(0)
await storeRef.store.dispatch(api.endpoints.listItems2.initiate(1))
await storeRef.store.dispatch(api.endpoints.listItems2.initiate(2))
const cacheEntry = selectListItems(storeRef.store.getState())
// Should have passed along the third arg from `merge` containing these fields
expect(cacheEntry.data?.meta).toEqual({
requestId: expect.any(String),
fulfilledTimeStamp: expect.any(Number),
arg: 2,
baseQueryMeta: expect.any(Object),
})
})
})

@@ -442,2 +442,29 @@ import type { BaseQueryFn } from '@reduxjs/toolkit/query'

test('Specifying maxRetries as 0 in RetryOptions prevents retries', async () => {
const baseBaseQuery = jest.fn<
ReturnType<BaseQueryFn>,
Parameters<BaseQueryFn>
>()
baseBaseQuery.mockResolvedValue({ error: 'rejected' })
const baseQuery = retry(baseBaseQuery, { maxRetries: 0 })
const api = createApi({
baseQuery,
endpoints: (build) => ({
q1: build.query({
query: () => {},
}),
}),
})
const storeRef = setupApiStore(api, undefined, {
withoutTestLifecycles: true,
})
storeRef.store.dispatch(api.endpoints.q1.initiate({}))
await loopTimers(2)
expect(baseBaseQuery).toHaveBeenCalledTimes(1)
});
test.skip('RetryOptions only accepts one of maxRetries or retryCondition', () => {

@@ -444,0 +471,0 @@ // @ts-expect-error Should complain if both exist at once

@@ -16,2 +16,3 @@ import type { AnyAction } from '@reduxjs/toolkit'

import { expectType } from './helpers'
import { delay } from '../utils'

@@ -625,2 +626,17 @@ declare global {

test('async condition with AbortController signal first', async () => {
const condition = async () => {
await delay(25)
return true
}
const asyncThunk = createAsyncThunk('test', payloadCreator, { condition })
try {
const thunkPromise = asyncThunk(arg)(dispatch, getState, extra)
thunkPromise.abort()
await thunkPromise
} catch (err) {}
expect(dispatch).toHaveBeenCalledTimes(0)
})
test('rejected action is not dispatched by default', async () => {

@@ -635,3 +651,3 @@ const asyncThunk = createAsyncThunk('test', payloadCreator, { condition })

const asyncPayloadCreator = jest.fn(async (x: typeof arg) => {
await new Promise((resolve) => setTimeout(resolve, 2000))
await delay(200)
return 10

@@ -959,2 +975,16 @@ })

})
test('typed createAsyncThunk.withTypes', () => {
const typedCAT = createAsyncThunk.withTypes<{
state: { s: string }
rejectValue: string
extra: { s: string; n: number }
}>()
const thunk = typedCAT('a', () => 'b')
const expectFunction = expect.any(Function)
expect(thunk.fulfilled).toEqual(expectFunction)
expect(thunk.pending).toEqual(expectFunction)
expect(thunk.rejected).toEqual(expectFunction)
expect(thunk.fulfilled.type).toBe('a/fulfilled')
})
})

@@ -528,2 +528,34 @@ /* eslint-disable no-lone-blocks */

{
// https://github.com/reduxjs/redux-toolkit/issues/2886
// fulfillWithValue should infer return value
const initialState = {
loading: false,
obj: { magic: '' },
}
const getObj = createAsyncThunk(
'slice/getObj',
async (_: any, { fulfillWithValue, rejectWithValue }) => {
try {
return fulfillWithValue({ magic: 'object' })
} catch (rejected: any) {
return rejectWithValue(rejected?.response?.error || rejected)
}
}
)
createSlice({
name: 'slice',
initialState,
reducers: {},
extraReducers: (builder) => {
builder.addCase(getObj.fulfilled, (state, action) => {
expectExactType<{ magic: string }>(ANY)(action.payload)
})
},
})
}
// meta return values

@@ -625,4 +657,4 @@ {

const { s, n } = api.extra
expectExactType<string>(s)
expectExactType<number>(n)
expectExactType<string>(ANY)(s)
expectExactType<number>(ANY)(n)

@@ -651,4 +683,4 @@ if (1 < 2)

const { s, n } = api.extra
expectExactType<string>(s)
expectExactType<number>(n)
expectExactType<string>(ANY)(s)
expectExactType<number>(ANY)(n)

@@ -679,4 +711,4 @@ if (1 < 2)

const { s, n } = api.extra
expectExactType<string>(s)
expectExactType<number>(n)
expectExactType<string>(ANY)(s)
expectExactType<number>(ANY)(n)
if (1 < 2) return api.rejectWithValue(5)

@@ -683,0 +715,0 @@ if (1 < 2)

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 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 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 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