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.8.5 to 1.8.6

2

dist/index.d.ts

@@ -7,3 +7,3 @@ export * from 'redux';

export { createDraftSafeSelector } from './createDraftSafeSelector';
export type { ThunkAction, ThunkDispatch } from 'redux-thunk';
export type { ThunkAction, ThunkDispatch, ThunkMiddleware } from 'redux-thunk';
export { configureStore, } from './configureStore';

@@ -10,0 +10,0 @@ export type { ConfigureEnhancersCallback, ConfigureStoreOptions, EnhancedStore, } from './configureStore';

@@ -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 de},copyWithStructuralSharing:function(){return S},coreModule:function(){return ke},createApi:function(){return Pe},fakeBaseQuery:function(){return fe},fetchBaseQuery:function(){return k},retry:function(){return I},setupListeners:function(){return F},skipSelector:function(){return re},skipToken:function(){return ne}}),(t=e||(e={})).uninitialized="uninitialized",t.pending="pending",t.fulfilled="fulfilled",t.rejected="rejected";var O=function(e){return[].concat.apply([],e)},j=b(require("@reduxjs/toolkit")).isPlainObject;function S(e,t){if(e===t||!(j(e)&&j(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]=S(e[c],t[c]),i&&(i=e[c]===a[c])}return i?e:a}var w=b(require("@reduxjs/toolkit")),A=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return fetch.apply(void 0,e)},R=function(e){return e.status>=200&&e.status<=299},x=function(e,t){return q(void 0,null,(function(){var r;return n(this,(function(n){switch(n.label){case 0:return"function"==typeof t?[2,t(e)]:"text"===t?[2,e.text()]:"json"!==t?[3,2]:[4,e.text()];case 1:return[2,(r=n.sent()).length?JSON.parse(r):null];case 2:return[2]}}))}))};function T(e){if(!(0,w.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 k(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?A:u,c=e.paramsSerializer,s=g(e,["baseUrl","prepareHeaders","fetchFn","paramsSerializer"]);return"undefined"==typeof fetch&&o===A&&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,l,d,f,p,h,m,b,q,O,j,S,A,k,P,C,I,Q,D,N,M,K,E,F,_,z,L,U,W,B,H,V,J,G,Y;return n(this,(function(n){switch(n.label){case 0:return t=i.signal,u=i.getState,l=i.extra,d=i.endpoint,f=i.forced,p=i.type,b=(m="string"==typeof e?{url:e}:e).url,O=void 0===(q=m.method)?"GET":q,S=void 0===(j=m.headers)?new Headers({}):j,k=void 0===(A=m.body)?void 0:A,C=void 0===(P=m.params)?void 0:P,Q=void 0===(I=m.responseHandler)?"json":I,N=void 0===(D=m.validateStatus)?R:D,M=g(m,["url","method","headers","body","params","responseHandler","validateStatus"]),K=v(y(v({},s),{method:O,signal:t,body:k}),M),E=K,[4,a(new Headers(T(S)),{getState:u,extra:l,endpoint:d,forced:f,type:p})];case 1:E.headers=n.sent(),F=function(e){return"object"==typeof e&&((0,w.isPlainObject)(e)||Array.isArray(e)||"function"==typeof e.toJSON)},!K.headers.has("content-type")&&F(k)&&K.headers.set("content-type","application/json"),F(k)&&function(e){var t,n;return null==(n=null==(t=e.get("content-type"))?void 0:t.trim())?void 0:n.startsWith("application/json")}(K.headers)&&(K.body=JSON.stringify(k)),C&&(_=~b.indexOf("?")?"&":"?",z=c?c(C):new URLSearchParams(T(C)),b+=_+z),b=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,b),L=new Request(b,K),U=L.clone(),h={request:U},n.label=2;case 2:return n.trys.push([2,4,,5]),[4,o(L)];case 3:return W=n.sent(),[3,5];case 4:return B=n.sent(),[2,{error:{status:"FETCH_ERROR",error:String(B)},meta:h}];case 5:H=W.clone(),h.response=H,J="",n.label=6;case 6:return n.trys.push([6,8,,9]),[4,Promise.all([x(W,Q).then((function(e){return V=e}),(function(e){return G=e})),H.text().then((function(e){return J=e}),(function(){}))])];case 7:if(n.sent(),G)throw G;return[3,9];case 8:return Y=n.sent(),[2,{error:{status:"PARSING_ERROR",originalStatus:W.status,data:J,error:String(Y)},meta:h}];case 9:return[2,N(W,V)?{data:V,meta:h}:{error:{status:W.status,data:V},meta:h}]}}))}))}}var P=function(e,t){void 0===t&&(t=void 0),this.value=e,this.meta=t};function C(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 I=Object.assign((function(e,t){return function(r,i,a){return q(void 0,null,(function(){var u,o,c,s;return n(this,(function(n){switch(n.label){case 0:u=v(v({maxRetries:5,backoff:C},t),a),o=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((c=n.sent()).error)throw new P(c);return[2,c];case 4:if(s=n.sent(),o++,s.throwImmediately||o>u.maxRetries){if(s instanceof P)return[2,s.value];throw s}return[4,u.backoff(o,u.maxRetries)];case 5:return n.sent(),[3,6];case 6:return[3,1];case 7:return[2]}}))}))}}),{fail:function(e){throw Object.assign(new P({error:e}),{throwImmediately:!0})}}),Q=b(require("@reduxjs/toolkit")),D=(0,Q.createAction)("__rtkq/focused"),N=(0,Q.createAction)("__rtkq/unfocused"),M=(0,Q.createAction)("__rtkq/online"),K=(0,Q.createAction)("__rtkq/offline"),E=!1;function F(e,t){return t?t(e,{onFocus:D,onFocusLost:N,onOffline:K,onOnline:M}):(n=function(){return e(D())},r=function(){return e(M())},i=function(){return e(K())},a=function(){"visible"===window.document.visibilityState?n():e(N())},E||"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),E=!0),function(){window.removeEventListener("focus",n),window.removeEventListener("visibilitychange",a),window.removeEventListener("online",r),window.removeEventListener("offline",i),E=!1});var n,r,i,a}var _,z,L=b(require("@reduxjs/toolkit"));function U(e,t,n,r,i,a){return"function"==typeof e?e(t,n,r,i).map(W).map(a):Array.isArray(e)?e.map(W).map(a):[]}function W(e){return"string"==typeof e?{type:e}:e}(z=_||(_={})).query="query",z.mutation="mutation";var B=b(require("@reduxjs/toolkit")),H=b(require("@reduxjs/toolkit")),V=b(require("immer")),J=b(require("@reduxjs/toolkit"));function G(e){return e}function Y(e,t,n,r){return U(n[e.meta.arg.endpointName][t],(0,H.isFulfilled)(e)?e.payload:void 0,(0,H.isRejectedWithValue)(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}var $=b(require("immer"));function X(e,t,n){var r=e[t];r&&n(r)}function Z(e){var t;return null!=(t="arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)?t:e.requestId}function ee(e,t,n){var r=e[Z(t)];r&&n(r)}var te={},ne=Symbol.for("RTKQ/skipToken"),re=ne,ie={status:e.uninitialized},ae=(0,L.createNextState)(ie,(function(){})),ue=(0,L.createNextState)(ie,(function(){})),oe=b(require("@reduxjs/toolkit")),ce=function(e){return e.endpointName+"("+JSON.stringify(e.queryArgs,(function(e,t){return(0,oe.isPlainObject)(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}))+")"},se=b(require("@reduxjs/toolkit")),le=b(require("reselect"));function de(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var n=(0,le.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",serializeQueryArgs:ce,keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1},t),{extractRehydrationInfo:n,tagTypes:r([],t.tagTypes||[])}),a={endpointDefinitions:{},batch:function(e){e()},apiUid:(0,se.nanoid)(),extractRehydrationInfo:n,hasRehydrationInfo:(0,le.defaultMemoize)((function(e){return null!=n(e)}))},u={injectEndpoints:function(e){for(var t=e.endpoints({query:function(e){return y(v({},e),{type:_.query})},mutation:function(e){return y(v({},e),{type:_.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 fe(){return function(){throw new Error("When using `fakeBaseQuery`, all queries & mutations must use the `queryFn` definition syntax.")}}var pe=b(require("redux")),he=b(require("@reduxjs/toolkit")),ve=function(e){var t=e.reducerPath,n=e.api,r=e.context,i=n.internalActions,a=i.removeQueryResult,u=i.unsubscribeQueryResult;return function(e){var i={};return function(a){return function(c){var s,l=a(c);if(u.match(c)){var d=e.getState()[t];o(q=c.payload.queryCacheKey,null==(s=d.queries[q])?void 0:s.endpointName,e,d.config)}if(n.util.resetApiState.match(c))for(var f=0,p=Object.entries(i);f<p.length;f++){var h=p[f],v=h[0],y=h[1];y&&clearTimeout(y),delete i[v]}if(r.hasRehydrationInfo(c)){d=e.getState()[t];for(var m=r.extractRehydrationInfo(c).queries,g=0,b=Object.entries(m);g<b.length;g++){var q,O=b[g],j=O[1];o(q=O[0],null==j?void 0:j.endpointName,e,d.config)}}return l}};function o(e,n,u,o){var c,s=r.endpointDefinitions[n],l=null!=(c=null==s?void 0:s.keepUnusedDataFor)?c:o.keepUnusedDataFor,d=Math.max(0,Math.min(l,2147482.647)),f=i[e];f&&clearTimeout(f),i[e]=setTimeout((function(){var n=u.getState()[t].subscriptions[e];n&&0!==Object.keys(n).length||u.dispatch(a({queryCacheKey:e})),delete i[e]}),1e3*d)}}},ye=b(require("@reduxjs/toolkit")),me=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;return function(e){return function(t){return function(n){var r=t(n);return(0,ye.isAnyOf)((0,ye.isFulfilled)(a),(0,ye.isRejectedWithValue)(a))(n)&&l(Y(n,"invalidatesTags",i,o),e),u.util.invalidateTags.match(n)&&l(U(n.payload,void 0,void 0,void 0,void 0,o),e),r}}};function l(t,i){var a=i.getState(),o=a[n],l=u.util.selectInvalidatedBy(a,t);r.batch((function(){for(var t=0,n=Array.from(l.values());t<n.length;t++){var r=n[t].queryCacheKey,a=o.queries[r],u=o.subscriptions[r];a&&u&&(0===Object.keys(u).length?i.dispatch(s({queryCacheKey:r})):a.status!==e.uninitialized&&i.dispatch(c(a,r)))}}))}},ge=function(t){var n=t.reducerPath,r=t.queryThunk,i=t.api,a=t.refetchQuery;return function(t){var o={};return function(e){return function(n){var a=e(n);return(i.internalActions.updateSubscriptionOptions.match(n)||i.internalActions.unsubscribeQueryResult.match(n))&&s(n.payload,t),(r.pending.match(n)||r.rejected.match(n)&&n.meta.condition)&&s(n.meta.arg,t),(r.fulfilled.match(n)||r.rejected.match(n)&&!n.meta.condition)&&c(n.meta.arg,t),i.util.resetApiState.match(n)&&function(){for(var e=0,t=Object.keys(o);e<t.length;e++)l(t[e])}(),a}};function c(t,r){var i=t.queryCacheKey,c=r.getState()[n],s=c.queries[i];if(s&&s.status!==e.uninitialized){var l=u(c.subscriptions[i]);if(Number.isFinite(l)){var d=o[i];(null==d?void 0:d.timeout)&&(clearTimeout(d.timeout),d.timeout=void 0);var f=Date.now()+l,p=o[i]={nextPollTimestamp:f,pollingInterval:l,timeout:setTimeout((function(){p.timeout=void 0,r.dispatch(a(s,i))}),l)}}}}function s(t,r){var i=t.queryCacheKey,a=r.getState()[n],s=a.queries[i];if(s&&s.status!==e.uninitialized){var d=u(a.subscriptions[i]);if(Number.isFinite(d)){var f=o[i],p=Date.now()+d;(!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 u(e){void 0===e&&(e={});for(var t=Number.POSITIVE_INFINITY,n=0,r=Object.values(e);n<r.length;n++){var i=r[n];i.pollingInterval&&(t=Math.min(i.pollingInterval,t))}return t}},be=function(t){var n=t.reducerPath,r=t.context,i=t.refetchQuery,a=t.api.internalActions.removeQueryResult;return function(e){return function(t){return function(n){var r=t(n);return D.match(n)&&u(e,"refetchOnFocus"),M.match(n)&&u(e,"refetchOnReconnect"),r}}};function u(t,u){var o=t.getState()[n],c=o.queries,s=o.subscriptions;r.batch((function(){for(var n=0,r=Object.keys(s);n<r.length;n++){var l=r[n],d=c[l],f=s[l];f&&d&&(Object.values(f).some((function(e){return!0===e[u]}))||Object.values(f).every((function(e){return void 0===e[u]}))&&o.config[u])&&(0===Object.keys(f).length?t.dispatch(a({queryCacheKey:l})):d.status!==e.uninitialized&&t.dispatch(i(d,l)))}}))}},qe=b(require("@reduxjs/toolkit")),Oe=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,qe.isAsyncThunkAction)(i),o=(0,qe.isAsyncThunkAction)(a),c=(0,qe.isFulfilled)(i,a);return function(e){var s={};return function(r){return function(d){var f=e.getState(),p=r(d),h=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)?Z(e.payload):""}(d);if(i.pending.match(d)){var v=f[n].queries[h],y=e.getState()[n].queries[h];!v&&y&&l(d.meta.arg.endpointName,d.meta.arg.originalArgs,h,e,d.meta.requestId)}else if(a.pending.match(d))(y=e.getState()[n].mutations[h])&&l(d.meta.arg.endpointName,d.meta.arg.originalArgs,h,e,d.meta.requestId);else if(c(d))(null==(q=s[h])?void 0:q.valueResolved)&&(q.valueResolved({data:d.payload,meta:d.meta.baseQueryMeta}),delete q.valueResolved);else if(t.internalActions.removeQueryResult.match(d)||t.internalActions.removeMutationResult.match(d))(q=s[h])&&(delete s[h],q.cacheEntryRemoved());else if(t.util.resetApiState.match(d))for(var m=0,g=Object.entries(s);m<g.length;m++){var b=g[m],q=b[1];delete s[b[0]],q.cacheEntryRemoved()}return p}};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 Oe}))]);f.catch((function(){})),s[i]=l;var p=t.endpoints[e].select(o.type===_.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===_.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!==Oe)throw e}))}}}},Se=b(require("@reduxjs/toolkit")),we=function(e){var t=e.api,n=e.context,r=e.queryThunk,i=e.mutationThunk,a=(0,Se.isPending)(r,i),u=(0,Se.isRejected)(r,i),o=(0,Se.isFulfilled)(r,i);return function(e){var r={};return function(i){return function(c){var s,l,d,f=i(c);if(a(c)){var p=c.meta,h=p.requestId,m=p.arg,g=m.endpointName,b=m.originalArgs,q=n.endpointDefinitions[g],O=null==q?void 0:q.onQueryStarted;if(O){var j={},S=new Promise((function(e,t){j.resolve=e,j.reject=t}));S.catch((function(){})),r[h]=j;var w=t.endpoints[g].select(q.type===_.query?b:h),A=e.dispatch((function(e,t,n){return n})),R=y(v({},e),{getCacheEntry:function(){return w(e.getState())},requestId:h,extra:A,updateCachedData:q.type===_.query?function(n){return e.dispatch(t.util.updateQueryData(g,b,n))}:void 0,queryFulfilled:S});O(b,R)}}else if(o(c)){var x=c.meta,T=x.baseQueryMeta;null==(s=r[h=x.requestId])||s.resolve({data:c.payload,meta:T}),delete r[h]}else if(u(c)){var k=c.meta;T=k.baseQueryMeta,null==(d=r[h=k.requestId])||d.reject({error:null!=(l=c.payload)?l:c.error,isUnhandledError:!k.rejectedWithValue,meta:T}),delete r[h]}return f}}}},Ae=function(e){var t=e.api,n=e.context.apiUid;return function(e){var r=!1;return function(i){return function(a){r||(r=!0,e.dispatch(t.internalActions.middlewareRegistered(n)));var u=i(a);return t.util.resetApiState.match(a)&&e.dispatch(t.internalActions.middlewareRegistered(n)),u}}}};function Re(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Object.assign.apply(Object,r([e],t))}var xe=b(require("immer")),Te=Symbol(),ke=function(){return{name:Te,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,xe.enablePatches)();var p=function(e){return e};Object.assign(t,{reducerPath:o,endpoints:{},internalActions:{onOnline:M,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=t.signal,p=t.rejectWithValue,h=t.fulfillWithValue,v=t.dispatch,y=t.getState,m=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,7,,8]),i=G,o=void 0,c={signal:f,dispatch:v,getState:y,extra:m,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?l(e,y()):void 0},r.query?[4,a(r.query(e.originalArgs),c,r.extraOptions)]:[3,3];case 2:return o=t.sent(),r.transformResponse&&(i=r.transformResponse),[3,5];case 3:return[4,r.queryFn(e.originalArgs,c,r.extraOptions,(function(e){return a(e,c,r.extraOptions)}))];case 4:o=t.sent(),t.label=5;case 5:if(o.error)throw new P(o.error,o.meta);return s=h,[4,i(o.data,o.meta,e.originalArgs)];case 6:return[2,s.apply(void 0,[t.sent(),{fulfilledTimeStamp:Date.now(),baseQueryMeta:o.meta}])];case 7:if((d=t.sent())instanceof P)return[2,p(d.value,{baseQueryMeta:d.meta})];throw console.error(d),d;case 8: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,J.createAsyncThunk)(i+"/executeQuery",s,{getPendingMeta:function(){return{startedTimeStamp:Date.now()}},condition:function(e,t){var n,r,a=(0,t.getState)(),u=null==(r=null==(n=a[i])?void 0:n.queries)?void 0:r[e.queryCacheKey],o=null==u?void 0:u.fulfilledTimeStamp;return!("pending"===(null==u?void 0:u.status)||!l(e,a)&&o)},dispatchConditionRejection:!0});function f(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:(0,J.createAsyncThunk)(i+"/executeMutation",s,{getPendingMeta:function(){return{startedTimeStamp:Date.now()}}}),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,V.isDraftable)(s.data)){var d=(0,V.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}},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,H.isAllOf)((0,H.isPending)(e),f(t)),matchFulfilled:(0,H.isAllOf)((0,H.isFulfilled)(e),f(t)),matchRejected:(0,H.isAllOf)((0,H.isRejected)(e),f(t))}}}}({baseQuery:u,reducerPath:o,context:a,api:t,serializeQueryArgs:c}),m=h.queryThunk,g=h.mutationThunk,b=h.patchQueryData,j=h.updateQueryData,w=h.prefetch,A=h.buildMatchThunkActions,R=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,B.createAction)(n+"/resetApiState"),p=(0,B.createSlice)({name:n+"/queries",initialState:te,reducers:{removeQueryResult:function(e,t){delete e[t.payload.queryCacheKey]},queryResultPatched:function(e,t){var n=t.payload,r=n.patches;X(e,n.queryCacheKey,(function(e){e.data=(0,$.applyPatches)(e.data,r.concat())}))}},extraReducers:function(t){t.addCase(r.pending,(function(t,n){var r,i=n.meta,a=n.meta.arg;a.subscribe&&(null!=t[r=a.queryCacheKey]||(t[r]={status:e.uninitialized,endpointName:a.endpointName})),X(t,a.queryCacheKey,(function(t){t.status=e.pending,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;X(t,r.arg.queryCacheKey,(function(t){var n;t.requestId===r.requestId&&(t.status=e.fulfilled,t.data=null==(n=u[r.arg.endpointName].structuralSharing)||n?S(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;X(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,B.createSlice)({name:n+"/mutations",initialState:te,reducers:{removeMutationResult:function(e,t){var n=Z(t.payload);n in e&&delete e[n]}},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[Z(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&&ee(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&&ee(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,B.createSlice)({name:n+"/invalidation",initialState:te,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,B.isAnyOf)((0,B.isFulfilled)(r),(0,B.isRejectedWithValue)(r)),(function(e,t){for(var n,r,i,a,o=Y(t,"providesTags",u,l),c=t.meta.arg.queryCacheKey,s=0,d=o;s<d.length;s++){var f=d[s],p=f.type,h=f.id,v=null!=(a=(r=null!=(n=e[p])?n:e[p]={})[i=h||"__internal_without_id"])?a:r[i]=[];v.includes(c)||v.push(c)}}))}}),g=(0,B.createSlice)({name:n+"/subscriptions",initialState:te,reducers:{updateSubscriptionOptions:function(e,t){var n,r=t.payload,i=r.queryCacheKey,a=r.requestId;(null==(n=null==e?void 0:e[i])?void 0:n[a])&&(e[i][a]=r.options)},unsubscribeQueryResult:function(e,t){var n=t.payload,r=n.queryCacheKey;e[r]&&delete e[r][n.requestId]}},extraReducers:function(e){e.addCase(p.actions.removeQueryResult,(function(e,t){delete e[t.payload.queryCacheKey]})).addCase(r.pending,(function(e,t){var n,r,i,a,u=t.meta,o=u.arg,c=u.requestId;if(o.subscribe){var s=null!=(r=e[n=o.queryCacheKey])?r:e[n]={};s[c]=null!=(a=null!=(i=o.subscriptionOptions)?i:s[c])?a:{}}})).addCase(r.rejected,(function(e,t){var n,r,i,a,u=t.meta,o=u.arg,c=u.requestId;if(u.condition&&o.subscribe){var s=null!=(r=e[n=o.queryCacheKey])?r:e[n]={};s[c]=null!=(a=null!=(i=o.subscriptionOptions)?i:s[c])?a:{}}})).addMatcher(s,(function(e){return v({},e)}))}}),b=(0,B.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(M,(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)}))}}),q=(0,B.combineReducers)({queries:p.reducer,mutations:h.reducer,provided:m.reducer,subscriptions:g.reducer,config:b.reducer});return{reducer:function(e,t){return q(f.match(t)?void 0:e,t)},actions:y(v(v(v(v({},b.actions),p.actions),g.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}}),x=R.reducer,T=R.actions;Re(t.util,{patchQueryData:b,updateQueryData:j,prefetch:w,resetApiState:T.resetApiState}),Re(t.internalActions,T),Object.defineProperty(t.util,"updateQueryResult",{get:function(){return t.util.updateQueryData}}),Object.defineProperty(t.util,"patchQueryResult",{get:function(){return t.util.patchQueryData}});var k=function(e){var t=e.reducerPath,n=e.queryThunk,r={invalidateTags:(0,he.createAction)(t+"/invalidateTags")},i=[Ae,ve,me,ge,be,je,we].map((function(t){return t(y(v({},e),{refetchQuery:a}))}));return{middleware:function(e){return function(n){var r=pe.compose.apply(void 0,i.map((function(t){return t(e)})))(n);return function(i){return e.getState()[t]?r(i):n(i)}}},actions:r};function a(e,t,r){return void 0===r&&(r={}),n(v({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t},r))}}({reducerPath:o,context:a,queryThunk:m,mutationThunk:g,api:t,assertTagType:p}),C=k.middleware;Re(t.util,k.actions),Re(t,{reducer:x,middleware:C});var I=function(t){var n=t.serializeQueryArgs,r=t.reducerPath;return{buildQuerySelector:function(e,t){return function(r){var u=(0,L.createSelector)(a,(function(i){var a,u;return null!=(u=r===ne||null==(a=null==i?void 0:i.queries)?void 0:a[n({queryArgs:r,endpointDefinition:t,endpointName:e})])?u:ae}));return(0,L.createSelector)(u,i)}},buildMutationSelector:function(){return function(e){var t,n;n="object"==typeof e?null!=(t=Z(e))?t:ne:e;var r=(0,L.createSelector)(a,(function(e){var t,r;return null!=(r=n===ne||null==(t=null==e?void 0:e.mutations)?void 0:t[n])?r:ue}));return(0,L.createSelector)(r,i)}},selectInvalidatedBy:function(e,t){for(var n,i=e[r],a=new Set,u=0,o=t.map(W);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 i(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 a(e){return e[r]}}({serializeQueryArgs:c,reducerPath:o}),Q=I.buildQuerySelector,E=I.buildMutationSelector;Re(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={},s={},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;return function(s,l){var f=t({queryArgs:o,endpointDefinition:r,endpointName:e}),m=i({type:"query",subscribe:h,forceRefetch:v,subscriptionOptions:y,endpointName:e,originalArgs:o,queryCacheKey:f}),g=s(m),b=g.requestId,O=g.abort,j=Object.assign(Promise.all([c[f],g]).then((function(){return u.endpoints[e].select(o)(l())})),{arg:o,requestId:b,subscriptionOptions:y,queryCacheKey:f,abort:O,unwrap:function(){return q(this,null,(function(){var e;return n(this,(function(t){switch(t.label){case 0:return[4,j];case 1:if((e=t.sent()).isError)throw e.error;return[2,e.data]}}))}))},refetch:function(){s(a(o,{subscribe:!1,forceRefetch:!0}))},unsubscribe:function(){h&&s(d({queryCacheKey:f,requestId:b}))},updateSubscriptionOptions:function(t){j.subscriptionOptions=t,s(p({endpointName:e,requestId:b,queryCacheKey:f,options:t}))}});return c[f]||(c[f]=j,j.then((function(){delete c[f]}))),j}};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});return s[l]=y,y.then((function(){delete s[l]})),o&&(s[o]=y,y.then((function(){s[o]===y&&delete s[o]}))),y}}},getRunningOperationPromises:function(){return r(r([],Object.values(c)),Object.values(s)).filter((function(e){return!!e}))},getRunningOperationPromise:function(e,n){var r=o.endpointDefinitions[e];if(r.type===_.query){var i=t({queryArgs:n,endpointDefinition:r,endpointName:e});return c[i]}return s[n]}}}({queryThunk:m,mutationThunk:g,api:t,serializeQueryArgs:c,context:a}),z=F.buildInitiateQuery,U=F.buildInitiateMutation;return Re(t.util,{getRunningOperationPromises:F.getRunningOperationPromises,getRunningOperationPromise:F.getRunningOperationPromise}),{name:Te,injectEndpoint:function(e,n){var r,i=t;null!=(r=i.endpoints)[e]||(r[e]={}),n.type===_.query?Re(i.endpoints[e],{select:Q(e,n),initiate:z(e,n)},A(m,e)):n.type===_.mutation&&Re(i.endpoints[e],{select:E(),initiate:U(e)},A(g,e))}}}}},Pe=de(ke());
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 de},copyWithStructuralSharing:function(){return S},coreModule:function(){return ke},createApi:function(){return Pe},fakeBaseQuery:function(){return fe},fetchBaseQuery:function(){return k},retry:function(){return I},setupListeners:function(){return F},skipSelector:function(){return re},skipToken:function(){return ne}}),(t=e||(e={})).uninitialized="uninitialized",t.pending="pending",t.fulfilled="fulfilled",t.rejected="rejected";var O=function(e){return[].concat.apply([],e)},j=b(require("@reduxjs/toolkit")).isPlainObject;function S(e,t){if(e===t||!(j(e)&&j(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]=S(e[c],t[c]),i&&(i=e[c]===a[c])}return i?e:a}var w=b(require("@reduxjs/toolkit")),A=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return fetch.apply(void 0,e)},R=function(e){return e.status>=200&&e.status<=299},x=function(e,t){return q(void 0,null,(function(){var r;return n(this,(function(n){switch(n.label){case 0:return"function"==typeof t?[2,t(e)]:"text"===t?[2,e.text()]:"json"!==t?[3,2]:[4,e.text()];case 1:return[2,(r=n.sent()).length?JSON.parse(r):null];case 2:return[2]}}))}))};function T(e){if(!(0,w.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 k(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?A:u,c=e.paramsSerializer,s=g(e,["baseUrl","prepareHeaders","fetchFn","paramsSerializer"]);return"undefined"==typeof fetch&&o===A&&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,l,d,f,p,h,m,b,q,O,j,S,A,k,P,C,I,Q,D,N,M,K,E,F,_,z,L,U,W,B,H,V,J,G,Y;return n(this,(function(n){switch(n.label){case 0:return t=i.signal,u=i.getState,l=i.extra,d=i.endpoint,f=i.forced,p=i.type,b=(m="string"==typeof e?{url:e}:e).url,O=void 0===(q=m.method)?"GET":q,S=void 0===(j=m.headers)?new Headers({}):j,k=void 0===(A=m.body)?void 0:A,C=void 0===(P=m.params)?void 0:P,Q=void 0===(I=m.responseHandler)?"json":I,N=void 0===(D=m.validateStatus)?R:D,M=g(m,["url","method","headers","body","params","responseHandler","validateStatus"]),K=v(y(v({},s),{method:O,signal:t,body:k}),M),E=K,[4,a(new Headers(T(S)),{getState:u,extra:l,endpoint:d,forced:f,type:p})];case 1:E.headers=n.sent(),F=function(e){return"object"==typeof e&&((0,w.isPlainObject)(e)||Array.isArray(e)||"function"==typeof e.toJSON)},!K.headers.has("content-type")&&F(k)&&K.headers.set("content-type","application/json"),F(k)&&function(e){var t,n;return null==(n=null==(t=e.get("content-type"))?void 0:t.trim())?void 0:n.startsWith("application/json")}(K.headers)&&(K.body=JSON.stringify(k)),C&&(_=~b.indexOf("?")?"&":"?",z=c?c(C):new URLSearchParams(T(C)),b+=_+z),b=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,b),L=new Request(b,K),U=L.clone(),h={request:U},n.label=2;case 2:return n.trys.push([2,4,,5]),[4,o(L)];case 3:return W=n.sent(),[3,5];case 4:return B=n.sent(),[2,{error:{status:"FETCH_ERROR",error:String(B)},meta:h}];case 5:H=W.clone(),h.response=H,J="",n.label=6;case 6:return n.trys.push([6,8,,9]),[4,Promise.all([x(W,Q).then((function(e){return V=e}),(function(e){return G=e})),H.text().then((function(e){return J=e}),(function(){}))])];case 7:if(n.sent(),G)throw G;return[3,9];case 8:return Y=n.sent(),[2,{error:{status:"PARSING_ERROR",originalStatus:W.status,data:J,error:String(Y)},meta:h}];case 9:return[2,N(W,V)?{data:V,meta:h}:{error:{status:W.status,data:V},meta:h}]}}))}))}}var P=function(e,t){void 0===t&&(t=void 0),this.value=e,this.meta=t};function C(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 I=Object.assign((function(e,t){return function(r,i,a){return q(void 0,null,(function(){var u,o,c,s;return n(this,(function(n){switch(n.label){case 0:u=v(v({maxRetries:5,backoff:C},t),a),o=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((c=n.sent()).error)throw new P(c);return[2,c];case 4:if(s=n.sent(),o++,s.throwImmediately||o>u.maxRetries){if(s instanceof P)return[2,s.value];throw s}return[4,u.backoff(o,u.maxRetries)];case 5:return n.sent(),[3,6];case 6:return[3,1];case 7:return[2]}}))}))}}),{fail:function(e){throw Object.assign(new P({error:e}),{throwImmediately:!0})}}),Q=b(require("@reduxjs/toolkit")),D=(0,Q.createAction)("__rtkq/focused"),N=(0,Q.createAction)("__rtkq/unfocused"),M=(0,Q.createAction)("__rtkq/online"),K=(0,Q.createAction)("__rtkq/offline"),E=!1;function F(e,t){return t?t(e,{onFocus:D,onFocusLost:N,onOffline:K,onOnline:M}):(n=function(){return e(D())},r=function(){return e(M())},i=function(){return e(K())},a=function(){"visible"===window.document.visibilityState?n():e(N())},E||"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),E=!0),function(){window.removeEventListener("focus",n),window.removeEventListener("visibilitychange",a),window.removeEventListener("online",r),window.removeEventListener("offline",i),E=!1});var n,r,i,a}var _,z,L=b(require("@reduxjs/toolkit"));function U(e,t,n,r,i,a){return"function"==typeof e?e(t,n,r,i).map(W).map(a):Array.isArray(e)?e.map(W).map(a):[]}function W(e){return"string"==typeof e?{type:e}:e}(z=_||(_={})).query="query",z.mutation="mutation";var B=b(require("@reduxjs/toolkit")),H=b(require("@reduxjs/toolkit")),V=b(require("immer")),J=b(require("@reduxjs/toolkit"));function G(e){return e}function Y(e,t,n,r){return U(n[e.meta.arg.endpointName][t],(0,H.isFulfilled)(e)?e.payload:void 0,(0,H.isRejectedWithValue)(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}var $=b(require("immer"));function X(e,t,n){var r=e[t];r&&n(r)}function Z(e){var t;return null!=(t="arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)?t:e.requestId}function ee(e,t,n){var r=e[Z(t)];r&&n(r)}var te={},ne=Symbol.for("RTKQ/skipToken"),re=ne,ie={status:e.uninitialized},ae=(0,L.createNextState)(ie,(function(){})),ue=(0,L.createNextState)(ie,(function(){})),oe=b(require("@reduxjs/toolkit")),ce=function(e){return e.endpointName+"("+JSON.stringify(e.queryArgs,(function(e,t){return(0,oe.isPlainObject)(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}))+")"},se=b(require("@reduxjs/toolkit")),le=b(require("reselect"));function de(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var n=(0,le.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",serializeQueryArgs:ce,keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1},t),{extractRehydrationInfo:n,tagTypes:r([],t.tagTypes||[])}),a={endpointDefinitions:{},batch:function(e){e()},apiUid:(0,se.nanoid)(),extractRehydrationInfo:n,hasRehydrationInfo:(0,le.defaultMemoize)((function(e){return null!=n(e)}))},u={injectEndpoints:function(e){for(var t=e.endpoints({query:function(e){return y(v({},e),{type:_.query})},mutation:function(e){return y(v({},e),{type:_.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 fe(){return function(){throw new Error("When using `fakeBaseQuery`, all queries & mutations must use the `queryFn` definition syntax.")}}var pe=b(require("redux")),he=b(require("@reduxjs/toolkit")),ve=function(e){var t=e.reducerPath,n=e.api,r=e.context,i=n.internalActions,a=i.removeQueryResult,u=i.unsubscribeQueryResult;return function(e){var i={};return function(a){return function(c){var s,l=a(c);if(u.match(c)){var d=e.getState()[t];o(q=c.payload.queryCacheKey,null==(s=d.queries[q])?void 0:s.endpointName,e,d.config)}if(n.util.resetApiState.match(c))for(var f=0,p=Object.entries(i);f<p.length;f++){var h=p[f],v=h[0],y=h[1];y&&clearTimeout(y),delete i[v]}if(r.hasRehydrationInfo(c)){d=e.getState()[t];for(var m=r.extractRehydrationInfo(c).queries,g=0,b=Object.entries(m);g<b.length;g++){var q,O=b[g],j=O[1];o(q=O[0],null==j?void 0:j.endpointName,e,d.config)}}return l}};function o(e,n,u,o){var c,s=r.endpointDefinitions[n],l=null!=(c=null==s?void 0:s.keepUnusedDataFor)?c:o.keepUnusedDataFor,d=Math.max(0,Math.min(l,2147482.647)),f=i[e];f&&clearTimeout(f),i[e]=setTimeout((function(){var n=u.getState()[t].subscriptions[e];n&&0!==Object.keys(n).length||u.dispatch(a({queryCacheKey:e})),delete i[e]}),1e3*d)}}},ye=b(require("@reduxjs/toolkit")),me=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;return function(e){return function(t){return function(n){var r=t(n);return(0,ye.isAnyOf)((0,ye.isFulfilled)(a),(0,ye.isRejectedWithValue)(a))(n)&&l(Y(n,"invalidatesTags",i,o),e),u.util.invalidateTags.match(n)&&l(U(n.payload,void 0,void 0,void 0,void 0,o),e),r}}};function l(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)))}}))}},ge=function(t){var n=t.reducerPath,r=t.queryThunk,i=t.api,a=t.refetchQuery;return function(t){var o={};return function(e){return function(n){var a=e(n);return(i.internalActions.updateSubscriptionOptions.match(n)||i.internalActions.unsubscribeQueryResult.match(n))&&s(n.payload,t),(r.pending.match(n)||r.rejected.match(n)&&n.meta.condition)&&s(n.meta.arg,t),(r.fulfilled.match(n)||r.rejected.match(n)&&!n.meta.condition)&&c(n.meta.arg,t),i.util.resetApiState.match(n)&&function(){for(var e=0,t=Object.keys(o);e<t.length;e++)l(t[e])}(),a}};function c(t,r){var i=t.queryCacheKey,c=r.getState()[n],s=c.queries[i];if(s&&s.status!==e.uninitialized){var l=u(c.subscriptions[i]);if(Number.isFinite(l)){var d=o[i];(null==d?void 0:d.timeout)&&(clearTimeout(d.timeout),d.timeout=void 0);var f=Date.now()+l,p=o[i]={nextPollTimestamp:f,pollingInterval:l,timeout:setTimeout((function(){p.timeout=void 0,r.dispatch(a(s,i))}),l)}}}}function s(t,r){var i=t.queryCacheKey,a=r.getState()[n],s=a.queries[i];if(s&&s.status!==e.uninitialized){var d=u(a.subscriptions[i]);if(Number.isFinite(d)){var f=o[i],p=Date.now()+d;(!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 u(e){void 0===e&&(e={});for(var t=Number.POSITIVE_INFINITY,n=0,r=Object.values(e);n<r.length;n++){var i=r[n];i.pollingInterval&&(t=Math.min(i.pollingInterval,t))}return t}},be=function(t){var n=t.reducerPath,r=t.context,i=t.refetchQuery,a=t.api.internalActions.removeQueryResult;return function(e){return function(t){return function(n){var r=t(n);return D.match(n)&&u(e,"refetchOnFocus"),M.match(n)&&u(e,"refetchOnReconnect"),r}}};function u(t,u){var o=t.getState()[n],c=o.queries,s=o.subscriptions;r.batch((function(){for(var n=0,r=Object.keys(s);n<r.length;n++){var l=r[n],d=c[l],f=s[l];f&&d&&(Object.values(f).some((function(e){return!0===e[u]}))||Object.values(f).every((function(e){return void 0===e[u]}))&&o.config[u])&&(0===Object.keys(f).length?t.dispatch(a({queryCacheKey:l})):d.status!==e.uninitialized&&t.dispatch(i(d,l)))}}))}},qe=b(require("@reduxjs/toolkit")),Oe=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,qe.isAsyncThunkAction)(i),o=(0,qe.isAsyncThunkAction)(a),c=(0,qe.isFulfilled)(i,a);return function(e){var s={};return function(r){return function(d){var f=e.getState(),p=r(d),h=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)?Z(e.payload):""}(d);if(i.pending.match(d)){var v=f[n].queries[h],y=e.getState()[n].queries[h];!v&&y&&l(d.meta.arg.endpointName,d.meta.arg.originalArgs,h,e,d.meta.requestId)}else if(a.pending.match(d))(y=e.getState()[n].mutations[h])&&l(d.meta.arg.endpointName,d.meta.arg.originalArgs,h,e,d.meta.requestId);else if(c(d))(null==(q=s[h])?void 0:q.valueResolved)&&(q.valueResolved({data:d.payload,meta:d.meta.baseQueryMeta}),delete q.valueResolved);else if(t.internalActions.removeQueryResult.match(d)||t.internalActions.removeMutationResult.match(d))(q=s[h])&&(delete s[h],q.cacheEntryRemoved());else if(t.util.resetApiState.match(d))for(var m=0,g=Object.entries(s);m<g.length;m++){var b=g[m],q=b[1];delete s[b[0]],q.cacheEntryRemoved()}return p}};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 Oe}))]);f.catch((function(){})),s[i]=l;var p=t.endpoints[e].select(o.type===_.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===_.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!==Oe)throw e}))}}}},Se=b(require("@reduxjs/toolkit")),we=function(e){var t=e.api,n=e.context,r=e.queryThunk,i=e.mutationThunk,a=(0,Se.isPending)(r,i),u=(0,Se.isRejected)(r,i),o=(0,Se.isFulfilled)(r,i);return function(e){var r={};return function(i){return function(c){var s,l,d,f=i(c);if(a(c)){var p=c.meta,h=p.requestId,m=p.arg,g=m.endpointName,b=m.originalArgs,q=n.endpointDefinitions[g],O=null==q?void 0:q.onQueryStarted;if(O){var j={},S=new Promise((function(e,t){j.resolve=e,j.reject=t}));S.catch((function(){})),r[h]=j;var w=t.endpoints[g].select(q.type===_.query?b:h),A=e.dispatch((function(e,t,n){return n})),R=y(v({},e),{getCacheEntry:function(){return w(e.getState())},requestId:h,extra:A,updateCachedData:q.type===_.query?function(n){return e.dispatch(t.util.updateQueryData(g,b,n))}:void 0,queryFulfilled:S});O(b,R)}}else if(o(c)){var x=c.meta,T=x.baseQueryMeta;null==(s=r[h=x.requestId])||s.resolve({data:c.payload,meta:T}),delete r[h]}else if(u(c)){var k=c.meta;T=k.baseQueryMeta,null==(d=r[h=k.requestId])||d.reject({error:null!=(l=c.payload)?l:c.error,isUnhandledError:!k.rejectedWithValue,meta:T}),delete r[h]}return f}}}},Ae=function(e){var t=e.api,n=e.context.apiUid;return function(e){var r=!1;return function(i){return function(a){r||(r=!0,e.dispatch(t.internalActions.middlewareRegistered(n)));var u=i(a);return t.util.resetApiState.match(a)&&e.dispatch(t.internalActions.middlewareRegistered(n)),u}}}};function Re(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Object.assign.apply(Object,r([e],t))}var xe=b(require("immer")),Te=Symbol(),ke=function(){return{name:Te,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,xe.enablePatches)();var p=function(e){return e};Object.assign(t,{reducerPath:o,endpoints:{},internalActions:{onOnline:M,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=t.signal,p=t.rejectWithValue,h=t.fulfillWithValue,v=t.dispatch,y=t.getState,m=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,7,,8]),i=G,o=void 0,c={signal:f,dispatch:v,getState:y,extra:m,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?l(e,y()):void 0},r.query?[4,a(r.query(e.originalArgs),c,r.extraOptions)]:[3,3];case 2:return o=t.sent(),r.transformResponse&&(i=r.transformResponse),[3,5];case 3:return[4,r.queryFn(e.originalArgs,c,r.extraOptions,(function(e){return a(e,c,r.extraOptions)}))];case 4:o=t.sent(),t.label=5;case 5:if(o.error)throw new P(o.error,o.meta);return s=h,[4,i(o.data,o.meta,e.originalArgs)];case 6:return[2,s.apply(void 0,[t.sent(),{fulfilledTimeStamp:Date.now(),baseQueryMeta:o.meta}])];case 7:if((d=t.sent())instanceof P)return[2,p(d.value,{baseQueryMeta:d.meta})];throw console.error(d),d;case 8: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,J.createAsyncThunk)(i+"/executeQuery",s,{getPendingMeta:function(){return{startedTimeStamp:Date.now()}},condition:function(e,t){var n,r,a=(0,t.getState)(),u=null==(r=null==(n=a[i])?void 0:n.queries)?void 0:r[e.queryCacheKey],o=null==u?void 0:u.fulfilledTimeStamp;return!("pending"===(null==u?void 0:u.status)||!l(e,a)&&o)},dispatchConditionRejection:!0});function f(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:(0,J.createAsyncThunk)(i+"/executeMutation",s,{getPendingMeta:function(){return{startedTimeStamp:Date.now()}}}),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,V.isDraftable)(s.data)){var d=(0,V.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}},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,H.isAllOf)((0,H.isPending)(e),f(t)),matchFulfilled:(0,H.isAllOf)((0,H.isFulfilled)(e),f(t)),matchRejected:(0,H.isAllOf)((0,H.isRejected)(e),f(t))}}}}({baseQuery:u,reducerPath:o,context:a,api:t,serializeQueryArgs:c}),m=h.queryThunk,g=h.mutationThunk,b=h.patchQueryData,j=h.updateQueryData,w=h.prefetch,A=h.buildMatchThunkActions,R=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,B.createAction)(n+"/resetApiState"),p=(0,B.createSlice)({name:n+"/queries",initialState:te,reducers:{removeQueryResult:function(e,t){delete e[t.payload.queryCacheKey]},queryResultPatched:function(e,t){var n=t.payload,r=n.patches;X(e,n.queryCacheKey,(function(e){e.data=(0,$.applyPatches)(e.data,r.concat())}))}},extraReducers:function(t){t.addCase(r.pending,(function(t,n){var r,i=n.meta,a=n.meta.arg;a.subscribe&&(null!=t[r=a.queryCacheKey]||(t[r]={status:e.uninitialized,endpointName:a.endpointName})),X(t,a.queryCacheKey,(function(t){t.status=e.pending,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;X(t,r.arg.queryCacheKey,(function(t){var n;t.requestId===r.requestId&&(t.status=e.fulfilled,t.data=null==(n=u[r.arg.endpointName].structuralSharing)||n?S(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;X(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,B.createSlice)({name:n+"/mutations",initialState:te,reducers:{removeMutationResult:function(e,t){var n=Z(t.payload);n in e&&delete e[n]}},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[Z(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&&ee(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&&ee(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,B.createSlice)({name:n+"/invalidation",initialState:te,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,B.isAnyOf)((0,B.isFulfilled)(r),(0,B.isRejectedWithValue)(r)),(function(e,t){for(var n,r,i,a,o=Y(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,B.createSlice)({name:n+"/subscriptions",initialState:te,reducers:{updateSubscriptionOptions:function(e,t){var n,r=t.payload,i=r.queryCacheKey,a=r.requestId;(null==(n=null==e?void 0:e[i])?void 0:n[a])&&(e[i][a]=r.options)},unsubscribeQueryResult:function(e,t){var n=t.payload,r=n.queryCacheKey;e[r]&&delete e[r][n.requestId]}},extraReducers:function(e){e.addCase(p.actions.removeQueryResult,(function(e,t){delete e[t.payload.queryCacheKey]})).addCase(r.pending,(function(e,t){var n,r,i,a,u=t.meta,o=u.arg,c=u.requestId;if(o.subscribe){var s=null!=(r=e[n=o.queryCacheKey])?r:e[n]={};s[c]=null!=(a=null!=(i=o.subscriptionOptions)?i:s[c])?a:{}}})).addCase(r.rejected,(function(e,t){var n,r,i,a,u=t.meta,o=u.arg,c=u.requestId;if(u.condition&&o.subscribe){var s=null!=(r=e[n=o.queryCacheKey])?r:e[n]={};s[c]=null!=(a=null!=(i=o.subscriptionOptions)?i:s[c])?a:{}}})).addMatcher(s,(function(e){return v({},e)}))}}),b=(0,B.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(M,(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)}))}}),q=(0,B.combineReducers)({queries:p.reducer,mutations:h.reducer,provided:m.reducer,subscriptions:g.reducer,config:b.reducer});return{reducer:function(e,t){return q(f.match(t)?void 0:e,t)},actions:y(v(v(v(v({},b.actions),p.actions),g.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}}),x=R.reducer,T=R.actions;Re(t.util,{patchQueryData:b,updateQueryData:j,prefetch:w,resetApiState:T.resetApiState}),Re(t.internalActions,T),Object.defineProperty(t.util,"updateQueryResult",{get:function(){return t.util.updateQueryData}}),Object.defineProperty(t.util,"patchQueryResult",{get:function(){return t.util.patchQueryData}});var k=function(e){var t=e.reducerPath,n=e.queryThunk,r={invalidateTags:(0,he.createAction)(t+"/invalidateTags")},i=[Ae,ve,me,ge,be,je,we].map((function(t){return t(y(v({},e),{refetchQuery:a}))}));return{middleware:function(e){return function(n){var r=pe.compose.apply(void 0,i.map((function(t){return t(e)})))(n);return function(i){return e.getState()[t]?r(i):n(i)}}},actions:r};function a(e,t,r){return void 0===r&&(r={}),n(v({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t},r))}}({reducerPath:o,context:a,queryThunk:m,mutationThunk:g,api:t,assertTagType:p}),C=k.middleware;Re(t.util,k.actions),Re(t,{reducer:x,middleware:C});var I=function(t){var n=t.serializeQueryArgs,r=t.reducerPath;return{buildQuerySelector:function(e,t){return function(r){var u=(0,L.createSelector)(a,(function(i){var a,u;return null!=(u=r===ne||null==(a=null==i?void 0:i.queries)?void 0:a[n({queryArgs:r,endpointDefinition:t,endpointName:e})])?u:ae}));return(0,L.createSelector)(u,i)}},buildMutationSelector:function(){return function(e){var t,n;n="object"==typeof e?null!=(t=Z(e))?t:ne:e;var r=(0,L.createSelector)(a,(function(e){var t,r;return null!=(r=n===ne||null==(t=null==e?void 0:e.mutations)?void 0:t[n])?r:ue}));return(0,L.createSelector)(r,i)}},selectInvalidatedBy:function(e,t){for(var n,i=e[r],a=new Set,u=0,o=t.map(W);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 i(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 a(e){return e[r]}}({serializeQueryArgs:c,reducerPath:o}),Q=I.buildQuerySelector,E=I.buildMutationSelector;Re(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={},s={},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;return function(s,l){var f=t({queryArgs:o,endpointDefinition:r,endpointName:e}),m=i({type:"query",subscribe:h,forceRefetch:v,subscriptionOptions:y,endpointName:e,originalArgs:o,queryCacheKey:f}),g=s(m),b=g.requestId,O=g.abort,j=Object.assign(Promise.all([c[f],g]).then((function(){return u.endpoints[e].select(o)(l())})),{arg:o,requestId:b,subscriptionOptions:y,queryCacheKey:f,abort:O,unwrap:function(){return q(this,null,(function(){var e;return n(this,(function(t){switch(t.label){case 0:return[4,j];case 1:if((e=t.sent()).isError)throw e.error;return[2,e.data]}}))}))},refetch:function(){s(a(o,{subscribe:!1,forceRefetch:!0}))},unsubscribe:function(){h&&s(d({queryCacheKey:f,requestId:b}))},updateSubscriptionOptions:function(t){j.subscriptionOptions=t,s(p({endpointName:e,requestId:b,queryCacheKey:f,options:t}))}});return c[f]||(c[f]=j,j.then((function(){delete c[f]}))),j}};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});return s[l]=y,y.then((function(){delete s[l]})),o&&(s[o]=y,y.then((function(){s[o]===y&&delete s[o]}))),y}}},getRunningOperationPromises:function(){return r(r([],Object.values(c)),Object.values(s)).filter((function(e){return!!e}))},getRunningOperationPromise:function(e,n){var r=o.endpointDefinitions[e];if(r.type===_.query){var i=t({queryArgs:n,endpointDefinition:r,endpointName:e});return c[i]}return s[n]}}}({queryThunk:m,mutationThunk:g,api:t,serializeQueryArgs:c,context:a}),z=F.buildInitiateQuery,U=F.buildInitiateMutation;return Re(t.util,{getRunningOperationPromises:F.getRunningOperationPromises,getRunningOperationPromise:F.getRunningOperationPromise}),{name:Te,injectEndpoint:function(e,n){var r,i=t;null!=(r=i.endpoints)[e]||(r[e]={}),n.type===_.query?Re(i.endpoints[e],{select:Q(e,n),initiate:z(e,n)},A(m,e)):n.type===_.mutation&&Re(i.endpoints[e],{select:E(),initiate:U(e)},A(g,e))}}}}},Pe=de(ke());
//# 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 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=async(e,t)=>{if("function"==typeof t)return t(e);if("text"===t)return e.text();if("json"===t){const t=await e.text();return t.length?JSON.parse(t):null}};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}=t,o=l(t,["baseUrl","prepareHeaders","fetchFn","paramsSerializer"]);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:s,getState:u,extra:f,endpoint:p,forced:m,type:y}=t;let g,O="string"==typeof e?{url:e}:e,{url:j,method:w="GET",headers:R=new Headers({}),body:S,params:A,responseHandler:T="json",validateStatus:x=v}=O,k=l(O,["url","method","headers","body","params","responseHandler","validateStatus"]),C=c(d(c({},o),{method:w,signal:s,body:S}),k);C.headers=await r(new Headers(q(R)),{getState:u,extra:f,endpoint:p,forced:m,type:y});const I=e=>"object"==typeof e&&(h(e)||Array.isArray(e)||"function"==typeof e.toJSON);if(!C.headers.has("content-type")&&I(S)&&C.headers.set("content-type","application/json"),I(S)&&(e=>{var t,n;return null==(n=null==(t=e.get("content-type"))?void 0:t.trim())?void 0:n.startsWith("application/json")})(C.headers)&&(C.body=JSON.stringify(S)),A){const e=~j.indexOf("?")?"&":"?";j+=e+(a?a(A):new URLSearchParams(q(A)))}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 P=new Request(j,C);let Q;g={request:P.clone()};try{Q=await i(P)}catch(e){return{error:{status:"FETCH_ERROR",error:String(e)},meta:g}}const D=Q.clone();let N;g.response=D;let K="";try{let e;if(await Promise.all([b(Q,T).then((e=>N=e),(t=>e=t)),D.text().then((e=>K=e),(()=>{}))]),e)throw e}catch(e){return{error:{status:"PARSING_ERROR",originalStatus:Q.status,data:K,error:String(e)},meta:g}}return x(Q,N)?{data:N,meta:g}:{error:{status:Q.status,data:N},meta:g}}}var j=class{constructor(e,t){this.value=e,this.meta=t}};async function w(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 R=Object.assign(((e,t)=>async(n,r,i)=>{const a=c(c({maxRetries:5,backoff:w},t),i);let o=0;for(;;)try{const t=await e(n,r,i);if(t.error)throw new j(t);return t}catch(e){if(o++,e.throwImmediately||o>a.maxRetries){if(e instanceof j)return e.value;throw e}await a.backoff(o,a.maxRetries)}}),{fail:function(e){throw Object.assign(new j({error:e}),{throwImmediately:!0})}});import{createAction as S}from"@reduxjs/toolkit";var A,T,x=S("__rtkq/focused"),k=S("__rtkq/unfocused"),C=S("__rtkq/online"),I=S("__rtkq/offline"),P=!1;function Q(e,t){return t?t(e,{onFocus:x,onFocusLost:k,onOffline:I,onOnline:C}):function(){const t=()=>e(x()),n=()=>e(C()),r=()=>e(I()),i=()=>{"visible"===window.document.visibilityState?t():e(k())};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 K(e,t,n,r,i,a){return"function"==typeof e?e(t,n,r,i).map(M).map(a):Array.isArray(e)?e.map(M).map(a):[]}function M(e){return"string"==typeof e?{type:e}:e}(T=A||(A={})).query="query",T.mutation="mutation";import{combineReducers as E,createAction as F,createSlice as z,isAnyOf as _,isFulfilled as L,isRejectedWithValue as $}from"@reduxjs/toolkit";import{isAllOf as U,isFulfilled as W,isPending as H,isRejected as B,isRejectedWithValue as V}from"@reduxjs/toolkit";import{isDraftable as J,produceWithPatches as G}from"immer";import{createAsyncThunk as Y}from"@reduxjs/toolkit";function X(e){return e}function Z(e,t,n,r){return K(n[e.meta.arg.endpointName][t],W(e)?e.payload:void 0,V(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}import{applyPatches as ee}from"immer";function te(e,t,n){const r=e[t];r&&n(r)}function ne(e){var t;return null!=(t="arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)?t:e.requestId}function re(e,t,n){const r=e[ne(t)];r&&n(r)}var ie={},ae=Symbol.for("RTKQ/skipToken"),oe=ae,se={status:e.uninitialized},ue=D(se,(()=>{})),ce=D(se,(()=>{}));import{isPlainObject as de}from"@reduxjs/toolkit";var le=({endpointName:e,queryArgs:t})=>`${e}(${JSON.stringify(t,((e,t)=>de(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))})`;import{nanoid as fe}from"@reduxjs/toolkit";import{defaultMemoize as pe}from"reselect";function me(...e){return function(t){const n=pe((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",serializeQueryArgs:le,keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1},t),{extractRehydrationInfo:n,tagTypes:[...t.tagTypes||[]]}),i={endpointDefinitions:{},batch(e){e()},apiUid:fe(),extractRehydrationInfo:n,hasRehydrationInfo:pe((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 ye(){return function(){throw new Error("When using `fakeBaseQuery`, all queries & mutations must use the `queryFn` definition syntax.")}}import{compose as he}from"redux";import{createAction as ge}from"@reduxjs/toolkit";var ve=({reducerPath:e,api:t,context:n})=>{const{removeQueryResult:r,unsubscribeQueryResult:i}=t.internalActions;return a=>{const o={};return r=>u=>{var c;const d=r(u);if(i.match(u)){const t=a.getState()[e],{queryCacheKey:n}=u.payload;s(n,null==(c=t.queries[n])?void 0:c.endpointName,a,t.config)}if(t.util.resetApiState.match(u))for(const[e,t]of Object.entries(o))t&&clearTimeout(t),delete o[e];if(n.hasRehydrationInfo(u)){const t=a.getState()[e],{queries:r}=n.extractRehydrationInfo(u);for(const[e,n]of Object.entries(r))s(e,null==n?void 0:n.endpointName,a,t.config)}return d};function s(t,i,a,s){var u;const c=n.endpointDefinitions[i],d=null!=(u=null==c?void 0:c.keepUnusedDataFor)?u:s.keepUnusedDataFor,l=Math.max(0,Math.min(d,2147482.647)),f=o[t];f&&clearTimeout(f),o[t]=setTimeout((()=>{const n=a.getState()[e].subscriptions[t];n&&0!==Object.keys(n).length||a.dispatch(r({queryCacheKey:t})),delete o[t]}),1e3*l)}}};import{isAnyOf as be,isFulfilled as qe,isRejectedWithValue as Oe}from"@reduxjs/toolkit";var je=({reducerPath:t,context:n,context:{endpointDefinitions:r},mutationThunk:i,api:a,assertTagType:o,refetchQuery:s})=>{const{removeQueryResult:u}=a.internalActions;return e=>t=>n=>{const s=t(n);return be(qe(i),Oe(i))(n)&&c(Z(n,"invalidatesTags",r,o),e),a.util.invalidateTags.match(n)&&c(K(n.payload,void 0,void 0,void 0,void 0,o),e),s};function c(r,i){const o=i.getState(),c=o[t],d=a.util.selectInvalidatedBy(o,r);n.batch((()=>{const t=Array.from(d.values());for(const{queryCacheKey:n}of t){const t=c.queries[n],r=c.subscriptions[n];t&&r&&(0===Object.keys(r).length?i.dispatch(u({queryCacheKey:n})):t.status!==e.uninitialized&&i.dispatch(s(t,n)))}}))}},we=({reducerPath:t,queryThunk:n,api:r,refetchQuery:i})=>{return o=>{const s={};return e=>t=>{const i=e(t);return(r.internalActions.updateSubscriptionOptions.match(t)||r.internalActions.unsubscribeQueryResult.match(t))&&c(t.payload,o),(n.pending.match(t)||n.rejected.match(t)&&t.meta.condition)&&c(t.meta.arg,o),(n.fulfilled.match(t)||n.rejected.match(t)&&!t.meta.condition)&&u(t.meta.arg,o),r.util.resetApiState.match(t)&&function(){for(const e of Object.keys(s))d(e)}(),i};function u({queryCacheKey:n},r){const o=r.getState()[t],u=o.queries[n];if(!u||u.status===e.uninitialized)return;const c=a(o.subscriptions[n]);if(!Number.isFinite(c))return;const d=s[n];(null==d?void 0:d.timeout)&&(clearTimeout(d.timeout),d.timeout=void 0);const l=Date.now()+c,f=s[n]={nextPollTimestamp:l,pollingInterval:c,timeout:setTimeout((()=>{f.timeout=void 0,r.dispatch(i(u,n))}),c)}}function c({queryCacheKey:n},r){const i=r.getState()[t],o=i.queries[n];if(!o||o.status===e.uninitialized)return;const c=a(i.subscriptions[n]);if(!Number.isFinite(c))return void d(n);const l=s[n],f=Date.now()+c;(!l||f<l.nextPollTimestamp)&&u({queryCacheKey:n},r)}function d(e){const t=s[e];(null==t?void 0:t.timeout)&&clearTimeout(t.timeout),delete s[e]}};function a(e={}){let t=Number.POSITIVE_INFINITY;for(const n of Object.values(e))n.pollingInterval&&(t=Math.min(n.pollingInterval,t));return t}},Re=({reducerPath:t,context:n,api:r,refetchQuery:i})=>{const{removeQueryResult:a}=r.internalActions;return e=>t=>n=>{const r=t(n);return x.match(n)&&o(e,"refetchOnFocus"),C.match(n)&&o(e,"refetchOnReconnect"),r};function o(r,o){const s=r.getState()[t],u=s.queries,c=s.subscriptions;n.batch((()=>{for(const t of Object.keys(c)){const n=u[t],d=c[t];d&&n&&(Object.values(d).some((e=>!0===e[o]))||Object.values(d).every((e=>void 0===e[o]))&&s.config[o])&&(0===Object.keys(d).length?r.dispatch(a({queryCacheKey:t})):n.status!==e.uninitialized&&r.dispatch(i(n,t)))}}))}};import{isAsyncThunkAction as Se,isFulfilled as Ae}from"@reduxjs/toolkit";var Te=new Error("Promise never resolved before cacheEntryRemoved."),xe=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:i})=>{const a=Se(r),o=Se(i),s=Ae(r,i);return u=>{const l={};return n=>c=>{const d=u.getState(),p=n(c),m=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)?ne(t.payload):""}(c);if(r.pending.match(c)){const e=d[t].queries[m],n=u.getState()[t].queries[m];!e&&n&&f(c.meta.arg.endpointName,c.meta.arg.originalArgs,m,u,c.meta.requestId)}else if(i.pending.match(c))u.getState()[t].mutations[m]&&f(c.meta.arg.endpointName,c.meta.arg.originalArgs,m,u,c.meta.requestId);else if(s(c)){const e=l[m];(null==e?void 0:e.valueResolved)&&(e.valueResolved({data:c.payload,meta:c.meta.baseQueryMeta}),delete e.valueResolved)}else if(e.internalActions.removeQueryResult.match(c)||e.internalActions.removeMutationResult.match(c)){const e=l[m];e&&(delete l[m],e.cacheEntryRemoved())}else if(e.util.resetApiState.match(c))for(const[e,t]of Object.entries(l))delete l[e],t.cacheEntryRemoved();return p};function f(t,r,i,a,o){const s=n.endpointDefinitions[t],u=null==s?void 0:s.onCacheEntryAdded;if(!u)return;let f={};const p=new Promise((e=>{f.cacheEntryRemoved=e})),m=Promise.race([new Promise((e=>{f.valueResolved=e})),p.then((()=>{throw Te}))]);m.catch((()=>{})),l[i]=f;const y=e.endpoints[t].select(s.type===A.query?r:i),h=a.dispatch(((e,t,n)=>n)),g=d(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=u(r,g);Promise.resolve(v).catch((e=>{if(e!==Te)throw e}))}}};import{isPending as ke,isRejected as Ce,isFulfilled as Ie}from"@reduxjs/toolkit";var Pe=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const i=ke(n,r),a=Ce(n,r),o=Ie(n,r);return n=>{const r={};return s=>u=>{var l,f,p;const m=s(u);if(i(u)){const{requestId:i,arg:{endpointName:a,originalArgs:o}}=u.meta,s=t.endpointDefinitions[a],l=null==s?void 0:s.onQueryStarted;if(l){const t={},u=new Promise(((e,n)=>{t.resolve=e,t.reject=n}));u.catch((()=>{})),r[i]=t;const f=e.endpoints[a].select(s.type===A.query?o:i),p=n.dispatch(((e,t,n)=>n)),m=d(c({},n),{getCacheEntry:()=>f(n.getState()),requestId:i,extra:p,updateCachedData:s.type===A.query?t=>n.dispatch(e.util.updateQueryData(a,o,t)):void 0,queryFulfilled:u});l(o,m)}}else if(o(u)){const{requestId:e,baseQueryMeta:t}=u.meta;null==(l=r[e])||l.resolve({data:u.payload,meta:t}),delete r[e]}else if(a(u)){const{requestId:e,rejectedWithValue:t,baseQueryMeta:n}=u.meta;null==(p=r[e])||p.reject({error:null!=(f=u.payload)?f:u.error,isUnhandledError:!t,meta:n}),delete r[e]}return m}}},Qe=({api:e,context:{apiUid:t}})=>n=>{let r=!1;return i=>a=>{r||(r=!0,n.dispatch(e.internalActions.middlewareRegistered(t)));const o=i(a);return e.util.resetApiState.match(a)&&n.dispatch(e.internalActions.middlewareRegistered(t)),o}};function De(e,...t){Object.assign(e,...t)}import{enablePatches as Ne}from"immer";var Ke=Symbol(),Me=()=>({name:Ke,init(t,{baseQuery:n,reducerPath:r,serializeQueryArgs:i,keepUnusedDataFor:a,refetchOnMountOrArgChange:o,refetchOnFocus:s,refetchOnReconnect:u},l){Ne();const p=e=>e;Object.assign(t,{reducerPath:r,endpoints:{},internalActions:{onOnline:C,onOffline:I,onFocus:x,onFocusLost:k},util:{}});const{queryThunk:m,mutationThunk:h,patchQueryData:g,updateQueryData:v,prefetch:b,buildMatchThunkActions:q}=function({reducerPath:t,baseQuery:n,context:{endpointDefinitions:r},serializeQueryArgs:i,api:a}){const o=async(e,{signal:t,rejectWithValue:i,fulfillWithValue:a,dispatch:o,getState:u,extra:c})=>{const d=r[e.endpointName];try{let r,i=X;const l={signal:t,dispatch:o,getState:u,extra:c,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?s(e,u()):void 0};if(d.query?(r=await n(d.query(e.originalArgs),l,d.extraOptions),d.transformResponse&&(i=d.transformResponse)):r=await d.queryFn(e.originalArgs,l,d.extraOptions,(e=>n(e,l,d.extraOptions))),r.error)throw new j(r.error,r.meta);return a(await i(r.data,r.meta,e.originalArgs),{fulfilledTimeStamp:Date.now(),baseQueryMeta:r.meta})}catch(e){if(e instanceof j)return i(e.value,{baseQueryMeta:e.meta});throw console.error(e),e}};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:Y(`${t}/executeQuery`,o,{getPendingMeta:()=>({startedTimeStamp:Date.now()}),condition(e,{getState:n}){var r,i;const a=n(),o=null==(i=null==(r=a[t])?void 0:r.queries)?void 0:i[e.queryCacheKey],u=null==o?void 0:o.fulfilledTimeStamp;return!("pending"===(null==o?void 0:o.status)||!s(e,a)&&u)},dispatchConditionRejection:!0}),mutationThunk:Y(`${t}/executeMutation`,o,{getPendingMeta:()=>({startedTimeStamp:Date.now()})}),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(J(s.data)){const[,e,t]=G(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},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:U(H(e),u(t)),matchFulfilled:U(W(e),u(t)),matchRejected:U(B(e),u(t))}}}}({baseQuery:n,reducerPath:r,context:l,api:t,serializeQueryArgs:i}),{reducer:O,actions:w}=function({reducerPath:t,queryThunk:n,mutationThunk:r,context:{endpointDefinitions:i,apiUid:a,extractRehydrationInfo:o,hasRehydrationInfo:s},assertTagType:u,config:l}){const f=F(`${t}/resetApiState`),p=z({name:`${t}/queries`,initialState:ie,reducers:{removeQueryResult(e,{payload:{queryCacheKey:t}}){delete e[t]},queryResultPatched(e,{payload:{queryCacheKey:t,patches:n}}){te(e,t,(e=>{e.data=ee(e.data,n.concat())}))}},extraReducers(t){t.addCase(n.pending,((t,{meta:n,meta:{arg:r}})=>{var i;r.subscribe&&(null!=t[i=r.queryCacheKey]||(t[i]={status:e.uninitialized,endpointName:r.endpointName})),te(t,r.queryCacheKey,(t=>{t.status=e.pending,t.requestId=n.requestId,void 0!==r.originalArgs&&(t.originalArgs=r.originalArgs),t.startedTimeStamp=n.startedTimeStamp}))})).addCase(n.fulfilled,((t,{meta:n,payload:r})=>{te(t,n.arg.queryCacheKey,(t=>{var a;t.requestId===n.requestId&&(t.status=e.fulfilled,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})=>{te(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=z({name:`${t}/mutations`,initialState:ie,reducers:{removeMutationResult(e,{payload:t}){const n=ne(t);n in e&&delete e[n]}},extraReducers(t){t.addCase(r.pending,((t,{meta:n,meta:{requestId:r,arg:i,startedTimeStamp:a}})=>{i.track&&(t[ne(n)]={requestId:r,status:e.pending,endpointName:i.endpointName,startedTimeStamp:a})})).addCase(r.fulfilled,((t,{payload:n,meta:r})=>{r.arg.track&&re(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&&re(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=z({name:`${t}/invalidation`,initialState:ie,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(_(L(n),$(n)),((e,t)=>{var n,r,a,o;const s=Z(t,"providesTags",i,u),{queryCacheKey:c}=t.meta.arg;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=z({name:`${t}/subscriptions`,initialState:ie,reducers:{updateSubscriptionOptions(e,{payload:{queryCacheKey:t,requestId:n,options:r}}){var i;(null==(i=null==e?void 0:e[t])?void 0:i[n])&&(e[t][n]=r)},unsubscribeQueryResult(e,{payload:{queryCacheKey:t,requestId:n}}){e[t]&&delete e[t][n]}},extraReducers:e=>{e.addCase(p.actions.removeQueryResult,((e,{payload:{queryCacheKey:t}})=>{delete e[t]})).addCase(n.pending,((e,{meta:{arg:t,requestId:n}})=>{var r,i,a,o;if(t.subscribe){const s=null!=(i=e[r=t.queryCacheKey])?i:e[r]={};s[n]=null!=(o=null!=(a=t.subscriptionOptions)?a:s[n])?o:{}}})).addCase(n.rejected,((e,{meta:{condition:t,arg:n,requestId:r}})=>{var i,a,o,s;if(t&&n.subscribe){const t=null!=(a=e[i=n.queryCacheKey])?a:e[i]={};t[r]=null!=(s=null!=(o=n.subscriptionOptions)?o:t[r])?s:{}}})).addMatcher(s,(e=>c({},e)))}}),v=z({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(C,(e=>{e.online=!0})).addCase(I,(e=>{e.online=!1})).addCase(x,(e=>{e.focused=!0})).addCase(k,(e=>{e.focused=!1})).addMatcher(s,(e=>c({},e)))}}),b=E({queries:p.reducer,mutations:m.reducer,provided:h.reducer,subscriptions:g.reducer,config:v.reducer});return{reducer:(e,t)=>b(f.match(t)?void 0:e,t),actions:d(c(c(c(c({},v.actions),p.actions),g.actions),m.actions),{unsubscribeMutationResult:m.actions.removeMutationResult,resetApiState:f})}}({context:l,queryThunk:m,mutationThunk:h,reducerPath:r,assertTagType:p,config:{refetchOnFocus:s,refetchOnReconnect:u,refetchOnMountOrArgChange:o,keepUnusedDataFor:a,reducerPath:r}});De(t.util,{patchQueryData:g,updateQueryData:v,prefetch:b,resetApiState:w.resetApiState}),De(t.internalActions,w),Object.defineProperty(t.util,"updateQueryResult",{get:()=>t.util.updateQueryData}),Object.defineProperty(t.util,"patchQueryResult",{get:()=>t.util.patchQueryData});const{middleware:R,actions:S}=function(e){const{reducerPath:t,queryThunk:n}=e,r={invalidateTags:ge(`${t}/invalidateTags`)},i=[Qe,ve,je,we,Re,xe,Pe].map((t=>t(d(c({},e),{refetchQuery:a}))));return{middleware:e=>n=>{const r=he(...i.map((t=>t(e))))(n);return i=>e.getState()[t]?r(i):n(i)},actions:r};function a(e,t,r={}){return n(c({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t},r))}}({reducerPath:r,context:l,queryThunk:m,mutationThunk:h,api:t,assertTagType:p});De(t.util,S),De(t,{reducer:O,middleware:R});const{buildQuerySelector:T,buildMutationSelector:P,selectInvalidatedBy:Q}=function({serializeQueryArgs:t,reducerPath:n}){return{buildQuerySelector:function(e,n){return a=>{const o=N(i,(r=>{var i,o;return null!=(o=a===ae||null==(i=null==r?void 0:r.queries)?void 0:i[t({queryArgs:a,endpointDefinition:n,endpointName:e})])?o:ue}));return N(o,r)}},buildMutationSelector:function(){return e=>{var t;let n;n="object"==typeof e?null!=(t=ne(e))?t:ae:e;const a=N(i,(e=>{var t,r;return null!=(r=n===ae||null==(t=null==e?void 0:e.mutations)?void 0:t[n])?r:ce}));return N(a,r)}},selectInvalidatedBy:function(e,t){var r;const i=e[n],a=new Set;for(const e of t.map(M)){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 r(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 i(e){return e[n]}}({serializeQueryArgs:i,reducerPath:r});De(t.util,{selectInvalidatedBy:Q});const{buildInitiateQuery:D,buildInitiateMutation:K,getRunningOperationPromises:V,getRunningOperationPromise:oe}=function({serializeQueryArgs:e,queryThunk:t,mutationThunk:n,api:r,context:i}){const a={},o={},{unsubscribeQueryResult:s,removeMutationResult:u,updateSubscriptionOptions:c}=r.internalActions;return{buildInitiateQuery:function(n,i){const o=(u,{subscribe:d=!0,forceRefetch:l,subscriptionOptions:f}={})=>(p,m)=>{const y=e({queryArgs:u,endpointDefinition:i,endpointName:n}),h=t({type:"query",subscribe:d,forceRefetch:l,subscriptionOptions:f,endpointName:n,originalArgs:u,queryCacheKey:y}),g=p(h),{requestId:v,abort:b}=g,q=Object.assign(Promise.all([a[y],g]).then((()=>r.endpoints[n].select(u)(m()))),{arg:u,requestId:v,subscriptionOptions:f,queryCacheKey:y,abort:b,async unwrap(){const e=await q;if(e.isError)throw e.error;return e.data},refetch(){p(o(u,{subscribe:!1,forceRefetch:!0}))},unsubscribe(){d&&p(s({queryCacheKey:y,requestId:v}))},updateSubscriptionOptions(e){q.subscriptionOptions=e,p(c({endpointName:n,requestId:v,queryCacheKey:y,options:e}))}});return a[y]||(a[y]=q,q.then((()=>{delete a[y]}))),q};return o},buildInitiateMutation:function(e){return(t,{track:r=!0,fixedCacheKey:i}={})=>(a,s)=>{const c=n({type:"mutation",endpointName:e,originalArgs:t,track:r,fixedCacheKey:i}),d=a(c),{requestId:l,abort:f,unwrap:p}=d,m=d.unwrap().then((e=>({data:e}))).catch((e=>({error:e}))),y=()=>{a(u({requestId:l,fixedCacheKey:i}))},h=Object.assign(m,{arg:d.arg,requestId:l,abort:f,unwrap:p,unsubscribe:y,reset:y});return o[l]=h,h.then((()=>{delete o[l]})),i&&(o[i]=h,h.then((()=>{o[i]===h&&delete o[i]}))),h}},getRunningOperationPromises:function(){return[...Object.values(a),...Object.values(o)].filter((e=>!!e))},getRunningOperationPromise:function(t,n){const r=i.endpointDefinitions[t];if(r.type===A.query){const i=e({queryArgs:n,endpointDefinition:r,endpointName:t});return a[i]}return o[n]}}}({queryThunk:m,mutationThunk:h,api:t,serializeQueryArgs:i,context:l});return De(t.util,{getRunningOperationPromises:V,getRunningOperationPromise:oe}),{name:Ke,injectEndpoint(e,n){var r;const i=t;null!=(r=i.endpoints)[e]||(r[e]={}),n.type===A.query?De(i.endpoints[e],{select:T(e,n),initiate:D(e,n)},q(m,e)):n.type===A.mutation&&De(i.endpoints[e],{select:P(),initiate:K(e)},q(h,e))}}}}),Ee=me(Me());export{e as QueryStatus,me as buildCreateApi,y as copyWithStructuralSharing,Me as coreModule,Ee as createApi,ye as fakeBaseQuery,O as fetchBaseQuery,R as retry,Q as setupListeners,oe as skipSelector,ae 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},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 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=async(e,t)=>{if("function"==typeof t)return t(e);if("text"===t)return e.text();if("json"===t){const t=await e.text();return t.length?JSON.parse(t):null}};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}=t,o=l(t,["baseUrl","prepareHeaders","fetchFn","paramsSerializer"]);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:s,getState:u,extra:f,endpoint:p,forced:m,type:y}=t;let g,O="string"==typeof e?{url:e}:e,{url:j,method:w="GET",headers:R=new Headers({}),body:S,params:A,responseHandler:x="json",validateStatus:T=v}=O,k=l(O,["url","method","headers","body","params","responseHandler","validateStatus"]),C=c(d(c({},o),{method:w,signal:s,body:S}),k);C.headers=await r(new Headers(q(R)),{getState:u,extra:f,endpoint:p,forced:m,type:y});const I=e=>"object"==typeof e&&(h(e)||Array.isArray(e)||"function"==typeof e.toJSON);if(!C.headers.has("content-type")&&I(S)&&C.headers.set("content-type","application/json"),I(S)&&(e=>{var t,n;return null==(n=null==(t=e.get("content-type"))?void 0:t.trim())?void 0:n.startsWith("application/json")})(C.headers)&&(C.body=JSON.stringify(S)),A){const e=~j.indexOf("?")?"&":"?";j+=e+(a?a(A):new URLSearchParams(q(A)))}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 P=new Request(j,C);let Q;g={request:P.clone()};try{Q=await i(P)}catch(e){return{error:{status:"FETCH_ERROR",error:String(e)},meta:g}}const D=Q.clone();let N;g.response=D;let K="";try{let e;if(await Promise.all([b(Q,x).then((e=>N=e),(t=>e=t)),D.text().then((e=>K=e),(()=>{}))]),e)throw e}catch(e){return{error:{status:"PARSING_ERROR",originalStatus:Q.status,data:K,error:String(e)},meta:g}}return T(Q,N)?{data:N,meta:g}:{error:{status:Q.status,data:N},meta:g}}}var j=class{constructor(e,t){this.value=e,this.meta=t}};async function w(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 R=Object.assign(((e,t)=>async(n,r,i)=>{const a=c(c({maxRetries:5,backoff:w},t),i);let o=0;for(;;)try{const t=await e(n,r,i);if(t.error)throw new j(t);return t}catch(e){if(o++,e.throwImmediately||o>a.maxRetries){if(e instanceof j)return e.value;throw e}await a.backoff(o,a.maxRetries)}}),{fail:function(e){throw Object.assign(new j({error:e}),{throwImmediately:!0})}});import{createAction as S}from"@reduxjs/toolkit";var A,x,T=S("__rtkq/focused"),k=S("__rtkq/unfocused"),C=S("__rtkq/online"),I=S("__rtkq/offline"),P=!1;function Q(e,t){return t?t(e,{onFocus:T,onFocusLost:k,onOffline:I,onOnline:C}):function(){const t=()=>e(T()),n=()=>e(C()),r=()=>e(I()),i=()=>{"visible"===window.document.visibilityState?t():e(k())};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 K(e,t,n,r,i,a){return"function"==typeof e?e(t,n,r,i).map(M).map(a):Array.isArray(e)?e.map(M).map(a):[]}function M(e){return"string"==typeof e?{type:e}:e}(x=A||(A={})).query="query",x.mutation="mutation";import{combineReducers as E,createAction as F,createSlice as z,isAnyOf as _,isFulfilled as L,isRejectedWithValue as $}from"@reduxjs/toolkit";import{isAllOf as U,isFulfilled as W,isPending as H,isRejected as B,isRejectedWithValue as V}from"@reduxjs/toolkit";import{isDraftable as J,produceWithPatches as G}from"immer";import{createAsyncThunk as Y}from"@reduxjs/toolkit";function X(e){return e}function Z(e,t,n,r){return K(n[e.meta.arg.endpointName][t],W(e)?e.payload:void 0,V(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}import{applyPatches as ee}from"immer";function te(e,t,n){const r=e[t];r&&n(r)}function ne(e){var t;return null!=(t="arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)?t:e.requestId}function re(e,t,n){const r=e[ne(t)];r&&n(r)}var ie={},ae=Symbol.for("RTKQ/skipToken"),oe=ae,se={status:e.uninitialized},ue=D(se,(()=>{})),ce=D(se,(()=>{}));import{isPlainObject as de}from"@reduxjs/toolkit";var le=({endpointName:e,queryArgs:t})=>`${e}(${JSON.stringify(t,((e,t)=>de(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))})`;import{nanoid as fe}from"@reduxjs/toolkit";import{defaultMemoize as pe}from"reselect";function me(...e){return function(t){const n=pe((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",serializeQueryArgs:le,keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1},t),{extractRehydrationInfo:n,tagTypes:[...t.tagTypes||[]]}),i={endpointDefinitions:{},batch(e){e()},apiUid:fe(),extractRehydrationInfo:n,hasRehydrationInfo:pe((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 ye(){return function(){throw new Error("When using `fakeBaseQuery`, all queries & mutations must use the `queryFn` definition syntax.")}}import{compose as he}from"redux";import{createAction as ge}from"@reduxjs/toolkit";var ve=({reducerPath:e,api:t,context:n})=>{const{removeQueryResult:r,unsubscribeQueryResult:i}=t.internalActions;return a=>{const o={};return r=>u=>{var c;const d=r(u);if(i.match(u)){const t=a.getState()[e],{queryCacheKey:n}=u.payload;s(n,null==(c=t.queries[n])?void 0:c.endpointName,a,t.config)}if(t.util.resetApiState.match(u))for(const[e,t]of Object.entries(o))t&&clearTimeout(t),delete o[e];if(n.hasRehydrationInfo(u)){const t=a.getState()[e],{queries:r}=n.extractRehydrationInfo(u);for(const[e,n]of Object.entries(r))s(e,null==n?void 0:n.endpointName,a,t.config)}return d};function s(t,i,a,s){var u;const c=n.endpointDefinitions[i],d=null!=(u=null==c?void 0:c.keepUnusedDataFor)?u:s.keepUnusedDataFor,l=Math.max(0,Math.min(d,2147482.647)),f=o[t];f&&clearTimeout(f),o[t]=setTimeout((()=>{const n=a.getState()[e].subscriptions[t];n&&0!==Object.keys(n).length||a.dispatch(r({queryCacheKey:t})),delete o[t]}),1e3*l)}}};import{isAnyOf as be,isFulfilled as qe,isRejectedWithValue as Oe}from"@reduxjs/toolkit";var je=({reducerPath:t,context:n,context:{endpointDefinitions:r},mutationThunk:i,api:a,assertTagType:o,refetchQuery:s})=>{const{removeQueryResult:u}=a.internalActions;return e=>t=>n=>{const s=t(n);return be(qe(i),Oe(i))(n)&&c(Z(n,"invalidatesTags",r,o),e),a.util.invalidateTags.match(n)&&c(K(n.payload,void 0,void 0,void 0,void 0,o),e),s};function c(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)))}}))}},we=({reducerPath:t,queryThunk:n,api:r,refetchQuery:i})=>{return o=>{const s={};return e=>t=>{const i=e(t);return(r.internalActions.updateSubscriptionOptions.match(t)||r.internalActions.unsubscribeQueryResult.match(t))&&c(t.payload,o),(n.pending.match(t)||n.rejected.match(t)&&t.meta.condition)&&c(t.meta.arg,o),(n.fulfilled.match(t)||n.rejected.match(t)&&!t.meta.condition)&&u(t.meta.arg,o),r.util.resetApiState.match(t)&&function(){for(const e of Object.keys(s))d(e)}(),i};function u({queryCacheKey:n},r){const o=r.getState()[t],u=o.queries[n];if(!u||u.status===e.uninitialized)return;const c=a(o.subscriptions[n]);if(!Number.isFinite(c))return;const d=s[n];(null==d?void 0:d.timeout)&&(clearTimeout(d.timeout),d.timeout=void 0);const l=Date.now()+c,f=s[n]={nextPollTimestamp:l,pollingInterval:c,timeout:setTimeout((()=>{f.timeout=void 0,r.dispatch(i(u,n))}),c)}}function c({queryCacheKey:n},r){const i=r.getState()[t],o=i.queries[n];if(!o||o.status===e.uninitialized)return;const c=a(i.subscriptions[n]);if(!Number.isFinite(c))return void d(n);const l=s[n],f=Date.now()+c;(!l||f<l.nextPollTimestamp)&&u({queryCacheKey:n},r)}function d(e){const t=s[e];(null==t?void 0:t.timeout)&&clearTimeout(t.timeout),delete s[e]}};function a(e={}){let t=Number.POSITIVE_INFINITY;for(const n of Object.values(e))n.pollingInterval&&(t=Math.min(n.pollingInterval,t));return t}},Re=({reducerPath:t,context:n,api:r,refetchQuery:i})=>{const{removeQueryResult:a}=r.internalActions;return e=>t=>n=>{const r=t(n);return T.match(n)&&o(e,"refetchOnFocus"),C.match(n)&&o(e,"refetchOnReconnect"),r};function o(r,o){const s=r.getState()[t],u=s.queries,c=s.subscriptions;n.batch((()=>{for(const t of Object.keys(c)){const n=u[t],d=c[t];d&&n&&(Object.values(d).some((e=>!0===e[o]))||Object.values(d).every((e=>void 0===e[o]))&&s.config[o])&&(0===Object.keys(d).length?r.dispatch(a({queryCacheKey:t})):n.status!==e.uninitialized&&r.dispatch(i(n,t)))}}))}};import{isAsyncThunkAction as Se,isFulfilled as Ae}from"@reduxjs/toolkit";var xe=new Error("Promise never resolved before cacheEntryRemoved."),Te=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:i})=>{const a=Se(r),o=Se(i),s=Ae(r,i);return u=>{const l={};return n=>c=>{const d=u.getState(),p=n(c),m=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)?ne(t.payload):""}(c);if(r.pending.match(c)){const e=d[t].queries[m],n=u.getState()[t].queries[m];!e&&n&&f(c.meta.arg.endpointName,c.meta.arg.originalArgs,m,u,c.meta.requestId)}else if(i.pending.match(c))u.getState()[t].mutations[m]&&f(c.meta.arg.endpointName,c.meta.arg.originalArgs,m,u,c.meta.requestId);else if(s(c)){const e=l[m];(null==e?void 0:e.valueResolved)&&(e.valueResolved({data:c.payload,meta:c.meta.baseQueryMeta}),delete e.valueResolved)}else if(e.internalActions.removeQueryResult.match(c)||e.internalActions.removeMutationResult.match(c)){const e=l[m];e&&(delete l[m],e.cacheEntryRemoved())}else if(e.util.resetApiState.match(c))for(const[e,t]of Object.entries(l))delete l[e],t.cacheEntryRemoved();return p};function f(t,r,i,a,o){const s=n.endpointDefinitions[t],u=null==s?void 0:s.onCacheEntryAdded;if(!u)return;let f={};const p=new Promise((e=>{f.cacheEntryRemoved=e})),m=Promise.race([new Promise((e=>{f.valueResolved=e})),p.then((()=>{throw xe}))]);m.catch((()=>{})),l[i]=f;const y=e.endpoints[t].select(s.type===A.query?r:i),h=a.dispatch(((e,t,n)=>n)),g=d(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=u(r,g);Promise.resolve(v).catch((e=>{if(e!==xe)throw e}))}}};import{isPending as ke,isRejected as Ce,isFulfilled as Ie}from"@reduxjs/toolkit";var Pe=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const i=ke(n,r),a=Ce(n,r),o=Ie(n,r);return n=>{const r={};return s=>u=>{var l,f,p;const m=s(u);if(i(u)){const{requestId:i,arg:{endpointName:a,originalArgs:o}}=u.meta,s=t.endpointDefinitions[a],l=null==s?void 0:s.onQueryStarted;if(l){const t={},u=new Promise(((e,n)=>{t.resolve=e,t.reject=n}));u.catch((()=>{})),r[i]=t;const f=e.endpoints[a].select(s.type===A.query?o:i),p=n.dispatch(((e,t,n)=>n)),m=d(c({},n),{getCacheEntry:()=>f(n.getState()),requestId:i,extra:p,updateCachedData:s.type===A.query?t=>n.dispatch(e.util.updateQueryData(a,o,t)):void 0,queryFulfilled:u});l(o,m)}}else if(o(u)){const{requestId:e,baseQueryMeta:t}=u.meta;null==(l=r[e])||l.resolve({data:u.payload,meta:t}),delete r[e]}else if(a(u)){const{requestId:e,rejectedWithValue:t,baseQueryMeta:n}=u.meta;null==(p=r[e])||p.reject({error:null!=(f=u.payload)?f:u.error,isUnhandledError:!t,meta:n}),delete r[e]}return m}}},Qe=({api:e,context:{apiUid:t}})=>n=>{let r=!1;return i=>a=>{r||(r=!0,n.dispatch(e.internalActions.middlewareRegistered(t)));const o=i(a);return e.util.resetApiState.match(a)&&n.dispatch(e.internalActions.middlewareRegistered(t)),o}};function De(e,...t){Object.assign(e,...t)}import{enablePatches as Ne}from"immer";var Ke=Symbol(),Me=()=>({name:Ke,init(t,{baseQuery:n,reducerPath:r,serializeQueryArgs:i,keepUnusedDataFor:a,refetchOnMountOrArgChange:o,refetchOnFocus:s,refetchOnReconnect:u},l){Ne();const p=e=>e;Object.assign(t,{reducerPath:r,endpoints:{},internalActions:{onOnline:C,onOffline:I,onFocus:T,onFocusLost:k},util:{}});const{queryThunk:m,mutationThunk:h,patchQueryData:g,updateQueryData:v,prefetch:b,buildMatchThunkActions:q}=function({reducerPath:t,baseQuery:n,context:{endpointDefinitions:r},serializeQueryArgs:i,api:a}){const o=async(e,{signal:t,rejectWithValue:i,fulfillWithValue:a,dispatch:o,getState:u,extra:c})=>{const d=r[e.endpointName];try{let r,i=X;const l={signal:t,dispatch:o,getState:u,extra:c,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?s(e,u()):void 0};if(d.query?(r=await n(d.query(e.originalArgs),l,d.extraOptions),d.transformResponse&&(i=d.transformResponse)):r=await d.queryFn(e.originalArgs,l,d.extraOptions,(e=>n(e,l,d.extraOptions))),r.error)throw new j(r.error,r.meta);return a(await i(r.data,r.meta,e.originalArgs),{fulfilledTimeStamp:Date.now(),baseQueryMeta:r.meta})}catch(e){if(e instanceof j)return i(e.value,{baseQueryMeta:e.meta});throw console.error(e),e}};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:Y(`${t}/executeQuery`,o,{getPendingMeta:()=>({startedTimeStamp:Date.now()}),condition(e,{getState:n}){var r,i;const a=n(),o=null==(i=null==(r=a[t])?void 0:r.queries)?void 0:i[e.queryCacheKey],u=null==o?void 0:o.fulfilledTimeStamp;return!("pending"===(null==o?void 0:o.status)||!s(e,a)&&u)},dispatchConditionRejection:!0}),mutationThunk:Y(`${t}/executeMutation`,o,{getPendingMeta:()=>({startedTimeStamp:Date.now()})}),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(J(s.data)){const[,e,t]=G(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},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:U(H(e),u(t)),matchFulfilled:U(W(e),u(t)),matchRejected:U(B(e),u(t))}}}}({baseQuery:n,reducerPath:r,context:l,api:t,serializeQueryArgs:i}),{reducer:O,actions:w}=function({reducerPath:t,queryThunk:n,mutationThunk:r,context:{endpointDefinitions:i,apiUid:a,extractRehydrationInfo:o,hasRehydrationInfo:s},assertTagType:u,config:l}){const f=F(`${t}/resetApiState`),p=z({name:`${t}/queries`,initialState:ie,reducers:{removeQueryResult(e,{payload:{queryCacheKey:t}}){delete e[t]},queryResultPatched(e,{payload:{queryCacheKey:t,patches:n}}){te(e,t,(e=>{e.data=ee(e.data,n.concat())}))}},extraReducers(t){t.addCase(n.pending,((t,{meta:n,meta:{arg:r}})=>{var i;r.subscribe&&(null!=t[i=r.queryCacheKey]||(t[i]={status:e.uninitialized,endpointName:r.endpointName})),te(t,r.queryCacheKey,(t=>{t.status=e.pending,t.requestId=n.requestId,void 0!==r.originalArgs&&(t.originalArgs=r.originalArgs),t.startedTimeStamp=n.startedTimeStamp}))})).addCase(n.fulfilled,((t,{meta:n,payload:r})=>{te(t,n.arg.queryCacheKey,(t=>{var a;t.requestId===n.requestId&&(t.status=e.fulfilled,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})=>{te(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=z({name:`${t}/mutations`,initialState:ie,reducers:{removeMutationResult(e,{payload:t}){const n=ne(t);n in e&&delete e[n]}},extraReducers(t){t.addCase(r.pending,((t,{meta:n,meta:{requestId:r,arg:i,startedTimeStamp:a}})=>{i.track&&(t[ne(n)]={requestId:r,status:e.pending,endpointName:i.endpointName,startedTimeStamp:a})})).addCase(r.fulfilled,((t,{payload:n,meta:r})=>{r.arg.track&&re(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&&re(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=z({name:`${t}/invalidation`,initialState:ie,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(_(L(n),$(n)),((e,t)=>{var n,r,a,o;const s=Z(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=z({name:`${t}/subscriptions`,initialState:ie,reducers:{updateSubscriptionOptions(e,{payload:{queryCacheKey:t,requestId:n,options:r}}){var i;(null==(i=null==e?void 0:e[t])?void 0:i[n])&&(e[t][n]=r)},unsubscribeQueryResult(e,{payload:{queryCacheKey:t,requestId:n}}){e[t]&&delete e[t][n]}},extraReducers:e=>{e.addCase(p.actions.removeQueryResult,((e,{payload:{queryCacheKey:t}})=>{delete e[t]})).addCase(n.pending,((e,{meta:{arg:t,requestId:n}})=>{var r,i,a,o;if(t.subscribe){const s=null!=(i=e[r=t.queryCacheKey])?i:e[r]={};s[n]=null!=(o=null!=(a=t.subscriptionOptions)?a:s[n])?o:{}}})).addCase(n.rejected,((e,{meta:{condition:t,arg:n,requestId:r}})=>{var i,a,o,s;if(t&&n.subscribe){const t=null!=(a=e[i=n.queryCacheKey])?a:e[i]={};t[r]=null!=(s=null!=(o=n.subscriptionOptions)?o:t[r])?s:{}}})).addMatcher(s,(e=>c({},e)))}}),v=z({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(C,(e=>{e.online=!0})).addCase(I,(e=>{e.online=!1})).addCase(T,(e=>{e.focused=!0})).addCase(k,(e=>{e.focused=!1})).addMatcher(s,(e=>c({},e)))}}),b=E({queries:p.reducer,mutations:m.reducer,provided:h.reducer,subscriptions:g.reducer,config:v.reducer});return{reducer:(e,t)=>b(f.match(t)?void 0:e,t),actions:d(c(c(c(c({},v.actions),p.actions),g.actions),m.actions),{unsubscribeMutationResult:m.actions.removeMutationResult,resetApiState:f})}}({context:l,queryThunk:m,mutationThunk:h,reducerPath:r,assertTagType:p,config:{refetchOnFocus:s,refetchOnReconnect:u,refetchOnMountOrArgChange:o,keepUnusedDataFor:a,reducerPath:r}});De(t.util,{patchQueryData:g,updateQueryData:v,prefetch:b,resetApiState:w.resetApiState}),De(t.internalActions,w),Object.defineProperty(t.util,"updateQueryResult",{get:()=>t.util.updateQueryData}),Object.defineProperty(t.util,"patchQueryResult",{get:()=>t.util.patchQueryData});const{middleware:R,actions:S}=function(e){const{reducerPath:t,queryThunk:n}=e,r={invalidateTags:ge(`${t}/invalidateTags`)},i=[Qe,ve,je,we,Re,Te,Pe].map((t=>t(d(c({},e),{refetchQuery:a}))));return{middleware:e=>n=>{const r=he(...i.map((t=>t(e))))(n);return i=>e.getState()[t]?r(i):n(i)},actions:r};function a(e,t,r={}){return n(c({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t},r))}}({reducerPath:r,context:l,queryThunk:m,mutationThunk:h,api:t,assertTagType:p});De(t.util,S),De(t,{reducer:O,middleware:R});const{buildQuerySelector:x,buildMutationSelector:P,selectInvalidatedBy:Q}=function({serializeQueryArgs:t,reducerPath:n}){return{buildQuerySelector:function(e,n){return a=>{const o=N(i,(r=>{var i,o;return null!=(o=a===ae||null==(i=null==r?void 0:r.queries)?void 0:i[t({queryArgs:a,endpointDefinition:n,endpointName:e})])?o:ue}));return N(o,r)}},buildMutationSelector:function(){return e=>{var t;let n;n="object"==typeof e?null!=(t=ne(e))?t:ae:e;const a=N(i,(e=>{var t,r;return null!=(r=n===ae||null==(t=null==e?void 0:e.mutations)?void 0:t[n])?r:ce}));return N(a,r)}},selectInvalidatedBy:function(e,t){var r;const i=e[n],a=new Set;for(const e of t.map(M)){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 r(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 i(e){return e[n]}}({serializeQueryArgs:i,reducerPath:r});De(t.util,{selectInvalidatedBy:Q});const{buildInitiateQuery:D,buildInitiateMutation:K,getRunningOperationPromises:V,getRunningOperationPromise:oe}=function({serializeQueryArgs:e,queryThunk:t,mutationThunk:n,api:r,context:i}){const a={},o={},{unsubscribeQueryResult:s,removeMutationResult:u,updateSubscriptionOptions:c}=r.internalActions;return{buildInitiateQuery:function(n,i){const o=(u,{subscribe:d=!0,forceRefetch:l,subscriptionOptions:f}={})=>(p,m)=>{const y=e({queryArgs:u,endpointDefinition:i,endpointName:n}),h=t({type:"query",subscribe:d,forceRefetch:l,subscriptionOptions:f,endpointName:n,originalArgs:u,queryCacheKey:y}),g=p(h),{requestId:v,abort:b}=g,q=Object.assign(Promise.all([a[y],g]).then((()=>r.endpoints[n].select(u)(m()))),{arg:u,requestId:v,subscriptionOptions:f,queryCacheKey:y,abort:b,async unwrap(){const e=await q;if(e.isError)throw e.error;return e.data},refetch(){p(o(u,{subscribe:!1,forceRefetch:!0}))},unsubscribe(){d&&p(s({queryCacheKey:y,requestId:v}))},updateSubscriptionOptions(e){q.subscriptionOptions=e,p(c({endpointName:n,requestId:v,queryCacheKey:y,options:e}))}});return a[y]||(a[y]=q,q.then((()=>{delete a[y]}))),q};return o},buildInitiateMutation:function(e){return(t,{track:r=!0,fixedCacheKey:i}={})=>(a,s)=>{const c=n({type:"mutation",endpointName:e,originalArgs:t,track:r,fixedCacheKey:i}),d=a(c),{requestId:l,abort:f,unwrap:p}=d,m=d.unwrap().then((e=>({data:e}))).catch((e=>({error:e}))),y=()=>{a(u({requestId:l,fixedCacheKey:i}))},h=Object.assign(m,{arg:d.arg,requestId:l,abort:f,unwrap:p,unsubscribe:y,reset:y});return o[l]=h,h.then((()=>{delete o[l]})),i&&(o[i]=h,h.then((()=>{o[i]===h&&delete o[i]}))),h}},getRunningOperationPromises:function(){return[...Object.values(a),...Object.values(o)].filter((e=>!!e))},getRunningOperationPromise:function(t,n){const r=i.endpointDefinitions[t];if(r.type===A.query){const i=e({queryArgs:n,endpointDefinition:r,endpointName:t});return a[i]}return o[n]}}}({queryThunk:m,mutationThunk:h,api:t,serializeQueryArgs:i,context:l});return De(t.util,{getRunningOperationPromises:V,getRunningOperationPromise:oe}),{name:Ke,injectEndpoint(e,n){var r;const i=t;null!=(r=i.endpoints)[e]||(r[e]={}),n.type===A.query?De(i.endpoints[e],{select:x(e,n),initiate:D(e,n)},q(m,e)):n.type===A.mutation&&De(i.endpoints[e],{select:P(),initiate:K(e)},q(h,e))}}}}),Ee=me(Me());export{e as QueryStatus,me as buildCreateApi,y as copyWithStructuralSharing,Me as coreModule,Ee as createApi,ye as fakeBaseQuery,O as fetchBaseQuery,R as retry,Q as setupListeners,oe as skipSelector,ae 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 j(e){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]||!!e.constructor[ue]||I(e)||T(e))}function q(e,t,n){void 0===n&&(n=!1),0===A(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 A(e){var t=e[ae];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:I(e)?2:T(e)?3:0}function P(e,t){return 2===A(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function S(e,t){return 2===A(e)?e.get(t):e[t]}function R(e,t,n){var r=A(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n;}function x(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function I(e){return te&&e instanceof Map}function T(e){return ne&&e instanceof Set}function C(e){return e.o||e.t}function E(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 k(e,t){return void 0===t&&(t=!1),N(e)||w(e)||!j(e)||(A(e)>1&&(e.set=e.add=e.clear=e.delete=D),Object.freeze(e),t&&q(e,(function(e,t){return k(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 _(e,t){fe[e]||(fe[e]=t);}function M(){return m}function K(e,t){t&&(Q("Patches"),e.u=[],e.s=[],e.v=t);}function F(e){z(e),e.p.forEach(L),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 L(e){var t=e[ae];0===t.i||1===t.i?t.j():t.O=!0;}function W(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)),j(e)&&(e=B(t,e),t.l||H(t,e)),t.u&&Q("Patches").M(n[ae],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 q(t,(function(i,u){return V(e,r,t,i,u,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return H(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=E(r.k):r.o;q(3===r.i?new Set(i):i,(function(t,u){return V(e,r,i,t,u,n)})),H(e,i,!1),n&&e.u&&Q("Patches").R(r,n,e.u,e.s);}return r.o}function V(e,t,n,r,i,u){if(w(i)){var a=B(e,i,u&&t&&3!==t.i&&!P(t.D,r)?u.concat(r):void 0);if(R(n,r,a),!w(a))return;e.m=!1;}if(j(i)&&!N(i)){if(!e.h.F&&e._<1)return;B(e,i),t&&t.A.l||H(e,i);}}function H(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&k(t,n);}function J(e,t){var n=e[ae];return (n?C(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=E(e.t));}function Y(e,t,n){var r=I(t)?Q("MapSet").N(t,n):T(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:M(),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:M()).p.push(r),r}function Z(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return E(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=C(e);if(!P(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||!j(a)?a:a===J(e.t,t)?(X(e),e.o[t]=Y(e.A.h,a,e)):a},has:function(e,t){return t in C(e)},ownKeys:function(e){return Reflect.ownKeys(C(e))},set:function(e,t,n){var r=G(C(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=J(C(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(x(n,i)&&(void 0!==n||P(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!==J(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=C(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={};q(le,(function(e,t){de[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)};})),de.deleteProperty=function(e,t){return le.deleteProperty.call(this,e[0],t)},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),j(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),W(e,o)}),(function(e){throw F(o),e})):(K(o,r),W(a,o))}if(!e||"object"!=typeof e){if((a=n(e))===ie)return;return void 0===a&&(a=e),t.F&&k(a,!0),a}O(21,e);},this.produceWithPatches=function(e,n){return "function"==typeof e?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))}))}:[t.produce(e,n,(function(e,t){r=e,i=t;})),r,i];var 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){j(e)||O(8),w(e)&&(e=function(e){return w(e)||O(22,e),function e(t){if(!j(t))return t;var n,r=t[ae],i=A(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 q(n,(function(t,i){r&&S(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),W(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()}};function we(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}var je=function(e,t){return e===t};function qe(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?je: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 Ae(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 Pe(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=Ae(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 Se=Pe(qe);function Re(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 xe(e){return j(e)?ge(e,(function(){})):e}function Ie(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 Te(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 Ce(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:xe(e.initialState),i=e.reducers||{},a=Object.keys(i),o={},c={},s={};function f(){var t="function"==typeof e.extraReducers?Te(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){void 0===n&&(n=[]);var i,a="function"==typeof t?Te(t):[t,n,r],o=a[0],c=a[1],s=a[2];if("function"==typeof e)i=function(){return xe(e())};else {var f=xe(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(j(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,f,a,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?Ie(a,r):Ie(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 Ee=function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},ke=["name","message","stack","code"],De=function(e,t){this.payload=e,this.meta=t;},Ne=function(e,t){this.payload=e,this.meta=t;},Qe=function(e){if("object"==typeof e&&null!==e){for(var t={},n=0,r=ke;n<r.length;n++){var i=r[n];"string"==typeof e[i]&&(t[i]=e[i]);}return t}return {message:String(e)}};function _e(e,t,n){var r=Ie(e+"/fulfilled",(function(e,t,n,r){return {payload:e,meta:v(p({},r||{}),{arg:n,requestId:t,requestStatus:"fulfilled"})}})),u=Ie(e+"/pending",(function(e,t,n){return {payload:void 0,meta:v(p({},n||{}),{arg:t,requestId:e,requestStatus:"pending"})}})),a=Ie(e+"/rejected",(function(e,t,r,i,u){return {payload:i,error:(n&&n.serializeError||Qe)(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):Ee(),p=new o,v=new Promise((function(e,t){return p.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:l||"Aborted"})}))})),h=!1,g=function(){return y(this,null,(function(){var o,l,y,g,m;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),null===(b=g=null==(o=null==n?void 0:n.condition)?void 0:o.call(n,e,{getState:s,extra:f}))||"object"!=typeof b||"function"!=typeof b.then?[3,2]:[4,g];case 1:g=i.sent(),i.label=2;case 2:if(!1===g)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,rejectWithValue:function(e,t){return new De(e,t)},fulfillWithValue:function(e,t){return new Ne(e,t)}})).then((function(t){if(t instanceof De)throw t;return t instanceof Ne?r(t.payload,d,e,t.meta):r(t,d,e)}))])];case 3:return y=i.sent(),[3,5];case 4:return m=i.sent(),y=m instanceof De?a(null,d,e,m.payload,m.meta):a(m,d,e),[3,5];case 5:return n&&!n.dispatchConditionRejection&&a.match(y)&&y.meta.condition||c(y),[2,y]}var b;}))}))}();return Object.assign(g,{abort:function(e){h&&(l=e,p.abort());},requestId:d,arg:e,unwrap:function(){return g.then(Me)}})}}),{pending:u,rejected:a,fulfilled:r,typePrefix:e})}function Me(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var Ke=function(e,t){return (n=e)&&"function"==typeof n.match?e.match(t):e(t);var n;};function Fe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.some((function(e){return Ke(e,t)}))}}function ze(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.every((function(e){return Ke(e,t)}))}}function Ue(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 Le(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 Ue(e,["pending"])}:Le(e)?function(t){var n=e.map((function(e){return e.pending}));return Fe.apply(void 0,n)(t)}:We()(e[0])}function Be(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return Ue(e,["rejected"])}:Le(e)?function(t){var n=e.map((function(e){return e.rejected}));return Fe.apply(void 0,n)(t)}:Be()(e[0])}function Ve(){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||Le(e)?function(t){return ze(Be.apply(void 0,e),n)(t)}:Ve()(e[0])}function He(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return Ue(e,["fulfilled"])}:Le(e)?function(t){var n=e.map((function(e){return e.fulfilled}));return Fe.apply(void 0,n)(t)}:He()(e[0])}function Je(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return Ue(e,["pending","fulfilled","rejected"])}:Le(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 Fe.apply(void 0,n)(t)}:Je()(e[0])}!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&&!P(t,u))return !0;var o=n[u],c=o&&o[ae];if(c?c.t!==a:!x(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);return !(!n||n.get)}var i={};_("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:M(),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)q(u,(function(t){t!==ae&&(void 0!==i[t]||P(i,t)?a[t]||e(u[t]):(a[t]=!0,$(n)));})),q(i,(function(e){void 0!==u[e]||P(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++)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 Ge=Re;function $e(e,t){if(e===t||!(Ge(e)&&Ge(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]=$e(e[c],t[c]),i&&(i=e[c]===u[c]);}return i?e:u}var Xe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return fetch.apply(void 0,e)},Ye=function(e){return e.status>=200&&e.status<=299},Ze=function(e,t){return y(void 0,null,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return "function"==typeof t?[2,t(e)]:"text"===t?[2,e.text()]:"json"!==t?[3,2]:[4,e.text()];case 1:return [2,(n=r.sent()).length?JSON.parse(n):null];case 2:return [2]}}))}))};function et(e){if(!Re(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 tt(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?Xe:a,c=e.paramsSerializer,s=h(e,["baseUrl","prepareHeaders","fetchFn","paramsSerializer"]);return "undefined"==typeof fetch&&o===Xe&&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,f,l,d,y,g,m,b,O,w,j,q,A,P,S,R,x,I,T,C,E,k,D,N,Q,_,M,K,F,z,U,L,W,B,V;return i(this,(function(i){switch(i.label){case 0:return t=r.signal,a=r.getState,f=r.extra,l=r.endpoint,d=r.forced,y=r.type,b=(m="string"==typeof e?{url:e}:e).url,w=void 0===(O=m.method)?"GET":O,q=void 0===(j=m.headers)?new Headers({}):j,P=void 0===(A=m.body)?void 0:A,R=void 0===(S=m.params)?void 0:S,I=void 0===(x=m.responseHandler)?"json":x,C=void 0===(T=m.validateStatus)?Ye:T,E=h(m,["url","method","headers","body","params","responseHandler","validateStatus"]),k=p(v(p({},s),{method:w,signal:t,body:P}),E),D=k,[4,u(new Headers(et(q)),{getState:a,extra:f,endpoint:l,forced:d,type:y})];case 1:D.headers=i.sent(),N=function(e){return "object"==typeof e&&(Re(e)||Array.isArray(e)||"function"==typeof e.toJSON)},!k.headers.has("content-type")&&N(P)&&k.headers.set("content-type","application/json"),N(P)&&function(e){var t,n;return null==(n=null==(t=e.get("content-type"))?void 0:t.trim())?void 0:n.startsWith("application/json")}(k.headers)&&(k.body=JSON.stringify(P)),R&&(Q=~b.indexOf("?")?"&":"?",_=c?c(R):new URLSearchParams(et(R)),b+=Q+_),b=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,b),M=new Request(b,k),K=M.clone(),g={request:K},i.label=2;case 2:return i.trys.push([2,4,,5]),[4,o(M)];case 3:return F=i.sent(),[3,5];case 4:return z=i.sent(),[2,{error:{status:"FETCH_ERROR",error:String(z)},meta:g}];case 5:U=F.clone(),g.response=U,W="",i.label=6;case 6:return i.trys.push([6,8,,9]),[4,Promise.all([Ze(F,I).then((function(e){return L=e}),(function(e){return B=e})),U.text().then((function(e){return W=e}),(function(){}))])];case 7:if(i.sent(),B)throw B;return [3,9];case 8:return V=i.sent(),[2,{error:{status:"PARSING_ERROR",originalStatus:F.status,data:W,error:String(V)},meta:g}];case 9:return [2,C(F,L)?{data:L,meta:g}:{error:{status:F.status,data:L},meta:g}]}}))}))}}var nt=function(e,t){void 0===t&&(t=void 0),this.value=e,this.meta=t;};function rt(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 it,ut,at=Object.assign((function(e,t){return function(n,r,u){return y(void 0,null,(function(){var a,o,c,s;return i(this,(function(i){switch(i.label){case 0:a=p(p({maxRetries:5,backoff:rt},t),u),o=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((c=i.sent()).error)throw new nt(c);return [2,c];case 4:if(s=i.sent(),o++,s.throwImmediately||o>a.maxRetries){if(s instanceof nt)return [2,s.value];throw s}return [4,a.backoff(o,a.maxRetries)];case 5:return i.sent(),[3,6];case 6:return [3,1];case 7:return [2]}}))}))}}),{fail:function(e){throw Object.assign(new nt({error:e}),{throwImmediately:!0})}}),ot=Ie("__rtkq/focused"),ct=Ie("__rtkq/unfocused"),st=Ie("__rtkq/online"),ft=Ie("__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,t,n,r,i,u){return "function"==typeof e?e(t,n,r,i).map(vt).map(u):Array.isArray(e)?e.map(vt).map(u):[]}function vt(e){return "string"==typeof e?{type:e}:e}function ht(e){return e}function yt(e,t,n,r){return pt(n[e.meta.arg.endpointName][t],He(e)?e.payload:void 0,Ve(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function gt(e,t,n){var r=e[t];r&&n(r);}function mt(e){var t;return null!=(t="arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)?t:e.requestId}function bt(e,t,n){var r=e[mt(t)];r&&n(r);}(ut=it||(it={})).query="query",ut.mutation="mutation";var Ot={},wt=Symbol.for("RTKQ/skipToken"),jt=wt,qt={status:exports.QueryStatus.uninitialized},At=ge(qt,(function(){})),Pt=ge(qt,(function(){})),St=function(e){return e.endpointName+"("+JSON.stringify(e.queryArgs,(function(e,t){return Re(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}))+")"};function Rt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var n=qe((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",serializeQueryArgs:St,keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1},t),{extractRehydrationInfo:n,tagTypes:u([],t.tagTypes||[])}),i={endpointDefinitions:{},batch:function(e){e();},apiUid:Ee(),extractRehydrationInfo:n,hasRehydrationInfo:qe((function(e){return null!=n(e)}))},a={injectEndpoints:function(e){for(var t=e.endpoints({query:function(e){return v(p({},e),{type:it.query})},mutation:function(e){return v(p({},e),{type:it.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 xt(){return function(){throw new Error("When using `fakeBaseQuery`, all queries & mutations must use the `queryFn` definition syntax.")}}var It=function(e){var t=e.reducerPath,n=e.api,r=e.context,i=n.internalActions,u=i.removeQueryResult,a=i.unsubscribeQueryResult;return function(e){var i={};return function(u){return function(c){var s,f=u(c);if(a.match(c)){var l=e.getState()[t];o(O=c.payload.queryCacheKey,null==(s=l.queries[O])?void 0:s.endpointName,e,l.config);}if(n.util.resetApiState.match(c))for(var d=0,p=Object.entries(i);d<p.length;d++){var v=p[d],h=v[0],y=v[1];y&&clearTimeout(y),delete i[h];}if(r.hasRehydrationInfo(c)){l=e.getState()[t];for(var g=r.extractRehydrationInfo(c).queries,m=0,b=Object.entries(g);m<b.length;m++){var O,w=b[m],j=w[1];o(O=w[0],null==j?void 0:j.endpointName,e,l.config);}}return f}};function o(e,n,a,o){var c,s=r.endpointDefinitions[n],f=null!=(c=null==s?void 0:s.keepUnusedDataFor)?c:o.keepUnusedDataFor,l=Math.max(0,Math.min(f,2147482.647)),d=i[e];d&&clearTimeout(d),i[e]=setTimeout((function(){var n=a.getState()[t].subscriptions[e];n&&0!==Object.keys(n).length||a.dispatch(u({queryCacheKey:e})),delete i[e];}),1e3*l);}}},Tt=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;return function(e){return function(t){return function(n){var r=t(n);return Fe(He(u),Ve(u))(n)&&f(yt(n,"invalidatesTags",i,o),e),a.util.invalidateTags.match(n)&&f(pt(n.payload,void 0,void 0,void 0,void 0,o),e),r}}};function f(e,i){var u=i.getState(),o=u[n],f=a.util.selectInvalidatedBy(u,e);r.batch((function(){for(var e=0,n=Array.from(f.values());e<n.length;e++){var r=n[e].queryCacheKey,u=o.queries[r],a=o.subscriptions[r];u&&a&&(0===Object.keys(a).length?i.dispatch(s({queryCacheKey:r})):u.status!==exports.QueryStatus.uninitialized&&i.dispatch(c(u,r)));}}));}},Ct=function(e){var n=e.reducerPath,r=e.queryThunk,i=e.api,u=e.refetchQuery;return function(e){var o={};return function(t){return function(n){var u=t(n);return (i.internalActions.updateSubscriptionOptions.match(n)||i.internalActions.unsubscribeQueryResult.match(n))&&s(n.payload,e),(r.pending.match(n)||r.rejected.match(n)&&n.meta.condition)&&s(n.meta.arg,e),(r.fulfilled.match(n)||r.rejected.match(n)&&!n.meta.condition)&&c(n.meta.arg,e),i.util.resetApiState.match(n)&&function(){for(var e=0,t=Object.keys(o);e<t.length;e++)f(t[e]);}(),u}};function c(e,r){var i=e.queryCacheKey,c=r.getState()[n],s=c.queries[i];if(s&&s.status!==exports.QueryStatus.uninitialized){var f=a(c.subscriptions[i]);if(Number.isFinite(f)){var l=o[i];(null==l?void 0:l.timeout)&&(clearTimeout(l.timeout),l.timeout=void 0);var d=Date.now()+f,p=o[i]={nextPollTimestamp:d,pollingInterval:f,timeout:setTimeout((function(){p.timeout=void 0,r.dispatch(u(s,i));}),f)};}}}function s(e,r){var i=e.queryCacheKey,u=r.getState()[n],s=u.queries[i];if(s&&s.status!==exports.QueryStatus.uninitialized){var l=a(u.subscriptions[i]);if(Number.isFinite(l)){var d=o[i],p=Date.now()+l;(!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 a(e){void 0===e&&(e={});for(var t=Number.POSITIVE_INFINITY,n=0,r=Object.values(e);n<r.length;n++){var i=r[n];i.pollingInterval&&(t=Math.min(i.pollingInterval,t));}return t}},Et=function(e){var n=e.reducerPath,r=e.context,i=e.refetchQuery,u=e.api.internalActions.removeQueryResult;return function(e){return function(t){return function(n){var r=t(n);return ot.match(n)&&a(e,"refetchOnFocus"),st.match(n)&&a(e,"refetchOnReconnect"),r}}};function a(e,a){var o=e.getState()[n],c=o.queries,s=o.subscriptions;r.batch((function(){for(var n=0,r=Object.keys(s);n<r.length;n++){var f=r[n],l=c[f],d=s[f];d&&l&&(Object.values(d).some((function(e){return !0===e[a]}))||Object.values(d).every((function(e){return void 0===e[a]}))&&o.config[a])&&(0===Object.keys(d).length?e.dispatch(u({queryCacheKey:f})):l.status!==exports.QueryStatus.uninitialized&&e.dispatch(i(l,f)));}}));}},kt=new Error("Promise never resolved before cacheEntryRemoved."),Dt=function(e){var t=e.api,n=e.reducerPath,r=e.context,i=e.queryThunk,u=e.mutationThunk,a=Je(i),o=Je(u),c=He(i,u);return function(e){var s={};return function(r){return function(l){var d=e.getState(),p=r(l),v=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)?mt(e.payload):""}(l);if(i.pending.match(l)){var h=d[n].queries[v],y=e.getState()[n].queries[v];!h&&y&&f(l.meta.arg.endpointName,l.meta.arg.originalArgs,v,e,l.meta.requestId);}else if(u.pending.match(l))(y=e.getState()[n].mutations[v])&&f(l.meta.arg.endpointName,l.meta.arg.originalArgs,v,e,l.meta.requestId);else if(c(l))(null==(O=s[v])?void 0:O.valueResolved)&&(O.valueResolved({data:l.payload,meta:l.meta.baseQueryMeta}),delete O.valueResolved);else if(t.internalActions.removeQueryResult.match(l)||t.internalActions.removeMutationResult.match(l))(O=s[v])&&(delete s[v],O.cacheEntryRemoved());else if(t.util.resetApiState.match(l))for(var g=0,m=Object.entries(s);g<m.length;g++){var b=m[g],O=b[1];delete s[b[0]],O.cacheEntryRemoved();}return p}};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 kt}))]);d.catch((function(){})),s[i]=f;var h=t.endpoints[e].select(o.type===it.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===it.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!==kt)throw e}));}}}},Nt=function(e){var t=e.api,n=e.context,r=e.queryThunk,i=e.mutationThunk,u=We(r,i),a=Be(r,i),o=He(r,i);return function(e){var r={};return function(i){return function(c){var s,f,l,d=i(c);if(u(c)){var h=c.meta,y=h.requestId,g=h.arg,m=g.endpointName,b=g.originalArgs,O=n.endpointDefinitions[m],w=null==O?void 0:O.onQueryStarted;if(w){var j={},q=new Promise((function(e,t){j.resolve=e,j.reject=t;}));q.catch((function(){})),r[y]=j;var A=t.endpoints[m].select(O.type===it.query?b:y),P=e.dispatch((function(e,t,n){return n})),S=v(p({},e),{getCacheEntry:function(){return A(e.getState())},requestId:y,extra:P,updateCachedData:O.type===it.query?function(n){return e.dispatch(t.util.updateQueryData(m,b,n))}:void 0,queryFulfilled:q});w(b,S);}}else if(o(c)){var R=c.meta,x=R.baseQueryMeta;null==(s=r[y=R.requestId])||s.resolve({data:c.payload,meta:x}),delete r[y];}else if(a(c)){var I=c.meta;x=I.baseQueryMeta,null==(l=r[y=I.requestId])||l.reject({error:null!=(f=c.payload)?f:c.error,isUnhandledError:!I.rejectedWithValue,meta:x}),delete r[y];}return d}}}},Qt=function(e){var t=e.api,n=e.context.apiUid;return function(e){var r=!1;return function(i){return function(u){r||(r=!0,e.dispatch(t.internalActions.middlewareRegistered(n)));var a=i(u);return t.util.resetApiState.match(u)&&e.dispatch(t.internalActions.middlewareRegistered(n)),a}}}};function _t(e){var t=e.reducerPath,n=e.queryThunk,r={invalidateTags:Ie(t+"/invalidateTags")},i=[Qt,It,Tt,Ct,Et,Dt,Nt].map((function(t){return t(v(p({},e),{refetchQuery:u}))}));return {middleware:function(e){return function(n){var r=we.apply(void 0,i.map((function(t){return t(e)})))(n);return function(i){return e.getState()[t]?r(i):n(i)}}},actions:r};function u(e,t,r){return void 0===r&&(r={}),n(p({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t},r))}}function Mt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Object.assign.apply(Object,u([e],t));}var Kt=Symbol(),Ft=function(){return {name:Kt,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(!j(t))return t;if(Array.isArray(t))return t.map(e);if(I(t))return new Map(Array.from(t.entries()).map((function(t){return [t[0],e(t[1])]})));if(T(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 P(t,ue)&&(n[ue]=t[ue]),n}function t(t){return w(t)?e(t):t}var n="add";_("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=A(a),s=""+i[o];0!==c&&1!==c||"__proto__"!==s&&"constructor"!==s||O(24),"function"==typeof a&&"prototype"===s&&O(24),"object"!=typeof(a=S(a,s))&&O(15,i.join("/"));}var f=A(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 q(a.D,(function(e,r){var i=S(f,e),u=S(l,e),a=r?P(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.t});}});}();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=t.signal,p=t.rejectWithValue,v=t.fulfillWithValue,h=t.dispatch,y=t.getState,g=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,7,,8]),r=ht,o=void 0,c={signal:d,dispatch:h,getState:y,extra:g,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?f(e,y()):void 0},n.query?[4,u(n.query(e.originalArgs),c,n.extraOptions)]:[3,3];case 2:return o=t.sent(),n.transformResponse&&(r=n.transformResponse),[3,5];case 3:return [4,n.queryFn(e.originalArgs,c,n.extraOptions,(function(e){return u(e,c,n.extraOptions)}))];case 4:o=t.sent(),t.label=5;case 5:if(o.error)throw new nt(o.error,o.meta);return s=v,[4,r(o.data,o.meta,e.originalArgs)];case 6:return [2,s.apply(void 0,[t.sent(),{fulfilledTimeStamp:Date.now(),baseQueryMeta:o.meta}])];case 7:if((l=t.sent())instanceof nt)return [2,p(l.value,{baseQueryMeta:l.meta})];throw console.error(l),l;case 8: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=_e(r+"/executeQuery",s,{getPendingMeta:function(){return {startedTimeStamp:Date.now()}},condition:function(e,t){var n,i,u=(0, t.getState)(),a=null==(i=null==(n=u[r])?void 0:n.queries)?void 0:i[e.queryCacheKey],o=null==a?void 0:a.fulfilledTimeStamp;return !("pending"===(null==a?void 0:a.status)||!f(e,u)&&o)},dispatchConditionRejection:!0});function d(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:_e(r+"/executeMutation",s,{getPendingMeta:function(){return {startedTimeStamp:Date.now()}}}),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(j(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}},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:ze(We(e),d(t)),matchFulfilled:ze(He(e),d(t)),matchRejected:ze(Be(e),d(t))}}}}({baseQuery:a,reducerPath:o,context:r,api:e,serializeQueryArgs:c}),m=g.queryThunk,R=g.mutationThunk,x=g.patchQueryData,C=g.updateQueryData,E=g.prefetch,k=g.buildMatchThunkActions,D=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=Ie(n+"/resetApiState"),h=Ce({name:n+"/queries",initialState:Ot,reducers:{removeQueryResult:function(e,t){delete e[t.payload.queryCacheKey];},queryResultPatched:function(e,t){var n=t.payload,r=n.patches;gt(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;u.subscribe&&(null!=e[r=u.queryCacheKey]||(e[r]={status:exports.QueryStatus.uninitialized,endpointName:u.endpointName})),gt(e,u.queryCacheKey,(function(e){e.status=exports.QueryStatus.pending,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;gt(e,r.arg.queryCacheKey,(function(e){var n;e.requestId===r.requestId&&(e.status=exports.QueryStatus.fulfilled,e.data=null==(n=a[r.arg.endpointName].structuralSharing)||n?$e(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;gt(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=Ce({name:n+"/mutations",initialState:Ot,reducers:{removeMutationResult:function(e,t){var n=mt(t.payload);n in e&&delete e[n];}},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[mt(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&&bt(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&&bt(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=Ce({name:n+"/invalidation",initialState:Ot,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(Fe(He(r),Ve(r)),(function(e,t){for(var n,r,i,u,o=yt(t,"providesTags",a,f),c=t.meta.arg.queryCacheKey,s=0,l=o;s<l.length;s++){var d=l[s],p=d.type,v=d.id,h=null!=(u=(r=null!=(n=e[p])?n:e[p]={})[i=v||"__internal_without_id"])?u:r[i]=[];h.includes(c)||h.push(c);}}));}}),m=Ce({name:n+"/subscriptions",initialState:Ot,reducers:{updateSubscriptionOptions:function(e,t){var n,r=t.payload,i=r.queryCacheKey,u=r.requestId;(null==(n=null==e?void 0:e[i])?void 0:n[u])&&(e[i][u]=r.options);},unsubscribeQueryResult:function(e,t){var n=t.payload,r=n.queryCacheKey;e[r]&&delete e[r][n.requestId];}},extraReducers:function(e){e.addCase(h.actions.removeQueryResult,(function(e,t){delete e[t.payload.queryCacheKey];})).addCase(r.pending,(function(e,t){var n,r,i,u,a=t.meta,o=a.arg,c=a.requestId;if(o.subscribe){var s=null!=(r=e[n=o.queryCacheKey])?r:e[n]={};s[c]=null!=(u=null!=(i=o.subscriptionOptions)?i:s[c])?u:{};}})).addCase(r.rejected,(function(e,t){var n,r,i,u,a=t.meta,o=a.arg,c=a.requestId;if(a.condition&&o.subscribe){var s=null!=(r=e[n=o.queryCacheKey])?r:e[n]={};s[c]=null!=(u=null!=(i=o.subscriptionOptions)?i:s[c])?u:{};}})).addMatcher(s,(function(e){return p({},e)}));}}),b=Ce({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)}));}}),O=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:m.reducer,config:b.reducer});return {reducer:function(e,t){return O(d.match(t)?void 0:e,t)},actions:v(p(p(p(p({},b.actions),h.actions),m.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}}),N=D.reducer,Q=D.actions;Mt(e.util,{patchQueryData:x,updateQueryData:C,prefetch:E,resetApiState:Q.resetApiState}),Mt(e.internalActions,Q),Object.defineProperty(e.util,"updateQueryResult",{get:function(){return e.util.updateQueryData}}),Object.defineProperty(e.util,"patchQueryResult",{get:function(){return e.util.patchQueryData}});var M=_t({reducerPath:o,context:r,queryThunk:m,mutationThunk:R,api:e,assertTagType:h}),K=M.middleware;Mt(e.util,M.actions),Mt(e,{reducer:N,middleware:K});var F=function(e){var n=e.serializeQueryArgs,r=e.reducerPath;return {buildQuerySelector:function(e,t){return function(r){var a=Se(u,(function(i){var u,a;return null!=(a=r===wt||null==(u=null==i?void 0:i.queries)?void 0:u[n({queryArgs:r,endpointDefinition:t,endpointName:e})])?a:At}));return Se(a,i)}},buildMutationSelector:function(){return function(e){var t,n;n="object"==typeof e?null!=(t=mt(e))?t:wt:e;var r=Se(u,(function(e){var t,r;return null!=(r=n===wt||null==(t=null==e?void 0:e.mutations)?void 0:t[n])?r:Pt}));return Se(r,i)}},selectInvalidatedBy:function(e,t){for(var n,i=e[r],u=new Set,a=0,o=t.map(vt);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 i(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 u(e){return e[r]}}({serializeQueryArgs:c,reducerPath:o}),z=F.buildQuerySelector,U=F.buildMutationSelector;Mt(e.util,{selectInvalidatedBy:F.selectInvalidatedBy});var L=function(e){var t=e.serializeQueryArgs,n=e.queryThunk,r=e.mutationThunk,a=e.api,o=e.context,c={},s={},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;return function(s,f){var d=t({queryArgs:o,endpointDefinition:r,endpointName:e}),m=n({type:"query",subscribe:v,forceRefetch:h,subscriptionOptions:g,endpointName:e,originalArgs:o,queryCacheKey:d}),b=s(m),O=b.requestId,w=b.abort,j=Object.assign(Promise.all([c[d],b]).then((function(){return a.endpoints[e].select(o)(f())})),{arg:o,requestId:O,subscriptionOptions:g,queryCacheKey:d,abort:w,unwrap:function(){return y(this,null,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return [4,j];case 1:if((e=t.sent()).isError)throw e.error;return [2,e.data]}}))}))},refetch:function(){s(u(o,{subscribe:!1,forceRefetch:!0}));},unsubscribe:function(){v&&s(l({queryCacheKey:d,requestId:O}));},updateSubscriptionOptions:function(t){j.subscriptionOptions=t,s(p({endpointName:e,requestId:O,queryCacheKey:d,options:t}));}});return c[d]||(c[d]=j,j.then((function(){delete c[d];}))),j}};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});return s[f]=y,y.then((function(){delete s[f];})),o&&(s[o]=y,y.then((function(){s[o]===y&&delete s[o];}))),y}}},getRunningOperationPromises:function(){return u(u([],Object.values(c)),Object.values(s)).filter((function(e){return !!e}))},getRunningOperationPromise:function(e,n){var r=o.endpointDefinitions[e];if(r.type===it.query){var i=t({queryArgs:n,endpointDefinition:r,endpointName:e});return c[i]}return s[n]}}}({queryThunk:m,mutationThunk:R,api:e,serializeQueryArgs:c,context:r}),W=L.buildInitiateQuery,B=L.buildInitiateMutation;return Mt(e.util,{getRunningOperationPromises:L.getRunningOperationPromises,getRunningOperationPromise:L.getRunningOperationPromise}),{name:Kt,injectEndpoint:function(t,n){var r,i=e;null!=(r=i.endpoints)[t]||(r[t]={}),n.type===it.query?Mt(i.endpoints[t],{select:z(t,n),initiate:W(t,n)},k(m,t)):n.type===it.mutation&&Mt(i.endpoints[t],{select:U(),initiate:B(t)},k(R,t));}}}}},zt=Rt(Ft());
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 j(e){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]||!!e.constructor[ue]||I(e)||T(e))}function q(e,t,n){void 0===n&&(n=!1),0===A(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 A(e){var t=e[ae];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:I(e)?2:T(e)?3:0}function P(e,t){return 2===A(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function S(e,t){return 2===A(e)?e.get(t):e[t]}function R(e,t,n){var r=A(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n;}function x(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function I(e){return te&&e instanceof Map}function T(e){return ne&&e instanceof Set}function C(e){return e.o||e.t}function E(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 k(e,t){return void 0===t&&(t=!1),N(e)||w(e)||!j(e)||(A(e)>1&&(e.set=e.add=e.clear=e.delete=D),Object.freeze(e),t&&q(e,(function(e,t){return k(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 _(e,t){fe[e]||(fe[e]=t);}function M(){return m}function K(e,t){t&&(Q("Patches"),e.u=[],e.s=[],e.v=t);}function F(e){z(e),e.p.forEach(L),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 L(e){var t=e[ae];0===t.i||1===t.i?t.j():t.O=!0;}function W(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)),j(e)&&(e=B(t,e),t.l||H(t,e)),t.u&&Q("Patches").M(n[ae],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 q(t,(function(i,u){return V(e,r,t,i,u,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return H(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=E(r.k):r.o;q(3===r.i?new Set(i):i,(function(t,u){return V(e,r,i,t,u,n)})),H(e,i,!1),n&&e.u&&Q("Patches").R(r,n,e.u,e.s);}return r.o}function V(e,t,n,r,i,u){if(w(i)){var a=B(e,i,u&&t&&3!==t.i&&!P(t.D,r)?u.concat(r):void 0);if(R(n,r,a),!w(a))return;e.m=!1;}if(j(i)&&!N(i)){if(!e.h.F&&e._<1)return;B(e,i),t&&t.A.l||H(e,i);}}function H(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&k(t,n);}function J(e,t){var n=e[ae];return (n?C(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=E(e.t));}function Y(e,t,n){var r=I(t)?Q("MapSet").N(t,n):T(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:M(),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:M()).p.push(r),r}function Z(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return E(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=C(e);if(!P(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||!j(a)?a:a===J(e.t,t)?(X(e),e.o[t]=Y(e.A.h,a,e)):a},has:function(e,t){return t in C(e)},ownKeys:function(e){return Reflect.ownKeys(C(e))},set:function(e,t,n){var r=G(C(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=J(C(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(x(n,i)&&(void 0!==n||P(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!==J(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=C(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={};q(le,(function(e,t){de[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)};})),de.deleteProperty=function(e,t){return le.deleteProperty.call(this,e[0],t)},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),j(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),W(e,o)}),(function(e){throw F(o),e})):(K(o,r),W(a,o))}if(!e||"object"!=typeof e){if((a=n(e))===ie)return;return void 0===a&&(a=e),t.F&&k(a,!0),a}O(21,e);},this.produceWithPatches=function(e,n){return "function"==typeof e?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))}))}:[t.produce(e,n,(function(e,t){r=e,i=t;})),r,i];var 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){j(e)||O(8),w(e)&&(e=function(e){return w(e)||O(22,e),function e(t){if(!j(t))return t;var n,r=t[ae],i=A(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 q(n,(function(t,i){r&&S(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),W(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()}};function we(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}var je=function(e,t){return e===t};function qe(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?je: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 Ae(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 Pe(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=Ae(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 Se=Pe(qe);function Re(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 xe(e){return j(e)?ge(e,(function(){})):e}function Ie(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 Te(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 Ce(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:xe(e.initialState),i=e.reducers||{},a=Object.keys(i),o={},c={},s={};function f(){var t="function"==typeof e.extraReducers?Te(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){void 0===n&&(n=[]);var i,a="function"==typeof t?Te(t):[t,n,r],o=a[0],c=a[1],s=a[2];if("function"==typeof e)i=function(){return xe(e())};else {var f=xe(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(j(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,f,a,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?Ie(a,r):Ie(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 Ee=function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},ke=["name","message","stack","code"],De=function(e,t){this.payload=e,this.meta=t;},Ne=function(e,t){this.payload=e,this.meta=t;},Qe=function(e){if("object"==typeof e&&null!==e){for(var t={},n=0,r=ke;n<r.length;n++){var i=r[n];"string"==typeof e[i]&&(t[i]=e[i]);}return t}return {message:String(e)}};function _e(e,t,n){var r=Ie(e+"/fulfilled",(function(e,t,n,r){return {payload:e,meta:v(p({},r||{}),{arg:n,requestId:t,requestStatus:"fulfilled"})}})),u=Ie(e+"/pending",(function(e,t,n){return {payload:void 0,meta:v(p({},n||{}),{arg:t,requestId:e,requestStatus:"pending"})}})),a=Ie(e+"/rejected",(function(e,t,r,i,u){return {payload:i,error:(n&&n.serializeError||Qe)(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):Ee(),p=new o,v=new Promise((function(e,t){return p.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:l||"Aborted"})}))})),h=!1,g=function(){return y(this,null,(function(){var o,l,y,g,m;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),null===(b=g=null==(o=null==n?void 0:n.condition)?void 0:o.call(n,e,{getState:s,extra:f}))||"object"!=typeof b||"function"!=typeof b.then?[3,2]:[4,g];case 1:g=i.sent(),i.label=2;case 2:if(!1===g)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,rejectWithValue:function(e,t){return new De(e,t)},fulfillWithValue:function(e,t){return new Ne(e,t)}})).then((function(t){if(t instanceof De)throw t;return t instanceof Ne?r(t.payload,d,e,t.meta):r(t,d,e)}))])];case 3:return y=i.sent(),[3,5];case 4:return m=i.sent(),y=m instanceof De?a(null,d,e,m.payload,m.meta):a(m,d,e),[3,5];case 5:return n&&!n.dispatchConditionRejection&&a.match(y)&&y.meta.condition||c(y),[2,y]}var b;}))}))}();return Object.assign(g,{abort:function(e){h&&(l=e,p.abort());},requestId:d,arg:e,unwrap:function(){return g.then(Me)}})}}),{pending:u,rejected:a,fulfilled:r,typePrefix:e})}function Me(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var Ke=function(e,t){return (n=e)&&"function"==typeof n.match?e.match(t):e(t);var n;};function Fe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.some((function(e){return Ke(e,t)}))}}function ze(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.every((function(e){return Ke(e,t)}))}}function Ue(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 Le(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 Ue(e,["pending"])}:Le(e)?function(t){var n=e.map((function(e){return e.pending}));return Fe.apply(void 0,n)(t)}:We()(e[0])}function Be(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return Ue(e,["rejected"])}:Le(e)?function(t){var n=e.map((function(e){return e.rejected}));return Fe.apply(void 0,n)(t)}:Be()(e[0])}function Ve(){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||Le(e)?function(t){return ze(Be.apply(void 0,e),n)(t)}:Ve()(e[0])}function He(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return Ue(e,["fulfilled"])}:Le(e)?function(t){var n=e.map((function(e){return e.fulfilled}));return Fe.apply(void 0,n)(t)}:He()(e[0])}function Je(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return Ue(e,["pending","fulfilled","rejected"])}:Le(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 Fe.apply(void 0,n)(t)}:Je()(e[0])}!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&&!P(t,u))return !0;var o=n[u],c=o&&o[ae];if(c?c.t!==a:!x(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);return !(!n||n.get)}var i={};_("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:M(),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)q(u,(function(t){t!==ae&&(void 0!==i[t]||P(i,t)?a[t]||e(u[t]):(a[t]=!0,$(n)));})),q(i,(function(e){void 0!==u[e]||P(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++)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 Ge=Re;function $e(e,t){if(e===t||!(Ge(e)&&Ge(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]=$e(e[c],t[c]),i&&(i=e[c]===u[c]);}return i?e:u}var Xe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return fetch.apply(void 0,e)},Ye=function(e){return e.status>=200&&e.status<=299},Ze=function(e,t){return y(void 0,null,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return "function"==typeof t?[2,t(e)]:"text"===t?[2,e.text()]:"json"!==t?[3,2]:[4,e.text()];case 1:return [2,(n=r.sent()).length?JSON.parse(n):null];case 2:return [2]}}))}))};function et(e){if(!Re(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 tt(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?Xe:a,c=e.paramsSerializer,s=h(e,["baseUrl","prepareHeaders","fetchFn","paramsSerializer"]);return "undefined"==typeof fetch&&o===Xe&&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,f,l,d,y,g,m,b,O,w,j,q,A,P,S,R,x,I,T,C,E,k,D,N,Q,_,M,K,F,z,U,L,W,B,V;return i(this,(function(i){switch(i.label){case 0:return t=r.signal,a=r.getState,f=r.extra,l=r.endpoint,d=r.forced,y=r.type,b=(m="string"==typeof e?{url:e}:e).url,w=void 0===(O=m.method)?"GET":O,q=void 0===(j=m.headers)?new Headers({}):j,P=void 0===(A=m.body)?void 0:A,R=void 0===(S=m.params)?void 0:S,I=void 0===(x=m.responseHandler)?"json":x,C=void 0===(T=m.validateStatus)?Ye:T,E=h(m,["url","method","headers","body","params","responseHandler","validateStatus"]),k=p(v(p({},s),{method:w,signal:t,body:P}),E),D=k,[4,u(new Headers(et(q)),{getState:a,extra:f,endpoint:l,forced:d,type:y})];case 1:D.headers=i.sent(),N=function(e){return "object"==typeof e&&(Re(e)||Array.isArray(e)||"function"==typeof e.toJSON)},!k.headers.has("content-type")&&N(P)&&k.headers.set("content-type","application/json"),N(P)&&function(e){var t,n;return null==(n=null==(t=e.get("content-type"))?void 0:t.trim())?void 0:n.startsWith("application/json")}(k.headers)&&(k.body=JSON.stringify(P)),R&&(Q=~b.indexOf("?")?"&":"?",_=c?c(R):new URLSearchParams(et(R)),b+=Q+_),b=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,b),M=new Request(b,k),K=M.clone(),g={request:K},i.label=2;case 2:return i.trys.push([2,4,,5]),[4,o(M)];case 3:return F=i.sent(),[3,5];case 4:return z=i.sent(),[2,{error:{status:"FETCH_ERROR",error:String(z)},meta:g}];case 5:U=F.clone(),g.response=U,W="",i.label=6;case 6:return i.trys.push([6,8,,9]),[4,Promise.all([Ze(F,I).then((function(e){return L=e}),(function(e){return B=e})),U.text().then((function(e){return W=e}),(function(){}))])];case 7:if(i.sent(),B)throw B;return [3,9];case 8:return V=i.sent(),[2,{error:{status:"PARSING_ERROR",originalStatus:F.status,data:W,error:String(V)},meta:g}];case 9:return [2,C(F,L)?{data:L,meta:g}:{error:{status:F.status,data:L},meta:g}]}}))}))}}var nt=function(e,t){void 0===t&&(t=void 0),this.value=e,this.meta=t;};function rt(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 it,ut,at=Object.assign((function(e,t){return function(n,r,u){return y(void 0,null,(function(){var a,o,c,s;return i(this,(function(i){switch(i.label){case 0:a=p(p({maxRetries:5,backoff:rt},t),u),o=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((c=i.sent()).error)throw new nt(c);return [2,c];case 4:if(s=i.sent(),o++,s.throwImmediately||o>a.maxRetries){if(s instanceof nt)return [2,s.value];throw s}return [4,a.backoff(o,a.maxRetries)];case 5:return i.sent(),[3,6];case 6:return [3,1];case 7:return [2]}}))}))}}),{fail:function(e){throw Object.assign(new nt({error:e}),{throwImmediately:!0})}}),ot=Ie("__rtkq/focused"),ct=Ie("__rtkq/unfocused"),st=Ie("__rtkq/online"),ft=Ie("__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,t,n,r,i,u){return "function"==typeof e?e(t,n,r,i).map(vt).map(u):Array.isArray(e)?e.map(vt).map(u):[]}function vt(e){return "string"==typeof e?{type:e}:e}function ht(e){return e}function yt(e,t,n,r){return pt(n[e.meta.arg.endpointName][t],He(e)?e.payload:void 0,Ve(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function gt(e,t,n){var r=e[t];r&&n(r);}function mt(e){var t;return null!=(t="arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)?t:e.requestId}function bt(e,t,n){var r=e[mt(t)];r&&n(r);}(ut=it||(it={})).query="query",ut.mutation="mutation";var Ot={},wt=Symbol.for("RTKQ/skipToken"),jt=wt,qt={status:exports.QueryStatus.uninitialized},At=ge(qt,(function(){})),Pt=ge(qt,(function(){})),St=function(e){return e.endpointName+"("+JSON.stringify(e.queryArgs,(function(e,t){return Re(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}))+")"};function Rt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var n=qe((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",serializeQueryArgs:St,keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1},t),{extractRehydrationInfo:n,tagTypes:u([],t.tagTypes||[])}),i={endpointDefinitions:{},batch:function(e){e();},apiUid:Ee(),extractRehydrationInfo:n,hasRehydrationInfo:qe((function(e){return null!=n(e)}))},a={injectEndpoints:function(e){for(var t=e.endpoints({query:function(e){return v(p({},e),{type:it.query})},mutation:function(e){return v(p({},e),{type:it.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 xt(){return function(){throw new Error("When using `fakeBaseQuery`, all queries & mutations must use the `queryFn` definition syntax.")}}var It=function(e){var t=e.reducerPath,n=e.api,r=e.context,i=n.internalActions,u=i.removeQueryResult,a=i.unsubscribeQueryResult;return function(e){var i={};return function(u){return function(c){var s,f=u(c);if(a.match(c)){var l=e.getState()[t];o(O=c.payload.queryCacheKey,null==(s=l.queries[O])?void 0:s.endpointName,e,l.config);}if(n.util.resetApiState.match(c))for(var d=0,p=Object.entries(i);d<p.length;d++){var v=p[d],h=v[0],y=v[1];y&&clearTimeout(y),delete i[h];}if(r.hasRehydrationInfo(c)){l=e.getState()[t];for(var g=r.extractRehydrationInfo(c).queries,m=0,b=Object.entries(g);m<b.length;m++){var O,w=b[m],j=w[1];o(O=w[0],null==j?void 0:j.endpointName,e,l.config);}}return f}};function o(e,n,a,o){var c,s=r.endpointDefinitions[n],f=null!=(c=null==s?void 0:s.keepUnusedDataFor)?c:o.keepUnusedDataFor,l=Math.max(0,Math.min(f,2147482.647)),d=i[e];d&&clearTimeout(d),i[e]=setTimeout((function(){var n=a.getState()[t].subscriptions[e];n&&0!==Object.keys(n).length||a.dispatch(u({queryCacheKey:e})),delete i[e];}),1e3*l);}}},Tt=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;return function(e){return function(t){return function(n){var r=t(n);return Fe(He(u),Ve(u))(n)&&f(yt(n,"invalidatesTags",i,o),e),a.util.invalidateTags.match(n)&&f(pt(n.payload,void 0,void 0,void 0,void 0,o),e),r}}};function f(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)));}}));}},Ct=function(e){var n=e.reducerPath,r=e.queryThunk,i=e.api,u=e.refetchQuery;return function(e){var o={};return function(t){return function(n){var u=t(n);return (i.internalActions.updateSubscriptionOptions.match(n)||i.internalActions.unsubscribeQueryResult.match(n))&&s(n.payload,e),(r.pending.match(n)||r.rejected.match(n)&&n.meta.condition)&&s(n.meta.arg,e),(r.fulfilled.match(n)||r.rejected.match(n)&&!n.meta.condition)&&c(n.meta.arg,e),i.util.resetApiState.match(n)&&function(){for(var e=0,t=Object.keys(o);e<t.length;e++)f(t[e]);}(),u}};function c(e,r){var i=e.queryCacheKey,c=r.getState()[n],s=c.queries[i];if(s&&s.status!==exports.QueryStatus.uninitialized){var f=a(c.subscriptions[i]);if(Number.isFinite(f)){var l=o[i];(null==l?void 0:l.timeout)&&(clearTimeout(l.timeout),l.timeout=void 0);var d=Date.now()+f,p=o[i]={nextPollTimestamp:d,pollingInterval:f,timeout:setTimeout((function(){p.timeout=void 0,r.dispatch(u(s,i));}),f)};}}}function s(e,r){var i=e.queryCacheKey,u=r.getState()[n],s=u.queries[i];if(s&&s.status!==exports.QueryStatus.uninitialized){var l=a(u.subscriptions[i]);if(Number.isFinite(l)){var d=o[i],p=Date.now()+l;(!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 a(e){void 0===e&&(e={});for(var t=Number.POSITIVE_INFINITY,n=0,r=Object.values(e);n<r.length;n++){var i=r[n];i.pollingInterval&&(t=Math.min(i.pollingInterval,t));}return t}},Et=function(e){var n=e.reducerPath,r=e.context,i=e.refetchQuery,u=e.api.internalActions.removeQueryResult;return function(e){return function(t){return function(n){var r=t(n);return ot.match(n)&&a(e,"refetchOnFocus"),st.match(n)&&a(e,"refetchOnReconnect"),r}}};function a(e,a){var o=e.getState()[n],c=o.queries,s=o.subscriptions;r.batch((function(){for(var n=0,r=Object.keys(s);n<r.length;n++){var f=r[n],l=c[f],d=s[f];d&&l&&(Object.values(d).some((function(e){return !0===e[a]}))||Object.values(d).every((function(e){return void 0===e[a]}))&&o.config[a])&&(0===Object.keys(d).length?e.dispatch(u({queryCacheKey:f})):l.status!==exports.QueryStatus.uninitialized&&e.dispatch(i(l,f)));}}));}},kt=new Error("Promise never resolved before cacheEntryRemoved."),Dt=function(e){var t=e.api,n=e.reducerPath,r=e.context,i=e.queryThunk,u=e.mutationThunk,a=Je(i),o=Je(u),c=He(i,u);return function(e){var s={};return function(r){return function(l){var d=e.getState(),p=r(l),v=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)?mt(e.payload):""}(l);if(i.pending.match(l)){var h=d[n].queries[v],y=e.getState()[n].queries[v];!h&&y&&f(l.meta.arg.endpointName,l.meta.arg.originalArgs,v,e,l.meta.requestId);}else if(u.pending.match(l))(y=e.getState()[n].mutations[v])&&f(l.meta.arg.endpointName,l.meta.arg.originalArgs,v,e,l.meta.requestId);else if(c(l))(null==(O=s[v])?void 0:O.valueResolved)&&(O.valueResolved({data:l.payload,meta:l.meta.baseQueryMeta}),delete O.valueResolved);else if(t.internalActions.removeQueryResult.match(l)||t.internalActions.removeMutationResult.match(l))(O=s[v])&&(delete s[v],O.cacheEntryRemoved());else if(t.util.resetApiState.match(l))for(var g=0,m=Object.entries(s);g<m.length;g++){var b=m[g],O=b[1];delete s[b[0]],O.cacheEntryRemoved();}return p}};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 kt}))]);d.catch((function(){})),s[i]=f;var h=t.endpoints[e].select(o.type===it.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===it.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!==kt)throw e}));}}}},Nt=function(e){var t=e.api,n=e.context,r=e.queryThunk,i=e.mutationThunk,u=We(r,i),a=Be(r,i),o=He(r,i);return function(e){var r={};return function(i){return function(c){var s,f,l,d=i(c);if(u(c)){var h=c.meta,y=h.requestId,g=h.arg,m=g.endpointName,b=g.originalArgs,O=n.endpointDefinitions[m],w=null==O?void 0:O.onQueryStarted;if(w){var j={},q=new Promise((function(e,t){j.resolve=e,j.reject=t;}));q.catch((function(){})),r[y]=j;var A=t.endpoints[m].select(O.type===it.query?b:y),P=e.dispatch((function(e,t,n){return n})),S=v(p({},e),{getCacheEntry:function(){return A(e.getState())},requestId:y,extra:P,updateCachedData:O.type===it.query?function(n){return e.dispatch(t.util.updateQueryData(m,b,n))}:void 0,queryFulfilled:q});w(b,S);}}else if(o(c)){var R=c.meta,x=R.baseQueryMeta;null==(s=r[y=R.requestId])||s.resolve({data:c.payload,meta:x}),delete r[y];}else if(a(c)){var I=c.meta;x=I.baseQueryMeta,null==(l=r[y=I.requestId])||l.reject({error:null!=(f=c.payload)?f:c.error,isUnhandledError:!I.rejectedWithValue,meta:x}),delete r[y];}return d}}}},Qt=function(e){var t=e.api,n=e.context.apiUid;return function(e){var r=!1;return function(i){return function(u){r||(r=!0,e.dispatch(t.internalActions.middlewareRegistered(n)));var a=i(u);return t.util.resetApiState.match(u)&&e.dispatch(t.internalActions.middlewareRegistered(n)),a}}}};function _t(e){var t=e.reducerPath,n=e.queryThunk,r={invalidateTags:Ie(t+"/invalidateTags")},i=[Qt,It,Tt,Ct,Et,Dt,Nt].map((function(t){return t(v(p({},e),{refetchQuery:u}))}));return {middleware:function(e){return function(n){var r=we.apply(void 0,i.map((function(t){return t(e)})))(n);return function(i){return e.getState()[t]?r(i):n(i)}}},actions:r};function u(e,t,r){return void 0===r&&(r={}),n(p({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t},r))}}function Mt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Object.assign.apply(Object,u([e],t));}var Kt=Symbol(),Ft=function(){return {name:Kt,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(!j(t))return t;if(Array.isArray(t))return t.map(e);if(I(t))return new Map(Array.from(t.entries()).map((function(t){return [t[0],e(t[1])]})));if(T(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 P(t,ue)&&(n[ue]=t[ue]),n}function t(t){return w(t)?e(t):t}var n="add";_("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=A(a),s=""+i[o];0!==c&&1!==c||"__proto__"!==s&&"constructor"!==s||O(24),"function"==typeof a&&"prototype"===s&&O(24),"object"!=typeof(a=S(a,s))&&O(15,i.join("/"));}var f=A(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 q(a.D,(function(e,r){var i=S(f,e),u=S(l,e),a=r?P(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.t});}});}();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=t.signal,p=t.rejectWithValue,v=t.fulfillWithValue,h=t.dispatch,y=t.getState,g=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,7,,8]),r=ht,o=void 0,c={signal:d,dispatch:h,getState:y,extra:g,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?f(e,y()):void 0},n.query?[4,u(n.query(e.originalArgs),c,n.extraOptions)]:[3,3];case 2:return o=t.sent(),n.transformResponse&&(r=n.transformResponse),[3,5];case 3:return [4,n.queryFn(e.originalArgs,c,n.extraOptions,(function(e){return u(e,c,n.extraOptions)}))];case 4:o=t.sent(),t.label=5;case 5:if(o.error)throw new nt(o.error,o.meta);return s=v,[4,r(o.data,o.meta,e.originalArgs)];case 6:return [2,s.apply(void 0,[t.sent(),{fulfilledTimeStamp:Date.now(),baseQueryMeta:o.meta}])];case 7:if((l=t.sent())instanceof nt)return [2,p(l.value,{baseQueryMeta:l.meta})];throw console.error(l),l;case 8: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=_e(r+"/executeQuery",s,{getPendingMeta:function(){return {startedTimeStamp:Date.now()}},condition:function(e,t){var n,i,u=(0, t.getState)(),a=null==(i=null==(n=u[r])?void 0:n.queries)?void 0:i[e.queryCacheKey],o=null==a?void 0:a.fulfilledTimeStamp;return !("pending"===(null==a?void 0:a.status)||!f(e,u)&&o)},dispatchConditionRejection:!0});function d(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:_e(r+"/executeMutation",s,{getPendingMeta:function(){return {startedTimeStamp:Date.now()}}}),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(j(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}},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:ze(We(e),d(t)),matchFulfilled:ze(He(e),d(t)),matchRejected:ze(Be(e),d(t))}}}}({baseQuery:a,reducerPath:o,context:r,api:e,serializeQueryArgs:c}),m=g.queryThunk,R=g.mutationThunk,x=g.patchQueryData,C=g.updateQueryData,E=g.prefetch,k=g.buildMatchThunkActions,D=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=Ie(n+"/resetApiState"),h=Ce({name:n+"/queries",initialState:Ot,reducers:{removeQueryResult:function(e,t){delete e[t.payload.queryCacheKey];},queryResultPatched:function(e,t){var n=t.payload,r=n.patches;gt(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;u.subscribe&&(null!=e[r=u.queryCacheKey]||(e[r]={status:exports.QueryStatus.uninitialized,endpointName:u.endpointName})),gt(e,u.queryCacheKey,(function(e){e.status=exports.QueryStatus.pending,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;gt(e,r.arg.queryCacheKey,(function(e){var n;e.requestId===r.requestId&&(e.status=exports.QueryStatus.fulfilled,e.data=null==(n=a[r.arg.endpointName].structuralSharing)||n?$e(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;gt(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=Ce({name:n+"/mutations",initialState:Ot,reducers:{removeMutationResult:function(e,t){var n=mt(t.payload);n in e&&delete e[n];}},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[mt(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&&bt(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&&bt(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=Ce({name:n+"/invalidation",initialState:Ot,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(Fe(He(r),Ve(r)),(function(e,t){for(var n,r,i,u,o=yt(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=Ce({name:n+"/subscriptions",initialState:Ot,reducers:{updateSubscriptionOptions:function(e,t){var n,r=t.payload,i=r.queryCacheKey,u=r.requestId;(null==(n=null==e?void 0:e[i])?void 0:n[u])&&(e[i][u]=r.options);},unsubscribeQueryResult:function(e,t){var n=t.payload,r=n.queryCacheKey;e[r]&&delete e[r][n.requestId];}},extraReducers:function(e){e.addCase(h.actions.removeQueryResult,(function(e,t){delete e[t.payload.queryCacheKey];})).addCase(r.pending,(function(e,t){var n,r,i,u,a=t.meta,o=a.arg,c=a.requestId;if(o.subscribe){var s=null!=(r=e[n=o.queryCacheKey])?r:e[n]={};s[c]=null!=(u=null!=(i=o.subscriptionOptions)?i:s[c])?u:{};}})).addCase(r.rejected,(function(e,t){var n,r,i,u,a=t.meta,o=a.arg,c=a.requestId;if(a.condition&&o.subscribe){var s=null!=(r=e[n=o.queryCacheKey])?r:e[n]={};s[c]=null!=(u=null!=(i=o.subscriptionOptions)?i:s[c])?u:{};}})).addMatcher(s,(function(e){return p({},e)}));}}),b=Ce({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)}));}}),O=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:m.reducer,config:b.reducer});return {reducer:function(e,t){return O(d.match(t)?void 0:e,t)},actions:v(p(p(p(p({},b.actions),h.actions),m.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}}),N=D.reducer,Q=D.actions;Mt(e.util,{patchQueryData:x,updateQueryData:C,prefetch:E,resetApiState:Q.resetApiState}),Mt(e.internalActions,Q),Object.defineProperty(e.util,"updateQueryResult",{get:function(){return e.util.updateQueryData}}),Object.defineProperty(e.util,"patchQueryResult",{get:function(){return e.util.patchQueryData}});var M=_t({reducerPath:o,context:r,queryThunk:m,mutationThunk:R,api:e,assertTagType:h}),K=M.middleware;Mt(e.util,M.actions),Mt(e,{reducer:N,middleware:K});var F=function(e){var n=e.serializeQueryArgs,r=e.reducerPath;return {buildQuerySelector:function(e,t){return function(r){var a=Se(u,(function(i){var u,a;return null!=(a=r===wt||null==(u=null==i?void 0:i.queries)?void 0:u[n({queryArgs:r,endpointDefinition:t,endpointName:e})])?a:At}));return Se(a,i)}},buildMutationSelector:function(){return function(e){var t,n;n="object"==typeof e?null!=(t=mt(e))?t:wt:e;var r=Se(u,(function(e){var t,r;return null!=(r=n===wt||null==(t=null==e?void 0:e.mutations)?void 0:t[n])?r:Pt}));return Se(r,i)}},selectInvalidatedBy:function(e,t){for(var n,i=e[r],u=new Set,a=0,o=t.map(vt);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 i(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 u(e){return e[r]}}({serializeQueryArgs:c,reducerPath:o}),z=F.buildQuerySelector,U=F.buildMutationSelector;Mt(e.util,{selectInvalidatedBy:F.selectInvalidatedBy});var L=function(e){var t=e.serializeQueryArgs,n=e.queryThunk,r=e.mutationThunk,a=e.api,o=e.context,c={},s={},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;return function(s,f){var d=t({queryArgs:o,endpointDefinition:r,endpointName:e}),m=n({type:"query",subscribe:v,forceRefetch:h,subscriptionOptions:g,endpointName:e,originalArgs:o,queryCacheKey:d}),b=s(m),O=b.requestId,w=b.abort,j=Object.assign(Promise.all([c[d],b]).then((function(){return a.endpoints[e].select(o)(f())})),{arg:o,requestId:O,subscriptionOptions:g,queryCacheKey:d,abort:w,unwrap:function(){return y(this,null,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return [4,j];case 1:if((e=t.sent()).isError)throw e.error;return [2,e.data]}}))}))},refetch:function(){s(u(o,{subscribe:!1,forceRefetch:!0}));},unsubscribe:function(){v&&s(l({queryCacheKey:d,requestId:O}));},updateSubscriptionOptions:function(t){j.subscriptionOptions=t,s(p({endpointName:e,requestId:O,queryCacheKey:d,options:t}));}});return c[d]||(c[d]=j,j.then((function(){delete c[d];}))),j}};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});return s[f]=y,y.then((function(){delete s[f];})),o&&(s[o]=y,y.then((function(){s[o]===y&&delete s[o];}))),y}}},getRunningOperationPromises:function(){return u(u([],Object.values(c)),Object.values(s)).filter((function(e){return !!e}))},getRunningOperationPromise:function(e,n){var r=o.endpointDefinitions[e];if(r.type===it.query){var i=t({queryArgs:n,endpointDefinition:r,endpointName:e});return c[i]}return s[n]}}}({queryThunk:m,mutationThunk:R,api:e,serializeQueryArgs:c,context:r}),W=L.buildInitiateQuery,B=L.buildInitiateMutation;return Mt(e.util,{getRunningOperationPromises:L.getRunningOperationPromises,getRunningOperationPromise:L.getRunningOperationPromise}),{name:Kt,injectEndpoint:function(t,n){var r,i=e;null!=(r=i.endpoints)[t]||(r[t]={}),n.type===it.query?Mt(i.endpoints[t],{select:z(t,n),initiate:W(t,n)},k(m,t)):n.type===it.mutation&&Mt(i.endpoints[t],{select:U(),initiate:B(t)},k(R,t));}}}}},zt=Rt(Ft());

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

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

declare type ExtractDispatchFromMiddlewareTuple<MiddlewareTuple extends any[], Acc extends {}> = MiddlewareTuple extends [infer Head, ...infer Tail] ? ExtractDispatchFromMiddlewareTuple<Tail, Acc & (Head extends Middleware<infer D, any> ? IsAny<D, {}, D> : {})> : Acc;
export declare type ExtractDispatchExtensions<M> = M extends MiddlewareArray<infer MiddlewareTuple> ? ExtractDispatchFromMiddlewareTuple<MiddlewareTuple, {}> : M extends Middleware[] ? ExtractDispatchFromMiddlewareTuple<[...M], {}> : never;
export declare type ExtractDispatchExtensions<M> = M extends MiddlewareArray<infer MiddlewareTuple> ? ExtractDispatchFromMiddlewareTuple<MiddlewareTuple, {}> : M extends ReadonlyArray<Middleware> ? ExtractDispatchFromMiddlewareTuple<[...M], {}> : never;
/**

@@ -51,0 +51,0 @@ * Convert a Union type `(A|B)` to an intersection type `(A&B)`

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

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

@@ -19,3 +19,3 @@ import { enableES5 } from 'immer'

export { createDraftSafeSelector } from './createDraftSafeSelector'
export type { ThunkAction, ThunkDispatch } from 'redux-thunk'
export type { ThunkAction, ThunkDispatch, ThunkMiddleware } from 'redux-thunk'

@@ -22,0 +22,0 @@ // We deliberately enable Immer's ES5 support, on the grounds that

@@ -73,4 +73,5 @@ import { isAnyOf, isFulfilled, isRejectedWithValue } from '@reduxjs/toolkit'

const querySubState = state.queries[queryCacheKey]
const subscriptionSubState = state.subscriptions[queryCacheKey]
if (querySubState && subscriptionSubState) {
const subscriptionSubState = state.subscriptions[queryCacheKey] ?? {}
if (querySubState) {
if (Object.keys(subscriptionSubState).length === 0) {

@@ -84,3 +85,2 @@ mwApi.dispatch(

mwApi.dispatch(refetchQuery(querySubState, queryCacheKey))
} else {
}

@@ -87,0 +87,0 @@ }

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

for (const tagTypeSubscriptions of Object.values(draft)) {
for (const idSubscriptions of Object.values(
tagTypeSubscriptions
)) {
const foundAt = idSubscriptions.indexOf(queryCacheKey)
if (foundAt !== -1) {
idSubscriptions.splice(foundAt, 1)
}
}
}
for (const { type, id } of providedTags) {

@@ -319,0 +330,0 @@ const subscribedQueries = ((draft[type] ??= {})[

@@ -5,10 +5,18 @@ import { createSlice } from '@reduxjs/toolkit'

let shouldApiResponseSuccess = true
function delay(ms: number) {
return new Promise((resolve) => setTimeout(resolve, ms))
}
const baseQuery = (args?: any) => ({ data: args })
const api = createApi({
baseQuery,
tagTypes: ['SUCCEED', 'FAILED'],
endpoints: (build) => ({
getUser: build.query<unknown, number>({
getUser: build.query<{ url: string; success: boolean }, number>({
query(id) {
return { url: `user/${id}` }
return { url: `user/${id}`, success: shouldApiResponseSuccess }
},
providesTags: (result) => (result?.success ? ['SUCCEED'] : ['FAILED']),
}),

@@ -33,49 +41,84 @@ }),

it('only resets the api state when resetApiState is dispatched', async () => {
storeRef.store.dispatch({ type: 'unrelated' }) // trigger "registered middleware" into place
const initialState = storeRef.store.getState()
describe('buildSlice', () => {
beforeEach(() => {
shouldApiResponseSuccess = true
})
await storeRef.store.dispatch(
getUser.initiate(1, { subscriptionOptions: { pollingInterval: 10 } })
)
it('only resets the api state when resetApiState is dispatched', async () => {
storeRef.store.dispatch({ type: 'unrelated' }) // trigger "registered middleware" into place
const initialState = storeRef.store.getState()
expect(storeRef.store.getState()).toEqual({
api: {
config: {
focused: true,
keepUnusedDataFor: 60,
middlewareRegistered: true,
online: true,
reducerPath: 'api',
refetchOnFocus: false,
refetchOnMountOrArgChange: false,
refetchOnReconnect: false,
},
mutations: {},
provided: {},
queries: {
'getUser(1)': {
data: {
url: 'user/1',
await storeRef.store.dispatch(
getUser.initiate(1, { subscriptionOptions: { pollingInterval: 10 } })
)
expect(storeRef.store.getState()).toEqual({
api: {
config: {
focused: true,
keepUnusedDataFor: 60,
middlewareRegistered: true,
online: true,
reducerPath: 'api',
refetchOnFocus: false,
refetchOnMountOrArgChange: false,
refetchOnReconnect: false,
},
mutations: {},
provided: {
SUCCEED: {
__internal_without_id: ['getUser(1)'],
},
endpointName: 'getUser',
fulfilledTimeStamp: expect.any(Number),
originalArgs: 1,
requestId: expect.any(String),
startedTimeStamp: expect.any(Number),
status: 'fulfilled',
},
queries: {
'getUser(1)': {
data: {
url: 'user/1',
success: true,
},
endpointName: 'getUser',
fulfilledTimeStamp: expect.any(Number),
originalArgs: 1,
requestId: expect.any(String),
startedTimeStamp: expect.any(Number),
status: 'fulfilled',
},
},
subscriptions: {
'getUser(1)': expect.any(Object),
},
},
subscriptions: {
'getUser(1)': expect.any(Object),
auth: {
token: '1234',
},
},
auth: {
token: '1234',
},
})
storeRef.store.dispatch(api.util.resetApiState())
expect(storeRef.store.getState()).toEqual(initialState)
})
storeRef.store.dispatch(api.util.resetApiState())
it('replaces previous tags with new provided tags', async () => {
await storeRef.store.dispatch(getUser.initiate(1))
expect(storeRef.store.getState()).toEqual(initialState)
expect(
api.util.selectInvalidatedBy(storeRef.store.getState(), ['SUCCEED'])
).toHaveLength(1)
expect(
api.util.selectInvalidatedBy(storeRef.store.getState(), ['FAILED'])
).toHaveLength(0)
shouldApiResponseSuccess = false
storeRef.store.dispatch(getUser.initiate(1)).refetch()
await delay(10)
expect(
api.util.selectInvalidatedBy(storeRef.store.getState(), ['SUCCEED'])
).toHaveLength(0)
expect(
api.util.selectInvalidatedBy(storeRef.store.getState(), ['FAILED'])
).toHaveLength(1)
})
})

@@ -16,2 +16,3 @@ /* eslint-disable no-lone-blocks */

createSlice,
ConfigureStoreOptions,
} from '@reduxjs/toolkit'

@@ -309,2 +310,14 @@ import type { ThunkMiddleware, ThunkAction, ThunkDispatch } from 'redux-thunk'

/**
* Test: read-only middleware tuple
*/
{
const store = configureStore({
reducer: reducerA,
middleware: [] as any as readonly [Middleware<(a: StateA) => boolean, StateA>],
})
const result: boolean = store.dispatch(5)
// @ts-expect-error
const result2: string = store.dispatch(5)
}
/**
* Test: multiple custom middleware

@@ -478,3 +491,29 @@ */

/**
* Test: decorated `configureStore` won't make `dispatch` `never`
*/
{
const someSlice = createSlice({
name: 'something',
initialState: null as any,
reducers: {
set(state) {
return state;
},
},
});
function configureMyStore<S>(options: Omit<ConfigureStoreOptions<S>, 'reducer'>) {
return configureStore({
...options,
reducer: someSlice.reducer,
});
}
const store = configureMyStore({});
expectType<Function>(store.dispatch);
}
{
interface CounterState {

@@ -481,0 +520,0 @@ value: number

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

? ExtractDispatchFromMiddlewareTuple<MiddlewareTuple, {}>
: M extends Middleware[]
: M extends ReadonlyArray<Middleware>
? ExtractDispatchFromMiddlewareTuple<[...M], {}>

@@ -94,0 +94,0 @@ : never

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

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